@coorpacademy/components 10.1.2 → 10.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/es/atom/button-link/index.js +106 -0
  2. package/es/atom/button-link/index.js.map +1 -0
  3. package/es/atom/button-link/style.css +97 -0
  4. package/es/atom/button-link/test/fixtures/button-dangerous-no-icon.js +10 -0
  5. package/es/atom/button-link/test/fixtures/button-dangerous-no-icon.js.map +1 -0
  6. package/es/atom/button-link/test/fixtures/button-primary-icon-left.js +14 -0
  7. package/es/atom/button-link/test/fixtures/button-primary-icon-left.js.map +1 -0
  8. package/es/atom/button-link/test/fixtures/button-primary-no-icon.js +10 -0
  9. package/es/atom/button-link/test/fixtures/button-primary-no-icon.js.map +1 -0
  10. package/es/atom/button-link/test/fixtures/button-secondary-no-icon-disabled.js +11 -0
  11. package/es/atom/button-link/test/fixtures/button-secondary-no-icon-disabled.js.map +1 -0
  12. package/es/atom/button-link/test/fixtures/button-tertiary-icon-left.js +14 -0
  13. package/es/atom/button-link/test/fixtures/button-tertiary-icon-left.js.map +1 -0
  14. package/es/atom/button-link/test/fixtures/icon-button.js +13 -0
  15. package/es/atom/button-link/test/fixtures/icon-button.js.map +1 -0
  16. package/es/atom/button-link/test/fixtures/link-primary-disabled-icon-right.js +17 -0
  17. package/es/atom/button-link/test/fixtures/link-primary-disabled-icon-right.js.map +1 -0
  18. package/es/atom/button-link/test/fixtures/link-secondary-icon-right.js +20 -0
  19. package/es/atom/button-link/test/fixtures/link-secondary-icon-right.js.map +1 -0
  20. package/es/atom/button-link/test/fixtures/link-tertiary-no-icon.js +16 -0
  21. package/es/atom/button-link/test/fixtures/link-tertiary-no-icon.js.map +1 -0
  22. package/es/atom/button-link/test/fixtures/link-text-icon-right-target-blank.js +17 -0
  23. package/es/atom/button-link/test/fixtures/link-text-icon-right-target-blank.js.map +1 -0
  24. package/es/atom/button-link/test/fixtures/link-text-no-icon-download.js +13 -0
  25. package/es/atom/button-link/test/fixtures/link-text-no-icon-download.js.map +1 -0
  26. package/es/atom/input-checkbox/test/fixtures.js +2 -0
  27. package/es/atom/input-checkbox/test/fixtures.js.map +1 -1
  28. package/es/atom/input-search/index.js +65 -0
  29. package/es/atom/input-search/index.js.map +1 -0
  30. package/es/atom/input-search/style.css +201 -0
  31. package/es/{molecule/search → atom/input-search}/test/change.js +0 -0
  32. package/es/atom/input-search/test/change.js.map +1 -0
  33. package/es/atom/input-search/test/fixtures/coorpmanager-with-value.js +14 -0
  34. package/es/atom/input-search/test/fixtures/coorpmanager-with-value.js.map +1 -0
  35. package/es/atom/input-search/test/fixtures/coorpmanager.js +13 -0
  36. package/es/atom/input-search/test/fixtures/coorpmanager.js.map +1 -0
  37. package/es/{molecule/search → atom/input-search}/test/fixtures/default.js +0 -0
  38. package/es/atom/input-search/test/fixtures/default.js.map +1 -0
  39. package/es/{molecule/search → atom/input-search}/test/fixtures/with-value.js +0 -0
  40. package/es/atom/input-search/test/fixtures/with-value.js.map +1 -0
  41. package/es/atom/tag/index.js +27 -0
  42. package/es/atom/tag/index.js.map +1 -0
  43. package/es/atom/tag/style.css +38 -0
  44. package/es/atom/tag/test/fixtures/archived.js +7 -0
  45. package/es/atom/tag/test/fixtures/archived.js.map +1 -0
  46. package/es/atom/tag/test/fixtures/default.js +7 -0
  47. package/es/atom/tag/test/fixtures/default.js.map +1 -0
  48. package/es/atom/tag/test/fixtures/published.js +7 -0
  49. package/es/atom/tag/test/fixtures/published.js.map +1 -0
  50. package/es/atom/tag/test/fixtures/revision.js +7 -0
  51. package/es/atom/tag/test/fixtures/revision.js.map +1 -0
  52. package/es/atom/title/test/fixtures.js +6 -2
  53. package/es/atom/title/test/fixtures.js.map +1 -1
  54. package/es/molecule/banner/style.css +3 -3
  55. package/es/molecule/cm-popin/index.js +21 -15
  56. package/es/molecule/cm-popin/index.js.map +1 -1
  57. package/es/molecule/cm-popin/style.css +2 -44
  58. package/es/molecule/cm-popin/test/fixtures/dangerous.js +3 -0
  59. package/es/molecule/cm-popin/test/fixtures/dangerous.js.map +1 -1
  60. package/es/molecule/cm-popin/test/fixtures/default.js +6 -3
  61. package/es/molecule/cm-popin/test/fixtures/default.js.map +1 -1
  62. package/es/molecule/cm-popin/test/fixtures/warning-with-close.js +4 -1
  63. package/es/molecule/cm-popin/test/fixtures/warning-with-close.js.map +1 -1
  64. package/es/molecule/coorp-manager-roles/test/fixtures.js +13 -0
  65. package/es/molecule/coorp-manager-roles/test/fixtures.js.map +1 -0
  66. package/es/molecule/feedback/test/fixtures.js +2 -0
  67. package/es/molecule/feedback/test/fixtures.js.map +1 -1
  68. package/es/molecule/quick-access-card/test/fixtures.js +21 -0
  69. package/es/molecule/quick-access-card/test/fixtures.js.map +1 -0
  70. package/es/molecule/quick-access-cards-group/test/fixtures.js +21 -0
  71. package/es/molecule/quick-access-cards-group/test/fixtures.js.map +1 -0
  72. package/es/molecule/search-form/index.js +1 -1
  73. package/es/molecule/search-form/index.js.map +1 -1
  74. package/es/molecule/wizard-summary/index.js +18 -10
  75. package/es/molecule/wizard-summary/index.js.map +1 -1
  76. package/es/molecule/wizard-summary/style.css +4 -21
  77. package/es/molecule/wizard-summary/test/fixtures/default.js +2 -1
  78. package/es/molecule/wizard-summary/test/fixtures/default.js.map +1 -1
  79. package/es/molecule/wizard-summary/test/fixtures/one-section.js +2 -1
  80. package/es/molecule/wizard-summary/test/fixtures/one-section.js.map +1 -1
  81. package/es/molecule/wizard-summary/test/fixtures/tablet-closed.js +2 -1
  82. package/es/molecule/wizard-summary/test/fixtures/tablet-closed.js.map +1 -1
  83. package/es/molecule/wizard-summary/test/fixtures/three-sections.js +2 -1
  84. package/es/molecule/wizard-summary/test/fixtures/three-sections.js.map +1 -1
  85. package/es/molecule/wizard-summary/test/fixtures/two-sections.js +2 -1
  86. package/es/molecule/wizard-summary/test/fixtures/two-sections.js.map +1 -1
  87. package/es/organism/accordion/coorp-manager/part/test/fixtures.js +4 -0
  88. package/es/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -1
  89. package/es/organism/brand-dashboard/test/fixtures.js +2 -0
  90. package/es/organism/brand-dashboard/test/fixtures.js.map +1 -1
  91. package/es/organism/brand-table/index.js +1 -1
  92. package/es/organism/brand-table/index.js.map +1 -1
  93. package/es/organism/mooc-header/index.js +1 -1
  94. package/es/organism/mooc-header/index.js.map +1 -1
  95. package/es/organism/mooc-header/test/fixtures/default.js +1 -1
  96. package/es/organism/mooc-header/test/fixtures/default.js.map +1 -1
  97. package/es/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js +1 -1
  98. package/es/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js.map +1 -1
  99. package/es/template/app-player/popin-end/test/fixtures.js +2 -0
  100. package/es/template/app-player/popin-end/test/fixtures.js.map +1 -1
  101. package/es/template/back-office/brand-list/index.js +6 -2
  102. package/es/template/back-office/brand-list/index.js.map +1 -1
  103. package/es/template/back-office/brand-list/style.css +1 -0
  104. package/es/template/back-office/brand-update/test/fixtures.js +2 -2
  105. package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
  106. package/es/variables/colors.css +0 -2
  107. package/lib/atom/button-link/index.js +123 -0
  108. package/lib/atom/button-link/index.js.map +1 -0
  109. package/lib/atom/button-link/style.css +97 -0
  110. package/lib/atom/button-link/test/fixtures/button-dangerous-no-icon.js +15 -0
  111. package/lib/atom/button-link/test/fixtures/button-dangerous-no-icon.js.map +1 -0
  112. package/lib/atom/button-link/test/fixtures/button-primary-icon-left.js +19 -0
  113. package/lib/atom/button-link/test/fixtures/button-primary-icon-left.js.map +1 -0
  114. package/lib/atom/button-link/test/fixtures/button-primary-no-icon.js +15 -0
  115. package/lib/atom/button-link/test/fixtures/button-primary-no-icon.js.map +1 -0
  116. package/lib/atom/button-link/test/fixtures/button-secondary-no-icon-disabled.js +16 -0
  117. package/lib/atom/button-link/test/fixtures/button-secondary-no-icon-disabled.js.map +1 -0
  118. package/lib/atom/button-link/test/fixtures/button-tertiary-icon-left.js +19 -0
  119. package/lib/atom/button-link/test/fixtures/button-tertiary-icon-left.js.map +1 -0
  120. package/lib/atom/button-link/test/fixtures/icon-button.js +18 -0
  121. package/lib/atom/button-link/test/fixtures/icon-button.js.map +1 -0
  122. package/lib/atom/button-link/test/fixtures/link-primary-disabled-icon-right.js +22 -0
  123. package/lib/atom/button-link/test/fixtures/link-primary-disabled-icon-right.js.map +1 -0
  124. package/lib/atom/button-link/test/fixtures/link-secondary-icon-right.js +25 -0
  125. package/lib/atom/button-link/test/fixtures/link-secondary-icon-right.js.map +1 -0
  126. package/lib/atom/button-link/test/fixtures/link-tertiary-no-icon.js +21 -0
  127. package/lib/atom/button-link/test/fixtures/link-tertiary-no-icon.js.map +1 -0
  128. package/lib/atom/button-link/test/fixtures/link-text-icon-right-target-blank.js +22 -0
  129. package/lib/atom/button-link/test/fixtures/link-text-icon-right-target-blank.js.map +1 -0
  130. package/lib/atom/button-link/test/fixtures/link-text-no-icon-download.js +18 -0
  131. package/lib/atom/button-link/test/fixtures/link-text-no-icon-download.js.map +1 -0
  132. package/lib/atom/input-checkbox/test/fixtures.js +3 -0
  133. package/lib/atom/input-checkbox/test/fixtures.js.map +1 -1
  134. package/lib/{molecule/search → atom/input-search}/index.js +29 -18
  135. package/lib/atom/input-search/index.js.map +1 -0
  136. package/lib/atom/input-search/style.css +201 -0
  137. package/lib/{molecule/search → atom/input-search}/test/change.js +0 -0
  138. package/lib/atom/input-search/test/change.js.map +1 -0
  139. package/lib/atom/input-search/test/fixtures/coorpmanager-with-value.js +19 -0
  140. package/lib/atom/input-search/test/fixtures/coorpmanager-with-value.js.map +1 -0
  141. package/lib/atom/input-search/test/fixtures/coorpmanager.js +18 -0
  142. package/lib/atom/input-search/test/fixtures/coorpmanager.js.map +1 -0
  143. package/lib/{molecule/search → atom/input-search}/test/fixtures/default.js +0 -0
  144. package/lib/atom/input-search/test/fixtures/default.js.map +1 -0
  145. package/lib/{molecule/search → atom/input-search}/test/fixtures/with-value.js +0 -0
  146. package/lib/atom/input-search/test/fixtures/with-value.js.map +1 -0
  147. package/lib/atom/tag/index.js +39 -0
  148. package/lib/atom/tag/index.js.map +1 -0
  149. package/lib/atom/tag/style.css +38 -0
  150. package/lib/atom/tag/test/fixtures/archived.js +12 -0
  151. package/lib/atom/tag/test/fixtures/archived.js.map +1 -0
  152. package/lib/atom/tag/test/fixtures/default.js +12 -0
  153. package/lib/atom/tag/test/fixtures/default.js.map +1 -0
  154. package/lib/atom/tag/test/fixtures/published.js +12 -0
  155. package/lib/atom/tag/test/fixtures/published.js.map +1 -0
  156. package/lib/atom/tag/test/fixtures/revision.js +12 -0
  157. package/lib/atom/tag/test/fixtures/revision.js.map +1 -0
  158. package/lib/atom/title/test/fixtures.js +8 -2
  159. package/lib/atom/title/test/fixtures.js.map +1 -1
  160. package/lib/molecule/banner/style.css +3 -3
  161. package/lib/molecule/cm-popin/index.js +21 -16
  162. package/lib/molecule/cm-popin/index.js.map +1 -1
  163. package/lib/molecule/cm-popin/style.css +2 -44
  164. package/lib/molecule/cm-popin/test/fixtures/dangerous.js +3 -0
  165. package/lib/molecule/cm-popin/test/fixtures/dangerous.js.map +1 -1
  166. package/lib/molecule/cm-popin/test/fixtures/default.js +6 -3
  167. package/lib/molecule/cm-popin/test/fixtures/default.js.map +1 -1
  168. package/lib/molecule/cm-popin/test/fixtures/warning-with-close.js +4 -1
  169. package/lib/molecule/cm-popin/test/fixtures/warning-with-close.js.map +1 -1
  170. package/lib/molecule/coorp-manager-roles/test/fixtures.js +22 -0
  171. package/lib/molecule/coorp-manager-roles/test/fixtures.js.map +1 -0
  172. package/lib/molecule/feedback/test/fixtures.js +3 -0
  173. package/lib/molecule/feedback/test/fixtures.js.map +1 -1
  174. package/lib/molecule/quick-access-card/test/fixtures.js +34 -0
  175. package/lib/molecule/quick-access-card/test/fixtures.js.map +1 -0
  176. package/lib/molecule/quick-access-cards-group/test/fixtures.js +34 -0
  177. package/lib/molecule/quick-access-cards-group/test/fixtures.js.map +1 -0
  178. package/lib/molecule/search-form/index.js +3 -3
  179. package/lib/molecule/search-form/index.js.map +1 -1
  180. package/lib/molecule/wizard-summary/index.js +18 -10
  181. package/lib/molecule/wizard-summary/index.js.map +1 -1
  182. package/lib/molecule/wizard-summary/style.css +4 -21
  183. package/lib/molecule/wizard-summary/test/fixtures/default.js +2 -1
  184. package/lib/molecule/wizard-summary/test/fixtures/default.js.map +1 -1
  185. package/lib/molecule/wizard-summary/test/fixtures/one-section.js +2 -1
  186. package/lib/molecule/wizard-summary/test/fixtures/one-section.js.map +1 -1
  187. package/lib/molecule/wizard-summary/test/fixtures/tablet-closed.js +2 -1
  188. package/lib/molecule/wizard-summary/test/fixtures/tablet-closed.js.map +1 -1
  189. package/lib/molecule/wizard-summary/test/fixtures/three-sections.js +2 -1
  190. package/lib/molecule/wizard-summary/test/fixtures/three-sections.js.map +1 -1
  191. package/lib/molecule/wizard-summary/test/fixtures/two-sections.js +2 -1
  192. package/lib/molecule/wizard-summary/test/fixtures/two-sections.js.map +1 -1
  193. package/lib/organism/accordion/coorp-manager/part/test/fixtures.js +6 -0
  194. package/lib/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -1
  195. package/lib/organism/brand-dashboard/test/fixtures.js +3 -0
  196. package/lib/organism/brand-dashboard/test/fixtures.js.map +1 -1
  197. package/lib/organism/brand-table/index.js +3 -3
  198. package/lib/organism/brand-table/index.js.map +1 -1
  199. package/lib/organism/mooc-header/index.js +2 -2
  200. package/lib/organism/mooc-header/index.js.map +1 -1
  201. package/lib/organism/mooc-header/test/fixtures/default.js +1 -1
  202. package/lib/organism/mooc-header/test/fixtures/default.js.map +1 -1
  203. package/lib/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js +1 -1
  204. package/lib/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js.map +1 -1
  205. package/lib/template/app-player/popin-end/test/fixtures.js +3 -0
  206. package/lib/template/app-player/popin-end/test/fixtures.js.map +1 -1
  207. package/lib/template/back-office/brand-list/index.js +7 -3
  208. package/lib/template/back-office/brand-list/index.js.map +1 -1
  209. package/lib/template/back-office/brand-list/style.css +1 -0
  210. package/lib/template/back-office/brand-update/test/fixtures.js +3 -3
  211. package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
  212. package/lib/variables/colors.css +0 -2
  213. package/package.json +3 -3
  214. package/es/atom/bullet-point-menu-button/test/fixtures.js +0 -27
  215. package/es/atom/bullet-point-menu-button/test/fixtures.js.map +0 -1
  216. package/es/molecule/search/index.js +0 -57
  217. package/es/molecule/search/index.js.map +0 -1
  218. package/es/molecule/search/style.css +0 -86
  219. package/es/molecule/search/test/change.js.map +0 -1
  220. package/es/molecule/search/test/fixtures/default.js.map +0 -1
  221. package/es/molecule/search/test/fixtures/with-value.js.map +0 -1
  222. package/lib/atom/bullet-point-menu-button/test/fixtures.js +0 -43
  223. package/lib/atom/bullet-point-menu-button/test/fixtures.js.map +0 -1
  224. package/lib/molecule/search/index.js.map +0 -1
  225. package/lib/molecule/search/style.css +0 -86
  226. package/lib/molecule/search/test/change.js.map +0 -1
  227. package/lib/molecule/search/test/fixtures/default.js.map +0 -1
  228. package/lib/molecule/search/test/fixtures/with-value.js.map +0 -1
@@ -0,0 +1,201 @@
1
+ @value breakpoints: "../../variables/breakpoints.css";
2
+ @value tablet from breakpoints;
3
+ @value mobile from breakpoints;
4
+ @value colors: "../../variables/colors.css";
5
+ @value medium from colors;
6
+ @value light from colors;
7
+ @value white from colors;
8
+ @value dark from colors;
9
+ @value black from colors;
10
+ @value cm_grey_100 from colors;
11
+ @value cm_grey_150 from colors;
12
+ @value cm_grey_400 from colors;
13
+ @value cm_grey_500 from colors;
14
+ @value cm_grey_700 from colors;
15
+
16
+ .wrapperSearch {
17
+ display: flex;
18
+ width: 100%;
19
+ flex-flow: nowrap;
20
+ flex-direction: row;
21
+ align-items: center;
22
+ overflow: hidden;
23
+ }
24
+
25
+ .searchIcon {
26
+ color: dark;
27
+ position: relative;
28
+ margin: 0 0 -3px -20px;
29
+ width: 19px;
30
+ height: 19px;
31
+ left: 35px;
32
+ }
33
+
34
+ .search {
35
+ font-family: "Open Sans";
36
+ text-transform: none;
37
+ margin: 0 3px;
38
+ padding: 0 15px 0 45px;
39
+ border: 0;
40
+ height: 50px;
41
+ border-radius: 0;
42
+ font-size: 14px;
43
+ color: dark;
44
+ width: 100%;
45
+ outline: none;
46
+ font-weight: bold;
47
+ white-space: nowrap;
48
+ overflow: hidden;
49
+ text-overflow: ellipsis;
50
+ }
51
+
52
+ .search::placeholder {
53
+ color: medium;
54
+ font-size: 14px;
55
+ }
56
+
57
+ .search:focus {
58
+ outline: none;
59
+ }
60
+
61
+ .search:-webkit-autofill {
62
+ background-color: white;
63
+ background-image: none;
64
+ color: medium;
65
+ }
66
+
67
+ .search::placeholder {
68
+ color: medium;
69
+ font-size: 14px;
70
+ }
71
+
72
+ .coorpmanager {
73
+ position: relative;
74
+ }
75
+
76
+ .coorpmanager label {
77
+ display: flex;
78
+ flex-direction: column;
79
+ align-items: flex-start;
80
+ position: absolute;
81
+ height: 64px;
82
+ }
83
+
84
+ .coorpmanager .title {
85
+ flex-grow: 0;
86
+ font-family: Gilroy;
87
+ font-size: 10px;
88
+ font-weight: bold;
89
+ font-stretch: normal;
90
+ font-style: normal;
91
+ letter-spacing: normal;
92
+ text-align: left;
93
+ z-index: 1;
94
+ color: cm_grey_400;
95
+ width: max-content;
96
+ transition: all 0.25s ease;
97
+ pointer-events: none;
98
+ display: flex;
99
+ flex-direction: row;
100
+ flex-wrap: nowrap;
101
+ position: absolute;
102
+ top: 7px;
103
+ left: 30px;
104
+ }
105
+
106
+ .coorpmanager .search {
107
+ height: 44px;
108
+ margin: 0;
109
+ flex-grow: 0;
110
+ display: flex;
111
+ box-sizing: border-box;
112
+ flex-direction: column;
113
+ justify-content: center;
114
+ align-items: flex-start;
115
+ padding: 19px 30px 5px 30px;
116
+ border-radius: 7px;
117
+ background-color: cm_grey_100;
118
+ font-family: Gilroy;
119
+ font-size: 14px;
120
+ font-weight: 500;
121
+ font-stretch: normal;
122
+ font-style: normal;
123
+ line-height: 44px;
124
+ letter-spacing: normal;
125
+ text-align: left;
126
+ color: cm_grey_700;
127
+ border: none;
128
+ transition: all 0.25s ease;
129
+ outline: none;
130
+ }
131
+
132
+ .coorpmanager .title.noValue {
133
+ font-size: 14px;
134
+ font-weight: 500;
135
+ color: cm_grey_400;
136
+ top: 14px;
137
+ }
138
+
139
+ .coorpmanager:focus-within .title.noValue {
140
+ font-size: 10px;
141
+ font-weight: bold;
142
+ color: cm_grey_400;
143
+ top: 7px;
144
+ }
145
+
146
+ .coorpmanager:focus-within .title.noValue {
147
+ width: max-content;
148
+ height: 8px;
149
+ line-height: 12px;
150
+ color: cm_grey_400;
151
+ }
152
+
153
+ .coorpmanager .search:hover {
154
+ background-color: cm_grey_150;
155
+ }
156
+
157
+ .coorpmanager .search::placeholder {
158
+ color: transparent;
159
+ }
160
+
161
+ .coorpmanager .clearIcon {
162
+ color: cm_grey_400;
163
+ width: 14px;
164
+ height: 14px;
165
+ position: absolute;
166
+ right: 15px;
167
+ top: 16px;
168
+ line-height: 16px;
169
+ cursor: pointer;
170
+ }
171
+
172
+ .coorpmanager .searchIcon {
173
+ color: #000;
174
+ width: 14px;
175
+ height: 14px;
176
+ position: absolute;
177
+ left: 30px;
178
+ top: 16px;
179
+ line-height: 16px;
180
+ }
181
+
182
+ @media tablet {
183
+ .search,
184
+ input {
185
+ font-size: 12px;
186
+ }
187
+
188
+ .search::placeholder {
189
+ font-size: 12px;
190
+ }
191
+ }
192
+
193
+ @media mobile {
194
+ .search {
195
+ font-size: 12px;
196
+ }
197
+
198
+ .search::placeholder {
199
+ font-size: 12px;
200
+ }
201
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/input-search/test/change.js"],"names":["browserEnv","test","React","shallow","configure","Adapter","Search","adapter","t","plan","onChange","value","is","wrapper","find","simulate","target"],"mappings":"AAAA,OAAOA,UAAP,MAAuB,aAAvB;AACA,OAAOC,IAAP,MAAiB,KAAjB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,OAAR,EAAiBC,SAAjB,QAAiC,QAAjC;AACA,OAAOC,OAAP,MAAoB,yBAApB;AACA,OAAOC,MAAP,MAAmB,IAAnB;AAEAN,UAAU;AACVI,SAAS,CAAC;AAACG,EAAAA,OAAO,EAAE,IAAIF,OAAJ;AAAV,CAAD,CAAT;AAEAJ,IAAI,CAAC,6EAAD,EAAgFO,CAAC,IAAI;AACvFA,EAAAA,CAAC,CAACC,IAAF,CAAO,CAAP;;AAEA,QAAMC,QAAQ,GAAGC,KAAK,IAAI;AACxBH,IAAAA,CAAC,CAACI,EAAF,CAAKD,KAAL,EAAY,mBAAZ;AACD,GAFD;;AAIA,QAAME,OAAO,GAAGV,OAAO,eACrB,oBAAC,MAAD;AAAQ,IAAA,WAAW,EAAC,eAApB;AAAoC,IAAA,KAAK,EAAC,kBAA1C;AAA6D,IAAA,QAAQ,EAAEO;AAAvE,IADqB,CAAvB;AAIAG,EAAAA,OAAO,CAACC,IAAR,CAAa,OAAb,EAAsBC,QAAtB,CAA+B,OAA/B,EAAwC;AAACC,IAAAA,MAAM,EAAE;AAACL,MAAAA,KAAK,EAAE;AAAR;AAAT,GAAxC;AACD,CAZG,CAAJ","sourcesContent":["import browserEnv from 'browser-env';\nimport test from 'ava';\nimport React from 'react';\nimport {shallow, configure} from 'enzyme';\nimport Adapter from 'enzyme-adapter-react-16';\nimport Search from '..';\n\nbrowserEnv();\nconfigure({adapter: new Adapter()});\n\ntest('should call onChange with new value when user try to change the input value', t => {\n t.plan(1);\n\n const onChange = value => {\n t.is(value, 'my name is murphy');\n };\n\n const wrapper = shallow(\n <Search placeholder=\"say your name\" value=\"my name is murph\" onChange={onChange} />\n );\n\n wrapper.find('input').simulate('input', {target: {value: 'my name is murphy'}});\n});\n"],"file":"change.js"}
@@ -0,0 +1,14 @@
1
+ export default {
2
+ props: {
3
+ value: 'big data - le retour',
4
+ placeholder: 'Search for a course',
5
+ onChange: value => {
6
+ console.log(value);
7
+ },
8
+ onEnter: () => console.log('pressed enter'),
9
+ onFocus: () => console.log('onFocus'),
10
+ onClear: () => console.log('clear pressed'),
11
+ theme: 'coorpmanager'
12
+ }
13
+ };
14
+ //# sourceMappingURL=coorpmanager-with-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/input-search/test/fixtures/coorpmanager-with-value.js"],"names":["props","value","placeholder","onChange","console","log","onEnter","onFocus","onClear","theme"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,sBADF;AAELC,IAAAA,WAAW,EAAE,qBAFR;AAGLC,IAAAA,QAAQ,EAAEF,KAAK,IAAI;AACjBG,MAAAA,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AACD,KALI;AAMLK,IAAAA,OAAO,EAAE,MAAMF,OAAO,CAACC,GAAR,CAAY,eAAZ,CANV;AAOLE,IAAAA,OAAO,EAAE,MAAMH,OAAO,CAACC,GAAR,CAAY,SAAZ,CAPV;AAQLG,IAAAA,OAAO,EAAE,MAAMJ,OAAO,CAACC,GAAR,CAAY,eAAZ,CARV;AASLI,IAAAA,KAAK,EAAE;AATF;AADM,CAAf","sourcesContent":["export default {\n props: {\n value: 'big data - le retour',\n placeholder: 'Search for a course',\n onChange: value => {\n console.log(value);\n },\n onEnter: () => console.log('pressed enter'),\n onFocus: () => console.log('onFocus'),\n onClear: () => console.log('clear pressed'),\n theme: 'coorpmanager'\n }\n};\n"],"file":"coorpmanager-with-value.js"}
@@ -0,0 +1,13 @@
1
+ export default {
2
+ props: {
3
+ value: '',
4
+ placeholder: 'Search for a course',
5
+ onChange: value => {
6
+ console.log(value);
7
+ },
8
+ onFocus: () => console.log('onFocus'),
9
+ onBlur: () => console.log('blur'),
10
+ theme: 'coorpmanager'
11
+ }
12
+ };
13
+ //# sourceMappingURL=coorpmanager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/input-search/test/fixtures/coorpmanager.js"],"names":["props","value","placeholder","onChange","console","log","onFocus","onBlur","theme"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,EADF;AAELC,IAAAA,WAAW,EAAE,qBAFR;AAGLC,IAAAA,QAAQ,EAAEF,KAAK,IAAI;AACjBG,MAAAA,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AACD,KALI;AAMLK,IAAAA,OAAO,EAAE,MAAMF,OAAO,CAACC,GAAR,CAAY,SAAZ,CANV;AAOLE,IAAAA,MAAM,EAAE,MAAMH,OAAO,CAACC,GAAR,CAAY,MAAZ,CAPT;AAQLG,IAAAA,KAAK,EAAE;AARF;AADM,CAAf","sourcesContent":["export default {\n props: {\n value: '',\n placeholder: 'Search for a course',\n onChange: value => {\n console.log(value);\n },\n onFocus: () => console.log('onFocus'),\n onBlur: () => console.log('blur'),\n theme: 'coorpmanager'\n }\n};\n"],"file":"coorpmanager.js"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/input-search/test/fixtures/default.js"],"names":["props","value","placeholder","onChange","console","log","onFocus","onBlur"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,EADF;AAELC,IAAAA,WAAW,EAAE,qBAFR;AAGLC,IAAAA,QAAQ,EAAEF,KAAK,IAAI;AACjBG,MAAAA,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AACD,KALI;AAMLK,IAAAA,OAAO,EAAE,MAAMF,OAAO,CAACC,GAAR,CAAY,SAAZ,CANV;AAOLE,IAAAA,MAAM,EAAE,MAAMH,OAAO,CAACC,GAAR,CAAY,MAAZ;AAPT;AADM,CAAf","sourcesContent":["export default {\n props: {\n value: '',\n placeholder: 'Search for a course',\n onChange: value => {\n console.log(value);\n },\n onFocus: () => console.log('onFocus'),\n onBlur: () => console.log('blur')\n }\n};\n"],"file":"default.js"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/input-search/test/fixtures/with-value.js"],"names":["props","value","placeholder","onChange","console","log","onEnter","onFocus"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,sBADF;AAELC,IAAAA,WAAW,EAAE,qBAFR;AAGLC,IAAAA,QAAQ,EAAEF,KAAK,IAAI;AACjBG,MAAAA,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AACD,KALI;AAMLK,IAAAA,OAAO,EAAE,MAAMF,OAAO,CAACC,GAAR,CAAY,eAAZ,CANV;AAOLE,IAAAA,OAAO,EAAE,MAAMH,OAAO,CAACC,GAAR,CAAY,SAAZ;AAPV;AADM,CAAf","sourcesContent":["export default {\n props: {\n value: 'big data - le retour',\n placeholder: 'Search for a course',\n onChange: value => {\n console.log(value);\n },\n onEnter: () => console.log('pressed enter'),\n onFocus: () => console.log('onFocus')\n }\n};\n"],"file":"with-value.js"}
@@ -0,0 +1,27 @@
1
+ import _keys from "lodash/fp/keys";
2
+ import React from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import style from './style.css';
5
+ const TAG_STYLES = {
6
+ default: style.default,
7
+ published: style.published,
8
+ revision: style.revision,
9
+ archived: style.archived
10
+ };
11
+
12
+ const Tag = props => {
13
+ const {
14
+ label,
15
+ type = 'default'
16
+ } = props;
17
+ return /*#__PURE__*/React.createElement("span", {
18
+ className: TAG_STYLES[type]
19
+ }, label);
20
+ };
21
+
22
+ Tag.propTypes = process.env.NODE_ENV !== "production" ? {
23
+ label: PropTypes.string,
24
+ type: PropTypes.oneOf(_keys(TAG_STYLES))
25
+ } : {};
26
+ export default Tag;
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/atom/tag/index.js"],"names":["React","PropTypes","style","TAG_STYLES","default","published","revision","archived","Tag","props","label","type","propTypes","string","oneOf"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,UAAU,GAAG;AACjBC,EAAAA,OAAO,EAAEF,KAAK,CAACE,OADE;AAEjBC,EAAAA,SAAS,EAAEH,KAAK,CAACG,SAFA;AAGjBC,EAAAA,QAAQ,EAAEJ,KAAK,CAACI,QAHC;AAIjBC,EAAAA,QAAQ,EAAEL,KAAK,CAACK;AAJC,CAAnB;;AAOA,MAAMC,GAAG,GAAGC,KAAK,IAAI;AACnB,QAAM;AAACC,IAAAA,KAAD;AAAQC,IAAAA,IAAI,GAAG;AAAf,MAA4BF,KAAlC;AAEA,sBAAO;AAAM,IAAA,SAAS,EAAEN,UAAU,CAACQ,IAAD;AAA3B,KAAoCD,KAApC,CAAP;AACD,CAJD;;AAMAF,GAAG,CAACI,SAAJ,2CAAgB;AACdF,EAAAA,KAAK,EAAET,SAAS,CAACY,MADH;AAEdF,EAAAA,IAAI,EAAEV,SAAS,CAACa,KAAV,CAAgB,MAAKX,UAAL,CAAhB;AAFQ,CAAhB;AAKA,eAAeK,GAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport style from './style.css';\n\nconst TAG_STYLES = {\n default: style.default,\n published: style.published,\n revision: style.revision,\n archived: style.archived\n};\n\nconst Tag = props => {\n const {label, type = 'default'} = props;\n\n return <span className={TAG_STYLES[type]}>{label}</span>;\n};\n\nTag.propTypes = {\n label: PropTypes.string,\n type: PropTypes.oneOf(keys(TAG_STYLES))\n};\n\nexport default Tag;\n"],"file":"index.js"}
@@ -0,0 +1,38 @@
1
+ @value colors: "../../variables/colors.css";
2
+ @value white from colors;
3
+ @value cm_yellow_200 from colors;
4
+ @value cm_positive_100 from colors;
5
+ @value cm_orange_700 from colors;
6
+ @value black from colors;
7
+
8
+ .tag {
9
+ border-radius: 24px;
10
+ font-family: 'Gilroy';
11
+ font-size: 14px;
12
+ font-weight: bold;
13
+ min-width: 90px;
14
+ padding: 12px 16px;
15
+ }
16
+
17
+ .default {
18
+ composes: tag;
19
+ color: black;
20
+ }
21
+
22
+ .revision {
23
+ composes: tag;
24
+ background-color: color(cm_yellow_200 a(15%));
25
+ color: cm_yellow_200;
26
+ }
27
+
28
+ .published {
29
+ composes: tag;
30
+ background-color: color(cm_positive_100 a(15%));
31
+ color: cm_positive_100;
32
+ }
33
+
34
+ .archived {
35
+ composes: tag;
36
+ background-color: color(cm_orange_700 a(15%));
37
+ color: cm_orange_700;
38
+ }
@@ -0,0 +1,7 @@
1
+ export default {
2
+ props: {
3
+ label: 'Archived',
4
+ type: 'archived'
5
+ }
6
+ };
7
+ //# sourceMappingURL=archived.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/tag/test/fixtures/archived.js"],"names":["props","label","type"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,UADF;AAELC,IAAAA,IAAI,EAAE;AAFD;AADM,CAAf","sourcesContent":["export default {\n props: {\n label: 'Archived',\n type: 'archived'\n }\n};\n"],"file":"archived.js"}
@@ -0,0 +1,7 @@
1
+ export default {
2
+ props: {
3
+ label: 'Default',
4
+ type: undefined
5
+ }
6
+ };
7
+ //# sourceMappingURL=default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/tag/test/fixtures/default.js"],"names":["props","label","type","undefined"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,SADF;AAELC,IAAAA,IAAI,EAAEC;AAFD;AADM,CAAf","sourcesContent":["export default {\n props: {\n label: 'Default',\n type: undefined\n }\n};\n"],"file":"default.js"}
@@ -0,0 +1,7 @@
1
+ export default {
2
+ props: {
3
+ label: 'Published',
4
+ type: 'published'
5
+ }
6
+ };
7
+ //# sourceMappingURL=published.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/tag/test/fixtures/published.js"],"names":["props","label","type"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,WADF;AAELC,IAAAA,IAAI,EAAE;AAFD;AADM,CAAf","sourcesContent":["export default {\n props: {\n label: 'Published',\n type: 'published'\n }\n};\n"],"file":"published.js"}
@@ -0,0 +1,7 @@
1
+ export default {
2
+ props: {
3
+ label: 'Ongoing changes',
4
+ type: 'revision'
5
+ }
6
+ };
7
+ //# sourceMappingURL=revision.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/tag/test/fixtures/revision.js"],"names":["props","label","type"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,iBADF;AAELC,IAAAA,IAAI,EAAE;AAFD;AADM,CAAf","sourcesContent":["export default {\n props: {\n label: 'Ongoing changes',\n type: 'revision'\n }\n};\n"],"file":"revision.js"}
@@ -2,12 +2,16 @@ import test from 'ava';
2
2
  import forEach from 'lodash/forEach';
3
3
  import renderComponentMacro from '../../../test/helpers/render-component';
4
4
  import AtomTitle from '..';
5
- import fixtureFixture from './fixtures/fixture';
5
+ import fixtureFormGroupTitleWithoutSubtitle from './fixtures/form-group-title-without-subtitle';
6
+ import fixtureFormGroupTitle from './fixtures/form-group-title';
7
+ import fixturePageTitle from './fixtures/page-title';
6
8
  test('Atom › AtomTitle > should have valid propTypes', t => {
7
9
  t.pass();
8
10
  forEach(AtomTitle.propTypes, (value, key) => {
9
11
  t.not(value, undefined, `PropType for "Atom.AtomTitle.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
10
12
  });
11
13
  });
12
- test('Atom › AtomTitle › Fixture › should be rendered', renderComponentMacro, AtomTitle, fixtureFixture);
14
+ test('Atom › AtomTitle › FormGroupTitleWithoutSubtitle › should be rendered', renderComponentMacro, AtomTitle, fixtureFormGroupTitleWithoutSubtitle);
15
+ test('Atom › AtomTitle › FormGroupTitle › should be rendered', renderComponentMacro, AtomTitle, fixtureFormGroupTitle);
16
+ test('Atom › AtomTitle › PageTitle › should be rendered', renderComponentMacro, AtomTitle, fixturePageTitle);
13
17
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/title/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomTitle","fixtureFixture","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,SAAP,MAAsB,IAAtB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAJ,IAAI,CAAC,gDAAD,EAAmDK,CAAC,IAAI;AAC1DA,EAAAA,CAAC,CAACC,IAAF;AACAL,EAAAA,OAAO,CAACE,SAAS,CAACI,SAAX,EAAsB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3CJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0CAAyCF,GAAI,mEAAtE;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAT,IAAI,CAAC,iDAAD,EAAoDE,oBAApD,EAA0EC,SAA1E,EAAqFC,cAArF,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomTitle from '..';\nimport fixtureFixture from './fixtures/fixture';\n\ntest('Atom › AtomTitle > should have valid propTypes', t => {\n t.pass();\n forEach(AtomTitle.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomTitle.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomTitle › Fixture › should be rendered', renderComponentMacro, AtomTitle, fixtureFixture);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/atom/title/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomTitle","fixtureFormGroupTitleWithoutSubtitle","fixtureFormGroupTitle","fixturePageTitle","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,SAAP,MAAsB,IAAtB;AACA,OAAOC,oCAAP,MAAiD,8CAAjD;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AAEAN,IAAI,CAAC,gDAAD,EAAmDO,CAAC,IAAI;AAC1DA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,SAAS,CAACM,SAAX,EAAsB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3CJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0CAAyCF,GAAI,mEAAtE;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,SAAhG,EAA2GC,oCAA3G,CAAJ;AACAJ,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,SAAjF,EAA4FE,qBAA5F,CAAJ;AACAL,IAAI,CAAC,mDAAD,EAAsDE,oBAAtD,EAA4EC,SAA5E,EAAuFG,gBAAvF,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomTitle from '..';\nimport fixtureFormGroupTitleWithoutSubtitle from './fixtures/form-group-title-without-subtitle';\nimport fixtureFormGroupTitle from './fixtures/form-group-title';\nimport fixturePageTitle from './fixtures/page-title';\n\ntest('Atom › AtomTitle > should have valid propTypes', t => {\n t.pass();\n forEach(AtomTitle.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomTitle.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomTitle › FormGroupTitleWithoutSubtitle › should be rendered', renderComponentMacro, AtomTitle, fixtureFormGroupTitleWithoutSubtitle);\ntest('Atom › AtomTitle › FormGroupTitle › should be rendered', renderComponentMacro, AtomTitle, fixtureFormGroupTitle);\ntest('Atom › AtomTitle › PageTitle › should be rendered', renderComponentMacro, AtomTitle, fixturePageTitle);\n"],"file":"fixtures.js"}
@@ -6,7 +6,7 @@
6
6
  @value cm_negative_50 from colors;
7
7
  @value cm_negative_200 from colors;
8
8
  @value cm_warning_50 from colors;
9
- @value cm_warning_200 from colors;
9
+ @value cm_yellow_200 from colors;
10
10
 
11
11
  .banner {
12
12
  display: flex;
@@ -17,7 +17,7 @@
17
17
  padding: 16px 24px;
18
18
  border-radius: 5px;
19
19
  background-color: cm_warning_50;
20
- color: cm_warning_200;
20
+ color: cm_yellow_200;
21
21
  border-radius: 5px;
22
22
  }
23
23
 
@@ -40,7 +40,7 @@
40
40
  align-self: stretch;
41
41
  flex-grow: 0;
42
42
  opacity: 0.1;
43
- background-color: cm_warning_200;
43
+ background-color: cm_yellow_200;
44
44
  }
45
45
 
46
46
  .icon {
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond, NovaSolidApplicationsWindowUpload3 as WindowUpload, NovaSolidStatusClose as Close } from '@coorpacademy/nova-icons';
4
- import classNames from 'classnames';
5
- import Cta from '../../atom/button';
4
+ import Cta from '../../atom/button-link';
6
5
  import style from './style.css';
7
6
 
8
7
  const CMPopin = props => {
@@ -43,31 +42,38 @@ const CMPopin = props => {
43
42
  }
44
43
  })), /*#__PURE__*/React.createElement("div", {
45
44
  className: style.buttonContainer
46
- }, firstButton ? /*#__PURE__*/React.createElement(Cta, {
47
- submitValue: firstButton.label,
45
+ }, firstButton ? /*#__PURE__*/React.createElement("div", {
46
+ className: style.button
47
+ }, /*#__PURE__*/React.createElement(Cta, {
48
+ label: firstButton.label,
48
49
  onClick: firstButton.handleOnclick,
49
- name: `cm-popin-cta`,
50
- className: style.button,
51
- buttonContentClassName: style.buttonContent
52
- }) : null, secondButton ? /*#__PURE__*/React.createElement(Cta, {
53
- submitValue: secondButton.label,
50
+ "data-name": `cm-popin-cta`,
51
+ "aria-lable": firstButton.ariaLabel,
52
+ type: firstButton.type
53
+ })) : null, secondButton ? /*#__PURE__*/React.createElement("div", {
54
+ className: style.button
55
+ }, /*#__PURE__*/React.createElement(Cta, {
56
+ label: secondButton.label,
54
57
  onClick: secondButton.handleOnclick,
55
- name: `cm-popin-cta-${secondButton.type}`,
56
- className: style.button,
57
- buttonContentClassName: classNames([style.buttonContent, secondButton.type === 'dangerous' ? style.dangerousButton : style.coloredButton])
58
- }) : null)), ")");
58
+ "data-name": `cm-popin-cta-${secondButton.type}`,
59
+ "aria-lable": firstButton.ariaLabel,
60
+ type: secondButton.type
61
+ })) : null)), ")");
59
62
  };
60
63
 
61
64
  CMPopin.propTypes = process.env.NODE_ENV !== "production" ? {
62
65
  content: PropTypes.string,
63
66
  firstButton: PropTypes.shape({
64
67
  label: PropTypes.string,
65
- handleOnclick: PropTypes.func
68
+ handleOnclick: PropTypes.func,
69
+ ariaLabel: PropTypes.string,
70
+ type: PropTypes.string
66
71
  }),
67
72
  secondButton: PropTypes.shape({
68
73
  label: PropTypes.string,
69
74
  handleOnclick: PropTypes.func,
70
- type: PropTypes.oneOf(['warning', 'warningWithClose', 'dangerous', 'default'])
75
+ type: PropTypes.oneOf(['dangerous', 'primary']),
76
+ ariaLabel: PropTypes.string
71
77
  }),
72
78
  onClose: PropTypes.func,
73
79
  icon: PropTypes.string
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/cm-popin/index.js"],"names":["React","PropTypes","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaSolidStatusClose","Close","classNames","Cta","style","CMPopin","props","content","firstButton","secondButton","onClose","icon","logo","LogoComponent","background","popin","popinHeader","headerCloseIconContainer","headerCloseIcon","contentSection","__html","buttonContainer","label","handleOnclick","button","buttonContent","type","dangerousButton","coloredButton","propTypes","string","shape","func","oneOf"],"mappings":"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","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaSolidStatusClose as Close\n} from '@coorpacademy/nova-icons';\nimport classNames from 'classnames';\nimport Cta from '../../atom/button';\nimport style from './style.css';\n\nconst CMPopin = props => {\n const {content, firstButton, secondButton, onClose, icon} = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload\n };\n const LogoComponent = logo[icon];\n\n return (\n <div className={style.background}>\n <div className={style.popin}>\n <header className={style.popinHeader}>\n {onClose ? (\n <div\n className={style.headerCloseIconContainer}\n onClick={onClose}\n data-name={'close-icon'}\n >\n <Close className={style.headerCloseIcon} />\n </div>\n ) : null}\n </header>\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n <p\n className={style.content}\n data-name={`cm-popin-content`}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n </div>\n\n <div className={style.buttonContainer}>\n {firstButton ? (\n <Cta\n submitValue={firstButton.label}\n onClick={firstButton.handleOnclick}\n name={`cm-popin-cta`}\n className={style.button}\n buttonContentClassName={style.buttonContent}\n />\n ) : null}\n {secondButton ? (\n <Cta\n submitValue={secondButton.label}\n onClick={secondButton.handleOnclick}\n name={`cm-popin-cta-${secondButton.type}`}\n className={style.button}\n buttonContentClassName={classNames([\n style.buttonContent,\n secondButton.type === 'dangerous' ? style.dangerousButton : style.coloredButton\n ])}\n />\n ) : null}\n </div>\n </div>\n )\n </div>\n );\n};\n\nCMPopin.propTypes = {\n content: PropTypes.string,\n firstButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func\n }),\n secondButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['warning', 'warningWithClose', 'dangerous', 'default'])\n }),\n onClose: PropTypes.func,\n icon: PropTypes.string\n};\n\nexport default CMPopin;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/cm-popin/index.js"],"names":["React","PropTypes","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaSolidStatusClose","Close","Cta","style","CMPopin","props","content","firstButton","secondButton","onClose","icon","logo","LogoComponent","background","popin","popinHeader","headerCloseIconContainer","headerCloseIcon","contentSection","__html","buttonContainer","button","label","handleOnclick","ariaLabel","type","propTypes","string","shape","func","oneOf"],"mappings":"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","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaSolidStatusClose as Close\n} from '@coorpacademy/nova-icons';\nimport Cta from '../../atom/button-link';\nimport style from './style.css';\n\nconst CMPopin = props => {\n const {content, firstButton, secondButton, onClose, icon} = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload\n };\n const LogoComponent = logo[icon];\n\n return (\n <div className={style.background}>\n <div className={style.popin}>\n <header className={style.popinHeader}>\n {onClose ? (\n <div\n className={style.headerCloseIconContainer}\n onClick={onClose}\n data-name={'close-icon'}\n >\n <Close className={style.headerCloseIcon} />\n </div>\n ) : null}\n </header>\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n <p\n className={style.content}\n data-name={`cm-popin-content`}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n </div>\n\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={`cm-popin-cta`}\n aria-lable={firstButton.ariaLabel}\n type={firstButton.type}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-lable={firstButton.ariaLabel}\n type={secondButton.type}\n />\n </div>\n ) : null}\n </div>\n </div>\n )\n </div>\n );\n};\n\nCMPopin.propTypes = {\n content: PropTypes.string,\n firstButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n ariaLabel: PropTypes.string,\n type: PropTypes.string\n }),\n secondButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary']),\n ariaLabel: PropTypes.string\n }),\n onClose: PropTypes.func,\n icon: PropTypes.string\n};\n\nexport default CMPopin;\n"],"file":"index.js"}
@@ -74,52 +74,10 @@
74
74
  }
75
75
 
76
76
  .button {
77
- min-width: auto;
78
- margin: 0px 8px;
79
- border-radius: 7px;
80
- transform: none;
81
- }
82
-
83
- .dangerousButton {
84
- background-color: cm_negative_100;
85
- color: white;
86
- }
87
-
88
- .coloredButton {
89
- background-color: cm_primary_blue;
90
- color: white;
91
- }
92
-
93
- .dangerousButton:hover {
94
- background-color: cm_negative_200;
95
- }
96
-
97
- .coloredButton:hover {
98
- background-color: cm_blue_600;
77
+ width: 160px;
78
+ padding: 8px;
99
79
  }
100
80
 
101
- .button::after,
102
- .button:hover::after,
103
- .button:focus::after,
104
- .button:active::after {
105
- transform: none;
106
- }
107
-
108
-
109
- .buttonContent {
110
- width: 180px;
111
- padding: 12px 24px;
112
- line-height: 1.43;
113
- font-size: 14px;
114
- font-weight: bold;
115
- display: block;
116
- text-transform: inherit;
117
- font-family: Gilroy;
118
- text-align: center;
119
- box-sizing: border-box;
120
- border: none;
121
- cursor: pointer;
122
- }
123
81
  .icon {
124
82
  width: 60px;
125
83
  height: 60px;
@@ -4,11 +4,14 @@ export default {
4
4
  icon: 'AlertDiamond',
5
5
  firstButton: {
6
6
  label: 'Cancel',
7
+ type: 'secondary',
8
+ 'aria-lable': 'Cancel this operation',
7
9
  handleOnClick: () => {}
8
10
  },
9
11
  secondButton: {
10
12
  label: 'Undo',
11
13
  type: 'dangerous',
14
+ 'aria-lable': 'Undo this operation',
12
15
  handleOnClick: () => {}
13
16
  }
14
17
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/dangerous.js"],"names":["props","content","icon","firstButton","label","handleOnClick","secondButton","type"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,2DADJ;AAELC,IAAAA,IAAI,EAAE,cAFD;AAGLC,IAAAA,WAAW,EAAE;AACXC,MAAAA,KAAK,EAAE,QADI;AAEXC,MAAAA,aAAa,EAAE,MAAM,CAAE;AAFZ,KAHR;AAOLC,IAAAA,YAAY,EAAE;AACZF,MAAAA,KAAK,EAAE,MADK;AAEZG,MAAAA,IAAI,EAAE,WAFM;AAGZF,MAAAA,aAAa,EAAE,MAAM,CAAE;AAHX;AAPT;AADM,CAAf","sourcesContent":["export default {\n props: {\n content: 'Are you sure to undo this changes? This will be permanent',\n icon: 'AlertDiamond',\n firstButton: {\n label: 'Cancel',\n handleOnClick: () => {}\n },\n secondButton: {\n label: 'Undo',\n type: 'dangerous',\n handleOnClick: () => {}\n }\n }\n};\n"],"file":"dangerous.js"}
1
+ {"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/dangerous.js"],"names":["props","content","icon","firstButton","label","type","handleOnClick","secondButton"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,2DADJ;AAELC,IAAAA,IAAI,EAAE,cAFD;AAGLC,IAAAA,WAAW,EAAE;AACXC,MAAAA,KAAK,EAAE,QADI;AAEXC,MAAAA,IAAI,EAAE,WAFK;AAGX,oBAAc,uBAHH;AAIXC,MAAAA,aAAa,EAAE,MAAM,CAAE;AAJZ,KAHR;AASLC,IAAAA,YAAY,EAAE;AACZH,MAAAA,KAAK,EAAE,MADK;AAEZC,MAAAA,IAAI,EAAE,WAFM;AAGZ,oBAAc,qBAHF;AAIZC,MAAAA,aAAa,EAAE,MAAM,CAAE;AAJX;AATT;AADM,CAAf","sourcesContent":["export default {\n props: {\n content: 'Are you sure to undo this changes? This will be permanent',\n icon: 'AlertDiamond',\n firstButton: {\n label: 'Cancel',\n type: 'secondary',\n 'aria-lable': 'Cancel this operation',\n handleOnClick: () => {}\n },\n secondButton: {\n label: 'Undo',\n type: 'dangerous',\n 'aria-lable': 'Undo this operation',\n handleOnClick: () => {}\n }\n }\n};\n"],"file":"dangerous.js"}
@@ -4,12 +4,15 @@ export default {
4
4
  icon: 'WindowUpload',
5
5
  firstButton: {
6
6
  label: 'Cancel',
7
- handleOnClick: () => {}
7
+ type: 'secondary',
8
+ handleOnClick: () => {},
9
+ 'aria-lable': 'Cancel this operation'
8
10
  },
9
11
  secondButton: {
10
12
  label: 'Undo',
11
- type: 'warning',
12
- handleOnClick: () => {}
13
+ type: 'primary',
14
+ handleOnClick: () => {},
15
+ 'aria-lable': 'Undo this operation'
13
16
  }
14
17
  }
15
18
  };