@tmf_ciclica/ciclicastorybook 1.0.10 → 1.0.14
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/package.json +22 -52
- package/.storybook/main.js +0 -21
- package/.storybook/preview.jsx +0 -31
- package/eslint.config.js +0 -38
- package/index.html +0 -13
- package/public/vite.svg +0 -1
- package/src/App.css +0 -0
- package/src/App.jsx +0 -36
- package/src/_variables.scss +0 -56
- package/src/assets/img/arrowDown.svg +0 -3
- package/src/assets/img/closeIcon.svg +0 -4
- package/src/assets/img/copyIcon.svg +0 -17
- package/src/assets/img/deleteIcon.svg +0 -6
- package/src/assets/img/eyeActiveIcon.svg +0 -6
- package/src/assets/img/eyeNotActiveIcon.svg +0 -8
- package/src/assets/img/filtersIcon.svg +0 -6
- package/src/assets/img/langarrow.png +0 -0
- package/src/assets/img/pause.svg +0 -5
- package/src/assets/img/play.svg +0 -4
- package/src/assets/img/processingIcon.svg +0 -20
- package/src/assets/img/sample-image.png +0 -0
- package/src/assets/img/sample2.png +0 -0
- package/src/assets/img/world.svg +0 -3
- package/src/assets/mapStyles/mapStyle.js +0 -781
- package/src/components/AmbitSelector/AmbitItem/AmbitItem.jsx +0 -74
- package/src/components/AmbitSelector/AmbitItem/AmbitItem.module.scss +0 -27
- package/src/components/AmbitSelector/AmbitSelector.jsx +0 -68
- package/src/components/AmbitSelector/AmbitSelector.module.scss +0 -29
- package/src/components/AmbitSelector/AmbitSelector.stories.jsx +0 -21
- package/src/components/ButtonsList/ButtonsList.jsx +0 -92
- package/src/components/ButtonsList/ButtonsList.module.scss +0 -37
- package/src/components/ButtonsList/ButtonsList.stories.jsx +0 -55
- package/src/components/DropdownList/DropdownList.jsx +0 -69
- package/src/components/DropdownList/DropdownList.module.scss +0 -20
- package/src/components/DropdownList/DropdownList.stories.jsx +0 -22
- package/src/components/DropdownList/DropdownListExample/DropDownListExample.jsx +0 -33
- package/src/components/DropdownList/DropdownListExample/DropdownListExample.stories.jsx +0 -11
- package/src/components/EditAmbit/EditAmbit.jsx +0 -7
- package/src/components/FiltersAmbit/AppliedFilters/AppliedFilters.jsx +0 -57
- package/src/components/FiltersAmbit/AppliedFilters/AppliedFilters.module.scss +0 -13
- package/src/components/FiltersAmbit/AppliedFilters/AppliedFilters.stories.jsx +0 -47
- package/src/components/FiltersAmbit/FiltersAmbit.jsx +0 -58
- package/src/components/FiltersAmbit/FiltersAmbit.module.scss +0 -28
- package/src/components/FiltersAmbit/FiltersAmbit.stories.jsx +0 -36
- package/src/components/FiltersAmbit/GeographicFilters/GeographicalFilters.jsx +0 -33
- package/src/components/FiltersAmbit/GeographicFilters/GeographicalFilters.module.scss +0 -13
- package/src/components/FiltersAmbit/GeographicFilters/GeographicalFilters.stories.jsx +0 -47
- package/src/components/FiltersAmbit/TematicalFilters/TematicalFilters.jsx +0 -83
- package/src/components/FiltersAmbit/TematicalFilters/TematicalFilters.module.scss +0 -8
- package/src/components/FiltersAmbit/TematicalFilters/TematicalFilters.stories.jsx +0 -17
- package/src/components/FiltersAmbit/TematicalFilters/TematicalFiltersCategory/TematicalFiltersCategory.jsx +0 -60
- package/src/components/FiltersAmbit/TematicalFilters/TematicalFiltersInput/AbsoluteSlider/AbsoluteSlider.jsx +0 -61
- package/src/components/FiltersAmbit/TematicalFilters/TematicalFiltersInput/AbsoluteSlider/AbsoluteSlider.module.scss +0 -45
- package/src/components/FiltersAmbit/TematicalFilters/TematicalFiltersInput/CategoryCheckbox/CategoryChackbox.module.scss +0 -18
- package/src/components/FiltersAmbit/TematicalFilters/TematicalFiltersInput/CategoryCheckbox/CategoryCheckbox.jsx +0 -47
- package/src/components/FiltersAmbit/TematicalFilters/TematicalFiltersInput/TematicalFiltersInput.jsx +0 -267
- package/src/components/FiltersAmbit/TematicalFilters/TematicalFiltersInput/TematicalFiltersInput.module.scss +0 -31
- package/src/components/FiltersAmbit/TematicalFilters/TematicalFiltersSubcat/TematicalFiltersSubcat.jsx +0 -58
- package/src/components/FiltersAmbit/useAmbitStore.jsx +0 -10
- package/src/components/Graphic/BarChart/BarChart.jsx +0 -146
- package/src/components/Graphic/BarChart/BarChart.module.scss +0 -5
- package/src/components/Graphic/BarChart/BarChart.stories.jsx +0 -18
- package/src/components/Graphic/Graphic.jsx +0 -55
- package/src/components/Graphic/Graphic.module.scss +0 -12
- package/src/components/Graphic/Graphic.stories.jsx +0 -25
- package/src/components/IndicatorsList/Indicator/Indicator.jsx +0 -180
- package/src/components/IndicatorsList/Indicator/Indicator.module.scss +0 -46
- package/src/components/IndicatorsList/IndicatorSubCategory/IndicatorSubCategory.jsx +0 -76
- package/src/components/IndicatorsList/IndicatorSubCategory/IndicatorSubCategory.module.scss +0 -12
- package/src/components/IndicatorsList/IndicatorsCategory/IndicatorsCategory.jsx +0 -122
- package/src/components/IndicatorsList/IndicatorsCategory/IndicatorsCategory.module.scss +0 -20
- package/src/components/IndicatorsList/IndicatorsList.jsx +0 -173
- package/src/components/IndicatorsList/IndicatorsList.module.scss +0 -10
- package/src/components/IndicatorsList/IndicatorsList.stories.jsx +0 -263
- package/src/components/LangSelector/LangSelector.jsx +0 -70
- package/src/components/LangSelector/LangSelector.module.scss +0 -41
- package/src/components/LangSelector/LangSelector.stories.jsx +0 -27
- package/src/components/Legend/Legend.jsx +0 -132
- package/src/components/Legend/Legend.module.scss +0 -121
- package/src/components/Legend/Legend.stories.jsx +0 -53
- package/src/components/LogoApp/LogoApp.jsx +0 -33
- package/src/components/LogoApp/LogoApp.module.scss +0 -7
- package/src/components/LogoApp/LogoApp.stories.jsx +0 -27
- package/src/components/MapboxMap/MapboxMap.jsx +0 -160
- package/src/components/MapboxMap/MapboxMap.module.scss +0 -4
- package/src/components/MapboxMap/MapboxMap.stories.jsx +0 -57
- package/src/components/MaplibreMap/MaplibreMap.jsx +0 -166
- package/src/components/MaplibreMap/MaplibreMap.module.scss +0 -5
- package/src/components/MaplibreMap/MaplibreMap.stories.jsx +0 -55
- package/src/components/SectionBar/SectionBar.jsx +0 -41
- package/src/components/SectionBar/SectionBar.module.scss +0 -40
- package/src/components/SectionBar/SectionBar.stories.jsx +0 -35
- package/src/components/TimeSlider/TimeSlider.jsx +0 -147
- package/src/components/TimeSlider/TimeSlider.module.scss +0 -63
- package/src/components/TimeSlider/TimeSlider.stories.jsx +0 -9
- package/src/components/Tooltip/Tooltip.jsx +0 -40
- package/src/components/Tooltip/Tooltip.module.scss +0 -141
- package/src/components/Tooltip/Tooltip.stories.jsx +0 -51
- package/src/components/TopNavMenu/TopNavMenu.jsx +0 -62
- package/src/components/TopNavMenu/TopNavMenu.module.scss +0 -21
- package/src/components/TopNavMenu/TopNavMenu.stories.jsx +0 -20
- package/src/components/UserMenuTrigger/UserMenuTrigger.jsx +0 -47
- package/src/components/UserMenuTrigger/UserMenuTrigger.module.scss +0 -5
- package/src/components/UserMenuTrigger/UserMenuTrigger.stories.jsx +0 -33
- package/src/components/index.jsx +0 -17
- package/src/constants/indicators.js +0 -1371
- package/src/constants/mapTexts.js +0 -161
- package/src/constants/textLayers.js +0 -639
- package/src/constants/topNavMenuOptions.js +0 -14
- package/src/i18n.js +0 -19
- package/src/index.jsx +0 -2
- package/src/index.scss +0 -87
- package/src/locales/ca.json +0 -8
- package/src/locales/es.json +0 -15
- package/src/main.jsx +0 -10
- package/src/sections/HeaderSection/HeaderSection.jsx +0 -51
- package/src/sections/HeaderSection/HeaderSection.module.scss +0 -33
- package/src/sections/HeaderSection/HeaderSection.stories.jsx +0 -61
- package/src/sections/RightSidebar/RightSidebar.jsx +0 -35
- package/src/sections/RightSidebar/RightSidebar.module.scss +0 -39
- package/src/sections/RightSidebar/RightSidebar.stories.jsx +0 -21
- package/src/sections/index.jsx +0 -2
- package/src/store/index.js +0 -1
- package/src/store/mapSlice/index.js +0 -1
- package/src/store/mapSlice/mapSlice.js +0 -30
- package/src/store/rightBarSlice/index.js +0 -1
- package/src/store/rightBarSlice/rightBarSlice.js +0 -28
- package/src/store/routerSlice/index.js +0 -1
- package/src/store/routerSlice/routerSlice.js +0 -14
- package/src/store/store.js +0 -14
- package/src/store/userSlice/index.js +0 -1
- package/src/store/userSlice/userSlice.js +0 -22
- package/tmf_ciclica-ciclicastorybook-1.0.8.tgz +0 -0
- package/vite.config.js +0 -49
package/src/index.scss
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
body,
|
|
2
|
-
*,
|
|
3
|
-
*::before,
|
|
4
|
-
*::after {
|
|
5
|
-
margin: 0;
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
font-family: $mainFont;
|
|
8
|
-
padding: 0px;
|
|
9
|
-
}
|
|
10
|
-
html,
|
|
11
|
-
body {
|
|
12
|
-
height: 100%;
|
|
13
|
-
-webkit-font-smoothing: antialiased;
|
|
14
|
-
-moz-osx-font-smoothing: grayscale;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* Elimina estilos de lista */
|
|
18
|
-
ul,
|
|
19
|
-
ol {
|
|
20
|
-
list-style: none;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/* Elimina decoración de enlaces */
|
|
24
|
-
a,
|
|
25
|
-
.link {
|
|
26
|
-
text-decoration: none;
|
|
27
|
-
cursor: pointer;
|
|
28
|
-
color: inherit;
|
|
29
|
-
}
|
|
30
|
-
button {
|
|
31
|
-
cursor: pointer;
|
|
32
|
-
}
|
|
33
|
-
/* Botones y formularios sin estilos base del navegador */
|
|
34
|
-
button,
|
|
35
|
-
input,
|
|
36
|
-
textarea,
|
|
37
|
-
select {
|
|
38
|
-
font: inherit;
|
|
39
|
-
background: none;
|
|
40
|
-
border: none;
|
|
41
|
-
outline: none;
|
|
42
|
-
padding: 0;
|
|
43
|
-
margin: 0;
|
|
44
|
-
color: inherit;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/* Imágenes responsivas */
|
|
48
|
-
img,
|
|
49
|
-
picture,
|
|
50
|
-
video,
|
|
51
|
-
canvas,
|
|
52
|
-
svg {
|
|
53
|
-
display: block;
|
|
54
|
-
max-width: 100%;
|
|
55
|
-
height: auto;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
p,
|
|
59
|
-
div {
|
|
60
|
-
@include fontBase();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
h1 {
|
|
64
|
-
@include fontTitols();
|
|
65
|
-
}
|
|
66
|
-
h2 {
|
|
67
|
-
@include fontSubtitols();
|
|
68
|
-
}
|
|
69
|
-
h3 {
|
|
70
|
-
@include fontBaseSemi();
|
|
71
|
-
}
|
|
72
|
-
.tooltip-parent {
|
|
73
|
-
position: relative;
|
|
74
|
-
width: fit-content;
|
|
75
|
-
|
|
76
|
-
.tooltip {
|
|
77
|
-
display: none;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&:hover {
|
|
81
|
-
.tooltip {
|
|
82
|
-
display:flex;
|
|
83
|
-
align-items: center;
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
package/src/locales/ca.json
DELETED
package/src/locales/es.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"login": "Acceso",
|
|
3
|
-
"indicators": "Indicadores",
|
|
4
|
-
"TopNavMenu": {
|
|
5
|
-
"opt1": "Test1",
|
|
6
|
-
"opt2": "Test2",
|
|
7
|
-
"opt3": "Test3"
|
|
8
|
-
},
|
|
9
|
-
"indicators": {
|
|
10
|
-
"indicators": "Indicadores",
|
|
11
|
-
"arq": "Arquitectónicos",
|
|
12
|
-
"arq_princ": "Indicadores principales"
|
|
13
|
-
},
|
|
14
|
-
"sampleText": "Texto test"
|
|
15
|
-
}
|
package/src/main.jsx
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Esta sección muestra una barra superior como Header de la aplicación. Permite mostrar elementos en los dos extremos de esta barra.
|
|
3
|
-
Los args que recibe son propiedades css y listados de componentes.
|
|
4
|
-
Propiedades css= backgroundColor y height
|
|
5
|
-
Listados de componentes:
|
|
6
|
-
leftComponents[]=>componentes que van en el extremo izquierdo de la barra, uno al lado del otro, ordenados de izquierda a derecha
|
|
7
|
-
rightComponents[]=>componentes que van en el extremo derecho de la barra, uno al lado del otro, ordenados de derecha a izquierda
|
|
8
|
-
centerComponents[]
|
|
9
|
-
los componentes se pasan como elementos jsx (ej: <Logo src={x} />)
|
|
10
|
-
*/
|
|
11
|
-
import PropTypes from 'prop-types';
|
|
12
|
-
//styles
|
|
13
|
-
import styles from './HeaderSection.module.scss';
|
|
14
|
-
|
|
15
|
-
export const HeaderSection = ({ cssProps, leftComponents = [], centerComponents = [], rightComponents = [] }) => {
|
|
16
|
-
return (
|
|
17
|
-
<div className={styles.header} style={cssProps}>
|
|
18
|
-
<div className={styles.leftComponents} style={{ height: cssProps.height }}>
|
|
19
|
-
{leftComponents.map((component, index) => (
|
|
20
|
-
<div style={{ height: cssProps.height }} key={index}>{component}</div>
|
|
21
|
-
))}
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
<div className={styles.centerComponents} style={{ height: cssProps.height }}>
|
|
25
|
-
{centerComponents.map((component, index) => (
|
|
26
|
-
<div style={{ height: cssProps.height }} key={index}>{component}</div>
|
|
27
|
-
))}
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div className={styles.rightComponents} style={{ height: cssProps.height }}>
|
|
33
|
-
{rightComponents.map((component, index) => (
|
|
34
|
-
<div style={{ height: cssProps.height }} key={index}>{component}</div>
|
|
35
|
-
))}
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
HeaderSection.propTypes = {
|
|
42
|
-
cssProps: PropTypes.shape({
|
|
43
|
-
backgroundColor: PropTypes.string.isRequired,
|
|
44
|
-
height: PropTypes.string.isRequired,
|
|
45
|
-
borderColor: PropTypes.string,
|
|
46
|
-
textColor: PropTypes.string
|
|
47
|
-
}),
|
|
48
|
-
leftComponents: PropTypes.arrayOf(PropTypes.node),
|
|
49
|
-
centerComponents: PropTypes.arrayOf(PropTypes.node),
|
|
50
|
-
rightComponents: PropTypes.arrayOf(PropTypes.node),
|
|
51
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
.header {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: $headerHeight;
|
|
4
|
-
display: flex;
|
|
5
|
-
align-items: center;
|
|
6
|
-
position: relative;
|
|
7
|
-
padding: 0 16px;
|
|
8
|
-
background-color: #fff;
|
|
9
|
-
border-bottom: 1px solid black;
|
|
10
|
-
|
|
11
|
-
.leftComponents,
|
|
12
|
-
.centerComponents,
|
|
13
|
-
.rightComponents {
|
|
14
|
-
position: absolute;
|
|
15
|
-
top: 0;
|
|
16
|
-
bottom: 0;
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.leftComponents {
|
|
22
|
-
left: 16px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.centerComponents {
|
|
26
|
-
left: 50%;
|
|
27
|
-
transform: translateX(-50%);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.rightComponents {
|
|
31
|
-
right: 16px;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
// components
|
|
2
|
-
import { HeaderSection } from "./HeaderSection";
|
|
3
|
-
import { LangSelector } from "../../components/LangSelector/LangSelector";
|
|
4
|
-
import { LogoApp } from "../../components/LogoApp/LogoApp";
|
|
5
|
-
import Options from '../../constants/topNavMenuOptions'
|
|
6
|
-
import { TopNavMenu } from "../../components/TopNavMenu/TopNavMenu";
|
|
7
|
-
import { UserMenuTrigger } from "../../components/UserMenuTrigger/UserMenuTrigger";
|
|
8
|
-
import arrow from '../../assets/img/arrowDown.svg'
|
|
9
|
-
//img
|
|
10
|
-
import sampleImg from "../../assets/img/sample2.png"
|
|
11
|
-
import world from '../../assets/img/world.svg'
|
|
12
|
-
export default {
|
|
13
|
-
component: HeaderSection,
|
|
14
|
-
title: "Sections/HeaderSection",
|
|
15
|
-
tags: ["header"],
|
|
16
|
-
args: {},
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const Default = {
|
|
20
|
-
args: {
|
|
21
|
-
cssProps: {
|
|
22
|
-
backgroundColor: "#605B56",
|
|
23
|
-
height: "60px",
|
|
24
|
-
},
|
|
25
|
-
leftComponents: [<LogoApp key="logo" alt="alt" />], // Agrega "key" a cada componente dentro de un array
|
|
26
|
-
rightComponents: [<UserMenuTrigger key="menu" />],
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
const langs = [
|
|
30
|
-
{ code: 'ca', title: 'Català', titleSelected: 'Ca' },
|
|
31
|
-
{ code: 'es', title: 'Español', titleSelected: 'Es' }
|
|
32
|
-
]
|
|
33
|
-
|
|
34
|
-
export const WithLangSelector = {
|
|
35
|
-
args: {
|
|
36
|
-
cssProps: {
|
|
37
|
-
backgroundColor: "#605B56",
|
|
38
|
-
},
|
|
39
|
-
leftComponents: [<LogoApp key="logo" src={sampleImg} alt="My Logo" />],
|
|
40
|
-
rightComponents: [
|
|
41
|
-
<UserMenuTrigger key="menu2" />,
|
|
42
|
-
<LangSelector key="logo2" langs={langs} arrow={arrow} imgPrev={world} />,
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const WithNavbar = {
|
|
48
|
-
args: {
|
|
49
|
-
cssProps: {
|
|
50
|
-
backgroundColor: "#605B56",
|
|
51
|
-
borderColor: '#777777',
|
|
52
|
-
textColor: '#F8A925'
|
|
53
|
-
},
|
|
54
|
-
leftComponents: [<LogoApp key="logo" src={sampleImg} alt="My Logo" />],
|
|
55
|
-
centerComponents: [<TopNavMenu key="topMenu" options={Options} />],
|
|
56
|
-
rightComponents: [
|
|
57
|
-
<UserMenuTrigger key="menu2" />,
|
|
58
|
-
<LangSelector key="logo2" langs={langs} arrow={arrow} imgPrev={world} />,
|
|
59
|
-
],
|
|
60
|
-
},
|
|
61
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
2
|
-
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { setShowRightBar } from '../../store/rightBarSlice';
|
|
5
|
-
import styles from './RightSidebar.module.scss';
|
|
6
|
-
|
|
7
|
-
export const RightSidebar = ({ width = '300px', children }) => {
|
|
8
|
-
const showRightBar = useSelector((state) => state.rightBarState.showRightBar);
|
|
9
|
-
const dispatch = useDispatch();
|
|
10
|
-
|
|
11
|
-
const handleClose = () => {
|
|
12
|
-
dispatch(setShowRightBar(false));
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<div
|
|
17
|
-
className={`${styles.sidebar} ${showRightBar ? styles.open : ''}`}
|
|
18
|
-
style={{ width: showRightBar ? width : 0 }}
|
|
19
|
-
>
|
|
20
|
-
{showRightBar && (
|
|
21
|
-
<div className={styles.content}>
|
|
22
|
-
<button className={styles.closeButton} onClick={handleClose}>
|
|
23
|
-
×
|
|
24
|
-
</button>
|
|
25
|
-
{children}
|
|
26
|
-
</div>
|
|
27
|
-
)}
|
|
28
|
-
</div>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
RightSidebar.propTypes = {
|
|
33
|
-
width: PropTypes.string,
|
|
34
|
-
children: PropTypes.node,
|
|
35
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
.sidebar {
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
right: 0;
|
|
5
|
-
height: 100%;
|
|
6
|
-
background-color: #ffffff;
|
|
7
|
-
box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
|
|
8
|
-
overflow-x: hidden;
|
|
9
|
-
overflow-y: auto;
|
|
10
|
-
transition: width 0.3s ease;
|
|
11
|
-
z-index: 1000;
|
|
12
|
-
width: 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.open {
|
|
16
|
-
border-left: 1px solid #ddd;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.content {
|
|
20
|
-
position: relative;
|
|
21
|
-
padding: 20px;
|
|
22
|
-
height: 100%;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.closeButton {
|
|
26
|
-
position: absolute;
|
|
27
|
-
top: 10px;
|
|
28
|
-
right: 10px;
|
|
29
|
-
font-size: 24px;
|
|
30
|
-
background: none;
|
|
31
|
-
border: none;
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
color: #333;
|
|
34
|
-
transition: color 0.2s ease;
|
|
35
|
-
|
|
36
|
-
&:hover {
|
|
37
|
-
color: #000;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import {RightSidebar} from './RightSidebar';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Sections/RightSidebar',
|
|
6
|
-
component: RightSidebar,
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const Template = (args) => (
|
|
12
|
-
|
|
13
|
-
<RightSidebar {...args} />
|
|
14
|
-
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
export const Default = Template.bind({});
|
|
18
|
-
Default.args = {
|
|
19
|
-
width: '300px',
|
|
20
|
-
children: <div>Contenido del sidebar</div>,
|
|
21
|
-
};
|
package/src/sections/index.jsx
DELETED
package/src/store/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './store'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './mapSlice.js'
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { createSlice } from "@reduxjs/toolkit"
|
|
2
|
-
|
|
3
|
-
export const mapSlice = createSlice({
|
|
4
|
-
name: 'mapSlice',
|
|
5
|
-
initialState: {
|
|
6
|
-
showTexts: true,
|
|
7
|
-
sliderSelectedYear: 2025,
|
|
8
|
-
activeIndicatorKey: 0,
|
|
9
|
-
activeIndicatorType: 'cat',
|
|
10
|
-
activeIndicatorUnit: null
|
|
11
|
-
},
|
|
12
|
-
reducers: {
|
|
13
|
-
setShowTexts: (state, action) => {
|
|
14
|
-
state.showTexts = action.payload
|
|
15
|
-
},
|
|
16
|
-
setYear: (state, action) => {
|
|
17
|
-
state.sliderSelectedYear = action.payload
|
|
18
|
-
},
|
|
19
|
-
setActiveIndicatorKey: (state, action) => {
|
|
20
|
-
state.activeIndicatorKey = action.payload
|
|
21
|
-
},
|
|
22
|
-
setActiveIndicatorType: (state, action) => {
|
|
23
|
-
state.activeIndicatorType = action.payload
|
|
24
|
-
},
|
|
25
|
-
setActiveIndicatorUnit: (state, action) => {
|
|
26
|
-
state.activeIndicatorUnit = action.payload
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
})
|
|
30
|
-
export const { setShowTexts, setYear, setActiveIndicatorKey, setActiveIndicatorType, setActiveIndicatorUnit } = mapSlice.actions
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './rightBarSlice'
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
3
|
-
|
|
4
|
-
export const rightBarSlice = createSlice({
|
|
5
|
-
name: 'rightBar',
|
|
6
|
-
initialState: {
|
|
7
|
-
showRightBar: true,
|
|
8
|
-
children: '',
|
|
9
|
-
width:'500px'
|
|
10
|
-
},
|
|
11
|
-
reducers: {
|
|
12
|
-
toggleRightBar: (state) => {
|
|
13
|
-
state.showRightBar = !state.showRightBar;
|
|
14
|
-
},
|
|
15
|
-
setShowRightBar: (state, action) => {
|
|
16
|
-
state.showRightBar = action.payload;
|
|
17
|
-
},
|
|
18
|
-
setRightBarChildren: (state, action) => {
|
|
19
|
-
state.children = action.payload
|
|
20
|
-
},
|
|
21
|
-
setRightBarWidth: (state, action) => {
|
|
22
|
-
state.width = action.payload
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
export const { toggleRightBar, setShowRightBar, setRightBarChildren, setRightBarWidth } = rightBarSlice.actions;
|
|
28
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './routerSlice.js'
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createSlice } from "@reduxjs/toolkit"
|
|
2
|
-
|
|
3
|
-
export const routerSlice = createSlice({
|
|
4
|
-
name: 'routerSlice',
|
|
5
|
-
initialState: {
|
|
6
|
-
currentRoute: false,
|
|
7
|
-
},
|
|
8
|
-
reducers: {
|
|
9
|
-
setCurrentRoute: (state, action) => {
|
|
10
|
-
state.showLogIn = action.payload
|
|
11
|
-
},
|
|
12
|
-
}
|
|
13
|
-
})
|
|
14
|
-
export const { setCurrentRoute } = routerSlice.actions
|
package/src/store/store.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { combineReducers, configureStore } from "@reduxjs/toolkit"
|
|
2
|
-
|
|
3
|
-
import { mapSlice } from "./mapSlice"
|
|
4
|
-
import { routerSlice } from "./routerSlice"
|
|
5
|
-
import { userSlice } from "./userSlice"
|
|
6
|
-
import { rightBarSlice } from "./rightBarSlice"
|
|
7
|
-
|
|
8
|
-
export const rootReducer = combineReducers({
|
|
9
|
-
userState: userSlice.reducer,
|
|
10
|
-
mapState: mapSlice.reducer,
|
|
11
|
-
routerState: routerSlice.reducer,
|
|
12
|
-
rightBarState: rightBarSlice.reducer
|
|
13
|
-
})
|
|
14
|
-
export const store = configureStore({ reducer: rootReducer })
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './userSlice'
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { createSlice } from "@reduxjs/toolkit"
|
|
2
|
-
|
|
3
|
-
export const userSlice = createSlice({
|
|
4
|
-
name: 'userSlice',
|
|
5
|
-
initialState: {
|
|
6
|
-
user: {
|
|
7
|
-
isLoggedIn: false,
|
|
8
|
-
username: '',
|
|
9
|
-
},
|
|
10
|
-
showLogIn: false,
|
|
11
|
-
showUserMenu: false,
|
|
12
|
-
},
|
|
13
|
-
reducers: {
|
|
14
|
-
setShowLogIn: (state, action) => {
|
|
15
|
-
state.showLogIn = action.payload
|
|
16
|
-
},
|
|
17
|
-
setShowUserMenu: (state, action) => {
|
|
18
|
-
state.showUserMenu = action.payload
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
})
|
|
22
|
-
export const { setShowLogIn, setShowUserMenu } = userSlice.actions
|
|
Binary file
|
package/vite.config.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vite"
|
|
2
|
-
import react from "@vitejs/plugin-react"
|
|
3
|
-
import path from "path"
|
|
4
|
-
// https://vite.dev/config/
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [react()],
|
|
7
|
-
resolve: {
|
|
8
|
-
extensions: ['.js', '.jsx', '.json'],
|
|
9
|
-
alias: {
|
|
10
|
-
"@": path.resolve(__dirname, "src"),
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
css: {
|
|
14
|
-
preprocessorOptions: {
|
|
15
|
-
scss: {
|
|
16
|
-
additionalData: `@use "@/_variables.scss" as *;`,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
build: {
|
|
21
|
-
lib: {
|
|
22
|
-
entry: path.resolve(__dirname, 'src/index.jsx'),
|
|
23
|
-
name: 'CiclicaStorybook',
|
|
24
|
-
fileName: (format) => `index.${format}.js`,
|
|
25
|
-
formats: ['es', 'cjs'],
|
|
26
|
-
},
|
|
27
|
-
rollupOptions: {
|
|
28
|
-
external: [
|
|
29
|
-
'react',
|
|
30
|
-
'react',
|
|
31
|
-
'react-dom',
|
|
32
|
-
'@mui/material',
|
|
33
|
-
'@emotion/react',
|
|
34
|
-
'@emotion/styled',
|
|
35
|
-
'@reduxjs/toolkit',
|
|
36
|
-
'react-redux',
|
|
37
|
-
'react-router-dom',
|
|
38
|
-
'i18next',
|
|
39
|
-
'react-i18next',
|
|
40
|
-
'mapbox-gl',
|
|
41
|
-
'maplibre-gl',
|
|
42
|
-
'd3',
|
|
43
|
-
'framer-motion',
|
|
44
|
-
'zustand'
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
cssCodeSplit: false
|
|
48
|
-
}
|
|
49
|
-
})
|