imbric-theme 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.babelrc.json +3 -0
- package/.commitlintrc.json +3 -0
- package/.dockerignore +14 -0
- package/.editorconfig +13 -0
- package/.eslintignore +1 -0
- package/.eslintrc.json +36 -0
- package/.huskyrc.json +6 -0
- package/.lintstagedrc.json +5 -0
- package/.nvmrc +1 -0
- package/.prettierignore +1 -0
- package/.prettierrc.json +4 -0
- package/.releaserc.json +13 -0
- package/.storybook/main.js +13 -0
- package/.storybook/preview-head.html +2 -0
- package/.storybook/preview.js +53 -0
- package/.stylelintrc.json +14 -0
- package/.vscode/launch.json +15 -0
- package/.vscode/settings.json +3 -0
- package/CHANGELOG.md +0 -0
- package/Dockerfile +17 -0
- package/README.md +69 -0
- package/atoms/AlertModal/AlertModal.js +69 -0
- package/atoms/AlertModal/AlertModal.module.css +3 -0
- package/atoms/AlertModal/AlertModal.stories.js +30 -0
- package/atoms/AlertModal/constants.js +4 -0
- package/atoms/AlertModal/index.js +3 -0
- package/atoms/Avatar/Avatar.js +36 -0
- package/atoms/Avatar/Avatar.module.css +3 -0
- package/atoms/Avatar/Avatar.stories.js +29 -0
- package/atoms/Avatar/__snapshots__/Avatar.stories.js.snap +105 -0
- package/atoms/Avatar/constants.js +3 -0
- package/atoms/Avatar/helpers.js +7 -0
- package/atoms/Avatar/index.js +3 -0
- package/atoms/Button/Button.js +83 -0
- package/atoms/Button/Button.module.css +85 -0
- package/atoms/Button/Button.stories.js +47 -0
- package/atoms/Button/Button.test.js +60 -0
- package/atoms/Button/__snapshots__/Button.stories.js.snap +191 -0
- package/atoms/Button/constants.js +3 -0
- package/atoms/Button/index.js +3 -0
- package/atoms/Card/Card.js +48 -0
- package/atoms/Card/Card.module.css +52 -0
- package/atoms/Card/Card.stories.js +41 -0
- package/atoms/Card/__snapshots__/Card.stories.js.snap +136 -0
- package/atoms/Card/constants.js +4 -0
- package/atoms/Card/index.js +3 -0
- package/atoms/Check/Check.js +28 -0
- package/atoms/Check/Check.module.css +11 -0
- package/atoms/Check/Check.stories.js +15 -0
- package/atoms/Check/__snapshots__/Check.stories.js.snap +67 -0
- package/atoms/Check/index.js +2 -0
- package/atoms/Checkbox/Checkbox.js +77 -0
- package/atoms/Checkbox/Checkbox.module.css +60 -0
- package/atoms/Checkbox/Checkbox.stories.js +30 -0
- package/atoms/Checkbox/constants.js +1 -0
- package/atoms/Checkbox/index.js +3 -0
- package/atoms/Divider/Divider.js +22 -0
- package/atoms/Divider/Divider.module.css +25 -0
- package/atoms/Divider/Divider.stories.js +23 -0
- package/atoms/Divider/__snapshots__/Divider.stories.js.snap +22 -0
- package/atoms/Divider/constants.js +3 -0
- package/atoms/Divider/index.js +3 -0
- package/atoms/Heading/Heading.js +37 -0
- package/atoms/Heading/Heading.module.css +70 -0
- package/atoms/Heading/Heading.stories.js +46 -0
- package/atoms/Heading/__snapshots__/Heading.stories.js.snap +189 -0
- package/atoms/Heading/constants.js +5 -0
- package/atoms/Heading/index.js +3 -0
- package/atoms/Icon/Icon.js +66 -0
- package/atoms/Icon/Icon.module.css +142 -0
- package/atoms/Icon/Icon.stories.js +48 -0
- package/atoms/Icon/__snapshots__/Icon.stories.js.snap +1311 -0
- package/atoms/Icon/constants.js +1091 -0
- package/atoms/Icon/helpers.js +9 -0
- package/atoms/Icon/index.js +3 -0
- package/atoms/Input/Input.js +229 -0
- package/atoms/Input/Input.module.css +83 -0
- package/atoms/Input/Input.stories.js +38 -0
- package/atoms/Input/__snapshots__/Input.stories.js.snap +101 -0
- package/atoms/Input/constants.js +3 -0
- package/atoms/Input/index.js +3 -0
- package/atoms/Label/Label.js +31 -0
- package/atoms/Label/Label.module.css +42 -0
- package/atoms/Label/Label.stories.js +26 -0
- package/atoms/Label/constants.js +1 -0
- package/atoms/Label/index.js +3 -0
- package/atoms/LinkItem/LinkItem.js +38 -0
- package/atoms/LinkItem/LinkItem.module.css +19 -0
- package/atoms/LinkItem/LinkItem.stories.js +30 -0
- package/atoms/LinkItem/__snapshots__/Link.stories.js.snap +118 -0
- package/atoms/LinkItem/constants.js +5 -0
- package/atoms/LinkItem/index.js +3 -0
- package/atoms/Loading/Loading.js +30 -0
- package/atoms/Loading/Loading.module.css +51 -0
- package/atoms/Loading/Loading.stories.js +17 -0
- package/atoms/Loading/__snapshots__/Loading.stories.js.snap +26 -0
- package/atoms/Loading/index.js +2 -0
- package/atoms/Modal/Modal.js +121 -0
- package/atoms/Modal/Modal.module.css +142 -0
- package/atoms/Modal/Modal.stories.js +43 -0
- package/atoms/Modal/__snapshots__/Modal.stories.js.snap +239 -0
- package/atoms/Modal/constants.js +1 -0
- package/atoms/Modal/index.js +3 -0
- package/atoms/Paragraph/Paragraph.js +56 -0
- package/atoms/Paragraph/Paragraph.module.css +72 -0
- package/atoms/Paragraph/Paragraph.stories.js +52 -0
- package/atoms/Paragraph/__snapshots__/Paragraph.stories.js.snap +230 -0
- package/atoms/Paragraph/constants.js +5 -0
- package/atoms/Paragraph/index.js +3 -0
- package/atoms/Picture/Picture.js +47 -0
- package/atoms/Picture/Picture.module.css +16 -0
- package/atoms/Picture/Picture.stories.js +32 -0
- package/atoms/Picture/__snapshots__/Picture.stories.js.snap +156 -0
- package/atoms/Picture/index.js +2 -0
- package/atoms/Tab/Tab.js +41 -0
- package/atoms/Tab/Tab.module.css +17 -0
- package/atoms/Tab/Tab.stories.js +27 -0
- package/atoms/Tab/constants.js +1 -0
- package/atoms/Tab/index.js +3 -0
- package/atoms/Textarea/Textarea.js +137 -0
- package/atoms/Textarea/Textarea.module.css +54 -0
- package/atoms/Textarea/Textarea.stories.js +16 -0
- package/atoms/Textarea/__snapshots__/Textarea.stories.js.snap +25 -0
- package/atoms/Textarea/index.js +2 -0
- package/atoms/Toggle/Toggle.js +56 -0
- package/atoms/Toggle/Toggle.module.css +41 -0
- package/atoms/Toggle/Toggle.stories.js +21 -0
- package/atoms/Toggle/constants.js +1 -0
- package/atoms/Toggle/index.js +3 -0
- package/codecov.yml +2 -0
- package/helpers/storybook.js +29 -0
- package/helpers/storybook.test.js +40 -0
- package/helpers/styles.js +37 -0
- package/helpers/styles.test.js +222 -0
- package/hocs/withStyles.js +17 -0
- package/hook/useAddColumn.js +40 -0
- package/hook/useMedia.js +22 -0
- package/hook/useStateDate.js +25 -0
- package/hook/useTable.js +54 -0
- package/index.js +71 -0
- package/jest.config.js +23 -0
- package/jest.setup.js +13 -0
- package/layout/CenteredContent/CenteredContent.js +30 -0
- package/layout/CenteredContent/CenteredContent.module.css +12 -0
- package/layout/CenteredContent/CenteredContent.stories.js +22 -0
- package/layout/CenteredContent/__snapshots__/CenteredContent.stories.js.snap +27 -0
- package/layout/CenteredContent/index.js +2 -0
- package/layout/Container/Container.js +29 -0
- package/layout/Container/Container.module.css +14 -0
- package/layout/Container/Container.stories.js +22 -0
- package/layout/Container/__snapshots__/Container.stories.js.snap +27 -0
- package/layout/Container/index.js +2 -0
- package/layout/DynamicTable/DynamicTable.js +372 -0
- package/layout/DynamicTable/DynamicTable.module.css +76 -0
- package/layout/DynamicTable/DynamicTable.stories.js +79 -0
- package/layout/DynamicTable/constants.js +323 -0
- package/layout/DynamicTable/index.js +3 -0
- package/layout/FlexColumnContent/FlexColumnContent.js +26 -0
- package/layout/FlexColumnContent/FlexColumnContent.module.css +5 -0
- package/layout/FlexColumnContent/FlexColumnContent.stories.js +28 -0
- package/layout/FlexColumnContent/constants.js +1 -0
- package/layout/FlexColumnContent/index.js +3 -0
- package/layout/FullHeightContent/FullHeightContent.js +40 -0
- package/layout/FullHeightContent/FullHeightContent.module.css +21 -0
- package/layout/FullHeightContent/FullHeightContent.stories.js +22 -0
- package/layout/FullHeightContent/__snapshots__/FullHeightContent.stories.js.snap +41 -0
- package/layout/FullHeightContent/index.js +2 -0
- package/layout/Navbar/Navbar.js +247 -0
- package/layout/Navbar/Navbar.module.css +35 -0
- package/layout/Navbar/Navbar.stories.js +20 -0
- package/layout/Navbar/constants.js +35 -0
- package/layout/Navbar/index.js +2 -0
- package/layout/Sidebar/Sidebar.js +115 -0
- package/layout/Sidebar/Sidebar.module.css +387 -0
- package/layout/Sidebar/Sidebar.stories.js +28 -0
- package/layout/Sidebar/constants.js +228 -0
- package/layout/Sidebar/index.js +3 -0
- package/layout/Spacer/Spacer.js +40 -0
- package/layout/Spacer/Spacer.module.css +12 -0
- package/layout/Spacer/Spacer.stories.js +25 -0
- package/layout/Spacer/__snapshots__/Spacer.stories.js.snap +97 -0
- package/layout/Spacer/components/Horizontal/Horizontal.js +43 -0
- package/layout/Spacer/components/Horizontal/Horizontal.stories.js +32 -0
- package/layout/Spacer/components/Horizontal/__snapshots__/Horizontal.stories.js.snap +97 -0
- package/layout/Spacer/components/Horizontal/index.js +1 -0
- package/layout/Spacer/components/Vertical/Vertical.js +31 -0
- package/layout/Spacer/components/Vertical/Vertical.stories.js +25 -0
- package/layout/Spacer/components/Vertical/__snapshots__/Vertical.stories.js.snap +85 -0
- package/layout/Spacer/components/Vertical/index.js +1 -0
- package/layout/Spacer/components/index.js +2 -0
- package/layout/Spacer/constants.js +5 -0
- package/layout/Spacer/helpers.js +3 -0
- package/layout/Spacer/index.js +3 -0
- package/molecules/Accordion/Accordion.js +70 -0
- package/molecules/Accordion/Accordion.module.css +12 -0
- package/molecules/Accordion/Accordion.stories.js +31 -0
- package/molecules/Accordion/__snapshots__/Accordion.stories.js.snap +228 -0
- package/molecules/Accordion/index.js +2 -0
- package/molecules/AddButton/AddButton.js +137 -0
- package/molecules/AddButton/AddButton.module.css +128 -0
- package/molecules/AddButton/AddButton.stories.js +47 -0
- package/molecules/AddButton/__snapshots__/AddButton.stories.js.snap +326 -0
- package/molecules/AddButton/constants.js +6 -0
- package/molecules/AddButton/handlers.js +58 -0
- package/molecules/AddButton/handlers.test.js +19 -0
- package/molecules/AddButton/helpers.js +6 -0
- package/molecules/AddButton/helpers.test.js +41 -0
- package/molecules/AddButton/hooks.js +14 -0
- package/molecules/AddButton/index.js +3 -0
- package/molecules/ButtonIcon/ButtonIcon.js +41 -0
- package/molecules/ButtonIcon/ButtonIcon.stories.js +27 -0
- package/molecules/ButtonIcon/__snapshots__/ButtonIcon.stories.js.snap +178 -0
- package/molecules/ButtonIcon/constants.js +6 -0
- package/molecules/ButtonIcon/index.js +2 -0
- package/molecules/CardDefault/CardDefault.js +65 -0
- package/molecules/CardDefault/CardDefault.module.css +19 -0
- package/molecules/CardDefault/CardDefault.stories.js +23 -0
- package/molecules/CardDefault/constants.js +1 -0
- package/molecules/CardDefault/index.js +3 -0
- package/molecules/CardProductTypesBooking/CardProductTypesBooking.js +89 -0
- package/molecules/CardProductTypesBooking/CardProductTypesBooking.module.css +118 -0
- package/molecules/CardProductTypesBooking/CardProductTypesBooking.stories.js +25 -0
- package/molecules/CardProductTypesBooking/constants.js +1 -0
- package/molecules/CardProductTypesBooking/index.js +3 -0
- package/molecules/CardServiceDetail/CardServiceDetail.js +400 -0
- package/molecules/CardServiceDetail/CardServiceDetail.module.css +222 -0
- package/molecules/CardServiceDetail/CardServiceDetail.stories.js +23 -0
- package/molecules/CardServiceDetail/constants.js +1 -0
- package/molecules/CardServiceDetail/index.js +3 -0
- package/molecules/CardServices/CardServices.js +461 -0
- package/molecules/CardServices/CardServices.module.css +213 -0
- package/molecules/CardServices/CardServices.stories.js +41 -0
- package/molecules/CardServices/constants.js +5 -0
- package/molecules/CardServices/index.js +3 -0
- package/molecules/CardServicesFinalized/CardServicesFinalized.js +381 -0
- package/molecules/CardServicesFinalized/CardServicesFinalized.module.css +213 -0
- package/molecules/CardServicesFinalized/CardServicesFinalized.stories.js +23 -0
- package/molecules/CardServicesFinalized/constants.js +1 -0
- package/molecules/CardServicesFinalized/index.js +3 -0
- package/molecules/CheckList/CheckList.js +135 -0
- package/molecules/CheckList/CheckList.module.css +94 -0
- package/molecules/CheckList/CheckList.stories.js +25 -0
- package/molecules/CheckList/constants.js +23 -0
- package/molecules/CheckList/index.js +3 -0
- package/molecules/ColumnTable/ColumnTable.js +154 -0
- package/molecules/ColumnTable/ColumnTable.module.css +51 -0
- package/molecules/ColumnTable/ColumnTable.stories.js +26 -0
- package/molecules/ColumnTable/constants.js +117 -0
- package/molecules/ColumnTable/index.js +3 -0
- package/molecules/DatePicker/DatePicker.js +242 -0
- package/molecules/DatePicker/DatePicker.module.css +38 -0
- package/molecules/DatePicker/DatePicker.stories.js +23 -0
- package/molecules/DatePicker/constants.js +3 -0
- package/molecules/DatePicker/index.js +3 -0
- package/molecules/DatePickerTime/DatePickerTime.js +133 -0
- package/molecules/DatePickerTime/DatePickerTime.module.css +3 -0
- package/molecules/DatePickerTime/DatePickerTime.stories.js +18 -0
- package/molecules/DatePickerTime/constants.js +1 -0
- package/molecules/DatePickerTime/index.js +3 -0
- package/molecules/Dropdown/Dropdown.js +62 -0
- package/molecules/Dropdown/Dropdown.module.css +52 -0
- package/molecules/Dropdown/Dropdown.stories.js +41 -0
- package/molecules/Dropdown/__snapshots__/Dropdown.stories.js.snap +181 -0
- package/molecules/Dropdown/index.js +2 -0
- package/molecules/DynamicSelect/DynamicSelect.js +186 -0
- package/molecules/DynamicSelect/DynamicSelect.module.css +10 -0
- package/molecules/DynamicSelect/DynamicSelect.stories.js +32 -0
- package/molecules/DynamicSelect/constants.js +7 -0
- package/molecules/DynamicSelect/index.js +3 -0
- package/molecules/Error/Error.js +35 -0
- package/molecules/Error/Error.module.css +12 -0
- package/molecules/Error/Error.stories.js +18 -0
- package/molecules/Error/__snapshots__/Error.stories.js.snap +134 -0
- package/molecules/Error/index.js +2 -0
- package/molecules/FooterTable/FooterTable.js +166 -0
- package/molecules/FooterTable/FooterTable.module.css +63 -0
- package/molecules/FooterTable/FooterTable.stories.js +23 -0
- package/molecules/FooterTable/constants.js +9 -0
- package/molecules/FooterTable/index.js +3 -0
- package/molecules/IconLabel/IconLabel.js +83 -0
- package/molecules/IconLabel/IconLabel.module.css +16 -0
- package/molecules/IconLabel/IconLabel.stories.js +25 -0
- package/molecules/IconLabel/__snapshots__/IconLabel.stories.js.snap +211 -0
- package/molecules/IconLabel/constants.js +6 -0
- package/molecules/IconLabel/index.js +3 -0
- package/molecules/InputAutocomplete/InputAutocomplete.js +221 -0
- package/molecules/InputAutocomplete/InputAutocomplete.module.css +55 -0
- package/molecules/InputAutocomplete/InputAutocomplete.stories.js +23 -0
- package/molecules/InputAutocomplete/constants.js +1 -0
- package/molecules/InputAutocomplete/index.js +3 -0
- package/molecules/ItemMenu/ItemMenu.js +134 -0
- package/molecules/ItemMenu/ItemMenu.module.css +363 -0
- package/molecules/ItemMenu/ItemMenu.stories.js +42 -0
- package/molecules/ItemMenu/constants.js +36 -0
- package/molecules/ItemMenu/index.js +3 -0
- package/molecules/LoadingError/LoadingError.js +31 -0
- package/molecules/LoadingError/LoadingError.stories.js +24 -0
- package/molecules/LoadingError/__snapshots__/LoadingError.stories.js.snap +109 -0
- package/molecules/LoadingError/index.js +1 -0
- package/molecules/RowTable/RowTable.js +928 -0
- package/molecules/RowTable/RowTable.module.css +63 -0
- package/molecules/RowTable/RowTable.stories.js +26 -0
- package/molecules/RowTable/constants.js +798 -0
- package/molecules/RowTable/index.js +3 -0
- package/molecules/Score/Score.js +61 -0
- package/molecules/Score/Score.module.css +11 -0
- package/molecules/Score/Score.stories.js +13 -0
- package/molecules/Score/__snapshots__/Score.stories.js.snap +100 -0
- package/molecules/Score/faces/happy.svg +7 -0
- package/molecules/Score/faces/normal.svg +6 -0
- package/molecules/Score/faces/sad.svg +6 -0
- package/molecules/Score/index.js +2 -0
- package/molecules/Tabs/Tabs.js +59 -0
- package/molecules/Tabs/Tabs.module.css +13 -0
- package/molecules/Tabs/Tabs.stories.js +34 -0
- package/molecules/Tabs/constants.js +34 -0
- package/molecules/Tabs/index.js +3 -0
- package/molecules/Task/Task.js +114 -0
- package/molecules/Task/Task.module.css +47 -0
- package/molecules/Task/Task.stories.js +47 -0
- package/molecules/Task/__snapshots__/Task.stories.js.snap +953 -0
- package/molecules/Task/constants.js +1 -0
- package/molecules/Task/index.js +3 -0
- package/molecules/TaskCounter/TaskCounter.js +74 -0
- package/molecules/TaskCounter/TaskCounter.module.css +11 -0
- package/molecules/TaskCounter/TaskCounter.stories.js +26 -0
- package/molecules/TaskCounter/__snapshots__/TaskCounter.stories.js.snap +177 -0
- package/molecules/TaskCounter/index.js +2 -0
- package/package.json +119 -0
- package/pages/Login/Login.js +102 -0
- package/pages/Login/Login.module.css +5 -0
- package/pages/Login/Login.stories.js +23 -0
- package/pages/Login/constants.js +1 -0
- package/pages/Login/index.js +3 -0
- package/pages/Login/validation/loginSchema.js +5 -0
- package/public/favicon.ico +0 -0
- package/public/static/google-maps.png +0 -0
- package/public/static/images/folders-folder.svg +26 -0
- package/public/static/images/permissions.svg +14 -0
- package/public/static/images/reports-results.svg +18 -0
- package/public/static/logo.svg +19 -0
- package/public/static/logologin.png +0 -0
- package/public/static/logologin.svg +16 -0
- package/public/static/logologintagos.svg +19 -0
- package/public/static/logotipo.svg +50 -0
- package/public/static/logotipoS.svg +26 -0
- package/public/static/taxisvalencia_logod.png +0 -0
- package/scripts/build-tokens.js +40 -0
- package/scripts/create-component.js +128 -0
- package/storybook.test.js +13 -0
- package/styles/GrupoMutua.css +391 -0
- package/styles/default.css +391 -0
- package/styles/globals.css +1524 -0
- package/styles/radiotaxiaragon.css +391 -0
- package/styles/spartan.css +391 -0
- package/styles/tagos.css +391 -0
- package/styles/taxisvalencia.css +391 -0
- package/styles/tokens.css +391 -0
- package/templates/component/Component.js +22 -0
- package/templates/component/Component.module.css +3 -0
- package/templates/component/Component.stories.js +23 -0
- package/templates/component/constants.js +1 -0
- package/templates/component/index.js +3 -0
- package/tokens/Token/Helper.js +30 -0
- package/tokens/Token/Token.js +13 -0
- package/tokens/Token/Token.module.css +64 -0
- package/tokens/Token/components/Color.js +21 -0
- package/tokens/Token/components/Color.stories.js +126 -0
- package/tokens/Token/components/FontFamily.js +24 -0
- package/tokens/Token/components/FontFamily.stories.js +32 -0
- package/tokens/Token/components/FontSize.js +24 -0
- package/tokens/Token/components/FontSize.stories.js +31 -0
- package/tokens/Token/components/FontWeight.js +24 -0
- package/tokens/Token/components/FontWeight.stories.js +31 -0
- package/tokens/Token/components/Spacing.js +24 -0
- package/tokens/Token/components/Spacing.stories.js +29 -0
- package/tokens/Token/components/__snapshots__/Color.stories.js.snap +7169 -0
- package/tokens/Token/components/__snapshots__/FontFamily.stories.js.snap +133 -0
- package/tokens/Token/components/__snapshots__/FontSize.stories.js.snap +261 -0
- package/tokens/Token/components/__snapshots__/FontWeight.stories.js.snap +317 -0
- package/tokens/Token/components/__snapshots__/Spacing.stories.js.snap +229 -0
- package/tokens/Token/components/index.js +5 -0
- package/tokens/Token/helpers.js +17 -0
- package/tokens/Token/index.js +1 -0
- package/tokens/index.js +472 -0
- package/utils/isEmpty.js +28 -0
- package/utils/isEmpty.test.js +125 -0
- package/utils/isObject.js +4 -0
- package/utils/keyboardCodes.js +6 -0
- package/utils/testUtils/matchMediaMock.js +14 -0
- package/utils/testUtils/svgrMock.js +2 -0
- package/utils/toCapitalize.js +4 -0
- package/utils/toKebabCase.js +8 -0
- package/utils/toPascalCase.js +20 -0
- package/webpack/cssModules.js +30 -0
- package/webpack/loadConfigs.js +6 -0
- package/webpack/reactInlineSvg.js +22 -0
@@ -0,0 +1,135 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
|
4
|
+
import Icon from '../../atoms/Icon'
|
5
|
+
import Paragraph from '../../atoms/Paragraph'
|
6
|
+
|
7
|
+
import styles from './CheckList.module.css'
|
8
|
+
import withStyles from '../../hocs/withStyles'
|
9
|
+
|
10
|
+
|
11
|
+
// export const handleChange = e => {
|
12
|
+
// const { name, value } = e.target;
|
13
|
+
|
14
|
+
// this.setState({
|
15
|
+
// [name]: value
|
16
|
+
// });
|
17
|
+
// }
|
18
|
+
|
19
|
+
// const handleChange = ({ onChange }) => () => {
|
20
|
+
// // onChange()
|
21
|
+
|
22
|
+
// const { name, value } = e.target;
|
23
|
+
|
24
|
+
// this.setState({
|
25
|
+
// [name]: value
|
26
|
+
// });
|
27
|
+
|
28
|
+
// }
|
29
|
+
|
30
|
+
// export const handleClick = ({ onClick }) => (event) => {
|
31
|
+
// onClick(event)
|
32
|
+
// }
|
33
|
+
|
34
|
+
// const handleChange = ({ onChange }) => () => {
|
35
|
+
// onChange()
|
36
|
+
// }
|
37
|
+
|
38
|
+
|
39
|
+
export const CheckList = ({ getStyles, options, onChange }) => {
|
40
|
+
|
41
|
+
// this.state = {};
|
42
|
+
|
43
|
+
return (
|
44
|
+
|
45
|
+
<div className={getStyles('check-list')}>
|
46
|
+
|
47
|
+
<ul id="platform" className={getStyles('boxul')}>
|
48
|
+
{options.data.map((item, index) => (
|
49
|
+
<li key={index} className={getStyles('boxlist')}>
|
50
|
+
|
51
|
+
<label className={getStyles('rad-label')}>
|
52
|
+
|
53
|
+
<input
|
54
|
+
className={getStyles('rad-input')}
|
55
|
+
id={item.id}
|
56
|
+
value={item.value}
|
57
|
+
name={item.name}
|
58
|
+
type="radio"
|
59
|
+
onChange={onChange}
|
60
|
+
/>
|
61
|
+
|
62
|
+
<div className={getStyles('rad-design')} ></div>
|
63
|
+
|
64
|
+
<div className={getStyles('rad-text')}>
|
65
|
+
<Paragraph
|
66
|
+
className={getStyles('title-list')}
|
67
|
+
color="primary"
|
68
|
+
isInline
|
69
|
+
size="sm"
|
70
|
+
>
|
71
|
+
{item.title}
|
72
|
+
</Paragraph>
|
73
|
+
|
74
|
+
<Paragraph
|
75
|
+
className={getStyles('subtitle-list')}
|
76
|
+
color="muted"
|
77
|
+
isInline
|
78
|
+
size="xs"
|
79
|
+
>
|
80
|
+
{item.subTitle}
|
81
|
+
</Paragraph>
|
82
|
+
</div>
|
83
|
+
|
84
|
+
</label>
|
85
|
+
|
86
|
+
|
87
|
+
</li>
|
88
|
+
))}
|
89
|
+
</ul>
|
90
|
+
|
91
|
+
{/* <div className="radio-buttons">
|
92
|
+
Windows
|
93
|
+
<input
|
94
|
+
id="windows"
|
95
|
+
value="windows"
|
96
|
+
name="platform"
|
97
|
+
type="radio"
|
98
|
+
onChange={handleChange}
|
99
|
+
/>
|
100
|
+
Mac
|
101
|
+
<input
|
102
|
+
id="mac"
|
103
|
+
value="mac"
|
104
|
+
name="platform"
|
105
|
+
type="radio"
|
106
|
+
onChange={handleChange}
|
107
|
+
/>
|
108
|
+
Linux
|
109
|
+
<input
|
110
|
+
id="linux"
|
111
|
+
value="linux"
|
112
|
+
name="platform"
|
113
|
+
type="radio"
|
114
|
+
onChange={handleChange}
|
115
|
+
/>
|
116
|
+
</div> */}
|
117
|
+
|
118
|
+
</div>
|
119
|
+
|
120
|
+
)
|
121
|
+
}
|
122
|
+
|
123
|
+
CheckList.propTypes = {
|
124
|
+
// children: PropTypes.node.isRequired,
|
125
|
+
getStyles: PropTypes.func.isRequired,
|
126
|
+
onChange: PropTypes.func.isRequired,
|
127
|
+
// type: PropTypes.oneOf(options.types),
|
128
|
+
}
|
129
|
+
|
130
|
+
CheckList.defaultProps = {
|
131
|
+
getStyles: () => { },
|
132
|
+
onChange: () => {},
|
133
|
+
}
|
134
|
+
|
135
|
+
export default withStyles(styles)(CheckList)
|
@@ -0,0 +1,94 @@
|
|
1
|
+
|
2
|
+
.boxul {
|
3
|
+
display: block;
|
4
|
+
list-style-type: disc;
|
5
|
+
margin-block-start: 0em;
|
6
|
+
margin-block-end: 0em;
|
7
|
+
margin-inline-start: 0px;
|
8
|
+
margin-inline-end: 0px;
|
9
|
+
padding-inline-start: 0px;
|
10
|
+
}
|
11
|
+
|
12
|
+
|
13
|
+
.check-list {
|
14
|
+
display: flex;
|
15
|
+
}
|
16
|
+
|
17
|
+
.boxlist {
|
18
|
+
list-style-type: none;
|
19
|
+
}
|
20
|
+
|
21
|
+
.title-list {
|
22
|
+
padding-left: 0px;
|
23
|
+
}
|
24
|
+
|
25
|
+
.subtitle-list {
|
26
|
+
display: flex;
|
27
|
+
}
|
28
|
+
|
29
|
+
.rad-label {
|
30
|
+
display: flex;
|
31
|
+
align-items: center;
|
32
|
+
|
33
|
+
border-radius: 100px;
|
34
|
+
padding: 12px 16px;
|
35
|
+
margin: 6px 0;
|
36
|
+
|
37
|
+
cursor: pointer;
|
38
|
+
transition: .3s;
|
39
|
+
}
|
40
|
+
|
41
|
+
.rad-label:hover,
|
42
|
+
.rad-label:focus-within {
|
43
|
+
background: hsla(0, 0%, 80%, .14);
|
44
|
+
}
|
45
|
+
|
46
|
+
.rad-input {
|
47
|
+
position: absolute;
|
48
|
+
left: 0;
|
49
|
+
top: 0;
|
50
|
+
width: 1px;
|
51
|
+
height: 1px;
|
52
|
+
opacity: 0;
|
53
|
+
z-index: -1;
|
54
|
+
}
|
55
|
+
|
56
|
+
.rad-design {
|
57
|
+
width: 22px;
|
58
|
+
height: 22px;
|
59
|
+
border-radius: 100px;
|
60
|
+
|
61
|
+
background: linear-gradient(to right bottom, hsl(154, 97%, 62%), hsl(225, 97%, 62%));
|
62
|
+
position: relative;
|
63
|
+
}
|
64
|
+
|
65
|
+
.rad-design::before {
|
66
|
+
content: '';
|
67
|
+
|
68
|
+
display: inline-block;
|
69
|
+
width: inherit;
|
70
|
+
height: inherit;
|
71
|
+
border-radius: inherit;
|
72
|
+
|
73
|
+
background: hsl(0, 0%, 90%);
|
74
|
+
transform: scale(1.1);
|
75
|
+
transition: .3s;
|
76
|
+
}
|
77
|
+
|
78
|
+
.rad-input:checked+.rad-design::before {
|
79
|
+
transform: scale(0);
|
80
|
+
}
|
81
|
+
|
82
|
+
.rad-text {
|
83
|
+
/* color: hsl(0, 0%, 60%); */
|
84
|
+
margin-left: 14px;
|
85
|
+
/* letter-spacing: 3px;
|
86
|
+
text-transform: uppercase;
|
87
|
+
font-size: 18px;
|
88
|
+
font-weight: 900; */
|
89
|
+
transition: .3s;
|
90
|
+
}
|
91
|
+
|
92
|
+
.rad-input:checked~.rad-text {
|
93
|
+
color: hsl(0, 0%, 40%);
|
94
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { CheckList, styles, options } from '.'
|
2
|
+
|
3
|
+
import {
|
4
|
+
getTemplate,
|
5
|
+
getListTemplate,
|
6
|
+
getOptionsArgTypes,
|
7
|
+
} from '../../helpers/storybook'
|
8
|
+
|
9
|
+
const Template = getTemplate(CheckList, styles)
|
10
|
+
const ListTemplate = getListTemplate(CheckList, styles)
|
11
|
+
|
12
|
+
export default {
|
13
|
+
title: 'Molecules/CheckList',
|
14
|
+
component: CheckList,
|
15
|
+
args: {
|
16
|
+
options: options,
|
17
|
+
},
|
18
|
+
argTypes: {
|
19
|
+
// types: getOptionsArgTypes(options.types),
|
20
|
+
},
|
21
|
+
}
|
22
|
+
|
23
|
+
export const Default = Template.bind({})
|
24
|
+
// export const List = ListTemplate.bind({})
|
25
|
+
// List.args = { items: options.types.map((type) => ({ type })) }
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export const options = {
|
2
|
+
data: [
|
3
|
+
{
|
4
|
+
id: 'idEmail',
|
5
|
+
active: false,
|
6
|
+
icon: 'home',
|
7
|
+
title: 'Email',
|
8
|
+
subTitle: 'recibir un código en mi email ',
|
9
|
+
value: 'Email',
|
10
|
+
name: 'platform',
|
11
|
+
},
|
12
|
+
{
|
13
|
+
id: 'idGoogle2FA',
|
14
|
+
active: false,
|
15
|
+
icon: 'home',
|
16
|
+
title: 'Google Auth',
|
17
|
+
subTitle: 'obtener un código en la app de autenticador de Google',
|
18
|
+
value: 'Google Auth',
|
19
|
+
name: 'platform',
|
20
|
+
},
|
21
|
+
]
|
22
|
+
|
23
|
+
}
|
@@ -0,0 +1,154 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { useState } from "react";
|
3
|
+
import PropTypes from 'prop-types'
|
4
|
+
import styles from './ColumnTable.module.css'
|
5
|
+
import { options } from './constants'
|
6
|
+
import withStyles from '../../hocs/withStyles'
|
7
|
+
import Paragraph from '../../atoms/Paragraph'
|
8
|
+
import Input from '../../atoms/Input'
|
9
|
+
import Icon from '../../atoms/Icon'
|
10
|
+
import DynamicSelect from '../../molecules/DynamicSelect'
|
11
|
+
import { Horizontal, Vertical } from '../../layout/Spacer/components'
|
12
|
+
|
13
|
+
|
14
|
+
export const ColumnTable = ({ getStyles, handleSorting, columnUppercase, onChangeInput, onChangeSelect, columnsData, opSelect }) => {
|
15
|
+
|
16
|
+
// const [sortable, setSortable] = useState(true)
|
17
|
+
// const [accessor, setAccessor] = useState("")
|
18
|
+
|
19
|
+
const [sortField, setSortField] = useState("")
|
20
|
+
const [order, setOrder] = useState("asc")
|
21
|
+
|
22
|
+
// const [optionsSelect, setOptionsSelect] = useState(opSelect);
|
23
|
+
|
24
|
+
|
25
|
+
const handleSortingChange = (accessor) => {
|
26
|
+
const sortOrder =
|
27
|
+
accessor === sortField && order === "asc" ? "desc" : "asc"
|
28
|
+
|
29
|
+
setSortField(accessor)
|
30
|
+
setOrder(sortOrder)
|
31
|
+
handleSorting(accessor, sortOrder)
|
32
|
+
};
|
33
|
+
|
34
|
+
|
35
|
+
return (
|
36
|
+
|
37
|
+
// <div className={getStyles('tbl-header')}>
|
38
|
+
// <table className={getStyles('table')} cellPadding="0" cellSpacing="0" border="0">
|
39
|
+
<thead>
|
40
|
+
<tr>
|
41
|
+
|
42
|
+
{columnsData.map(({ accessor, sortable, ...props }) => {
|
43
|
+
|
44
|
+
const cl = sortable
|
45
|
+
? sortField && sortField === accessor && order === "asc"
|
46
|
+
? "up"
|
47
|
+
: sortField && sortField === accessor && order === "desc"
|
48
|
+
? "down"
|
49
|
+
: "default"
|
50
|
+
: "";
|
51
|
+
|
52
|
+
return (
|
53
|
+
props.activeView ?
|
54
|
+
// setSortable(props.sortable)
|
55
|
+
// setAccessor()
|
56
|
+
(<th
|
57
|
+
key={props.idInput}
|
58
|
+
className={getStyles('column-table',
|
59
|
+
{ 'column-uppercase': columnUppercase },
|
60
|
+
{ 'thacction': accessor === 'iconUrl' },
|
61
|
+
{ 'thcheckbox': props.isCheckbox }
|
62
|
+
)}>
|
63
|
+
|
64
|
+
<span className={getStyles('tbl-txtTh')} onClick={sortable ? () => handleSortingChange(accessor) : null}>
|
65
|
+
<Paragraph
|
66
|
+
size="xs"
|
67
|
+
isInline
|
68
|
+
>
|
69
|
+
{props.title}
|
70
|
+
</Paragraph>
|
71
|
+
|
72
|
+
<Horizontal size="xs" />
|
73
|
+
|
74
|
+
{sortable ?
|
75
|
+
|
76
|
+
cl === "default" ?
|
77
|
+
<Icon
|
78
|
+
name="angleUpDown"
|
79
|
+
size="xs"
|
80
|
+
/>
|
81
|
+
: cl === "" ? null
|
82
|
+
|
83
|
+
: cl === "up"
|
84
|
+
? <Icon
|
85
|
+
name="angleDown"
|
86
|
+
size="xs"
|
87
|
+
/>
|
88
|
+
|
89
|
+
: <Icon
|
90
|
+
name="angleUp"
|
91
|
+
size="xs"
|
92
|
+
/>
|
93
|
+
: null
|
94
|
+
}
|
95
|
+
</span>
|
96
|
+
|
97
|
+
|
98
|
+
<Vertical size="xs" />
|
99
|
+
|
100
|
+
{props.viewIsFilter ? (
|
101
|
+
|
102
|
+
props.typeFilter === 'select' ?
|
103
|
+
<DynamicSelect
|
104
|
+
isInline
|
105
|
+
onChange={onChangeSelect}
|
106
|
+
optionsSelect={opSelect}
|
107
|
+
placeholder={props.placeholder}
|
108
|
+
maxMenuHeight={110}
|
109
|
+
/>
|
110
|
+
:
|
111
|
+
<Input
|
112
|
+
isInputFilter
|
113
|
+
id={props.idInput}
|
114
|
+
type={props.typeFilter}
|
115
|
+
name={props.nameInput}
|
116
|
+
onChange={onChangeInput}
|
117
|
+
placeholder={props.placeholder}
|
118
|
+
/>
|
119
|
+
)
|
120
|
+
|
121
|
+
: null
|
122
|
+
}
|
123
|
+
|
124
|
+
</th>
|
125
|
+
) : null
|
126
|
+
)
|
127
|
+
|
128
|
+
})}
|
129
|
+
|
130
|
+
</tr>
|
131
|
+
</thead>
|
132
|
+
// </table>
|
133
|
+
// </div>
|
134
|
+
|
135
|
+
)
|
136
|
+
}
|
137
|
+
|
138
|
+
ColumnTable.propTypes = {
|
139
|
+
handleSorting: PropTypes.func.isRequired,
|
140
|
+
getStyles: PropTypes.func.isRequired,
|
141
|
+
columnUppercase: PropTypes.bool,
|
142
|
+
onChangeInput: PropTypes.func,
|
143
|
+
onChangeSelect: PropTypes.func,
|
144
|
+
}
|
145
|
+
|
146
|
+
ColumnTable.defaultProps = {
|
147
|
+
getStyles: () => { },
|
148
|
+
handleSorting: () => { },
|
149
|
+
columnUppercase: false,
|
150
|
+
onChangeInput: () => { },
|
151
|
+
onChangeSelect: () => { },
|
152
|
+
}
|
153
|
+
|
154
|
+
export default withStyles(styles)(ColumnTable)
|
@@ -0,0 +1,51 @@
|
|
1
|
+
.column-table {
|
2
|
+
padding: 12px 12px;
|
3
|
+
text-align: left;
|
4
|
+
color: var(--color-font-base);
|
5
|
+
display: table-cell;
|
6
|
+
vertical-align: top;
|
7
|
+
/* overflow: hidden;
|
8
|
+
text-overflow: ellipsis; */
|
9
|
+
border-bottom-color: rgba(0, 0, 0, 0.12);
|
10
|
+
border-bottom-width: 1px;
|
11
|
+
border-bottom-style: solid;
|
12
|
+
border-top-color: rgba(0, 0, 0, 0.12);
|
13
|
+
border-top-width: 1px;
|
14
|
+
border-top-style: solid;
|
15
|
+
}
|
16
|
+
|
17
|
+
.column-uppercase {
|
18
|
+
text-transform: uppercase;
|
19
|
+
}
|
20
|
+
|
21
|
+
.tbl-txtTh {
|
22
|
+
overflow: hidden;
|
23
|
+
text-overflow: ellipsis;
|
24
|
+
white-space: nowrap;
|
25
|
+
cursor: pointer;
|
26
|
+
}
|
27
|
+
|
28
|
+
.table {
|
29
|
+
width: 100%;
|
30
|
+
table-layout: fixed;
|
31
|
+
|
32
|
+
}
|
33
|
+
|
34
|
+
.tbl-header {
|
35
|
+
/* background-color: rgba(255, 255, 255, 0.3); */
|
36
|
+
/* background-color: -webkit-linear-gradient(left, #25c481, #25b7c4);
|
37
|
+
background-color: linear-gradient(to right, #25c481, #25b7c4); */
|
38
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
39
|
+
}
|
40
|
+
|
41
|
+
.thacction {
|
42
|
+
max-width: 80px;
|
43
|
+
min-width: 80px;
|
44
|
+
width: 80px;
|
45
|
+
}
|
46
|
+
|
47
|
+
.thcheckbox {
|
48
|
+
max-width: 80px;
|
49
|
+
min-width: 80px;
|
50
|
+
width: 80px;
|
51
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { ColumnTable, styles, options } from '.'
|
2
|
+
|
3
|
+
import {
|
4
|
+
getTemplate,
|
5
|
+
getListTemplate,
|
6
|
+
getOptionsArgTypes,
|
7
|
+
} from '../../helpers/storybook'
|
8
|
+
|
9
|
+
const Template = getTemplate(ColumnTable, styles)
|
10
|
+
const ListTemplate = getListTemplate(ColumnTable, styles)
|
11
|
+
|
12
|
+
export default {
|
13
|
+
title: 'Molecules/ColumnTable',
|
14
|
+
component: ColumnTable,
|
15
|
+
args: {
|
16
|
+
columnUppercase: false,
|
17
|
+
columnsData: options.columns,
|
18
|
+
},
|
19
|
+
// argTypes: {
|
20
|
+
// // typeInput: getOptionsArgTypes(options.typeInput),
|
21
|
+
// },
|
22
|
+
}
|
23
|
+
|
24
|
+
export const Default = Template.bind({})
|
25
|
+
// export const List = ListTemplate.bind({})
|
26
|
+
// List.args = { items: options.types.map((type) => ({ type })) }
|
@@ -0,0 +1,117 @@
|
|
1
|
+
export const options = {
|
2
|
+
typeInput: ['text', 'password', 'date', 'number'],
|
3
|
+
|
4
|
+
columns: [
|
5
|
+
{
|
6
|
+
activeView: true,
|
7
|
+
sortable: true,
|
8
|
+
accessor: 'timeBookingStartRealTimestamp',
|
9
|
+
subAccessor: '',
|
10
|
+
title: 'Fecha',
|
11
|
+
viewIsFilter: true,
|
12
|
+
typeFilter: 'date',
|
13
|
+
subTypeFilter: false,
|
14
|
+
idInput: 'fecha',
|
15
|
+
nameInput: 'Fecha',
|
16
|
+
placeholder: 'Fecha'
|
17
|
+
},
|
18
|
+
{
|
19
|
+
activeView: true,
|
20
|
+
sortable: true,
|
21
|
+
accessor: 'passengerName',
|
22
|
+
subAccessor: '',
|
23
|
+
title: 'Pasajero',
|
24
|
+
viewIsFilter: true,
|
25
|
+
typeFilter: 'text',
|
26
|
+
subTypeFilter: false,
|
27
|
+
idInput: 'pasajero',
|
28
|
+
nameInput: 'Pasajero',
|
29
|
+
placeholder: 'Pasajero'
|
30
|
+
},
|
31
|
+
{
|
32
|
+
activeView: true,
|
33
|
+
sortable: true,
|
34
|
+
accessor: 'origin',
|
35
|
+
subAccessor: 'addressField',
|
36
|
+
title: 'Recogida',
|
37
|
+
viewIsFilter: true,
|
38
|
+
typeFilter: 'text',
|
39
|
+
subTypeFilter: false,
|
40
|
+
idInput: 'recogida',
|
41
|
+
nameInput: 'Recogida',
|
42
|
+
placeholder: 'Recogida'
|
43
|
+
},
|
44
|
+
{
|
45
|
+
activeView: true,
|
46
|
+
sortable: true,
|
47
|
+
accessor: 'destination',
|
48
|
+
subAccessor: 'addressField',
|
49
|
+
title: 'Destino',
|
50
|
+
viewIsFilter: true,
|
51
|
+
typeFilter: 'text',
|
52
|
+
subTypeFilter: false,
|
53
|
+
idInput: 'destino',
|
54
|
+
nameInput: 'Destino',
|
55
|
+
placeholder: 'Destino'
|
56
|
+
},
|
57
|
+
{
|
58
|
+
activeView: true,
|
59
|
+
sortable: true,
|
60
|
+
accessor: 'priceCustomer',
|
61
|
+
subAccessor: '',
|
62
|
+
title: 'Precio',
|
63
|
+
viewIsFilter: true,
|
64
|
+
typeFilter: 'text',
|
65
|
+
subTypeFilter: true,
|
66
|
+
idInput: 'precio',
|
67
|
+
nameInput: 'Precio',
|
68
|
+
placeholder: 'Precio'
|
69
|
+
},
|
70
|
+
{
|
71
|
+
activeView: false,
|
72
|
+
sortable: true,
|
73
|
+
accessor: 'id',
|
74
|
+
subAccessor: '',
|
75
|
+
title: 'ID',
|
76
|
+
viewIsFilter: true,
|
77
|
+
typeFilter: 'number',
|
78
|
+
subTypeFilter: false,
|
79
|
+
idInput: 'id',
|
80
|
+
nameInput: 'id',
|
81
|
+
placeholder: 'id'
|
82
|
+
},
|
83
|
+
{
|
84
|
+
activeView: false,
|
85
|
+
sortable: true,
|
86
|
+
accessor: 'idService',
|
87
|
+
subAccessor: '',
|
88
|
+
title: 'ID Reserva',
|
89
|
+
viewIsFilter: true,
|
90
|
+
typeFilter: 'number',
|
91
|
+
subTypeFilter: false,
|
92
|
+
idInput: 'IDReserva',
|
93
|
+
nameInput: 'ID Reserva',
|
94
|
+
placeholder: 'ID Reserva'
|
95
|
+
},
|
96
|
+
{
|
97
|
+
activeView: false,
|
98
|
+
sortable: true,
|
99
|
+
accessor: 'idSupplier',
|
100
|
+
subAccessor: '',
|
101
|
+
title: 'ID Proveedor',
|
102
|
+
viewIsFilter: true,
|
103
|
+
typeFilter: 'number',
|
104
|
+
subTypeFilter: false,
|
105
|
+
idInput: 'IDProveedor',
|
106
|
+
nameInput: 'ID Proveedor',
|
107
|
+
placeholder: 'ID Proveedor'
|
108
|
+
},
|
109
|
+
],
|
110
|
+
|
111
|
+
opSelect: [
|
112
|
+
{ value: 'chocolate', label: 'Chocolate' },
|
113
|
+
{ value: 'strawberry', label: 'Strawberry' },
|
114
|
+
{ value: 'vanilla', label: 'Vanilla' }
|
115
|
+
]
|
116
|
+
|
117
|
+
}
|