amotify 0.1.32 → 0.1.34
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/@declaration/_.js +1 -1
- package/dist/@declaration/property.d.ts +2 -2
- package/dist/@styles/componentClasses/_.css +66 -65
- package/dist/@styles/componentClasses/_.js +39 -39
- package/dist/@styles/index.css +66 -65
- package/dist/@styles/index.js +39 -39
- package/dist/@styles/init.css +1 -1
- package/dist/@styles/style.css +96 -65
- package/dist/@styles/style.js +39 -39
- package/dist/@styles/var.css +1 -1
- package/dist/@utils/GenerateClassName.js +1 -470
- package/dist/@utils/LaunchReactApp.d.ts +1 -1
- package/dist/@utils/LaunchReactApp.js +1 -78
- package/dist/@utils/_.js +1 -12
- package/dist/@utils/collectForm.js +1 -96
- package/dist/@utils/color.js +1 -103
- package/dist/@utils/config.js +1 -101
- package/dist/@utils/fin.js +1 -39
- package/dist/@utils/getElement.js +1 -13
- package/dist/@utils/jsminEx.js +1 -172
- package/dist/@utils/pageTransit.js +1 -33
- package/dist/@utils/useRecycle.js +1 -44
- package/dist/@utils/useStore.js +1 -54
- package/dist/atoms/Box.js +1 -20
- package/dist/atoms/FAI.js +1 -148
- package/dist/atoms/Flex.js +1 -34
- package/dist/atoms/Grid.js +1 -17
- package/dist/atoms/Img.js +1 -65
- package/dist/atoms/Logo.js +51 -359
- package/dist/atoms/P.js +1 -20
- package/dist/atoms/Placeholder.js +1 -44
- package/dist/atoms/Span.js +1 -20
- package/dist/atoms/_.js +1 -9
- package/dist/fn/Button.js +1 -316
- package/dist/fn/Cropper.js +1 -1009
- package/dist/fn/Effect/Fade.js +1 -88
- package/dist/fn/Effect/Pudding.js +1 -22
- package/dist/fn/Effect/Ripple.js +3 -117
- package/dist/fn/Effect/_.js +1 -14
- package/dist/fn/Input/AutoHeightText.js +1 -112
- package/dist/fn/Input/Checker.js +1 -36
- package/dist/fn/Input/Chips/Selector.js +1 -472
- package/dist/fn/Input/Chips/_.js +1 -349
- package/dist/fn/Input/Contenteditable.js +1 -160
- package/dist/fn/Input/DigitCharacters.js +1 -275
- package/dist/fn/Input/Filer.js +1 -619
- package/dist/fn/Input/Hidden.js +1 -48
- package/dist/fn/Input/List.js +1 -450
- package/dist/fn/Input/Parts.js +1 -121
- package/dist/fn/Input/Plain.js +1 -12
- package/dist/fn/Input/RichSelect.js +1 -279
- package/dist/fn/Input/Search.js +1 -53
- package/dist/fn/Input/Segmented.js +1 -245
- package/dist/fn/Input/Select.js +1 -278
- package/dist/fn/Input/Slider.js +1 -538
- package/dist/fn/Input/Switch.js +1 -221
- package/dist/fn/Input/Text.js +1 -626
- package/dist/fn/Input/TextArea.js +1 -151
- package/dist/fn/Input/Time/Picker.js +1 -1457
- package/dist/fn/Input/Time/_.js +1 -867
- package/dist/fn/Input/_.js +1 -48
- package/dist/fn/Input/core.js +1 -626
- package/dist/fn/Layout/PageNotFound.js +1 -90
- package/dist/fn/Layout/PageRouter.js +1 -87
- package/dist/fn/Layout/PageViewController.js +1 -29
- package/dist/fn/Layout/Plate.js +1 -37
- package/dist/fn/Layout/RootViewController.js +1 -315
- package/dist/fn/Layout/SwipeView.js +1 -348
- package/dist/fn/Layout/TabBar.js +1 -72
- package/dist/fn/Layout/_.js +1 -22
- package/dist/fn/Loader/_.js +1 -104
- package/dist/fn/Loader/corner.js +1 -85
- package/dist/fn/Loader/mini.js +1 -125
- package/dist/fn/Loader/top.js +1 -73
- package/dist/fn/Sheet.d.ts +1 -0
- package/dist/fn/Sheet.js +1 -1101
- package/dist/fn/Snackbar.js +1 -216
- package/dist/fn/Table/Data.js +1 -974
- package/dist/fn/Table/Drag.js +1 -435
- package/dist/fn/Table/Normal.js +1 -136
- package/dist/fn/Table/Parts.js +1 -41
- package/dist/fn/Table/Wrapper.js +1 -60
- package/dist/fn/Table/_.js +1 -16
- package/dist/fn/Table/cellStyling.js +1 -51
- package/dist/fn/Tooltips.js +1 -58
- package/dist/fn/_.js +1 -10
- package/dist/index.js +1 -20
- package/dist/mols/Accordion.js +1 -152
- package/dist/mols/Column.js +1 -16
- package/dist/mols/LinkifyText.js +1 -42
- package/dist/mols/List.js +1 -42
- package/dist/mols/Row.js +1 -47
- package/dist/mols/Text.js +1 -67
- package/dist/mols/_.js +1 -6
- package/dist/temps/_.js +1 -1
- package/dist/temps/designBook.js +20 -3639
- package/package.json +1 -1
- package/dist/chunk-JJ3PEWPN.js +0 -60
package/dist/fn/Table/Drag.js
CHANGED
|
@@ -1,435 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__async,
|
|
3
|
-
__spreadProps,
|
|
4
|
-
__spreadValues
|
|
5
|
-
} from "../../chunk-JJ3PEWPN.js";
|
|
6
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import {
|
|
8
|
-
useState,
|
|
9
|
-
useEffect
|
|
10
|
-
} from "react";
|
|
11
|
-
import {
|
|
12
|
-
$$,
|
|
13
|
-
$$fromRoot,
|
|
14
|
-
useStore
|
|
15
|
-
} from "../../@utils/_";
|
|
16
|
-
import FAI from "../../atoms/FAI";
|
|
17
|
-
import Button from "../Button";
|
|
18
|
-
import Tooltips from "../Tooltips";
|
|
19
|
-
import TableParts from "./Parts";
|
|
20
|
-
import Wrapper from "./Wrapper";
|
|
21
|
-
import { faGripVertical } from "@fortawesome/free-solid-svg-icons/faGripVertical";
|
|
22
|
-
import { DefaultCellSystemStyles } from "./cellStyling";
|
|
23
|
-
import { TableClasses } from "../../@styles/componentClasses/_";
|
|
24
|
-
const Comps = {
|
|
25
|
-
HeadRow: (props) => {
|
|
26
|
-
let {
|
|
27
|
-
cellStyles = {},
|
|
28
|
-
cellClassName = "",
|
|
29
|
-
cellStylesCallback,
|
|
30
|
-
colLength,
|
|
31
|
-
head,
|
|
32
|
-
rows
|
|
33
|
-
} = props;
|
|
34
|
-
if (!head)
|
|
35
|
-
return null;
|
|
36
|
-
let Cols = [];
|
|
37
|
-
for (let colIndex = 0; colIndex < colLength; colIndex++) {
|
|
38
|
-
let col = head[colIndex];
|
|
39
|
-
let Cell = TableParts[col.type == "th" ? "TH" : "TD"];
|
|
40
|
-
Cols.push(/* @__PURE__ */ jsx(
|
|
41
|
-
Cell,
|
|
42
|
-
__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, cellStyles), DefaultCellSystemStyles({
|
|
43
|
-
top: true,
|
|
44
|
-
bottom: !rows.length,
|
|
45
|
-
left: colIndex == 0,
|
|
46
|
-
right: colIndex == colLength - 1
|
|
47
|
-
})), cellStylesCallback ? cellStylesCallback({
|
|
48
|
-
top: true,
|
|
49
|
-
bottom: !rows.length,
|
|
50
|
-
left: colIndex == 0,
|
|
51
|
-
right: colIndex == colLength - 1,
|
|
52
|
-
rowIndex: 0,
|
|
53
|
-
colIndex,
|
|
54
|
-
isBody: false,
|
|
55
|
-
isHeader: true
|
|
56
|
-
}) : {}), {
|
|
57
|
-
className: [
|
|
58
|
-
TableClasses("Cell"),
|
|
59
|
-
cellClassName,
|
|
60
|
-
col.className
|
|
61
|
-
].join(" ")
|
|
62
|
-
}), col)
|
|
63
|
-
));
|
|
64
|
-
}
|
|
65
|
-
return /* @__PURE__ */ jsx(
|
|
66
|
-
TableParts.Row,
|
|
67
|
-
{
|
|
68
|
-
className: [TableClasses("Row"), TableClasses("HeadRow")].join(" "),
|
|
69
|
-
children: Cols
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
},
|
|
73
|
-
BodyRows: (props) => {
|
|
74
|
-
let {
|
|
75
|
-
cellStyles = {},
|
|
76
|
-
cellClassName = "",
|
|
77
|
-
cellStylesCallback,
|
|
78
|
-
head,
|
|
79
|
-
rows,
|
|
80
|
-
colLength,
|
|
81
|
-
onOrderChanged
|
|
82
|
-
} = props;
|
|
83
|
-
let [val_componentID] = useState($$.uuid.gen());
|
|
84
|
-
let [val_info, set_info] = useState({
|
|
85
|
-
rows,
|
|
86
|
-
origin: 0,
|
|
87
|
-
to: NaN
|
|
88
|
-
});
|
|
89
|
-
let BodyRows = [];
|
|
90
|
-
val_info.rows.forEach((cols, rowIndex) => {
|
|
91
|
-
let Cols = [];
|
|
92
|
-
{
|
|
93
|
-
Cols.push(/* @__PURE__ */ jsx(
|
|
94
|
-
TableParts.TH,
|
|
95
|
-
__spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
96
|
-
padding: 0,
|
|
97
|
-
borderRight: true
|
|
98
|
-
}, cellStyles), DefaultCellSystemStyles({
|
|
99
|
-
top: rowIndex == 0 && !head,
|
|
100
|
-
bottom: rowIndex == rows.length - 1,
|
|
101
|
-
left: true,
|
|
102
|
-
right: false
|
|
103
|
-
})), cellStylesCallback ? cellStylesCallback({
|
|
104
|
-
top: rowIndex == 0 && !head,
|
|
105
|
-
bottom: rowIndex == rows.length - 1,
|
|
106
|
-
left: true,
|
|
107
|
-
right: false,
|
|
108
|
-
rowIndex,
|
|
109
|
-
colIndex: 0,
|
|
110
|
-
isBody: true,
|
|
111
|
-
isHeader: false
|
|
112
|
-
}) : {}), {
|
|
113
|
-
className: [
|
|
114
|
-
TableClasses("Cell"),
|
|
115
|
-
TableClasses("Draggable"),
|
|
116
|
-
cellClassName
|
|
117
|
-
].join(" "),
|
|
118
|
-
children: /* @__PURE__ */ jsx(
|
|
119
|
-
Button.Button.Clear.R,
|
|
120
|
-
{
|
|
121
|
-
className: TableClasses("DragableButton"),
|
|
122
|
-
fontColor: "4.thin",
|
|
123
|
-
fontSize: "3.paragraph",
|
|
124
|
-
margin: "auto",
|
|
125
|
-
tabIndex: -1,
|
|
126
|
-
ssSphere: 3,
|
|
127
|
-
onMouseDown: (event) => {
|
|
128
|
-
Effects.Start(event, {
|
|
129
|
-
id: val_componentID,
|
|
130
|
-
index: rowIndex,
|
|
131
|
-
rows: val_info.rows,
|
|
132
|
-
maxLength: rows.length
|
|
133
|
-
});
|
|
134
|
-
},
|
|
135
|
-
onTouchStart: (event) => {
|
|
136
|
-
Effects.Start(event, {
|
|
137
|
-
id: val_componentID,
|
|
138
|
-
index: rowIndex,
|
|
139
|
-
rows: val_info.rows,
|
|
140
|
-
maxLength: rows.length
|
|
141
|
-
});
|
|
142
|
-
},
|
|
143
|
-
children: /* @__PURE__ */ jsx(FAI, { icon: faGripVertical })
|
|
144
|
-
}
|
|
145
|
-
)
|
|
146
|
-
}),
|
|
147
|
-
"DragOrigin"
|
|
148
|
-
));
|
|
149
|
-
}
|
|
150
|
-
cols.forEach((col, colIndex) => {
|
|
151
|
-
col = __spreadValues({}, col);
|
|
152
|
-
let Cell = TableParts[col.type == "th" ? "TH" : "TD"];
|
|
153
|
-
Cols.push(/* @__PURE__ */ jsx(
|
|
154
|
-
Cell,
|
|
155
|
-
__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, cellStyles), DefaultCellSystemStyles({
|
|
156
|
-
top: !!head && !head.length,
|
|
157
|
-
bottom: rowIndex == rows.length - 1,
|
|
158
|
-
left: false,
|
|
159
|
-
right: colIndex == colLength - 2
|
|
160
|
-
})), cellStylesCallback ? cellStylesCallback({
|
|
161
|
-
top: !!head && !head.length,
|
|
162
|
-
bottom: rowIndex == rows.length - 1,
|
|
163
|
-
left: false,
|
|
164
|
-
right: colIndex == colLength - 2,
|
|
165
|
-
rowIndex,
|
|
166
|
-
colIndex,
|
|
167
|
-
isBody: true,
|
|
168
|
-
isHeader: false
|
|
169
|
-
}) : {}), {
|
|
170
|
-
className: [
|
|
171
|
-
TableClasses("Cell"),
|
|
172
|
-
cellClassName,
|
|
173
|
-
col.className
|
|
174
|
-
].join(" ")
|
|
175
|
-
}), col)
|
|
176
|
-
));
|
|
177
|
-
});
|
|
178
|
-
BodyRows.push(/* @__PURE__ */ jsx(
|
|
179
|
-
TableParts.Row,
|
|
180
|
-
{
|
|
181
|
-
id: "TableRow-" + val_componentID + "-" + rowIndex,
|
|
182
|
-
"data-rowId": rowIndex,
|
|
183
|
-
className: [TableClasses("Row"), TableClasses("BodyRow")].join(" "),
|
|
184
|
-
children: Cols
|
|
185
|
-
},
|
|
186
|
-
rowIndex
|
|
187
|
-
));
|
|
188
|
-
});
|
|
189
|
-
if (!isNaN(val_info.to)) {
|
|
190
|
-
let {
|
|
191
|
-
origin,
|
|
192
|
-
to
|
|
193
|
-
} = val_info;
|
|
194
|
-
let Cols = [];
|
|
195
|
-
Cols.push(/* @__PURE__ */ jsx(
|
|
196
|
-
TableParts.TH,
|
|
197
|
-
{
|
|
198
|
-
backgroundColor: "tcOpLow",
|
|
199
|
-
padding: 0,
|
|
200
|
-
borderRight: "2.normal",
|
|
201
|
-
className: [
|
|
202
|
-
TableClasses("Cell"),
|
|
203
|
-
TableClasses("Draggable"),
|
|
204
|
-
cellClassName
|
|
205
|
-
].join(" "),
|
|
206
|
-
children: /* @__PURE__ */ jsx(
|
|
207
|
-
FAI.ArrowRight,
|
|
208
|
-
{
|
|
209
|
-
fontColor: "theme"
|
|
210
|
-
}
|
|
211
|
-
)
|
|
212
|
-
},
|
|
213
|
-
"dragButton"
|
|
214
|
-
));
|
|
215
|
-
let cols = val_info.rows[origin];
|
|
216
|
-
cols.forEach((col, colIndex) => {
|
|
217
|
-
col = __spreadValues({}, col);
|
|
218
|
-
let Cell = TableParts[col.type == "th" ? "TH" : "TD"];
|
|
219
|
-
Cols.push(/* @__PURE__ */ jsx(
|
|
220
|
-
Cell,
|
|
221
|
-
__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, cellStyles), DefaultCellSystemStyles({
|
|
222
|
-
top: false,
|
|
223
|
-
bottom: false,
|
|
224
|
-
left: false,
|
|
225
|
-
right: false
|
|
226
|
-
})), cellStylesCallback ? cellStylesCallback({
|
|
227
|
-
top: false,
|
|
228
|
-
bottom: false,
|
|
229
|
-
left: false,
|
|
230
|
-
right: false,
|
|
231
|
-
rowIndex: -1,
|
|
232
|
-
colIndex: -1,
|
|
233
|
-
isBody: true,
|
|
234
|
-
isHeader: false
|
|
235
|
-
}) : {}), {
|
|
236
|
-
className: [
|
|
237
|
-
TableClasses("Cell"),
|
|
238
|
-
cellClassName,
|
|
239
|
-
col.className
|
|
240
|
-
].join(" "),
|
|
241
|
-
backgroundColor: "tcOpLow"
|
|
242
|
-
}), col)
|
|
243
|
-
));
|
|
244
|
-
});
|
|
245
|
-
BodyRows.splice(to, 0, /* @__PURE__ */ jsx(
|
|
246
|
-
TableParts.Row,
|
|
247
|
-
{
|
|
248
|
-
className: [TableClasses("Row"), TableClasses("Pre")].join(" "),
|
|
249
|
-
children: Cols
|
|
250
|
-
},
|
|
251
|
-
"preSet"
|
|
252
|
-
));
|
|
253
|
-
}
|
|
254
|
-
useEffect(() => {
|
|
255
|
-
useStore.set({
|
|
256
|
-
key: val_componentID,
|
|
257
|
-
value: {
|
|
258
|
-
swap: (rowIndex, insertIndex) => {
|
|
259
|
-
if (insertIndex || insertIndex == 0) {
|
|
260
|
-
let targetRow = val_info.rows[rowIndex];
|
|
261
|
-
let newRows = [...val_info.rows];
|
|
262
|
-
newRows.splice(rowIndex, 1);
|
|
263
|
-
newRows.splice(insertIndex - (rowIndex < insertIndex ? 1 : 0), 0, targetRow);
|
|
264
|
-
set_info({
|
|
265
|
-
rows: newRows,
|
|
266
|
-
origin: 0,
|
|
267
|
-
to: NaN
|
|
268
|
-
});
|
|
269
|
-
onOrderChanged(newRows.map((row) => JSON.parse(row.rowID)));
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
|
-
preSet: (props2) => {
|
|
273
|
-
let {
|
|
274
|
-
origin,
|
|
275
|
-
index
|
|
276
|
-
} = props2;
|
|
277
|
-
set_info({
|
|
278
|
-
rows: val_info.rows,
|
|
279
|
-
origin,
|
|
280
|
-
to: index
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
});
|
|
286
|
-
useEffect(() => {
|
|
287
|
-
return () => {
|
|
288
|
-
useStore.delete(val_componentID);
|
|
289
|
-
};
|
|
290
|
-
}, []);
|
|
291
|
-
return /* @__PURE__ */ jsx(Fragment, { children: BodyRows });
|
|
292
|
-
},
|
|
293
|
-
Drag: (params) => {
|
|
294
|
-
params = __spreadValues({}, params);
|
|
295
|
-
params.colLength = params.colLength + 1;
|
|
296
|
-
if (params.head) {
|
|
297
|
-
params.head = [
|
|
298
|
-
{
|
|
299
|
-
children: /* @__PURE__ */ jsx(
|
|
300
|
-
Button.Button.Clear.R,
|
|
301
|
-
{
|
|
302
|
-
ssSphere: 3,
|
|
303
|
-
fontSize: "3.paragraph",
|
|
304
|
-
fontColor: "theme",
|
|
305
|
-
onMouseOver: (event) => {
|
|
306
|
-
Tooltips.open({
|
|
307
|
-
parent: event.currentTarget,
|
|
308
|
-
content: /* @__PURE__ */ jsxs(Tooltips.Comps.Body, { children: [
|
|
309
|
-
/* @__PURE__ */ jsx(FAI, { icon: faGripVertical }),
|
|
310
|
-
"\u30DC\u30BF\u30F3\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u9806\u5E8F\u3092\u5909\u66F4"
|
|
311
|
-
] })
|
|
312
|
-
});
|
|
313
|
-
},
|
|
314
|
-
children: /* @__PURE__ */ jsx(FAI.QuestionCircle, {})
|
|
315
|
-
}
|
|
316
|
-
),
|
|
317
|
-
padding: [0, 1],
|
|
318
|
-
unitWidth: 4
|
|
319
|
-
},
|
|
320
|
-
...params.head
|
|
321
|
-
];
|
|
322
|
-
}
|
|
323
|
-
params.rows = params.rows.map((row, rowIndex) => {
|
|
324
|
-
row.rowID = JSON.stringify(row.rowID || rowIndex);
|
|
325
|
-
return row;
|
|
326
|
-
});
|
|
327
|
-
return /* @__PURE__ */ jsxs(TableParts.Table, { className: TableClasses("Table"), children: [
|
|
328
|
-
/* @__PURE__ */ jsx(Comps.HeadRow, __spreadValues({}, params)),
|
|
329
|
-
/* @__PURE__ */ jsx(Comps.BodyRows, __spreadValues({}, params))
|
|
330
|
-
] });
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
const Drag = (params) => /* @__PURE__ */ jsx(
|
|
334
|
-
Wrapper,
|
|
335
|
-
__spreadProps(__spreadValues({
|
|
336
|
-
type: "drag"
|
|
337
|
-
}, params), {
|
|
338
|
-
JSXChildren: Comps.Drag
|
|
339
|
-
})
|
|
340
|
-
);
|
|
341
|
-
const Effects = {
|
|
342
|
-
Start: function(event, info) {
|
|
343
|
-
return __async(this, null, function* () {
|
|
344
|
-
event.stopPropagation();
|
|
345
|
-
event.preventDefault();
|
|
346
|
-
let {
|
|
347
|
-
id,
|
|
348
|
-
index,
|
|
349
|
-
rows,
|
|
350
|
-
maxLength
|
|
351
|
-
} = info;
|
|
352
|
-
$$fromRoot("#TableRow-" + id + "-" + index).addClass(TableClasses("DraggerOrigin"));
|
|
353
|
-
$$(document).addEvent({
|
|
354
|
-
eventID: "DragMouseMove",
|
|
355
|
-
eventType: "mousemove",
|
|
356
|
-
callback: (event2) => {
|
|
357
|
-
Effects.Move(event2, info);
|
|
358
|
-
},
|
|
359
|
-
options: { passive: false }
|
|
360
|
-
}).addEvent({
|
|
361
|
-
eventID: "DragTouchMove",
|
|
362
|
-
eventType: "touchmove",
|
|
363
|
-
callback: (event2) => {
|
|
364
|
-
Effects.Move(event2, info);
|
|
365
|
-
},
|
|
366
|
-
options: { passive: false }
|
|
367
|
-
}).addEvent({
|
|
368
|
-
eventID: "DragMouseUp",
|
|
369
|
-
eventType: "mouseup",
|
|
370
|
-
callback: (event2) => {
|
|
371
|
-
Effects.End(event2, info);
|
|
372
|
-
}
|
|
373
|
-
}).addEvent({
|
|
374
|
-
eventID: "DragTouchEnd",
|
|
375
|
-
eventType: "touchend",
|
|
376
|
-
callback: (event2) => {
|
|
377
|
-
Effects.End(event2, info);
|
|
378
|
-
}
|
|
379
|
-
});
|
|
380
|
-
});
|
|
381
|
-
},
|
|
382
|
-
Move: function(event, info) {
|
|
383
|
-
let {
|
|
384
|
-
id,
|
|
385
|
-
maxLength
|
|
386
|
-
} = info;
|
|
387
|
-
let Y = $$.getCursor(event).y - $$.getScreenSize().scrollY;
|
|
388
|
-
for (let rowIndex = 0; rowIndex < maxLength; rowIndex++) {
|
|
389
|
-
let Row = $$fromRoot("#TableRow-" + id + "-" + rowIndex);
|
|
390
|
-
let {
|
|
391
|
-
top: rT,
|
|
392
|
-
bottom: rB,
|
|
393
|
-
height: rH
|
|
394
|
-
} = Row.position();
|
|
395
|
-
if (rowIndex == 0 && Y < rT) {
|
|
396
|
-
info.insertIndex = 0;
|
|
397
|
-
} else if (rowIndex === maxLength - 1 && rB <= Y) {
|
|
398
|
-
info.insertIndex = maxLength;
|
|
399
|
-
} else if (Y >= rT && Y < rB) {
|
|
400
|
-
info.insertIndex = rowIndex + 1;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
{
|
|
404
|
-
let {
|
|
405
|
-
index,
|
|
406
|
-
insertIndex
|
|
407
|
-
} = info;
|
|
408
|
-
let component = useStore.get(id);
|
|
409
|
-
if (component && component.preSet)
|
|
410
|
-
component.preSet({
|
|
411
|
-
origin: index,
|
|
412
|
-
index: insertIndex
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
event.stopPropagation();
|
|
416
|
-
event.preventDefault();
|
|
417
|
-
return false;
|
|
418
|
-
},
|
|
419
|
-
End: function(event, info) {
|
|
420
|
-
let {
|
|
421
|
-
id,
|
|
422
|
-
index,
|
|
423
|
-
insertIndex
|
|
424
|
-
} = info;
|
|
425
|
-
let component = useStore.get(id);
|
|
426
|
-
if (component && component.swap)
|
|
427
|
-
component.swap(index, insertIndex);
|
|
428
|
-
$$fromRoot("#TableRow-" + id + "-" + index).removeClass(TableClasses("DraggerOrigin"));
|
|
429
|
-
$$(document).removeEvent(["DragMouseMove", "DragTouchMove", "DragMouseUp", "DragTouchEnd"]);
|
|
430
|
-
}
|
|
431
|
-
};
|
|
432
|
-
export {
|
|
433
|
-
Drag,
|
|
434
|
-
Drag as default
|
|
435
|
-
};
|
|
1
|
+
import{b as r,c as w,e as I}from"../../chunk-VY3566IV.js";import{Fragment as J,jsx as s,jsxs as j}from"react/jsx-runtime";import{useState as k,useEffect as x}from"react";import{$$ as T,$$fromRoot as N,useStore as R}from"../../@utils/_";import v from"../../atoms/FAI";import M from"../Button";import L from"../Tooltips";import b from"./Parts";import z from"./Wrapper";import{faGripVertical as O}from"@fortawesome/free-solid-svg-icons/faGripVertical";import{DefaultCellSystemStyles as S}from"./cellStyling";import{TableClasses as g}from"../../@styles/componentClasses/_";const E={HeadRow:e=>{let{cellStyles:t={},cellClassName:d="",cellStylesCallback:a,colLength:n,head:o,rows:i}=e;if(!o)return null;let m=[];for(let p=0;p<n;p++){let c=o[p],D=b[c.type=="th"?"TH":"TD"];m.push(s(D,r(w(r(r(r({},t),S({top:!0,bottom:!i.length,left:p==0,right:p==n-1})),a?a({top:!0,bottom:!i.length,left:p==0,right:p==n-1,rowIndex:0,colIndex:p,isBody:!1,isHeader:!0}):{}),{className:[g("Cell"),d,c.className].join(" ")}),c)))}return s(b.Row,{className:[g("Row"),g("HeadRow")].join(" "),children:m})},BodyRows:e=>{let{cellStyles:t={},cellClassName:d="",cellStylesCallback:a,head:n,rows:o,colLength:i,onOrderChanged:m}=e,[p]=k(T.uuid.gen()),[c,D]=k({rows:o,origin:0,to:NaN}),B=[];if(c.rows.forEach((y,l)=>{let h=[];h.push(s(b.TH,w(r(r(r({padding:0,borderRight:!0},t),S({top:l==0&&!n,bottom:l==o.length-1,left:!0,right:!1})),a?a({top:l==0&&!n,bottom:l==o.length-1,left:!0,right:!1,rowIndex:l,colIndex:0,isBody:!0,isHeader:!1}):{}),{className:[g("Cell"),g("Draggable"),d].join(" "),children:s(M.Button.Clear.R,{className:g("DragableButton"),fontColor:"4.thin",fontSize:"3.paragraph",margin:"auto",tabIndex:-1,ssSphere:3,onMouseDown:u=>{C.Start(u,{id:p,index:l,rows:c.rows,maxLength:o.length})},onTouchStart:u=>{C.Start(u,{id:p,index:l,rows:c.rows,maxLength:o.length})},children:s(v,{icon:O})})}),"DragOrigin")),y.forEach((u,f)=>{u=r({},u);let H=b[u.type=="th"?"TH":"TD"];h.push(s(H,r(w(r(r(r({},t),S({top:!!n&&!n.length,bottom:l==o.length-1,left:!1,right:f==i-2})),a?a({top:!!n&&!n.length,bottom:l==o.length-1,left:!1,right:f==i-2,rowIndex:l,colIndex:f,isBody:!0,isHeader:!1}):{}),{className:[g("Cell"),d,u.className].join(" ")}),u)))}),B.push(s(b.Row,{id:"TableRow-"+p+"-"+l,"data-rowId":l,className:[g("Row"),g("BodyRow")].join(" "),children:h},l))}),!isNaN(c.to)){let{origin:y,to:l}=c,h=[];h.push(s(b.TH,{backgroundColor:"tcOpLow",padding:0,borderRight:"2.normal",className:[g("Cell"),g("Draggable"),d].join(" "),children:s(v.ArrowRight,{fontColor:"theme"})},"dragButton")),c.rows[y].forEach((f,H)=>{f=r({},f);let $=b[f.type=="th"?"TH":"TD"];h.push(s($,r(w(r(r(r({},t),S({top:!1,bottom:!1,left:!1,right:!1})),a?a({top:!1,bottom:!1,left:!1,right:!1,rowIndex:-1,colIndex:-1,isBody:!0,isHeader:!1}):{}),{className:[g("Cell"),d,f.className].join(" "),backgroundColor:"tcOpLow"}),f)))}),B.splice(l,0,s(b.Row,{className:[g("Row"),g("Pre")].join(" "),children:h},"preSet"))}return x(()=>{R.set({key:p,value:{swap:(y,l)=>{if(l||l==0){let h=c.rows[y],u=[...c.rows];u.splice(y,1),u.splice(l-(y<l?1:0),0,h),D({rows:u,origin:0,to:NaN}),m(u.map(f=>JSON.parse(f.rowID)))}},preSet:y=>{let{origin:l,index:h}=y;D({rows:c.rows,origin:l,to:h})}}})}),x(()=>()=>{R.delete(p)},[]),s(J,{children:B})},Drag:e=>(e=r({},e),e.colLength=e.colLength+1,e.head&&(e.head=[{children:s(M.Button.Clear.R,{ssSphere:3,fontSize:"3.paragraph",fontColor:"theme",onMouseOver:t=>{L.open({parent:t.currentTarget,content:j(L.Comps.Body,{children:[s(v,{icon:O}),"\u30DC\u30BF\u30F3\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u9806\u5E8F\u3092\u5909\u66F4"]})})},children:s(v.QuestionCircle,{})}),padding:[0,1],unitWidth:4},...e.head]),e.rows=e.rows.map((t,d)=>(t.rowID=JSON.stringify(t.rowID||d),t)),j(b.Table,{className:g("Table"),children:[s(E.HeadRow,r({},e)),s(E.BodyRows,r({},e))]}))},P=e=>s(z,w(r({type:"drag"},e),{JSXChildren:E.Drag})),C={Start:function(e,t){return I(this,null,function*(){e.stopPropagation(),e.preventDefault();let{id:d,index:a,rows:n,maxLength:o}=t;N("#TableRow-"+d+"-"+a).addClass(g("DraggerOrigin")),T(document).addEvent({eventID:"DragMouseMove",eventType:"mousemove",callback:i=>{C.Move(i,t)},options:{passive:!1}}).addEvent({eventID:"DragTouchMove",eventType:"touchmove",callback:i=>{C.Move(i,t)},options:{passive:!1}}).addEvent({eventID:"DragMouseUp",eventType:"mouseup",callback:i=>{C.End(i,t)}}).addEvent({eventID:"DragTouchEnd",eventType:"touchend",callback:i=>{C.End(i,t)}})})},Move:function(e,t){let{id:d,maxLength:a}=t,n=T.getCursor(e).y-T.getScreenSize().scrollY;for(let o=0;o<a;o++){let i=N("#TableRow-"+d+"-"+o),{top:m,bottom:p,height:c}=i.position();o==0&&n<m?t.insertIndex=0:o===a-1&&p<=n?t.insertIndex=a:n>=m&&n<p&&(t.insertIndex=o+1)}{let{index:o,insertIndex:i}=t,m=R.get(d);m&&m.preSet&&m.preSet({origin:o,index:i})}return e.stopPropagation(),e.preventDefault(),!1},End:function(e,t){let{id:d,index:a,insertIndex:n}=t,o=R.get(d);o&&o.swap&&o.swap(a,n),N("#TableRow-"+d+"-"+a).removeClass(g("DraggerOrigin")),T(document).removeEvent(["DragMouseMove","DragTouchMove","DragMouseUp","DragTouchEnd"])}};export{P as Drag,P as default};
|
package/dist/fn/Table/Normal.js
CHANGED
|
@@ -1,136 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__spreadProps,
|
|
3
|
-
__spreadValues
|
|
4
|
-
} from "../../chunk-JJ3PEWPN.js";
|
|
5
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import TableParts from "./Parts";
|
|
7
|
-
import Wrapper from "./Wrapper";
|
|
8
|
-
import { DefaultCellSystemStyles } from "./cellStyling";
|
|
9
|
-
import { TableClasses } from "../../@styles/componentClasses/_";
|
|
10
|
-
const Comps = {
|
|
11
|
-
HeadRow: (params) => {
|
|
12
|
-
let {
|
|
13
|
-
cellStyles = {},
|
|
14
|
-
cellClassName = "",
|
|
15
|
-
cellStylesCallback,
|
|
16
|
-
colLength,
|
|
17
|
-
head,
|
|
18
|
-
rows
|
|
19
|
-
} = params;
|
|
20
|
-
if (!head)
|
|
21
|
-
return null;
|
|
22
|
-
let Cols = [];
|
|
23
|
-
head.forEach((col, colIndex) => {
|
|
24
|
-
let Cell = TableParts[col.type == "th" ? "TH" : "TD"];
|
|
25
|
-
Cols.push(/* @__PURE__ */ jsx(
|
|
26
|
-
Cell,
|
|
27
|
-
__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, cellStyles), DefaultCellSystemStyles({
|
|
28
|
-
top: true,
|
|
29
|
-
bottom: !rows.length,
|
|
30
|
-
left: colIndex == 0,
|
|
31
|
-
right: colIndex == colLength - 1
|
|
32
|
-
})), cellStylesCallback ? cellStylesCallback({
|
|
33
|
-
top: true,
|
|
34
|
-
bottom: !rows.length,
|
|
35
|
-
left: colIndex == 0,
|
|
36
|
-
right: colIndex == colLength - 1,
|
|
37
|
-
rowIndex: 0,
|
|
38
|
-
colIndex,
|
|
39
|
-
isBody: false,
|
|
40
|
-
isHeader: true
|
|
41
|
-
}) : {}), {
|
|
42
|
-
className: [
|
|
43
|
-
TableClasses("Cell"),
|
|
44
|
-
cellClassName,
|
|
45
|
-
col.className
|
|
46
|
-
].join(" ")
|
|
47
|
-
}), col)
|
|
48
|
-
));
|
|
49
|
-
});
|
|
50
|
-
return /* @__PURE__ */ jsx(
|
|
51
|
-
TableParts.Row,
|
|
52
|
-
{
|
|
53
|
-
className: [TableClasses("Row"), TableClasses("HeadRow")].join(" "),
|
|
54
|
-
children: Cols
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
},
|
|
58
|
-
BodyRows: (params) => {
|
|
59
|
-
let {
|
|
60
|
-
cellStyles = {},
|
|
61
|
-
cellClassName = "",
|
|
62
|
-
cellStylesCallback,
|
|
63
|
-
head,
|
|
64
|
-
rows,
|
|
65
|
-
colLength,
|
|
66
|
-
onRowClick
|
|
67
|
-
} = params;
|
|
68
|
-
let BodyRows = [];
|
|
69
|
-
rows.forEach((cols, rowIndex) => {
|
|
70
|
-
let Cols = [];
|
|
71
|
-
cols.forEach((col, colIndex) => {
|
|
72
|
-
let Cell = TableParts[col.type == "th" ? "TH" : "TD"];
|
|
73
|
-
Cols.push(/* @__PURE__ */ jsx(
|
|
74
|
-
Cell,
|
|
75
|
-
__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, cellStyles), DefaultCellSystemStyles({
|
|
76
|
-
top: rowIndex == 0 && !head,
|
|
77
|
-
bottom: rowIndex == rows.length - 1,
|
|
78
|
-
left: colIndex == 0,
|
|
79
|
-
right: colIndex == colLength - 1
|
|
80
|
-
})), cellStylesCallback ? cellStylesCallback({
|
|
81
|
-
top: rowIndex == 0 && !head,
|
|
82
|
-
bottom: rowIndex == rows.length - 1,
|
|
83
|
-
left: colIndex == 0,
|
|
84
|
-
right: colIndex == colLength - 1,
|
|
85
|
-
rowIndex,
|
|
86
|
-
colIndex,
|
|
87
|
-
isBody: true,
|
|
88
|
-
isHeader: false
|
|
89
|
-
}) : {}), {
|
|
90
|
-
className: [
|
|
91
|
-
TableClasses("Cell"),
|
|
92
|
-
cellClassName,
|
|
93
|
-
col.className
|
|
94
|
-
].join(" ")
|
|
95
|
-
}), col)
|
|
96
|
-
));
|
|
97
|
-
});
|
|
98
|
-
BodyRows.push(/* @__PURE__ */ jsx(
|
|
99
|
-
TableParts.Row,
|
|
100
|
-
{
|
|
101
|
-
className: [TableClasses("Row"), TableClasses("BodyRow")].join(" "),
|
|
102
|
-
children: Cols,
|
|
103
|
-
onClick: (event) => {
|
|
104
|
-
if (onRowClick)
|
|
105
|
-
onRowClick(cols.rowID, event);
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
rowIndex
|
|
109
|
-
));
|
|
110
|
-
});
|
|
111
|
-
return /* @__PURE__ */ jsx(Fragment, { children: BodyRows });
|
|
112
|
-
},
|
|
113
|
-
Normal: (params) => {
|
|
114
|
-
params = __spreadValues({}, params);
|
|
115
|
-
params.rows = params.rows.map((row, rowIndex) => {
|
|
116
|
-
row.rowID = row.rowID || rowIndex;
|
|
117
|
-
return row;
|
|
118
|
-
});
|
|
119
|
-
return /* @__PURE__ */ jsxs(TableParts.Table, { className: TableClasses("Table"), children: [
|
|
120
|
-
/* @__PURE__ */ jsx(Comps.HeadRow, __spreadValues({}, params)),
|
|
121
|
-
/* @__PURE__ */ jsx(Comps.BodyRows, __spreadValues({}, params))
|
|
122
|
-
] });
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
const Normal = (params) => /* @__PURE__ */ jsx(
|
|
126
|
-
Wrapper,
|
|
127
|
-
__spreadProps(__spreadValues({
|
|
128
|
-
type: "normal"
|
|
129
|
-
}, params), {
|
|
130
|
-
JSXChildren: Comps.Normal
|
|
131
|
-
})
|
|
132
|
-
);
|
|
133
|
-
export {
|
|
134
|
-
Normal,
|
|
135
|
-
Normal as default
|
|
136
|
-
};
|
|
1
|
+
import{b as e,c as f}from"../../chunk-VY3566IV.js";import{Fragment as H,jsx as a,jsxs as B}from"react/jsx-runtime";import w from"./Parts";import d from"./Wrapper";import{DefaultCellSystemStyles as N}from"./cellStyling";import{TableClasses as s}from"../../@styles/componentClasses/_";const c={HeadRow:l=>{let{cellStyles:r={},cellClassName:i="",cellStylesCallback:n,colLength:y,head:m,rows:h}=l;if(!m)return null;let C=[];return m.forEach((p,t)=>{let o=w[p.type=="th"?"TH":"TD"];C.push(a(o,e(f(e(e(e({},r),N({top:!0,bottom:!h.length,left:t==0,right:t==y-1})),n?n({top:!0,bottom:!h.length,left:t==0,right:t==y-1,rowIndex:0,colIndex:t,isBody:!1,isHeader:!0}):{}),{className:[s("Cell"),i,p.className].join(" ")}),p)))}),a(w.Row,{className:[s("Row"),s("HeadRow")].join(" "),children:C})},BodyRows:l=>{let{cellStyles:r={},cellClassName:i="",cellStylesCallback:n,head:y,rows:m,colLength:h,onRowClick:C}=l,p=[];return m.forEach((t,o)=>{let b=[];t.forEach((R,u)=>{let g=w[R.type=="th"?"TH":"TD"];b.push(a(g,e(f(e(e(e({},r),N({top:o==0&&!y,bottom:o==m.length-1,left:u==0,right:u==h-1})),n?n({top:o==0&&!y,bottom:o==m.length-1,left:u==0,right:u==h-1,rowIndex:o,colIndex:u,isBody:!0,isHeader:!1}):{}),{className:[s("Cell"),i,R.className].join(" ")}),R)))}),p.push(a(w.Row,{className:[s("Row"),s("BodyRow")].join(" "),children:b,onClick:R=>{C&&C(t.rowID,R)}},o))}),a(H,{children:p})},Normal:l=>(l=e({},l),l.rows=l.rows.map((r,i)=>(r.rowID=r.rowID||i,r)),B(w.Table,{className:s("Table"),children:[a(c.HeadRow,e({},l)),a(c.BodyRows,e({},l))]}))},T=l=>a(d,f(e({type:"normal"},l),{JSXChildren:c.Normal}));export{T as Normal,T as default};
|
package/dist/fn/Table/Parts.js
CHANGED
|
@@ -1,41 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__spreadProps,
|
|
3
|
-
__spreadValues
|
|
4
|
-
} from "../../chunk-JJ3PEWPN.js";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
7
|
-
GenerateClassName
|
|
8
|
-
} from "../../@utils/_";
|
|
9
|
-
import FAI from "../../atoms/FAI";
|
|
10
|
-
const TableParts = {
|
|
11
|
-
Table: (params) => {
|
|
12
|
-
let Params = GenerateClassName(params);
|
|
13
|
-
return /* @__PURE__ */ jsx(
|
|
14
|
-
"table",
|
|
15
|
-
__spreadProps(__spreadValues({}, Params), {
|
|
16
|
-
border: Params.border
|
|
17
|
-
})
|
|
18
|
-
);
|
|
19
|
-
},
|
|
20
|
-
Head: (params) => /* @__PURE__ */ jsx("thead", __spreadValues({}, GenerateClassName(params))),
|
|
21
|
-
Body: (params) => /* @__PURE__ */ jsx("tbody", __spreadValues({}, GenerateClassName(params))),
|
|
22
|
-
Row: (params) => /* @__PURE__ */ jsx("tr", __spreadValues({}, GenerateClassName(params))),
|
|
23
|
-
TH: (params) => /* @__PURE__ */ jsx("th", __spreadValues({}, GenerateClassName(params))),
|
|
24
|
-
TD: (params) => /* @__PURE__ */ jsx("td", __spreadValues({}, GenerateClassName(params))),
|
|
25
|
-
RightIndicator: {
|
|
26
|
-
type: "td",
|
|
27
|
-
unitWidth: 4,
|
|
28
|
-
// data: '',
|
|
29
|
-
children: /* @__PURE__ */ jsx(
|
|
30
|
-
FAI.AngleRight,
|
|
31
|
-
{
|
|
32
|
-
fontColor: "theme",
|
|
33
|
-
fontSize: "4.thirdTitle"
|
|
34
|
-
}
|
|
35
|
-
)
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
export {
|
|
39
|
-
TableParts,
|
|
40
|
-
TableParts as default
|
|
41
|
-
};
|
|
1
|
+
import{b as t,c as r}from"../../chunk-VY3566IV.js";import{jsx as a}from"react/jsx-runtime";import{GenerateClassName as l}from"../../@utils/_";import b from"../../atoms/FAI";const o={Table:e=>{let T=l(e);return a("table",r(t({},T),{border:T.border}))},Head:e=>a("thead",t({},l(e))),Body:e=>a("tbody",t({},l(e))),Row:e=>a("tr",t({},l(e))),TH:e=>a("th",t({},l(e))),TD:e=>a("td",t({},l(e))),RightIndicator:{type:"td",unitWidth:4,children:a(b.AngleRight,{fontColor:"theme",fontSize:"4.thirdTitle"})}};export{o as TableParts,o as default};
|
package/dist/fn/Table/Wrapper.js
CHANGED
|
@@ -1,60 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__objRest,
|
|
3
|
-
__spreadProps,
|
|
4
|
-
__spreadValues
|
|
5
|
-
} from "../../chunk-JJ3PEWPN.js";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
import {
|
|
8
|
-
$$,
|
|
9
|
-
GenerateClassName
|
|
10
|
-
} from "../../@utils/_";
|
|
11
|
-
import Box from "../../atoms/Box";
|
|
12
|
-
import {
|
|
13
|
-
DefaultCellStyles
|
|
14
|
-
} from "./cellStyling";
|
|
15
|
-
import { TableClasses } from "../../@styles/componentClasses/_";
|
|
16
|
-
const Wrapper = (params) => {
|
|
17
|
-
let {
|
|
18
|
-
JSXChildren
|
|
19
|
-
} = params;
|
|
20
|
-
if (!params.tone || params.tone == "auto") {
|
|
21
|
-
params.tone = "border";
|
|
22
|
-
if (params.type == "drag")
|
|
23
|
-
params.tone = "rowBorder";
|
|
24
|
-
}
|
|
25
|
-
let Params = __spreadProps(__spreadValues({
|
|
26
|
-
tableID: params.tableID || $$.uuid.gen(),
|
|
27
|
-
tone: params.tone
|
|
28
|
-
}, params), {
|
|
29
|
-
cellStyles: __spreadValues(__spreadValues({}, DefaultCellStyles(params.type, params.tone)), params.cellStyles)
|
|
30
|
-
});
|
|
31
|
-
if (params.tone != "plain") {
|
|
32
|
-
Params.backgroundColor = Params.backgroundColor || "1.layer.base";
|
|
33
|
-
Params.borderRadius = Params.borderRadius || "1.tone.primary";
|
|
34
|
-
}
|
|
35
|
-
let _a = GenerateClassName(Params), {
|
|
36
|
-
className,
|
|
37
|
-
style: freeCSS
|
|
38
|
-
} = _a, others = __objRest(_a, [
|
|
39
|
-
"className",
|
|
40
|
-
"style"
|
|
41
|
-
]);
|
|
42
|
-
let ClassName = [
|
|
43
|
-
className,
|
|
44
|
-
TableClasses("Wrap"),
|
|
45
|
-
TableClasses("TableType_" + params.type),
|
|
46
|
-
TableClasses("RowClickable_" + !!Params.onRowClick)
|
|
47
|
-
].join(" ");
|
|
48
|
-
return /* @__PURE__ */ jsx(
|
|
49
|
-
Box,
|
|
50
|
-
{
|
|
51
|
-
className: ClassName,
|
|
52
|
-
style: freeCSS,
|
|
53
|
-
children: /* @__PURE__ */ jsx(JSXChildren, __spreadValues({}, others))
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
export {
|
|
58
|
-
Wrapper,
|
|
59
|
-
Wrapper as default
|
|
60
|
-
};
|
|
1
|
+
import{b as o,c as n,d as a}from"../../chunk-VY3566IV.js";import{jsx as i}from"react/jsx-runtime";import{$$ as C,GenerateClassName as f}from"../../@utils/_";import c from"../../atoms/Box";import{DefaultCellStyles as T}from"./cellStyling";import{TableClasses as l}from"../../@styles/componentClasses/_";const y=e=>{let{JSXChildren:p}=e;(!e.tone||e.tone=="auto")&&(e.tone="border",e.type=="drag"&&(e.tone="rowBorder"));let t=n(o({tableID:e.tableID||C.uuid.gen(),tone:e.tone},e),{cellStyles:o(o({},T(e.type,e.tone)),e.cellStyles)});e.tone!="plain"&&(t.backgroundColor=t.backgroundColor||"1.layer.base",t.borderRadius=t.borderRadius||"1.tone.primary");let r=f(t),{className:s,style:b}=r,d=a(r,["className","style"]),u=[s,l("Wrap"),l("TableType_"+e.type),l("RowClickable_"+!!t.onRowClick)].join(" ");return i(c,{className:u,style:b,children:i(p,o({},d))})};export{y as Wrapper,y as default};
|