@uniai-fe/ui-legacy 0.1.6 → 0.1.8
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/README.md +3 -1
- package/package.json +35 -37
- package/src/button/index.tsx +12 -12
- package/src/components.tsx +2 -2
- package/src/icon/icon.scss +1 -1
- package/src/icon/index.tsx +4 -4
- package/src/icon/styled.tsx +2 -2
- package/src/index.scss +2 -2
- package/src/index.tsx +0 -2
- package/src/types/index.d.ts +2 -2
- package/src/chart/chart.scss +0 -11
- package/src/chart/components/Contents.tsx +0 -17
- package/src/chart/components/control/Button.tsx +0 -39
- package/src/chart/components/control/Container.tsx +0 -27
- package/src/chart/components/control/Provider.tsx +0 -117
- package/src/chart/components/control/index.tsx +0 -12
- package/src/chart/components/custom/ActivePieSector.tsx +0 -29
- package/src/chart/components/graphs/ArcGauge.tsx +0 -58
- package/src/chart/components/graphs/ArcMeter.tsx +0 -112
- package/src/chart/components/graphs/Area.tsx +0 -132
- package/src/chart/components/graphs/Bar.tsx +0 -179
- package/src/chart/components/graphs/Doughnut.tsx +0 -90
- package/src/chart/components/graphs/Line.tsx +0 -123
- package/src/chart/components/graphs/index.tsx +0 -17
- package/src/chart/components/ticks/XAxis.tsx +0 -39
- package/src/chart/components/ticks/index.tsx +0 -7
- package/src/chart/index.tsx +0 -17
- package/src/chart/styled.tsx +0 -3
- package/src/chart/styles/scss/arc-gauge.scss +0 -11
- package/src/chart/styles/scss/arc-meter.scss +0 -6
- package/src/chart/styles/scss/control.scss +0 -34
- package/src/chart/styles/scss/filter.scss +0 -0
- package/src/chart/styles/scss/graph.scss +0 -3
- package/src/chart/styles/scss/legend.scss +0 -35
- package/src/chart/styles/scss/level.color.scss +0 -7
- package/src/chart/styles/scss/tick.scss +0 -48
- package/src/chart/styles/scss/tooltip.scss +0 -70
- package/src/chart/styles/styled/arc-gauge.ts +0 -65
- package/src/chart/styles/styled/arc-meter.ts +0 -42
- package/src/chart/styles/styled/common.ts +0 -14
- package/src/chart/styles/styled/control.ts +0 -31
- package/src/chart/styles/styled/legend.ts +0 -11
- package/src/chart/svg/gauge-track.min.svg +0 -1
- package/src/chart/utils/getLevel.ts +0 -23
- package/src/icon/components/chart/Control.tsx +0 -40
- package/src/icon/components/chart/index.tsx +0 -7
- package/src/icon/components/health-score/HealthScore.tsx +0 -46
- package/src/icon/components/health-score/index.tsx +0 -3
- package/src/icon/styles/scss/chart.scss +0 -3
- package/src/icon/styles/styled/chart.ts +0 -17
- package/src/icon/svg/chart/control/pan-left.svg +0 -4
- package/src/icon/svg/chart/control/pan-right.svg +0 -4
- package/src/icon/svg/chart/control/zoom-in.svg +0 -4
- package/src/icon/svg/chart/control/zoom-out.svg +0 -4
- package/src/styled.template.tsx +0 -5
- package/src/template/compare/compare.scss +0 -1
- package/src/template/compare/components/box/Container.tsx +0 -33
- package/src/template/compare/components/box/TextStrong.tsx +0 -15
- package/src/template/compare/components/box/TextSub.tsx +0 -15
- package/src/template/compare/components/box/index.tsx +0 -11
- package/src/template/compare/components/button/Remove.tsx +0 -28
- package/src/template/compare/components/button/index.tsx +0 -5
- package/src/template/compare/components/chart/Container.tsx +0 -33
- package/src/template/compare/components/chart/graph/Container.tsx +0 -15
- package/src/template/compare/components/chart/graph/Item.tsx +0 -13
- package/src/template/compare/components/chart/index.tsx +0 -16
- package/src/template/compare/components/chart/legend/Container.tsx +0 -23
- package/src/template/compare/components/chart/legend/Section.tsx +0 -31
- package/src/template/compare/components/select-list/Container.tsx +0 -15
- package/src/template/compare/components/select-list/Header.tsx +0 -15
- package/src/template/compare/components/select-list/Item.tsx +0 -15
- package/src/template/compare/components/select-list/List.tsx +0 -18
- package/src/template/compare/components/select-list/index.tsx +0 -13
- package/src/template/compare/index.tsx +0 -13
- package/src/template/compare/styled.tsx +0 -17
- package/src/template/compare/styles/scss/variables.scss +0 -17
- package/src/template/compare/styles/styled-components/chart/graph.ts +0 -26
- package/src/template/compare/styles/styled-components/chart/layout.ts +0 -38
- package/src/template/compare/styles/styled-components/chart/legend.ts +0 -64
- package/src/template/compare/styles/styled-components/common.ts +0 -57
- package/src/template/compare/styles/styled-components/select-list.ts +0 -36
- package/src/template/filter/components/Container.tsx +0 -39
- package/src/template/filter/components/Group.tsx +0 -100
- package/src/template/filter/components/ToggleButton.tsx +0 -27
- package/src/template/filter/index.tsx +0 -5
- package/src/template/filter/styled.tsx +0 -3
- package/src/template/filter/styles/styled-components/filter.ts +0 -66
- package/src/template/health-score/components/Chart.tsx +0 -38
- package/src/template/health-score/index.tsx +0 -3
- package/src/template/health-score/styled.tsx +0 -3
- package/src/template/health-score/styles/styled/chart.ts +0 -26
- package/src/template.tsx +0 -5
- package/src/types/chart/axis.d.ts +0 -15
- package/src/types/chart/control.d.ts +0 -109
- package/src/types/chart/data.d.ts +0 -41
- package/src/types/chart/dot.d.ts +0 -3
- package/src/types/chart/index.d.ts +0 -7
- package/src/types/chart/legend.d.ts +0 -124
- package/src/types/chart/props.d.ts +0 -271
- package/src/types/chart/tick.d.ts +0 -30
- package/src/types/template/compare/chart.d.ts +0 -8
- package/src/types/template/filter.d.ts +0 -39
- package/src/types/template/index.d.ts +0 -2
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import type { ComponentBaseProps } from "../../../../types";
|
|
4
|
-
import StyledCompareCommon from "../../styles/styled-components/common";
|
|
5
|
-
|
|
6
|
-
export default function CompareTextStrong({
|
|
7
|
-
className,
|
|
8
|
-
children,
|
|
9
|
-
}: ComponentBaseProps) {
|
|
10
|
-
return (
|
|
11
|
-
<StyledCompareCommon.text.strong className={className}>
|
|
12
|
-
{children}
|
|
13
|
-
</StyledCompareCommon.text.strong>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import type { ComponentBaseProps } from "../../../../types";
|
|
4
|
-
import StyledCompareCommon from "../../styles/styled-components/common";
|
|
5
|
-
|
|
6
|
-
export default function CompareTextSub({
|
|
7
|
-
className,
|
|
8
|
-
children,
|
|
9
|
-
}: ComponentBaseProps) {
|
|
10
|
-
return (
|
|
11
|
-
<StyledCompareCommon.text.sub className={className}>
|
|
12
|
-
{children}
|
|
13
|
-
</StyledCompareCommon.text.sub>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import CompareBoxContainer from "./Container";
|
|
2
|
-
import CompareTextStrong from "./TextStrong";
|
|
3
|
-
import CompareTextSub from "./TextSub";
|
|
4
|
-
|
|
5
|
-
const CompareBox = {
|
|
6
|
-
Container: CompareBoxContainer,
|
|
7
|
-
TextStrong: CompareTextStrong,
|
|
8
|
-
TextSub: CompareTextSub,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export default CompareBox;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import Icon from "../../../../icon";
|
|
4
|
-
import StyledCompareCommon from "../../styles/styled-components/common";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 비교 템플릿; 선택해제 버튼
|
|
8
|
-
* @component
|
|
9
|
-
* @param {object} props
|
|
10
|
-
* @param {Function} props.onRemove 선택해제 이벤트
|
|
11
|
-
*/
|
|
12
|
-
export default function CompareRemoveButton({
|
|
13
|
-
className,
|
|
14
|
-
onRemove,
|
|
15
|
-
}: {
|
|
16
|
-
className?: string;
|
|
17
|
-
onRemove: () => void;
|
|
18
|
-
}) {
|
|
19
|
-
return (
|
|
20
|
-
<StyledCompareCommon.button.remove
|
|
21
|
-
type="button"
|
|
22
|
-
className={className}
|
|
23
|
-
onClick={onRemove}
|
|
24
|
-
>
|
|
25
|
-
<Icon.Button.Remove.Solid />
|
|
26
|
-
</StyledCompareCommon.button.remove>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import type { CompareChartLegendCategoryDataType } from "../../../../types";
|
|
4
|
-
import StyledCompare from "../../styled";
|
|
5
|
-
import CompareChartLegendContainer from "./legend/Container";
|
|
6
|
-
import CompareChartGraphContainer from "./graph/Container";
|
|
7
|
-
import ScrollbarContainer from "../../../../scrollbar/components/Container";
|
|
8
|
-
|
|
9
|
-
export default function CompareChartContainer({
|
|
10
|
-
leftWidth,
|
|
11
|
-
legendCategoryData,
|
|
12
|
-
children: graphItems,
|
|
13
|
-
}: {
|
|
14
|
-
legendCategoryData: CompareChartLegendCategoryDataType[];
|
|
15
|
-
children: React.ReactNode;
|
|
16
|
-
} & Partial<{ leftWidth: number | string }>) {
|
|
17
|
-
return (
|
|
18
|
-
<StyledCompare.chart.container>
|
|
19
|
-
<ScrollbarContainer>
|
|
20
|
-
<StyledCompare.chart.wrapper>
|
|
21
|
-
<StyledCompare.chart.left $leftWidth={leftWidth}>
|
|
22
|
-
<CompareChartLegendContainer categoryData={legendCategoryData} />
|
|
23
|
-
</StyledCompare.chart.left>
|
|
24
|
-
<StyledCompare.chart.right $leftWidth={leftWidth}>
|
|
25
|
-
<CompareChartGraphContainer>
|
|
26
|
-
{graphItems}
|
|
27
|
-
</CompareChartGraphContainer>
|
|
28
|
-
</StyledCompare.chart.right>
|
|
29
|
-
</StyledCompare.chart.wrapper>
|
|
30
|
-
</ScrollbarContainer>
|
|
31
|
-
</StyledCompare.chart.container>
|
|
32
|
-
);
|
|
33
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import StyledCompareChartGraph from "../../../styles/styled-components/chart/graph";
|
|
4
|
-
|
|
5
|
-
export default function CompareChartGraphContainer({
|
|
6
|
-
children,
|
|
7
|
-
}: {
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
}) {
|
|
10
|
-
return (
|
|
11
|
-
<StyledCompareChartGraph.container>
|
|
12
|
-
{children}
|
|
13
|
-
</StyledCompareChartGraph.container>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import StyledCompareChartGraph from "../../../styles/styled-components/chart/graph";
|
|
4
|
-
|
|
5
|
-
export default function CompareChartGraphItem({
|
|
6
|
-
children,
|
|
7
|
-
}: {
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
}) {
|
|
10
|
-
return (
|
|
11
|
-
<StyledCompareChartGraph.item>{children}</StyledCompareChartGraph.item>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import CompareChartContainer from "./Container";
|
|
2
|
-
import CompareChartGraphContainer from "./graph/Container";
|
|
3
|
-
import CompareChartGraphItem from "./graph/Item";
|
|
4
|
-
import CompareChartLegendContainer from "./legend/Container";
|
|
5
|
-
import CompareChartLegendSectionContainer from "./legend/Section";
|
|
6
|
-
|
|
7
|
-
const CompareChart = {
|
|
8
|
-
Container: CompareChartContainer,
|
|
9
|
-
Legend: {
|
|
10
|
-
Container: CompareChartLegendContainer,
|
|
11
|
-
Section: CompareChartLegendSectionContainer,
|
|
12
|
-
},
|
|
13
|
-
Graph: { Container: CompareChartGraphContainer, Item: CompareChartGraphItem },
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default CompareChart;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import type { CompareChartLegendCategoryDataType } from "../../../../../types";
|
|
4
|
-
import StyledCompare from "../../../styled";
|
|
5
|
-
import CompareChartLegendSectionContainer from "./Section";
|
|
6
|
-
|
|
7
|
-
export default function CompareChartLegendContainer({
|
|
8
|
-
categoryData,
|
|
9
|
-
}: {
|
|
10
|
-
categoryData: CompareChartLegendCategoryDataType[];
|
|
11
|
-
}) {
|
|
12
|
-
return (
|
|
13
|
-
<StyledCompare.chart.legend.container>
|
|
14
|
-
{categoryData.map(({ key, title, legend }) => (
|
|
15
|
-
<CompareChartLegendSectionContainer
|
|
16
|
-
key={key}
|
|
17
|
-
dataName={title}
|
|
18
|
-
legendData={legend}
|
|
19
|
-
/>
|
|
20
|
-
))}
|
|
21
|
-
</StyledCompare.chart.legend.container>
|
|
22
|
-
);
|
|
23
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import type { ChartLegendBaseType } from "../../../../../types";
|
|
4
|
-
import StyledCompare from "../../../styled";
|
|
5
|
-
|
|
6
|
-
export default function CompareChartLegendSectionContainer({
|
|
7
|
-
dataName,
|
|
8
|
-
legendData,
|
|
9
|
-
}: {
|
|
10
|
-
dataName: React.ReactNode;
|
|
11
|
-
legendData: ChartLegendBaseType[];
|
|
12
|
-
}) {
|
|
13
|
-
return (
|
|
14
|
-
<StyledCompare.chart.legend.section.container>
|
|
15
|
-
<StyledCompare.chart.legend.section.header>
|
|
16
|
-
<h4>{dataName}</h4>
|
|
17
|
-
</StyledCompare.chart.legend.section.header>
|
|
18
|
-
<StyledCompare.chart.legend.section.contents>
|
|
19
|
-
{legendData.map(({ key, name, color }) => (
|
|
20
|
-
<StyledCompare.chart.legend.section.legendItem
|
|
21
|
-
key={key}
|
|
22
|
-
$color={color}
|
|
23
|
-
>
|
|
24
|
-
<figure></figure>
|
|
25
|
-
<span>{name}</span>
|
|
26
|
-
</StyledCompare.chart.legend.section.legendItem>
|
|
27
|
-
))}
|
|
28
|
-
</StyledCompare.chart.legend.section.contents>
|
|
29
|
-
</StyledCompare.chart.legend.section.container>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import type { ComponentBaseProps } from "../../../../types";
|
|
4
|
-
import StyledCompareSelect from "../../styles/styled-components/select-list";
|
|
5
|
-
|
|
6
|
-
export default function CompareSelectContainer({
|
|
7
|
-
className,
|
|
8
|
-
children,
|
|
9
|
-
}: ComponentBaseProps) {
|
|
10
|
-
return (
|
|
11
|
-
<StyledCompareSelect.container className={className}>
|
|
12
|
-
{children}
|
|
13
|
-
</StyledCompareSelect.container>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import type { ComponentBaseProps } from "../../../../types";
|
|
4
|
-
import StyledCompareSelect from "../../styles/styled-components/select-list";
|
|
5
|
-
|
|
6
|
-
export default function CompareSelectHeader({
|
|
7
|
-
className,
|
|
8
|
-
children,
|
|
9
|
-
}: ComponentBaseProps) {
|
|
10
|
-
return (
|
|
11
|
-
<StyledCompareSelect.header className={className}>
|
|
12
|
-
{children}
|
|
13
|
-
</StyledCompareSelect.header>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import type { ComponentBaseProps } from "../../../../types";
|
|
4
|
-
import StyledCompareSelect from "../../styles/styled-components/select-list";
|
|
5
|
-
|
|
6
|
-
export default function CompareSelectListItem({
|
|
7
|
-
className,
|
|
8
|
-
children,
|
|
9
|
-
}: ComponentBaseProps) {
|
|
10
|
-
return (
|
|
11
|
-
<StyledCompareSelect.item className={className}>
|
|
12
|
-
{children}
|
|
13
|
-
</StyledCompareSelect.item>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import type { ComponentBaseProps } from "../../../../types";
|
|
4
|
-
import StyledCompareSelect from "../../styles/styled-components/select-list";
|
|
5
|
-
|
|
6
|
-
export default function CompareSelectList({
|
|
7
|
-
className,
|
|
8
|
-
columnLength,
|
|
9
|
-
children,
|
|
10
|
-
}: {
|
|
11
|
-
columnLength: number;
|
|
12
|
-
} & ComponentBaseProps) {
|
|
13
|
-
return (
|
|
14
|
-
<StyledCompareSelect.list className={className} $length={columnLength}>
|
|
15
|
-
{children}
|
|
16
|
-
</StyledCompareSelect.list>
|
|
17
|
-
);
|
|
18
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import CompareSelectContainer from "./Container";
|
|
2
|
-
import CompareSelectHeader from "./Header";
|
|
3
|
-
import CompareSelectList from "./List";
|
|
4
|
-
import CompareSelectListItem from "./Item";
|
|
5
|
-
|
|
6
|
-
const CompareSelect = {
|
|
7
|
-
Container: CompareSelectContainer,
|
|
8
|
-
Header: CompareSelectHeader,
|
|
9
|
-
List: CompareSelectList,
|
|
10
|
-
Item: CompareSelectListItem,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default CompareSelect;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import CompareBox from "./components/box";
|
|
2
|
-
import CompareButton from "./components/button";
|
|
3
|
-
import CompareChart from "./components/chart";
|
|
4
|
-
import CompareSelect from "./components/select-list";
|
|
5
|
-
|
|
6
|
-
const Compare = {
|
|
7
|
-
Select: CompareSelect,
|
|
8
|
-
Button: CompareButton,
|
|
9
|
-
Box: CompareBox,
|
|
10
|
-
Chart: CompareChart,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default Compare;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import StyledCompareChartGraph from "./styles/styled-components/chart/graph";
|
|
2
|
-
import StyledCompareChartLayout from "./styles/styled-components/chart/layout";
|
|
3
|
-
import StyledCompareChartLegend from "./styles/styled-components/chart/legend";
|
|
4
|
-
import StyledCompareCommon from "./styles/styled-components/common";
|
|
5
|
-
import StyledCompareSelect from "./styles/styled-components/select-list";
|
|
6
|
-
|
|
7
|
-
const StyledCompare = {
|
|
8
|
-
...StyledCompareCommon,
|
|
9
|
-
select: StyledCompareSelect,
|
|
10
|
-
chart: {
|
|
11
|
-
...StyledCompareChartLayout,
|
|
12
|
-
legend: StyledCompareChartLegend,
|
|
13
|
-
graph: StyledCompareChartGraph,
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default StyledCompare;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--compare-select-list-item-margin: 3rem;
|
|
3
|
-
|
|
4
|
-
--compare-box-padding: 1.5rem;
|
|
5
|
-
--compare-box-text-margin: 1rem;
|
|
6
|
-
--compare-box-text-strong-size: 1.8rem;
|
|
7
|
-
--compare-box-text-sub-size: 1.6rem;
|
|
8
|
-
|
|
9
|
-
--compare-box-height: 2px + var(--compare-box-padding) * 2 +
|
|
10
|
-
var(--compare-box-text-strong-size) + var(--compare-box-text-sub-size) +
|
|
11
|
-
var(--compare-box-text-margin);
|
|
12
|
-
|
|
13
|
-
--compare-chart-item-padding: 2rem;
|
|
14
|
-
--compare-chart-legend-header-height: 3.5rem;
|
|
15
|
-
--compare-chart-legend-header-margin: 1.5rem;
|
|
16
|
-
--compare-chart-legend-contents-height: 8rem;
|
|
17
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { styled } from "styled-components";
|
|
4
|
-
|
|
5
|
-
const container = styled.div`
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 100%;
|
|
8
|
-
padding: 0 var(--page-padding-default);
|
|
9
|
-
`;
|
|
10
|
-
const item = styled.div`
|
|
11
|
-
width: 100%;
|
|
12
|
-
height: calc(
|
|
13
|
-
var(--compare-chart-item-padding) +
|
|
14
|
-
var(--compare-chart-legend-header-height) +
|
|
15
|
-
var(--compare-chart-legend-header-margin) +
|
|
16
|
-
var(--compare-chart-legend-contents-height)
|
|
17
|
-
);
|
|
18
|
-
margin-top: var(--compare-chart-item-padding);
|
|
19
|
-
background-color: var(--theme-background-20);
|
|
20
|
-
`;
|
|
21
|
-
const StyledCompareChartGraph = {
|
|
22
|
-
container,
|
|
23
|
-
item,
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export default StyledCompareChartGraph;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { styled } from "styled-components";
|
|
4
|
-
import { styleBaseSize } from "@uniai-fe/util-functions";
|
|
5
|
-
|
|
6
|
-
type StyledLayoutProps = Partial<{
|
|
7
|
-
$leftWidth: number | string;
|
|
8
|
-
}>;
|
|
9
|
-
const size = ({ $leftWidth }: StyledLayoutProps) =>
|
|
10
|
-
styleBaseSize("px", $leftWidth, 300);
|
|
11
|
-
const container = styled.div`
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: 100%;
|
|
14
|
-
border: 1px solid var(--color_30);
|
|
15
|
-
background-color: var(--color_0);
|
|
16
|
-
display: flex;
|
|
17
|
-
`;
|
|
18
|
-
const wrapper = styled.div`
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
display: flex;
|
|
22
|
-
`;
|
|
23
|
-
const left = styled.div<StyledLayoutProps>`
|
|
24
|
-
width: ${size};
|
|
25
|
-
`;
|
|
26
|
-
const right = styled.div<StyledLayoutProps>`
|
|
27
|
-
width: calc(100% - ${size});
|
|
28
|
-
border-left: 1px solid var(--color_30);
|
|
29
|
-
`;
|
|
30
|
-
|
|
31
|
-
const StyledCompareChartLayout = {
|
|
32
|
-
container,
|
|
33
|
-
wrapper,
|
|
34
|
-
left,
|
|
35
|
-
right,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export default StyledCompareChartLayout;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { styled } from "styled-components";
|
|
4
|
-
|
|
5
|
-
const container = styled.ul`
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 100%;
|
|
8
|
-
`;
|
|
9
|
-
|
|
10
|
-
const sectionContainer = styled.li`
|
|
11
|
-
width: 100%;
|
|
12
|
-
padding: var(--compare-chart-item-padding);
|
|
13
|
-
`;
|
|
14
|
-
const sectionHeader = styled.header`
|
|
15
|
-
height: var(--compare-chart-legend-header-height);
|
|
16
|
-
border-bottom: 1px solid var(--color_30);
|
|
17
|
-
margin-bottom: var(--compare-chart-legend-header-margin);
|
|
18
|
-
|
|
19
|
-
h4 {
|
|
20
|
-
font-size: 18px;
|
|
21
|
-
color: var(--color_90);
|
|
22
|
-
font-weight: 600;
|
|
23
|
-
line-height: 1em;
|
|
24
|
-
}
|
|
25
|
-
`;
|
|
26
|
-
type StyledLegendItemProps = Partial<{
|
|
27
|
-
$color: string;
|
|
28
|
-
}>;
|
|
29
|
-
const sectionContents = styled.ul<StyledLegendItemProps>`
|
|
30
|
-
width: 100%;
|
|
31
|
-
height: var(--compare-chart-legend-contents-height);
|
|
32
|
-
`;
|
|
33
|
-
const sectionLegendItem = styled.li<StyledLegendItemProps>`
|
|
34
|
-
margin-top: 10px;
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
|
|
38
|
-
figure {
|
|
39
|
-
width: 12px;
|
|
40
|
-
height: 12px;
|
|
41
|
-
margin-right: 8px;
|
|
42
|
-
border-radius: 4px;
|
|
43
|
-
background-color: ${({ $color }) => ($color ? $color : "var(--color_40)")};
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
span {
|
|
47
|
-
font-size: 16px;
|
|
48
|
-
color: var(--color_80);
|
|
49
|
-
}
|
|
50
|
-
`;
|
|
51
|
-
|
|
52
|
-
const section = {
|
|
53
|
-
container: sectionContainer,
|
|
54
|
-
header: sectionHeader,
|
|
55
|
-
contents: sectionContents,
|
|
56
|
-
legendItem: sectionLegendItem,
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
const StyledCompareChartLegend = {
|
|
60
|
-
container,
|
|
61
|
-
section,
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export default StyledCompareChartLegend;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { styled } from "styled-components";
|
|
4
|
-
|
|
5
|
-
const box = styled.div<{ $isDashed?: boolean }>`
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 100%;
|
|
8
|
-
padding: var(--compare-box-padding);
|
|
9
|
-
border-radius: 0.8rem;
|
|
10
|
-
border: 1px ${({ $isDashed }) => ($isDashed ? "dashed" : "solid")}
|
|
11
|
-
var(--color_30);
|
|
12
|
-
position: relative;
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
const boxText = styled.span`
|
|
16
|
-
display: block;
|
|
17
|
-
`;
|
|
18
|
-
|
|
19
|
-
const textStrong = styled(boxText)`
|
|
20
|
-
font-size: var(--compare-box-text-strong-size);
|
|
21
|
-
color: var(--color_90);
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
const textSub = styled(boxText)`
|
|
25
|
-
font-size: var(--compare-box-text-sub-size);
|
|
26
|
-
color: var(--color_60);
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
const text = {
|
|
30
|
-
common: boxText,
|
|
31
|
-
strong: textStrong,
|
|
32
|
-
sub: textSub,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const remove = styled.button`
|
|
36
|
-
width: fit-content;
|
|
37
|
-
height: fit-content;
|
|
38
|
-
font-size: 0;
|
|
39
|
-
display: flex;
|
|
40
|
-
align-items: center;
|
|
41
|
-
justify-content: center;
|
|
42
|
-
position: absolute;
|
|
43
|
-
top: 1rem;
|
|
44
|
-
right: 1rem;
|
|
45
|
-
`;
|
|
46
|
-
|
|
47
|
-
const button = {
|
|
48
|
-
remove,
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const StyledCompareCommon = {
|
|
52
|
-
box,
|
|
53
|
-
text,
|
|
54
|
-
button,
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export default StyledCompareCommon;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { styled } from "styled-components";
|
|
4
|
-
|
|
5
|
-
const container = styled.div`
|
|
6
|
-
width: calc(100% + var(--compare-select-list-item-margin));
|
|
7
|
-
margin: 0 calc(var(--compare-select-list-item-margin) / -2);
|
|
8
|
-
`;
|
|
9
|
-
|
|
10
|
-
const header = styled.header`
|
|
11
|
-
width: 100%;
|
|
12
|
-
margin-bottom: 2rem;
|
|
13
|
-
display: flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
`;
|
|
16
|
-
|
|
17
|
-
const item = styled.li`
|
|
18
|
-
padding: 0 calc(var(--compare-select-list-item-margin) / 2);
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
const list = styled.ul<{ $length: number }>`
|
|
22
|
-
width: 100%;
|
|
23
|
-
display: flex;
|
|
24
|
-
${item} {
|
|
25
|
-
width: calc(100% / ${({ $length }) => $length});
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
const StyledCompareSelect = {
|
|
30
|
-
container,
|
|
31
|
-
header,
|
|
32
|
-
list,
|
|
33
|
-
item,
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export default StyledCompareSelect;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useCallback, useRef, useState } from "react";
|
|
4
|
-
|
|
5
|
-
import DropdownContainer from "../../../dropdown/components/Container";
|
|
6
|
-
import FilterGroup from "./Group";
|
|
7
|
-
import FilterToggleButton from "./ToggleButton";
|
|
8
|
-
|
|
9
|
-
import StyledFilter from "../styles/styled-components/filter";
|
|
10
|
-
import type { FilterGroupDataType } from "../../../types";
|
|
11
|
-
import { useClickOutside } from "@uniai-fe/react-hooks";
|
|
12
|
-
|
|
13
|
-
export default function FilterContainer({
|
|
14
|
-
group,
|
|
15
|
-
}: {
|
|
16
|
-
group: FilterGroupDataType[];
|
|
17
|
-
}) {
|
|
18
|
-
const [isOpen, setOpen] = useState<boolean>(false);
|
|
19
|
-
const onToggle = useCallback(() => {
|
|
20
|
-
setOpen(prev => !prev);
|
|
21
|
-
}, []);
|
|
22
|
-
const onClose = useCallback(() => {
|
|
23
|
-
setOpen(false);
|
|
24
|
-
}, []);
|
|
25
|
-
|
|
26
|
-
const dropdownRef = useRef<HTMLDivElement | null>(null);
|
|
27
|
-
useClickOutside(dropdownRef, onClose);
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<StyledFilter.Parent ref={dropdownRef}>
|
|
31
|
-
<FilterToggleButton clickEvent={onToggle} />
|
|
32
|
-
<DropdownContainer isOpen={isOpen} horizontal="right" gap={7}>
|
|
33
|
-
{group.map(d => (
|
|
34
|
-
<FilterGroup {...d} key={d.groupKey} />
|
|
35
|
-
))}
|
|
36
|
-
</DropdownContainer>
|
|
37
|
-
</StyledFilter.Parent>
|
|
38
|
-
);
|
|
39
|
-
}
|