imbric-theme 0.4.3 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- package/atoms/Icon/Icon.module.css +30 -0
- package/atoms/Icon/constants.js +72 -1
- package/atoms/Input/Input.js +104 -16
- package/atoms/Input/Input.module.css +18 -0
- package/atoms/Modal/Modal.js +8 -3
- package/atoms/Modal/Modal.module.css +28 -0
- package/index.js +4 -0
- package/molecules/CardDefault/CardDefault.js +64 -0
- package/molecules/CardDefault/CardDefault.module.css +18 -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 +39 -12
- package/molecules/CardProductTypesBooking/CardProductTypesBooking.module.css +59 -21
- package/molecules/CardServices/CardServices.js +4 -1
- package/molecules/DynamicSelect/DynamicSelect.js +8 -2
- package/molecules/InputAutocomplete/InputAutocomplete.js +215 -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/RowTable/RowTable.js +208 -81
- package/molecules/RowTable/RowTable.module.css +5 -0
- package/molecules/RowTable/constants.js +36 -0
- package/package.json +3 -1
- package/public/static/images/csv-svgrepo-com (1).svg +16 -0
- package/public/static/images/csv-svgrepo-com.svg +45 -0
- package/public/static/images/list-svgrepo-com.svg +19 -0
- package/public/static/images/pdf-svgrepo-com.svg +17 -0
- package/public/static/images/xls-svgrepo-com (1).svg +17 -0
- package/public/static/images/xls-svgrepo-com.svg +24 -0
- package/public/static/images/email-svgrepo-com.svg +0 -10
- package/public/static/images/user-svgrepo-com (1).svg +0 -27
- package/public/static/images/user-svgrepo-com (2).svg +0 -24
- package/public/static/images/user-svgrepo-com (3).svg +0 -24
- package/public/static/images/user-svgrepo-com.svg +0 -31
@@ -21,6 +21,26 @@
|
|
21
21
|
padding: 15px;
|
22
22
|
}
|
23
23
|
|
24
|
+
.color-success path,
|
25
|
+
.color-success circle {
|
26
|
+
fill: var(--color-tertiary-muted);
|
27
|
+
}
|
28
|
+
|
29
|
+
.color-success line,
|
30
|
+
.color-success rect {
|
31
|
+
stroke: var(--color-tertiary-muted);
|
32
|
+
}
|
33
|
+
|
34
|
+
.color-error path,
|
35
|
+
.color-error circle {
|
36
|
+
fill: var(--color-secondary-muted);
|
37
|
+
}
|
38
|
+
|
39
|
+
.color-error line,
|
40
|
+
.color-error rect {
|
41
|
+
stroke: var(--color-secondary-muted);
|
42
|
+
}
|
43
|
+
|
24
44
|
.color-base path,
|
25
45
|
.color-base circle {
|
26
46
|
fill: var(--color-font-base);
|
@@ -75,6 +95,16 @@
|
|
75
95
|
fill: var(--color-base-transparent) !important;
|
76
96
|
}
|
77
97
|
|
98
|
+
.background-success {
|
99
|
+
background: var(--color-tertiary-muted);
|
100
|
+
border-radius: var(--border-radius-full);
|
101
|
+
}
|
102
|
+
|
103
|
+
.background-error {
|
104
|
+
background: var(--color-secondary-muted);
|
105
|
+
border-radius: var(--border-radius-full);
|
106
|
+
}
|
107
|
+
|
78
108
|
.background-base {
|
79
109
|
background: var(--color-gray-100);
|
80
110
|
border-radius: var(--border-radius-full);
|
package/atoms/Icon/constants.js
CHANGED
@@ -812,6 +812,75 @@ export const iconsMap = {
|
|
812
812
|
</>
|
813
813
|
),
|
814
814
|
},
|
815
|
+
listInvoice: {
|
816
|
+
viewBox: '0 0 24 24',
|
817
|
+
svg: (
|
818
|
+
<>
|
819
|
+
<path d="M23.9,2.3H9c0,0-0.1,0-0.1,0.1v1.4c0,0,0,0.1,0.1,0.1h15c0,0,0.1,0,0.1-0.1L23.9,2.3C24,2.3,24,2.3,23.9,2.3z" />
|
820
|
+
<circle cx="3.5" cy="12.5" r="1.9" />
|
821
|
+
<circle cx="3.5" cy="20.8" r="1.9" />
|
822
|
+
<path d="M9,6.3h7.1c0,0,0.1,0,0.1-0.1V4.9c0,0,0-0.1-0.1-0.1H9c0,0-0.1,0-0.1,0.1L9,6.3C8.9,6.3,9,6.3,9,6.3z" />
|
823
|
+
<path d="M23.9,10.5H9c0,0-0.1,0-0.1,0.1V12C8.9,12,9,12,9,12h15c0,0,0.1,0,0.1-0.1L23.9,10.5C24,10.5,24,10.5,23.9,10.5z" />
|
824
|
+
<path d="M9,14.6h7.1c0,0,0.1,0,0.1-0.1v-1.4c0,0,0-0.1-0.1-0.1H9c0,0-0.1,0-0.1,0.1L9,14.6C8.9,14.5,9,14.6,9,14.6z" />
|
825
|
+
<path d="M23.9,18.7H9c0,0-0.1,0-0.1,0.1v1.4c0,0,0,0.1,0.1,0.1h15c0,0,0.1,0,0.1-0.1L23.9,18.7C24,18.8,24,18.7,23.9,18.7z" />
|
826
|
+
<path d="M16.1,21.3H9c0,0-0.1,0-0.1,0.1v1.4c0,0,0,0.1,0.1,0.1h7.1c0,0,0.1,0,0.1-0.1L16.1,21.3C16.1,21.3,16.1,21.3,16.1,21.3z"
|
827
|
+
/>
|
828
|
+
<polygon points="2.6,4.3 1.4,3 0,4.3 1.3,5.6 2.6,7 4,5.6 7.1,2.6 5.7,1.2 " />
|
829
|
+
</>
|
830
|
+
),
|
831
|
+
},
|
832
|
+
listXLS: {
|
833
|
+
viewBox: '0 0 24 24',
|
834
|
+
svg: (
|
835
|
+
<>
|
836
|
+
<path d="M20.8,21.6c0,0.4-0.4,0.8-0.8,0.8H4c-0.4,0-0.8-0.4-0.8-0.8v-2.4H1.6v2.4C1.6,22.9,2.7,24,4,24h16c1.3,0,2.4-1.1,2.4-2.4
|
837
|
+
v-2.4h-1.6V21.6z"/>
|
838
|
+
<polygon points="3.2,14.9 3.2,15.2 3.2,17.6 4.8,17.6 4.8,15.5 5.6,14.7 6.4,15.5 6.4,17.6 8,17.6 8,15.2 8,14.9 7.8,14.6
|
839
|
+
6.7,13.6 7.8,12.6 8,12.3 8,12 8,9.6 6.4,9.6 6.4,11.7 5.6,12.5 4.8,11.7 4.8,9.6 3.2,9.6 3.2,12 3.2,12.3 3.4,12.6 4.5,13.6
|
840
|
+
3.4,14.6 "/>
|
841
|
+
<polygon points="16,16 16,17.6 20,17.6 20.8,17.6 20.8,16.8 20.8,13.6 20.8,12.8 20,12.8 17.6,12.8 17.6,11.2 20.8,11.2 20.8,9.6
|
842
|
+
16.8,9.6 16,9.6 16,10.4 16,13.6 16,14.4 16.8,14.4 19.2,14.4 19.2,16 "/>
|
843
|
+
<polygon points="9.6,9.6 9.6,16.8 9.6,17.6 10.4,17.6 14.4,17.6 14.4,16 11.2,16 11.2,9.6 " />
|
844
|
+
<path d="M22.2,5l-4.8-4.8l-0.6,0.6l0,0l0.6-0.6L17.1,0h-0.3H4C2.7,0,1.6,1.1,1.6,2.4V8h1.6V2.4C3.2,2,3.6,1.6,4,1.6h12.5l4.3,4.3V8
|
845
|
+
h1.6V5.6V5.3L22.2,5z"/>
|
846
|
+
</>
|
847
|
+
),
|
848
|
+
},
|
849
|
+
listCSV: {
|
850
|
+
viewBox: '0 0 24 24',
|
851
|
+
svg: (
|
852
|
+
<>
|
853
|
+
<polygon points="8,11.2 8,9.6 4,9.6 3.2,9.6 3.2,10.4 3.2,16.8 3.2,17.6 4,17.6 8,17.6 8,16 4.8,16 4.8,11.2 " />
|
854
|
+
<path d="M20.8,21.6c0,0.4-0.4,0.8-0.8,0.8H4c-0.4,0-0.8-0.4-0.8-0.8v-2.4H1.6v2.4C1.6,22.9,2.7,24,4,24h16c1.3,0,2.4-1.1,2.4-2.4
|
855
|
+
v-2.4h-1.6V21.6z"/>
|
856
|
+
<path d="M22.2,5l-4.8-4.8l-0.6,0.6l0,0l0.6-0.6L17.1,0h-0.3H4C2.7,0,1.6,1.1,1.6,2.4V8h1.6V2.4C3.2,2,3.6,1.6,4,1.6h12.5l4.3,4.3V8
|
857
|
+
h1.6V5.6V5.3L22.2,5z"/>
|
858
|
+
<polygon points="9.6,16 9.6,17.6 13.6,17.6 14.4,17.6 14.4,16.8 14.4,13.6 14.4,12.8 13.6,12.8 11.2,12.8 11.2,11.2 14.4,11.2
|
859
|
+
14.4,9.6 10.4,9.6 9.6,9.6 9.6,10.4 9.6,13.6 9.6,14.4 10.4,14.4 12.8,14.4 12.8,16 "/>
|
860
|
+
<polygon points="16,9.6 16,15.2 16,15.5 16.2,15.8 16.8,15.2 16.8,15.2 16.2,15.8 17.8,17.4 18.4,17.9 19,17.4 20.6,15.8
|
861
|
+
20.8,15.5 20.8,15.2 20.8,9.6 19.2,9.6 19.2,14.9 18.4,15.7 17.6,14.9 17.6,9.6 "/>
|
862
|
+
</>
|
863
|
+
),
|
864
|
+
},
|
865
|
+
listPDF: {
|
866
|
+
viewBox: '0 0 24 24',
|
867
|
+
svg: (
|
868
|
+
<>
|
869
|
+
<path d="M4.8,14.4h0.8C7,14.4,8,13.3,8,12S7,9.6,5.6,9.6H4H3.3v0.8v3.2v4h1.6V14.4z M6.4,12c0,0.4-0.4,0.8-0.8,0.8H4.8v-1.6h0.8
|
870
|
+
C6.1,11.2,6.4,11.6,6.4,12z"/>
|
871
|
+
<path d="M20.7,21.5c0,0.4-0.4,0.8-0.8,0.8H4c-0.4,0-0.8-0.4-0.8-0.8v-2.4H1.7v2.4c0,1.3,1.1,2.4,2.4,2.4H20c1.3,0,2.4-1.1,2.4-2.4
|
872
|
+
v-2.4h-1.6V21.5z"/>
|
873
|
+
<path d="M14.4,15.2V12c0-1.3-1.1-2.4-2.4-2.4h-1.6H9.6v0.8v6.4v0.8h0.8H12C13.3,17.6,14.4,16.5,14.4,15.2z M11.2,16v-4.8H12
|
874
|
+
c0.4,0,0.8,0.4,0.8,0.8v3.2c0,0.4-0.4,0.8-0.8,0.8H11.2z"/>
|
875
|
+
<polygon points="20.7,11.2 20.7,9.6 17.6,9.6 16.8,9.6 16,9.6 16,17.6 17.6,17.6 17.6,14.4 19.2,14.4 19.2,12.8 17.6,12.8
|
876
|
+
17.6,11.2 "/>
|
877
|
+
<path d="M22.1,5.1l-0.6,0.6l0,0L22.1,5.1l-4.8-4.8l-0.6,0.6l0,0l0.6-0.6l-0.2-0.2h-0.3H4c-1.3,0-2.4,1.1-2.4,2.4V8h1.6V2.5
|
878
|
+
C3.3,2,3.6,1.7,4,1.7h12.4L20.7,6V8h1.6V5.6V5.3L22.1,5.1z"/>
|
879
|
+
</>
|
880
|
+
),
|
881
|
+
},
|
882
|
+
|
883
|
+
|
815
884
|
|
816
885
|
}
|
817
886
|
|
@@ -819,7 +888,7 @@ export const iconsMap = {
|
|
819
888
|
export const options = {
|
820
889
|
sizes: ['xs', 'sm', 'md', 'lg', 'xl'],
|
821
890
|
names: Object.keys(iconsMap),
|
822
|
-
colors: ['base', 'highlight', 'muted', 'primary', 'inverted'],
|
891
|
+
colors: ['base', 'highlight', 'muted', 'primary', 'inverted', 'error', 'success'],
|
823
892
|
backgrounds: [
|
824
893
|
'transparent',
|
825
894
|
'base',
|
@@ -827,5 +896,7 @@ export const options = {
|
|
827
896
|
'inverted',
|
828
897
|
'muted',
|
829
898
|
'spotlight',
|
899
|
+
'error',
|
900
|
+
'success',
|
830
901
|
],
|
831
902
|
}
|
package/atoms/Input/Input.js
CHANGED
@@ -4,6 +4,9 @@ import PropTypes from 'prop-types'
|
|
4
4
|
import styles from './Input.module.css'
|
5
5
|
import { options } from './constants'
|
6
6
|
import withStyles from '../../hocs/withStyles'
|
7
|
+
import Icon from '../Icon'
|
8
|
+
import { Horizontal } from '../../layout/Spacer/components'
|
9
|
+
|
7
10
|
|
8
11
|
// const handleChange = ({ onChange }) => () => {
|
9
12
|
// onChange()
|
@@ -17,29 +20,93 @@ export const Input = ({
|
|
17
20
|
isInline,
|
18
21
|
isInlineCode,
|
19
22
|
isInputFilter,
|
23
|
+
isInputSecondary,
|
20
24
|
onChange,
|
25
|
+
onFocus,
|
26
|
+
onBlur,
|
21
27
|
onClick,
|
28
|
+
onKeyDown,
|
22
29
|
placeholder,
|
30
|
+
autocomplete,
|
31
|
+
disabled,
|
32
|
+
isViewIcon,
|
33
|
+
idIcon,
|
34
|
+
nameIcon,
|
35
|
+
sizeIcon,
|
36
|
+
colorIcon,
|
37
|
+
backgroundIcon,
|
23
38
|
pattern,
|
24
39
|
}) => (
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
40
|
+
|
41
|
+
<>
|
42
|
+
|
43
|
+
{isViewIcon ?
|
44
|
+
|
45
|
+
<div className={getStyles('box-icon-input')}>
|
46
|
+
|
47
|
+
<Icon
|
48
|
+
id={idIcon}
|
49
|
+
name={nameIcon}
|
50
|
+
size={sizeIcon}
|
51
|
+
color={colorIcon}
|
52
|
+
background={backgroundIcon}
|
53
|
+
/>
|
54
|
+
|
55
|
+
<Horizontal size="xs" />
|
56
|
+
|
57
|
+
<input
|
58
|
+
className={getStyles('input', {
|
59
|
+
'is-inline': isInline,
|
60
|
+
'is-inline-code': isInlineCode,
|
61
|
+
'is-input-filter': isInputFilter,
|
62
|
+
'is-input-secondary': isInputSecondary,
|
63
|
+
})}
|
64
|
+
type={type}
|
65
|
+
id={id}
|
66
|
+
value={value}
|
67
|
+
placeholder={placeholder}
|
68
|
+
onChange={onChange}
|
69
|
+
onFocus={onFocus}
|
70
|
+
onBlur={onBlur}
|
71
|
+
onClick={onClick}
|
72
|
+
onKeyDown={onKeyDown}
|
73
|
+
autocomplete={autocomplete}
|
74
|
+
disabled={disabled}
|
75
|
+
></input>
|
76
|
+
|
77
|
+
</div> :
|
78
|
+
|
79
|
+
<input
|
80
|
+
className={getStyles('input', {
|
81
|
+
'is-inline': isInline,
|
82
|
+
'is-inline-code': isInlineCode,
|
83
|
+
'is-input-filter': isInputFilter,
|
84
|
+
'is-input-secondary': isInputSecondary,
|
85
|
+
})}
|
86
|
+
type={type}
|
87
|
+
id={id}
|
88
|
+
value={value}
|
89
|
+
placeholder={placeholder}
|
90
|
+
onChange={onChange}
|
91
|
+
onFocus={onFocus}
|
92
|
+
onBlur={onBlur}
|
93
|
+
onClick={onClick}
|
94
|
+
onKeyDown={onKeyDown}
|
95
|
+
autocomplete={autocomplete}
|
96
|
+
disabled={disabled}
|
97
|
+
></input>
|
98
|
+
|
99
|
+
}
|
100
|
+
|
101
|
+
</>
|
38
102
|
)
|
39
103
|
|
40
104
|
Input.propTypes = {
|
41
105
|
onChange: PropTypes.func.isRequired,
|
106
|
+
onFocus: PropTypes.func,
|
107
|
+
onBlur: PropTypes.func,
|
42
108
|
onClick: PropTypes.func,
|
109
|
+
onKeyDown: PropTypes.func,
|
43
110
|
getStyles: PropTypes.func.isRequired,
|
44
111
|
type: PropTypes.oneOf(options.types),
|
45
112
|
id: PropTypes.string.isRequired,
|
@@ -48,6 +115,15 @@ Input.propTypes = {
|
|
48
115
|
isInline: PropTypes.bool,
|
49
116
|
isInlineCode: PropTypes.bool,
|
50
117
|
isInputFilter: PropTypes.bool,
|
118
|
+
isInputSecondary: PropTypes.bool,
|
119
|
+
isViewIcon: PropTypes.bool,
|
120
|
+
idIcon: PropTypes.string,
|
121
|
+
nameIcon: PropTypes.string,
|
122
|
+
sizeIcon: PropTypes.string,
|
123
|
+
colorIcon: PropTypes.string,
|
124
|
+
backgroundIcon: PropTypes.string,
|
125
|
+
autocomplete: PropTypes.string,
|
126
|
+
disabled: PropTypes.bool,
|
51
127
|
}
|
52
128
|
|
53
129
|
Input.defaultProps = {
|
@@ -58,9 +134,21 @@ Input.defaultProps = {
|
|
58
134
|
isInline: false,
|
59
135
|
isInlineCode: false,
|
60
136
|
isInputFilter: false,
|
61
|
-
|
62
|
-
|
63
|
-
|
137
|
+
isInputSecondary: false,
|
138
|
+
onChange: () => { },
|
139
|
+
onFocus: () => { },
|
140
|
+
onBlur: () => { },
|
141
|
+
onClick: () => { },
|
142
|
+
onKeyDown: () => { },
|
143
|
+
getStyles: () => { },
|
144
|
+
isViewIcon: false,
|
145
|
+
idIcon: 'Ejemplo',
|
146
|
+
nameIcon: 'user',
|
147
|
+
sizeIcon: 'md',
|
148
|
+
colorIcon: 'highlight',
|
149
|
+
backgroundIcon: 'base',
|
150
|
+
autocomplete: 'on',
|
151
|
+
disabled: false
|
64
152
|
}
|
65
153
|
|
66
154
|
export default withStyles(styles)(Input)
|
@@ -23,6 +23,10 @@
|
|
23
23
|
outline: none;
|
24
24
|
}
|
25
25
|
|
26
|
+
.input:disabled {
|
27
|
+
background: #dedede;
|
28
|
+
}
|
29
|
+
|
26
30
|
.is-inline {
|
27
31
|
max-width: max-content;
|
28
32
|
}
|
@@ -45,3 +49,17 @@
|
|
45
49
|
text-align: left;
|
46
50
|
height: 28px;
|
47
51
|
}
|
52
|
+
|
53
|
+
.is-input-secondary {
|
54
|
+
border-radius: var(--border-radius-sm);
|
55
|
+
color: var(--color-font-base);
|
56
|
+
padding: 7px 9px;
|
57
|
+
font-size: var(--font-size-base);
|
58
|
+
font-weight: var(--font-weight-light);
|
59
|
+
text-align: left;
|
60
|
+
height: 28px;
|
61
|
+
}
|
62
|
+
|
63
|
+
.box-icon-input {
|
64
|
+
display: flex;
|
65
|
+
}
|
package/atoms/Modal/Modal.js
CHANGED
@@ -36,6 +36,7 @@ export const Modal = ({
|
|
36
36
|
type,
|
37
37
|
isPlayground,
|
38
38
|
titleModal,
|
39
|
+
isFullWidth,
|
39
40
|
}) => {
|
40
41
|
const isDesktop = useMedia(['(min-width: 992px)'], [true])
|
41
42
|
const [onFadeOut, setOnFadeOut] = useState(false)
|
@@ -51,7 +52,7 @@ export const Modal = ({
|
|
51
52
|
onClick={handleClose}
|
52
53
|
>
|
53
54
|
<div
|
54
|
-
className={getStyles('modal', ['type'])}
|
55
|
+
className={getStyles(isFullWidth ? 'modal-full' : 'modal', ['type'])}
|
55
56
|
onClick={createHandlerClick()}
|
56
57
|
>
|
57
58
|
<div className={getStyles('heading')}>
|
@@ -78,7 +79,9 @@ export const Modal = ({
|
|
78
79
|
{titleModal}
|
79
80
|
</Heading>
|
80
81
|
</div>
|
81
|
-
|
82
|
+
|
83
|
+
{isFullWidth ? <div className={getStyles('container-full')}>{children}</div> : <Container><div className={getStyles('container')}>{children}</div></Container>}
|
84
|
+
|
82
85
|
</div>
|
83
86
|
</div>
|
84
87
|
)
|
@@ -94,13 +97,15 @@ Modal.propTypes = {
|
|
94
97
|
}),
|
95
98
|
type: PropTypes.oneOf(options.types),
|
96
99
|
isPlayground: PropTypes.bool,
|
100
|
+
isFullWidth: PropTypes.bool,
|
97
101
|
titleModal: PropTypes.string,
|
98
102
|
}
|
99
103
|
|
100
104
|
Modal.defaultProps = {
|
101
105
|
getStyles: () => {},
|
102
106
|
type: 'primary',
|
103
|
-
titleModal: 'Ejemplo titulo'
|
107
|
+
titleModal: 'Ejemplo titulo',
|
108
|
+
isFullWidth: false
|
104
109
|
}
|
105
110
|
|
106
111
|
export default withStyles(styles)(Modal)
|
@@ -24,15 +24,32 @@
|
|
24
24
|
padding: 16px 32px;
|
25
25
|
}
|
26
26
|
|
27
|
+
.modal-full {
|
28
|
+
display: flex;
|
29
|
+
width: 100%;
|
30
|
+
height: 100%;
|
31
|
+
flex-direction: column;
|
32
|
+
padding: 16px 32px;
|
33
|
+
}
|
34
|
+
|
27
35
|
:not(.is-playground)>.modal {
|
28
36
|
animation: fadeInModal 0.4s ease-in forwards;
|
29
37
|
opacity: 0;
|
30
38
|
}
|
31
39
|
|
40
|
+
:not(.is-playground)>.modal-full {
|
41
|
+
animation: fadeInModal 0.4s ease-in forwards;
|
42
|
+
opacity: 0;
|
43
|
+
}
|
44
|
+
|
32
45
|
.backdrop.on-fade-out .modal {
|
33
46
|
animation: fadeOutModal 0.4s ease-in forwards;
|
34
47
|
}
|
35
48
|
|
49
|
+
.backdrop.on-fade-out .modal-full {
|
50
|
+
animation: fadeOutModal 0.4s ease-in forwards;
|
51
|
+
}
|
52
|
+
|
36
53
|
.heading {
|
37
54
|
display: flex;
|
38
55
|
justify-content: space-between;
|
@@ -61,6 +78,12 @@
|
|
61
78
|
overflow: auto; */
|
62
79
|
}
|
63
80
|
|
81
|
+
.modal-full {
|
82
|
+
width: 100%;
|
83
|
+
height: 100%;
|
84
|
+
padding: 16px 32px;
|
85
|
+
}
|
86
|
+
|
64
87
|
.heading {
|
65
88
|
flex-direction: row-reverse;
|
66
89
|
}
|
@@ -70,6 +93,11 @@
|
|
70
93
|
overflow: auto;
|
71
94
|
min-width: 100%;
|
72
95
|
}
|
96
|
+
|
97
|
+
.container-full {
|
98
|
+
overflow: auto;
|
99
|
+
min-width: 100%;
|
100
|
+
}
|
73
101
|
}
|
74
102
|
|
75
103
|
@keyframes fadeInModal {
|
package/index.js
CHANGED
@@ -45,12 +45,16 @@ export { default as Task } from './molecules/Task'
|
|
45
45
|
export { default as TaskCounter } from './molecules/TaskCounter'
|
46
46
|
export { default as IconLabel } from './molecules/IconLabel'
|
47
47
|
export { default as ItemMenu } from './molecules/ItemMenu'
|
48
|
+
export { default as InputAutocomplete } from './molecules/InputAutocomplete'
|
48
49
|
export { default as CheckList } from './molecules/CheckList'
|
49
50
|
export { default as ColumnTable } from './molecules/ColumnTable'
|
50
51
|
export { default as RowTable } from './molecules/RowTable'
|
51
52
|
export { default as FooterTable } from './molecules/FooterTable'
|
52
53
|
export { default as DynamicSelect } from './molecules/DynamicSelect'
|
53
54
|
export { default as DatePicker } from './molecules/DynamicSelect'
|
55
|
+
export { default as CardDefault } from './molecules/CardDefault'
|
56
|
+
|
57
|
+
|
54
58
|
|
55
59
|
export { default as useTable } from './hook/useTable'
|
56
60
|
export { default as useStateDate } from './hook/useStateDate'
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
|
4
|
+
import styles from './CardDefault.module.css'
|
5
|
+
import { options } from './constants'
|
6
|
+
import withStyles from '../../hocs/withStyles'
|
7
|
+
import Button from '../../atoms/Button'
|
8
|
+
import Paragraph from '../../atoms/Paragraph'
|
9
|
+
import Spacer from '../../layout/Spacer'
|
10
|
+
|
11
|
+
|
12
|
+
export const CardDefault = ({ children, titleCardDefault, titleBtnCardDefault, typeBtnCardDefault, onClickBtnCardDefault, getStyles }) => {
|
13
|
+
|
14
|
+
|
15
|
+
return <div className={getStyles('card-default')}>
|
16
|
+
|
17
|
+
|
18
|
+
<div className={getStyles('card-default-title')}>
|
19
|
+
{titleCardDefault}
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div className={getStyles('card-default-content')}>
|
23
|
+
{children}
|
24
|
+
<Spacer.Vertical size="md" />
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<div className={getStyles('card-default-actions')}>
|
28
|
+
|
29
|
+
<Button
|
30
|
+
onClick={onClickBtnCardDefault}
|
31
|
+
type={typeBtnCardDefault}
|
32
|
+
>
|
33
|
+
{titleBtnCardDefault}
|
34
|
+
</Button>
|
35
|
+
|
36
|
+
</div>
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
</div>
|
41
|
+
}
|
42
|
+
|
43
|
+
CardDefault.propTypes = {
|
44
|
+
children: PropTypes.node.isRequired,
|
45
|
+
titleCardDefault: PropTypes.string.isRequired,
|
46
|
+
titleBtnCardDefault: PropTypes.string.isRequired,
|
47
|
+
typeBtnCardDefault: PropTypes.string.isRequired,
|
48
|
+
onClickBtnCardDefault: PropTypes.func,
|
49
|
+
getStyles: PropTypes.func.isRequired,
|
50
|
+
// type: PropTypes.oneOf(options.types),
|
51
|
+
}
|
52
|
+
|
53
|
+
// const renderValue = () => <Paragraph isCentered size="lg" weight="semibold"> 20 EUR </Paragraph>
|
54
|
+
|
55
|
+
CardDefault.defaultProps = {
|
56
|
+
children: <Paragraph isCentered size="lg" weight="semibold"> 20 EUR </Paragraph>,
|
57
|
+
titleCardDefault: 'Saldo actual',
|
58
|
+
typeBtnCardDefault: 'primary',
|
59
|
+
titleBtnCardDefault: '+ Añadir fondos',
|
60
|
+
onClickBtnCardDefault: () => { },
|
61
|
+
getStyles: () => { },
|
62
|
+
}
|
63
|
+
|
64
|
+
export default withStyles(styles)(CardDefault)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.card-default {
|
2
|
+
text-align: center;
|
3
|
+
box-shadow: 0px 2px 1px -1px rgb(0 0 0 / 20%), 0px 1px 1px 0px rgb(0 0 0 / 14%), 0px 1px 3px 0px rgb(0 0 0 / 12%);
|
4
|
+
transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);
|
5
|
+
display: block;
|
6
|
+
position: relative;
|
7
|
+
padding: 16px;
|
8
|
+
border-radius: 4px;
|
9
|
+
background: white;
|
10
|
+
color: rgba(0, 0, 0, 0.87);
|
11
|
+
}
|
12
|
+
|
13
|
+
.card-default-title {
|
14
|
+
font-weight: 400;
|
15
|
+
font-size: 18px;
|
16
|
+
letter-spacing: -0.03em;
|
17
|
+
margin: 0 0 16px;
|
18
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { CardDefault, styles, options } from '.'
|
2
|
+
|
3
|
+
import {
|
4
|
+
getTemplate,
|
5
|
+
getListTemplate,
|
6
|
+
getOptionsArgTypes,
|
7
|
+
} from '../../helpers/storybook'
|
8
|
+
|
9
|
+
const Template = getTemplate(CardDefault, styles)
|
10
|
+
const ListTemplate = getListTemplate(CardDefault, styles)
|
11
|
+
|
12
|
+
export default {
|
13
|
+
title: 'Molecules/CardDefault',
|
14
|
+
component: CardDefault,
|
15
|
+
args: {},
|
16
|
+
argTypes: {
|
17
|
+
// types: getOptionsArgTypes(options.types),
|
18
|
+
},
|
19
|
+
}
|
20
|
+
|
21
|
+
export const Default = Template.bind({})
|
22
|
+
// export const List = ListTemplate.bind({})
|
23
|
+
// List.args = { items: options.types.map((type) => ({ type })) }
|
@@ -0,0 +1 @@
|
|
1
|
+
export const options = { types: [] }
|
@@ -7,19 +7,30 @@ import withStyles from '../../hocs/withStyles'
|
|
7
7
|
import Picture from '../../atoms/Picture'
|
8
8
|
import { Horizontal, Vertical } from '../../layout/Spacer/components'
|
9
9
|
|
10
|
-
export const CardProductTypesBooking = ({
|
11
|
-
|
10
|
+
export const CardProductTypesBooking = ({
|
11
|
+
srcImg,
|
12
|
+
onClick,
|
13
|
+
textNotification,
|
14
|
+
textProductTypes,
|
15
|
+
textEtaProductTypesSub,
|
16
|
+
textDescription,
|
17
|
+
priceProductTypes,
|
18
|
+
priceProductTypesSub,
|
19
|
+
selectCard,
|
20
|
+
getStyles
|
21
|
+
}) => {
|
22
|
+
return <div className={getStyles('card-product-types-booking', {'selectCard': selectCard})} onClick={onClick}>
|
12
23
|
|
13
24
|
<div className={getStyles('labelNotification')}>
|
14
|
-
|
25
|
+
{textNotification}
|
15
26
|
</div>
|
16
27
|
|
17
28
|
<div className={getStyles('card-product-content')}>
|
18
29
|
|
19
|
-
<div>
|
30
|
+
<div className={getStyles('card-product-img')}>
|
20
31
|
<Picture
|
21
32
|
src={srcImg}
|
22
|
-
width={
|
33
|
+
width={70}
|
23
34
|
// height={100}
|
24
35
|
/>
|
25
36
|
</div>
|
@@ -27,16 +38,16 @@ export const CardProductTypesBooking = ({ srcImg, getStyles }) => {
|
|
27
38
|
<Horizontal size="sm" />
|
28
39
|
|
29
40
|
<div>
|
30
|
-
<div className={getStyles('titleCardProductTypes')}>
|
31
|
-
<div className={getStyles('etaCardProductTypesSub')}>
|
32
|
-
<div className={getStyles('titleCardProductTypesSub')}>
|
41
|
+
<div className={getStyles('titleCardProductTypes')}>{textProductTypes}</div>
|
42
|
+
<div className={getStyles('etaCardProductTypesSub')}>{textEtaProductTypesSub}</div>
|
43
|
+
<div className={getStyles('titleCardProductTypesSub')}>{textDescription}</div>
|
33
44
|
</div>
|
34
45
|
|
35
46
|
<Horizontal size="sm" />
|
36
47
|
|
37
48
|
<div class={getStyles('contentPrice')}>
|
38
|
-
<div class={getStyles('priceCardProductTypes')}>
|
39
|
-
<div class={getStyles('priceCardProductTypesSub')}>
|
49
|
+
<div class={getStyles('priceCardProductTypes')}>{priceProductTypes}</div>
|
50
|
+
<div class={getStyles('priceCardProductTypesSub')}>{priceProductTypesSub}</div>
|
40
51
|
</div>
|
41
52
|
|
42
53
|
</div>
|
@@ -45,13 +56,29 @@ export const CardProductTypesBooking = ({ srcImg, getStyles }) => {
|
|
45
56
|
}
|
46
57
|
|
47
58
|
CardProductTypesBooking.propTypes = {
|
48
|
-
|
59
|
+
onClick: PropTypes.func,
|
60
|
+
srcImg: PropTypes.string,
|
61
|
+
textNotification: PropTypes.string,
|
62
|
+
textProductTypes: PropTypes.string,
|
63
|
+
textEtaProductTypesSub: PropTypes.string,
|
64
|
+
textDescription: PropTypes.string,
|
65
|
+
priceProductTypes: PropTypes.string,
|
66
|
+
priceProductTypesSub: PropTypes.string,
|
67
|
+
selectCard: PropTypes.bool,
|
49
68
|
getStyles: PropTypes.func.isRequired,
|
50
|
-
|
69
|
+
|
51
70
|
}
|
52
71
|
|
53
72
|
CardProductTypesBooking.defaultProps = {
|
54
73
|
getStyles: () => { },
|
74
|
+
onClick: () => { },
|
75
|
+
textNotification: 'Reserve 2 h antes de la salida de su vuelo si es nacional, 3 h antes si es internacional.',
|
76
|
+
textProductTypes: 'ECO (Tarifa máxima)',
|
77
|
+
textEtaProductTypesSub: '4 - 8 min.',
|
78
|
+
textDescription: 'Envío urgente de sobres y paquetes pequeños con taxi.',
|
79
|
+
priceProductTypes: '30€ - 30€',
|
80
|
+
priceProductTypesSub: 'Máx.',
|
81
|
+
selectCard: 'false'
|
55
82
|
}
|
56
83
|
|
57
84
|
export default withStyles(styles)(CardProductTypesBooking)
|