imbric-theme 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (208) 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/README.md +2 -2
  9. package/atoms/AlertModal/AlertModal.js +69 -0
  10. package/atoms/AlertModal/AlertModal.module.css +3 -0
  11. package/atoms/AlertModal/AlertModal.stories.js +30 -0
  12. package/atoms/AlertModal/constants.js +4 -0
  13. package/atoms/AlertModal/index.js +3 -0
  14. package/atoms/Button/Button.js +17 -2
  15. package/atoms/Button/Button.module.css +25 -3
  16. package/atoms/Button/Button.stories.js +1 -1
  17. package/atoms/Button/__snapshots__/Button.stories.js.snap +8 -8
  18. package/atoms/Check/Check.js +6 -4
  19. package/atoms/Checkbox/Checkbox.js +77 -0
  20. package/atoms/Checkbox/Checkbox.module.css +60 -0
  21. package/atoms/Checkbox/Checkbox.stories.js +30 -0
  22. package/atoms/Checkbox/constants.js +1 -0
  23. package/atoms/Checkbox/index.js +3 -0
  24. package/atoms/Divider/Divider.js +5 -2
  25. package/atoms/Divider/Divider.module.css +20 -0
  26. package/atoms/Divider/Divider.stories.js +13 -2
  27. package/atoms/Divider/constants.js +3 -0
  28. package/atoms/Divider/index.js +1 -0
  29. package/atoms/Heading/Heading.js +1 -1
  30. package/atoms/Heading/Heading.module.css +4 -0
  31. package/atoms/Heading/Heading.stories.js +2 -2
  32. package/atoms/Heading/__snapshots__/Heading.stories.js.snap +16 -16
  33. package/atoms/Heading/constants.js +1 -1
  34. package/atoms/Icon/Icon.js +1 -1
  35. package/atoms/Icon/Icon.module.css +30 -0
  36. package/atoms/Icon/constants.js +750 -145
  37. package/atoms/Input/Input.js +195 -15
  38. package/atoms/Input/Input.module.css +62 -6
  39. package/atoms/Input/Input.stories.js +8 -2
  40. package/atoms/Input/__snapshots__/Input.stories.js.snap +5 -5
  41. package/atoms/Input/constants.js +1 -1
  42. package/atoms/Label/Label.js +31 -0
  43. package/atoms/Label/Label.module.css +42 -0
  44. package/atoms/Label/Label.stories.js +26 -0
  45. package/atoms/Label/constants.js +1 -0
  46. package/atoms/Label/index.js +3 -0
  47. package/atoms/LinkItem/LinkItem.js +38 -0
  48. package/atoms/{Link/Link.module.css → LinkItem/LinkItem.module.css} +6 -1
  49. package/atoms/{Link/Link.stories.js → LinkItem/LinkItem.stories.js} +5 -5
  50. package/atoms/LinkItem/index.js +3 -0
  51. package/atoms/Modal/Modal.js +27 -4
  52. package/atoms/Modal/Modal.module.css +63 -6
  53. package/atoms/Paragraph/Paragraph.module.css +4 -0
  54. package/atoms/Paragraph/Paragraph.stories.js +2 -2
  55. package/atoms/Paragraph/__snapshots__/Paragraph.stories.js.snap +16 -16
  56. package/atoms/Picture/Picture.js +9 -2
  57. package/atoms/Tab/Tab.js +41 -0
  58. package/atoms/Tab/Tab.module.css +17 -0
  59. package/atoms/Tab/Tab.stories.js +27 -0
  60. package/atoms/Tab/constants.js +1 -0
  61. package/atoms/Tab/index.js +3 -0
  62. package/atoms/Textarea/Textarea.js +106 -15
  63. package/atoms/Textarea/Textarea.module.css +31 -2
  64. package/atoms/Toggle/Toggle.js +56 -0
  65. package/atoms/Toggle/Toggle.module.css +41 -0
  66. package/atoms/Toggle/Toggle.stories.js +21 -0
  67. package/atoms/Toggle/constants.js +1 -0
  68. package/atoms/Toggle/index.js +3 -0
  69. package/helpers/storybook.js +2 -2
  70. package/hook/useAddColumn.js +40 -0
  71. package/hook/useStateDate.js +25 -0
  72. package/hook/useTable.js +54 -0
  73. package/index.js +41 -1
  74. package/jest.config.js +1 -1
  75. package/layout/DynamicTable/DynamicTable.js +372 -0
  76. package/layout/DynamicTable/DynamicTable.module.css +62 -0
  77. package/layout/DynamicTable/DynamicTable.stories.js +79 -0
  78. package/layout/DynamicTable/constants.js +323 -0
  79. package/layout/DynamicTable/index.js +3 -0
  80. package/layout/FlexColumnContent/FlexColumnContent.js +26 -0
  81. package/layout/FlexColumnContent/FlexColumnContent.module.css +5 -0
  82. package/layout/FlexColumnContent/FlexColumnContent.stories.js +28 -0
  83. package/layout/FlexColumnContent/constants.js +1 -0
  84. package/layout/FlexColumnContent/index.js +3 -0
  85. package/layout/Navbar/Navbar.js +247 -0
  86. package/layout/Navbar/Navbar.module.css +35 -0
  87. package/layout/Navbar/Navbar.stories.js +20 -0
  88. package/layout/Navbar/constants.js +35 -0
  89. package/layout/Navbar/index.js +2 -0
  90. package/layout/Sidebar/Sidebar.js +115 -0
  91. package/layout/Sidebar/Sidebar.module.css +387 -0
  92. package/layout/Sidebar/Sidebar.stories.js +28 -0
  93. package/layout/Sidebar/constants.js +228 -0
  94. package/layout/Sidebar/index.js +3 -0
  95. package/molecules/Accordion/Accordion.js +11 -11
  96. package/molecules/CardDefault/CardDefault.js +65 -0
  97. package/molecules/CardDefault/CardDefault.module.css +19 -0
  98. package/molecules/CardDefault/CardDefault.stories.js +23 -0
  99. package/molecules/CardDefault/constants.js +1 -0
  100. package/molecules/CardDefault/index.js +3 -0
  101. package/molecules/CardProductTypesBooking/CardProductTypesBooking.js +89 -0
  102. package/molecules/CardProductTypesBooking/CardProductTypesBooking.module.css +118 -0
  103. package/molecules/CardProductTypesBooking/CardProductTypesBooking.stories.js +25 -0
  104. package/molecules/CardProductTypesBooking/constants.js +1 -0
  105. package/molecules/CardProductTypesBooking/index.js +3 -0
  106. package/molecules/CardServiceDetail/CardServiceDetail.js +400 -0
  107. package/molecules/CardServiceDetail/CardServiceDetail.module.css +222 -0
  108. package/molecules/CardServiceDetail/CardServiceDetail.stories.js +23 -0
  109. package/molecules/CardServiceDetail/constants.js +1 -0
  110. package/molecules/CardServiceDetail/index.js +3 -0
  111. package/molecules/CardServices/CardServices.js +461 -0
  112. package/molecules/CardServices/CardServices.module.css +213 -0
  113. package/molecules/CardServices/CardServices.stories.js +41 -0
  114. package/molecules/CardServices/constants.js +5 -0
  115. package/molecules/CardServices/index.js +3 -0
  116. package/molecules/CardServicesFinalized/CardServicesFinalized.js +381 -0
  117. package/molecules/CardServicesFinalized/CardServicesFinalized.module.css +213 -0
  118. package/molecules/CardServicesFinalized/CardServicesFinalized.stories.js +23 -0
  119. package/molecules/CardServicesFinalized/constants.js +1 -0
  120. package/molecules/CardServicesFinalized/index.js +3 -0
  121. package/molecules/CheckList/CheckList.js +135 -0
  122. package/molecules/CheckList/CheckList.module.css +94 -0
  123. package/molecules/CheckList/CheckList.stories.js +25 -0
  124. package/molecules/CheckList/constants.js +23 -0
  125. package/molecules/CheckList/index.js +3 -0
  126. package/molecules/ColumnTable/ColumnTable.js +155 -0
  127. package/molecules/ColumnTable/ColumnTable.module.css +51 -0
  128. package/molecules/ColumnTable/ColumnTable.stories.js +26 -0
  129. package/molecules/ColumnTable/constants.js +117 -0
  130. package/molecules/ColumnTable/index.js +3 -0
  131. package/molecules/DatePicker/DatePicker.js +242 -0
  132. package/molecules/DatePicker/DatePicker.module.css +38 -0
  133. package/molecules/DatePicker/DatePicker.stories.js +23 -0
  134. package/molecules/DatePicker/constants.js +3 -0
  135. package/molecules/DatePicker/index.js +3 -0
  136. package/molecules/DatePickerTime/DatePickerTime.js +133 -0
  137. package/molecules/DatePickerTime/DatePickerTime.module.css +3 -0
  138. package/molecules/DatePickerTime/DatePickerTime.stories.js +18 -0
  139. package/molecules/DatePickerTime/constants.js +1 -0
  140. package/molecules/DatePickerTime/index.js +3 -0
  141. package/molecules/Dropdown/Dropdown.js +26 -23
  142. package/molecules/Dropdown/Dropdown.module.css +21 -3
  143. package/molecules/DynamicSelect/DynamicSelect.js +186 -0
  144. package/molecules/DynamicSelect/DynamicSelect.module.css +10 -0
  145. package/molecules/DynamicSelect/DynamicSelect.stories.js +32 -0
  146. package/molecules/DynamicSelect/constants.js +7 -0
  147. package/molecules/DynamicSelect/index.js +3 -0
  148. package/molecules/Error/Error.js +2 -2
  149. package/molecules/Error/Error.module.css +3 -2
  150. package/molecules/FooterTable/FooterTable.js +166 -0
  151. package/molecules/FooterTable/FooterTable.module.css +63 -0
  152. package/molecules/FooterTable/FooterTable.stories.js +23 -0
  153. package/molecules/FooterTable/constants.js +9 -0
  154. package/molecules/FooterTable/index.js +3 -0
  155. package/molecules/InputAutocomplete/InputAutocomplete.js +221 -0
  156. package/molecules/InputAutocomplete/InputAutocomplete.module.css +55 -0
  157. package/molecules/InputAutocomplete/InputAutocomplete.stories.js +23 -0
  158. package/molecules/InputAutocomplete/constants.js +1 -0
  159. package/molecules/InputAutocomplete/index.js +3 -0
  160. package/molecules/ItemMenu/ItemMenu.js +134 -0
  161. package/molecules/ItemMenu/ItemMenu.module.css +363 -0
  162. package/molecules/ItemMenu/ItemMenu.stories.js +42 -0
  163. package/molecules/ItemMenu/constants.js +36 -0
  164. package/molecules/ItemMenu/index.js +3 -0
  165. package/molecules/RowTable/RowTable.js +928 -0
  166. package/molecules/RowTable/RowTable.module.css +63 -0
  167. package/molecules/RowTable/RowTable.stories.js +26 -0
  168. package/molecules/RowTable/constants.js +798 -0
  169. package/molecules/RowTable/index.js +3 -0
  170. package/molecules/Tabs/Tabs.js +59 -0
  171. package/molecules/Tabs/Tabs.module.css +13 -0
  172. package/molecules/Tabs/Tabs.stories.js +34 -0
  173. package/molecules/Tabs/constants.js +34 -0
  174. package/molecules/Tabs/index.js +3 -0
  175. package/package.json +34 -17
  176. package/pages/Login/Login.js +102 -0
  177. package/pages/Login/Login.module.css +5 -0
  178. package/pages/Login/Login.stories.js +23 -0
  179. package/pages/Login/constants.js +1 -0
  180. package/pages/Login/index.js +3 -0
  181. package/pages/Login/validation/loginSchema.js +5 -0
  182. package/public/favicon.ico +0 -0
  183. package/public/static/google-maps.png +0 -0
  184. package/public/static/images/folders-folder.svg +26 -0
  185. package/public/static/images/permissions.svg +14 -0
  186. package/public/static/images/reports-results.svg +18 -0
  187. package/public/static/logo.svg +19 -0
  188. package/public/static/logologin.png +0 -0
  189. package/public/static/logologin.svg +16 -0
  190. package/public/static/logologintagos.svg +19 -0
  191. package/public/static/logotipo.svg +50 -0
  192. package/public/static/logotipoS.svg +26 -0
  193. package/public/static/taxisvalencia_logod.png +0 -0
  194. package/scripts/create-component.js +2 -1
  195. package/styles/GrupoMutua.css +391 -0
  196. package/styles/default.css +391 -0
  197. package/styles/globals.css +1514 -0
  198. package/styles/radiotaxiaragon.css +391 -0
  199. package/styles/spartan.css +391 -0
  200. package/styles/tagos.css +391 -0
  201. package/styles/taxisvalencia.css +391 -0
  202. package/styles/tokens.css +2 -1
  203. package/tokens/index.js +2 -1
  204. package/.eslintcache +0 -1
  205. package/atoms/Link/Link.js +0 -33
  206. package/atoms/Link/index.js +0 -3
  207. /package/atoms/{Link → LinkItem}/__snapshots__/Link.stories.js.snap +0 -0
  208. /package/atoms/{Link → LinkItem}/constants.js +0 -0
@@ -4,7 +4,7 @@
4
4
  display: flex;
5
5
  align-items: center;
6
6
  justify-content: center;
7
- background: var(--modal-backdrop-color);
7
+ background: rgb(0 0 0 / 50%);
8
8
  inset: 0;
9
9
  }
10
10
 
@@ -24,7 +24,28 @@
24
24
  padding: 16px 32px;
25
25
  }
26
26
 
27
- :not(.is-playground) > .modal {
27
+ .modal-full {
28
+ display: flex;
29
+ width: 100%;
30
+ height: 100%;
31
+ flex-direction: column;
32
+ padding: 16px 32px;
33
+ }
34
+
35
+ .modal-full-soft {
36
+ display: flex;
37
+ width: 100%;
38
+ height: 100%;
39
+ flex-direction: column;
40
+ padding: 16px 32px;
41
+ }
42
+
43
+ :not(.is-playground)>.modal {
44
+ animation: fadeInModal 0.4s ease-in forwards;
45
+ opacity: 0;
46
+ }
47
+
48
+ :not(.is-playground)>.modal-full {
28
49
  animation: fadeInModal 0.4s ease-in forwards;
29
50
  opacity: 0;
30
51
  }
@@ -33,6 +54,10 @@
33
54
  animation: fadeOutModal 0.4s ease-in forwards;
34
55
  }
35
56
 
57
+ .backdrop.on-fade-out .modal-full {
58
+ animation: fadeOutModal 0.4s ease-in forwards;
59
+ }
60
+
36
61
  .heading {
37
62
  display: flex;
38
63
  justify-content: space-between;
@@ -45,7 +70,7 @@
45
70
  }
46
71
 
47
72
  .type-primary {
48
- background-color: var(--color-primary);
73
+ background-color: var(--color-primary-inverted);
49
74
  }
50
75
 
51
76
  .type-secondary {
@@ -54,14 +79,46 @@
54
79
 
55
80
  @media (min-width: 992px) {
56
81
  .modal {
57
- max-width: var(--modal-desktop-max-width);
58
- height: var(--modal-desktop-height);
82
+ max-width: 600px;
83
+ height: auto;
84
+ border-radius: var(--border-radius-sm);
85
+ /* max-height: 100%;
86
+ overflow: auto; */
87
+ }
88
+
89
+ .modal-full {
90
+ width: 100%;
91
+ height: 100%;
92
+ padding: 16px 32px;
93
+ }
94
+
95
+ .modal-full-soft {
96
+ width: 90%;
97
+ height: auto;
59
98
  border-radius: var(--border-radius-sm);
60
99
  }
61
100
 
62
101
  .heading {
63
102
  flex-direction: row-reverse;
64
103
  }
104
+
105
+ .container {
106
+ max-height: 700px;
107
+ overflow: auto;
108
+ min-width: 100%;
109
+ }
110
+
111
+ .container-full {
112
+ overflow: auto;
113
+ min-width: 100%;
114
+ }
115
+
116
+ .container-full-soft {
117
+ max-height: 700px;
118
+ overflow: auto;
119
+ min-width: 100%;
120
+ }
121
+
65
122
  }
66
123
 
67
124
  @keyframes fadeInModal {
@@ -82,4 +139,4 @@
82
139
  to {
83
140
  opacity: 0;
84
141
  }
85
- }
142
+ }
@@ -1,5 +1,9 @@
1
1
  .paragraph {
2
2
  width: 100%;
3
+ margin-block-start: 0em;
4
+ margin-block-end: 0em;
5
+ margin-inline-start: 0px;
6
+ margin-inline-end: 0px;
3
7
  }
4
8
 
5
9
  .color-base {
@@ -14,7 +14,7 @@ export default {
14
14
  component: Paragraph,
15
15
  args: {
16
16
  children:
17
- 'Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?',
17
+ 'But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.',
18
18
  },
19
19
  argTypes: {
20
20
  color: getOptionsArgTypes(options.colors),
@@ -36,7 +36,7 @@ export const Centered = Template.bind({})
36
36
  Centered.args = {
37
37
  isCentered: true,
38
38
  children:
39
- 'Lose consequence night studies Wolves should wizards destruction burglar? All right, then. Keep your secrets.',
39
+ 'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.',
40
40
  }
41
41
 
42
42
  export const Monospace = Template.bind({})
@@ -18,7 +18,7 @@ exports[`Storyshots Atoms/Paragraph Centered 1`] = `
18
18
  <p
19
19
  className="paragraph color-base size-md weight-normal is-centered"
20
20
  >
21
- Lose consequence night studies Wolves should wizards destruction burglar? All right, then. Keep your secrets.
21
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
22
22
  </p>
23
23
  </div>
24
24
  `;
@@ -41,27 +41,27 @@ exports[`Storyshots Atoms/Paragraph Colors 1`] = `
41
41
  <p
42
42
  className="paragraph color-base size-md weight-normal"
43
43
  >
44
- Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?
44
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
45
45
  </p>
46
46
  <p
47
47
  className="paragraph color-muted size-md weight-normal"
48
48
  >
49
- Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?
49
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
50
50
  </p>
51
51
  <p
52
52
  className="paragraph color-inverted size-md weight-normal"
53
53
  >
54
- Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?
54
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
55
55
  </p>
56
56
  <p
57
57
  className="paragraph color-primary size-md weight-normal"
58
58
  >
59
- Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?
59
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
60
60
  </p>
61
61
  <p
62
62
  className="paragraph color-tertiary size-md weight-normal"
63
63
  >
64
- Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?
64
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
65
65
  </p>
66
66
  </div>
67
67
  `;
@@ -84,7 +84,7 @@ exports[`Storyshots Atoms/Paragraph Default 1`] = `
84
84
  <p
85
85
  className="paragraph color-base size-md weight-normal"
86
86
  >
87
- Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?
87
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
88
88
  </p>
89
89
  </div>
90
90
  `;
@@ -130,7 +130,7 @@ exports[`Storyshots Atoms/Paragraph Monospace 1`] = `
130
130
  <p
131
131
  className="paragraph color-base size-md weight-normal is-monospace"
132
132
  >
133
- Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?
133
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
134
134
  </p>
135
135
  </div>
136
136
  `;
@@ -153,22 +153,22 @@ exports[`Storyshots Atoms/Paragraph Sizes 1`] = `
153
153
  <p
154
154
  className="paragraph color-base size-xs weight-normal"
155
155
  >
156
- Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?
156
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
157
157
  </p>
158
158
  <p
159
159
  className="paragraph color-base size-sm weight-normal"
160
160
  >
161
- Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?
161
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
162
162
  </p>
163
163
  <p
164
164
  className="paragraph color-base size-md weight-normal"
165
165
  >
166
- Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?
166
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
167
167
  </p>
168
168
  <p
169
169
  className="paragraph color-base size-lg weight-normal"
170
170
  >
171
- Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?
171
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
172
172
  </p>
173
173
  </div>
174
174
  `;
@@ -191,7 +191,7 @@ exports[`Storyshots Atoms/Paragraph Striked 1`] = `
191
191
  <p
192
192
  className="paragraph color-base size-md weight-normal is-striked"
193
193
  >
194
- Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?
194
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
195
195
  </p>
196
196
  </div>
197
197
  `;
@@ -214,17 +214,17 @@ exports[`Storyshots Atoms/Paragraph Weights 1`] = `
214
214
  <p
215
215
  className="paragraph color-base size-md weight-normal"
216
216
  >
217
- Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?
217
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
218
218
  </p>
219
219
  <p
220
220
  className="paragraph color-base size-md weight-medium"
221
221
  >
222
- Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?
222
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
223
223
  </p>
224
224
  <p
225
225
  className="paragraph color-base size-md weight-semibold"
226
226
  >
227
- Swords are no more use here. Esquire days mountain Fangorn champion brace waiting laboring preparing! Canopy plunder deceit cakehole strange Udùn piled fighters potent?
227
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.
228
228
  </p>
229
229
  </div>
230
230
  `;
@@ -1,5 +1,6 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
+ import Link from 'next/link'
3
4
 
4
5
  import styles from './Picture.module.css'
5
6
  import withStyles from '../../hocs/withStyles'
@@ -11,6 +12,7 @@ export const Picture = ({
11
12
  height,
12
13
  isRounded,
13
14
  withBorder,
15
+ isHref,
14
16
  }) => (
15
17
  <picture
16
18
  className={getStyles('picture', {
@@ -18,7 +20,10 @@ export const Picture = ({
18
20
  'with-border': withBorder,
19
21
  })}
20
22
  >
21
- <img src={src} style={{ height, maxWidth: width }} />
23
+ <Link href={isHref} passHref>
24
+ <img src={src} style={{ height, maxWidth: width }} />
25
+ </Link>
26
+
22
27
  </picture>
23
28
  )
24
29
 
@@ -29,12 +34,14 @@ Picture.propTypes = {
29
34
  height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
30
35
  isRounded: PropTypes.bool,
31
36
  withBorder: PropTypes.bool,
37
+ isHref: PropTypes.any
32
38
  }
33
39
 
34
40
  Picture.defaultProps = {
35
41
  height: 'auto',
36
42
  withBorder: false,
37
- getStyles: () => {},
43
+ getStyles: () => { },
44
+ isHref: ''
38
45
  }
39
46
 
40
47
  export default withStyles(styles)(Picture)
@@ -0,0 +1,41 @@
1
+ import React from 'react'
2
+ import PropTypes from 'prop-types'
3
+
4
+ import styles from './Tab.module.css'
5
+ import { options } from './constants'
6
+ import withStyles from '../../hocs/withStyles'
7
+
8
+ export const handleClick = ({ onClick }) => (event) => {
9
+ onClick(event)
10
+ }
11
+
12
+ export const Tab = ({ getStyles, children, activeTab, viewTab, onClick }) => {
13
+
14
+ if (viewTab) {
15
+ return (
16
+ <>
17
+ <li className={getStyles('tab', { 'active': activeTab })} onClick={onClick && handleClick({ onClick })}>
18
+ {children}
19
+ </li>
20
+ </>
21
+ )
22
+
23
+ } else {
24
+ null
25
+ }
26
+ }
27
+
28
+ Tab.propTypes = {
29
+ getStyles: PropTypes.func.isRequired,
30
+ children: PropTypes.node.isRequired,
31
+ activeTab: PropTypes.bool.isRequired,
32
+ viewTab: PropTypes.bool.isRequired,
33
+ onClick: PropTypes.func.isRequired,
34
+ }
35
+
36
+ Tab.defaultProps = {
37
+ getStyles: () => { },
38
+ onClick: () => { },
39
+ }
40
+
41
+ export default withStyles(styles)(Tab)
@@ -0,0 +1,17 @@
1
+ .tab {
2
+ display: flex;
3
+ font-size: var(--font-size-base);
4
+ cursor: pointer;
5
+ color: var(--color-font-highlight);
6
+ padding: 1.1em 1.5em;
7
+ }
8
+
9
+ .tab:hover {
10
+ color: var(--color-primary);
11
+ border-bottom: 2px solid var(--color-primary);
12
+ }
13
+
14
+ .tab.active {
15
+ color: var(--color-primary);
16
+ border-bottom: 2px solid var(--color-primary);
17
+ }
@@ -0,0 +1,27 @@
1
+ import { Tab, styles, options } from '.'
2
+
3
+ import {
4
+ getTemplate,
5
+ getListTemplate,
6
+ getOptionsArgTypes,
7
+ } from '../../helpers/storybook'
8
+
9
+ const Template = getTemplate(Tab, styles)
10
+ const ListTemplate = getListTemplate(Tab, styles)
11
+
12
+ export default {
13
+ title: 'Atoms/Tab',
14
+ component: Tab,
15
+ args: {
16
+ children: 'Taksee',
17
+ activeTab: false,
18
+ viewTab: true,
19
+ },
20
+ argTypes: {
21
+ // types: getOptionsArgTypes(options.types),
22
+ },
23
+ }
24
+
25
+ export const Default = Template.bind({})
26
+ // export const List = ListTemplate.bind({})
27
+ // List.args = { items: options.types.map((type) => ({ type })) }
@@ -0,0 +1 @@
1
+ export const options = { types: [] }
@@ -0,0 +1,3 @@
1
+ export { default, Tab } from './Tab'
2
+ export { options } from './constants'
3
+ export { default as styles } from './Tab.module.css'
@@ -1,14 +1,12 @@
1
- import React from 'react'
1
+ import React, { useState } from 'react'
2
2
  import PropTypes from 'prop-types'
3
-
3
+ import ReactTooltip from 'react-tooltip'
4
4
  import styles from './Textarea.module.css'
5
5
  import withStyles from '../../hocs/withStyles'
6
6
 
7
7
  const DEFAULT_TEXTAREA_ROWS = 5
8
8
 
9
- const handleChange = ({ onChange }) => () => {
10
- onChange()
11
- }
9
+ import Icon from '../../atoms/Icon'
12
10
 
13
11
  export const Textarea = ({
14
12
  children,
@@ -16,16 +14,99 @@ export const Textarea = ({
16
14
  placeholder,
17
15
  onChange,
18
16
  getStyles,
17
+ value,
18
+ id,
19
+ disabled,
20
+ viewBoxCopyCode,
21
+ txtBtnCopyCode,
22
+ txtTootipCopyCode,
19
23
  }) => {
24
+
25
+
26
+ // STATE TOOLTIP
27
+ const [isToolTipMounted, setIsToolTipMounted] = useState(false)
28
+
29
+ // TOOLTIP
30
+ const handleMouseEnter = () => {
31
+ setIsToolTipMounted(true)
32
+ }
33
+ const handleMouseLeave = () => {
34
+ setIsToolTipMounted(false)
35
+ }
36
+
37
+ const handleClick = async () => {
38
+
39
+ // // Select the text field
40
+ // txtTootipCopyCode.select()
41
+ // txtTootipCopyCode.setSelectionRange(0, 99999) // For mobile devices
42
+
43
+ // // Copy the text inside the text field
44
+ // navigator.clipboard.writeText(txtTootipCopyCode.value)
45
+
46
+ // // Alert the copied text
47
+ // alert("Copied the text: " + txtTootipCopyCode.value)
48
+
49
+
50
+
51
+
52
+ try {
53
+ await navigator.clipboard.writeText(txtTootipCopyCode);
54
+ console.log('Content copied to clipboard');
55
+ /* Resolved - text copied to clipboard successfully */
56
+ } catch (err) {
57
+ console.error('Failed to copy: ', err);
58
+ /* Rejected - text failed to copy to the clipboard */
59
+ }
60
+
61
+
62
+
63
+
64
+ }
65
+
20
66
  return (
21
- <textarea
22
- className={getStyles('textarea')}
23
- rows={rows}
24
- placeholder={placeholder}
25
- onChange={handleChange({ onChange })}
26
- >
27
- {children}
28
- </textarea>
67
+ <>
68
+ {viewBoxCopyCode ?
69
+ <>
70
+ <span
71
+ data-tip
72
+ data-for='tooltipCopyCode'
73
+ onMouseEnter={handleMouseEnter}
74
+ onMouseLeave={handleMouseLeave}
75
+ style={{ width: 'max-content', display: 'block' }}
76
+ >
77
+ <>
78
+ <div className={getStyles('boxCopyCode')}>
79
+ <Icon
80
+ name="infoExampleCode"
81
+ />
82
+ <div className={getStyles('btnCopyCode')} onClick={handleClick}>
83
+ {txtBtnCopyCode}
84
+ </div>
85
+ </div>
86
+ </>
87
+ </span>
88
+
89
+ {isToolTipMounted ? (
90
+ <ReactTooltip id='tooltipCopyCode' type='error'>
91
+ <span>{txtTootipCopyCode}</span>
92
+ </ReactTooltip>
93
+ ) : null}
94
+
95
+ </>
96
+
97
+ : null}
98
+ <textarea
99
+ id={id}
100
+ className={getStyles('textarea')}
101
+ rows={rows}
102
+ placeholder={placeholder}
103
+ onChange={onChange}
104
+ value={value}
105
+ disabled={disabled}
106
+ >
107
+ {children}
108
+ </textarea>
109
+ </>
29
110
  )
30
111
  }
31
112
 
@@ -35,12 +116,22 @@ Textarea.propTypes = {
35
116
  onChange: PropTypes.func.isRequired,
36
117
  rows: PropTypes.number,
37
118
  placeholder: PropTypes.string,
119
+ value: PropTypes.string,
120
+ id: PropTypes.string.isRequired,
121
+ viewBoxCopyCode: PropTypes.bool,
122
+ txtBtnCopyCode: PropTypes.string,
123
+ txtTootipCopyCode: PropTypes.string,
38
124
  }
39
125
 
40
126
  Textarea.defaultProps = {
41
- getStyles: () => {},
42
- onChange: () => {},
127
+ getStyles: () => { },
128
+ onChange: () => { },
43
129
  rows: DEFAULT_TEXTAREA_ROWS,
130
+ id: '',
131
+ disabled: false,
132
+ viewBoxCopyCode: false,
133
+ txtBtnCopyCode: 'COPIAR',
134
+ txtTootipCopyCode: 'yeeeee'
44
135
  }
45
136
 
46
137
  export default withStyles(styles)(Textarea)
@@ -1,7 +1,7 @@
1
1
  .textarea {
2
2
  display: flex;
3
3
  width: 100%;
4
- min-height: 100px;
4
+ /* min-height: 100px; */
5
5
  padding: 20px;
6
6
  border: var(--border-width-thin) solid var(--color-cool-gray-200);
7
7
  background: var(--input-background);
@@ -9,7 +9,7 @@
9
9
  box-shadow: var(--box-shadow-sm);
10
10
  color: var(--color-font-base);
11
11
  font-family: var(--font-family-sans);
12
- font-size: var(--input-font-size);
12
+ font-size: var(--paragraph-font-size-xs);
13
13
  font-weight: var(--font-weight-medium);
14
14
  line-height: var(--line-height-tight);
15
15
  resize: vertical;
@@ -23,3 +23,32 @@
23
23
  box-shadow: 0 0 0 1px var(--color-primary), 0 0 10px 0 var(--color-primary);
24
24
  outline: none;
25
25
  }
26
+
27
+ .textarea:disabled {
28
+ background-color: hsl(0, 0%, 95%);
29
+ border-color: hsl(0, 0%, 90%);
30
+ }
31
+
32
+ .boxCopyCode {
33
+ display: flex;
34
+ align-items: center;
35
+ cursor: pointer;
36
+ /* margin-top: -44px; */
37
+ /* position: absolute; */
38
+ /* top: 108px;
39
+ right: 24px; */
40
+ }
41
+
42
+ .btnCopyCode {
43
+ font-size: 10px;
44
+ border: 1px solid var(--color-font-base);
45
+ padding: 3px;
46
+ border-radius: 3px;
47
+ color: var(--color-font-base);
48
+ }
49
+
50
+ .btnCopyCode:hover {
51
+ border: 1px solid var(--color-font-base);
52
+ color: #fff;
53
+ background-color: var(--color-font-base);
54
+ }
@@ -0,0 +1,56 @@
1
+ import React, { useState } from 'react'
2
+ import PropTypes from 'prop-types'
3
+
4
+ import styles from './Toggle.module.css'
5
+ import withStyles from '../../hocs/withStyles'
6
+
7
+ export const Toggle = ({ getStyles, onChangeCheckbox, disabled, id, checked, name }) => {
8
+
9
+ // const [isChecked, setIsChecked] = useState(false);
10
+
11
+ // const handleOnChange = () => {
12
+ // setIsChecked(!isChecked)
13
+ // };
14
+
15
+
16
+ return <div className={getStyles('toggle')}>
17
+
18
+ <input
19
+ type="checkbox"
20
+ id={id}
21
+ name={name}
22
+ disabled={disabled}
23
+ // checked={isChecked || checked}
24
+ checked={checked}
25
+ onChange={(e) => {
26
+ // handleOnChange()
27
+ onChangeCheckbox(e)
28
+ }}
29
+ className={getStyles('toggle-item')}
30
+ />
31
+ <label htmlFor={id} className={getStyles('checkbox-custom-label')}></label>
32
+
33
+
34
+ </div>
35
+ }
36
+
37
+ Toggle.propTypes = {
38
+ getStyles: PropTypes.func.isRequired,
39
+ onChangeCheckbox: PropTypes.func.isRequired,
40
+ id: PropTypes.string.isRequired,
41
+ name: PropTypes.string.isRequired,
42
+ checked: PropTypes.bool.isRequired,
43
+ disabled: PropTypes.bool,
44
+ }
45
+
46
+ Toggle.defaultProps = {
47
+ getStyles: () => { },
48
+ onChangeCheckbox: () => { },
49
+ id: 'toggle',
50
+ name: 'toggle',
51
+ checked: false,
52
+ disabled: false,
53
+ }
54
+
55
+
56
+ export default withStyles(styles)(Toggle)