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.
Files changed (36) hide show
  1. package/atoms/Icon/Icon.module.css +30 -0
  2. package/atoms/Icon/constants.js +72 -1
  3. package/atoms/Input/Input.js +104 -16
  4. package/atoms/Input/Input.module.css +18 -0
  5. package/atoms/Modal/Modal.js +8 -3
  6. package/atoms/Modal/Modal.module.css +28 -0
  7. package/index.js +4 -0
  8. package/molecules/CardDefault/CardDefault.js +64 -0
  9. package/molecules/CardDefault/CardDefault.module.css +18 -0
  10. package/molecules/CardDefault/CardDefault.stories.js +23 -0
  11. package/molecules/CardDefault/constants.js +1 -0
  12. package/molecules/CardDefault/index.js +3 -0
  13. package/molecules/CardProductTypesBooking/CardProductTypesBooking.js +39 -12
  14. package/molecules/CardProductTypesBooking/CardProductTypesBooking.module.css +59 -21
  15. package/molecules/CardServices/CardServices.js +4 -1
  16. package/molecules/DynamicSelect/DynamicSelect.js +8 -2
  17. package/molecules/InputAutocomplete/InputAutocomplete.js +215 -0
  18. package/molecules/InputAutocomplete/InputAutocomplete.module.css +55 -0
  19. package/molecules/InputAutocomplete/InputAutocomplete.stories.js +23 -0
  20. package/molecules/InputAutocomplete/constants.js +1 -0
  21. package/molecules/InputAutocomplete/index.js +3 -0
  22. package/molecules/RowTable/RowTable.js +208 -81
  23. package/molecules/RowTable/RowTable.module.css +5 -0
  24. package/molecules/RowTable/constants.js +36 -0
  25. package/package.json +3 -1
  26. package/public/static/images/csv-svgrepo-com (1).svg +16 -0
  27. package/public/static/images/csv-svgrepo-com.svg +45 -0
  28. package/public/static/images/list-svgrepo-com.svg +19 -0
  29. package/public/static/images/pdf-svgrepo-com.svg +17 -0
  30. package/public/static/images/xls-svgrepo-com (1).svg +17 -0
  31. package/public/static/images/xls-svgrepo-com.svg +24 -0
  32. package/public/static/images/email-svgrepo-com.svg +0 -10
  33. package/public/static/images/user-svgrepo-com (1).svg +0 -27
  34. package/public/static/images/user-svgrepo-com (2).svg +0 -24
  35. package/public/static/images/user-svgrepo-com (3).svg +0 -24
  36. package/public/static/images/user-svgrepo-com.svg +0 -31
@@ -9,35 +9,40 @@
9
9
  transition: box-shadow .28s cubic-bezier(.4, 0, .2, 1);
10
10
  background-color: #fff;
11
11
  margin: 0;
12
- cursor: auto;
13
- max-width: 330px;
14
- min-width: 330px;
15
- margin-right: 10px;
12
+ cursor: pointer;
13
+ max-width: 100%;
14
+ min-width: 100%;
15
+ margin-bottom: 10px;
16
16
  }
17
17
 
18
18
  .labelNotification {
19
19
  font-size: 12px;
20
- color: #fff;
21
- top: 0;
22
- left: 0;
23
- padding: 8px 8px 4px;
24
- line-height: 13px;
25
- border-radius: 10px;
26
- margin-bottom: 6px;
27
- background-color: rgb(245, 166, 35);
20
+ color: #fff;
21
+ top: 0;
22
+ left: 0;
23
+ padding: 8px 8px 4px;
24
+ line-height: 13px;
25
+ border-radius: 10px;
26
+ margin-bottom: 6px;
27
+ background-color: rgb(245, 166, 35);
28
28
  }
29
29
 
30
30
  .card-product-content {
31
31
  flex-direction: row;
32
- box-sizing: border-box;
33
- display: flex;
34
- place-content: center start;
35
- align-items: center;
32
+ box-sizing: border-box;
33
+ display: flex;
34
+ place-content: center start;
35
+ align-items: center;
36
+ }
37
+
38
+ .card-product-img {
39
+ max-width: 70px;
40
+ min-width: 70px;
36
41
  }
37
42
 
38
43
  .titleCardProductTypes {
39
- color: rgba(0,0,0,.87);
40
- font-size: 13px;
44
+ color: rgba(0, 0, 0, .87);
45
+ font-size: 16px;
41
46
  }
42
47
 
43
48
  .etaCardProductTypesSub {
@@ -58,9 +63,9 @@
58
63
 
59
64
  .priceCardProductTypes {
60
65
  color: #00205b;
61
- font-size: 14px;
66
+ font-size: 18px;
62
67
  text-align: right;
63
- line-height: .9rem;
68
+ line-height: 1.1rem;
64
69
  }
65
70
 
66
71
  .priceCardProductTypesSub {
@@ -68,4 +73,37 @@
68
73
  font-size: 11px;
69
74
  text-align: right;
70
75
  line-height: .9rem;
71
- }
76
+ }
77
+
78
+ .selectCard {
79
+ border-top: 4px solid #39b54a;
80
+ border-bottom: 4px solid #00a3ff;
81
+ border-left: 1px solid #39b54a;
82
+ border-right: 1px solid #00a3ff;
83
+ -webkit-box-sizing: border-box;
84
+ -moz-box-sizing: border-box;
85
+ box-sizing: border-box;
86
+ background-position: 0 0, 100% 0;
87
+ background-repeat: no-repeat;
88
+ -webkit-background-size: 4px 100%;
89
+ -moz-background-size: 4px 100%;
90
+ background-size: 4px 100%;
91
+ background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMSAxIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48bGluZWFyR3JhZGllbnQgaWQ9Imxlc3NoYXQtZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMzYWNmZDUiIHN0b3Atb3BhY2l0eT0iMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzNhNGVkNSIgc3RvcC1vcGFjaXR5PSIxIi8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2xlc3NoYXQtZ2VuZXJhdGVkKSIgLz48L3N2Zz4=),url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMSAxIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48bGluZWFyR3JhZGllbnQgaWQ9Imxlc3NoYXQtZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMzYWNmZDUiIHN0b3Atb3BhY2l0eT0iMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzNhNGVkNSIgc3RvcC1vcGFjaXR5PSIxIi8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2xlc3NoYXQtZ2VuZXJhdGVkKSIgLz48L3N2Zz4=);
92
+ background-image: -webkit-linear-gradient(top, #39b54a 0%, #00a3ff 100%), -webkit-linear-gradient(top, #39b54a 0%, #00a3ff 100%);
93
+ background-image: -moz-linear-gradient(top, #39b54a 0%, #00a3ff 100%), -moz-linear-gradient(top, #39b54a 0%, #00a3ff 100%);
94
+ background-image: -o-linear-gradient(top, #39b54a 0%, #00a3ff 100%), -o-linear-gradient(top, #39b54a 0%, #00a3ff 100%);
95
+ background-image: linear-gradient(to bottom, #39b54a 0%, #00a3ff 100%), linear-gradient(to bottom, #39b54a 0%, #00a3ff 100%);
96
+ }
97
+
98
+ /* .selectCard:before {
99
+ content: '';
100
+ position: absolute;
101
+ top: 0;
102
+ right: 0;
103
+ bottom: 0;
104
+ left: 0;
105
+ z-index: -1;
106
+ margin: 4px;
107
+ border-radius: inherit;
108
+ background: linear-gradient(to left, #39b54a, #00a3ff);
109
+ } */
@@ -24,6 +24,7 @@ export const CardServices = ({
24
24
  txtUserService,
25
25
  txtRefService,
26
26
  txtUserNumberService,
27
+ onClickReturnOrder,
27
28
 
28
29
  }) => {
29
30
  return (
@@ -197,7 +198,7 @@ export const CardServices = ({
197
198
 
198
199
  <Icon
199
200
  name="returnOrder"
200
- onClick={function noRefCheck() { }}
201
+ onClick={onClickReturnOrder}
201
202
  size="sm"
202
203
  />
203
204
 
@@ -271,6 +272,7 @@ CardServices.propTypes = {
271
272
  txtUserService: PropTypes.string,
272
273
  txtRefService: PropTypes.string,
273
274
  txtUserNumberService: PropTypes.string,
275
+ onClickReturnOrder: PropTypes.func,
274
276
  }
275
277
 
276
278
  CardServices.defaultProps = {
@@ -282,6 +284,7 @@ CardServices.defaultProps = {
282
284
  txtUserService: 'Alberto Alvarez',
283
285
  txtRefService: '1946980768',
284
286
  txtUserNumberService: 'WF3941',
287
+ onClickReturnOrder: () => { },
285
288
  }
286
289
 
287
290
  export default withStyles(styles)(CardServices)
@@ -5,7 +5,7 @@ import styles from './DynamicSelect.module.css'
5
5
  import withStyles from '../../hocs/withStyles'
6
6
 
7
7
 
8
- export const DynamicSelect = ({ getStyles, optionsSelect, defaultValue, placeholder, isMulti, isClearable, isDisabled, isLoading, isRtl, isSearchable, isInline, onChange }) => {
8
+ export const DynamicSelect = ({ getStyles, optionsSelect, defaultValue, placeholder, isMulti, isClearable, isDisabled, isLoading, isRtl, isSearchable, isInline, onChange, onFocus, onBlur }) => {
9
9
 
10
10
 
11
11
  const customStyles = {
@@ -81,6 +81,8 @@ export const DynamicSelect = ({ getStyles, optionsSelect, defaultValue, placehol
81
81
  isRtl={isRtl}
82
82
  isSearchable={isSearchable}
83
83
  onChange={onChange}
84
+ onFocus={onFocus}
85
+ onBlur={onBlur}
84
86
  />
85
87
  </div>
86
88
 
@@ -98,7 +100,9 @@ DynamicSelect.propTypes = {
98
100
  isRtl: PropTypes.bool,
99
101
  isSearchable: PropTypes.bool,
100
102
  isInline: PropTypes.bool,
101
- onChange: PropTypes.func
103
+ onChange: PropTypes.func,
104
+ onFocus: PropTypes.func,
105
+ onBlur: PropTypes.func
102
106
  }
103
107
 
104
108
  DynamicSelect.defaultProps = {
@@ -112,6 +116,8 @@ DynamicSelect.defaultProps = {
112
116
  isSearchable: false,
113
117
  isInline: false,
114
118
  onChange: () => { },
119
+ onFocus: () => { },
120
+ onBlur: () => { },
115
121
  }
116
122
 
117
123
  export default withStyles(styles)(DynamicSelect)
@@ -0,0 +1,215 @@
1
+ import React from 'react'
2
+ import { useState } from "react";
3
+ import PropTypes from 'prop-types'
4
+
5
+ import styles from './InputAutocomplete.module.css'
6
+ import { options } from './constants'
7
+ import withStyles from '../../hocs/withStyles'
8
+
9
+ import { BarLoader, ClipLoader } from 'react-spinners'
10
+ import Input from '../../atoms/Input'
11
+ import Picture from '../../atoms/Picture'
12
+ import Icon from '../../atoms/Icon'
13
+ import { Horizontal } from '../../layout/Spacer/components';
14
+
15
+
16
+ export const InputAutocomplete = ({
17
+ placeholderOnInput,
18
+ idOnInput,
19
+ suggestedAddresses,
20
+ handleOnInputChange,
21
+ handleOnFocus,
22
+ handleOnBlur,
23
+ handleOnSelect,
24
+ viewAutocomplete,
25
+ viewBarLoader,
26
+ viewIconList,
27
+ viewInputSecondary,
28
+ styleWidthInput,
29
+ value,
30
+ isViewIcon,
31
+ idIcon,
32
+ nameIcon,
33
+ sizeIcon,
34
+ colorIcon,
35
+ backgroundIcon,
36
+ getStyles
37
+ }) => {
38
+
39
+ // let [loading, setLoading] = useState(false);
40
+ // let [color, setColor] = useState("#ffffff");
41
+
42
+ const override = {
43
+ display: "block",
44
+ margin: "0 auto",
45
+ borderColor: "red",
46
+ width: "94%",
47
+ };
48
+
49
+ // const options = [
50
+ // { label: "Option 1", value: 1 },
51
+ // { label: "Option 2", value: 2 },
52
+ // { label: "Option 3", value: 3 }
53
+ // ];
54
+
55
+ // const Input = (props) => {
56
+ // const { autoComplete = props.autoComplete } = props.selectProps;
57
+ // return <components.Input {...props} autoComplete={autoComplete} />;
58
+ // };
59
+
60
+
61
+ // const handleOnInputChange = (string, results) => {
62
+ // console.log(string, results)
63
+
64
+ // }
65
+
66
+ // const loadOptions = (string, results) => {
67
+ // // inputValue: string,
68
+ // // callback: (options: ColourOption[]) => void
69
+ // }
70
+
71
+ // const handleOnInputChange = (string, results) => {
72
+ // console.log(string, results)
73
+
74
+ // }
75
+
76
+
77
+ return <div className={getStyles('input-autocomplete')}>
78
+
79
+ {isViewIcon ?
80
+
81
+ <div className={getStyles('box-icon-input')}>
82
+
83
+ <Icon
84
+ id={idIcon}
85
+ name={nameIcon}
86
+ size={sizeIcon}
87
+ color={colorIcon}
88
+ background={backgroundIcon}
89
+ />
90
+
91
+ <Horizontal size="xs" />
92
+
93
+ <Input
94
+ autocomplete={'off'}
95
+ id={idOnInput}
96
+ type='text'
97
+ name={idOnInput}
98
+ onChange={handleOnInputChange}
99
+ onFocus={handleOnFocus}
100
+ onBlur={handleOnBlur}
101
+ placeholder={placeholderOnInput}
102
+ isInputSecondary={viewInputSecondary}
103
+ value={value}
104
+ />
105
+
106
+ </div>
107
+
108
+ :
109
+
110
+ <Input
111
+ autocomplete={'off'}
112
+ id={idOnInput}
113
+ type='text'
114
+ name={idOnInput}
115
+ onChange={handleOnInputChange}
116
+ onFocus={handleOnFocus}
117
+ onBlur={handleOnBlur}
118
+ placeholder={placeholderOnInput}
119
+ isInputSecondary={viewInputSecondary}
120
+ value={value}
121
+ />}
122
+
123
+ {!viewBarLoader && suggestedAddresses.length !== 0 && viewAutocomplete ? (
124
+ <div className={getStyles('input-autocomplete-box-results')}>
125
+ <ul className={getStyles('input-autocomplete-ul')}>
126
+ {suggestedAddresses.map((itemAddresses, index) => (
127
+ <li key={index} className={getStyles('input-autocomplete-li')} onClick={handleOnSelect}>
128
+ {viewIconList ?
129
+ <div className={getStyles('input-autocomplete-li-icon')}>
130
+
131
+ <Picture
132
+ src={itemAddresses.iconURL}
133
+ width={15}
134
+ height={15}
135
+ />
136
+ </div> : null}
137
+ {itemAddresses.name}
138
+ </li>
139
+ ))}
140
+ </ul>
141
+ </div>
142
+ )
143
+ :
144
+ viewAutocomplete ? (
145
+ <div className={getStyles('input-autocomplete-box-results')}>
146
+ <ul className={getStyles('input-autocomplete-ul')}>
147
+
148
+ <li className={getStyles('input-autocomplete-li')} onClick={handleOnSelect}>
149
+ <div className={getStyles('input-autocomplete-li-icon')}>
150
+ <Icon
151
+ name="clock"
152
+ size="xs"
153
+ />
154
+ </div>
155
+ No hay resultados
156
+ </li>
157
+
158
+ </ul>
159
+ </div>
160
+ )
161
+ : null
162
+ }
163
+
164
+
165
+ <BarLoader color="#36d7b7" loading={viewBarLoader} cssOverride={override} size={150} />
166
+
167
+
168
+ </div>
169
+ }
170
+
171
+ InputAutocomplete.propTypes = {
172
+ getStyles: PropTypes.func.isRequired,
173
+ placeholderOnInput: PropTypes.string,
174
+ idOnInput: PropTypes.string,
175
+ suggestedAddresses: PropTypes.object,
176
+ handleOnInputChange: PropTypes.func,
177
+ handleOnFocus: PropTypes.func,
178
+ handleOnBlur: PropTypes.func,
179
+ handleOnSelect: PropTypes.func,
180
+ viewAutocomplete: PropTypes.bool,
181
+ viewBarLoader: PropTypes.bool,
182
+ viewIconList: PropTypes.bool,
183
+ viewInputSecondary: PropTypes.bool,
184
+ styleWidthInput: PropTypes.string,
185
+ isViewIcon: PropTypes.bool,
186
+ idIcon: PropTypes.string,
187
+ nameIcon: PropTypes.string,
188
+ sizeIcon: PropTypes.string,
189
+ colorIcon: PropTypes.string,
190
+ backgroundIcon: PropTypes.string,
191
+ }
192
+
193
+ InputAutocomplete.defaultProps = {
194
+ getStyles: () => { },
195
+ placeholderOnInput: '',
196
+ idOnInput: '',
197
+ suggestedAddresses: [],
198
+ handleOnInputChange: () => { },
199
+ handleOnFocus: () => { },
200
+ handleOnBlur: () => { },
201
+ handleOnSelect: () => { },
202
+ viewAutocomplete: false,
203
+ viewBarLoader: false,
204
+ viewIconList: true,
205
+ viewInputSecondary: false,
206
+ styleWidthInput: '260',
207
+ isViewIcon: false,
208
+ idIcon: 'Ejemplo',
209
+ nameIcon: 'user',
210
+ sizeIcon: 'md',
211
+ colorIcon: 'highlight',
212
+ backgroundIcon: 'base',
213
+ }
214
+
215
+ export default withStyles(styles)(InputAutocomplete)
@@ -0,0 +1,55 @@
1
+ .input-autocomplete {
2
+ width: 100%;
3
+ }
4
+
5
+ .input-autocomplete-box-results {
6
+ padding: 7px 0px;
7
+ border-radius: var(--border-radius-xs);
8
+ border: var(--border-width-thin) solid var(--color-brand-white-lilac);
9
+ background-color: var(--color-base-white);
10
+ max-height: 230px;
11
+ overflow-y: auto;
12
+ box-shadow: 0 0 0 1px var(--color-primary), 0 0 10px 0 var(--color-primary);
13
+ outline: none;
14
+ position: absolute;
15
+ z-index: 11111;
16
+ margin-top: 2px;
17
+ max-width: 520px;
18
+ min-width: 260px;
19
+ }
20
+
21
+ .input-autocomplete-ul {
22
+ display: block;
23
+ list-style-type: none;
24
+ margin-block-start: 0em;
25
+ margin-block-end: 0em;
26
+ margin-inline-start: 0px;
27
+ margin-inline-end: 0px;
28
+ padding-inline-start: 0px;
29
+ }
30
+
31
+ .input-autocomplete-li {
32
+ color: var(--color-font-base);
33
+ padding: 7px 9px;
34
+ font-size: var(--font-size-mini);
35
+ font-weight: var(--font-weight-light);
36
+ text-align: left;
37
+ border-bottom: var(--border-width-thin) solid var(--color-brand-white-lilac);
38
+ display: flex;
39
+ }
40
+
41
+ .input-autocomplete-li:hover {
42
+ background: rgba(0, 0, 0, 0.04);
43
+ cursor: pointer;
44
+ }
45
+
46
+ .input-autocomplete-li-icon {
47
+ width: 15px;
48
+ min-width: 15px;
49
+ max-width: 15px;
50
+ margin-right: 6px;
51
+ }
52
+
53
+ .box-icon-input {
54
+ display: flex;
55
+ }
@@ -0,0 +1,23 @@
1
+ import { InputAutocomplete, styles, options } from '.'
2
+
3
+ import {
4
+ getTemplate,
5
+ getListTemplate,
6
+ getOptionsArgTypes,
7
+ } from '../../helpers/storybook'
8
+
9
+ const Template = getTemplate(InputAutocomplete, styles)
10
+ const ListTemplate = getListTemplate(InputAutocomplete, styles)
11
+
12
+ export default {
13
+ title: 'Molecules/InputAutocomplete',
14
+ component: InputAutocomplete,
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: [] }
@@ -0,0 +1,3 @@
1
+ export { default, InputAutocomplete } from './InputAutocomplete'
2
+ export { options } from './constants'
3
+ export { default as styles } from './InputAutocomplete.module.css'