imbric-theme 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. package/.dockerignore +14 -0
  2. package/.eslintignore +1 -0
  3. package/.prettierignore +1 -0
  4. package/.storybook/main.js +6 -2
  5. package/.storybook/preview.js +21 -0
  6. package/.vscode/settings.json +3 -0
  7. package/Dockerfile +17 -0
  8. package/atoms/AlertModal/AlertModal.js +69 -0
  9. package/atoms/AlertModal/AlertModal.module.css +3 -0
  10. package/atoms/AlertModal/AlertModal.stories.js +30 -0
  11. package/atoms/AlertModal/constants.js +4 -0
  12. package/atoms/AlertModal/index.js +3 -0
  13. package/atoms/Button/Button.js +17 -2
  14. package/atoms/Button/Button.module.css +25 -3
  15. package/atoms/Button/Button.stories.js +1 -1
  16. package/atoms/Button/__snapshots__/Button.stories.js.snap +8 -8
  17. package/atoms/Check/Check.js +6 -4
  18. package/atoms/Checkbox/Checkbox.js +77 -0
  19. package/atoms/Checkbox/Checkbox.module.css +60 -0
  20. package/atoms/Checkbox/Checkbox.stories.js +30 -0
  21. package/atoms/Checkbox/constants.js +1 -0
  22. package/atoms/Checkbox/index.js +3 -0
  23. package/atoms/Divider/Divider.js +5 -2
  24. package/atoms/Divider/Divider.module.css +20 -0
  25. package/atoms/Divider/Divider.stories.js +13 -2
  26. package/atoms/Divider/constants.js +3 -0
  27. package/atoms/Divider/index.js +1 -0
  28. package/atoms/Heading/Heading.js +1 -1
  29. package/atoms/Heading/Heading.module.css +4 -0
  30. package/atoms/Heading/Heading.stories.js +2 -2
  31. package/atoms/Heading/__snapshots__/Heading.stories.js.snap +16 -16
  32. package/atoms/Heading/constants.js +1 -1
  33. package/atoms/Icon/Icon.js +1 -1
  34. package/atoms/Icon/Icon.module.css +30 -0
  35. package/atoms/Icon/constants.js +750 -145
  36. package/atoms/Input/Input.js +195 -15
  37. package/atoms/Input/Input.module.css +62 -6
  38. package/atoms/Input/Input.stories.js +8 -2
  39. package/atoms/Input/__snapshots__/Input.stories.js.snap +5 -5
  40. package/atoms/Input/constants.js +1 -1
  41. package/atoms/Label/Label.js +31 -0
  42. package/atoms/Label/Label.module.css +42 -0
  43. package/atoms/Label/Label.stories.js +26 -0
  44. package/atoms/Label/constants.js +1 -0
  45. package/atoms/Label/index.js +3 -0
  46. package/atoms/LinkItem/LinkItem.js +38 -0
  47. package/atoms/{Link/Link.module.css → LinkItem/LinkItem.module.css} +6 -1
  48. package/atoms/{Link/Link.stories.js → LinkItem/LinkItem.stories.js} +5 -5
  49. package/atoms/LinkItem/index.js +3 -0
  50. package/atoms/Modal/Modal.js +27 -4
  51. package/atoms/Modal/Modal.module.css +63 -6
  52. package/atoms/Paragraph/Paragraph.module.css +4 -0
  53. package/atoms/Paragraph/Paragraph.stories.js +2 -2
  54. package/atoms/Paragraph/__snapshots__/Paragraph.stories.js.snap +16 -16
  55. package/atoms/Picture/Picture.js +9 -2
  56. package/atoms/Tab/Tab.js +41 -0
  57. package/atoms/Tab/Tab.module.css +17 -0
  58. package/atoms/Tab/Tab.stories.js +27 -0
  59. package/atoms/Tab/constants.js +1 -0
  60. package/atoms/Tab/index.js +3 -0
  61. package/atoms/Textarea/Textarea.js +106 -15
  62. package/atoms/Textarea/Textarea.module.css +31 -2
  63. package/atoms/Toggle/Toggle.js +56 -0
  64. package/atoms/Toggle/Toggle.module.css +41 -0
  65. package/atoms/Toggle/Toggle.stories.js +21 -0
  66. package/atoms/Toggle/constants.js +1 -0
  67. package/atoms/Toggle/index.js +3 -0
  68. package/helpers/storybook.js +2 -2
  69. package/hook/useAddColumn.js +40 -0
  70. package/hook/useStateDate.js +25 -0
  71. package/hook/useTable.js +54 -0
  72. package/index.js +41 -1
  73. package/jest.config.js +1 -1
  74. package/layout/DynamicTable/DynamicTable.js +372 -0
  75. package/layout/DynamicTable/DynamicTable.module.css +62 -0
  76. package/layout/DynamicTable/DynamicTable.stories.js +79 -0
  77. package/layout/DynamicTable/constants.js +323 -0
  78. package/layout/DynamicTable/index.js +3 -0
  79. package/layout/FlexColumnContent/FlexColumnContent.js +26 -0
  80. package/layout/FlexColumnContent/FlexColumnContent.module.css +5 -0
  81. package/layout/FlexColumnContent/FlexColumnContent.stories.js +28 -0
  82. package/layout/FlexColumnContent/constants.js +1 -0
  83. package/layout/FlexColumnContent/index.js +3 -0
  84. package/layout/Navbar/Navbar.js +247 -0
  85. package/layout/Navbar/Navbar.module.css +35 -0
  86. package/layout/Navbar/Navbar.stories.js +20 -0
  87. package/layout/Navbar/constants.js +35 -0
  88. package/layout/Navbar/index.js +2 -0
  89. package/layout/Sidebar/Sidebar.js +115 -0
  90. package/layout/Sidebar/Sidebar.module.css +387 -0
  91. package/layout/Sidebar/Sidebar.stories.js +28 -0
  92. package/layout/Sidebar/constants.js +228 -0
  93. package/layout/Sidebar/index.js +3 -0
  94. package/molecules/Accordion/Accordion.js +11 -11
  95. package/molecules/CardDefault/CardDefault.js +65 -0
  96. package/molecules/CardDefault/CardDefault.module.css +19 -0
  97. package/molecules/CardDefault/CardDefault.stories.js +23 -0
  98. package/molecules/CardDefault/constants.js +1 -0
  99. package/molecules/CardDefault/index.js +3 -0
  100. package/molecules/CardProductTypesBooking/CardProductTypesBooking.js +89 -0
  101. package/molecules/CardProductTypesBooking/CardProductTypesBooking.module.css +118 -0
  102. package/molecules/CardProductTypesBooking/CardProductTypesBooking.stories.js +25 -0
  103. package/molecules/CardProductTypesBooking/constants.js +1 -0
  104. package/molecules/CardProductTypesBooking/index.js +3 -0
  105. package/molecules/CardServiceDetail/CardServiceDetail.js +400 -0
  106. package/molecules/CardServiceDetail/CardServiceDetail.module.css +222 -0
  107. package/molecules/CardServiceDetail/CardServiceDetail.stories.js +23 -0
  108. package/molecules/CardServiceDetail/constants.js +1 -0
  109. package/molecules/CardServiceDetail/index.js +3 -0
  110. package/molecules/CardServices/CardServices.js +461 -0
  111. package/molecules/CardServices/CardServices.module.css +213 -0
  112. package/molecules/CardServices/CardServices.stories.js +41 -0
  113. package/molecules/CardServices/constants.js +5 -0
  114. package/molecules/CardServices/index.js +3 -0
  115. package/molecules/CardServicesFinalized/CardServicesFinalized.js +381 -0
  116. package/molecules/CardServicesFinalized/CardServicesFinalized.module.css +213 -0
  117. package/molecules/CardServicesFinalized/CardServicesFinalized.stories.js +23 -0
  118. package/molecules/CardServicesFinalized/constants.js +1 -0
  119. package/molecules/CardServicesFinalized/index.js +3 -0
  120. package/molecules/CheckList/CheckList.js +135 -0
  121. package/molecules/CheckList/CheckList.module.css +94 -0
  122. package/molecules/CheckList/CheckList.stories.js +25 -0
  123. package/molecules/CheckList/constants.js +23 -0
  124. package/molecules/CheckList/index.js +3 -0
  125. package/molecules/ColumnTable/ColumnTable.js +155 -0
  126. package/molecules/ColumnTable/ColumnTable.module.css +51 -0
  127. package/molecules/ColumnTable/ColumnTable.stories.js +26 -0
  128. package/molecules/ColumnTable/constants.js +117 -0
  129. package/molecules/ColumnTable/index.js +3 -0
  130. package/molecules/DatePicker/DatePicker.js +242 -0
  131. package/molecules/DatePicker/DatePicker.module.css +38 -0
  132. package/molecules/DatePicker/DatePicker.stories.js +23 -0
  133. package/molecules/DatePicker/constants.js +3 -0
  134. package/molecules/DatePicker/index.js +3 -0
  135. package/molecules/DatePickerTime/DatePickerTime.js +133 -0
  136. package/molecules/DatePickerTime/DatePickerTime.module.css +3 -0
  137. package/molecules/DatePickerTime/DatePickerTime.stories.js +18 -0
  138. package/molecules/DatePickerTime/constants.js +1 -0
  139. package/molecules/DatePickerTime/index.js +3 -0
  140. package/molecules/Dropdown/Dropdown.js +26 -23
  141. package/molecules/Dropdown/Dropdown.module.css +21 -3
  142. package/molecules/DynamicSelect/DynamicSelect.js +186 -0
  143. package/molecules/DynamicSelect/DynamicSelect.module.css +10 -0
  144. package/molecules/DynamicSelect/DynamicSelect.stories.js +32 -0
  145. package/molecules/DynamicSelect/constants.js +7 -0
  146. package/molecules/DynamicSelect/index.js +3 -0
  147. package/molecules/Error/Error.js +2 -2
  148. package/molecules/Error/Error.module.css +3 -2
  149. package/molecules/FooterTable/FooterTable.js +166 -0
  150. package/molecules/FooterTable/FooterTable.module.css +63 -0
  151. package/molecules/FooterTable/FooterTable.stories.js +23 -0
  152. package/molecules/FooterTable/constants.js +9 -0
  153. package/molecules/FooterTable/index.js +3 -0
  154. package/molecules/InputAutocomplete/InputAutocomplete.js +221 -0
  155. package/molecules/InputAutocomplete/InputAutocomplete.module.css +55 -0
  156. package/molecules/InputAutocomplete/InputAutocomplete.stories.js +23 -0
  157. package/molecules/InputAutocomplete/constants.js +1 -0
  158. package/molecules/InputAutocomplete/index.js +3 -0
  159. package/molecules/ItemMenu/ItemMenu.js +134 -0
  160. package/molecules/ItemMenu/ItemMenu.module.css +363 -0
  161. package/molecules/ItemMenu/ItemMenu.stories.js +42 -0
  162. package/molecules/ItemMenu/constants.js +36 -0
  163. package/molecules/ItemMenu/index.js +3 -0
  164. package/molecules/RowTable/RowTable.js +928 -0
  165. package/molecules/RowTable/RowTable.module.css +63 -0
  166. package/molecules/RowTable/RowTable.stories.js +26 -0
  167. package/molecules/RowTable/constants.js +798 -0
  168. package/molecules/RowTable/index.js +3 -0
  169. package/molecules/Tabs/Tabs.js +59 -0
  170. package/molecules/Tabs/Tabs.module.css +13 -0
  171. package/molecules/Tabs/Tabs.stories.js +34 -0
  172. package/molecules/Tabs/constants.js +34 -0
  173. package/molecules/Tabs/index.js +3 -0
  174. package/package.json +33 -16
  175. package/pages/Login/Login.js +102 -0
  176. package/pages/Login/Login.module.css +5 -0
  177. package/pages/Login/Login.stories.js +23 -0
  178. package/pages/Login/constants.js +1 -0
  179. package/pages/Login/index.js +3 -0
  180. package/pages/Login/validation/loginSchema.js +5 -0
  181. package/public/favicon.ico +0 -0
  182. package/public/static/google-maps.png +0 -0
  183. package/public/static/images/folders-folder.svg +26 -0
  184. package/public/static/images/permissions.svg +14 -0
  185. package/public/static/images/reports-results.svg +18 -0
  186. package/public/static/logo.svg +19 -0
  187. package/public/static/logologin.png +0 -0
  188. package/public/static/logologin.svg +16 -0
  189. package/public/static/logologintagos.svg +19 -0
  190. package/public/static/logotipo.svg +50 -0
  191. package/public/static/logotipoS.svg +26 -0
  192. package/public/static/taxisvalencia_logod.png +0 -0
  193. package/scripts/create-component.js +2 -1
  194. package/styles/GrupoMutua.css +391 -0
  195. package/styles/default.css +391 -0
  196. package/styles/globals.css +1514 -0
  197. package/styles/radiotaxiaragon.css +391 -0
  198. package/styles/spartan.css +391 -0
  199. package/styles/tagos.css +391 -0
  200. package/styles/taxisvalencia.css +391 -0
  201. package/styles/tokens.css +2 -1
  202. package/tokens/index.js +2 -1
  203. package/.eslintcache +0 -1
  204. package/atoms/Link/Link.js +0 -33
  205. package/atoms/Link/index.js +0 -3
  206. /package/atoms/{Link → LinkItem}/__snapshots__/Link.stories.js.snap +0 -0
  207. /package/atoms/{Link → LinkItem}/constants.js +0 -0
@@ -4,46 +4,226 @@ 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'
7
9
 
8
- const handleChange = ({ onChange }) => () => {
9
- onChange()
10
- }
10
+
11
+ // const handleChange = ({ onChange }) => () => {
12
+ // onChange()
13
+ // }
11
14
 
12
15
  export const Input = ({
13
16
  getStyles,
14
17
  type,
18
+ id,
15
19
  value,
16
20
  isInline,
21
+ isInlineCode,
22
+ isInputFilter,
23
+ isInputSecondary,
17
24
  onChange,
25
+ onFocus,
26
+ onBlur,
27
+ onClick,
28
+ onKeyDown,
29
+ onKeyUp,
30
+ onInput,
31
+ maxLength,
18
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,
19
47
  }) => (
20
- <input
21
- className={getStyles('input', {
22
- 'is-inline': isInline,
23
- })}
24
- type={type}
25
- value={value}
26
- placeholder={placeholder}
27
- onChange={handleChange({ onChange })}
28
- ></input>
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
+ </>
29
164
  )
30
165
 
31
166
  Input.propTypes = {
32
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,
33
175
  getStyles: PropTypes.func.isRequired,
34
176
  type: PropTypes.oneOf(options.types),
177
+ id: PropTypes.string.isRequired,
35
178
  value: PropTypes.string,
36
179
  placeholder: PropTypes.string,
37
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,
38
197
  }
39
198
 
40
199
  Input.defaultProps = {
41
200
  type: 'text',
42
- value: '',
201
+ // value: '',
202
+ id: '',
43
203
  placeholder: '',
44
204
  isInline: false,
45
- onChange: () => {},
46
- getStyles: () => {},
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,
47
227
  }
48
228
 
49
229
  export default withStyles(styles)(Input)
@@ -1,20 +1,21 @@
1
1
  .input {
2
2
  width: 100%;
3
3
  height: var(--input-height);
4
- padding: 12px 17px;
5
- border: var(--border-width-thin) solid var(--color-primary);
4
+ padding: 10px 17px;
5
+ border: var(--border-width-thin) solid var(--color-brand-white-lilac);
6
6
  background: var(--input-background);
7
- border-radius: var(--input-border-radius);
7
+ /* border-radius: var(--input-border-radius); */
8
8
  color: var(--color-font-base);
9
9
  font-family: var(--font-family-sans);
10
- font-size: var(--input-font-size);
10
+ font-size: var(--font-size-base);
11
11
  font-weight: var(--font-weight-medium);
12
- line-height: var(--line-height-tight);
12
+ line-height: var(--line-height-relaxed);
13
13
  transition: box-shadow 0.2s ease;
14
14
  }
15
15
 
16
16
  .input::placeholder {
17
- color: var(--color-font-highlight);
17
+ color: var(--color-brand-white-lilac);
18
+ font-weight: var(--font-weight-light);
18
19
  }
19
20
 
20
21
  .input:focus {
@@ -22,6 +23,61 @@
22
23
  outline: none;
23
24
  }
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
+
25
47
  .is-inline {
26
48
  max-width: max-content;
27
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
+ }
@@ -13,7 +13,7 @@ export default {
13
13
  title: 'Atoms/Input',
14
14
  component: Input,
15
15
  args: {
16
- placeholder: 'Kingdom slowed',
16
+ placeholder: 'Et harum quidem',
17
17
  },
18
18
  argTypes: {
19
19
  type: getOptionsArgTypes(options.types),
@@ -23,10 +23,16 @@ export default {
23
23
  export const Default = Template.bind({})
24
24
 
25
25
  export const Value = Template.bind({})
26
- Value.args = { value: 'Others mainly cakehole Thorin moldy facial.' }
26
+ Value.args = { value: 'Nam libero tempore, cum soluta.' }
27
27
 
28
28
  export const Types = ListTemplate.bind({})
29
29
  Types.args = { items: options.types.map((type) => ({ type })) }
30
30
 
31
31
  export const Inline = Template.bind({})
32
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 }
@@ -18,7 +18,7 @@ exports[`Storyshots Atoms/Input Default 1`] = `
18
18
  <input
19
19
  className="input"
20
20
  onChange={[Function]}
21
- placeholder="Kingdom slowed"
21
+ placeholder="Et harum quidem"
22
22
  type="text"
23
23
  value=""
24
24
  />
@@ -43,7 +43,7 @@ exports[`Storyshots Atoms/Input Inline 1`] = `
43
43
  <input
44
44
  className="input is-inline"
45
45
  onChange={[Function]}
46
- placeholder="Kingdom slowed"
46
+ placeholder="Et harum quidem"
47
47
  type="text"
48
48
  value=""
49
49
  />
@@ -68,7 +68,7 @@ exports[`Storyshots Atoms/Input Types 1`] = `
68
68
  <input
69
69
  className="input"
70
70
  onChange={[Function]}
71
- placeholder="Kingdom slowed"
71
+ placeholder="Et harum quidem"
72
72
  type="text"
73
73
  value=""
74
74
  />
@@ -93,9 +93,9 @@ exports[`Storyshots Atoms/Input Value 1`] = `
93
93
  <input
94
94
  className="input"
95
95
  onChange={[Function]}
96
- placeholder="Kingdom slowed"
96
+ placeholder="Et harum quidem"
97
97
  type="text"
98
- value="Others mainly cakehole Thorin moldy facial."
98
+ value="Nam libero tempore, cum soluta."
99
99
  />
100
100
  </div>
101
101
  `;
@@ -1,3 +1,3 @@
1
1
  export const options = {
2
- types: ['text'],
2
+ types: ['text', 'password', 'date', 'number', 'datetime'],
3
3
  }
@@ -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,3 @@
1
+ export { default, Label } from './Label'
2
+ export { options } from './constants'
3
+ export { default as styles } from './Label.module.css'
@@ -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)
@@ -1,7 +1,7 @@
1
1
  .link {
2
2
  display: inline;
3
3
  max-width: max-content;
4
- border-bottom: 1px solid currentColor;
4
+ /* border-bottom: 1px solid currentColor; */
5
5
  cursor: pointer;
6
6
  }
7
7
 
@@ -12,3 +12,8 @@
12
12
  .color-tertiary {
13
13
  color: var(--color-tertiary);
14
14
  }
15
+
16
+ .link p {
17
+ font-weight: var(--font-weight-normal);
18
+ text-decoration: underline;
19
+ }
@@ -1,4 +1,4 @@
1
- import { Link, styles, options } from '.'
1
+ import { LinkItem, styles, options } from '.'
2
2
 
3
3
  import {
4
4
  getTemplate,
@@ -6,12 +6,12 @@ import {
6
6
  getOptionsArgTypes,
7
7
  } from '../../helpers/storybook'
8
8
 
9
- const Template = getTemplate(Link, styles)
10
- const ListTemplate = getListTemplate(Link, styles)
9
+ const Template = getTemplate(LinkItem, styles)
10
+ const ListTemplate = getListTemplate(LinkItem, styles)
11
11
 
12
12
  export default {
13
- title: 'Atoms/Link',
14
- component: Link,
13
+ title: 'Atoms/LinkItem',
14
+ component: LinkItem,
15
15
  args: {
16
16
  children: 'Mouths Muil',
17
17
  },
@@ -0,0 +1,3 @@
1
+ export { default, LinkItem } from './LinkItem'
2
+ export { options } from './constants'
3
+ export { default as styles } from './LinkItem.module.css'
@@ -8,7 +8,9 @@ import Icon from '../Icon'
8
8
  import Container from '../../layout/Container'
9
9
  import isEmpty from '../../utils/isEmpty'
10
10
 
11
+
11
12
  import useMedia from '../../hook/useMedia'
13
+ import Heading from '../Heading'
12
14
 
13
15
  // Sync with ./Modal.module.css#L13-L17
14
16
  const FADE_OUT_ANIMATION_TIME = 400
@@ -33,6 +35,9 @@ export const Modal = ({
33
35
  getStyles,
34
36
  type,
35
37
  isPlayground,
38
+ titleModal,
39
+ isFullWidth,
40
+ isFullWidthSoft,
36
41
  }) => {
37
42
  const isDesktop = useMedia(['(min-width: 992px)'], [true])
38
43
  const [onFadeOut, setOnFadeOut] = useState(false)
@@ -48,13 +53,14 @@ export const Modal = ({
48
53
  onClick={handleClose}
49
54
  >
50
55
  <div
51
- className={getStyles('modal', ['type'])}
56
+ className={getStyles(isFullWidth ? 'modal-full' : isFullWidthSoft ? 'modal-full-soft' : 'modal', ['type'])}
52
57
  onClick={createHandlerClick()}
53
58
  >
54
59
  <div className={getStyles('heading')}>
55
60
  {!!onClose && (
56
61
  <Icon
57
- color={isDesktop && type === 'secondary' ? 'primary' : 'inverted'}
62
+ id='btnColsedModal'
63
+ color={isDesktop && type === 'secondary' ? 'primary' : 'primary'}
58
64
  name={isDesktop ? 'cross' : 'angleLeft'}
59
65
  background={isDesktop ? 'transparent' : 'muted'}
60
66
  onClick={handleClose}
@@ -71,8 +77,19 @@ export const Modal = ({
71
77
  })}
72
78
  />
73
79
  )}
80
+ <Heading color='black' size='lg' weight='light'>
81
+ {titleModal}
82
+ </Heading>
74
83
  </div>
75
- <Container>{children}</Container>
84
+
85
+ {isFullWidth ?
86
+ <div className={getStyles('container-full')}>{children}</div>
87
+ :
88
+ isFullWidthSoft ? <div className={getStyles('container-full-soft')}>{children}</div>
89
+ :
90
+ <Container><div className={getStyles('container')}>{children}</div></Container>
91
+ }
92
+
76
93
  </div>
77
94
  </div>
78
95
  )
@@ -88,11 +105,17 @@ Modal.propTypes = {
88
105
  }),
89
106
  type: PropTypes.oneOf(options.types),
90
107
  isPlayground: PropTypes.bool,
108
+ isFullWidth: PropTypes.bool,
109
+ isFullWidthSoft: PropTypes.bool,
110
+ titleModal: PropTypes.string,
91
111
  }
92
112
 
93
113
  Modal.defaultProps = {
94
- getStyles: () => {},
114
+ getStyles: () => { },
95
115
  type: 'primary',
116
+ titleModal: 'Ejemplo titulo',
117
+ isFullWidth: false,
118
+ isFullWidthSoft: false
96
119
  }
97
120
 
98
121
  export default withStyles(styles)(Modal)