-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #240 from Lemoncode/epic/manfred2html-export-settings
finished configure and select settings
- Loading branch information
Showing
194 changed files
with
2,266 additions
and
421 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions
4
apps/react-app/src/common-app/components/codemirror/codemirror.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
126 changes: 0 additions & 126 deletions
126
apps/react-app/src/common-app/components/export-config/export-config.component.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from './modal.component' | ||
export * from './modal.component'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 22 additions & 3 deletions
25
apps/react-app/src/common-app/components/modal/modal.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
apps/react-app/src/common-app/components/select/customSelect.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from 'react'; | ||
import { cx } from '@emotion/css'; | ||
import * as classes from './customSelect.styles'; | ||
|
||
interface Props { | ||
listOptions: string[]; | ||
label: string; | ||
onSelectedOption: (option: string) => void; | ||
} | ||
export const CustomSelect: React.FC<Props> = props => { | ||
const { listOptions, label, onSelectedOption } = props; | ||
const [isOpen, setIsOpen] = React.useState<boolean>(false); | ||
const [selectedOption, setSelectedOption] = React.useState<string>(listOptions[0]); | ||
|
||
const toggleIsOpen = () => { | ||
setIsOpen(!isOpen); | ||
}; | ||
|
||
const handleOnMouseLeave = () => isOpen && toggleIsOpen(); | ||
|
||
const handleOptionSelect = (option: string) => { | ||
onSelectedOption(option); | ||
setSelectedOption(option); | ||
setIsOpen(false); | ||
}; | ||
|
||
return ( | ||
<div className={classes.selectContainer} onMouseLeave={handleOnMouseLeave}> | ||
<span className={classes.label}>{label}</span> | ||
<div className={classes.selectContent} onClick={toggleIsOpen}> | ||
<span>{selectedOption}</span> | ||
<img src="./assets/arrow_select.svg" alt="arrow select" className={classes.rotate(isOpen)} /> | ||
</div> | ||
{isOpen && ( | ||
<ul | ||
className={cx(classes.listContainer, { | ||
[classes.listContainerOpenAnimation]: isOpen, | ||
[classes.listContainerCloseAnimation]: !isOpen, | ||
})} | ||
> | ||
{listOptions && | ||
listOptions.map((option, index) => ( | ||
<li key={index} onClick={() => handleOptionSelect(option)}> | ||
{option} | ||
{index === 0 && ' (por defecto)'} | ||
</li> | ||
))} | ||
</ul> | ||
)} | ||
</div> | ||
); | ||
}; |
124 changes: 124 additions & 0 deletions
124
apps/react-app/src/common-app/components/select/customSelect.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
import { css, keyframes } from '@emotion/css'; | ||
import { theme } from '@/core/theme'; | ||
|
||
export const selectContainer = css` | ||
position: relative; | ||
display: flex; | ||
flex-direction: column; | ||
gap: ${theme.spacing(2)}; | ||
@media (min-width: 725px) { | ||
flex-grow: 1; | ||
width: 100%; | ||
} | ||
`; | ||
|
||
export const label = css` | ||
flex-grow: 1; | ||
color: ${theme.palette.dark[300]}; | ||
font-family: Inter; | ||
font-size: 12px; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: 22px; | ||
letter-spacing: 0.15px; | ||
padding: 0 ${theme.spacing(2)}; | ||
background-color: ${theme.palette.info[50]}; | ||
position: absolute; | ||
top: -${theme.spacing(3)}; | ||
left: ${theme.spacing(3)}; | ||
`; | ||
export const selectContent = css` | ||
cursor: pointer; | ||
display: flex; | ||
padding: ${theme.spacing(3)} ${theme.spacing(4)}; | ||
align-items: flex-start; | ||
gap: ${theme.spacing(2)}; | ||
align-self: stretch; | ||
border: 1px solid ${theme.palette.info[600]}; | ||
border-radius: 8px; | ||
background: ${theme.palette.info[50]}; | ||
span { | ||
flex-grow: 1; | ||
color: ${theme.palette.dark[900]}; | ||
font-family: Inter; | ||
font-size: 16px; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: 22px; | ||
letter-spacing: 0.15px; | ||
} | ||
`; | ||
|
||
const slideDown = keyframes` | ||
from { | ||
max-height: 0; | ||
opacity: 0; | ||
} | ||
to { | ||
max-height: min-content; | ||
opacity: 1; | ||
} | ||
`; | ||
|
||
const slideUp = keyframes` | ||
from { | ||
max-height: min-content; | ||
opacity: 1; | ||
} | ||
to { | ||
max-height: 0; | ||
opacity: 0; | ||
} | ||
`; | ||
|
||
export const listContainerOpenAnimation = css` | ||
animation: ${slideDown} 0.3s ease forwards; | ||
`; | ||
export const listContainerCloseAnimation = css` | ||
animation: ${slideUp} 0.3s ease forwards; | ||
`; | ||
|
||
export const listContainer = css` | ||
opacity: 0; | ||
max-height: 0; | ||
overflow: hidden; | ||
position: absolute; | ||
top: ${theme.spacing(12)}; | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
z-index: 999; | ||
padding: ${theme.spacing(2)} ${theme.spacing(0)}; | ||
gap: ${theme.spacing(2)}; | ||
border-radius: 4px; | ||
background: ${theme.palette.info[50]}; | ||
box-shadow: 0px 2px 6px 2px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.3); | ||
li { | ||
cursor: pointer; | ||
display: flex; | ||
height: ${theme.spacing(8)}; | ||
padding: ${theme.spacing(0)} ${theme.spacing(4)}; | ||
justify-content: flex-start; | ||
align-items: center; | ||
color: ${theme.palette.dark[900]}; | ||
font-family: Inter; | ||
font-size: 14px; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: 20px; | ||
letter-spacing: 0.25px; | ||
:hover { | ||
background: ${theme.palette.primary[50]}; | ||
} | ||
} | ||
`; | ||
|
||
export const rotate = (rotate: boolean) => css` | ||
rotate: ${rotate ? '180deg' : '0deg'}; | ||
transition: rotate 0.3s ease; | ||
`; |
Oops, something went wrong.