@tipp/ui 1.4.14 → 1.4.16
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/dialog.cjs +4 -3
- package/dist/atoms/dialog.cjs.map +1 -1
- package/dist/atoms/dialog.js +1 -1
- package/dist/atoms/index.cjs +134 -100
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.d.cts +3 -1
- package/dist/atoms/index.d.ts +3 -1
- package/dist/atoms/index.js +3 -3
- package/dist/atoms/text-area.cjs +47 -1
- package/dist/atoms/text-area.cjs.map +1 -1
- package/dist/atoms/text-area.d.cts +11 -1
- package/dist/atoms/text-area.d.ts +11 -1
- package/dist/atoms/text-area.js +1 -1
- package/dist/atoms/text-field.cjs +43 -1
- package/dist/atoms/text-field.cjs.map +1 -1
- package/dist/atoms/text-field.d.cts +15 -1
- package/dist/atoms/text-field.d.ts +15 -1
- package/dist/atoms/text-field.js +1 -1
- package/dist/chunk-2LJ7CD62.js +340 -0
- package/dist/chunk-2LJ7CD62.js.map +1 -0
- package/dist/chunk-2PGSMNLI.js +90 -0
- package/dist/chunk-2PGSMNLI.js.map +1 -0
- package/dist/chunk-2VD5Y72N.js +89 -0
- package/dist/chunk-2VD5Y72N.js.map +1 -0
- package/dist/chunk-3ADRZ7OH.js +27 -0
- package/dist/chunk-3ADRZ7OH.js.map +1 -0
- package/dist/chunk-3KFECMWE.js +97 -0
- package/dist/chunk-3KFECMWE.js.map +1 -0
- package/dist/chunk-4UR2XNMY.js +87 -0
- package/dist/chunk-4UR2XNMY.js.map +1 -0
- package/dist/chunk-7RMTZBCT.js +192 -0
- package/dist/chunk-7RMTZBCT.js.map +1 -0
- package/dist/chunk-7UNNTQPU.js +28 -0
- package/dist/chunk-7UNNTQPU.js.map +1 -0
- package/dist/chunk-AP2MXJOW.js +164 -0
- package/dist/chunk-AP2MXJOW.js.map +1 -0
- package/dist/chunk-CJDUEQIT.js +169 -0
- package/dist/chunk-CJDUEQIT.js.map +1 -0
- package/dist/chunk-CVON644P.js +164 -0
- package/dist/chunk-CVON644P.js.map +1 -0
- package/dist/chunk-DDBXZ3IQ.js +28 -0
- package/dist/chunk-DDBXZ3IQ.js.map +1 -0
- package/dist/chunk-EXC5RUGV.js +20 -0
- package/dist/chunk-EXC5RUGV.js.map +1 -0
- package/dist/chunk-EZEZH6DF.js +29 -0
- package/dist/chunk-EZEZH6DF.js.map +1 -0
- package/dist/chunk-G6ITJNH2.js +128 -0
- package/dist/chunk-G6ITJNH2.js.map +1 -0
- package/dist/chunk-GJ6NEBI5.js +340 -0
- package/dist/chunk-GJ6NEBI5.js.map +1 -0
- package/dist/chunk-IKUXA6XG.js +340 -0
- package/dist/chunk-IKUXA6XG.js.map +1 -0
- package/dist/chunk-IYIR2TWL.js +192 -0
- package/dist/chunk-IYIR2TWL.js.map +1 -0
- package/dist/chunk-KFK3272Z.js +169 -0
- package/dist/chunk-KFK3272Z.js.map +1 -0
- package/dist/chunk-KQDTZZMT.js +29 -0
- package/dist/chunk-KQDTZZMT.js.map +1 -0
- package/dist/chunk-LZYIGZTE.js +164 -0
- package/dist/chunk-LZYIGZTE.js.map +1 -0
- package/dist/chunk-MVO7NIPH.js +164 -0
- package/dist/chunk-MVO7NIPH.js.map +1 -0
- package/dist/chunk-NCZFYI4T.js +192 -0
- package/dist/chunk-NCZFYI4T.js.map +1 -0
- package/dist/chunk-OCAFG4UV.js +97 -0
- package/dist/chunk-OCAFG4UV.js.map +1 -0
- package/dist/chunk-OHBL3CTQ.js +113 -0
- package/dist/chunk-OHBL3CTQ.js.map +1 -0
- package/dist/chunk-OKN5AK5Z.js +340 -0
- package/dist/chunk-OKN5AK5Z.js.map +1 -0
- package/dist/chunk-Q6OLO22T.js +89 -0
- package/dist/chunk-Q6OLO22T.js.map +1 -0
- package/dist/chunk-R4JVUEWZ.js +32 -0
- package/dist/chunk-R4JVUEWZ.js.map +1 -0
- package/dist/chunk-RJIYLM7M.js +32 -0
- package/dist/chunk-RJIYLM7M.js.map +1 -0
- package/dist/chunk-RT5L7IEL.js +29 -0
- package/dist/chunk-RT5L7IEL.js.map +1 -0
- package/dist/chunk-SHFRE4AI.js +340 -0
- package/dist/chunk-SHFRE4AI.js.map +1 -0
- package/dist/chunk-TRPACCEM.js +169 -0
- package/dist/chunk-TRPACCEM.js.map +1 -0
- package/dist/chunk-TT3Y6TU5.js +89 -0
- package/dist/chunk-TT3Y6TU5.js.map +1 -0
- package/dist/chunk-V5CNGZN6.js +87 -0
- package/dist/chunk-V5CNGZN6.js.map +1 -0
- package/dist/chunk-VIXDNPET.js +28 -0
- package/dist/chunk-VIXDNPET.js.map +1 -0
- package/dist/chunk-VKEZRJ2L.js +128 -0
- package/dist/chunk-VKEZRJ2L.js.map +1 -0
- package/dist/chunk-WVD5KKRC.js +97 -0
- package/dist/chunk-WVD5KKRC.js.map +1 -0
- package/dist/chunk-Y44Z3OUE.js +89 -0
- package/dist/chunk-Y44Z3OUE.js.map +1 -0
- package/dist/chunk-YY45YYJE.js +28 -0
- package/dist/chunk-YY45YYJE.js.map +1 -0
- package/dist/index.cjs +291 -257
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -3
- package/dist/molecules/expand-table/index.js +3 -3
- package/dist/molecules/expand-table/row.js +3 -3
- package/dist/molecules/index.js +3 -3
- package/dist/molecules/navigation.js +3 -3
- package/dist/molecules/tag-selector.js +3 -3
- package/package.json +3 -3
- package/src/atoms/dialog.tsx +5 -4
- package/src/atoms/text-area.tsx +29 -1
- package/src/atoms/text-field.tsx +29 -1
package/dist/index.cjs
CHANGED
|
@@ -138,7 +138,7 @@ __export(src_exports, {
|
|
|
138
138
|
Radio: () => import_themes32.Radio,
|
|
139
139
|
RadioCards: () => import_themes33.RadioCards,
|
|
140
140
|
RadioGroup: () => import_themes34.RadioGroup,
|
|
141
|
-
Root: () =>
|
|
141
|
+
Root: () => Root5,
|
|
142
142
|
RowsIcon: () => import_react_icons2.RowsIcon,
|
|
143
143
|
ScrollArea: () => import_themes35.ScrollArea,
|
|
144
144
|
Section: () => import_themes36.Section,
|
|
@@ -154,8 +154,8 @@ __export(src_exports, {
|
|
|
154
154
|
TabNav: () => import_themes43.TabNav,
|
|
155
155
|
Tabs: () => import_themes44.Tabs,
|
|
156
156
|
TagSelector: () => TagSelector,
|
|
157
|
-
TextArea: () =>
|
|
158
|
-
TextField: () =>
|
|
157
|
+
TextArea: () => TextArea,
|
|
158
|
+
TextField: () => TextField,
|
|
159
159
|
ThemeProvider: () => ThemeProvider,
|
|
160
160
|
ToastContainer: () => ToastContainer,
|
|
161
161
|
Tooltip: () => import_themes48.Tooltip,
|
|
@@ -437,9 +437,10 @@ function Content2(props) {
|
|
|
437
437
|
"minHeight"
|
|
438
438
|
]);
|
|
439
439
|
const containerRef = (0, import_react7.useRef)(null);
|
|
440
|
-
(
|
|
441
|
-
|
|
442
|
-
|
|
440
|
+
if (typeof document !== "undefined") {
|
|
441
|
+
const container = document.getElementsByClassName("radix-themes")[0];
|
|
442
|
+
containerRef.current = container;
|
|
443
|
+
}
|
|
443
444
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RadixDialog.Portal, { container: containerRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RadixDialog.Overlay, { className: "DialogOverlay", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
444
445
|
RadixDialog.Content,
|
|
445
446
|
__spreadProps(__spreadValues({
|
|
@@ -650,15 +651,32 @@ var import_themes44 = require("@radix-ui/themes");
|
|
|
650
651
|
|
|
651
652
|
// src/atoms/text-area.tsx
|
|
652
653
|
var import_themes45 = require("@radix-ui/themes");
|
|
654
|
+
var import_react12 = require("react");
|
|
655
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
656
|
+
var TextArea = (0, import_react12.forwardRef)(
|
|
657
|
+
(props, ref) => {
|
|
658
|
+
const _a = props, { error, style } = _a, rest = __objRest(_a, ["error", "style"]);
|
|
659
|
+
const fieldStyle = (0, import_react12.useMemo)(() => {
|
|
660
|
+
if (!style && !error)
|
|
661
|
+
return void 0;
|
|
662
|
+
const errorStyle = {
|
|
663
|
+
boxShadow: "inset 0 0 0 var(--text-area-border-width) var(--error-11)"
|
|
664
|
+
};
|
|
665
|
+
return __spreadValues(__spreadValues({}, style || {}), errorStyle);
|
|
666
|
+
}, [error, style]);
|
|
667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_themes45.TextArea, __spreadProps(__spreadValues({}, rest), { ref, style: fieldStyle }));
|
|
668
|
+
}
|
|
669
|
+
);
|
|
670
|
+
TextArea.displayName = "TextArea";
|
|
653
671
|
|
|
654
672
|
// src/atoms/typo.tsx
|
|
655
673
|
var import_themes46 = require("@radix-ui/themes");
|
|
656
|
-
var
|
|
657
|
-
var
|
|
658
|
-
var Typo = (0,
|
|
674
|
+
var import_react13 = require("react");
|
|
675
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
676
|
+
var Typo = (0, import_react13.forwardRef)(
|
|
659
677
|
(props, ref) => {
|
|
660
678
|
const _a = props, { size, variant, children } = _a, rest = __objRest(_a, ["size", "variant", "children"]);
|
|
661
|
-
const radixSize = (0,
|
|
679
|
+
const radixSize = (0, import_react13.useMemo)(() => {
|
|
662
680
|
if (size !== void 0)
|
|
663
681
|
return size;
|
|
664
682
|
switch (variant) {
|
|
@@ -671,54 +689,70 @@ var Typo = (0, import_react12.forwardRef)(
|
|
|
671
689
|
return "2";
|
|
672
690
|
}
|
|
673
691
|
}, [size, variant]);
|
|
674
|
-
return /* @__PURE__ */ (0,
|
|
692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_themes46.Text, __spreadProps(__spreadValues({}, rest), { ref, size: radixSize, children }));
|
|
675
693
|
}
|
|
676
694
|
);
|
|
677
695
|
Typo.displayName = "Typo";
|
|
678
696
|
|
|
679
697
|
// src/atoms/text-field.tsx
|
|
680
698
|
var import_themes47 = require("@radix-ui/themes");
|
|
699
|
+
var import_react14 = require("react");
|
|
700
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
701
|
+
var Root3 = (0, import_react14.forwardRef)((props, ref) => {
|
|
702
|
+
const _a = props, { error, style } = _a, rest = __objRest(_a, ["error", "style"]);
|
|
703
|
+
const fieldStyle = (0, import_react14.useMemo)(() => {
|
|
704
|
+
if (!style && !error)
|
|
705
|
+
return void 0;
|
|
706
|
+
const errorStyle = {
|
|
707
|
+
boxShadow: "inset 0 0 0 var(--text-field-border-width) var(--error-11)"
|
|
708
|
+
};
|
|
709
|
+
return __spreadValues(__spreadValues({}, style || {}), errorStyle);
|
|
710
|
+
}, [error, style]);
|
|
711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_themes47.TextField.Root, __spreadValues({ ref, style: fieldStyle }, rest));
|
|
712
|
+
});
|
|
713
|
+
Root3.displayName = "TextField.Root";
|
|
714
|
+
var TextField = { Root: Root3, Slot: import_themes47.TextField.Slot };
|
|
681
715
|
|
|
682
716
|
// src/atoms/tooltip.tsx
|
|
683
717
|
var import_themes48 = require("@radix-ui/themes");
|
|
684
718
|
|
|
685
719
|
// src/atoms/collapse.tsx
|
|
686
|
-
var
|
|
687
|
-
var
|
|
720
|
+
var import_react15 = require("react");
|
|
721
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
688
722
|
function Collapse(props) {
|
|
689
723
|
const { children, closedHeight = "0" } = props;
|
|
690
|
-
const [open, setOpen] = (0,
|
|
724
|
+
const [open, setOpen] = (0, import_react15.useState)(() => {
|
|
691
725
|
return props.open || props.defaultOpen || false;
|
|
692
726
|
});
|
|
693
|
-
(0,
|
|
727
|
+
(0, import_react15.useEffect)(() => {
|
|
694
728
|
if (props.open === void 0)
|
|
695
729
|
return;
|
|
696
730
|
setOpen(props.open);
|
|
697
731
|
}, [props.open]);
|
|
698
|
-
const ref = (0,
|
|
699
|
-
(0,
|
|
732
|
+
const ref = (0, import_react15.useRef)(null);
|
|
733
|
+
(0, import_react15.useEffect)(() => {
|
|
700
734
|
if (!ref.current)
|
|
701
735
|
return;
|
|
702
736
|
ref.current.style.maxHeight = open ? `${ref.current.scrollHeight}px` : closedHeight;
|
|
703
737
|
}, [closedHeight, open]);
|
|
704
|
-
return /* @__PURE__ */ (0,
|
|
738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "tipp-collapse", ref, children });
|
|
705
739
|
}
|
|
706
740
|
|
|
707
741
|
// src/atoms/spinner.tsx
|
|
708
742
|
var import_themes49 = require("@radix-ui/themes");
|
|
709
743
|
|
|
710
744
|
// src/atoms/pagination.tsx
|
|
711
|
-
var
|
|
745
|
+
var import_react16 = require("react");
|
|
712
746
|
|
|
713
747
|
// src/icon.ts
|
|
714
748
|
var import_react_icons2 = require("@radix-ui/react-icons");
|
|
715
749
|
|
|
716
750
|
// src/atoms/pagination.tsx
|
|
717
|
-
var
|
|
751
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
718
752
|
function Pagination(props) {
|
|
719
753
|
const { onChange, count = 0, siblingCount = 2 } = props;
|
|
720
|
-
const [page, setPage] = (0,
|
|
721
|
-
const visibleItems = (0,
|
|
754
|
+
const [page, setPage] = (0, import_react16.useState)(() => props.page || props.defaultPage || 1);
|
|
755
|
+
const visibleItems = (0, import_react16.useMemo)(() => {
|
|
722
756
|
let start = Math.max(1, page - siblingCount);
|
|
723
757
|
let end = Math.min(count, page + siblingCount);
|
|
724
758
|
if (page - siblingCount <= 0 && end < count) {
|
|
@@ -728,37 +762,37 @@ function Pagination(props) {
|
|
|
728
762
|
}
|
|
729
763
|
return Array.from({ length: end - start + 1 }, (_, i) => i + start);
|
|
730
764
|
}, [count, page, siblingCount]);
|
|
731
|
-
(0,
|
|
765
|
+
(0, import_react16.useEffect)(() => {
|
|
732
766
|
onChange == null ? void 0 : onChange(page);
|
|
733
767
|
}, [onChange, page]);
|
|
734
|
-
(0,
|
|
768
|
+
(0, import_react16.useEffect)(() => {
|
|
735
769
|
if (props.page) {
|
|
736
770
|
setPage(props.page);
|
|
737
771
|
}
|
|
738
772
|
}, [props.page]);
|
|
739
|
-
const prev = (0,
|
|
773
|
+
const prev = (0, import_react16.useMemo)(() => {
|
|
740
774
|
const p = page - 1;
|
|
741
775
|
return p < 1 ? void 0 : p;
|
|
742
776
|
}, [page]);
|
|
743
|
-
const next = (0,
|
|
777
|
+
const next = (0, import_react16.useMemo)(() => {
|
|
744
778
|
const n = page + 1;
|
|
745
779
|
return n > count ? void 0 : n;
|
|
746
780
|
}, [count, page]);
|
|
747
|
-
const onClickPrev = (0,
|
|
781
|
+
const onClickPrev = (0, import_react16.useCallback)(() => {
|
|
748
782
|
prev && setPage(prev);
|
|
749
783
|
}, [prev]);
|
|
750
|
-
const onClickNext = (0,
|
|
784
|
+
const onClickNext = (0, import_react16.useCallback)(() => {
|
|
751
785
|
next && setPage(next);
|
|
752
786
|
}, [next]);
|
|
753
|
-
const doublePrev = (0,
|
|
787
|
+
const doublePrev = (0, import_react16.useMemo)(() => {
|
|
754
788
|
if (!visibleItems.length)
|
|
755
789
|
return;
|
|
756
790
|
return Math.max(0, visibleItems[0] - 1);
|
|
757
791
|
}, [visibleItems]);
|
|
758
|
-
const onClickDoublePrev = (0,
|
|
792
|
+
const onClickDoublePrev = (0, import_react16.useCallback)(() => {
|
|
759
793
|
doublePrev && setPage(doublePrev);
|
|
760
794
|
}, [doublePrev]);
|
|
761
|
-
const doubleNext = (0,
|
|
795
|
+
const doubleNext = (0, import_react16.useMemo)(() => {
|
|
762
796
|
if (!visibleItems.length)
|
|
763
797
|
return;
|
|
764
798
|
const n = visibleItems[visibleItems.length - 1] + 1;
|
|
@@ -766,7 +800,7 @@ function Pagination(props) {
|
|
|
766
800
|
return;
|
|
767
801
|
return Math.min(count, n);
|
|
768
802
|
}, [count, visibleItems]);
|
|
769
|
-
const onClickDoubleNext = (0,
|
|
803
|
+
const onClickDoubleNext = (0, import_react16.useCallback)(() => {
|
|
770
804
|
doubleNext && setPage(doubleNext);
|
|
771
805
|
}, [doubleNext]);
|
|
772
806
|
const iconSize = {
|
|
@@ -778,19 +812,19 @@ function Pagination(props) {
|
|
|
778
812
|
size: "3",
|
|
779
813
|
style: { borderRadius: "50%" }
|
|
780
814
|
};
|
|
781
|
-
return /* @__PURE__ */ (0,
|
|
782
|
-
/* @__PURE__ */ (0,
|
|
815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_themes19.Flex, { align: "center", className: "tipp-pagination", gap: "4", children: [
|
|
816
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
783
817
|
import_themes24.IconButton,
|
|
784
818
|
__spreadProps(__spreadValues({
|
|
785
819
|
disabled: !doublePrev,
|
|
786
820
|
onClick: onClickDoublePrev
|
|
787
821
|
}, moveButtonProps), {
|
|
788
|
-
children: /* @__PURE__ */ (0,
|
|
822
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_icons2.DoubleArrowLeftIcon, __spreadValues({}, iconSize))
|
|
789
823
|
})
|
|
790
824
|
),
|
|
791
|
-
/* @__PURE__ */ (0,
|
|
792
|
-
/* @__PURE__ */ (0,
|
|
793
|
-
return /* @__PURE__ */ (0,
|
|
825
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_themes24.IconButton, __spreadProps(__spreadValues({ disabled: !prev, onClick: onClickPrev }, moveButtonProps), { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_icons2.ChevronLeftIcon, __spreadValues({}, iconSize)) })),
|
|
826
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_themes19.Flex, { gap: "1", children: visibleItems.map((item) => {
|
|
827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
794
828
|
"button",
|
|
795
829
|
{
|
|
796
830
|
className: `page-button ${item === page ? "active" : ""}`,
|
|
@@ -798,46 +832,46 @@ function Pagination(props) {
|
|
|
798
832
|
setPage(item);
|
|
799
833
|
},
|
|
800
834
|
type: "button",
|
|
801
|
-
children: /* @__PURE__ */ (0,
|
|
835
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Typo, { variant: "body", children: item })
|
|
802
836
|
},
|
|
803
837
|
item
|
|
804
838
|
);
|
|
805
839
|
}) }),
|
|
806
|
-
/* @__PURE__ */ (0,
|
|
807
|
-
/* @__PURE__ */ (0,
|
|
840
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_themes24.IconButton, __spreadProps(__spreadValues({ disabled: !next, onClick: onClickNext }, moveButtonProps), { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_icons2.ChevronRightIcon, __spreadValues({}, iconSize)) })),
|
|
841
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
808
842
|
import_themes24.IconButton,
|
|
809
843
|
__spreadProps(__spreadValues({
|
|
810
844
|
disabled: !doubleNext,
|
|
811
845
|
onClick: onClickDoubleNext
|
|
812
846
|
}, moveButtonProps), {
|
|
813
|
-
children: /* @__PURE__ */ (0,
|
|
847
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_icons2.DoubleArrowRightIcon, __spreadValues({}, iconSize))
|
|
814
848
|
})
|
|
815
849
|
)
|
|
816
850
|
] });
|
|
817
851
|
}
|
|
818
852
|
|
|
819
853
|
// src/atoms/field-error-wrapper.tsx
|
|
820
|
-
var
|
|
854
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
821
855
|
function FieldErrorWrapper({
|
|
822
856
|
children,
|
|
823
857
|
error
|
|
824
858
|
}) {
|
|
825
|
-
return /* @__PURE__ */ (0,
|
|
859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_themes19.Flex, { direction: "column", gap: "1", children: [
|
|
826
860
|
children,
|
|
827
|
-
error ? /* @__PURE__ */ (0,
|
|
861
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Typo, { color: "red", variant: "caption", children: error }) : null
|
|
828
862
|
] });
|
|
829
863
|
}
|
|
830
864
|
|
|
831
865
|
// src/atoms/ellipsis-tooltip.tsx
|
|
832
|
-
var
|
|
833
|
-
var
|
|
866
|
+
var import_react17 = require("react");
|
|
867
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
834
868
|
function EllipsisTooltip(props) {
|
|
835
869
|
const _a = props, { children, style, lineClamp = 2 } = _a, rest = __objRest(_a, ["children", "style", "lineClamp"]);
|
|
836
|
-
const ref = (0,
|
|
837
|
-
const [tooltipDisplay, setTooltipDisplay] = (0,
|
|
870
|
+
const ref = (0, import_react17.useRef)(null);
|
|
871
|
+
const [tooltipDisplay, setTooltipDisplay] = (0, import_react17.useState)(
|
|
838
872
|
"none"
|
|
839
873
|
);
|
|
840
|
-
(0,
|
|
874
|
+
(0, import_react17.useEffect)(() => {
|
|
841
875
|
if (ref.current) {
|
|
842
876
|
const typo = ref.current;
|
|
843
877
|
const mouseOver = () => {
|
|
@@ -852,7 +886,7 @@ function EllipsisTooltip(props) {
|
|
|
852
886
|
ref.current.addEventListener("mouseleave", mouseOut);
|
|
853
887
|
}
|
|
854
888
|
}, [children]);
|
|
855
|
-
return /* @__PURE__ */ (0,
|
|
889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_themes48.Tooltip, { content: children, style: { display: tooltipDisplay }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
856
890
|
Typo,
|
|
857
891
|
__spreadProps(__spreadValues({}, rest), {
|
|
858
892
|
ref,
|
|
@@ -871,28 +905,28 @@ function EllipsisTooltip(props) {
|
|
|
871
905
|
}
|
|
872
906
|
|
|
873
907
|
// src/atoms/drawer.tsx
|
|
874
|
-
var
|
|
908
|
+
var import_react18 = require("react");
|
|
875
909
|
var Dialog2 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
876
910
|
var import_react_icons3 = require("@radix-ui/react-icons");
|
|
877
|
-
var
|
|
878
|
-
function
|
|
879
|
-
return /* @__PURE__ */ (0,
|
|
911
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
912
|
+
function Root5(props) {
|
|
913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Dialog2.Root, __spreadValues({}, props));
|
|
880
914
|
}
|
|
881
915
|
function Content6(props) {
|
|
882
916
|
const _a = props, { position = "right", className, children } = _a, rest = __objRest(_a, ["position", "className", "children"]);
|
|
883
|
-
const containerRef = (0,
|
|
884
|
-
(0,
|
|
917
|
+
const containerRef = (0, import_react18.useRef)(null);
|
|
918
|
+
(0, import_react18.useEffect)(() => {
|
|
885
919
|
containerRef.current = document.getElementsByClassName("radix-themes")[0];
|
|
886
920
|
}, []);
|
|
887
|
-
return /* @__PURE__ */ (0,
|
|
888
|
-
/* @__PURE__ */ (0,
|
|
889
|
-
/* @__PURE__ */ (0,
|
|
921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Dialog2.Portal, { container: containerRef.current, children: [
|
|
922
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Dialog2.Overlay, { className: "DrawerOverlay" }),
|
|
923
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
890
924
|
Dialog2.Content,
|
|
891
925
|
__spreadProps(__spreadValues({
|
|
892
926
|
className: `DrawerContent ${position} ${className || ""}`
|
|
893
927
|
}, rest), {
|
|
894
928
|
children: [
|
|
895
|
-
/* @__PURE__ */ (0,
|
|
929
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_themes6.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Dialog2.Close, { asChild: true, className: "DialogClose", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { color: "gray", variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_icons3.Cross1Icon, { height: "18px", width: "18px" }) }) }) }),
|
|
896
930
|
children
|
|
897
931
|
]
|
|
898
932
|
})
|
|
@@ -900,7 +934,7 @@ function Content6(props) {
|
|
|
900
934
|
] });
|
|
901
935
|
}
|
|
902
936
|
function Trigger4(props) {
|
|
903
|
-
return /* @__PURE__ */ (0,
|
|
937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Dialog2.Trigger, __spreadValues({ asChild: true }, props));
|
|
904
938
|
}
|
|
905
939
|
var Drawer = {
|
|
906
940
|
Root: Dialog2.Root,
|
|
@@ -915,12 +949,12 @@ var Drawer = {
|
|
|
915
949
|
var import_react_icons4 = require("@radix-ui/react-icons");
|
|
916
950
|
var import_react_toastify = require("react-toastify");
|
|
917
951
|
var import_react_toastify2 = require("react-toastify");
|
|
918
|
-
var
|
|
952
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
919
953
|
function CloseButton() {
|
|
920
954
|
return null;
|
|
921
955
|
}
|
|
922
956
|
function ToastContainer(props) {
|
|
923
|
-
return /* @__PURE__ */ (0,
|
|
957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
924
958
|
import_react_toastify.ToastContainer,
|
|
925
959
|
__spreadValues({
|
|
926
960
|
autoClose: 5e3,
|
|
@@ -928,7 +962,7 @@ function ToastContainer(props) {
|
|
|
928
962
|
closeOnClick: true,
|
|
929
963
|
draggable: true,
|
|
930
964
|
hideProgressBar: true,
|
|
931
|
-
icon: /* @__PURE__ */ (0,
|
|
965
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_icons4.InfoCircledIcon, {}),
|
|
932
966
|
newestOnTop: true,
|
|
933
967
|
pauseOnFocusLoss: true,
|
|
934
968
|
pauseOnHover: true,
|
|
@@ -941,12 +975,12 @@ function ToastContainer(props) {
|
|
|
941
975
|
|
|
942
976
|
// src/molecules/form.tsx
|
|
943
977
|
var RadixForm = __toESM(require("@radix-ui/react-form"), 1);
|
|
944
|
-
var
|
|
945
|
-
var
|
|
946
|
-
var
|
|
978
|
+
var import_react19 = require("react");
|
|
979
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
980
|
+
var Root7 = (0, import_react19.forwardRef)(
|
|
947
981
|
(_a, ref) => {
|
|
948
982
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
949
|
-
return /* @__PURE__ */ (0,
|
|
983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
950
984
|
RadixForm.Root,
|
|
951
985
|
__spreadProps(__spreadValues({}, rest), {
|
|
952
986
|
className: `FormRoot ${className || ""}`,
|
|
@@ -956,67 +990,67 @@ var Root6 = (0, import_react17.forwardRef)(
|
|
|
956
990
|
);
|
|
957
991
|
}
|
|
958
992
|
);
|
|
959
|
-
|
|
960
|
-
var FieldContext = (0,
|
|
993
|
+
Root7.displayName = "FORM_ROOT";
|
|
994
|
+
var FieldContext = (0, import_react19.createContext)({
|
|
961
995
|
name: ""
|
|
962
996
|
});
|
|
963
|
-
var Field2 = (0,
|
|
997
|
+
var Field2 = (0, import_react19.forwardRef)(
|
|
964
998
|
(_a, ref) => {
|
|
965
999
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
966
|
-
return /* @__PURE__ */ (0,
|
|
1000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
967
1001
|
RadixForm.Field,
|
|
968
1002
|
__spreadProps(__spreadValues({}, rest), {
|
|
969
1003
|
className: `FormField ${className || ""}`,
|
|
970
1004
|
ref,
|
|
971
|
-
children: /* @__PURE__ */ (0,
|
|
1005
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FieldContext.Provider, { value: rest, children })
|
|
972
1006
|
})
|
|
973
1007
|
);
|
|
974
1008
|
}
|
|
975
1009
|
);
|
|
976
1010
|
Field2.displayName = "FORM_FIELD";
|
|
977
1011
|
function HeadingLabel(props) {
|
|
978
|
-
return /* @__PURE__ */ (0,
|
|
1012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Heading2, __spreadProps(__spreadValues({ variant: "heading5" }, props), { children: props.children }));
|
|
979
1013
|
}
|
|
980
|
-
var Label2 = (0,
|
|
1014
|
+
var Label2 = (0, import_react19.forwardRef)(
|
|
981
1015
|
(_a, ref) => {
|
|
982
1016
|
var _b = _a, { children, className, variant = "body" } = _b, rest = __objRest(_b, ["children", "className", "variant"]);
|
|
983
1017
|
const Comp = variant === "title" ? HeadingLabel : Typo;
|
|
984
|
-
const fieldProps = (0,
|
|
985
|
-
return /* @__PURE__ */ (0,
|
|
1018
|
+
const fieldProps = (0, import_react19.useContext)(FieldContext);
|
|
1019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
986
1020
|
RadixForm.Label,
|
|
987
1021
|
__spreadProps(__spreadValues({}, rest), {
|
|
988
1022
|
asChild: true,
|
|
989
1023
|
className: `FormLabel ${className || ""}`,
|
|
990
1024
|
ref,
|
|
991
|
-
children: /* @__PURE__ */ (0,
|
|
1025
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Comp, { children: [
|
|
992
1026
|
children,
|
|
993
|
-
fieldProps.required ? /* @__PURE__ */ (0,
|
|
1027
|
+
fieldProps.required ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Typo, { as: "span", color: "tomato", children: ` *` }) : null
|
|
994
1028
|
] })
|
|
995
1029
|
})
|
|
996
1030
|
);
|
|
997
1031
|
}
|
|
998
1032
|
);
|
|
999
1033
|
Label2.displayName = "FORM_Label";
|
|
1000
|
-
var Message2 = (0,
|
|
1034
|
+
var Message2 = (0, import_react19.forwardRef)(
|
|
1001
1035
|
(_a, ref) => {
|
|
1002
1036
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
1003
|
-
return /* @__PURE__ */ (0,
|
|
1037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1004
1038
|
RadixForm.Message,
|
|
1005
1039
|
__spreadProps(__spreadValues({}, rest), {
|
|
1006
1040
|
asChild: true,
|
|
1007
1041
|
className: `FormMessage ${className || ""}`,
|
|
1008
1042
|
ref,
|
|
1009
|
-
children: /* @__PURE__ */ (0,
|
|
1043
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Typo, { color: "red", children })
|
|
1010
1044
|
})
|
|
1011
1045
|
);
|
|
1012
1046
|
}
|
|
1013
1047
|
);
|
|
1014
1048
|
Message2.displayName = "FORM_Message";
|
|
1015
|
-
var Control2 = (0,
|
|
1049
|
+
var Control2 = (0, import_react19.forwardRef)(
|
|
1016
1050
|
(_a, ref) => {
|
|
1017
1051
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
1018
|
-
const fieldProps = (0,
|
|
1019
|
-
return /* @__PURE__ */ (0,
|
|
1052
|
+
const fieldProps = (0, import_react19.useContext)(FieldContext);
|
|
1053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1020
1054
|
RadixForm.Control,
|
|
1021
1055
|
__spreadProps(__spreadValues({}, rest), {
|
|
1022
1056
|
className: `FormControl ${className || ""}`,
|
|
@@ -1028,7 +1062,7 @@ var Control2 = (0, import_react17.forwardRef)(
|
|
|
1028
1062
|
);
|
|
1029
1063
|
Control2.displayName = "FORM_Control";
|
|
1030
1064
|
var Form = {
|
|
1031
|
-
Root:
|
|
1065
|
+
Root: Root7,
|
|
1032
1066
|
Field: Field2,
|
|
1033
1067
|
Label: Label2,
|
|
1034
1068
|
Message: Message2,
|
|
@@ -1037,33 +1071,33 @@ var Form = {
|
|
|
1037
1071
|
};
|
|
1038
1072
|
|
|
1039
1073
|
// src/atoms/auto-sizing-input.tsx
|
|
1040
|
-
var
|
|
1041
|
-
var
|
|
1042
|
-
var AutoSizingInput = (0,
|
|
1074
|
+
var import_react20 = require("react");
|
|
1075
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1076
|
+
var AutoSizingInput = (0, import_react20.forwardRef)(
|
|
1043
1077
|
(_a, ref) => {
|
|
1044
1078
|
var _b = _a, { value: _value, onChangeValue, onChange } = _b, rest = __objRest(_b, ["value", "onChangeValue", "onChange"]);
|
|
1045
|
-
const [value, setValue] = (0,
|
|
1046
|
-
const [width, setWidth] = (0,
|
|
1047
|
-
const span = (0,
|
|
1048
|
-
(0,
|
|
1079
|
+
const [value, setValue] = (0, import_react20.useState)(_value);
|
|
1080
|
+
const [width, setWidth] = (0, import_react20.useState)(0);
|
|
1081
|
+
const span = (0, import_react20.useRef)(null);
|
|
1082
|
+
(0, import_react20.useEffect)(() => {
|
|
1049
1083
|
span.current && setWidth(span.current.offsetWidth);
|
|
1050
1084
|
}, [value]);
|
|
1051
|
-
const changeHandler = (0,
|
|
1085
|
+
const changeHandler = (0, import_react20.useCallback)(
|
|
1052
1086
|
(evt) => {
|
|
1053
1087
|
onChange == null ? void 0 : onChange(evt);
|
|
1054
1088
|
setValue(evt.target.value);
|
|
1055
1089
|
},
|
|
1056
1090
|
[onChange]
|
|
1057
1091
|
);
|
|
1058
|
-
(0,
|
|
1092
|
+
(0, import_react20.useEffect)(() => {
|
|
1059
1093
|
setValue(_value || "");
|
|
1060
1094
|
}, [_value]);
|
|
1061
|
-
(0,
|
|
1095
|
+
(0, import_react20.useEffect)(() => {
|
|
1062
1096
|
onChangeValue == null ? void 0 : onChangeValue(value || "");
|
|
1063
1097
|
}, [value, onChangeValue]);
|
|
1064
|
-
return /* @__PURE__ */ (0,
|
|
1065
|
-
/* @__PURE__ */ (0,
|
|
1066
|
-
/* @__PURE__ */ (0,
|
|
1098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "auto-sizing-input wrapper", style: { width: width + 24 }, children: [
|
|
1099
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("input", __spreadValues({ onChange: changeHandler, ref, value }, rest)),
|
|
1100
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { "aria-hidden": "true", ref: span, children: value })
|
|
1067
1101
|
] });
|
|
1068
1102
|
}
|
|
1069
1103
|
);
|
|
@@ -1071,15 +1105,15 @@ AutoSizingInput.displayName = "AutoSizingInput";
|
|
|
1071
1105
|
|
|
1072
1106
|
// src/molecules/expand-table/index.tsx
|
|
1073
1107
|
var import_react_table2 = require("@tanstack/react-table");
|
|
1074
|
-
var
|
|
1108
|
+
var import_react22 = require("react");
|
|
1075
1109
|
|
|
1076
1110
|
// src/icons/down.tsx
|
|
1077
1111
|
var React9 = __toESM(require("react"), 1);
|
|
1078
|
-
var
|
|
1112
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1079
1113
|
var TriangleArrowDownIcon = React9.forwardRef(
|
|
1080
1114
|
(_a, forwardedRef) => {
|
|
1081
1115
|
var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
1082
|
-
return /* @__PURE__ */ (0,
|
|
1116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1083
1117
|
"svg",
|
|
1084
1118
|
__spreadProps(__spreadValues({
|
|
1085
1119
|
fill: "none",
|
|
@@ -1089,7 +1123,7 @@ var TriangleArrowDownIcon = React9.forwardRef(
|
|
|
1089
1123
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1090
1124
|
}, props), {
|
|
1091
1125
|
ref: forwardedRef,
|
|
1092
|
-
children: /* @__PURE__ */ (0,
|
|
1126
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1093
1127
|
"path",
|
|
1094
1128
|
{
|
|
1095
1129
|
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",
|
|
@@ -1104,11 +1138,11 @@ TriangleArrowDownIcon.displayName = "ArrowDownIcon";
|
|
|
1104
1138
|
|
|
1105
1139
|
// src/icons/up.tsx
|
|
1106
1140
|
var React10 = __toESM(require("react"), 1);
|
|
1107
|
-
var
|
|
1141
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1108
1142
|
var TriangleArrowUpIcon = React10.forwardRef(
|
|
1109
1143
|
(_a, forwardedRef) => {
|
|
1110
1144
|
var _b = _a, { color = "currentColor" } = _b, props = __objRest(_b, ["color"]);
|
|
1111
|
-
return /* @__PURE__ */ (0,
|
|
1145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1112
1146
|
"svg",
|
|
1113
1147
|
__spreadProps(__spreadValues({
|
|
1114
1148
|
fill: "none",
|
|
@@ -1118,7 +1152,7 @@ var TriangleArrowUpIcon = React10.forwardRef(
|
|
|
1118
1152
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1119
1153
|
}, props), {
|
|
1120
1154
|
ref: forwardedRef,
|
|
1121
|
-
children: /* @__PURE__ */ (0,
|
|
1155
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1122
1156
|
"path",
|
|
1123
1157
|
{
|
|
1124
1158
|
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",
|
|
@@ -1133,17 +1167,17 @@ TriangleArrowUpIcon.displayName = "ArrowUpIcon";
|
|
|
1133
1167
|
|
|
1134
1168
|
// src/molecules/expand-table/row.tsx
|
|
1135
1169
|
var import_react_table = require("@tanstack/react-table");
|
|
1136
|
-
var
|
|
1137
|
-
var
|
|
1170
|
+
var import_react21 = require("react");
|
|
1171
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1138
1172
|
function Row(props) {
|
|
1139
1173
|
const { row, ExpandComp, gridTemplateColumns, getRowStyle, getCellStyle } = props;
|
|
1140
|
-
const [open, setOpen] = (0,
|
|
1141
|
-
const onClickRow = (0,
|
|
1174
|
+
const [open, setOpen] = (0, import_react21.useState)(false);
|
|
1175
|
+
const onClickRow = (0, import_react21.useCallback)(() => {
|
|
1142
1176
|
var _a;
|
|
1143
1177
|
(_a = props.onRowClick) == null ? void 0 : _a.call(props, row.original);
|
|
1144
1178
|
setOpen((prev) => !prev);
|
|
1145
1179
|
}, [props, row.original]);
|
|
1146
|
-
const rowClassName = (0,
|
|
1180
|
+
const rowClassName = (0, import_react21.useMemo)(() => {
|
|
1147
1181
|
const baseCls = ["tr-wrapper"];
|
|
1148
1182
|
if (ExpandComp) {
|
|
1149
1183
|
baseCls.push("expandable");
|
|
@@ -1153,8 +1187,8 @@ function Row(props) {
|
|
|
1153
1187
|
}
|
|
1154
1188
|
return baseCls.join(" ");
|
|
1155
1189
|
}, [ExpandComp, props.onRowClick]);
|
|
1156
|
-
return /* @__PURE__ */ (0,
|
|
1157
|
-
/* @__PURE__ */ (0,
|
|
1190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: rowClassName, children: [
|
|
1191
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1158
1192
|
"button",
|
|
1159
1193
|
{
|
|
1160
1194
|
className: "tr",
|
|
@@ -1167,7 +1201,7 @@ function Row(props) {
|
|
|
1167
1201
|
var _a, _b, _c;
|
|
1168
1202
|
const autoSize = (_a = cell.column.columnDef.meta) == null ? void 0 : _a.autoSize;
|
|
1169
1203
|
const justifyContent = ((_b = cell.column.columnDef.meta) == null ? void 0 : _b.align) || props.defaultAlign;
|
|
1170
|
-
return /* @__PURE__ */ (0,
|
|
1204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1171
1205
|
"div",
|
|
1172
1206
|
{
|
|
1173
1207
|
className: "td",
|
|
@@ -1178,7 +1212,7 @@ function Row(props) {
|
|
|
1178
1212
|
}, (getCellStyle == null ? void 0 : getCellStyle(row.original)) || {}),
|
|
1179
1213
|
children: [
|
|
1180
1214
|
(0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()),
|
|
1181
|
-
((_c = cell.column.columnDef.meta) == null ? void 0 : _c.OpenBtn) ? /* @__PURE__ */ (0,
|
|
1215
|
+
((_c = cell.column.columnDef.meta) == null ? void 0 : _c.OpenBtn) ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1182
1216
|
cell.column.columnDef.meta.OpenBtn,
|
|
1183
1217
|
{
|
|
1184
1218
|
data: row.original,
|
|
@@ -1194,12 +1228,12 @@ function Row(props) {
|
|
|
1194
1228
|
},
|
|
1195
1229
|
`tr_${row.id}`
|
|
1196
1230
|
),
|
|
1197
|
-
ExpandComp ? /* @__PURE__ */ (0,
|
|
1231
|
+
ExpandComp ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Collapse, { open, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "expand-comp-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ExpandComp, { row }) }) }) : null
|
|
1198
1232
|
] }, `tr-wrapper_${row.id}`);
|
|
1199
1233
|
}
|
|
1200
1234
|
|
|
1201
1235
|
// src/molecules/expand-table/index.tsx
|
|
1202
|
-
var
|
|
1236
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1203
1237
|
function ExpandTable(props) {
|
|
1204
1238
|
const {
|
|
1205
1239
|
data,
|
|
@@ -1217,11 +1251,11 @@ function ExpandTable(props) {
|
|
|
1217
1251
|
getCellStyle
|
|
1218
1252
|
} = props;
|
|
1219
1253
|
const defaultAlign = "left";
|
|
1220
|
-
const [pagination, setPagination] = (0,
|
|
1254
|
+
const [pagination, setPagination] = (0, import_react22.useState)({
|
|
1221
1255
|
pageIndex: pageIndex || 0,
|
|
1222
1256
|
pageSize: pageSize || 9999
|
|
1223
1257
|
});
|
|
1224
|
-
const [sorting, setSorting] = (0,
|
|
1258
|
+
const [sorting, setSorting] = (0, import_react22.useState)([]);
|
|
1225
1259
|
const { getRowModel, getHeaderGroups, setPageIndex } = (0, import_react_table2.useReactTable)({
|
|
1226
1260
|
data: data || [],
|
|
1227
1261
|
columns,
|
|
@@ -1235,7 +1269,7 @@ function ExpandTable(props) {
|
|
|
1235
1269
|
getPaginationRowModel: (0, import_react_table2.getPaginationRowModel)(),
|
|
1236
1270
|
onPaginationChange: setPagination
|
|
1237
1271
|
});
|
|
1238
|
-
const gridTemplateColumns = (0,
|
|
1272
|
+
const gridTemplateColumns = (0, import_react22.useMemo)(() => {
|
|
1239
1273
|
return columns.map((col) => {
|
|
1240
1274
|
var _a;
|
|
1241
1275
|
if ((_a = col.meta) == null ? void 0 : _a.autoSize)
|
|
@@ -1244,16 +1278,16 @@ function ExpandTable(props) {
|
|
|
1244
1278
|
}).join(" ");
|
|
1245
1279
|
}, [columns]);
|
|
1246
1280
|
const rowModels = getRowModel();
|
|
1247
|
-
const onChangePagination = (0,
|
|
1281
|
+
const onChangePagination = (0, import_react22.useCallback)(
|
|
1248
1282
|
(page) => {
|
|
1249
1283
|
setPageIndex(page - 1);
|
|
1250
1284
|
},
|
|
1251
1285
|
[setPageIndex]
|
|
1252
1286
|
);
|
|
1253
|
-
const helpCompRender = (0,
|
|
1287
|
+
const helpCompRender = (0, import_react22.useCallback)(
|
|
1254
1288
|
(rowLength) => {
|
|
1255
1289
|
if (isLoading) {
|
|
1256
|
-
return /* @__PURE__ */ (0,
|
|
1290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1257
1291
|
import_themes19.Flex,
|
|
1258
1292
|
{
|
|
1259
1293
|
align: "center",
|
|
@@ -1261,24 +1295,24 @@ function ExpandTable(props) {
|
|
|
1261
1295
|
justify: "center",
|
|
1262
1296
|
p: "5",
|
|
1263
1297
|
width: "100%",
|
|
1264
|
-
children: /* @__PURE__ */ (0,
|
|
1298
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_themes49.Spinner, {})
|
|
1265
1299
|
}
|
|
1266
1300
|
);
|
|
1267
1301
|
}
|
|
1268
1302
|
if (rowLength === 0) {
|
|
1269
|
-
return /* @__PURE__ */ (0,
|
|
1303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "tr", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_themes19.Flex, { align: "center", justify: "center", children: placeholder || /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Typo, { color: "gray", mb: "6", mt: "6", variant: "body", children: "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4" }) }) }, "expand_placeholder");
|
|
1270
1304
|
}
|
|
1271
1305
|
return null;
|
|
1272
1306
|
},
|
|
1273
1307
|
[isLoading, placeholder]
|
|
1274
1308
|
);
|
|
1275
|
-
const pageCount = (0,
|
|
1309
|
+
const pageCount = (0, import_react22.useMemo)(() => {
|
|
1276
1310
|
if (!data)
|
|
1277
1311
|
return 0;
|
|
1278
1312
|
return Math.ceil(data.length / pageSize);
|
|
1279
1313
|
}, [data, pageSize]);
|
|
1280
|
-
return /* @__PURE__ */ (0,
|
|
1281
|
-
/* @__PURE__ */ (0,
|
|
1314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "expand-table", style: tableStyle, children: [
|
|
1315
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "thead", children: getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1282
1316
|
"div",
|
|
1283
1317
|
{
|
|
1284
1318
|
className: "tr",
|
|
@@ -1288,30 +1322,30 @@ function ExpandTable(props) {
|
|
|
1288
1322
|
const sortable = header.column.getCanSort();
|
|
1289
1323
|
const sortedState = header.column.getIsSorted();
|
|
1290
1324
|
const justifyContent = ((_a = header.column.columnDef.meta) == null ? void 0 : _a.align) || defaultAlign;
|
|
1291
|
-
return /* @__PURE__ */ (0,
|
|
1325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: `${justifyContent} th`, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1292
1326
|
"button",
|
|
1293
1327
|
{
|
|
1294
1328
|
onClick: header.column.getToggleSortingHandler(),
|
|
1295
1329
|
style: sortable ? { cursor: "pointer" } : { cursor: "default" },
|
|
1296
1330
|
type: "button",
|
|
1297
1331
|
children: [
|
|
1298
|
-
/* @__PURE__ */ (0,
|
|
1332
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Typo, { as: "div", variant: "body", children: (0, import_react_table2.flexRender)(
|
|
1299
1333
|
header.column.columnDef.header,
|
|
1300
1334
|
header.getContext()
|
|
1301
1335
|
) }),
|
|
1302
|
-
sortable ? /* @__PURE__ */ (0,
|
|
1336
|
+
sortable ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1303
1337
|
import_themes19.Flex,
|
|
1304
1338
|
{
|
|
1305
1339
|
direction: "column",
|
|
1306
1340
|
style: { marginLeft: "var(--space-2)" },
|
|
1307
1341
|
children: [
|
|
1308
|
-
/* @__PURE__ */ (0,
|
|
1342
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1309
1343
|
TriangleArrowUpIcon,
|
|
1310
1344
|
{
|
|
1311
1345
|
color: sortedState === "asc" ? "var(--iris-10)" : "var(--iris-6)"
|
|
1312
1346
|
}
|
|
1313
1347
|
),
|
|
1314
|
-
/* @__PURE__ */ (0,
|
|
1348
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1315
1349
|
TriangleArrowDownIcon,
|
|
1316
1350
|
{
|
|
1317
1351
|
color: sortedState === "desc" ? "var(--iris-10)" : "var(--iris-6)"
|
|
@@ -1327,8 +1361,8 @@ function ExpandTable(props) {
|
|
|
1327
1361
|
},
|
|
1328
1362
|
headerGroup.id
|
|
1329
1363
|
)) }),
|
|
1330
|
-
/* @__PURE__ */ (0,
|
|
1331
|
-
return /* @__PURE__ */ (0,
|
|
1364
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "tbody", children: helpCompRender(rowModels.rows.length) || rowModels.rows.map((row) => {
|
|
1365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1332
1366
|
Row,
|
|
1333
1367
|
{
|
|
1334
1368
|
ExpandComp,
|
|
@@ -1342,7 +1376,7 @@ function ExpandTable(props) {
|
|
|
1342
1376
|
`row_${row.id}`
|
|
1343
1377
|
);
|
|
1344
1378
|
}) }),
|
|
1345
|
-
showPagination ? /* @__PURE__ */ (0,
|
|
1379
|
+
showPagination ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_themes19.Flex, { justify: "end", pt: "3", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1346
1380
|
Pagination,
|
|
1347
1381
|
{
|
|
1348
1382
|
count: pageCount,
|
|
@@ -1355,14 +1389,14 @@ function ExpandTable(props) {
|
|
|
1355
1389
|
}
|
|
1356
1390
|
|
|
1357
1391
|
// src/molecules/navigation.tsx
|
|
1358
|
-
var
|
|
1392
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1359
1393
|
function Navigation({
|
|
1360
1394
|
items,
|
|
1361
1395
|
fontColor,
|
|
1362
1396
|
backgroundColor,
|
|
1363
1397
|
activeKey
|
|
1364
1398
|
}) {
|
|
1365
|
-
return /* @__PURE__ */ (0,
|
|
1399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1366
1400
|
import_themes19.Flex,
|
|
1367
1401
|
{
|
|
1368
1402
|
direction: "column",
|
|
@@ -1374,13 +1408,13 @@ function Navigation({
|
|
|
1374
1408
|
},
|
|
1375
1409
|
children: items == null ? void 0 : items.map((item) => {
|
|
1376
1410
|
const { key, title, icon, itemRender, onClick, children } = item;
|
|
1377
|
-
return /* @__PURE__ */ (0,
|
|
1378
|
-
itemRender ? itemRender(item) : /* @__PURE__ */ (0,
|
|
1411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_themes19.Flex, { direction: "column", onClick, children: [
|
|
1412
|
+
itemRender ? itemRender(item) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_themes19.Flex, { align: "center", gap: "3", height: "36px", pl: "4", pr: "4", children: [
|
|
1379
1413
|
icon,
|
|
1380
|
-
/* @__PURE__ */ (0,
|
|
1414
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Typo, { variant: "subtitle", children: title })
|
|
1381
1415
|
] }),
|
|
1382
1416
|
children == null ? void 0 : children.map((menu) => {
|
|
1383
|
-
return menu.itemRender ? menu.itemRender(menu) : /* @__PURE__ */ (0,
|
|
1417
|
+
return menu.itemRender ? menu.itemRender(menu) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1384
1418
|
Button,
|
|
1385
1419
|
{
|
|
1386
1420
|
className: `tipp-navigation-button ${activeKey === menu.key ? "active" : ""}`,
|
|
@@ -1404,18 +1438,18 @@ function Navigation({
|
|
|
1404
1438
|
}
|
|
1405
1439
|
|
|
1406
1440
|
// src/molecules/date-picker/index.tsx
|
|
1407
|
-
var
|
|
1441
|
+
var import_react23 = require("react");
|
|
1408
1442
|
var RDP = __toESM(require("react-datepicker"), 1);
|
|
1409
1443
|
var import_react_datepicker = require("react-datepicker");
|
|
1410
1444
|
var import_locale = require("date-fns/locale");
|
|
1411
|
-
var
|
|
1445
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1412
1446
|
(0, import_react_datepicker.registerLocale)("ko", import_locale.ko);
|
|
1413
1447
|
(0, import_react_datepicker.setDefaultLocale)("ko");
|
|
1414
1448
|
var ReactDatePicker = RDP.default.default || RDP.default || RDP;
|
|
1415
|
-
var DatePicker = (0,
|
|
1449
|
+
var DatePicker = (0, import_react23.forwardRef)(
|
|
1416
1450
|
(props, ref) => {
|
|
1417
1451
|
const _a = props, { size = "medium" } = _a, rest = __objRest(_a, ["size"]);
|
|
1418
|
-
return /* @__PURE__ */ (0,
|
|
1452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1419
1453
|
ReactDatePicker,
|
|
1420
1454
|
__spreadProps(__spreadValues({
|
|
1421
1455
|
dateFormat: "YYYY/MM/dd",
|
|
@@ -1445,51 +1479,51 @@ var renderCustomHeader = (props) => {
|
|
|
1445
1479
|
} = props;
|
|
1446
1480
|
const year = date.getFullYear();
|
|
1447
1481
|
const month = date.getMonth();
|
|
1448
|
-
return /* @__PURE__ */ (0,
|
|
1449
|
-
/* @__PURE__ */ (0,
|
|
1482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_themes19.Flex, { align: "center", justify: "between", pb: "2", pl: "2", pr: "2", children: [
|
|
1483
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1450
1484
|
import_themes24.IconButton,
|
|
1451
1485
|
{
|
|
1452
1486
|
disabled: prevMonthButtonDisabled,
|
|
1453
1487
|
onClick: decreaseMonth,
|
|
1454
1488
|
variant: "ghost",
|
|
1455
|
-
children: /* @__PURE__ */ (0,
|
|
1489
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_icons2.ChevronLeftIcon, {})
|
|
1456
1490
|
}
|
|
1457
1491
|
),
|
|
1458
|
-
/* @__PURE__ */ (0,
|
|
1459
|
-
/* @__PURE__ */ (0,
|
|
1492
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_themes19.Flex, { gap: "3", children: [
|
|
1493
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Heading2, { variant: "heading4", weight: "regular", children: [
|
|
1460
1494
|
year,
|
|
1461
1495
|
"\uB144"
|
|
1462
1496
|
] }),
|
|
1463
|
-
/* @__PURE__ */ (0,
|
|
1497
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Heading2, { variant: "heading4", weight: "regular", children: [
|
|
1464
1498
|
month + 1,
|
|
1465
1499
|
"\uC6D4"
|
|
1466
1500
|
] })
|
|
1467
1501
|
] }),
|
|
1468
|
-
/* @__PURE__ */ (0,
|
|
1502
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1469
1503
|
import_themes24.IconButton,
|
|
1470
1504
|
{
|
|
1471
1505
|
disabled: nextMonthButtonDisabled,
|
|
1472
1506
|
onClick: increaseMonth,
|
|
1473
1507
|
variant: "ghost",
|
|
1474
|
-
children: /* @__PURE__ */ (0,
|
|
1508
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_icons2.ChevronRightIcon, {})
|
|
1475
1509
|
}
|
|
1476
1510
|
)
|
|
1477
1511
|
] });
|
|
1478
1512
|
};
|
|
1479
1513
|
|
|
1480
1514
|
// src/molecules/dot-navigation.tsx
|
|
1481
|
-
var
|
|
1515
|
+
var import_react24 = require("react");
|
|
1482
1516
|
var import_react_icons5 = require("@radix-ui/react-icons");
|
|
1483
|
-
var
|
|
1517
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1484
1518
|
function DotNavigation(props) {
|
|
1485
1519
|
const { dotCount, onClick, dotIndex, defaultDotIndex, onChangeDotIndex } = props;
|
|
1486
|
-
const [currentDot, setCurrentDot] = (0,
|
|
1520
|
+
const [currentDot, setCurrentDot] = (0, import_react24.useState)(
|
|
1487
1521
|
() => {
|
|
1488
1522
|
var _a;
|
|
1489
1523
|
return (_a = defaultDotIndex != null ? defaultDotIndex : dotIndex) != null ? _a : 0;
|
|
1490
1524
|
}
|
|
1491
1525
|
);
|
|
1492
|
-
const onClickDot = (0,
|
|
1526
|
+
const onClickDot = (0, import_react24.useCallback)(
|
|
1493
1527
|
(i) => {
|
|
1494
1528
|
if (onClick) {
|
|
1495
1529
|
onClick(i);
|
|
@@ -1499,17 +1533,17 @@ function DotNavigation(props) {
|
|
|
1499
1533
|
},
|
|
1500
1534
|
[onClick]
|
|
1501
1535
|
);
|
|
1502
|
-
(0,
|
|
1536
|
+
(0, import_react24.useEffect)(() => {
|
|
1503
1537
|
onChangeDotIndex == null ? void 0 : onChangeDotIndex(currentDot);
|
|
1504
1538
|
}, [currentDot, onChangeDotIndex]);
|
|
1505
|
-
(0,
|
|
1539
|
+
(0, import_react24.useEffect)(() => {
|
|
1506
1540
|
if (typeof dotIndex === "undefined")
|
|
1507
1541
|
return;
|
|
1508
1542
|
setCurrentDot(dotIndex);
|
|
1509
1543
|
}, [dotIndex]);
|
|
1510
|
-
return /* @__PURE__ */ (0,
|
|
1544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_themes19.Flex, { children: dotCount ? Array.from({ length: dotCount }, (_, i) => i).map((_, index) => {
|
|
1511
1545
|
const isSelected = currentDot === index;
|
|
1512
|
-
return /* @__PURE__ */ (0,
|
|
1546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1513
1547
|
import_react_icons5.DotFilledIcon,
|
|
1514
1548
|
{
|
|
1515
1549
|
height: "24px",
|
|
@@ -1528,15 +1562,15 @@ function DotNavigation(props) {
|
|
|
1528
1562
|
}
|
|
1529
1563
|
|
|
1530
1564
|
// src/molecules/stepper.tsx
|
|
1531
|
-
var
|
|
1565
|
+
var import_react25 = require("react");
|
|
1532
1566
|
var import_themes50 = require("@radix-ui/themes");
|
|
1533
|
-
var
|
|
1534
|
-
var StepContext = (0,
|
|
1567
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1568
|
+
var StepContext = (0, import_react25.createContext)({
|
|
1535
1569
|
active: false,
|
|
1536
1570
|
completed: false,
|
|
1537
1571
|
index: 0
|
|
1538
1572
|
});
|
|
1539
|
-
function
|
|
1573
|
+
function Root8(props) {
|
|
1540
1574
|
const {
|
|
1541
1575
|
activeStep = 0,
|
|
1542
1576
|
children,
|
|
@@ -1545,7 +1579,7 @@ function Root7(props) {
|
|
|
1545
1579
|
maxWidth,
|
|
1546
1580
|
direction = "vertical"
|
|
1547
1581
|
} = props;
|
|
1548
|
-
return /* @__PURE__ */ (0,
|
|
1582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1549
1583
|
import_themes19.Flex,
|
|
1550
1584
|
{
|
|
1551
1585
|
gap: "3",
|
|
@@ -1554,8 +1588,8 @@ function Root7(props) {
|
|
|
1554
1588
|
minWidth,
|
|
1555
1589
|
maxWidth
|
|
1556
1590
|
},
|
|
1557
|
-
children:
|
|
1558
|
-
return /* @__PURE__ */ (0,
|
|
1591
|
+
children: import_react25.Children.map(children, (child, index) => {
|
|
1592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1559
1593
|
StepContext.Provider,
|
|
1560
1594
|
{
|
|
1561
1595
|
value: {
|
|
@@ -1578,8 +1612,8 @@ function Step(props) {
|
|
|
1578
1612
|
completed,
|
|
1579
1613
|
index,
|
|
1580
1614
|
direction = "vertical"
|
|
1581
|
-
} = (0,
|
|
1582
|
-
const connector = index > 0 ? /* @__PURE__ */ (0,
|
|
1615
|
+
} = (0, import_react25.useContext)(StepContext);
|
|
1616
|
+
const connector = index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1583
1617
|
import_themes50.Separator,
|
|
1584
1618
|
{
|
|
1585
1619
|
style: {
|
|
@@ -1590,7 +1624,7 @@ function Step(props) {
|
|
|
1590
1624
|
}
|
|
1591
1625
|
}
|
|
1592
1626
|
) : null;
|
|
1593
|
-
const InnerStep = (0,
|
|
1627
|
+
const InnerStep = (0, import_react25.useMemo)(() => {
|
|
1594
1628
|
if (active) {
|
|
1595
1629
|
return ActiveStep;
|
|
1596
1630
|
}
|
|
@@ -1599,7 +1633,7 @@ function Step(props) {
|
|
|
1599
1633
|
}
|
|
1600
1634
|
return IncompleteStep;
|
|
1601
1635
|
}, [completed, active]);
|
|
1602
|
-
return /* @__PURE__ */ (0,
|
|
1636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1603
1637
|
import_themes19.Flex,
|
|
1604
1638
|
{
|
|
1605
1639
|
align: "center",
|
|
@@ -1609,22 +1643,22 @@ function Step(props) {
|
|
|
1609
1643
|
style: { flex: 1 },
|
|
1610
1644
|
children: [
|
|
1611
1645
|
connector,
|
|
1612
|
-
/* @__PURE__ */ (0,
|
|
1646
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(InnerStep, { Icon, children })
|
|
1613
1647
|
]
|
|
1614
1648
|
}
|
|
1615
1649
|
);
|
|
1616
1650
|
}
|
|
1617
1651
|
function CompleteStep(props) {
|
|
1618
1652
|
const { Icon, children } = props;
|
|
1619
|
-
const { completed, active } = (0,
|
|
1653
|
+
const { completed, active } = (0, import_react25.useContext)(StepContext);
|
|
1620
1654
|
const background = "var(--accent-a4)";
|
|
1621
1655
|
const border = "1px solid var(--accent-7)";
|
|
1622
1656
|
const color = "var(--accent-contrast)";
|
|
1623
|
-
return /* @__PURE__ */ (0,
|
|
1624
|
-
Icon ? /* @__PURE__ */ (0,
|
|
1657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
1658
|
+
Icon ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { active, completed }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1625
1659
|
Avatar,
|
|
1626
1660
|
{
|
|
1627
|
-
fallback: /* @__PURE__ */ (0,
|
|
1661
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_icons2.CheckIcon, { fill: color, height: 16, width: 16 }),
|
|
1628
1662
|
radius: "full",
|
|
1629
1663
|
size: "medium",
|
|
1630
1664
|
style: {
|
|
@@ -1633,19 +1667,19 @@ function CompleteStep(props) {
|
|
|
1633
1667
|
}
|
|
1634
1668
|
}
|
|
1635
1669
|
),
|
|
1636
|
-
/* @__PURE__ */ (0,
|
|
1670
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Typo, { align: "center", variant: "caption", children })
|
|
1637
1671
|
] });
|
|
1638
1672
|
}
|
|
1639
1673
|
function IncompleteStep(props) {
|
|
1640
1674
|
const { Icon, children } = props;
|
|
1641
|
-
const { completed, active, index } = (0,
|
|
1675
|
+
const { completed, active, index } = (0, import_react25.useContext)(StepContext);
|
|
1642
1676
|
const background = "var(--gray-5)";
|
|
1643
1677
|
const color = "var(--gray-a11)";
|
|
1644
|
-
return /* @__PURE__ */ (0,
|
|
1645
|
-
Icon ? /* @__PURE__ */ (0,
|
|
1678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
1679
|
+
Icon ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { active, completed }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1646
1680
|
Avatar,
|
|
1647
1681
|
{
|
|
1648
|
-
fallback: /* @__PURE__ */ (0,
|
|
1682
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Typo, { style: { color }, children: index + 1 }),
|
|
1649
1683
|
radius: "full",
|
|
1650
1684
|
size: "medium",
|
|
1651
1685
|
style: {
|
|
@@ -1653,36 +1687,36 @@ function IncompleteStep(props) {
|
|
|
1653
1687
|
}
|
|
1654
1688
|
}
|
|
1655
1689
|
),
|
|
1656
|
-
/* @__PURE__ */ (0,
|
|
1690
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Typo, { align: "center", style: { color }, variant: "caption", children })
|
|
1657
1691
|
] });
|
|
1658
1692
|
}
|
|
1659
1693
|
function ActiveStep(props) {
|
|
1660
1694
|
const { Icon, children } = props;
|
|
1661
|
-
const { completed, active, index } = (0,
|
|
1695
|
+
const { completed, active, index } = (0, import_react25.useContext)(StepContext);
|
|
1662
1696
|
const background = "var(--accent-10)";
|
|
1663
1697
|
const color = "var(--accent-contrast)";
|
|
1664
|
-
return /* @__PURE__ */ (0,
|
|
1665
|
-
Icon ? /* @__PURE__ */ (0,
|
|
1698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
1699
|
+
Icon ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { active, completed }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1666
1700
|
Avatar,
|
|
1667
1701
|
{
|
|
1668
|
-
fallback: /* @__PURE__ */ (0,
|
|
1702
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Typo, { style: { color }, weight: "bold", children: index + 1 }),
|
|
1669
1703
|
radius: "full",
|
|
1670
1704
|
size: "medium",
|
|
1671
1705
|
style: { background }
|
|
1672
1706
|
}
|
|
1673
1707
|
),
|
|
1674
|
-
/* @__PURE__ */ (0,
|
|
1708
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Typo, { align: "center", variant: "caption", weight: "bold", children })
|
|
1675
1709
|
] });
|
|
1676
1710
|
}
|
|
1677
1711
|
var Stepper = {
|
|
1678
|
-
Root:
|
|
1712
|
+
Root: Root8,
|
|
1679
1713
|
Step
|
|
1680
1714
|
};
|
|
1681
1715
|
|
|
1682
1716
|
// src/molecules/tag-selector.tsx
|
|
1683
|
-
var
|
|
1717
|
+
var import_react26 = require("react");
|
|
1684
1718
|
var import_react_icons6 = require("@radix-ui/react-icons");
|
|
1685
|
-
var
|
|
1719
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1686
1720
|
var OPTION_HEIGHT = 32;
|
|
1687
1721
|
var DefaultDropdownContainer = (props) => {
|
|
1688
1722
|
return props.children;
|
|
@@ -1697,20 +1731,20 @@ function TagSelector(props) {
|
|
|
1697
1731
|
onChange,
|
|
1698
1732
|
size = "medium"
|
|
1699
1733
|
} = props;
|
|
1700
|
-
const [selected, setSelected] = (0,
|
|
1701
|
-
const [value, setValue] = (0,
|
|
1702
|
-
const [focusIndex, setFocusIndex] = (0,
|
|
1703
|
-
const [open, setOpen] = (0,
|
|
1704
|
-
const [focus, setFocus] = (0,
|
|
1705
|
-
const fieldRef = (0,
|
|
1706
|
-
const scrollRef = (0,
|
|
1707
|
-
const closeRef = (0,
|
|
1708
|
-
const onFocus = (0,
|
|
1734
|
+
const [selected, setSelected] = (0, import_react26.useState)(props.selected || []);
|
|
1735
|
+
const [value, setValue] = (0, import_react26.useState)("");
|
|
1736
|
+
const [focusIndex, setFocusIndex] = (0, import_react26.useState)(null);
|
|
1737
|
+
const [open, setOpen] = (0, import_react26.useState)(false);
|
|
1738
|
+
const [focus, setFocus] = (0, import_react26.useState)(false);
|
|
1739
|
+
const fieldRef = (0, import_react26.useRef)(null);
|
|
1740
|
+
const scrollRef = (0, import_react26.useRef)(null);
|
|
1741
|
+
const closeRef = (0, import_react26.useRef)();
|
|
1742
|
+
const onFocus = (0, import_react26.useCallback)(() => {
|
|
1709
1743
|
clearTimeout(closeRef.current);
|
|
1710
1744
|
setFocus(true);
|
|
1711
1745
|
setOpen(true);
|
|
1712
1746
|
}, []);
|
|
1713
|
-
const onBlur = (0,
|
|
1747
|
+
const onBlur = (0, import_react26.useCallback)(() => {
|
|
1714
1748
|
closeRef.current = setTimeout(() => {
|
|
1715
1749
|
setFocus(false);
|
|
1716
1750
|
setOpen(false);
|
|
@@ -1719,18 +1753,18 @@ function TagSelector(props) {
|
|
|
1719
1753
|
}, 100);
|
|
1720
1754
|
}, 300);
|
|
1721
1755
|
}, []);
|
|
1722
|
-
const onChangeValue = (0,
|
|
1756
|
+
const onChangeValue = (0, import_react26.useCallback)(
|
|
1723
1757
|
(e) => {
|
|
1724
1758
|
setValue(e.target.value);
|
|
1725
1759
|
},
|
|
1726
1760
|
[]
|
|
1727
1761
|
);
|
|
1728
|
-
const filteredOptions = (0,
|
|
1762
|
+
const filteredOptions = (0, import_react26.useMemo)(() => {
|
|
1729
1763
|
return options.filter((option) => {
|
|
1730
1764
|
return option.name.includes(value);
|
|
1731
1765
|
});
|
|
1732
1766
|
}, [options, value]);
|
|
1733
|
-
const selectedItem = (0,
|
|
1767
|
+
const selectedItem = (0, import_react26.useMemo)(() => {
|
|
1734
1768
|
const result = [];
|
|
1735
1769
|
selected.forEach((id) => {
|
|
1736
1770
|
const maybeItem = options.find((option) => option.id === id);
|
|
@@ -1739,10 +1773,10 @@ function TagSelector(props) {
|
|
|
1739
1773
|
});
|
|
1740
1774
|
return result;
|
|
1741
1775
|
}, [options, selected]);
|
|
1742
|
-
const onDelete = (0,
|
|
1776
|
+
const onDelete = (0, import_react26.useCallback)((id) => {
|
|
1743
1777
|
setSelected((prev) => prev.filter((el) => el !== id));
|
|
1744
1778
|
}, []);
|
|
1745
|
-
const onSelect = (0,
|
|
1779
|
+
const onSelect = (0, import_react26.useCallback)(
|
|
1746
1780
|
(id) => {
|
|
1747
1781
|
if (maxCount && selected.length + 1 > maxCount)
|
|
1748
1782
|
return;
|
|
@@ -1750,7 +1784,7 @@ function TagSelector(props) {
|
|
|
1750
1784
|
},
|
|
1751
1785
|
[maxCount, selected]
|
|
1752
1786
|
);
|
|
1753
|
-
const toggleItem = (0,
|
|
1787
|
+
const toggleItem = (0, import_react26.useCallback)(
|
|
1754
1788
|
(id) => {
|
|
1755
1789
|
if (selected.includes(id)) {
|
|
1756
1790
|
onDelete(id);
|
|
@@ -1760,7 +1794,7 @@ function TagSelector(props) {
|
|
|
1760
1794
|
},
|
|
1761
1795
|
[onDelete, onSelect, selected]
|
|
1762
1796
|
);
|
|
1763
|
-
const setScroll = (0,
|
|
1797
|
+
const setScroll = (0, import_react26.useCallback)((index) => {
|
|
1764
1798
|
if (scrollRef.current) {
|
|
1765
1799
|
const scrollTop = scrollRef.current.scrollTop;
|
|
1766
1800
|
const clientHeight = scrollRef.current.clientHeight;
|
|
@@ -1772,7 +1806,7 @@ function TagSelector(props) {
|
|
|
1772
1806
|
}
|
|
1773
1807
|
}
|
|
1774
1808
|
}, []);
|
|
1775
|
-
const handleKeyDown = (0,
|
|
1809
|
+
const handleKeyDown = (0, import_react26.useCallback)(
|
|
1776
1810
|
(e) => {
|
|
1777
1811
|
var _a;
|
|
1778
1812
|
const key = e.key;
|
|
@@ -1822,7 +1856,7 @@ function TagSelector(props) {
|
|
|
1822
1856
|
filteredOptions
|
|
1823
1857
|
]
|
|
1824
1858
|
);
|
|
1825
|
-
const placeholderVisible = (0,
|
|
1859
|
+
const placeholderVisible = (0, import_react26.useMemo)(() => {
|
|
1826
1860
|
if (selectedItem.length)
|
|
1827
1861
|
return false;
|
|
1828
1862
|
if (value)
|
|
@@ -1831,19 +1865,19 @@ function TagSelector(props) {
|
|
|
1831
1865
|
return false;
|
|
1832
1866
|
return true;
|
|
1833
1867
|
}, [focus, selectedItem.length, value]);
|
|
1834
|
-
(0,
|
|
1868
|
+
(0, import_react26.useEffect)(() => {
|
|
1835
1869
|
onChange == null ? void 0 : onChange(selected);
|
|
1836
1870
|
}, [[...selected].sort().join(",")]);
|
|
1837
|
-
(0,
|
|
1871
|
+
(0, import_react26.useEffect)(() => {
|
|
1838
1872
|
setSelected(props.selected || []);
|
|
1839
1873
|
}, [[...props.selected || []].sort().join(",")]);
|
|
1840
|
-
(0,
|
|
1874
|
+
(0, import_react26.useEffect)(() => {
|
|
1841
1875
|
setFocusIndex(null);
|
|
1842
1876
|
}, [open]);
|
|
1843
|
-
(0,
|
|
1877
|
+
(0, import_react26.useEffect)(() => {
|
|
1844
1878
|
setFocusIndex(0);
|
|
1845
1879
|
}, [filteredOptions]);
|
|
1846
|
-
const badgeSize = (0,
|
|
1880
|
+
const badgeSize = (0, import_react26.useMemo)(() => {
|
|
1847
1881
|
switch (size) {
|
|
1848
1882
|
case "large":
|
|
1849
1883
|
return "large";
|
|
@@ -1853,7 +1887,7 @@ function TagSelector(props) {
|
|
|
1853
1887
|
return "small";
|
|
1854
1888
|
}
|
|
1855
1889
|
}, [size]);
|
|
1856
|
-
const placeholderVariant = (0,
|
|
1890
|
+
const placeholderVariant = (0, import_react26.useMemo)(() => {
|
|
1857
1891
|
switch (size) {
|
|
1858
1892
|
case "large":
|
|
1859
1893
|
return "subtitle";
|
|
@@ -1862,8 +1896,8 @@ function TagSelector(props) {
|
|
|
1862
1896
|
return "body";
|
|
1863
1897
|
}
|
|
1864
1898
|
}, [size]);
|
|
1865
|
-
return /* @__PURE__ */ (0,
|
|
1866
|
-
/* @__PURE__ */ (0,
|
|
1899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_themes29.Popover.Root, { open: Boolean(filteredOptions.length) && open, children: [
|
|
1900
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_themes29.Popover.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1867
1901
|
import_themes20.Grid,
|
|
1868
1902
|
{
|
|
1869
1903
|
align: "center",
|
|
@@ -1875,7 +1909,7 @@ function TagSelector(props) {
|
|
|
1875
1909
|
return (_a = fieldRef.current) == null ? void 0 : _a.focus();
|
|
1876
1910
|
},
|
|
1877
1911
|
children: [
|
|
1878
|
-
/* @__PURE__ */ (0,
|
|
1912
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1879
1913
|
import_themes19.Flex,
|
|
1880
1914
|
{
|
|
1881
1915
|
align: "center",
|
|
@@ -1885,22 +1919,22 @@ function TagSelector(props) {
|
|
|
1885
1919
|
wrap: "wrap",
|
|
1886
1920
|
children: [
|
|
1887
1921
|
selectedItem.map((item) => {
|
|
1888
|
-
return tagRender ? tagRender(item) : /* @__PURE__ */ (0,
|
|
1922
|
+
return tagRender ? tagRender(item) : /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Badge, { size: badgeSize, children: [
|
|
1889
1923
|
item.name,
|
|
1890
|
-
/* @__PURE__ */ (0,
|
|
1924
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1891
1925
|
Button,
|
|
1892
1926
|
{
|
|
1893
1927
|
onClick: () => {
|
|
1894
1928
|
onDelete(item.id);
|
|
1895
1929
|
},
|
|
1896
1930
|
variant: "transparent",
|
|
1897
|
-
children: /* @__PURE__ */ (0,
|
|
1931
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_icons6.Cross1Icon, {})
|
|
1898
1932
|
}
|
|
1899
1933
|
)
|
|
1900
1934
|
] }, item.id);
|
|
1901
1935
|
}),
|
|
1902
|
-
placeholderVisible ? /* @__PURE__ */ (0,
|
|
1903
|
-
/* @__PURE__ */ (0,
|
|
1936
|
+
placeholderVisible ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Typo, { color: "gray", variant: placeholderVariant, children: placeholder }) : null,
|
|
1937
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1904
1938
|
AutoSizingInput,
|
|
1905
1939
|
{
|
|
1906
1940
|
onBlur,
|
|
@@ -1914,34 +1948,34 @@ function TagSelector(props) {
|
|
|
1914
1948
|
]
|
|
1915
1949
|
}
|
|
1916
1950
|
),
|
|
1917
|
-
focus ? /* @__PURE__ */ (0,
|
|
1951
|
+
focus ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_icons6.MagnifyingGlassIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_icons6.ChevronRightIcon, {})
|
|
1918
1952
|
]
|
|
1919
1953
|
}
|
|
1920
1954
|
) }),
|
|
1921
|
-
/* @__PURE__ */ (0,
|
|
1955
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1922
1956
|
import_themes29.Popover.Content,
|
|
1923
1957
|
{
|
|
1924
1958
|
onOpenAutoFocus: (e) => {
|
|
1925
1959
|
e.preventDefault();
|
|
1926
1960
|
},
|
|
1927
|
-
children: /* @__PURE__ */ (0,
|
|
1961
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1928
1962
|
DropdownContainer,
|
|
1929
1963
|
{
|
|
1930
1964
|
currentItem: filteredOptions[focusIndex || 0],
|
|
1931
1965
|
items: filteredOptions,
|
|
1932
|
-
children: /* @__PURE__ */ (0,
|
|
1966
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1933
1967
|
import_themes35.ScrollArea,
|
|
1934
1968
|
{
|
|
1935
1969
|
ref: scrollRef,
|
|
1936
1970
|
scrollbars: "vertical",
|
|
1937
1971
|
style: { height: OPTION_HEIGHT * 8 },
|
|
1938
1972
|
type: "auto",
|
|
1939
|
-
children: /* @__PURE__ */ (0,
|
|
1973
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_themes19.Flex, { direction: "column", children: filteredOptions.map((item, i) => {
|
|
1940
1974
|
const isSelected = Boolean(
|
|
1941
1975
|
selected.find((el) => el === item.id)
|
|
1942
1976
|
);
|
|
1943
1977
|
const isFocus = i === focusIndex;
|
|
1944
|
-
return /* @__PURE__ */ (0,
|
|
1978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1945
1979
|
Button,
|
|
1946
1980
|
{
|
|
1947
1981
|
onClick: () => {
|
|
@@ -1960,9 +1994,9 @@ function TagSelector(props) {
|
|
|
1960
1994
|
boxShadow: "none"
|
|
1961
1995
|
},
|
|
1962
1996
|
variant: isSelected ? "soft" : "outline",
|
|
1963
|
-
children: /* @__PURE__ */ (0,
|
|
1997
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_themes19.Flex, { justify: "between", width: "100%", children: [
|
|
1964
1998
|
item.name,
|
|
1965
|
-
isSelected ? /* @__PURE__ */ (0,
|
|
1999
|
+
isSelected ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_icons2.CheckIcon, {}) : null
|
|
1966
2000
|
] })
|
|
1967
2001
|
},
|
|
1968
2002
|
item.id
|
|
@@ -1979,13 +2013,13 @@ function TagSelector(props) {
|
|
|
1979
2013
|
|
|
1980
2014
|
// src/theme/theme-provider.tsx
|
|
1981
2015
|
var import_themes51 = require("@radix-ui/themes");
|
|
1982
|
-
var
|
|
2016
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1983
2017
|
function ThemeProvider(props) {
|
|
1984
|
-
return /* @__PURE__ */ (0,
|
|
2018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_themes51.Theme, __spreadValues({ accentColor: "iris", radius: "medium" }, props));
|
|
1985
2019
|
}
|
|
1986
2020
|
|
|
1987
2021
|
// src/molecules/learning-post.tsx
|
|
1988
|
-
var
|
|
2022
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1989
2023
|
function LearningPost(props) {
|
|
1990
2024
|
const {
|
|
1991
2025
|
defaultThemeProps,
|
|
@@ -1997,13 +2031,13 @@ function LearningPost(props) {
|
|
|
1997
2031
|
onPageBack,
|
|
1998
2032
|
children
|
|
1999
2033
|
} = props;
|
|
2000
|
-
return /* @__PURE__ */ (0,
|
|
2034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2001
2035
|
ThemeProvider,
|
|
2002
2036
|
__spreadProps(__spreadValues({}, defaultThemeProps), {
|
|
2003
2037
|
accentColor: "iris",
|
|
2004
2038
|
scaling: "110%",
|
|
2005
2039
|
style: {},
|
|
2006
|
-
children: html ? /* @__PURE__ */ (0,
|
|
2040
|
+
children: html ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2007
2041
|
import_themes20.Grid,
|
|
2008
2042
|
{
|
|
2009
2043
|
columns: { initial: "1", md: "130px 1fr 130px" },
|
|
@@ -2015,8 +2049,8 @@ function LearningPost(props) {
|
|
|
2015
2049
|
px: "4",
|
|
2016
2050
|
width: "100%",
|
|
2017
2051
|
children: [
|
|
2018
|
-
/* @__PURE__ */ (0,
|
|
2019
|
-
/* @__PURE__ */ (0,
|
|
2052
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", {}),
|
|
2053
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2020
2054
|
import_themes19.Flex,
|
|
2021
2055
|
{
|
|
2022
2056
|
align: "center",
|
|
@@ -2026,15 +2060,15 @@ function LearningPost(props) {
|
|
|
2026
2060
|
overflow: "hidden",
|
|
2027
2061
|
width: "100%",
|
|
2028
2062
|
children: [
|
|
2029
|
-
/* @__PURE__ */ (0,
|
|
2030
|
-
/* @__PURE__ */ (0,
|
|
2063
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_themes20.Grid, { align: "start", columns: { initial: "1", sm: "2" }, gap: "2", children: [
|
|
2064
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2031
2065
|
import_themes20.Grid,
|
|
2032
2066
|
{
|
|
2033
2067
|
gap: "3",
|
|
2034
2068
|
mb: { initial: "4", sm: "0" },
|
|
2035
2069
|
style: { alignSelf: "flex-start" },
|
|
2036
2070
|
children: [
|
|
2037
|
-
/* @__PURE__ */ (0,
|
|
2071
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2038
2072
|
Heading2,
|
|
2039
2073
|
{
|
|
2040
2074
|
style: {
|
|
@@ -2046,17 +2080,17 @@ function LearningPost(props) {
|
|
|
2046
2080
|
children: title
|
|
2047
2081
|
}
|
|
2048
2082
|
),
|
|
2049
|
-
/* @__PURE__ */ (0,
|
|
2050
|
-
/* @__PURE__ */ (0,
|
|
2083
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Typo, { children: metaDescription }),
|
|
2084
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_themes19.Flex, { gap: "1", wrap: "wrap", children: tags == null ? void 0 : tags.map((el) => {
|
|
2051
2085
|
var _a;
|
|
2052
2086
|
if ((_a = el.name) == null ? void 0 : _a.startsWith("filter"))
|
|
2053
2087
|
return;
|
|
2054
|
-
return /* @__PURE__ */ (0,
|
|
2088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Badge, { size: "large", variant: "solid", children: el.name }, el.id);
|
|
2055
2089
|
}) })
|
|
2056
2090
|
]
|
|
2057
2091
|
}
|
|
2058
2092
|
),
|
|
2059
|
-
/* @__PURE__ */ (0,
|
|
2093
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2060
2094
|
import_themes2.AspectRatio,
|
|
2061
2095
|
{
|
|
2062
2096
|
ratio: 5 / 3,
|
|
@@ -2069,7 +2103,7 @@ function LearningPost(props) {
|
|
|
2069
2103
|
}
|
|
2070
2104
|
)
|
|
2071
2105
|
] }),
|
|
2072
|
-
/* @__PURE__ */ (0,
|
|
2106
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_themes6.Box, { mt: "5", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2073
2107
|
"div",
|
|
2074
2108
|
{
|
|
2075
2109
|
className: "gh-content",
|
|
@@ -2082,7 +2116,7 @@ function LearningPost(props) {
|
|
|
2082
2116
|
children
|
|
2083
2117
|
]
|
|
2084
2118
|
}
|
|
2085
|
-
) : /* @__PURE__ */ (0,
|
|
2119
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2086
2120
|
import_themes19.Flex,
|
|
2087
2121
|
{
|
|
2088
2122
|
align: "center",
|
|
@@ -2092,8 +2126,8 @@ function LearningPost(props) {
|
|
|
2092
2126
|
justify: "center",
|
|
2093
2127
|
width: "100%",
|
|
2094
2128
|
children: [
|
|
2095
|
-
/* @__PURE__ */ (0,
|
|
2096
|
-
/* @__PURE__ */ (0,
|
|
2129
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Heading2, { variant: "heading1", children: "\uCF58\uD150\uCE20\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }),
|
|
2130
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2097
2131
|
Heading2,
|
|
2098
2132
|
{
|
|
2099
2133
|
align: "center",
|
|
@@ -2104,7 +2138,7 @@ function LearningPost(props) {
|
|
|
2104
2138
|
\uC7A0\uC2DC \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694.`
|
|
2105
2139
|
}
|
|
2106
2140
|
),
|
|
2107
|
-
/* @__PURE__ */ (0,
|
|
2141
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Button, { onClick: onPageBack, size: "large", children: "\uB4A4\uB85C\uAC00\uAE30" })
|
|
2108
2142
|
]
|
|
2109
2143
|
}
|
|
2110
2144
|
)
|
|
@@ -2119,22 +2153,22 @@ var import_themes52 = require("@radix-ui/themes");
|
|
|
2119
2153
|
var uiProps = __toESM(require("@radix-ui/themes/dist/cjs/props/index.js"), 1);
|
|
2120
2154
|
|
|
2121
2155
|
// src/charts/horizontal-bar-chart.tsx
|
|
2122
|
-
var
|
|
2156
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2123
2157
|
function HorizontalBarChart(props) {
|
|
2124
2158
|
const { total, value, backgroundColor, barColor, height } = props;
|
|
2125
|
-
return /* @__PURE__ */ (0,
|
|
2159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2126
2160
|
"div",
|
|
2127
2161
|
{
|
|
2128
2162
|
className: "tipp_horizontal-bar-chart bar-wrapper",
|
|
2129
2163
|
style: { height, backgroundColor },
|
|
2130
|
-
children: /* @__PURE__ */ (0,
|
|
2164
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2131
2165
|
"div",
|
|
2132
2166
|
{
|
|
2133
2167
|
style: {
|
|
2134
2168
|
width: `${Math.round(value / total * 100)}%`,
|
|
2135
2169
|
height: "100%"
|
|
2136
2170
|
},
|
|
2137
|
-
children: /* @__PURE__ */ (0,
|
|
2171
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "bar", style: { backgroundColor: barColor } })
|
|
2138
2172
|
}
|
|
2139
2173
|
)
|
|
2140
2174
|
}
|