@tipp/ui 1.3.2 → 1.4.0

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.
Files changed (79) hide show
  1. package/dist/atoms/field-error-wrapper.js +2 -2
  2. package/dist/atoms/index.cjs +0 -2
  3. package/dist/atoms/index.cjs.map +1 -1
  4. package/dist/atoms/index.js +33 -33
  5. package/dist/atoms/pagination.cjs +0 -2
  6. package/dist/atoms/pagination.cjs.map +1 -1
  7. package/dist/atoms/pagination.d.cts +2 -1
  8. package/dist/atoms/pagination.d.ts +2 -1
  9. package/dist/atoms/pagination.js +2 -2
  10. package/dist/chunk-62IB66PR.js +184 -0
  11. package/dist/chunk-62IB66PR.js.map +1 -0
  12. package/dist/chunk-7AFF4LYR.js +193 -0
  13. package/dist/chunk-7AFF4LYR.js.map +1 -0
  14. package/dist/chunk-7RLG3G7T.js +186 -0
  15. package/dist/chunk-7RLG3G7T.js.map +1 -0
  16. package/dist/chunk-AAMXDT5H.js +164 -0
  17. package/dist/chunk-AAMXDT5H.js.map +1 -0
  18. package/dist/chunk-CFZMZBKT.js +186 -0
  19. package/dist/chunk-CFZMZBKT.js.map +1 -0
  20. package/dist/chunk-FRIZG47J.js +186 -0
  21. package/dist/chunk-FRIZG47J.js.map +1 -0
  22. package/dist/chunk-FSGGYY2H.js +191 -0
  23. package/dist/chunk-FSGGYY2H.js.map +1 -0
  24. package/dist/chunk-G2WTBLEA.js +164 -0
  25. package/dist/chunk-G2WTBLEA.js.map +1 -0
  26. package/dist/chunk-GQ2UAYG2.js +193 -0
  27. package/dist/chunk-GQ2UAYG2.js.map +1 -0
  28. package/dist/chunk-MNIMT6IW.js +186 -0
  29. package/dist/chunk-MNIMT6IW.js.map +1 -0
  30. package/dist/chunk-N2FQDKJE.js +169 -0
  31. package/dist/chunk-N2FQDKJE.js.map +1 -0
  32. package/dist/chunk-N62PCPTB.js +164 -0
  33. package/dist/chunk-N62PCPTB.js.map +1 -0
  34. package/dist/chunk-N6LVZDYO.js +188 -0
  35. package/dist/chunk-N6LVZDYO.js.map +1 -0
  36. package/dist/chunk-NLTCJLYN.js +183 -0
  37. package/dist/chunk-NLTCJLYN.js.map +1 -0
  38. package/dist/chunk-PEPRIOFR.js +191 -0
  39. package/dist/chunk-PEPRIOFR.js.map +1 -0
  40. package/dist/chunk-SHKCVWJI.js +191 -0
  41. package/dist/chunk-SHKCVWJI.js.map +1 -0
  42. package/dist/chunk-TNPXDOME.js +340 -0
  43. package/dist/chunk-TNPXDOME.js.map +1 -0
  44. package/dist/chunk-UU4VN75U.js +185 -0
  45. package/dist/chunk-UU4VN75U.js.map +1 -0
  46. package/dist/chunk-VZ2XRNJY.js +191 -0
  47. package/dist/chunk-VZ2XRNJY.js.map +1 -0
  48. package/dist/chunk-WVYT25TW.js +185 -0
  49. package/dist/chunk-WVYT25TW.js.map +1 -0
  50. package/dist/chunk-XGPMAJED.js +164 -0
  51. package/dist/chunk-XGPMAJED.js.map +1 -0
  52. package/dist/chunk-YQJGVOUT.js +188 -0
  53. package/dist/chunk-YQJGVOUT.js.map +1 -0
  54. package/dist/chunk-ZWNOY7LD.js +192 -0
  55. package/dist/chunk-ZWNOY7LD.js.map +1 -0
  56. package/dist/chunk-ZXLMP5PK.js +185 -0
  57. package/dist/chunk-ZXLMP5PK.js.map +1 -0
  58. package/dist/index.cjs +78 -22
  59. package/dist/index.cjs.map +1 -1
  60. package/dist/index.css +2 -0
  61. package/dist/index.css.map +1 -1
  62. package/dist/index.js +65 -65
  63. package/dist/molecules/date-picker/index.js +2 -2
  64. package/dist/molecules/expand-table/index.cjs +226 -53
  65. package/dist/molecules/expand-table/index.cjs.map +1 -1
  66. package/dist/molecules/expand-table/index.d.cts +9 -0
  67. package/dist/molecules/expand-table/index.d.ts +9 -0
  68. package/dist/molecules/expand-table/index.js +18 -18
  69. package/dist/molecules/expand-table/row.js +15 -15
  70. package/dist/molecules/index.cjs +348 -181
  71. package/dist/molecules/index.cjs.map +1 -1
  72. package/dist/molecules/index.js +23 -23
  73. package/dist/molecules/learning-post.js +4 -4
  74. package/dist/molecules/navigation.js +16 -16
  75. package/dist/molecules/stepper.js +3 -3
  76. package/dist/molecules/tag-selector.js +16 -16
  77. package/package.json +3 -3
  78. package/src/atoms/pagination.tsx +2 -3
  79. package/src/molecules/expand-table/index.tsx +106 -31
@@ -72,7 +72,7 @@ module.exports = __toCommonJS(molecules_exports);
72
72
 
73
73
  // src/molecules/expand-table/index.tsx
74
74
  var import_react_table2 = require("@tanstack/react-table");
75
- var import_react9 = require("react");
75
+ var import_react10 = require("react");
76
76
 
77
77
  // src/atoms/aspect-ratio.tsx
78
78
  var import_themes = require("@radix-ui/themes");
@@ -276,49 +276,158 @@ function Collapse(props) {
276
276
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "tipp-collapse", ref, children });
277
277
  }
278
278
 
279
+ // src/atoms/spinner.tsx
280
+ var import_themes14 = require("@radix-ui/themes");
281
+
282
+ // src/atoms/pagination.tsx
283
+ var import_react7 = require("react");
284
+
279
285
  // src/icon.ts
280
286
  var import_react_icons = require("@radix-ui/react-icons");
281
287
 
282
- // src/atoms/auto-sizing-input.tsx
283
- var import_react7 = require("react");
288
+ // src/atoms/pagination.tsx
284
289
  var import_jsx_runtime7 = require("react/jsx-runtime");
285
- var AutoSizingInput = (0, import_react7.forwardRef)(
290
+ function Pagination(props) {
291
+ const { onChange, count = 0, siblingCount = 2 } = props;
292
+ const [page, setPage] = (0, import_react7.useState)(() => props.page || props.defaultPage || 1);
293
+ const visibleItems = (0, import_react7.useMemo)(() => {
294
+ let start = Math.max(1, page - siblingCount);
295
+ let end = Math.min(count, page + siblingCount);
296
+ if (page - siblingCount <= 0 && end < count) {
297
+ end = Math.min(count, end + Math.abs(page - siblingCount) + 1);
298
+ } else if (page + siblingCount > count && start > 1) {
299
+ start = Math.max(1, start - (page + siblingCount - count));
300
+ }
301
+ return Array.from({ length: end - start + 1 }, (_, i) => i + start);
302
+ }, [count, page, siblingCount]);
303
+ (0, import_react7.useEffect)(() => {
304
+ onChange == null ? void 0 : onChange(page);
305
+ }, [onChange, page]);
306
+ (0, import_react7.useEffect)(() => {
307
+ if (props.page) {
308
+ setPage(props.page);
309
+ }
310
+ }, [props.page]);
311
+ const prev = (0, import_react7.useMemo)(() => {
312
+ const p = page - 1;
313
+ return p < 1 ? void 0 : p;
314
+ }, [page]);
315
+ const next = (0, import_react7.useMemo)(() => {
316
+ const n = page + 1;
317
+ return n > count ? void 0 : n;
318
+ }, [count, page]);
319
+ const onClickPrev = (0, import_react7.useCallback)(() => {
320
+ prev && setPage(prev);
321
+ }, [prev]);
322
+ const onClickNext = (0, import_react7.useCallback)(() => {
323
+ next && setPage(next);
324
+ }, [next]);
325
+ const doublePrev = (0, import_react7.useMemo)(() => {
326
+ if (!visibleItems.length)
327
+ return;
328
+ return Math.max(0, visibleItems[0] - 1);
329
+ }, [visibleItems]);
330
+ const onClickDoublePrev = (0, import_react7.useCallback)(() => {
331
+ doublePrev && setPage(doublePrev);
332
+ }, [doublePrev]);
333
+ const doubleNext = (0, import_react7.useMemo)(() => {
334
+ if (!visibleItems.length)
335
+ return;
336
+ const n = visibleItems[visibleItems.length - 1] + 1;
337
+ if (n > count)
338
+ return;
339
+ return Math.min(count, n);
340
+ }, [count, visibleItems]);
341
+ const onClickDoubleNext = (0, import_react7.useCallback)(() => {
342
+ doubleNext && setPage(doubleNext);
343
+ }, [doubleNext]);
344
+ const iconSize = {
345
+ height: 24,
346
+ width: 24
347
+ };
348
+ const moveButtonProps = {
349
+ variant: "ghost",
350
+ size: "3",
351
+ style: { borderRadius: "50%" }
352
+ };
353
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_themes6.Flex, { align: "center", className: "tipp-pagination", gap: "4", children: [
354
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
355
+ import_themes10.IconButton,
356
+ __spreadProps(__spreadValues({
357
+ disabled: !doublePrev,
358
+ onClick: onClickDoublePrev
359
+ }, moveButtonProps), {
360
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_icons.DoubleArrowLeftIcon, __spreadValues({}, iconSize))
361
+ })
362
+ ),
363
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_themes10.IconButton, __spreadProps(__spreadValues({ disabled: !prev, onClick: onClickPrev }, moveButtonProps), { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_icons.ChevronLeftIcon, __spreadValues({}, iconSize)) })),
364
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_themes6.Flex, { gap: "1", children: visibleItems.map((item) => {
365
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
366
+ "button",
367
+ {
368
+ className: `page-button ${item === page ? "active" : ""}`,
369
+ onClick: () => {
370
+ setPage(item);
371
+ },
372
+ type: "button",
373
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Typo, { variant: "body", children: item })
374
+ },
375
+ item
376
+ );
377
+ }) }),
378
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_themes10.IconButton, __spreadProps(__spreadValues({ disabled: !next, onClick: onClickNext }, moveButtonProps), { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_icons.ChevronRightIcon, __spreadValues({}, iconSize)) })),
379
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
380
+ import_themes10.IconButton,
381
+ __spreadProps(__spreadValues({
382
+ disabled: !doubleNext,
383
+ onClick: onClickDoubleNext
384
+ }, moveButtonProps), {
385
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_icons.DoubleArrowRightIcon, __spreadValues({}, iconSize))
386
+ })
387
+ )
388
+ ] });
389
+ }
390
+
391
+ // src/atoms/auto-sizing-input.tsx
392
+ var import_react8 = require("react");
393
+ var import_jsx_runtime8 = require("react/jsx-runtime");
394
+ var AutoSizingInput = (0, import_react8.forwardRef)(
286
395
  (_a, ref) => {
287
396
  var _b = _a, { value: _value, onChangeValue, onChange } = _b, rest = __objRest(_b, ["value", "onChangeValue", "onChange"]);
288
- const [value, setValue] = (0, import_react7.useState)(_value);
289
- const [width, setWidth] = (0, import_react7.useState)(0);
290
- const span = (0, import_react7.useRef)(null);
291
- (0, import_react7.useEffect)(() => {
397
+ const [value, setValue] = (0, import_react8.useState)(_value);
398
+ const [width, setWidth] = (0, import_react8.useState)(0);
399
+ const span = (0, import_react8.useRef)(null);
400
+ (0, import_react8.useEffect)(() => {
292
401
  span.current && setWidth(span.current.offsetWidth);
293
402
  }, [value]);
294
- const changeHandler = (0, import_react7.useCallback)(
403
+ const changeHandler = (0, import_react8.useCallback)(
295
404
  (evt) => {
296
405
  onChange == null ? void 0 : onChange(evt);
297
406
  setValue(evt.target.value);
298
407
  },
299
408
  [onChange]
300
409
  );
301
- (0, import_react7.useEffect)(() => {
410
+ (0, import_react8.useEffect)(() => {
302
411
  setValue(_value || "");
303
412
  }, [_value]);
304
- (0, import_react7.useEffect)(() => {
413
+ (0, import_react8.useEffect)(() => {
305
414
  onChangeValue == null ? void 0 : onChangeValue(value || "");
306
415
  }, [value, onChangeValue]);
307
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "auto-sizing-input wrapper", style: { width: width + 24 }, children: [
308
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", __spreadValues({ onChange: changeHandler, ref, value }, rest)),
309
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { "aria-hidden": "true", ref: span, children: value })
416
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "auto-sizing-input wrapper", style: { width: width + 24 }, children: [
417
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", __spreadValues({ onChange: changeHandler, ref, value }, rest)),
418
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "aria-hidden": "true", ref: span, children: value })
310
419
  ] });
311
420
  }
312
421
  );
313
422
  AutoSizingInput.displayName = "AutoSizingInput";
314
423
 
315
424
  // src/icons/down.tsx
316
- var React5 = __toESM(require("react"), 1);
317
- var import_jsx_runtime8 = require("react/jsx-runtime");
318
- var TriangleArrowDownIcon = React5.forwardRef(
425
+ var React6 = __toESM(require("react"), 1);
426
+ var import_jsx_runtime9 = require("react/jsx-runtime");
427
+ var TriangleArrowDownIcon = React6.forwardRef(
319
428
  (_a, forwardedRef) => {
320
429
  var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
321
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
430
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
322
431
  "svg",
323
432
  __spreadProps(__spreadValues({
324
433
  fill: "none",
@@ -328,7 +437,7 @@ var TriangleArrowDownIcon = React5.forwardRef(
328
437
  xmlns: "http://www.w3.org/2000/svg"
329
438
  }, props), {
330
439
  ref: forwardedRef,
331
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
440
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
332
441
  "path",
333
442
  {
334
443
  d: "M7.10844 0.8125H0.891554C0.197392 0.8125 -0.177096 1.62672 0.274659 2.15377L3.3831 5.78029C3.70737 6.1586 4.29263 6.1586 4.6169 5.78029L7.72534 2.15377C8.1771 1.62672 7.80261 0.8125 7.10844 0.8125Z",
@@ -342,12 +451,12 @@ var TriangleArrowDownIcon = React5.forwardRef(
342
451
  TriangleArrowDownIcon.displayName = "ArrowDownIcon";
343
452
 
344
453
  // src/icons/up.tsx
345
- var React6 = __toESM(require("react"), 1);
346
- var import_jsx_runtime9 = require("react/jsx-runtime");
347
- var TriangleArrowUpIcon = React6.forwardRef(
454
+ var React7 = __toESM(require("react"), 1);
455
+ var import_jsx_runtime10 = require("react/jsx-runtime");
456
+ var TriangleArrowUpIcon = React7.forwardRef(
348
457
  (_a, forwardedRef) => {
349
458
  var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
350
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
459
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
351
460
  "svg",
352
461
  __spreadProps(__spreadValues({
353
462
  fill: "none",
@@ -357,7 +466,7 @@ var TriangleArrowUpIcon = React6.forwardRef(
357
466
  xmlns: "http://www.w3.org/2000/svg"
358
467
  }, props), {
359
468
  ref: forwardedRef,
360
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
469
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
361
470
  "path",
362
471
  {
363
472
  d: "M0.891555 6.1875L7.10845 6.1875C7.80261 6.1875 8.1771 5.37328 7.72534 4.84623L4.6169 1.21971C4.29263 0.841403 3.70737 0.841403 3.3831 1.21971L0.274659 4.84623C-0.177095 5.37328 0.197393 6.1875 0.891555 6.1875Z",
@@ -372,17 +481,17 @@ TriangleArrowUpIcon.displayName = "ArrowUpIcon";
372
481
 
373
482
  // src/molecules/expand-table/row.tsx
374
483
  var import_react_table = require("@tanstack/react-table");
375
- var import_react8 = require("react");
376
- var import_jsx_runtime10 = require("react/jsx-runtime");
484
+ var import_react9 = require("react");
485
+ var import_jsx_runtime11 = require("react/jsx-runtime");
377
486
  function Row(props) {
378
487
  const { row, ExpandComp, gridColTemp } = props;
379
- const [open, setOpen] = (0, import_react8.useState)(false);
380
- const onClickRow = (0, import_react8.useCallback)(() => {
488
+ const [open, setOpen] = (0, import_react9.useState)(false);
489
+ const onClickRow = (0, import_react9.useCallback)(() => {
381
490
  var _a;
382
491
  (_a = props.onRowClick) == null ? void 0 : _a.call(props, row.original);
383
492
  setOpen((prev) => !prev);
384
493
  }, [props, row.original]);
385
- const rowClassName = (0, import_react8.useMemo)(() => {
494
+ const rowClassName = (0, import_react9.useMemo)(() => {
386
495
  const baseCls = ["tr-wrapper"];
387
496
  if (ExpandComp) {
388
497
  baseCls.push("expandable");
@@ -392,8 +501,8 @@ function Row(props) {
392
501
  }
393
502
  return baseCls.join(" ");
394
503
  }, [ExpandComp, props.onRowClick]);
395
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: rowClassName, children: [
396
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
504
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: rowClassName, children: [
505
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
397
506
  "button",
398
507
  {
399
508
  className: "tr",
@@ -404,7 +513,7 @@ function Row(props) {
404
513
  var _a, _b, _c;
405
514
  const autoSize = (_a = cell.column.columnDef.meta) == null ? void 0 : _a.autoSize;
406
515
  const justifyContent = ((_b = cell.column.columnDef.meta) == null ? void 0 : _b.align) || props.defaultAlign;
407
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
516
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
408
517
  "div",
409
518
  {
410
519
  className: "td",
@@ -415,7 +524,7 @@ function Row(props) {
415
524
  },
416
525
  children: [
417
526
  (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()),
418
- ((_c = cell.column.columnDef.meta) == null ? void 0 : _c.OpenBtn) ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
527
+ ((_c = cell.column.columnDef.meta) == null ? void 0 : _c.OpenBtn) ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
419
528
  cell.column.columnDef.meta.OpenBtn,
420
529
  {
421
530
  data: row.original,
@@ -431,27 +540,46 @@ function Row(props) {
431
540
  },
432
541
  `tr_${row.id}`
433
542
  ),
434
- ExpandComp ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Collapse, { open, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "expand-comp-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ExpandComp, { row }) }) }) : null
543
+ ExpandComp ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Collapse, { open, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "expand-comp-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ExpandComp, { row }) }) }) : null
435
544
  ] }, `tr-wrapper_${row.id}`);
436
545
  }
437
546
 
438
547
  // src/molecules/expand-table/index.tsx
439
- var import_jsx_runtime11 = require("react/jsx-runtime");
548
+ var import_jsx_runtime12 = require("react/jsx-runtime");
440
549
  function ExpandTable(props) {
441
- const { data, columns, ExpandComp, placeholder, onRowClick, tableStyle } = props;
550
+ const {
551
+ data,
552
+ columns,
553
+ ExpandComp,
554
+ placeholder,
555
+ onRowClick,
556
+ tableStyle,
557
+ showPagination,
558
+ isLoading,
559
+ pageIndex = 0,
560
+ pageSize = 10,
561
+ siblingCount = 2
562
+ } = props;
442
563
  const defaultAlign = "left";
443
- const [sorting, setSorting] = (0, import_react9.useState)([]);
444
- const { getRowModel, getHeaderGroups } = (0, import_react_table2.useReactTable)({
564
+ const [pagination, setPagination] = (0, import_react10.useState)({
565
+ pageIndex: pageIndex || 0,
566
+ pageSize: pageSize || 9999
567
+ });
568
+ const [sorting, setSorting] = (0, import_react10.useState)([]);
569
+ const { getRowModel, getHeaderGroups, setPageIndex } = (0, import_react_table2.useReactTable)({
445
570
  data: data || [],
446
571
  columns,
447
572
  getCoreRowModel: (0, import_react_table2.getCoreRowModel)(),
448
573
  getSortedRowModel: (0, import_react_table2.getSortedRowModel)(),
449
574
  state: {
450
- sorting
575
+ sorting,
576
+ pagination
451
577
  },
452
- onSortingChange: setSorting
578
+ onSortingChange: setSorting,
579
+ getPaginationRowModel: (0, import_react_table2.getPaginationRowModel)(),
580
+ onPaginationChange: setPagination
453
581
  });
454
- const gridColTemp = (0, import_react9.useMemo)(() => {
582
+ const gridColTemp = (0, import_react10.useMemo)(() => {
455
583
  return columns.map((col) => {
456
584
  var _a;
457
585
  if ((_a = col.meta) == null ? void 0 : _a.autoSize)
@@ -460,8 +588,41 @@ function ExpandTable(props) {
460
588
  }).join(" ");
461
589
  }, [columns]);
462
590
  const rowModels = getRowModel();
463
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "expand-table", style: tableStyle, children: [
464
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "thead", children: getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
591
+ const onChangePagination = (0, import_react10.useCallback)(
592
+ (page) => {
593
+ setPageIndex(page - 1);
594
+ },
595
+ [setPageIndex]
596
+ );
597
+ const helpCompRender = (0, import_react10.useCallback)(
598
+ (rowLength) => {
599
+ if (isLoading) {
600
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
601
+ import_themes6.Flex,
602
+ {
603
+ align: "center",
604
+ height: "100%",
605
+ justify: "center",
606
+ p: "5",
607
+ width: "100%",
608
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_themes14.Spinner, {})
609
+ }
610
+ );
611
+ }
612
+ if (rowLength === 0) {
613
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "tr", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_themes6.Flex, { align: "center", justify: "center", children: placeholder || /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Typo, { color: "gray", mb: "6", mt: "6", variant: "body", children: "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4" }) }) }, "expand_placeholder");
614
+ }
615
+ return null;
616
+ },
617
+ [isLoading, placeholder]
618
+ );
619
+ const pageCount = (0, import_react10.useMemo)(() => {
620
+ if (!data)
621
+ return 0;
622
+ return Math.ceil(data.length / pageSize);
623
+ }, [data, pageSize]);
624
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "expand-table", style: tableStyle, children: [
625
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "thead", children: getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
465
626
  "div",
466
627
  {
467
628
  className: "tr",
@@ -471,30 +632,30 @@ function ExpandTable(props) {
471
632
  const sortable = header.column.getCanSort();
472
633
  const sortedState = header.column.getIsSorted();
473
634
  const justifyContent = ((_a = header.column.columnDef.meta) == null ? void 0 : _a.align) || defaultAlign;
474
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: `${justifyContent} th`, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
635
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: `${justifyContent} th`, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
475
636
  "button",
476
637
  {
477
638
  onClick: header.column.getToggleSortingHandler(),
478
639
  style: sortable ? { cursor: "pointer" } : void 0,
479
640
  type: "button",
480
641
  children: [
481
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typo, { variant: "body", children: (0, import_react_table2.flexRender)(
642
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Typo, { variant: "body", children: (0, import_react_table2.flexRender)(
482
643
  header.column.columnDef.header,
483
644
  header.getContext()
484
645
  ) }),
485
- sortable ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
646
+ sortable ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
486
647
  import_themes6.Flex,
487
648
  {
488
649
  direction: "column",
489
650
  style: { marginLeft: "var(--space-2)" },
490
651
  children: [
491
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
652
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
492
653
  TriangleArrowUpIcon,
493
654
  {
494
655
  color: sortedState === "asc" ? "var(--iris-10)" : "var(--iris-6)"
495
656
  }
496
657
  ),
497
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
658
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
498
659
  TriangleArrowDownIcon,
499
660
  {
500
661
  color: sortedState === "desc" ? "var(--iris-10)" : "var(--iris-6)"
@@ -510,34 +671,40 @@ function ExpandTable(props) {
510
671
  },
511
672
  headerGroup.id
512
673
  )) }),
513
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "tbody", children: [
514
- rowModels.rows.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "tr", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_themes6.Flex, { align: "center", justify: "center", children: placeholder || /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typo, { color: "gray", mb: "6", mt: "6", variant: "body", children: "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4" }) }) }, "expand_placeholder"),
515
- rowModels.rows.map((row) => {
516
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
517
- Row,
518
- {
519
- ExpandComp,
520
- defaultAlign,
521
- gridColTemp,
522
- onRowClick,
523
- row
524
- },
525
- `row_${row.id}`
526
- );
527
- })
528
- ] })
674
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "tbody", children: helpCompRender(rowModels.rows.length) || rowModels.rows.map((row) => {
675
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
676
+ Row,
677
+ {
678
+ ExpandComp,
679
+ defaultAlign,
680
+ gridColTemp,
681
+ onRowClick,
682
+ row
683
+ },
684
+ `row_${row.id}`
685
+ );
686
+ }) }),
687
+ showPagination ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_themes6.Flex, { justify: "end", pt: "3", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
688
+ Pagination,
689
+ {
690
+ count: pageCount,
691
+ onChange: onChangePagination,
692
+ page: pagination.pageIndex + 1,
693
+ siblingCount
694
+ }
695
+ ) }) : null
529
696
  ] });
530
697
  }
531
698
 
532
699
  // src/molecules/navigation.tsx
533
- var import_jsx_runtime12 = require("react/jsx-runtime");
700
+ var import_jsx_runtime13 = require("react/jsx-runtime");
534
701
  function Navigation({
535
702
  items,
536
703
  fontColor,
537
704
  backgroundColor,
538
705
  activeKey
539
706
  }) {
540
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
707
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
541
708
  import_themes6.Flex,
542
709
  {
543
710
  direction: "column",
@@ -549,13 +716,13 @@ function Navigation({
549
716
  },
550
717
  children: items == null ? void 0 : items.map((item) => {
551
718
  const { key, title, icon, itemRender, onClick, children } = item;
552
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_themes6.Flex, { direction: "column", onClick, children: [
553
- itemRender ? itemRender(item) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_themes6.Flex, { align: "center", gap: "3", height: "36px", pl: "4", pr: "4", children: [
719
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_themes6.Flex, { direction: "column", onClick, children: [
720
+ itemRender ? itemRender(item) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_themes6.Flex, { align: "center", gap: "3", height: "36px", pl: "4", pr: "4", children: [
554
721
  icon,
555
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Typo, { variant: "subtitle", children: title })
722
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Typo, { variant: "subtitle", children: title })
556
723
  ] }),
557
724
  children == null ? void 0 : children.map((menu) => {
558
- return menu.itemRender ? menu.itemRender(menu) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
725
+ return menu.itemRender ? menu.itemRender(menu) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
559
726
  Button,
560
727
  {
561
728
  className: `tipp-navigation-button ${activeKey === menu.key ? "active" : ""}`,
@@ -579,18 +746,18 @@ function Navigation({
579
746
  }
580
747
 
581
748
  // src/molecules/date-picker/index.tsx
582
- var import_react10 = require("react");
749
+ var import_react11 = require("react");
583
750
  var RDP = __toESM(require("react-datepicker"), 1);
584
751
  var import_react_datepicker = require("react-datepicker");
585
752
  var import_locale = require("date-fns/locale");
586
- var import_jsx_runtime13 = require("react/jsx-runtime");
753
+ var import_jsx_runtime14 = require("react/jsx-runtime");
587
754
  (0, import_react_datepicker.registerLocale)("ko", import_locale.ko);
588
755
  (0, import_react_datepicker.setDefaultLocale)("ko");
589
756
  var ReactDatePicker = RDP.default.default || RDP.default || RDP;
590
- var DatePicker = (0, import_react10.forwardRef)(
757
+ var DatePicker = (0, import_react11.forwardRef)(
591
758
  (props, ref) => {
592
759
  const _a = props, { size = "medium" } = _a, rest = __objRest(_a, ["size"]);
593
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
760
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
594
761
  ReactDatePicker,
595
762
  __spreadProps(__spreadValues({
596
763
  dateFormat: "YYYY/MM/dd",
@@ -620,51 +787,51 @@ var renderCustomHeader = (props) => {
620
787
  } = props;
621
788
  const year = date.getFullYear();
622
789
  const month = date.getMonth();
623
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_themes6.Flex, { align: "center", justify: "between", pb: "2", pl: "2", pr: "2", children: [
624
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
790
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_themes6.Flex, { align: "center", justify: "between", pb: "2", pl: "2", pr: "2", children: [
791
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
625
792
  import_themes10.IconButton,
626
793
  {
627
794
  disabled: prevMonthButtonDisabled,
628
795
  onClick: decreaseMonth,
629
796
  variant: "ghost",
630
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_icons.ChevronLeftIcon, {})
797
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_icons.ChevronLeftIcon, {})
631
798
  }
632
799
  ),
633
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_themes6.Flex, { gap: "3", children: [
634
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Heading2, { variant: "heading4", weight: "regular", children: [
800
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_themes6.Flex, { gap: "3", children: [
801
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Heading2, { variant: "heading4", weight: "regular", children: [
635
802
  year,
636
803
  "\uB144"
637
804
  ] }),
638
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Heading2, { variant: "heading4", weight: "regular", children: [
805
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Heading2, { variant: "heading4", weight: "regular", children: [
639
806
  month + 1,
640
807
  "\uC6D4"
641
808
  ] })
642
809
  ] }),
643
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
810
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
644
811
  import_themes10.IconButton,
645
812
  {
646
813
  disabled: nextMonthButtonDisabled,
647
814
  onClick: increaseMonth,
648
815
  variant: "ghost",
649
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_icons.ChevronRightIcon, {})
816
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_icons.ChevronRightIcon, {})
650
817
  }
651
818
  )
652
819
  ] });
653
820
  };
654
821
 
655
822
  // src/molecules/dot-navigation.tsx
656
- var import_react11 = require("react");
823
+ var import_react12 = require("react");
657
824
  var import_react_icons2 = require("@radix-ui/react-icons");
658
- var import_jsx_runtime14 = require("react/jsx-runtime");
825
+ var import_jsx_runtime15 = require("react/jsx-runtime");
659
826
  function DotNavigation(props) {
660
827
  const { dotCount, onClick, dotIndex, defaultDotIndex, onChangeDotIndex } = props;
661
- const [currentDot, setCurrentDot] = (0, import_react11.useState)(
828
+ const [currentDot, setCurrentDot] = (0, import_react12.useState)(
662
829
  () => {
663
830
  var _a;
664
831
  return (_a = defaultDotIndex != null ? defaultDotIndex : dotIndex) != null ? _a : 0;
665
832
  }
666
833
  );
667
- const onClickDot = (0, import_react11.useCallback)(
834
+ const onClickDot = (0, import_react12.useCallback)(
668
835
  (i) => {
669
836
  if (onClick) {
670
837
  onClick(i);
@@ -674,17 +841,17 @@ function DotNavigation(props) {
674
841
  },
675
842
  [onClick]
676
843
  );
677
- (0, import_react11.useEffect)(() => {
844
+ (0, import_react12.useEffect)(() => {
678
845
  onChangeDotIndex == null ? void 0 : onChangeDotIndex(currentDot);
679
846
  }, [currentDot, onChangeDotIndex]);
680
- (0, import_react11.useEffect)(() => {
847
+ (0, import_react12.useEffect)(() => {
681
848
  if (typeof dotIndex === "undefined")
682
849
  return;
683
850
  setCurrentDot(dotIndex);
684
851
  }, [dotIndex]);
685
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_themes6.Flex, { children: dotCount ? Array.from({ length: dotCount }, (_, i) => i).map((_, index) => {
852
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_themes6.Flex, { children: dotCount ? Array.from({ length: dotCount }, (_, i) => i).map((_, index) => {
686
853
  const isSelected = currentDot === index;
687
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
854
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
688
855
  import_react_icons2.DotFilledIcon,
689
856
  {
690
857
  height: "24px",
@@ -703,10 +870,10 @@ function DotNavigation(props) {
703
870
  }
704
871
 
705
872
  // src/molecules/stepper.tsx
706
- var import_react12 = require("react");
707
- var import_themes14 = require("@radix-ui/themes");
708
- var import_jsx_runtime15 = require("react/jsx-runtime");
709
- var StepContext = (0, import_react12.createContext)({
873
+ var import_react13 = require("react");
874
+ var import_themes15 = require("@radix-ui/themes");
875
+ var import_jsx_runtime16 = require("react/jsx-runtime");
876
+ var StepContext = (0, import_react13.createContext)({
710
877
  active: false,
711
878
  completed: false,
712
879
  index: 0
@@ -720,7 +887,7 @@ function Root(props) {
720
887
  maxWidth,
721
888
  direction = "vertical"
722
889
  } = props;
723
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
890
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
724
891
  import_themes6.Flex,
725
892
  {
726
893
  gap: "3",
@@ -729,8 +896,8 @@ function Root(props) {
729
896
  minWidth,
730
897
  maxWidth
731
898
  },
732
- children: import_react12.Children.map(children, (child, index) => {
733
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
899
+ children: import_react13.Children.map(children, (child, index) => {
900
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
734
901
  StepContext.Provider,
735
902
  {
736
903
  value: {
@@ -753,9 +920,9 @@ function Step(props) {
753
920
  completed,
754
921
  index,
755
922
  direction = "vertical"
756
- } = (0, import_react12.useContext)(StepContext);
757
- const connector = index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
758
- import_themes14.Separator,
923
+ } = (0, import_react13.useContext)(StepContext);
924
+ const connector = index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
925
+ import_themes15.Separator,
759
926
  {
760
927
  style: {
761
928
  width: `calc(100% - 40px)`,
@@ -765,7 +932,7 @@ function Step(props) {
765
932
  }
766
933
  }
767
934
  ) : null;
768
- const InnerStep = (0, import_react12.useMemo)(() => {
935
+ const InnerStep = (0, import_react13.useMemo)(() => {
769
936
  if (active) {
770
937
  return ActiveStep;
771
938
  }
@@ -774,7 +941,7 @@ function Step(props) {
774
941
  }
775
942
  return IncompleteStep;
776
943
  }, [completed, active]);
777
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
944
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
778
945
  import_themes6.Flex,
779
946
  {
780
947
  align: "center",
@@ -784,22 +951,22 @@ function Step(props) {
784
951
  style: { flex: 1 },
785
952
  children: [
786
953
  connector,
787
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InnerStep, { Icon, children })
954
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(InnerStep, { Icon, children })
788
955
  ]
789
956
  }
790
957
  );
791
958
  }
792
959
  function CompleteStep(props) {
793
960
  const { Icon, children } = props;
794
- const { completed, active } = (0, import_react12.useContext)(StepContext);
961
+ const { completed, active } = (0, import_react13.useContext)(StepContext);
795
962
  const background = "var(--accent-a4)";
796
963
  const border = "1px solid var(--accent-7)";
797
964
  const color = "var(--accent-contrast)";
798
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
799
- Icon ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { active, completed }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
965
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
966
+ Icon ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { active, completed }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
800
967
  Avatar,
801
968
  {
802
- fallback: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_icons.CheckIcon, { fill: color, height: 16, width: 16 }),
969
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_icons.CheckIcon, { fill: color, height: 16, width: 16 }),
803
970
  radius: "full",
804
971
  size: "medium",
805
972
  style: {
@@ -808,19 +975,19 @@ function CompleteStep(props) {
808
975
  }
809
976
  }
810
977
  ),
811
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Typo, { align: "center", variant: "caption", children })
978
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Typo, { align: "center", variant: "caption", children })
812
979
  ] });
813
980
  }
814
981
  function IncompleteStep(props) {
815
982
  const { Icon, children } = props;
816
- const { completed, active, index } = (0, import_react12.useContext)(StepContext);
983
+ const { completed, active, index } = (0, import_react13.useContext)(StepContext);
817
984
  const background = "var(--gray-5)";
818
985
  const color = "var(--gray-a11)";
819
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
820
- Icon ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { active, completed }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
986
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
987
+ Icon ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { active, completed }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
821
988
  Avatar,
822
989
  {
823
- fallback: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Typo, { style: { color }, children: index + 1 }),
990
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Typo, { style: { color }, children: index + 1 }),
824
991
  radius: "full",
825
992
  size: "medium",
826
993
  style: {
@@ -828,25 +995,25 @@ function IncompleteStep(props) {
828
995
  }
829
996
  }
830
997
  ),
831
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Typo, { align: "center", style: { color }, variant: "caption", children })
998
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Typo, { align: "center", style: { color }, variant: "caption", children })
832
999
  ] });
833
1000
  }
834
1001
  function ActiveStep(props) {
835
1002
  const { Icon, children } = props;
836
- const { completed, active, index } = (0, import_react12.useContext)(StepContext);
1003
+ const { completed, active, index } = (0, import_react13.useContext)(StepContext);
837
1004
  const background = "var(--accent-10)";
838
1005
  const color = "var(--accent-contrast)";
839
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
840
- Icon ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { active, completed }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1006
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
1007
+ Icon ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { active, completed }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
841
1008
  Avatar,
842
1009
  {
843
- fallback: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Typo, { style: { color }, weight: "bold", children: index + 1 }),
1010
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Typo, { style: { color }, weight: "bold", children: index + 1 }),
844
1011
  radius: "full",
845
1012
  size: "medium",
846
1013
  style: { background }
847
1014
  }
848
1015
  ),
849
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Typo, { align: "center", variant: "caption", weight: "bold", children })
1016
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Typo, { align: "center", variant: "caption", weight: "bold", children })
850
1017
  ] });
851
1018
  }
852
1019
  var Stepper = {
@@ -855,9 +1022,9 @@ var Stepper = {
855
1022
  };
856
1023
 
857
1024
  // src/molecules/tag-selector.tsx
858
- var import_react13 = require("react");
1025
+ var import_react14 = require("react");
859
1026
  var import_react_icons3 = require("@radix-ui/react-icons");
860
- var import_jsx_runtime16 = require("react/jsx-runtime");
1027
+ var import_jsx_runtime17 = require("react/jsx-runtime");
861
1028
  var OPTION_HEIGHT = 32;
862
1029
  var DefaultDropdownContainer = (props) => {
863
1030
  return props.children;
@@ -872,20 +1039,20 @@ function TagSelector(props) {
872
1039
  onChange,
873
1040
  size = "medium"
874
1041
  } = props;
875
- const [selected, setSelected] = (0, import_react13.useState)(props.selected || []);
876
- const [value, setValue] = (0, import_react13.useState)("");
877
- const [focusIndex, setFocusIndex] = (0, import_react13.useState)(null);
878
- const [open, setOpen] = (0, import_react13.useState)(false);
879
- const [focus, setFocus] = (0, import_react13.useState)(false);
880
- const fieldRef = (0, import_react13.useRef)(null);
881
- const scrollRef = (0, import_react13.useRef)(null);
882
- const closeRef = (0, import_react13.useRef)(0);
883
- const onFocus = (0, import_react13.useCallback)(() => {
1042
+ const [selected, setSelected] = (0, import_react14.useState)(props.selected || []);
1043
+ const [value, setValue] = (0, import_react14.useState)("");
1044
+ const [focusIndex, setFocusIndex] = (0, import_react14.useState)(null);
1045
+ const [open, setOpen] = (0, import_react14.useState)(false);
1046
+ const [focus, setFocus] = (0, import_react14.useState)(false);
1047
+ const fieldRef = (0, import_react14.useRef)(null);
1048
+ const scrollRef = (0, import_react14.useRef)(null);
1049
+ const closeRef = (0, import_react14.useRef)(0);
1050
+ const onFocus = (0, import_react14.useCallback)(() => {
884
1051
  clearTimeout(closeRef.current);
885
1052
  setFocus(true);
886
1053
  setOpen(true);
887
1054
  }, []);
888
- const onBlur = (0, import_react13.useCallback)(() => {
1055
+ const onBlur = (0, import_react14.useCallback)(() => {
889
1056
  closeRef.current = setTimeout(() => {
890
1057
  setFocus(false);
891
1058
  setOpen(false);
@@ -894,18 +1061,18 @@ function TagSelector(props) {
894
1061
  }, 100);
895
1062
  }, 300);
896
1063
  }, []);
897
- const onChangeValue = (0, import_react13.useCallback)(
1064
+ const onChangeValue = (0, import_react14.useCallback)(
898
1065
  (e) => {
899
1066
  setValue(e.target.value);
900
1067
  },
901
1068
  []
902
1069
  );
903
- const filteredOptions = (0, import_react13.useMemo)(() => {
1070
+ const filteredOptions = (0, import_react14.useMemo)(() => {
904
1071
  return options.filter((option) => {
905
1072
  return option.name.includes(value);
906
1073
  });
907
1074
  }, [options, value]);
908
- const selectedItem = (0, import_react13.useMemo)(() => {
1075
+ const selectedItem = (0, import_react14.useMemo)(() => {
909
1076
  const result = [];
910
1077
  selected.forEach((id) => {
911
1078
  const maybeItem = options.find((option) => option.id === id);
@@ -914,10 +1081,10 @@ function TagSelector(props) {
914
1081
  });
915
1082
  return result;
916
1083
  }, [options, selected]);
917
- const onDelete = (0, import_react13.useCallback)((id) => {
1084
+ const onDelete = (0, import_react14.useCallback)((id) => {
918
1085
  setSelected((prev) => prev.filter((el) => el !== id));
919
1086
  }, []);
920
- const onSelect = (0, import_react13.useCallback)(
1087
+ const onSelect = (0, import_react14.useCallback)(
921
1088
  (id) => {
922
1089
  if (maxCount && selected.length + 1 > maxCount)
923
1090
  return;
@@ -925,7 +1092,7 @@ function TagSelector(props) {
925
1092
  },
926
1093
  [maxCount, selected]
927
1094
  );
928
- const toggleItem = (0, import_react13.useCallback)(
1095
+ const toggleItem = (0, import_react14.useCallback)(
929
1096
  (id) => {
930
1097
  if (selected.includes(id)) {
931
1098
  onDelete(id);
@@ -935,7 +1102,7 @@ function TagSelector(props) {
935
1102
  },
936
1103
  [onDelete, onSelect, selected]
937
1104
  );
938
- const setScroll = (0, import_react13.useCallback)((index) => {
1105
+ const setScroll = (0, import_react14.useCallback)((index) => {
939
1106
  if (scrollRef.current) {
940
1107
  const scrollTop = scrollRef.current.scrollTop;
941
1108
  const clientHeight = scrollRef.current.clientHeight;
@@ -947,7 +1114,7 @@ function TagSelector(props) {
947
1114
  }
948
1115
  }
949
1116
  }, []);
950
- const handleKeyDown = (0, import_react13.useCallback)(
1117
+ const handleKeyDown = (0, import_react14.useCallback)(
951
1118
  (e) => {
952
1119
  var _a;
953
1120
  const key = e.key;
@@ -997,7 +1164,7 @@ function TagSelector(props) {
997
1164
  filteredOptions
998
1165
  ]
999
1166
  );
1000
- const placeholderVisible = (0, import_react13.useMemo)(() => {
1167
+ const placeholderVisible = (0, import_react14.useMemo)(() => {
1001
1168
  if (selectedItem.length)
1002
1169
  return false;
1003
1170
  if (value)
@@ -1006,19 +1173,19 @@ function TagSelector(props) {
1006
1173
  return false;
1007
1174
  return true;
1008
1175
  }, [focus, selectedItem.length, value]);
1009
- (0, import_react13.useEffect)(() => {
1176
+ (0, import_react14.useEffect)(() => {
1010
1177
  onChange == null ? void 0 : onChange(selected);
1011
1178
  }, [[...selected].sort().join(",")]);
1012
- (0, import_react13.useEffect)(() => {
1179
+ (0, import_react14.useEffect)(() => {
1013
1180
  setSelected(props.selected || []);
1014
1181
  }, [[...props.selected || []].sort().join(",")]);
1015
- (0, import_react13.useEffect)(() => {
1182
+ (0, import_react14.useEffect)(() => {
1016
1183
  setFocusIndex(null);
1017
1184
  }, [open]);
1018
- (0, import_react13.useEffect)(() => {
1185
+ (0, import_react14.useEffect)(() => {
1019
1186
  setFocusIndex(0);
1020
1187
  }, [filteredOptions]);
1021
- const badgeSize = (0, import_react13.useMemo)(() => {
1188
+ const badgeSize = (0, import_react14.useMemo)(() => {
1022
1189
  switch (size) {
1023
1190
  case "large":
1024
1191
  return "large";
@@ -1028,7 +1195,7 @@ function TagSelector(props) {
1028
1195
  return "small";
1029
1196
  }
1030
1197
  }, [size]);
1031
- const placeholderVariant = (0, import_react13.useMemo)(() => {
1198
+ const placeholderVariant = (0, import_react14.useMemo)(() => {
1032
1199
  switch (size) {
1033
1200
  case "large":
1034
1201
  return "subtitle";
@@ -1037,8 +1204,8 @@ function TagSelector(props) {
1037
1204
  return "body";
1038
1205
  }
1039
1206
  }, [size]);
1040
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_themes11.Popover.Root, { open: Boolean(filteredOptions.length) && open, children: [
1041
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_themes11.Popover.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1207
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_themes11.Popover.Root, { open: Boolean(filteredOptions.length) && open, children: [
1208
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_themes11.Popover.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1042
1209
  import_themes7.Grid,
1043
1210
  {
1044
1211
  align: "center",
@@ -1050,7 +1217,7 @@ function TagSelector(props) {
1050
1217
  return (_a = fieldRef.current) == null ? void 0 : _a.focus();
1051
1218
  },
1052
1219
  children: [
1053
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1220
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1054
1221
  import_themes6.Flex,
1055
1222
  {
1056
1223
  align: "center",
@@ -1060,22 +1227,22 @@ function TagSelector(props) {
1060
1227
  wrap: "wrap",
1061
1228
  children: [
1062
1229
  selectedItem.map((item) => {
1063
- return tagRender ? tagRender(item) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Badge, { size: badgeSize, children: [
1230
+ return tagRender ? tagRender(item) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Badge, { size: badgeSize, children: [
1064
1231
  item.name,
1065
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1232
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1066
1233
  Button,
1067
1234
  {
1068
1235
  onClick: () => {
1069
1236
  onDelete(item.id);
1070
1237
  },
1071
1238
  variant: "transparent",
1072
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_icons3.Cross1Icon, {})
1239
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_icons3.Cross1Icon, {})
1073
1240
  }
1074
1241
  )
1075
1242
  ] }, item.id);
1076
1243
  }),
1077
- placeholderVisible ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Typo, { color: "gray", variant: placeholderVariant, children: placeholder }) : null,
1078
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1244
+ placeholderVisible ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Typo, { color: "gray", variant: placeholderVariant, children: placeholder }) : null,
1245
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1079
1246
  AutoSizingInput,
1080
1247
  {
1081
1248
  onBlur,
@@ -1089,34 +1256,34 @@ function TagSelector(props) {
1089
1256
  ]
1090
1257
  }
1091
1258
  ),
1092
- focus ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_icons3.MagnifyingGlassIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_icons3.ChevronRightIcon, {})
1259
+ focus ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_icons3.MagnifyingGlassIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_icons3.ChevronRightIcon, {})
1093
1260
  ]
1094
1261
  }
1095
1262
  ) }),
1096
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1263
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1097
1264
  import_themes11.Popover.Content,
1098
1265
  {
1099
1266
  onOpenAutoFocus: (e) => {
1100
1267
  e.preventDefault();
1101
1268
  },
1102
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1269
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1103
1270
  DropdownContainer,
1104
1271
  {
1105
1272
  currentItem: filteredOptions[focusIndex || 0],
1106
1273
  items: filteredOptions,
1107
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1274
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1108
1275
  import_themes12.ScrollArea,
1109
1276
  {
1110
1277
  ref: scrollRef,
1111
1278
  scrollbars: "vertical",
1112
1279
  style: { height: OPTION_HEIGHT * 8 },
1113
1280
  type: "auto",
1114
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_themes6.Flex, { direction: "column", children: filteredOptions.map((item, i) => {
1281
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_themes6.Flex, { direction: "column", children: filteredOptions.map((item, i) => {
1115
1282
  const isSelected = Boolean(
1116
1283
  selected.find((el) => el === item.id)
1117
1284
  );
1118
1285
  const isFocus = i === focusIndex;
1119
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1286
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1120
1287
  Button,
1121
1288
  {
1122
1289
  onClick: () => {
@@ -1135,9 +1302,9 @@ function TagSelector(props) {
1135
1302
  boxShadow: "none"
1136
1303
  },
1137
1304
  variant: isSelected ? "soft" : "outline",
1138
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_themes6.Flex, { justify: "between", width: "100%", children: [
1305
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_themes6.Flex, { justify: "between", width: "100%", children: [
1139
1306
  item.name,
1140
- isSelected ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_icons.CheckIcon, {}) : null
1307
+ isSelected ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_icons.CheckIcon, {}) : null
1141
1308
  ] })
1142
1309
  },
1143
1310
  item.id
@@ -1153,14 +1320,14 @@ function TagSelector(props) {
1153
1320
  }
1154
1321
 
1155
1322
  // src/theme/theme-provider.tsx
1156
- var import_themes15 = require("@radix-ui/themes");
1157
- var import_jsx_runtime17 = require("react/jsx-runtime");
1323
+ var import_themes16 = require("@radix-ui/themes");
1324
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1158
1325
  function ThemeProvider(props) {
1159
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_themes15.Theme, __spreadValues({ accentColor: "iris", radius: "medium" }, props));
1326
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_themes16.Theme, __spreadValues({ accentColor: "iris", radius: "medium" }, props));
1160
1327
  }
1161
1328
 
1162
1329
  // src/molecules/learning-post.tsx
1163
- var import_jsx_runtime18 = require("react/jsx-runtime");
1330
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1164
1331
  function LearningPost(props) {
1165
1332
  const {
1166
1333
  defaultThemeProps,
@@ -1172,13 +1339,13 @@ function LearningPost(props) {
1172
1339
  onPageBack,
1173
1340
  children
1174
1341
  } = props;
1175
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1342
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1176
1343
  ThemeProvider,
1177
1344
  __spreadProps(__spreadValues({}, defaultThemeProps), {
1178
1345
  accentColor: "iris",
1179
1346
  scaling: "110%",
1180
1347
  style: {},
1181
- children: html ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1348
+ children: html ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1182
1349
  import_themes7.Grid,
1183
1350
  {
1184
1351
  columns: { initial: "1", md: "130px 1fr 130px" },
@@ -1190,8 +1357,8 @@ function LearningPost(props) {
1190
1357
  px: "4",
1191
1358
  width: "100%",
1192
1359
  children: [
1193
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", {}),
1194
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1360
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", {}),
1361
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1195
1362
  import_themes6.Flex,
1196
1363
  {
1197
1364
  align: "center",
@@ -1201,15 +1368,15 @@ function LearningPost(props) {
1201
1368
  overflow: "hidden",
1202
1369
  width: "100%",
1203
1370
  children: [
1204
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_themes7.Grid, { align: "start", columns: { initial: "1", sm: "2" }, gap: "2", children: [
1205
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1371
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_themes7.Grid, { align: "start", columns: { initial: "1", sm: "2" }, gap: "2", children: [
1372
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1206
1373
  import_themes7.Grid,
1207
1374
  {
1208
1375
  gap: "3",
1209
1376
  mb: { initial: "4", sm: "0" },
1210
1377
  style: { alignSelf: "flex-start" },
1211
1378
  children: [
1212
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1379
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1213
1380
  Heading2,
1214
1381
  {
1215
1382
  style: {
@@ -1221,17 +1388,17 @@ function LearningPost(props) {
1221
1388
  children: title
1222
1389
  }
1223
1390
  ),
1224
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Typo, { children: metaDescription }),
1225
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_themes6.Flex, { gap: "1", wrap: "wrap", children: tags == null ? void 0 : tags.map((el) => {
1391
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Typo, { children: metaDescription }),
1392
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_themes6.Flex, { gap: "1", wrap: "wrap", children: tags == null ? void 0 : tags.map((el) => {
1226
1393
  var _a;
1227
1394
  if ((_a = el.name) == null ? void 0 : _a.startsWith("filter"))
1228
1395
  return;
1229
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Badge, { size: "large", variant: "solid", children: el.name }, el.id);
1396
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Badge, { size: "large", variant: "solid", children: el.name }, el.id);
1230
1397
  }) })
1231
1398
  ]
1232
1399
  }
1233
1400
  ),
1234
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1401
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1235
1402
  import_themes.AspectRatio,
1236
1403
  {
1237
1404
  ratio: 5 / 3,
@@ -1244,7 +1411,7 @@ function LearningPost(props) {
1244
1411
  }
1245
1412
  )
1246
1413
  ] }),
1247
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_themes4.Box, { mt: "5", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1414
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_themes4.Box, { mt: "5", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1248
1415
  "div",
1249
1416
  {
1250
1417
  className: "gh-content",
@@ -1257,7 +1424,7 @@ function LearningPost(props) {
1257
1424
  children
1258
1425
  ]
1259
1426
  }
1260
- ) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1427
+ ) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1261
1428
  import_themes6.Flex,
1262
1429
  {
1263
1430
  align: "center",
@@ -1267,8 +1434,8 @@ function LearningPost(props) {
1267
1434
  justify: "center",
1268
1435
  width: "100%",
1269
1436
  children: [
1270
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Heading2, { variant: "heading1", children: "\uCF58\uD150\uCE20\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }),
1271
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1437
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Heading2, { variant: "heading1", children: "\uCF58\uD150\uCE20\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }),
1438
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1272
1439
  Heading2,
1273
1440
  {
1274
1441
  align: "center",
@@ -1279,7 +1446,7 @@ function LearningPost(props) {
1279
1446
  \uC7A0\uC2DC \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694.`
1280
1447
  }
1281
1448
  ),
1282
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { onClick: onPageBack, size: "large", children: "\uB4A4\uB85C\uAC00\uAE30" })
1449
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { onClick: onPageBack, size: "large", children: "\uB4A4\uB85C\uAC00\uAE30" })
1283
1450
  ]
1284
1451
  }
1285
1452
  )