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,229 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
|
4
|
+
import styles from './Input.module.css'
|
5
|
+
import { options } from './constants'
|
6
|
+
import withStyles from '../../hocs/withStyles'
|
7
|
+
import Icon from '../Icon'
|
8
|
+
import { Horizontal } from '../../layout/Spacer/components'
|
9
|
+
|
10
|
+
|
11
|
+
// const handleChange = ({ onChange }) => () => {
|
12
|
+
// onChange()
|
13
|
+
// }
|
14
|
+
|
15
|
+
export const Input = ({
|
16
|
+
getStyles,
|
17
|
+
type,
|
18
|
+
id,
|
19
|
+
value,
|
20
|
+
isInline,
|
21
|
+
isInlineCode,
|
22
|
+
isInputFilter,
|
23
|
+
isInputSecondary,
|
24
|
+
onChange,
|
25
|
+
onFocus,
|
26
|
+
onBlur,
|
27
|
+
onClick,
|
28
|
+
onKeyDown,
|
29
|
+
onKeyUp,
|
30
|
+
onInput,
|
31
|
+
maxLength,
|
32
|
+
placeholder,
|
33
|
+
autoComplete,
|
34
|
+
disabled,
|
35
|
+
isViewIcon,
|
36
|
+
idIcon,
|
37
|
+
nameIcon,
|
38
|
+
sizeIcon,
|
39
|
+
colorIcon,
|
40
|
+
backgroundIcon,
|
41
|
+
pattern,
|
42
|
+
onClickViewPass,
|
43
|
+
viewPass,
|
44
|
+
min,
|
45
|
+
autoFocus,
|
46
|
+
readonly,
|
47
|
+
}) => (
|
48
|
+
|
49
|
+
<>
|
50
|
+
|
51
|
+
{isViewIcon ?
|
52
|
+
|
53
|
+
<div className={getStyles('box-icon-input')}>
|
54
|
+
|
55
|
+
<Icon
|
56
|
+
id={idIcon}
|
57
|
+
name={nameIcon}
|
58
|
+
size={sizeIcon}
|
59
|
+
color={colorIcon}
|
60
|
+
background={backgroundIcon}
|
61
|
+
/>
|
62
|
+
|
63
|
+
<Horizontal size="xs" />
|
64
|
+
|
65
|
+
<input
|
66
|
+
className={getStyles('input', {
|
67
|
+
'is-inline': isInline,
|
68
|
+
'is-inline-code': isInlineCode,
|
69
|
+
'is-input-filter': isInputFilter,
|
70
|
+
'is-input-secondary': isInputSecondary,
|
71
|
+
})}
|
72
|
+
readOnly={readonly}
|
73
|
+
type={type}
|
74
|
+
id={id}
|
75
|
+
value={value}
|
76
|
+
placeholder={placeholder}
|
77
|
+
onChange={onChange}
|
78
|
+
onFocus={onFocus}
|
79
|
+
onBlur={onBlur}
|
80
|
+
onClick={onClick}
|
81
|
+
onKeyDown={onKeyDown}
|
82
|
+
onKeyUp={onKeyUp}
|
83
|
+
onInput={onInput}
|
84
|
+
autoComplete={autoComplete}
|
85
|
+
disabled={disabled}
|
86
|
+
min={min}
|
87
|
+
></input>
|
88
|
+
|
89
|
+
</div> :
|
90
|
+
|
91
|
+
type === 'password' ?
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<div className={getStyles('box-icon-input')}>
|
96
|
+
|
97
|
+
<input
|
98
|
+
className={getStyles('input', {
|
99
|
+
'is-inline': isInline,
|
100
|
+
'is-inline-code': isInlineCode,
|
101
|
+
'is-input-filter': isInputFilter,
|
102
|
+
'is-input-secondary': isInputSecondary,
|
103
|
+
})}
|
104
|
+
readOnly={readonly}
|
105
|
+
type={type}
|
106
|
+
id={id}
|
107
|
+
value={value}
|
108
|
+
placeholder={placeholder}
|
109
|
+
onChange={onChange}
|
110
|
+
onFocus={onFocus}
|
111
|
+
onBlur={onBlur}
|
112
|
+
onClick={onClick}
|
113
|
+
onKeyDown={onKeyDown}
|
114
|
+
autoComplete={autoComplete}
|
115
|
+
disabled={disabled}
|
116
|
+
min={min}
|
117
|
+
onInput={onInput}
|
118
|
+
></input>
|
119
|
+
|
120
|
+
<Horizontal size="xs" />
|
121
|
+
|
122
|
+
<Icon
|
123
|
+
background={!viewPass ? "inverted" : "success"}
|
124
|
+
color={!viewPass ? "base" : "inverted"}
|
125
|
+
isClickable
|
126
|
+
name="userView"
|
127
|
+
onClick={onClickViewPass}
|
128
|
+
size="sm"
|
129
|
+
/>
|
130
|
+
|
131
|
+
|
132
|
+
</div>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
: <input
|
137
|
+
className={getStyles('input', {
|
138
|
+
'is-inline': isInline,
|
139
|
+
'is-inline-code': isInlineCode,
|
140
|
+
'is-input-filter': isInputFilter,
|
141
|
+
'is-input-secondary': isInputSecondary,
|
142
|
+
})}
|
143
|
+
readOnly={readonly}
|
144
|
+
type={type}
|
145
|
+
id={id}
|
146
|
+
value={value}
|
147
|
+
placeholder={placeholder}
|
148
|
+
onChange={onChange}
|
149
|
+
onFocus={onFocus}
|
150
|
+
onBlur={onBlur}
|
151
|
+
onClick={onClick}
|
152
|
+
onKeyDown={onKeyDown}
|
153
|
+
maxLength={maxLength}
|
154
|
+
autoComplete={autoComplete}
|
155
|
+
disabled={disabled}
|
156
|
+
min={min}
|
157
|
+
autoFocus={autoFocus}
|
158
|
+
onInput={onInput}
|
159
|
+
></input>
|
160
|
+
|
161
|
+
}
|
162
|
+
|
163
|
+
</>
|
164
|
+
)
|
165
|
+
|
166
|
+
Input.propTypes = {
|
167
|
+
onChange: PropTypes.func.isRequired,
|
168
|
+
onFocus: PropTypes.func,
|
169
|
+
onBlur: PropTypes.func,
|
170
|
+
onClick: PropTypes.func,
|
171
|
+
onKeyDown: PropTypes.func,
|
172
|
+
onKeyUp: PropTypes.func,
|
173
|
+
onInput: PropTypes.func,
|
174
|
+
maxLength: PropTypes.number,
|
175
|
+
getStyles: PropTypes.func.isRequired,
|
176
|
+
type: PropTypes.oneOf(options.types),
|
177
|
+
id: PropTypes.string.isRequired,
|
178
|
+
value: PropTypes.string,
|
179
|
+
placeholder: PropTypes.string,
|
180
|
+
isInline: PropTypes.bool,
|
181
|
+
isInlineCode: PropTypes.bool,
|
182
|
+
isInputFilter: PropTypes.bool,
|
183
|
+
isInputSecondary: PropTypes.bool,
|
184
|
+
isViewIcon: PropTypes.bool,
|
185
|
+
idIcon: PropTypes.string,
|
186
|
+
nameIcon: PropTypes.string,
|
187
|
+
sizeIcon: PropTypes.string,
|
188
|
+
colorIcon: PropTypes.string,
|
189
|
+
backgroundIcon: PropTypes.string,
|
190
|
+
autoComplete: PropTypes.string,
|
191
|
+
disabled: PropTypes.bool,
|
192
|
+
readonly: PropTypes.bool,
|
193
|
+
min: PropTypes.any,
|
194
|
+
autoFocus: PropTypes.any,
|
195
|
+
onClickViewPass: PropTypes.func,
|
196
|
+
viewPass: PropTypes.bool,
|
197
|
+
}
|
198
|
+
|
199
|
+
Input.defaultProps = {
|
200
|
+
type: 'text',
|
201
|
+
// value: '',
|
202
|
+
id: '',
|
203
|
+
placeholder: '',
|
204
|
+
isInline: false,
|
205
|
+
isInlineCode: false,
|
206
|
+
isInputFilter: false,
|
207
|
+
isInputSecondary: false,
|
208
|
+
onChange: () => { },
|
209
|
+
onFocus: () => { },
|
210
|
+
onBlur: () => { },
|
211
|
+
onClick: () => { },
|
212
|
+
onKeyDown: () => { },
|
213
|
+
onKeyUp: () => { },
|
214
|
+
onInput: () => { },
|
215
|
+
getStyles: () => { },
|
216
|
+
isViewIcon: false,
|
217
|
+
idIcon: 'Ejemplo',
|
218
|
+
nameIcon: 'user',
|
219
|
+
sizeIcon: 'md',
|
220
|
+
colorIcon: 'highlight',
|
221
|
+
backgroundIcon: 'base',
|
222
|
+
autoComplete: 'on',
|
223
|
+
disabled: false,
|
224
|
+
readonly: false,
|
225
|
+
onClickViewPass: () => { },
|
226
|
+
viewPass: false,
|
227
|
+
}
|
228
|
+
|
229
|
+
export default withStyles(styles)(Input)
|
@@ -0,0 +1,83 @@
|
|
1
|
+
.input {
|
2
|
+
width: 100%;
|
3
|
+
height: var(--input-height);
|
4
|
+
padding: 10px 17px;
|
5
|
+
border: var(--border-width-thin) solid var(--color-brand-white-lilac);
|
6
|
+
background: var(--input-background);
|
7
|
+
/* border-radius: var(--input-border-radius); */
|
8
|
+
color: var(--color-font-base);
|
9
|
+
font-family: var(--font-family-sans);
|
10
|
+
font-size: var(--font-size-base);
|
11
|
+
font-weight: var(--font-weight-medium);
|
12
|
+
line-height: var(--line-height-relaxed);
|
13
|
+
transition: box-shadow 0.2s ease;
|
14
|
+
}
|
15
|
+
|
16
|
+
.input::placeholder {
|
17
|
+
color: var(--color-brand-white-lilac);
|
18
|
+
font-weight: var(--font-weight-light);
|
19
|
+
}
|
20
|
+
|
21
|
+
.input:focus {
|
22
|
+
box-shadow: 0 0 0 1px var(--color-primary), 0 0 10px 0 var(--color-primary);
|
23
|
+
outline: none;
|
24
|
+
}
|
25
|
+
|
26
|
+
.input:disabled::placeholder {
|
27
|
+
color: #9a9a9a;
|
28
|
+
font-weight: var(--font-weight-light);
|
29
|
+
}
|
30
|
+
|
31
|
+
.input:disabled {
|
32
|
+
background: #dedede;
|
33
|
+
}
|
34
|
+
|
35
|
+
[data-theme="GrupoMutua"] .input {
|
36
|
+
border-radius: var(--button-border-radius-sm);
|
37
|
+
}
|
38
|
+
|
39
|
+
[data-theme="Taxisvalencia"] .input,
|
40
|
+
[data-theme="Radiotaxiaragon"] .input,
|
41
|
+
[data-theme="Spartan"] .input,
|
42
|
+
[data-theme="Default"] .input {
|
43
|
+
border-radius: var(--button-border-radius-sm);
|
44
|
+
}
|
45
|
+
|
46
|
+
|
47
|
+
.is-inline {
|
48
|
+
max-width: max-content;
|
49
|
+
}
|
50
|
+
|
51
|
+
.is-inline-code {
|
52
|
+
max-width: 38px;
|
53
|
+
padding: 7px 9px;
|
54
|
+
margin-right: 8px;
|
55
|
+
font-size: var(--font-size-md);
|
56
|
+
font-weight: var(--font-weight-bold);
|
57
|
+
text-align: center;
|
58
|
+
}
|
59
|
+
|
60
|
+
.is-input-filter {
|
61
|
+
border-radius: var(--border-radius-sm);
|
62
|
+
color: var(--color-font-highlight);
|
63
|
+
padding: 7px 9px;
|
64
|
+
font-size: var(--font-size-base);
|
65
|
+
font-weight: var(--font-weight-light);
|
66
|
+
text-align: left;
|
67
|
+
height: 28px;
|
68
|
+
}
|
69
|
+
|
70
|
+
.is-input-secondary {
|
71
|
+
border-radius: var(--border-radius-sm);
|
72
|
+
color: var(--color-font-base);
|
73
|
+
padding: 7px 9px;
|
74
|
+
font-size: var(--font-size-base);
|
75
|
+
font-weight: var(--font-weight-light);
|
76
|
+
text-align: left;
|
77
|
+
height: 28px;
|
78
|
+
}
|
79
|
+
|
80
|
+
.box-icon-input {
|
81
|
+
display: flex;
|
82
|
+
align-items: center;
|
83
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { Input, options, styles } from '.'
|
2
|
+
|
3
|
+
import {
|
4
|
+
getTemplate,
|
5
|
+
getListTemplate,
|
6
|
+
getOptionsArgTypes,
|
7
|
+
} from '../../helpers/storybook'
|
8
|
+
|
9
|
+
const Template = getTemplate(Input, styles)
|
10
|
+
const ListTemplate = getListTemplate(Input, styles)
|
11
|
+
|
12
|
+
export default {
|
13
|
+
title: 'Atoms/Input',
|
14
|
+
component: Input,
|
15
|
+
args: {
|
16
|
+
placeholder: 'Et harum quidem',
|
17
|
+
},
|
18
|
+
argTypes: {
|
19
|
+
type: getOptionsArgTypes(options.types),
|
20
|
+
},
|
21
|
+
}
|
22
|
+
|
23
|
+
export const Default = Template.bind({})
|
24
|
+
|
25
|
+
export const Value = Template.bind({})
|
26
|
+
Value.args = { value: 'Nam libero tempore, cum soluta.' }
|
27
|
+
|
28
|
+
export const Types = ListTemplate.bind({})
|
29
|
+
Types.args = { items: options.types.map((type) => ({ type })) }
|
30
|
+
|
31
|
+
export const Inline = Template.bind({})
|
32
|
+
Inline.args = { isInline: true }
|
33
|
+
|
34
|
+
export const InlineCode = Template.bind({})
|
35
|
+
InlineCode.args = { isInlineCode: true }
|
36
|
+
|
37
|
+
export const isInputFilter = Template.bind({})
|
38
|
+
isInputFilter.args = { isInputFilter: true }
|
@@ -0,0 +1,101 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`Storyshots Atoms/Input 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
|
+
<input
|
19
|
+
className="input"
|
20
|
+
onChange={[Function]}
|
21
|
+
placeholder="Et harum quidem"
|
22
|
+
type="text"
|
23
|
+
value=""
|
24
|
+
/>
|
25
|
+
</div>
|
26
|
+
`;
|
27
|
+
|
28
|
+
exports[`Storyshots Atoms/Input Inline 1`] = `
|
29
|
+
<div
|
30
|
+
style={
|
31
|
+
Object {
|
32
|
+
"alignContent": "flex-start",
|
33
|
+
"display": "flex",
|
34
|
+
"flexDirection": "column",
|
35
|
+
"flexWrap": "wrap",
|
36
|
+
"gap": "10px 30px",
|
37
|
+
"height": "100%",
|
38
|
+
"justifyContent": "flex-start",
|
39
|
+
"maxHeight": "auto",
|
40
|
+
}
|
41
|
+
}
|
42
|
+
>
|
43
|
+
<input
|
44
|
+
className="input is-inline"
|
45
|
+
onChange={[Function]}
|
46
|
+
placeholder="Et harum quidem"
|
47
|
+
type="text"
|
48
|
+
value=""
|
49
|
+
/>
|
50
|
+
</div>
|
51
|
+
`;
|
52
|
+
|
53
|
+
exports[`Storyshots Atoms/Input Types 1`] = `
|
54
|
+
<div
|
55
|
+
style={
|
56
|
+
Object {
|
57
|
+
"alignContent": "flex-start",
|
58
|
+
"display": "flex",
|
59
|
+
"flexDirection": "column",
|
60
|
+
"flexWrap": "wrap",
|
61
|
+
"gap": "10px 30px",
|
62
|
+
"height": "100%",
|
63
|
+
"justifyContent": "flex-start",
|
64
|
+
"maxHeight": "auto",
|
65
|
+
}
|
66
|
+
}
|
67
|
+
>
|
68
|
+
<input
|
69
|
+
className="input"
|
70
|
+
onChange={[Function]}
|
71
|
+
placeholder="Et harum quidem"
|
72
|
+
type="text"
|
73
|
+
value=""
|
74
|
+
/>
|
75
|
+
</div>
|
76
|
+
`;
|
77
|
+
|
78
|
+
exports[`Storyshots Atoms/Input Value 1`] = `
|
79
|
+
<div
|
80
|
+
style={
|
81
|
+
Object {
|
82
|
+
"alignContent": "flex-start",
|
83
|
+
"display": "flex",
|
84
|
+
"flexDirection": "column",
|
85
|
+
"flexWrap": "wrap",
|
86
|
+
"gap": "10px 30px",
|
87
|
+
"height": "100%",
|
88
|
+
"justifyContent": "flex-start",
|
89
|
+
"maxHeight": "auto",
|
90
|
+
}
|
91
|
+
}
|
92
|
+
>
|
93
|
+
<input
|
94
|
+
className="input"
|
95
|
+
onChange={[Function]}
|
96
|
+
placeholder="Et harum quidem"
|
97
|
+
type="text"
|
98
|
+
value="Nam libero tempore, cum soluta."
|
99
|
+
/>
|
100
|
+
</div>
|
101
|
+
`;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
|
4
|
+
import styles from './Label.module.css'
|
5
|
+
import { options } from './constants'
|
6
|
+
import withStyles from '../../hocs/withStyles'
|
7
|
+
|
8
|
+
export const Label = ({ children, getStyles, isHint }) => {
|
9
|
+
return (
|
10
|
+
|
11
|
+
<label className={getStyles('label', ['color'], { 'is-hint': isHint })}>{children}</label>
|
12
|
+
|
13
|
+
)
|
14
|
+
}
|
15
|
+
|
16
|
+
Label.propTypes = {
|
17
|
+
children: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
18
|
+
getStyles: PropTypes.func.isRequired,
|
19
|
+
isHint: PropTypes.bool,
|
20
|
+
color: PropTypes.oneOf(options.colors),
|
21
|
+
// type: PropTypes.oneOf(options.types),
|
22
|
+
}
|
23
|
+
|
24
|
+
Label.defaultProps = {
|
25
|
+
getStyles: () => { },
|
26
|
+
children: ' ',
|
27
|
+
isHint: false,
|
28
|
+
color: 'label',
|
29
|
+
}
|
30
|
+
|
31
|
+
export default withStyles(styles)(Label)
|
@@ -0,0 +1,42 @@
|
|
1
|
+
.label {
|
2
|
+
display: flex;
|
3
|
+
text-align: left;
|
4
|
+
width: 100%;
|
5
|
+
/* color: var(--color-brand-eastern-blue); */
|
6
|
+
font-family: var(--font-family-sans);
|
7
|
+
font-size: var(--font-size-mini);
|
8
|
+
font-weight: var(--font-weight-light);
|
9
|
+
line-height: var(--line-height-tight);
|
10
|
+
}
|
11
|
+
|
12
|
+
.is-hint {
|
13
|
+
font-size: 11px;
|
14
|
+
}
|
15
|
+
|
16
|
+
.color-label {
|
17
|
+
color: var(--color-brand-eastern-blue);
|
18
|
+
}
|
19
|
+
|
20
|
+
.color-base {
|
21
|
+
color: var(--color-font-base);
|
22
|
+
}
|
23
|
+
|
24
|
+
.color-inverted {
|
25
|
+
color: var(--color-font-inverted);
|
26
|
+
}
|
27
|
+
|
28
|
+
.color-muted {
|
29
|
+
color: var(--color-brand-mandy);
|
30
|
+
}
|
31
|
+
|
32
|
+
.color-primary {
|
33
|
+
color: var(--color-primary);
|
34
|
+
}
|
35
|
+
|
36
|
+
.color-tertiary {
|
37
|
+
color: var(--color-tertiary);
|
38
|
+
}
|
39
|
+
|
40
|
+
.color-info {
|
41
|
+
color: var(--color-brand-azure-radiance);
|
42
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { Label, styles, options } from '.'
|
2
|
+
|
3
|
+
import {
|
4
|
+
getTemplate,
|
5
|
+
getListTemplate,
|
6
|
+
getOptionsArgTypes,
|
7
|
+
} from '../../helpers/storybook'
|
8
|
+
|
9
|
+
const Template = getTemplate(Label, styles)
|
10
|
+
const ListTemplate = getListTemplate(Label, styles)
|
11
|
+
|
12
|
+
export default {
|
13
|
+
title: 'Atoms/Label',
|
14
|
+
component: Label,
|
15
|
+
args: {
|
16
|
+
isHint: false
|
17
|
+
},
|
18
|
+
argTypes: {
|
19
|
+
color: getOptionsArgTypes(options.colors),
|
20
|
+
},
|
21
|
+
}
|
22
|
+
|
23
|
+
export const Default = Template.bind({})
|
24
|
+
|
25
|
+
export const Colors = ListTemplate.bind({})
|
26
|
+
Colors.args = { items: options.colors.map((color) => ({ color })) }
|
@@ -0,0 +1 @@
|
|
1
|
+
export const options = { colors: ['label', 'base', 'muted', 'inverted', 'primary', 'tertiary', 'info'], }
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
import Link from 'next/link'
|
4
|
+
|
5
|
+
import styles from './LinkItem.module.css'
|
6
|
+
import { options } from './constants'
|
7
|
+
import withStyles from '../../hocs/withStyles'
|
8
|
+
// import Paragraph from '../Paragraph'
|
9
|
+
|
10
|
+
export const LinkItem = ({ children, size, color, getStyles, isHref, target }) => {
|
11
|
+
return (
|
12
|
+
<Link href={isHref} passHref>
|
13
|
+
<a target={target} className={getStyles('link', ['color'])}>
|
14
|
+
{/* <Paragraph size={size} color={color} weight="semibold" isInline> */}
|
15
|
+
{children}
|
16
|
+
{/* </Paragraph> */}
|
17
|
+
</a>
|
18
|
+
</Link>
|
19
|
+
)
|
20
|
+
}
|
21
|
+
|
22
|
+
LinkItem.propTypes = {
|
23
|
+
children: PropTypes.node.isRequired,
|
24
|
+
getStyles: PropTypes.func.isRequired,
|
25
|
+
color: PropTypes.oneOf(options.colors),
|
26
|
+
size: PropTypes.oneOf(options.sizes),
|
27
|
+
target: PropTypes.string,
|
28
|
+
}
|
29
|
+
|
30
|
+
LinkItem.defaultProps = {
|
31
|
+
getStyles: () => { },
|
32
|
+
color: 'primary',
|
33
|
+
size: 'md',
|
34
|
+
isHref: '/',
|
35
|
+
target: ''
|
36
|
+
}
|
37
|
+
|
38
|
+
export default withStyles(styles)(LinkItem)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.link {
|
2
|
+
display: inline;
|
3
|
+
max-width: max-content;
|
4
|
+
/* border-bottom: 1px solid currentColor; */
|
5
|
+
cursor: pointer;
|
6
|
+
}
|
7
|
+
|
8
|
+
.color-primary {
|
9
|
+
color: var(--color-primary);
|
10
|
+
}
|
11
|
+
|
12
|
+
.color-tertiary {
|
13
|
+
color: var(--color-tertiary);
|
14
|
+
}
|
15
|
+
|
16
|
+
.link p {
|
17
|
+
font-weight: var(--font-weight-normal);
|
18
|
+
text-decoration: underline;
|
19
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { LinkItem, styles, options } from '.'
|
2
|
+
|
3
|
+
import {
|
4
|
+
getTemplate,
|
5
|
+
getListTemplate,
|
6
|
+
getOptionsArgTypes,
|
7
|
+
} from '../../helpers/storybook'
|
8
|
+
|
9
|
+
const Template = getTemplate(LinkItem, styles)
|
10
|
+
const ListTemplate = getListTemplate(LinkItem, styles)
|
11
|
+
|
12
|
+
export default {
|
13
|
+
title: 'Atoms/LinkItem',
|
14
|
+
component: LinkItem,
|
15
|
+
args: {
|
16
|
+
children: 'Mouths Muil',
|
17
|
+
},
|
18
|
+
argTypes: {
|
19
|
+
color: getOptionsArgTypes(options.colors),
|
20
|
+
size: getOptionsArgTypes(options.sizes),
|
21
|
+
},
|
22
|
+
}
|
23
|
+
|
24
|
+
export const Default = Template.bind({})
|
25
|
+
|
26
|
+
export const Colors = ListTemplate.bind({})
|
27
|
+
Colors.args = { items: options.colors.map((color) => ({ color })) }
|
28
|
+
|
29
|
+
export const Sizes = ListTemplate.bind({})
|
30
|
+
Sizes.args = { items: options.sizes.map((size) => ({ size })) }
|