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,47 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
import Link from 'next/link'
|
4
|
+
|
5
|
+
import styles from './Picture.module.css'
|
6
|
+
import withStyles from '../../hocs/withStyles'
|
7
|
+
|
8
|
+
export const Picture = ({
|
9
|
+
getStyles,
|
10
|
+
src,
|
11
|
+
width,
|
12
|
+
height,
|
13
|
+
isRounded,
|
14
|
+
withBorder,
|
15
|
+
isHref,
|
16
|
+
}) => (
|
17
|
+
<picture
|
18
|
+
className={getStyles('picture', {
|
19
|
+
'is-rounded': isRounded,
|
20
|
+
'with-border': withBorder,
|
21
|
+
})}
|
22
|
+
>
|
23
|
+
<Link href={isHref} passHref>
|
24
|
+
<img src={src} style={{ height, maxWidth: width }} />
|
25
|
+
</Link>
|
26
|
+
|
27
|
+
</picture>
|
28
|
+
)
|
29
|
+
|
30
|
+
Picture.propTypes = {
|
31
|
+
src: PropTypes.string.isRequired,
|
32
|
+
getStyles: PropTypes.func.isRequired,
|
33
|
+
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
34
|
+
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
35
|
+
isRounded: PropTypes.bool,
|
36
|
+
withBorder: PropTypes.bool,
|
37
|
+
isHref: PropTypes.any
|
38
|
+
}
|
39
|
+
|
40
|
+
Picture.defaultProps = {
|
41
|
+
height: 'auto',
|
42
|
+
withBorder: false,
|
43
|
+
getStyles: () => { },
|
44
|
+
isHref: ''
|
45
|
+
}
|
46
|
+
|
47
|
+
export default withStyles(styles)(Picture)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { Picture, styles } from '.'
|
2
|
+
|
3
|
+
import { getTemplate } from '../../helpers/storybook'
|
4
|
+
|
5
|
+
const Template = getTemplate(Picture, styles)
|
6
|
+
|
7
|
+
export default {
|
8
|
+
title: 'Atoms/Picture',
|
9
|
+
component: Picture,
|
10
|
+
args: {
|
11
|
+
src: 'https://picsum.photos/id/1033/400/400',
|
12
|
+
width: 200,
|
13
|
+
},
|
14
|
+
argTypes: {
|
15
|
+
width: { control: 'number' },
|
16
|
+
height: { control: 'number' },
|
17
|
+
},
|
18
|
+
}
|
19
|
+
|
20
|
+
export const Default = Template.bind({})
|
21
|
+
|
22
|
+
export const Rounded = Template.bind({})
|
23
|
+
Rounded.args = { isRounded: true }
|
24
|
+
|
25
|
+
export const Border = Template.bind({})
|
26
|
+
Border.args = { withBorder: true }
|
27
|
+
|
28
|
+
export const Height = Template.bind({})
|
29
|
+
Height.args = { src: 'https://picsum.photos/id/1033/400/800', height: 400 }
|
30
|
+
|
31
|
+
export const Width = Template.bind({})
|
32
|
+
Width.args = { src: 'https://picsum.photos/id/1033/800/400', width: 400 }
|
@@ -0,0 +1,156 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`Storyshots Atoms/Picture Border 1`] = `
|
4
|
+
<div
|
5
|
+
style={
|
6
|
+
Object {
|
7
|
+
"alignContent": "flex-start",
|
8
|
+
"display": "flex",
|
9
|
+
"flexDirection": "column",
|
10
|
+
"flexWrap": "wrap",
|
11
|
+
"gap": "10px 30px",
|
12
|
+
"height": "100%",
|
13
|
+
"justifyContent": "flex-start",
|
14
|
+
"maxHeight": "auto",
|
15
|
+
}
|
16
|
+
}
|
17
|
+
>
|
18
|
+
<picture
|
19
|
+
className="picture with-border"
|
20
|
+
>
|
21
|
+
<img
|
22
|
+
src="https://picsum.photos/id/1033/400/400"
|
23
|
+
style={
|
24
|
+
Object {
|
25
|
+
"height": "auto",
|
26
|
+
"maxWidth": 200,
|
27
|
+
}
|
28
|
+
}
|
29
|
+
/>
|
30
|
+
</picture>
|
31
|
+
</div>
|
32
|
+
`;
|
33
|
+
|
34
|
+
exports[`Storyshots Atoms/Picture Default 1`] = `
|
35
|
+
<div
|
36
|
+
style={
|
37
|
+
Object {
|
38
|
+
"alignContent": "flex-start",
|
39
|
+
"display": "flex",
|
40
|
+
"flexDirection": "column",
|
41
|
+
"flexWrap": "wrap",
|
42
|
+
"gap": "10px 30px",
|
43
|
+
"height": "100%",
|
44
|
+
"justifyContent": "flex-start",
|
45
|
+
"maxHeight": "auto",
|
46
|
+
}
|
47
|
+
}
|
48
|
+
>
|
49
|
+
<picture
|
50
|
+
className="picture"
|
51
|
+
>
|
52
|
+
<img
|
53
|
+
src="https://picsum.photos/id/1033/400/400"
|
54
|
+
style={
|
55
|
+
Object {
|
56
|
+
"height": "auto",
|
57
|
+
"maxWidth": 200,
|
58
|
+
}
|
59
|
+
}
|
60
|
+
/>
|
61
|
+
</picture>
|
62
|
+
</div>
|
63
|
+
`;
|
64
|
+
|
65
|
+
exports[`Storyshots Atoms/Picture Height 1`] = `
|
66
|
+
<div
|
67
|
+
style={
|
68
|
+
Object {
|
69
|
+
"alignContent": "flex-start",
|
70
|
+
"display": "flex",
|
71
|
+
"flexDirection": "column",
|
72
|
+
"flexWrap": "wrap",
|
73
|
+
"gap": "10px 30px",
|
74
|
+
"height": "100%",
|
75
|
+
"justifyContent": "flex-start",
|
76
|
+
"maxHeight": "auto",
|
77
|
+
}
|
78
|
+
}
|
79
|
+
>
|
80
|
+
<picture
|
81
|
+
className="picture"
|
82
|
+
>
|
83
|
+
<img
|
84
|
+
src="https://picsum.photos/id/1033/400/800"
|
85
|
+
style={
|
86
|
+
Object {
|
87
|
+
"height": 400,
|
88
|
+
"maxWidth": 200,
|
89
|
+
}
|
90
|
+
}
|
91
|
+
/>
|
92
|
+
</picture>
|
93
|
+
</div>
|
94
|
+
`;
|
95
|
+
|
96
|
+
exports[`Storyshots Atoms/Picture Rounded 1`] = `
|
97
|
+
<div
|
98
|
+
style={
|
99
|
+
Object {
|
100
|
+
"alignContent": "flex-start",
|
101
|
+
"display": "flex",
|
102
|
+
"flexDirection": "column",
|
103
|
+
"flexWrap": "wrap",
|
104
|
+
"gap": "10px 30px",
|
105
|
+
"height": "100%",
|
106
|
+
"justifyContent": "flex-start",
|
107
|
+
"maxHeight": "auto",
|
108
|
+
}
|
109
|
+
}
|
110
|
+
>
|
111
|
+
<picture
|
112
|
+
className="picture is-rounded"
|
113
|
+
>
|
114
|
+
<img
|
115
|
+
src="https://picsum.photos/id/1033/400/400"
|
116
|
+
style={
|
117
|
+
Object {
|
118
|
+
"height": "auto",
|
119
|
+
"maxWidth": 200,
|
120
|
+
}
|
121
|
+
}
|
122
|
+
/>
|
123
|
+
</picture>
|
124
|
+
</div>
|
125
|
+
`;
|
126
|
+
|
127
|
+
exports[`Storyshots Atoms/Picture Width 1`] = `
|
128
|
+
<div
|
129
|
+
style={
|
130
|
+
Object {
|
131
|
+
"alignContent": "flex-start",
|
132
|
+
"display": "flex",
|
133
|
+
"flexDirection": "column",
|
134
|
+
"flexWrap": "wrap",
|
135
|
+
"gap": "10px 30px",
|
136
|
+
"height": "100%",
|
137
|
+
"justifyContent": "flex-start",
|
138
|
+
"maxHeight": "auto",
|
139
|
+
}
|
140
|
+
}
|
141
|
+
>
|
142
|
+
<picture
|
143
|
+
className="picture"
|
144
|
+
>
|
145
|
+
<img
|
146
|
+
src="https://picsum.photos/id/1033/800/400"
|
147
|
+
style={
|
148
|
+
Object {
|
149
|
+
"height": "auto",
|
150
|
+
"maxWidth": 400,
|
151
|
+
}
|
152
|
+
}
|
153
|
+
/>
|
154
|
+
</picture>
|
155
|
+
</div>
|
156
|
+
`;
|
package/atoms/Tab/Tab.js
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
|
4
|
+
import styles from './Tab.module.css'
|
5
|
+
import { options } from './constants'
|
6
|
+
import withStyles from '../../hocs/withStyles'
|
7
|
+
|
8
|
+
export const handleClick = ({ onClick }) => (event) => {
|
9
|
+
onClick(event)
|
10
|
+
}
|
11
|
+
|
12
|
+
export const Tab = ({ getStyles, children, activeTab, viewTab, onClick }) => {
|
13
|
+
|
14
|
+
if (viewTab) {
|
15
|
+
return (
|
16
|
+
<>
|
17
|
+
<li className={getStyles('tab', { 'active': activeTab })} onClick={onClick && handleClick({ onClick })}>
|
18
|
+
{children}
|
19
|
+
</li>
|
20
|
+
</>
|
21
|
+
)
|
22
|
+
|
23
|
+
} else {
|
24
|
+
null
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
Tab.propTypes = {
|
29
|
+
getStyles: PropTypes.func.isRequired,
|
30
|
+
children: PropTypes.node.isRequired,
|
31
|
+
activeTab: PropTypes.bool.isRequired,
|
32
|
+
viewTab: PropTypes.bool.isRequired,
|
33
|
+
onClick: PropTypes.func.isRequired,
|
34
|
+
}
|
35
|
+
|
36
|
+
Tab.defaultProps = {
|
37
|
+
getStyles: () => { },
|
38
|
+
onClick: () => { },
|
39
|
+
}
|
40
|
+
|
41
|
+
export default withStyles(styles)(Tab)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
.tab {
|
2
|
+
display: flex;
|
3
|
+
font-size: var(--font-size-base);
|
4
|
+
cursor: pointer;
|
5
|
+
color: var(--color-font-highlight);
|
6
|
+
padding: 1.1em 1.5em;
|
7
|
+
}
|
8
|
+
|
9
|
+
.tab:hover {
|
10
|
+
color: var(--color-primary);
|
11
|
+
border-bottom: 2px solid var(--color-primary);
|
12
|
+
}
|
13
|
+
|
14
|
+
.tab.active {
|
15
|
+
color: var(--color-primary);
|
16
|
+
border-bottom: 2px solid var(--color-primary);
|
17
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { Tab, styles, options } from '.'
|
2
|
+
|
3
|
+
import {
|
4
|
+
getTemplate,
|
5
|
+
getListTemplate,
|
6
|
+
getOptionsArgTypes,
|
7
|
+
} from '../../helpers/storybook'
|
8
|
+
|
9
|
+
const Template = getTemplate(Tab, styles)
|
10
|
+
const ListTemplate = getListTemplate(Tab, styles)
|
11
|
+
|
12
|
+
export default {
|
13
|
+
title: 'Atoms/Tab',
|
14
|
+
component: Tab,
|
15
|
+
args: {
|
16
|
+
children: 'Taksee',
|
17
|
+
activeTab: false,
|
18
|
+
viewTab: true,
|
19
|
+
},
|
20
|
+
argTypes: {
|
21
|
+
// types: getOptionsArgTypes(options.types),
|
22
|
+
},
|
23
|
+
}
|
24
|
+
|
25
|
+
export const Default = Template.bind({})
|
26
|
+
// export const List = ListTemplate.bind({})
|
27
|
+
// List.args = { items: options.types.map((type) => ({ type })) }
|
@@ -0,0 +1 @@
|
|
1
|
+
export const options = { types: [] }
|
@@ -0,0 +1,137 @@
|
|
1
|
+
import React, { useState } from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
import ReactTooltip from 'react-tooltip'
|
4
|
+
import styles from './Textarea.module.css'
|
5
|
+
import withStyles from '../../hocs/withStyles'
|
6
|
+
|
7
|
+
const DEFAULT_TEXTAREA_ROWS = 5
|
8
|
+
|
9
|
+
import Icon from '../../atoms/Icon'
|
10
|
+
|
11
|
+
export const Textarea = ({
|
12
|
+
children,
|
13
|
+
rows,
|
14
|
+
placeholder,
|
15
|
+
onChange,
|
16
|
+
getStyles,
|
17
|
+
value,
|
18
|
+
id,
|
19
|
+
disabled,
|
20
|
+
viewBoxCopyCode,
|
21
|
+
txtBtnCopyCode,
|
22
|
+
txtTootipCopyCode,
|
23
|
+
}) => {
|
24
|
+
|
25
|
+
|
26
|
+
// STATE TOOLTIP
|
27
|
+
const [isToolTipMounted, setIsToolTipMounted] = useState(false)
|
28
|
+
|
29
|
+
// TOOLTIP
|
30
|
+
const handleMouseEnter = () => {
|
31
|
+
setIsToolTipMounted(true)
|
32
|
+
}
|
33
|
+
const handleMouseLeave = () => {
|
34
|
+
setIsToolTipMounted(false)
|
35
|
+
}
|
36
|
+
|
37
|
+
const handleClick = async () => {
|
38
|
+
|
39
|
+
// // Select the text field
|
40
|
+
// txtTootipCopyCode.select()
|
41
|
+
// txtTootipCopyCode.setSelectionRange(0, 99999) // For mobile devices
|
42
|
+
|
43
|
+
// // Copy the text inside the text field
|
44
|
+
// navigator.clipboard.writeText(txtTootipCopyCode.value)
|
45
|
+
|
46
|
+
// // Alert the copied text
|
47
|
+
// alert("Copied the text: " + txtTootipCopyCode.value)
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
try {
|
53
|
+
await navigator.clipboard.writeText(txtTootipCopyCode);
|
54
|
+
console.log('Content copied to clipboard');
|
55
|
+
/* Resolved - text copied to clipboard successfully */
|
56
|
+
} catch (err) {
|
57
|
+
console.error('Failed to copy: ', err);
|
58
|
+
/* Rejected - text failed to copy to the clipboard */
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
}
|
65
|
+
|
66
|
+
return (
|
67
|
+
<>
|
68
|
+
{viewBoxCopyCode ?
|
69
|
+
<>
|
70
|
+
<span
|
71
|
+
data-tip
|
72
|
+
data-for='tooltipCopyCode'
|
73
|
+
onMouseEnter={handleMouseEnter}
|
74
|
+
onMouseLeave={handleMouseLeave}
|
75
|
+
style={{ width: 'max-content', display: 'block' }}
|
76
|
+
>
|
77
|
+
<>
|
78
|
+
<div className={getStyles('boxCopyCode')}>
|
79
|
+
<Icon
|
80
|
+
name="infoExampleCode"
|
81
|
+
/>
|
82
|
+
<div className={getStyles('btnCopyCode')} onClick={handleClick}>
|
83
|
+
{txtBtnCopyCode}
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
</>
|
87
|
+
</span>
|
88
|
+
|
89
|
+
{isToolTipMounted ? (
|
90
|
+
<ReactTooltip id='tooltipCopyCode' type='error'>
|
91
|
+
<span>{txtTootipCopyCode}</span>
|
92
|
+
</ReactTooltip>
|
93
|
+
) : null}
|
94
|
+
|
95
|
+
</>
|
96
|
+
|
97
|
+
: null}
|
98
|
+
<textarea
|
99
|
+
id={id}
|
100
|
+
className={getStyles('textarea')}
|
101
|
+
rows={rows}
|
102
|
+
placeholder={placeholder}
|
103
|
+
onChange={onChange}
|
104
|
+
value={value}
|
105
|
+
disabled={disabled}
|
106
|
+
>
|
107
|
+
{children}
|
108
|
+
</textarea>
|
109
|
+
</>
|
110
|
+
)
|
111
|
+
}
|
112
|
+
|
113
|
+
Textarea.propTypes = {
|
114
|
+
children: PropTypes.node,
|
115
|
+
getStyles: PropTypes.func.isRequired,
|
116
|
+
onChange: PropTypes.func.isRequired,
|
117
|
+
rows: PropTypes.number,
|
118
|
+
placeholder: PropTypes.string,
|
119
|
+
value: PropTypes.string,
|
120
|
+
id: PropTypes.string.isRequired,
|
121
|
+
viewBoxCopyCode: PropTypes.bool,
|
122
|
+
txtBtnCopyCode: PropTypes.string,
|
123
|
+
txtTootipCopyCode: PropTypes.string,
|
124
|
+
}
|
125
|
+
|
126
|
+
Textarea.defaultProps = {
|
127
|
+
getStyles: () => { },
|
128
|
+
onChange: () => { },
|
129
|
+
rows: DEFAULT_TEXTAREA_ROWS,
|
130
|
+
id: '',
|
131
|
+
disabled: false,
|
132
|
+
viewBoxCopyCode: false,
|
133
|
+
txtBtnCopyCode: 'COPIAR',
|
134
|
+
txtTootipCopyCode: 'yeeeee'
|
135
|
+
}
|
136
|
+
|
137
|
+
export default withStyles(styles)(Textarea)
|
@@ -0,0 +1,54 @@
|
|
1
|
+
.textarea {
|
2
|
+
display: flex;
|
3
|
+
width: 100%;
|
4
|
+
/* min-height: 100px; */
|
5
|
+
padding: 20px;
|
6
|
+
border: var(--border-width-thin) solid var(--color-cool-gray-200);
|
7
|
+
background: var(--input-background);
|
8
|
+
border-radius: var(--textarea-border-radius);
|
9
|
+
box-shadow: var(--box-shadow-sm);
|
10
|
+
color: var(--color-font-base);
|
11
|
+
font-family: var(--font-family-sans);
|
12
|
+
font-size: var(--paragraph-font-size-xs);
|
13
|
+
font-weight: var(--font-weight-medium);
|
14
|
+
line-height: var(--line-height-tight);
|
15
|
+
resize: vertical;
|
16
|
+
}
|
17
|
+
|
18
|
+
.textarea::placeholder {
|
19
|
+
color: var(--color-font-highlight);
|
20
|
+
}
|
21
|
+
|
22
|
+
.textarea:focus {
|
23
|
+
box-shadow: 0 0 0 1px var(--color-primary), 0 0 10px 0 var(--color-primary);
|
24
|
+
outline: none;
|
25
|
+
}
|
26
|
+
|
27
|
+
.textarea:disabled {
|
28
|
+
background-color: hsl(0, 0%, 95%);
|
29
|
+
border-color: hsl(0, 0%, 90%);
|
30
|
+
}
|
31
|
+
|
32
|
+
.boxCopyCode {
|
33
|
+
display: flex;
|
34
|
+
align-items: center;
|
35
|
+
cursor: pointer;
|
36
|
+
/* margin-top: -44px; */
|
37
|
+
/* position: absolute; */
|
38
|
+
/* top: 108px;
|
39
|
+
right: 24px; */
|
40
|
+
}
|
41
|
+
|
42
|
+
.btnCopyCode {
|
43
|
+
font-size: 10px;
|
44
|
+
border: 1px solid var(--color-font-base);
|
45
|
+
padding: 3px;
|
46
|
+
border-radius: 3px;
|
47
|
+
color: var(--color-font-base);
|
48
|
+
}
|
49
|
+
|
50
|
+
.btnCopyCode:hover {
|
51
|
+
border: 1px solid var(--color-font-base);
|
52
|
+
color: #fff;
|
53
|
+
background-color: var(--color-font-base);
|
54
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { Textarea, styles } from '.'
|
2
|
+
|
3
|
+
import { getTemplate } from '../../helpers/storybook'
|
4
|
+
|
5
|
+
const Template = getTemplate(Textarea, styles)
|
6
|
+
|
7
|
+
export default {
|
8
|
+
title: 'Atoms/Textarea',
|
9
|
+
component: Textarea,
|
10
|
+
args: {
|
11
|
+
placeholder:
|
12
|
+
'Country speed seat newfound ah stained Gundabad stinking runt.',
|
13
|
+
},
|
14
|
+
}
|
15
|
+
|
16
|
+
export const Default = Template.bind({})
|
@@ -0,0 +1,25 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`Storyshots Atoms/Textarea Default 1`] = `
|
4
|
+
<div
|
5
|
+
style={
|
6
|
+
Object {
|
7
|
+
"alignContent": "flex-start",
|
8
|
+
"display": "flex",
|
9
|
+
"flexDirection": "column",
|
10
|
+
"flexWrap": "wrap",
|
11
|
+
"gap": "10px 30px",
|
12
|
+
"height": "100%",
|
13
|
+
"justifyContent": "flex-start",
|
14
|
+
"maxHeight": "auto",
|
15
|
+
}
|
16
|
+
}
|
17
|
+
>
|
18
|
+
<textarea
|
19
|
+
className="textarea"
|
20
|
+
onChange={[Function]}
|
21
|
+
placeholder="Country speed seat newfound ah stained Gundabad stinking runt."
|
22
|
+
rows={5}
|
23
|
+
/>
|
24
|
+
</div>
|
25
|
+
`;
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import React, { useState } from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
|
4
|
+
import styles from './Toggle.module.css'
|
5
|
+
import withStyles from '../../hocs/withStyles'
|
6
|
+
|
7
|
+
export const Toggle = ({ getStyles, onChangeCheckbox, disabled, id, checked, name }) => {
|
8
|
+
|
9
|
+
// const [isChecked, setIsChecked] = useState(false);
|
10
|
+
|
11
|
+
// const handleOnChange = () => {
|
12
|
+
// setIsChecked(!isChecked)
|
13
|
+
// };
|
14
|
+
|
15
|
+
|
16
|
+
return <div className={getStyles('toggle')}>
|
17
|
+
|
18
|
+
<input
|
19
|
+
type="checkbox"
|
20
|
+
id={id}
|
21
|
+
name={name}
|
22
|
+
disabled={disabled}
|
23
|
+
// checked={isChecked || checked}
|
24
|
+
checked={checked}
|
25
|
+
onChange={(e) => {
|
26
|
+
// handleOnChange()
|
27
|
+
onChangeCheckbox(e)
|
28
|
+
}}
|
29
|
+
className={getStyles('toggle-item')}
|
30
|
+
/>
|
31
|
+
<label htmlFor={id} className={getStyles('checkbox-custom-label')}></label>
|
32
|
+
|
33
|
+
|
34
|
+
</div>
|
35
|
+
}
|
36
|
+
|
37
|
+
Toggle.propTypes = {
|
38
|
+
getStyles: PropTypes.func.isRequired,
|
39
|
+
onChangeCheckbox: PropTypes.func.isRequired,
|
40
|
+
id: PropTypes.string.isRequired,
|
41
|
+
name: PropTypes.string.isRequired,
|
42
|
+
checked: PropTypes.bool.isRequired,
|
43
|
+
disabled: PropTypes.bool,
|
44
|
+
}
|
45
|
+
|
46
|
+
Toggle.defaultProps = {
|
47
|
+
getStyles: () => { },
|
48
|
+
onChangeCheckbox: () => { },
|
49
|
+
id: 'toggle',
|
50
|
+
name: 'toggle',
|
51
|
+
checked: false,
|
52
|
+
disabled: false,
|
53
|
+
}
|
54
|
+
|
55
|
+
|
56
|
+
export default withStyles(styles)(Toggle)
|
@@ -0,0 +1,41 @@
|
|
1
|
+
.toggle {
|
2
|
+
display: flex;
|
3
|
+
}
|
4
|
+
|
5
|
+
.toggle-item {
|
6
|
+
opacity: 0;
|
7
|
+
width: 3em;
|
8
|
+
height: 1.4em;
|
9
|
+
position: absolute;
|
10
|
+
z-index: 1;
|
11
|
+
cursor: pointer;
|
12
|
+
}
|
13
|
+
.toggle-item + .checkbox-custom-label {
|
14
|
+
display: flex;
|
15
|
+
width: 4em;
|
16
|
+
height: 2em;
|
17
|
+
background: #aaa;
|
18
|
+
border-radius: 50px;
|
19
|
+
position: relative;
|
20
|
+
transition: all .3s ease;
|
21
|
+
cursor: pointer;
|
22
|
+
box-shadow: inset 0 0 5px #222;
|
23
|
+
}
|
24
|
+
.toggle-item + .checkbox-custom-label:after {
|
25
|
+
content: '';
|
26
|
+
position: absolute;
|
27
|
+
width: 1.5em;
|
28
|
+
height: 1.5em;
|
29
|
+
background: #fff;
|
30
|
+
border-radius: 50%;
|
31
|
+
top: .25em;
|
32
|
+
left: .25em;
|
33
|
+
transition: all .2s ease;
|
34
|
+
}
|
35
|
+
.toggle-item:checked + .checkbox-custom-label {
|
36
|
+
background: var(--color-tertiary);
|
37
|
+
box-shadow: inset 0 0 5px rgb(95, 95, 95);
|
38
|
+
}
|
39
|
+
.toggle-item:checked + .checkbox-custom-label:after {
|
40
|
+
left: 2.3em;
|
41
|
+
}
|