imbric-theme 0.5.0 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- package/atoms/Button/Button.js +4 -0
- package/atoms/Input/Input.js +4 -0
- package/atoms/LinkItem/LinkItem.js +7 -5
- package/atoms/Modal/Modal.js +1 -0
- package/layout/Navbar/Navbar.js +8 -4
- package/layout/Sidebar/Sidebar.js +1 -1
- package/molecules/CardDefault/CardDefault.js +1 -0
- package/molecules/CardProductTypesBooking/CardProductTypesBooking.js +5 -2
- package/molecules/CardProductTypesBooking/CardProductTypesBooking.module.css +5 -0
- package/molecules/DatePicker/DatePicker.js +1 -0
- package/molecules/DynamicSelect/DynamicSelect.js +1 -1
- package/molecules/FooterTable/FooterTable.js +3 -3
- package/molecules/FooterTable/FooterTable.module.css +6 -3
- package/molecules/InputAutocomplete/InputAutocomplete.js +15 -12
- package/molecules/RowTable/RowTable.js +8 -2
- package/package.json +1 -1
- package/public/static/google-maps.png +0 -0
package/atoms/Button/Button.js
CHANGED
@@ -23,9 +23,11 @@ export const Button = ({
|
|
23
23
|
isFloatRight,
|
24
24
|
isFloatLeft,
|
25
25
|
onClick,
|
26
|
+
id,
|
26
27
|
getStyles,
|
27
28
|
}) => (
|
28
29
|
<button
|
30
|
+
id={id}
|
29
31
|
type="submit"
|
30
32
|
disabled={isMuted}
|
31
33
|
className={getStyles('button', ['type'], {
|
@@ -65,6 +67,7 @@ Button.propTypes = {
|
|
65
67
|
isMuted: PropTypes.bool,
|
66
68
|
isFloatRight: PropTypes.bool,
|
67
69
|
isFloatLeft: PropTypes.bool,
|
70
|
+
id: PropTypes.string,
|
68
71
|
}
|
69
72
|
|
70
73
|
Button.defaultProps = {
|
@@ -74,6 +77,7 @@ Button.defaultProps = {
|
|
74
77
|
isInline: false,
|
75
78
|
isFloatRight: false,
|
76
79
|
isFloatLeft: false,
|
80
|
+
id: '',
|
77
81
|
}
|
78
82
|
|
79
83
|
export default withStyles(styles)(Button)
|
package/atoms/Input/Input.js
CHANGED
@@ -36,6 +36,7 @@ export const Input = ({
|
|
36
36
|
colorIcon,
|
37
37
|
backgroundIcon,
|
38
38
|
pattern,
|
39
|
+
min,
|
39
40
|
}) => (
|
40
41
|
|
41
42
|
<>
|
@@ -72,6 +73,7 @@ export const Input = ({
|
|
72
73
|
onKeyDown={onKeyDown}
|
73
74
|
autoComplete={autoComplete}
|
74
75
|
disabled={disabled}
|
76
|
+
min={min}
|
75
77
|
></input>
|
76
78
|
|
77
79
|
</div> :
|
@@ -94,6 +96,7 @@ export const Input = ({
|
|
94
96
|
onKeyDown={onKeyDown}
|
95
97
|
autoComplete={autoComplete}
|
96
98
|
disabled={disabled}
|
99
|
+
min={min}
|
97
100
|
></input>
|
98
101
|
|
99
102
|
}
|
@@ -124,6 +127,7 @@ Input.propTypes = {
|
|
124
127
|
backgroundIcon: PropTypes.string,
|
125
128
|
autoComplete: PropTypes.string,
|
126
129
|
disabled: PropTypes.bool,
|
130
|
+
min: PropTypes.any,
|
127
131
|
}
|
128
132
|
|
129
133
|
Input.defaultProps = {
|
@@ -5,15 +5,15 @@ import Link from 'next/link'
|
|
5
5
|
import styles from './LinkItem.module.css'
|
6
6
|
import { options } from './constants'
|
7
7
|
import withStyles from '../../hocs/withStyles'
|
8
|
-
import Paragraph from '../Paragraph'
|
8
|
+
// import Paragraph from '../Paragraph'
|
9
9
|
|
10
|
-
export const LinkItem = ({ children, size, color, getStyles, isHref }) => {
|
10
|
+
export const LinkItem = ({ children, size, color, getStyles, isHref, target }) => {
|
11
11
|
return (
|
12
12
|
<Link href={isHref} passHref>
|
13
|
-
<a target=
|
14
|
-
<Paragraph size={size} color={color} weight="semibold" isInline>
|
13
|
+
<a target={target} className={getStyles('link', ['color'])}>
|
14
|
+
{/* <Paragraph size={size} color={color} weight="semibold" isInline> */}
|
15
15
|
{children}
|
16
|
-
</Paragraph>
|
16
|
+
{/* </Paragraph> */}
|
17
17
|
</a>
|
18
18
|
</Link>
|
19
19
|
)
|
@@ -24,6 +24,7 @@ LinkItem.propTypes = {
|
|
24
24
|
getStyles: PropTypes.func.isRequired,
|
25
25
|
color: PropTypes.oneOf(options.colors),
|
26
26
|
size: PropTypes.oneOf(options.sizes),
|
27
|
+
target: PropTypes.string,
|
27
28
|
}
|
28
29
|
|
29
30
|
LinkItem.defaultProps = {
|
@@ -31,6 +32,7 @@ LinkItem.defaultProps = {
|
|
31
32
|
color: 'primary',
|
32
33
|
size: 'md',
|
33
34
|
isHref: '/',
|
35
|
+
target: ''
|
34
36
|
}
|
35
37
|
|
36
38
|
export default withStyles(styles)(LinkItem)
|
package/atoms/Modal/Modal.js
CHANGED
@@ -58,6 +58,7 @@ export const Modal = ({
|
|
58
58
|
<div className={getStyles('heading')}>
|
59
59
|
{!!onClose && (
|
60
60
|
<Icon
|
61
|
+
id='btnColsedModal'
|
61
62
|
color={isDesktop && type === 'secondary' ? 'primary' : 'primary'}
|
62
63
|
name={isDesktop ? 'cross' : 'angleLeft'}
|
63
64
|
background={isDesktop ? 'transparent' : 'muted'}
|
package/layout/Navbar/Navbar.js
CHANGED
@@ -11,7 +11,7 @@ import Tabs from '../../molecules/Tabs/Tabs'
|
|
11
11
|
import Icon from '../../atoms/Icon'
|
12
12
|
import { options } from './constants'
|
13
13
|
|
14
|
-
export const Navbar = ({ getStyles, viewTabsNav, viewOptionsNav, children, linkLogout, defaultValueLanguage, optionsSelectLanguage, handleChangeLanguage }) => {
|
14
|
+
export const Navbar = ({ getStyles, viewTabsNav, viewOptionsNav, children, linkLogout, defaultValueLanguage, optionsSelectLanguage, handleChangeLanguage, languageSwitchLink }) => {
|
15
15
|
|
16
16
|
|
17
17
|
const router = useRouter();
|
@@ -36,7 +36,6 @@ export const Navbar = ({ getStyles, viewTabsNav, viewOptionsNav, children, linkL
|
|
36
36
|
color="base"
|
37
37
|
size="xs"
|
38
38
|
weight="light"
|
39
|
-
isInline
|
40
39
|
>
|
41
40
|
{children}
|
42
41
|
</Heading>
|
@@ -89,7 +88,7 @@ export const Navbar = ({ getStyles, viewTabsNav, viewOptionsNav, children, linkL
|
|
89
88
|
/>
|
90
89
|
))}
|
91
90
|
|
92
|
-
<DynamicSelect
|
91
|
+
{/* <DynamicSelect
|
93
92
|
isClearable={false}
|
94
93
|
// defaultValue={{
|
95
94
|
// label: 'ES',
|
@@ -108,7 +107,9 @@ export const Navbar = ({ getStyles, viewTabsNav, viewOptionsNav, children, linkL
|
|
108
107
|
// value: 'en'
|
109
108
|
// }
|
110
109
|
// ]}
|
111
|
-
/>
|
110
|
+
/> */}
|
111
|
+
|
112
|
+
{languageSwitchLink}
|
112
113
|
|
113
114
|
<Icon
|
114
115
|
size='lg'
|
@@ -118,6 +119,8 @@ export const Navbar = ({ getStyles, viewTabsNav, viewOptionsNav, children, linkL
|
|
118
119
|
onClick={linkLogout}
|
119
120
|
/>
|
120
121
|
|
122
|
+
|
123
|
+
|
121
124
|
</div>
|
122
125
|
|
123
126
|
) : null}
|
@@ -143,6 +146,7 @@ Navbar.propTypes = {
|
|
143
146
|
viewOptionsNav: PropTypes.bool,
|
144
147
|
linkLogout: PropTypes.func,
|
145
148
|
handleChange: PropTypes.func,
|
149
|
+
languageSwitchLink: PropTypes.any.isRequired,
|
146
150
|
}
|
147
151
|
|
148
152
|
Navbar.defaultProps = {
|
@@ -17,9 +17,10 @@ export const CardProductTypesBooking = ({
|
|
17
17
|
priceProductTypes,
|
18
18
|
priceProductTypesSub,
|
19
19
|
selectCard,
|
20
|
+
availableCard,
|
20
21
|
getStyles
|
21
22
|
}) => {
|
22
|
-
return <div className={getStyles('card-product-types-booking', {'selectCard': selectCard})} onClick={onClick}>
|
23
|
+
return <div className={getStyles('card-product-types-booking', { 'selectCard': selectCard }, { 'availableCard': !availableCard })} onClick={availableCard ? onClick : null}>
|
23
24
|
|
24
25
|
<div className={getStyles('labelNotification')}>
|
25
26
|
{textNotification}
|
@@ -67,6 +68,7 @@ CardProductTypesBooking.propTypes = {
|
|
67
68
|
priceProductTypes: PropTypes.string,
|
68
69
|
priceProductTypesSub: PropTypes.string,
|
69
70
|
selectCard: PropTypes.bool,
|
71
|
+
availableCard: PropTypes.bool,
|
70
72
|
getStyles: PropTypes.func.isRequired,
|
71
73
|
|
72
74
|
}
|
@@ -80,7 +82,8 @@ CardProductTypesBooking.defaultProps = {
|
|
80
82
|
textDescription: 'Envío urgente de sobres y paquetes pequeños con taxi.',
|
81
83
|
priceProductTypes: '30€ - 30€',
|
82
84
|
priceProductTypesSub: 'Máx.',
|
83
|
-
selectCard: 'false'
|
85
|
+
selectCard: 'false',
|
86
|
+
availableCard: 'false'
|
84
87
|
}
|
85
88
|
|
86
89
|
export default withStyles(styles)(CardProductTypesBooking)
|
@@ -99,6 +99,11 @@
|
|
99
99
|
background-image: linear-gradient(to bottom, #39b54a 0%, #00a3ff 100%), linear-gradient(to bottom, #39b54a 0%, #00a3ff 100%);
|
100
100
|
}
|
101
101
|
|
102
|
+
.availableCard {
|
103
|
+
cursor: no-drop;
|
104
|
+
opacity: .4;
|
105
|
+
}
|
106
|
+
|
102
107
|
/* .selectCard:before {
|
103
108
|
content: '';
|
104
109
|
position: absolute;
|
@@ -203,6 +203,7 @@ export const DatePicker = ({ getStyles, isLayoutDate, onChangeRange, sinceDateRa
|
|
203
203
|
|
204
204
|
<div className={getStyles('btnSave')} onClick={handleClickCloseCalendar}>
|
205
205
|
<Icon
|
206
|
+
id='iconClosedDatePicker'
|
206
207
|
name="checkCircle"
|
207
208
|
color="inverted"
|
208
209
|
onClick={function noRefCheck() { }}
|
@@ -91,7 +91,7 @@ export const DynamicSelect = ({ getStyles, optionsSelect, defaultValue, placehol
|
|
91
91
|
|
92
92
|
DynamicSelect.propTypes = {
|
93
93
|
getStyles: PropTypes.func.isRequired,
|
94
|
-
defaultValue: PropTypes.
|
94
|
+
defaultValue: PropTypes.any,
|
95
95
|
placeholder: PropTypes.string,
|
96
96
|
isMulti: PropTypes.bool,
|
97
97
|
isClearable: PropTypes.bool,
|
@@ -21,9 +21,9 @@ export const FooterTable = ({ getStyles, range, setPage, setDataPage, page, slic
|
|
21
21
|
<div className={styles.tableFooter}>
|
22
22
|
{range.map((el, index) => (
|
23
23
|
|
24
|
-
|
24
|
+
|
25
25
|
<button
|
26
|
-
key={index}
|
26
|
+
key={'footer' + index}
|
27
27
|
className={`${styles.button} ${page === el ? styles.activeButton : styles.inactiveButton
|
28
28
|
}`}
|
29
29
|
onClick={() => { setPage(el); setDataPage(el) }}
|
@@ -35,7 +35,7 @@ export const FooterTable = ({ getStyles, range, setPage, setDataPage, page, slic
|
|
35
35
|
</button>
|
36
36
|
|
37
37
|
|
38
|
-
|
38
|
+
|
39
39
|
|
40
40
|
))}
|
41
41
|
</div>
|
@@ -1,11 +1,13 @@
|
|
1
1
|
.footer-table {
|
2
2
|
display: flex;
|
3
|
+
width: 100%;
|
4
|
+
justify-content: space-between;
|
3
5
|
}
|
4
6
|
|
5
7
|
.tableFooter {
|
6
|
-
background-color: #f1f1f1;
|
8
|
+
/* background-color: #f1f1f1; */
|
7
9
|
padding: 4px 0px;
|
8
|
-
width:
|
10
|
+
width: 400px;
|
9
11
|
font-weight: 500;
|
10
12
|
text-align: left;
|
11
13
|
font-size: 16px;
|
@@ -14,7 +16,8 @@
|
|
14
16
|
border-bottom-right-radius: 0px;
|
15
17
|
display: flex;
|
16
18
|
align-items: center;
|
17
|
-
justify-content:
|
19
|
+
justify-content: flex-start;
|
20
|
+
overflow-x: auto;
|
18
21
|
}
|
19
22
|
|
20
23
|
.button {
|
@@ -91,7 +91,7 @@ export const InputAutocomplete = ({
|
|
91
91
|
<Horizontal size="xs" />
|
92
92
|
|
93
93
|
<Input
|
94
|
-
|
94
|
+
autoComplete={'off'}
|
95
95
|
id={idOnInput}
|
96
96
|
type='text'
|
97
97
|
name={idOnInput}
|
@@ -108,7 +108,7 @@ export const InputAutocomplete = ({
|
|
108
108
|
:
|
109
109
|
|
110
110
|
<Input
|
111
|
-
|
111
|
+
autoComplete={'off'}
|
112
112
|
id={idOnInput}
|
113
113
|
type='text'
|
114
114
|
name={idOnInput}
|
@@ -124,17 +124,20 @@ export const InputAutocomplete = ({
|
|
124
124
|
<div className={getStyles('input-autocomplete-box-results')}>
|
125
125
|
<ul className={getStyles('input-autocomplete-ul')}>
|
126
126
|
{suggestedAddresses.map((itemAddresses, index) => (
|
127
|
-
<li key={index} className={getStyles('input-autocomplete-li')} onClick={handleOnSelect}>
|
127
|
+
<li id={'idLiItem' + index} key={index} className={getStyles('input-autocomplete-li')} onClick={handleOnSelect}>
|
128
128
|
{viewIconList ?
|
129
129
|
<div className={getStyles('input-autocomplete-li-icon')}>
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
130
|
+
<Picture
|
131
|
+
src={itemAddresses.iconURL ? itemAddresses.iconURL : "../../static/google-maps.png"}
|
132
|
+
width={15}
|
133
|
+
height={15}
|
134
|
+
/>
|
135
|
+
</div>
|
136
|
+
:
|
137
|
+
null
|
138
|
+
|
139
|
+
}
|
140
|
+
{itemAddresses.name ? itemAddresses.name : itemAddresses.addressField}
|
138
141
|
</li>
|
139
142
|
))}
|
140
143
|
</ul>
|
@@ -172,7 +175,7 @@ InputAutocomplete.propTypes = {
|
|
172
175
|
getStyles: PropTypes.func.isRequired,
|
173
176
|
placeholderOnInput: PropTypes.string,
|
174
177
|
idOnInput: PropTypes.string,
|
175
|
-
suggestedAddresses: PropTypes.
|
178
|
+
suggestedAddresses: PropTypes.array,
|
176
179
|
handleOnInputChange: PropTypes.func,
|
177
180
|
handleOnFocus: PropTypes.func,
|
178
181
|
handleOnBlur: PropTypes.func,
|
@@ -102,7 +102,7 @@ export const RowTable = ({
|
|
102
102
|
{/* <Check id={item[itemTd.accessor]} isChecked={item.isSelected} /> */}
|
103
103
|
|
104
104
|
<Toggle
|
105
|
-
id={item
|
105
|
+
id={'idToggle' + item.id}
|
106
106
|
checked={item.isSelected}
|
107
107
|
label=""
|
108
108
|
onChangeCheckbox={(e) => { handleClickCheckbox(e, item) }}
|
@@ -125,7 +125,7 @@ export const RowTable = ({
|
|
125
125
|
<span key={itemTdObj.id}>{itemTdObj[itemTd.subAccessor]}
|
126
126
|
|
127
127
|
{array.length - 1 !== index ?
|
128
|
-
<span>, </span> : null
|
128
|
+
<span>, </span> : null}
|
129
129
|
|
130
130
|
</span>
|
131
131
|
|
@@ -156,6 +156,7 @@ export const RowTable = ({
|
|
156
156
|
{itemTd.viewUserView ?
|
157
157
|
<>
|
158
158
|
<Icon
|
159
|
+
id="userView"
|
159
160
|
background="base"
|
160
161
|
name="userView"
|
161
162
|
onClick={(e) => { onClickActionUserView(e, item) }}
|
@@ -168,6 +169,7 @@ export const RowTable = ({
|
|
168
169
|
{itemTd.viewListInvoice ?
|
169
170
|
<>
|
170
171
|
<Icon
|
172
|
+
id={"listInvoice" + index}
|
171
173
|
background="base"
|
172
174
|
name="listInvoice"
|
173
175
|
onClick={(e) => { onClickActionListInvoice(e, item) }}
|
@@ -179,6 +181,7 @@ export const RowTable = ({
|
|
179
181
|
{itemTd.viewListXLS && item.fileType === 'xls' ?
|
180
182
|
<>
|
181
183
|
<Icon
|
184
|
+
id={"listXLS" + index}
|
182
185
|
background="base"
|
183
186
|
name="listXLS"
|
184
187
|
onClick={(e) => { onClickActionListXLS(e, item) }}
|
@@ -190,6 +193,7 @@ export const RowTable = ({
|
|
190
193
|
{itemTd.viewListCSV && item.fileType === 'xml' ?
|
191
194
|
<>
|
192
195
|
<Icon
|
196
|
+
id={"listCSV" + index}
|
193
197
|
background="base"
|
194
198
|
name="listCSV"
|
195
199
|
onClick={(e) => { onClickActionListCSV(e, item) }}
|
@@ -201,6 +205,7 @@ export const RowTable = ({
|
|
201
205
|
{itemTd.viewListPDF && item.fileType === 'pdf' ?
|
202
206
|
<>
|
203
207
|
<Icon
|
208
|
+
id={"listPDF" + index}
|
204
209
|
background="base"
|
205
210
|
name="listPDF"
|
206
211
|
onClick={(e) => { onClickActionListPDF(e, item) }}
|
@@ -214,6 +219,7 @@ export const RowTable = ({
|
|
214
219
|
{itemTd.viewEdit ?
|
215
220
|
<>
|
216
221
|
<Icon
|
222
|
+
id={"edit" + index}
|
217
223
|
background="base"
|
218
224
|
name="edit"
|
219
225
|
onClick={(e) => { onClickActionEdit(e, item) }}
|
package/package.json
CHANGED
Binary file
|