@tipp/ui 1.3.2 → 1.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/atoms/drawer.cjs +63 -9
- package/dist/atoms/drawer.cjs.map +1 -1
- package/dist/atoms/drawer.js +3 -1
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.cjs +8 -6
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.js +34 -34
- package/dist/atoms/pagination.cjs +0 -2
- package/dist/atoms/pagination.cjs.map +1 -1
- package/dist/atoms/pagination.d.cts +2 -1
- package/dist/atoms/pagination.d.ts +2 -1
- package/dist/atoms/pagination.js +2 -2
- package/dist/chunk-3IZQ2PIQ.js +60 -0
- package/dist/chunk-3IZQ2PIQ.js.map +1 -0
- package/dist/chunk-62IB66PR.js +184 -0
- package/dist/chunk-62IB66PR.js.map +1 -0
- package/dist/chunk-7AFF4LYR.js +193 -0
- package/dist/chunk-7AFF4LYR.js.map +1 -0
- package/dist/chunk-7RLG3G7T.js +186 -0
- package/dist/chunk-7RLG3G7T.js.map +1 -0
- package/dist/chunk-AAMXDT5H.js +164 -0
- package/dist/chunk-AAMXDT5H.js.map +1 -0
- package/dist/chunk-CFZMZBKT.js +186 -0
- package/dist/chunk-CFZMZBKT.js.map +1 -0
- package/dist/chunk-FRIZG47J.js +186 -0
- package/dist/chunk-FRIZG47J.js.map +1 -0
- package/dist/chunk-FSGGYY2H.js +191 -0
- package/dist/chunk-FSGGYY2H.js.map +1 -0
- package/dist/chunk-G2WTBLEA.js +164 -0
- package/dist/chunk-G2WTBLEA.js.map +1 -0
- package/dist/chunk-GQ2UAYG2.js +193 -0
- package/dist/chunk-GQ2UAYG2.js.map +1 -0
- package/dist/chunk-JZYVXLEK.js +188 -0
- package/dist/chunk-JZYVXLEK.js.map +1 -0
- package/dist/chunk-MNIMT6IW.js +186 -0
- package/dist/chunk-MNIMT6IW.js.map +1 -0
- package/dist/chunk-N2FQDKJE.js +169 -0
- package/dist/chunk-N2FQDKJE.js.map +1 -0
- package/dist/chunk-N62PCPTB.js +164 -0
- package/dist/chunk-N62PCPTB.js.map +1 -0
- package/dist/chunk-N6LVZDYO.js +188 -0
- package/dist/chunk-N6LVZDYO.js.map +1 -0
- package/dist/chunk-NLTCJLYN.js +183 -0
- package/dist/chunk-NLTCJLYN.js.map +1 -0
- package/dist/chunk-PEPRIOFR.js +191 -0
- package/dist/chunk-PEPRIOFR.js.map +1 -0
- package/dist/chunk-SHKCVWJI.js +191 -0
- package/dist/chunk-SHKCVWJI.js.map +1 -0
- package/dist/chunk-TNPXDOME.js +340 -0
- package/dist/chunk-TNPXDOME.js.map +1 -0
- package/dist/chunk-UU4VN75U.js +185 -0
- package/dist/chunk-UU4VN75U.js.map +1 -0
- package/dist/chunk-VZ2XRNJY.js +191 -0
- package/dist/chunk-VZ2XRNJY.js.map +1 -0
- package/dist/chunk-WVYT25TW.js +185 -0
- package/dist/chunk-WVYT25TW.js.map +1 -0
- package/dist/chunk-XGPMAJED.js +164 -0
- package/dist/chunk-XGPMAJED.js.map +1 -0
- package/dist/chunk-YQJGVOUT.js +188 -0
- package/dist/chunk-YQJGVOUT.js.map +1 -0
- package/dist/chunk-ZWNOY7LD.js +192 -0
- package/dist/chunk-ZWNOY7LD.js.map +1 -0
- package/dist/chunk-ZXLMP5PK.js +185 -0
- package/dist/chunk-ZXLMP5PK.js.map +1 -0
- package/dist/index.cjs +91 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +8 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +64 -64
- package/dist/molecules/date-picker/index.js +2 -2
- package/dist/molecules/expand-table/index.cjs +226 -53
- package/dist/molecules/expand-table/index.cjs.map +1 -1
- package/dist/molecules/expand-table/index.d.cts +9 -0
- package/dist/molecules/expand-table/index.d.ts +9 -0
- package/dist/molecules/expand-table/index.js +19 -19
- package/dist/molecules/expand-table/row.js +16 -16
- package/dist/molecules/index.cjs +348 -181
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +24 -24
- package/dist/molecules/learning-post.js +4 -4
- package/dist/molecules/navigation.js +17 -17
- package/dist/molecules/stepper.js +3 -3
- package/dist/molecules/tag-selector.js +17 -17
- package/package.json +3 -3
- package/src/atoms/drawer.tsx +11 -0
- package/src/atoms/pagination.tsx +2 -3
- package/src/molecules/expand-table/index.tsx +106 -31
package/dist/index.cjs
CHANGED
|
@@ -752,8 +752,6 @@ function Pagination(props) {
|
|
|
752
752
|
size: "3",
|
|
753
753
|
style: { borderRadius: "50%" }
|
|
754
754
|
};
|
|
755
|
-
if (!page)
|
|
756
|
-
return null;
|
|
757
755
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_themes19.Flex, { align: "center", className: "tipp-pagination", gap: "4", children: [
|
|
758
756
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
759
757
|
import_themes24.IconButton,
|
|
@@ -849,6 +847,7 @@ function EllipsisTooltip(props) {
|
|
|
849
847
|
// src/atoms/drawer.tsx
|
|
850
848
|
var import_react16 = require("react");
|
|
851
849
|
var Dialog2 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
850
|
+
var import_react_icons3 = require("@radix-ui/react-icons");
|
|
852
851
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
853
852
|
function Root4(props) {
|
|
854
853
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog2.Root, __spreadValues({}, props));
|
|
@@ -861,12 +860,15 @@ function Content6(props) {
|
|
|
861
860
|
}, []);
|
|
862
861
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Dialog2.Portal, { container: containerRef.current, children: [
|
|
863
862
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog2.Overlay, { className: "DrawerOverlay" }),
|
|
864
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.
|
|
863
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
865
864
|
Dialog2.Content,
|
|
866
865
|
__spreadProps(__spreadValues({
|
|
867
866
|
className: `DrawerContent ${position} ${className || ""}`
|
|
868
867
|
}, rest), {
|
|
869
|
-
children
|
|
868
|
+
children: [
|
|
869
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_themes6.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog2.Close, { asChild: true, className: "DialogClose", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { color: "gray", variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_icons3.Cross1Icon, { height: "18px", width: "18px" }) }) }) }),
|
|
870
|
+
children
|
|
871
|
+
]
|
|
870
872
|
})
|
|
871
873
|
)
|
|
872
874
|
] });
|
|
@@ -884,7 +886,7 @@ var Drawer = {
|
|
|
884
886
|
};
|
|
885
887
|
|
|
886
888
|
// src/atoms/toast.tsx
|
|
887
|
-
var
|
|
889
|
+
var import_react_icons4 = require("@radix-ui/react-icons");
|
|
888
890
|
var import_react_toastify = require("react-toastify");
|
|
889
891
|
var import_react_toastify2 = require("react-toastify");
|
|
890
892
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
@@ -900,7 +902,7 @@ function ToastContainer(props) {
|
|
|
900
902
|
closeOnClick: true,
|
|
901
903
|
draggable: true,
|
|
902
904
|
hideProgressBar: true,
|
|
903
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
905
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_icons4.InfoCircledIcon, {}),
|
|
904
906
|
newestOnTop: true,
|
|
905
907
|
pauseOnFocusLoss: true,
|
|
906
908
|
pauseOnHover: true,
|
|
@@ -1143,18 +1145,37 @@ function Row(props) {
|
|
|
1143
1145
|
// src/molecules/expand-table/index.tsx
|
|
1144
1146
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1145
1147
|
function ExpandTable(props) {
|
|
1146
|
-
const {
|
|
1148
|
+
const {
|
|
1149
|
+
data,
|
|
1150
|
+
columns,
|
|
1151
|
+
ExpandComp,
|
|
1152
|
+
placeholder,
|
|
1153
|
+
onRowClick,
|
|
1154
|
+
tableStyle,
|
|
1155
|
+
showPagination,
|
|
1156
|
+
isLoading,
|
|
1157
|
+
pageIndex = 0,
|
|
1158
|
+
pageSize = 10,
|
|
1159
|
+
siblingCount = 2
|
|
1160
|
+
} = props;
|
|
1147
1161
|
const defaultAlign = "left";
|
|
1162
|
+
const [pagination, setPagination] = (0, import_react20.useState)({
|
|
1163
|
+
pageIndex: pageIndex || 0,
|
|
1164
|
+
pageSize: pageSize || 9999
|
|
1165
|
+
});
|
|
1148
1166
|
const [sorting, setSorting] = (0, import_react20.useState)([]);
|
|
1149
|
-
const { getRowModel, getHeaderGroups } = (0, import_react_table2.useReactTable)({
|
|
1167
|
+
const { getRowModel, getHeaderGroups, setPageIndex } = (0, import_react_table2.useReactTable)({
|
|
1150
1168
|
data: data || [],
|
|
1151
1169
|
columns,
|
|
1152
1170
|
getCoreRowModel: (0, import_react_table2.getCoreRowModel)(),
|
|
1153
1171
|
getSortedRowModel: (0, import_react_table2.getSortedRowModel)(),
|
|
1154
1172
|
state: {
|
|
1155
|
-
sorting
|
|
1173
|
+
sorting,
|
|
1174
|
+
pagination
|
|
1156
1175
|
},
|
|
1157
|
-
onSortingChange: setSorting
|
|
1176
|
+
onSortingChange: setSorting,
|
|
1177
|
+
getPaginationRowModel: (0, import_react_table2.getPaginationRowModel)(),
|
|
1178
|
+
onPaginationChange: setPagination
|
|
1158
1179
|
});
|
|
1159
1180
|
const gridColTemp = (0, import_react20.useMemo)(() => {
|
|
1160
1181
|
return columns.map((col) => {
|
|
@@ -1165,6 +1186,39 @@ function ExpandTable(props) {
|
|
|
1165
1186
|
}).join(" ");
|
|
1166
1187
|
}, [columns]);
|
|
1167
1188
|
const rowModels = getRowModel();
|
|
1189
|
+
const onChangePagination = (0, import_react20.useCallback)(
|
|
1190
|
+
(page) => {
|
|
1191
|
+
setPageIndex(page - 1);
|
|
1192
|
+
},
|
|
1193
|
+
[setPageIndex]
|
|
1194
|
+
);
|
|
1195
|
+
const helpCompRender = (0, import_react20.useCallback)(
|
|
1196
|
+
(rowLength) => {
|
|
1197
|
+
if (isLoading) {
|
|
1198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1199
|
+
import_themes19.Flex,
|
|
1200
|
+
{
|
|
1201
|
+
align: "center",
|
|
1202
|
+
height: "100%",
|
|
1203
|
+
justify: "center",
|
|
1204
|
+
p: "5",
|
|
1205
|
+
width: "100%",
|
|
1206
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_themes49.Spinner, {})
|
|
1207
|
+
}
|
|
1208
|
+
);
|
|
1209
|
+
}
|
|
1210
|
+
if (rowLength === 0) {
|
|
1211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "tr", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_themes19.Flex, { align: "center", justify: "center", children: placeholder || /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Typo, { color: "gray", mb: "6", mt: "6", variant: "body", children: "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4" }) }) }, "expand_placeholder");
|
|
1212
|
+
}
|
|
1213
|
+
return null;
|
|
1214
|
+
},
|
|
1215
|
+
[isLoading, placeholder]
|
|
1216
|
+
);
|
|
1217
|
+
const pageCount = (0, import_react20.useMemo)(() => {
|
|
1218
|
+
if (!data)
|
|
1219
|
+
return 0;
|
|
1220
|
+
return Math.ceil(data.length / pageSize);
|
|
1221
|
+
}, [data, pageSize]);
|
|
1168
1222
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "expand-table", style: tableStyle, children: [
|
|
1169
1223
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "thead", children: getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1170
1224
|
"div",
|
|
@@ -1215,22 +1269,28 @@ function ExpandTable(props) {
|
|
|
1215
1269
|
},
|
|
1216
1270
|
headerGroup.id
|
|
1217
1271
|
)) }),
|
|
1218
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1272
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "tbody", children: helpCompRender(rowModels.rows.length) || rowModels.rows.map((row) => {
|
|
1273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1274
|
+
Row,
|
|
1275
|
+
{
|
|
1276
|
+
ExpandComp,
|
|
1277
|
+
defaultAlign,
|
|
1278
|
+
gridColTemp,
|
|
1279
|
+
onRowClick,
|
|
1280
|
+
row
|
|
1281
|
+
},
|
|
1282
|
+
`row_${row.id}`
|
|
1283
|
+
);
|
|
1284
|
+
}) }),
|
|
1285
|
+
showPagination ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_themes19.Flex, { justify: "end", pt: "3", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1286
|
+
Pagination,
|
|
1287
|
+
{
|
|
1288
|
+
count: pageCount,
|
|
1289
|
+
onChange: onChangePagination,
|
|
1290
|
+
page: pagination.pageIndex + 1,
|
|
1291
|
+
siblingCount
|
|
1292
|
+
}
|
|
1293
|
+
) }) : null
|
|
1234
1294
|
] });
|
|
1235
1295
|
}
|
|
1236
1296
|
|
|
@@ -1359,7 +1419,7 @@ var renderCustomHeader = (props) => {
|
|
|
1359
1419
|
|
|
1360
1420
|
// src/molecules/dot-navigation.tsx
|
|
1361
1421
|
var import_react22 = require("react");
|
|
1362
|
-
var
|
|
1422
|
+
var import_react_icons5 = require("@radix-ui/react-icons");
|
|
1363
1423
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1364
1424
|
function DotNavigation(props) {
|
|
1365
1425
|
const { dotCount, onClick, dotIndex, defaultDotIndex, onChangeDotIndex } = props;
|
|
@@ -1390,7 +1450,7 @@ function DotNavigation(props) {
|
|
|
1390
1450
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_themes19.Flex, { children: dotCount ? Array.from({ length: dotCount }, (_, i) => i).map((_, index) => {
|
|
1391
1451
|
const isSelected = currentDot === index;
|
|
1392
1452
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1393
|
-
|
|
1453
|
+
import_react_icons5.DotFilledIcon,
|
|
1394
1454
|
{
|
|
1395
1455
|
height: "24px",
|
|
1396
1456
|
onClick: () => {
|
|
@@ -1561,7 +1621,7 @@ var Stepper = {
|
|
|
1561
1621
|
|
|
1562
1622
|
// src/molecules/tag-selector.tsx
|
|
1563
1623
|
var import_react24 = require("react");
|
|
1564
|
-
var
|
|
1624
|
+
var import_react_icons6 = require("@radix-ui/react-icons");
|
|
1565
1625
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1566
1626
|
var OPTION_HEIGHT = 32;
|
|
1567
1627
|
var DefaultDropdownContainer = (props) => {
|
|
@@ -1774,7 +1834,7 @@ function TagSelector(props) {
|
|
|
1774
1834
|
onDelete(item.id);
|
|
1775
1835
|
},
|
|
1776
1836
|
variant: "transparent",
|
|
1777
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1837
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_icons6.Cross1Icon, {})
|
|
1778
1838
|
}
|
|
1779
1839
|
)
|
|
1780
1840
|
] }, item.id);
|
|
@@ -1794,7 +1854,7 @@ function TagSelector(props) {
|
|
|
1794
1854
|
]
|
|
1795
1855
|
}
|
|
1796
1856
|
),
|
|
1797
|
-
focus ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1857
|
+
focus ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_icons6.MagnifyingGlassIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_icons6.ChevronRightIcon, {})
|
|
1798
1858
|
]
|
|
1799
1859
|
}
|
|
1800
1860
|
) }),
|