@tipp/ui 1.1.7 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms/drawer.js +2 -2
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/heading.d.cts +1 -1
- package/dist/atoms/heading.d.ts +1 -1
- package/dist/atoms/index.js +71 -71
- package/dist/atoms/pagination.js +3 -3
- package/dist/chunk-2DF7YI2O.js +123 -0
- package/dist/chunk-2DF7YI2O.js.map +1 -0
- package/dist/chunk-2L4KWP7B.js +53 -0
- package/dist/chunk-2L4KWP7B.js.map +1 -0
- package/dist/chunk-5O5NOQQI.js +91 -0
- package/dist/chunk-5O5NOQQI.js.map +1 -0
- package/dist/chunk-6QAY57B6.js +54 -0
- package/dist/chunk-6QAY57B6.js.map +1 -0
- package/dist/chunk-7ORFESPJ.js +54 -0
- package/dist/chunk-7ORFESPJ.js.map +1 -0
- package/dist/chunk-AEXDX2VS.js +53 -0
- package/dist/chunk-AEXDX2VS.js.map +1 -0
- package/dist/chunk-BUWFX67O.js +54 -0
- package/dist/chunk-BUWFX67O.js.map +1 -0
- package/dist/chunk-CMOA2ZAE.js +54 -0
- package/dist/chunk-CMOA2ZAE.js.map +1 -0
- package/dist/chunk-FU2NF5HR.js +1 -0
- package/dist/chunk-FU2NF5HR.js.map +1 -0
- package/dist/chunk-GLRJ6U7D.js +48 -0
- package/dist/chunk-GLRJ6U7D.js.map +1 -0
- package/dist/chunk-KKYI4MTP.js +54 -0
- package/dist/chunk-KKYI4MTP.js.map +1 -0
- package/dist/chunk-LVWHSYJM.js +16 -0
- package/dist/chunk-LVWHSYJM.js.map +1 -0
- package/dist/chunk-M4ZV2IGG.js +16 -0
- package/dist/chunk-M4ZV2IGG.js.map +1 -0
- package/dist/chunk-NSSO2QWC.js +63 -0
- package/dist/chunk-NSSO2QWC.js.map +1 -0
- package/dist/chunk-PV2PTVNR.js +54 -0
- package/dist/chunk-PV2PTVNR.js.map +1 -0
- package/dist/chunk-SUGQXRH7.js +51 -0
- package/dist/chunk-SUGQXRH7.js.map +1 -0
- package/dist/chunk-T5XKRD6Q.js +54 -0
- package/dist/chunk-T5XKRD6Q.js.map +1 -0
- package/dist/chunk-W32CVWDO.js +53 -0
- package/dist/chunk-W32CVWDO.js.map +1 -0
- package/dist/chunk-XXTSXGYB.js +54 -0
- package/dist/chunk-XXTSXGYB.js.map +1 -0
- package/dist/index.cjs +51 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +101 -97
- package/dist/molecules/date-picker/index.js +2 -2
- package/dist/molecules/dot-navigation.cjs +78 -0
- package/dist/molecules/dot-navigation.cjs.map +1 -0
- package/dist/molecules/dot-navigation.d.cts +17 -0
- package/dist/molecules/dot-navigation.d.ts +17 -0
- package/dist/molecules/dot-navigation.js +9 -0
- package/dist/molecules/dot-navigation.js.map +1 -0
- package/dist/molecules/expand-table/index.js +33 -33
- package/dist/molecules/expand-table/row.js +31 -31
- package/dist/molecules/index.cjs +47 -0
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.d.cts +1 -0
- package/dist/molecules/index.d.ts +1 -0
- package/dist/molecules/index.js +43 -39
- package/dist/molecules/navigation.js +32 -32
- package/dist/utils/index.js +3 -3
- package/package.json +3 -3
- package/src/molecules/dot-navigation.tsx +65 -0
- package/src/molecules/index.ts +1 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Flex
|
|
3
|
+
} from "./chunk-25HMMI7R.js";
|
|
4
|
+
|
|
5
|
+
// src/molecules/dot-navigation.tsx
|
|
6
|
+
import { useCallback, useEffect, useState } from "react";
|
|
7
|
+
import { DotFilledIcon } from "@radix-ui/react-icons";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function DotNavigation(props) {
|
|
10
|
+
const { dotCount, onClick, dotIndex, defaultDotIndex, onChangeDotIndex } = props;
|
|
11
|
+
const [currentDot, setCurrentDot] = useState(
|
|
12
|
+
() => {
|
|
13
|
+
var _a;
|
|
14
|
+
return (_a = defaultDotIndex != null ? defaultDotIndex : dotIndex) != null ? _a : 0;
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
const onClickDot = useCallback(
|
|
18
|
+
(i) => {
|
|
19
|
+
if (onClick) {
|
|
20
|
+
onClick(i);
|
|
21
|
+
} else {
|
|
22
|
+
setCurrentDot(i);
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
[onClick]
|
|
26
|
+
);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
onChangeDotIndex == null ? void 0 : onChangeDotIndex(currentDot);
|
|
29
|
+
}, [currentDot, onChangeDotIndex]);
|
|
30
|
+
return /* @__PURE__ */ jsx(Flex, { gap: "4", children: dotCount ? Array.from({ length: dotCount }, (_, i) => i).map((_, index) => {
|
|
31
|
+
const isSelected = currentDot === index;
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
DotFilledIcon,
|
|
34
|
+
{
|
|
35
|
+
color: isSelected ? void 0 : "gray",
|
|
36
|
+
height: "16px",
|
|
37
|
+
fill: "var(--gray-5)",
|
|
38
|
+
onClick: () => {
|
|
39
|
+
onClickDot(index);
|
|
40
|
+
},
|
|
41
|
+
style: {
|
|
42
|
+
cursor: "pointer"
|
|
43
|
+
},
|
|
44
|
+
width: "16px"
|
|
45
|
+
},
|
|
46
|
+
index
|
|
47
|
+
);
|
|
48
|
+
}) : null });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
DotNavigation
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=chunk-T5XKRD6Q.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/dot-navigation.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport { DotFilledIcon } from '@radix-ui/react-icons';\nimport { Flex } from '../atoms/flex';\n\nexport interface DotNavigationProps {\n /** 전체 점 갯수 */\n dotCount?: number;\n /** 점 클릭 시 */\n onClick?: (index: number) => void;\n /** 현재 선택된 점 */\n dotIndex?: number;\n /** 기본 점 위치 */\n defaultDotIndex?: number;\n /** 선택된 점 변경 시 실행 */\n onChangeDotIndex?: (index: number) => void;\n}\n\nexport function DotNavigation(props: DotNavigationProps): React.ReactElement {\n const { dotCount, onClick, dotIndex, defaultDotIndex, onChangeDotIndex } =\n props;\n\n const [currentDot, setCurrentDot] = useState<number>(\n () => defaultDotIndex ?? dotIndex ?? 0\n );\n\n const onClickDot = useCallback(\n (i: number) => {\n if (onClick) {\n onClick(i);\n } else {\n setCurrentDot(i);\n }\n },\n [onClick]\n );\n\n useEffect(() => {\n onChangeDotIndex?.(currentDot);\n }, [currentDot, onChangeDotIndex]);\n\n return (\n <Flex gap=\"4\">\n {dotCount\n ? Array.from({ length: dotCount }, (_, i) => i).map((_, index) => {\n const isSelected = currentDot === index;\n return (\n <DotFilledIcon\n color={isSelected ? undefined : 'gray'}\n height=\"16px\"\n fill=\"var(--gray-5)\"\n // eslint-disable-next-line react/no-array-index-key -- index외의 키가 없음\n key={index}\n onClick={() => {\n onClickDot(index);\n }}\n style={{\n cursor: 'pointer',\n }}\n width=\"16px\"\n />\n );\n })\n : null}\n </Flex>\n );\n}\n"],"mappings":";;;;;AAAA,SAAgB,aAAa,WAAW,gBAAgB;AACxD,SAAS,qBAAqB;AA6ChB;AA7BP,SAAS,cAAc,OAA+C;AAC3E,QAAM,EAAE,UAAU,SAAS,UAAU,iBAAiB,iBAAiB,IACrE;AAEF,QAAM,CAAC,YAAY,aAAa,IAAI;AAAA,IAClC,MAAG;AAtBP;AAsBU,+DAAmB,aAAnB,YAA+B;AAAA;AAAA,EACvC;AAEA,QAAM,aAAa;AAAA,IACjB,CAAC,MAAc;AACb,UAAI,SAAS;AACX,gBAAQ,CAAC;AAAA,MACX,OAAO;AACL,sBAAc,CAAC;AAAA,MACjB;AAAA,IACF;AAAA,IACA,CAAC,OAAO;AAAA,EACV;AAEA,YAAU,MAAM;AACd,yDAAmB;AAAA,EACrB,GAAG,CAAC,YAAY,gBAAgB,CAAC;AAEjC,SACE,oBAAC,QAAK,KAAI,KACP,qBACG,MAAM,KAAK,EAAE,QAAQ,SAAS,GAAG,CAAC,GAAG,MAAM,CAAC,EAAE,IAAI,CAAC,GAAG,UAAU;AAC9D,UAAM,aAAa,eAAe;AAClC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,aAAa,SAAY;AAAA,QAChC,QAAO;AAAA,QACP,MAAK;AAAA,QAGL,SAAS,MAAM;AACb,qBAAW,KAAK;AAAA,QAClB;AAAA,QACA,OAAO;AAAA,UACL,QAAQ;AAAA,QACV;AAAA,QACA,OAAM;AAAA;AAAA,MAPD;AAAA,IAQP;AAAA,EAEJ,CAAC,IACD,MACN;AAEJ;","names":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Flex
|
|
3
|
+
} from "./chunk-25HMMI7R.js";
|
|
4
|
+
|
|
5
|
+
// src/molecules/dot-navigation.tsx
|
|
6
|
+
import { useCallback, useEffect, useState } from "react";
|
|
7
|
+
import { DotFilledIcon } from "@radix-ui/react-icons";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function DotNavigation(props) {
|
|
10
|
+
const { dotCount, onClick, dotIndex, defaultDotIndex, onChangeDotIndex } = props;
|
|
11
|
+
const [currentDot, setCurrentDot] = useState(
|
|
12
|
+
() => {
|
|
13
|
+
var _a;
|
|
14
|
+
return (_a = defaultDotIndex != null ? defaultDotIndex : dotIndex) != null ? _a : 0;
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
const onClickDot = useCallback(
|
|
18
|
+
(i) => {
|
|
19
|
+
if (onClick) {
|
|
20
|
+
onClick(i);
|
|
21
|
+
} else {
|
|
22
|
+
setCurrentDot(i);
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
[onClick]
|
|
26
|
+
);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
onChangeDotIndex == null ? void 0 : onChangeDotIndex(currentDot);
|
|
29
|
+
}, [currentDot, onChangeDotIndex]);
|
|
30
|
+
return /* @__PURE__ */ jsx(Flex, { children: dotCount ? Array.from({ length: dotCount }, (_, i) => i).map((_, index) => {
|
|
31
|
+
const isSelected = currentDot === index;
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
DotFilledIcon,
|
|
34
|
+
{
|
|
35
|
+
fill: "var(--gray-5)",
|
|
36
|
+
height: "24px",
|
|
37
|
+
onClick: () => {
|
|
38
|
+
onClickDot(index);
|
|
39
|
+
},
|
|
40
|
+
style: {
|
|
41
|
+
cursor: "pointer"
|
|
42
|
+
},
|
|
43
|
+
width: "24px"
|
|
44
|
+
},
|
|
45
|
+
index
|
|
46
|
+
);
|
|
47
|
+
}) : null });
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export {
|
|
51
|
+
DotNavigation
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=chunk-W32CVWDO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/dot-navigation.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport { DotFilledIcon } from '@radix-ui/react-icons';\nimport { Flex } from '../atoms/flex';\n\nexport interface DotNavigationProps {\n /** 전체 점 갯수 */\n dotCount?: number;\n /** 점 클릭 시 */\n onClick?: (index: number) => void;\n /** 현재 선택된 점 */\n dotIndex?: number;\n /** 기본 점 위치 */\n defaultDotIndex?: number;\n /** 선택된 점 변경 시 실행 */\n onChangeDotIndex?: (index: number) => void;\n}\n\nexport function DotNavigation(props: DotNavigationProps): React.ReactElement {\n const { dotCount, onClick, dotIndex, defaultDotIndex, onChangeDotIndex } =\n props;\n\n const [currentDot, setCurrentDot] = useState<number>(\n () => defaultDotIndex ?? dotIndex ?? 0\n );\n\n const onClickDot = useCallback(\n (i: number) => {\n if (onClick) {\n onClick(i);\n } else {\n setCurrentDot(i);\n }\n },\n [onClick]\n );\n\n useEffect(() => {\n onChangeDotIndex?.(currentDot);\n }, [currentDot, onChangeDotIndex]);\n\n return (\n <Flex>\n {dotCount\n ? Array.from({ length: dotCount }, (_, i) => i).map((_, index) => {\n const isSelected = currentDot === index;\n return (\n <DotFilledIcon\n // color={isSelected ? undefined : 'gray'}\n fill=\"var(--gray-5)\"\n height=\"24px\"\n // eslint-disable-next-line react/no-array-index-key -- index외의 키가 없음\n key={index}\n onClick={() => {\n onClickDot(index);\n }}\n style={{\n cursor: 'pointer',\n }}\n width=\"24px\"\n />\n );\n })\n : null}\n </Flex>\n );\n}\n"],"mappings":";;;;;AAAA,SAAgB,aAAa,WAAW,gBAAgB;AACxD,SAAS,qBAAqB;AA6ChB;AA7BP,SAAS,cAAc,OAA+C;AAC3E,QAAM,EAAE,UAAU,SAAS,UAAU,iBAAiB,iBAAiB,IACrE;AAEF,QAAM,CAAC,YAAY,aAAa,IAAI;AAAA,IAClC,MAAG;AAtBP;AAsBU,+DAAmB,aAAnB,YAA+B;AAAA;AAAA,EACvC;AAEA,QAAM,aAAa;AAAA,IACjB,CAAC,MAAc;AACb,UAAI,SAAS;AACX,gBAAQ,CAAC;AAAA,MACX,OAAO;AACL,sBAAc,CAAC;AAAA,MACjB;AAAA,IACF;AAAA,IACA,CAAC,OAAO;AAAA,EACV;AAEA,YAAU,MAAM;AACd,yDAAmB;AAAA,EACrB,GAAG,CAAC,YAAY,gBAAgB,CAAC;AAEjC,SACE,oBAAC,QACE,qBACG,MAAM,KAAK,EAAE,QAAQ,SAAS,GAAG,CAAC,GAAG,MAAM,CAAC,EAAE,IAAI,CAAC,GAAG,UAAU;AAC9D,UAAM,aAAa,eAAe;AAClC,WACE;AAAA,MAAC;AAAA;AAAA,QAEC,MAAK;AAAA,QACL,QAAO;AAAA,QAGP,SAAS,MAAM;AACb,qBAAW,KAAK;AAAA,QAClB;AAAA,QACA,OAAO;AAAA,UACL,QAAQ;AAAA,QACV;AAAA,QACA,OAAM;AAAA;AAAA,MAPD;AAAA,IAQP;AAAA,EAEJ,CAAC,IACD,MACN;AAEJ;","names":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Flex
|
|
3
|
+
} from "./chunk-25HMMI7R.js";
|
|
4
|
+
|
|
5
|
+
// src/molecules/dot-navigation.tsx
|
|
6
|
+
import { useCallback, useEffect, useState } from "react";
|
|
7
|
+
import { DotFilledIcon } from "@radix-ui/react-icons";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function DotNavigation(props) {
|
|
10
|
+
const { dotCount, onClick, dotIndex, defaultDotIndex, onChangeDotIndex } = props;
|
|
11
|
+
const [currentDot, setCurrentDot] = useState(
|
|
12
|
+
() => {
|
|
13
|
+
var _a;
|
|
14
|
+
return (_a = defaultDotIndex != null ? defaultDotIndex : dotIndex) != null ? _a : 0;
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
const onClickDot = useCallback(
|
|
18
|
+
(i) => {
|
|
19
|
+
if (onClick) {
|
|
20
|
+
onClick(i);
|
|
21
|
+
} else {
|
|
22
|
+
setCurrentDot(i);
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
[onClick]
|
|
26
|
+
);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
onChangeDotIndex == null ? void 0 : onChangeDotIndex(currentDot);
|
|
29
|
+
}, [currentDot, onChangeDotIndex]);
|
|
30
|
+
return /* @__PURE__ */ jsx(Flex, { gap: "4", children: dotCount ? Array.from({ length: dotCount }, (_, i) => i).map((_, index) => {
|
|
31
|
+
const isSelected = currentDot === index;
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
DotFilledIcon,
|
|
34
|
+
{
|
|
35
|
+
color: isSelected ? void 0 : "gray",
|
|
36
|
+
height: "8px",
|
|
37
|
+
fill: "var(--gray-5)",
|
|
38
|
+
onClick: () => {
|
|
39
|
+
onClickDot(index);
|
|
40
|
+
},
|
|
41
|
+
style: {
|
|
42
|
+
cursor: "pointer"
|
|
43
|
+
},
|
|
44
|
+
width: "8px"
|
|
45
|
+
},
|
|
46
|
+
index
|
|
47
|
+
);
|
|
48
|
+
}) : null });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
DotNavigation
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=chunk-XXTSXGYB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/dot-navigation.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport { DotFilledIcon } from '@radix-ui/react-icons';\nimport { Flex } from '../atoms/flex';\n\nexport interface DotNavigationProps {\n /** 전체 점 갯수 */\n dotCount?: number;\n /** 점 클릭 시 */\n onClick?: (index: number) => void;\n /** 현재 선택된 점 */\n dotIndex?: number;\n /** 기본 점 위치 */\n defaultDotIndex?: number;\n /** 선택된 점 변경 시 실행 */\n onChangeDotIndex?: (index: number) => void;\n}\n\nexport function DotNavigation(props: DotNavigationProps): React.ReactElement {\n const { dotCount, onClick, dotIndex, defaultDotIndex, onChangeDotIndex } =\n props;\n\n const [currentDot, setCurrentDot] = useState<number>(\n () => defaultDotIndex ?? dotIndex ?? 0\n );\n\n const onClickDot = useCallback(\n (i: number) => {\n if (onClick) {\n onClick(i);\n } else {\n setCurrentDot(i);\n }\n },\n [onClick]\n );\n\n useEffect(() => {\n onChangeDotIndex?.(currentDot);\n }, [currentDot, onChangeDotIndex]);\n\n return (\n <Flex gap=\"4\">\n {dotCount\n ? Array.from({ length: dotCount }, (_, i) => i).map((_, index) => {\n const isSelected = currentDot === index;\n return (\n <DotFilledIcon\n color={isSelected ? undefined : 'gray'}\n height=\"8px\"\n fill=\"var(--gray-5)\"\n // eslint-disable-next-line react/no-array-index-key -- index외의 키가 없음\n key={index}\n onClick={() => {\n onClickDot(index);\n }}\n style={{\n cursor: 'pointer',\n }}\n width=\"8px\"\n />\n );\n })\n : null}\n </Flex>\n );\n}\n"],"mappings":";;;;;AAAA,SAAgB,aAAa,WAAW,gBAAgB;AACxD,SAAS,qBAAqB;AA6ChB;AA7BP,SAAS,cAAc,OAA+C;AAC3E,QAAM,EAAE,UAAU,SAAS,UAAU,iBAAiB,iBAAiB,IACrE;AAEF,QAAM,CAAC,YAAY,aAAa,IAAI;AAAA,IAClC,MAAG;AAtBP;AAsBU,+DAAmB,aAAnB,YAA+B;AAAA;AAAA,EACvC;AAEA,QAAM,aAAa;AAAA,IACjB,CAAC,MAAc;AACb,UAAI,SAAS;AACX,gBAAQ,CAAC;AAAA,MACX,OAAO;AACL,sBAAc,CAAC;AAAA,MACjB;AAAA,IACF;AAAA,IACA,CAAC,OAAO;AAAA,EACV;AAEA,YAAU,MAAM;AACd,yDAAmB;AAAA,EACrB,GAAG,CAAC,YAAY,gBAAgB,CAAC;AAEjC,SACE,oBAAC,QAAK,KAAI,KACP,qBACG,MAAM,KAAK,EAAE,QAAQ,SAAS,GAAG,CAAC,GAAG,MAAM,CAAC,EAAE,IAAI,CAAC,GAAG,UAAU;AAC9D,UAAM,aAAa,eAAe;AAClC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,aAAa,SAAY;AAAA,QAChC,QAAO;AAAA,QACP,MAAK;AAAA,QAGL,SAAS,MAAM;AACb,qBAAW,KAAK;AAAA,QAClB;AAAA,QACA,OAAO;AAAA,UACL,QAAQ;AAAA,QACV;AAAA,QACA,OAAM;AAAA;AAAA,MAPD;AAAA,IAQP;AAAA,EAEJ,CAAC,IACD,MACN;AAEJ;","names":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -88,6 +88,7 @@ __export(src_exports, {
|
|
|
88
88
|
DataList: () => import_themes15.DataList,
|
|
89
89
|
DatePicker: () => DatePicker,
|
|
90
90
|
Dialog: () => import_themes16.Dialog,
|
|
91
|
+
DotNavigation: () => DotNavigation,
|
|
91
92
|
DotsHorizontalIcon: () => import_react_icons.DotsHorizontalIcon,
|
|
92
93
|
DotsVerticalIcon: () => import_react_icons.DotsVerticalIcon,
|
|
93
94
|
DoubleArrowLeftIcon: () => import_react_icons.DoubleArrowLeftIcon,
|
|
@@ -1218,6 +1219,51 @@ var renderCustomHeader = (props) => {
|
|
|
1218
1219
|
] });
|
|
1219
1220
|
};
|
|
1220
1221
|
|
|
1222
|
+
// src/molecules/dot-navigation.tsx
|
|
1223
|
+
var import_react20 = require("react");
|
|
1224
|
+
var import_react_icons3 = require("@radix-ui/react-icons");
|
|
1225
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1226
|
+
function DotNavigation(props) {
|
|
1227
|
+
const { dotCount, onClick, dotIndex, defaultDotIndex, onChangeDotIndex } = props;
|
|
1228
|
+
const [currentDot, setCurrentDot] = (0, import_react20.useState)(
|
|
1229
|
+
() => {
|
|
1230
|
+
var _a;
|
|
1231
|
+
return (_a = defaultDotIndex != null ? defaultDotIndex : dotIndex) != null ? _a : 0;
|
|
1232
|
+
}
|
|
1233
|
+
);
|
|
1234
|
+
const onClickDot = (0, import_react20.useCallback)(
|
|
1235
|
+
(i) => {
|
|
1236
|
+
if (onClick) {
|
|
1237
|
+
onClick(i);
|
|
1238
|
+
} else {
|
|
1239
|
+
setCurrentDot(i);
|
|
1240
|
+
}
|
|
1241
|
+
},
|
|
1242
|
+
[onClick]
|
|
1243
|
+
);
|
|
1244
|
+
(0, import_react20.useEffect)(() => {
|
|
1245
|
+
onChangeDotIndex == null ? void 0 : onChangeDotIndex(currentDot);
|
|
1246
|
+
}, [currentDot, onChangeDotIndex]);
|
|
1247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_themes19.Flex, { children: dotCount ? Array.from({ length: dotCount }, (_, i) => i).map((_, index) => {
|
|
1248
|
+
const isSelected = currentDot === index;
|
|
1249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1250
|
+
import_react_icons3.DotFilledIcon,
|
|
1251
|
+
{
|
|
1252
|
+
height: "24px",
|
|
1253
|
+
onClick: () => {
|
|
1254
|
+
onClickDot(index);
|
|
1255
|
+
},
|
|
1256
|
+
opacity: isSelected ? void 0 : 0.25,
|
|
1257
|
+
style: {
|
|
1258
|
+
cursor: "pointer"
|
|
1259
|
+
},
|
|
1260
|
+
width: "24px"
|
|
1261
|
+
},
|
|
1262
|
+
index
|
|
1263
|
+
);
|
|
1264
|
+
}) : null });
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1221
1267
|
// src/theme/use-theme.tsx
|
|
1222
1268
|
var import_themes51 = require("@radix-ui/themes");
|
|
1223
1269
|
|
|
@@ -1225,22 +1271,22 @@ var import_themes51 = require("@radix-ui/themes");
|
|
|
1225
1271
|
var uiProps = __toESM(require("@radix-ui/themes/dist/cjs/props/index.js"), 1);
|
|
1226
1272
|
|
|
1227
1273
|
// src/charts/horizontal-bar-chart.tsx
|
|
1228
|
-
var
|
|
1274
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1229
1275
|
function HorizontalBarChart(props) {
|
|
1230
1276
|
const { total, value, backgroundColor, barColor, height } = props;
|
|
1231
|
-
return /* @__PURE__ */ (0,
|
|
1277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1232
1278
|
"div",
|
|
1233
1279
|
{
|
|
1234
1280
|
className: "tipp_horizontal-bar-chart bar-wrapper",
|
|
1235
1281
|
style: { height, backgroundColor },
|
|
1236
|
-
children: /* @__PURE__ */ (0,
|
|
1282
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1237
1283
|
"div",
|
|
1238
1284
|
{
|
|
1239
1285
|
style: {
|
|
1240
1286
|
width: `${Math.round(value / total * 100)}%`,
|
|
1241
1287
|
height: "100%"
|
|
1242
1288
|
},
|
|
1243
|
-
children: /* @__PURE__ */ (0,
|
|
1289
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "bar", style: { backgroundColor: barColor } })
|
|
1244
1290
|
}
|
|
1245
1291
|
)
|
|
1246
1292
|
}
|
|
@@ -1466,6 +1512,7 @@ function scrollTo(element, targetPosition, duration) {
|
|
|
1466
1512
|
DataList,
|
|
1467
1513
|
DatePicker,
|
|
1468
1514
|
Dialog,
|
|
1515
|
+
DotNavigation,
|
|
1469
1516
|
DotsHorizontalIcon,
|
|
1470
1517
|
DotsVerticalIcon,
|
|
1471
1518
|
DoubleArrowLeftIcon,
|