@coorpacademy/components 11.11.0 → 11.11.1-alpha.2

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 (202) hide show
  1. package/es/atom/input-search/index.d.ts.map +1 -1
  2. package/es/atom/input-search/index.js +1 -0
  3. package/es/atom/input-search/index.js.map +1 -1
  4. package/es/atom/input-switch/index.d.ts +2 -0
  5. package/es/atom/input-switch/index.d.ts.map +1 -1
  6. package/es/atom/input-switch/index.js +23 -11
  7. package/es/atom/input-switch/index.js.map +1 -1
  8. package/es/atom/select/index.d.ts +1 -0
  9. package/es/atom/select/index.d.ts.map +1 -1
  10. package/es/atom/select/index.js +13 -8
  11. package/es/atom/select/index.js.map +1 -1
  12. package/es/atom/{review-header-step-item → status-item}/index.d.ts +4 -4
  13. package/es/atom/status-item/index.d.ts.map +1 -0
  14. package/es/atom/status-item/index.js +104 -0
  15. package/es/atom/status-item/index.js.map +1 -0
  16. package/es/atom/status-item/index.native.d.ts +5 -0
  17. package/es/atom/status-item/index.native.d.ts.map +1 -0
  18. package/es/atom/{review-header-step-item → status-item}/index.native.js +2 -2
  19. package/es/atom/status-item/index.native.js.map +1 -0
  20. package/es/atom/{review-header-step-item → status-item}/style.css +47 -0
  21. package/es/atom/{review-header-step-item → status-item}/types.d.ts +5 -5
  22. package/es/atom/status-item/types.d.ts.map +1 -0
  23. package/es/atom/{review-header-step-item → status-item}/types.js +1 -1
  24. package/es/atom/status-item/types.js.map +1 -0
  25. package/es/molecule/brand-form-group/index.d.ts +8 -0
  26. package/es/molecule/cm-popin/types.d.ts +2 -0
  27. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  28. package/es/molecule/draggable-list/index.d.ts +2 -0
  29. package/es/molecule/filters/filters-wrapper.d.ts.map +1 -1
  30. package/es/molecule/filters/filters-wrapper.js +4 -1
  31. package/es/molecule/filters/filters-wrapper.js.map +1 -1
  32. package/es/molecule/filters/index.d.ts +2 -0
  33. package/es/molecule/filters/index.d.ts.map +1 -1
  34. package/es/molecule/filters/index.js +10 -3
  35. package/es/molecule/filters/index.js.map +1 -1
  36. package/es/molecule/review-header-steps/index.js +2 -2
  37. package/es/molecule/review-header-steps/index.js.map +1 -1
  38. package/es/molecule/review-header-steps/prop-types.d.ts +2 -2
  39. package/es/molecule/review-header-steps/prop-types.d.ts.map +1 -1
  40. package/es/molecule/review-header-steps/prop-types.js +1 -1
  41. package/es/molecule/review-header-steps/prop-types.js.map +1 -1
  42. package/es/molecule/setup-section/index.d.ts +2 -0
  43. package/es/molecule/setup-section/index.d.ts.map +1 -1
  44. package/es/molecule/setup-sections/index.d.ts +2 -0
  45. package/es/molecule/setup-slide/index.d.ts +3 -0
  46. package/es/molecule/setup-slider/index.d.ts +3 -0
  47. package/es/organism/brand-form/index.d.ts +8 -0
  48. package/es/organism/mooc-header/index.d.ts.map +1 -1
  49. package/es/organism/mooc-header/index.js +4 -1
  50. package/es/organism/mooc-header/index.js.map +1 -1
  51. package/es/organism/review-header/index.native.js +1 -1
  52. package/es/organism/review-header/index.native.js.map +1 -1
  53. package/es/organism/review-header/types.d.ts +2 -2
  54. package/es/organism/review-header/types.d.ts.map +1 -1
  55. package/es/organism/review-header/types.js.map +1 -1
  56. package/es/organism/user-preferences/index.d.ts +2 -0
  57. package/es/organism/wizard-contents/index.d.ts +8 -0
  58. package/es/template/activity/index.d.ts +12 -11
  59. package/es/template/activity/index.d.ts.map +1 -1
  60. package/es/template/activity/index.js +6 -3
  61. package/es/template/activity/index.js.map +1 -1
  62. package/es/template/app-player/loading/index.d.ts +2 -0
  63. package/es/template/app-player/player/index.d.ts +4 -0
  64. package/es/template/app-player/player/slides/index.d.ts +2 -0
  65. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  66. package/es/template/app-player/popin-correction/index.d.ts +2 -0
  67. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  68. package/es/template/app-player/popin-end/index.d.ts +2 -0
  69. package/es/template/app-review/index.d.ts +2 -0
  70. package/es/template/app-review/index.d.ts.map +1 -1
  71. package/es/template/app-review/player/prop-types.d.ts +2 -0
  72. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  73. package/es/template/app-review/prop-types.d.ts +2 -0
  74. package/es/template/app-review/prop-types.d.ts.map +1 -1
  75. package/es/template/back-office/brand-update/index.d.ts +18 -0
  76. package/es/template/common/dashboard/index.d.ts +2 -0
  77. package/es/template/common/search-page/index.d.ts +3 -0
  78. package/es/template/common/search-page/index.d.ts.map +1 -1
  79. package/es/template/common/search-page/index.js +6 -3
  80. package/es/template/common/search-page/index.js.map +1 -1
  81. package/lib/atom/input-search/index.d.ts.map +1 -1
  82. package/lib/atom/input-search/index.js +1 -0
  83. package/lib/atom/input-search/index.js.map +1 -1
  84. package/lib/atom/input-switch/index.d.ts +2 -0
  85. package/lib/atom/input-switch/index.d.ts.map +1 -1
  86. package/lib/atom/input-switch/index.js +22 -11
  87. package/lib/atom/input-switch/index.js.map +1 -1
  88. package/lib/atom/select/index.d.ts +1 -0
  89. package/lib/atom/select/index.d.ts.map +1 -1
  90. package/lib/atom/select/index.js +13 -8
  91. package/lib/atom/select/index.js.map +1 -1
  92. package/lib/atom/{review-header-step-item → status-item}/index.d.ts +4 -4
  93. package/lib/atom/status-item/index.d.ts.map +1 -0
  94. package/lib/atom/{review-header-step-item → status-item}/index.js +50 -23
  95. package/lib/atom/status-item/index.js.map +1 -0
  96. package/lib/atom/status-item/index.native.d.ts +5 -0
  97. package/lib/atom/status-item/index.native.d.ts.map +1 -0
  98. package/lib/atom/{review-header-step-item → status-item}/index.native.js +2 -2
  99. package/lib/atom/status-item/index.native.js.map +1 -0
  100. package/lib/atom/{review-header-step-item → status-item}/style.css +47 -0
  101. package/lib/atom/{review-header-step-item → status-item}/types.d.ts +5 -5
  102. package/lib/atom/status-item/types.d.ts.map +1 -0
  103. package/lib/atom/{review-header-step-item → status-item}/types.js +1 -1
  104. package/lib/atom/status-item/types.js.map +1 -0
  105. package/lib/molecule/brand-form-group/index.d.ts +8 -0
  106. package/lib/molecule/cm-popin/types.d.ts +2 -0
  107. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  108. package/lib/molecule/draggable-list/index.d.ts +2 -0
  109. package/lib/molecule/filters/filters-wrapper.d.ts.map +1 -1
  110. package/lib/molecule/filters/filters-wrapper.js +4 -1
  111. package/lib/molecule/filters/filters-wrapper.js.map +1 -1
  112. package/lib/molecule/filters/index.d.ts +2 -0
  113. package/lib/molecule/filters/index.d.ts.map +1 -1
  114. package/lib/molecule/filters/index.js +9 -3
  115. package/lib/molecule/filters/index.js.map +1 -1
  116. package/lib/molecule/review-header-steps/index.js +2 -2
  117. package/lib/molecule/review-header-steps/index.js.map +1 -1
  118. package/lib/molecule/review-header-steps/prop-types.d.ts +2 -2
  119. package/lib/molecule/review-header-steps/prop-types.d.ts.map +1 -1
  120. package/lib/molecule/review-header-steps/prop-types.js +1 -1
  121. package/lib/molecule/review-header-steps/prop-types.js.map +1 -1
  122. package/lib/molecule/setup-section/index.d.ts +2 -0
  123. package/lib/molecule/setup-section/index.d.ts.map +1 -1
  124. package/lib/molecule/setup-sections/index.d.ts +2 -0
  125. package/lib/molecule/setup-slide/index.d.ts +3 -0
  126. package/lib/molecule/setup-slider/index.d.ts +3 -0
  127. package/lib/organism/brand-form/index.d.ts +8 -0
  128. package/lib/organism/mooc-header/index.d.ts.map +1 -1
  129. package/lib/organism/mooc-header/index.js +4 -1
  130. package/lib/organism/mooc-header/index.js.map +1 -1
  131. package/lib/organism/review-header/index.native.js +1 -1
  132. package/lib/organism/review-header/index.native.js.map +1 -1
  133. package/lib/organism/review-header/types.d.ts +2 -2
  134. package/lib/organism/review-header/types.d.ts.map +1 -1
  135. package/lib/organism/review-header/types.js.map +1 -1
  136. package/lib/organism/user-preferences/index.d.ts +2 -0
  137. package/lib/organism/wizard-contents/index.d.ts +8 -0
  138. package/lib/template/activity/index.d.ts +12 -11
  139. package/lib/template/activity/index.d.ts.map +1 -1
  140. package/lib/template/activity/index.js +6 -3
  141. package/lib/template/activity/index.js.map +1 -1
  142. package/lib/template/app-player/loading/index.d.ts +2 -0
  143. package/lib/template/app-player/player/index.d.ts +4 -0
  144. package/lib/template/app-player/player/slides/index.d.ts +2 -0
  145. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  146. package/lib/template/app-player/popin-correction/index.d.ts +2 -0
  147. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  148. package/lib/template/app-player/popin-end/index.d.ts +2 -0
  149. package/lib/template/app-review/index.d.ts +2 -0
  150. package/lib/template/app-review/index.d.ts.map +1 -1
  151. package/lib/template/app-review/player/prop-types.d.ts +2 -0
  152. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  153. package/lib/template/app-review/prop-types.d.ts +2 -0
  154. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  155. package/lib/template/back-office/brand-update/index.d.ts +18 -0
  156. package/lib/template/common/dashboard/index.d.ts +2 -0
  157. package/lib/template/common/search-page/index.d.ts +3 -0
  158. package/lib/template/common/search-page/index.d.ts.map +1 -1
  159. package/lib/template/common/search-page/index.js +6 -3
  160. package/lib/template/common/search-page/index.js.map +1 -1
  161. package/locales/bs/global.json +0 -2
  162. package/locales/cs/global.json +0 -2
  163. package/locales/de/global.json +0 -2
  164. package/locales/en/global.json +8 -5
  165. package/locales/es/global.json +0 -2
  166. package/locales/et/global.json +0 -2
  167. package/locales/fr/global.json +0 -2
  168. package/locales/hr/global.json +0 -2
  169. package/locales/hu/global.json +0 -2
  170. package/locales/hy/global.json +0 -2
  171. package/locales/it/global.json +0 -2
  172. package/locales/ja/global.json +0 -2
  173. package/locales/ko/global.json +0 -2
  174. package/locales/nl/global.json +0 -2
  175. package/locales/pl/global.json +0 -2
  176. package/locales/pt/global.json +0 -2
  177. package/locales/ro/global.json +0 -2
  178. package/locales/ru/global.json +0 -2
  179. package/locales/sk/global.json +0 -2
  180. package/locales/th/global.json +0 -2
  181. package/locales/tl/global.json +0 -2
  182. package/locales/tr/global.json +0 -2
  183. package/locales/uk/global.json +0 -2
  184. package/locales/vi/global.json +0 -2
  185. package/locales/zh/global.json +0 -2
  186. package/locales/zh_TW/global.json +0 -2
  187. package/package.json +2 -2
  188. package/es/atom/review-header-step-item/index.d.ts.map +0 -1
  189. package/es/atom/review-header-step-item/index.js +0 -77
  190. package/es/atom/review-header-step-item/index.js.map +0 -1
  191. package/es/atom/review-header-step-item/index.native.d.ts +0 -5
  192. package/es/atom/review-header-step-item/index.native.d.ts.map +0 -1
  193. package/es/atom/review-header-step-item/index.native.js.map +0 -1
  194. package/es/atom/review-header-step-item/types.d.ts.map +0 -1
  195. package/es/atom/review-header-step-item/types.js.map +0 -1
  196. package/lib/atom/review-header-step-item/index.d.ts.map +0 -1
  197. package/lib/atom/review-header-step-item/index.js.map +0 -1
  198. package/lib/atom/review-header-step-item/index.native.d.ts +0 -5
  199. package/lib/atom/review-header-step-item/index.native.d.ts.map +0 -1
  200. package/lib/atom/review-header-step-item/index.native.js.map +0 -1
  201. package/lib/atom/review-header-step-item/types.d.ts.map +0 -1
  202. package/lib/atom/review-header-step-item/types.js.map +0 -1
@@ -21,6 +21,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
24
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
+
24
26
  const Content = (props, legacyContext) => {
25
27
  const {
26
28
  icon,
@@ -29,33 +31,59 @@ const Content = (props, legacyContext) => {
29
31
  } = props;
30
32
  const translate = (0, _provider.GetTranslateFromContext)(legacyContext);
31
33
  let child;
32
- let ariaDescription;
34
+ let contentAriaLabel;
33
35
 
34
36
  switch (icon) {
35
37
  case 'no-answer':
36
38
  child = value;
37
- ariaDescription = current ? translate('review_header_step_item.current_question', {
38
- headerStepValue: value
39
- }) : translate('review_header_step_item.not_answered_question', {
39
+ contentAriaLabel = translate('review_header_step_item.not_answered_question', {
40
+ current: current ? 'current ' : '',
40
41
  headerStepValue: value
41
42
  });
42
43
  break;
43
44
 
44
45
  case 'right':
45
46
  child = /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyCheck, {
46
- className: (0, _classnames.default)(_style.default.rightIcon, current && _style.default.currentRightIcon)
47
- });
48
- ariaDescription = translate('review_header_step_item.correct_question', {
49
- headerStepValue: value
47
+ className: (0, _classnames.default)(_style.default.rightIcon, current && _style.default.currentRightIcon),
48
+ role: "status",
49
+ "aria-label": translate('review_header_step_item.correct_question', {
50
+ current: current ? 'current ' : '',
51
+ headerStepValue: value
52
+ })
50
53
  });
51
54
  break;
52
55
 
53
56
  case 'wrong':
54
57
  child = /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidStatusClose, {
55
- className: (0, _classnames.default)(_style.default.wrongIcon, current && _style.default.currentWrongIcon)
58
+ className: (0, _classnames.default)(_style.default.wrongIcon, current && _style.default.currentWrongIcon),
59
+ role: "alert",
60
+ "aria-label": translate('review_header_step_item.incorrect_question', {
61
+ current: current ? 'current ' : '',
62
+ headerStepValue: value
63
+ })
56
64
  });
57
- ariaDescription = translate('review_header_step_item.incorrect_question', {
58
- headerStepValue: value
65
+ break;
66
+
67
+ case 'errors-number':
68
+ child = value;
69
+ contentAriaLabel = translate('bulk_import.errors_number', {
70
+ bulkImportErrorsNumber: value
71
+ });
72
+ break;
73
+
74
+ case 'valid':
75
+ child = /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyCheck, {
76
+ className: (0, _classnames.default)(_style.default.validIcon),
77
+ role: "status",
78
+ "aria-label": translate('bulk_import.valid_scorm')
79
+ });
80
+ break;
81
+
82
+ case 'invalid':
83
+ child = /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidStatusClose, {
84
+ className: (0, _classnames.default)(_style.default.invalidIcon),
85
+ role: "alert",
86
+ "aria-label": translate('bulk_import.invalid_scorm')
59
87
  });
60
88
  break;
61
89
 
@@ -63,23 +91,22 @@ const Content = (props, legacyContext) => {
63
91
  return null;
64
92
  }
65
93
 
66
- return /*#__PURE__*/_react.default.createElement("span", {
67
- className: _style.default.value,
68
- "aria-label": translate('review_header_step_item.aria_label', {
69
- headerStepValue: value
70
- }),
71
- "aria-describedby": ariaDescription
72
- }, child);
94
+ return /*#__PURE__*/_react.default.createElement("span", _extends({}, icon === 'no-answer' || icon === 'errors-number' ? {
95
+ 'aria-label': contentAriaLabel,
96
+ role: 'status'
97
+ } : {}, {
98
+ className: _style.default.value
99
+ }), child);
73
100
  };
74
101
 
75
- const ReviewHeaderStepItem = props => {
102
+ const StatusItem = props => {
76
103
  const {
77
104
  icon,
78
105
  current
79
106
  } = props;
80
107
  return /*#__PURE__*/_react.default.createElement("div", {
81
- className: (0, _classnames.default)(_style.default.default, icon === 'right' && _style.default.right, icon === 'wrong' && _style.default.wrong, current && _style.default.current),
82
- "data-name": "header-step-item"
108
+ className: (0, _classnames.default)(_style.default.default, icon === 'right' && _style.default.right, icon === 'wrong' && _style.default.wrong, current && _style.default.current, icon === 'valid' && _style.default.valid, icon === 'invalid' && _style.default.invalid, icon === 'errors-number' && _style.default.errorsNumber),
109
+ "data-name": "status-item"
83
110
  }, /*#__PURE__*/_react.default.createElement(Content, props));
84
111
  };
85
112
 
@@ -88,7 +115,7 @@ Content.contextTypes = {
88
115
  skin: _provider.default.childContextTypes.skin,
89
116
  translate: _provider.default.childContextTypes.translate
90
117
  };
91
- ReviewHeaderStepItem.propTypes = process.env.NODE_ENV !== "production" ? _types.default : {};
92
- var _default = ReviewHeaderStepItem;
118
+ StatusItem.propTypes = process.env.NODE_ENV !== "production" ? _types.default : {};
119
+ var _default = StatusItem;
93
120
  exports.default = _default;
94
121
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["Content","props","legacyContext","icon","current","value","translate","GetTranslateFromContext","child","contentAriaLabel","headerStepValue","classnames","style","rightIcon","currentRightIcon","wrongIcon","currentWrongIcon","bulkImportErrorsNumber","validIcon","invalidIcon","role","StatusItem","default","right","wrong","valid","invalid","errorsNumber","propTypes","contextTypes","skin","Provider","childContextTypes"],"sources":["../../../src/atom/status-item/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon\n} from '@coorpacademy/nova-icons';\nimport Provider, {GetTranslateFromContext} from '../provider';\nimport {WebContextValues} from '../provider/web-context';\nimport style from './style.css';\nimport propTypes, {StatusItemProps} from './types';\n\nconst Content = (props: StatusItemProps, legacyContext: WebContextValues) => {\n const {icon, current, value} = props;\n const translate = GetTranslateFromContext(legacyContext);\n let child;\n let contentAriaLabel;\n switch (icon) {\n case 'no-answer':\n child = value;\n contentAriaLabel = translate('review_header_step_item.not_answered_question', {\n current: current ? 'current ' : '',\n headerStepValue: value\n });\n break;\n\n case 'right':\n child = (\n <RightIcon\n className={classnames(style.rightIcon, current && style.currentRightIcon)}\n role=\"status\"\n aria-label={translate('review_header_step_item.correct_question', {\n current: current ? 'current ' : '',\n headerStepValue: value\n })}\n />\n );\n break;\n\n case 'wrong':\n child = (\n <WrongIcon\n className={classnames(style.wrongIcon, current && style.currentWrongIcon)}\n role=\"alert\"\n aria-label={translate('review_header_step_item.incorrect_question', {\n current: current ? 'current ' : '',\n headerStepValue: value\n })}\n />\n );\n break;\n\n case 'errors-number':\n child = value;\n contentAriaLabel = translate('bulk_import.errors_number', {\n bulkImportErrorsNumber: value\n });\n break;\n\n case 'valid':\n child = (\n <RightIcon\n className={classnames(style.validIcon)}\n role=\"status\"\n aria-label={translate('bulk_import.valid_scorm')}\n />\n );\n break;\n\n case 'invalid':\n child = (\n <WrongIcon\n className={classnames(style.invalidIcon)}\n role=\"alert\"\n aria-label={translate('bulk_import.invalid_scorm')}\n />\n );\n break;\n\n default:\n return null;\n }\n\n return (\n <span\n {...(icon === 'no-answer' || icon === 'errors-number'\n ? {'aria-label': contentAriaLabel, role: 'status'}\n : {})}\n className={style.value}\n >\n {child}\n </span>\n );\n};\n\nconst StatusItem = (props: StatusItemProps) => {\n const {icon, current} = props;\n return (\n <div\n className={classnames(\n style.default,\n icon === 'right' && style.right,\n icon === 'wrong' && style.wrong,\n current && style.current,\n icon === 'valid' && style.valid,\n icon === 'invalid' && style.invalid,\n icon === 'errors-number' && style.errorsNumber\n )}\n data-name=\"status-item\"\n >\n <Content {...props} />\n </div>\n );\n};\n\nContent.propTypes = propTypes;\n\nContent.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nStatusItem.propTypes = propTypes;\n\nexport default StatusItem;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAIA;;AAEA;;AACA;;;;;;;;;;AAEA,MAAMA,OAAO,GAAG,CAACC,KAAD,EAAyBC,aAAzB,KAA6D;EAC3E,MAAM;IAACC,IAAD;IAAOC,OAAP;IAAgBC;EAAhB,IAAyBJ,KAA/B;EACA,MAAMK,SAAS,GAAG,IAAAC,iCAAA,EAAwBL,aAAxB,CAAlB;EACA,IAAIM,KAAJ;EACA,IAAIC,gBAAJ;;EACA,QAAQN,IAAR;IACE,KAAK,WAAL;MACEK,KAAK,GAAGH,KAAR;MACAI,gBAAgB,GAAGH,SAAS,CAAC,+CAAD,EAAkD;QAC5EF,OAAO,EAAEA,OAAO,GAAG,UAAH,GAAgB,EAD4C;QAE5EM,eAAe,EAAEL;MAF2D,CAAlD,CAA5B;MAIA;;IAEF,KAAK,OAAL;MACEG,KAAK,gBACH,6BAAC,2CAAD;QACE,SAAS,EAAE,IAAAG,mBAAA,EAAWC,cAAA,CAAMC,SAAjB,EAA4BT,OAAO,IAAIQ,cAAA,CAAME,gBAA7C,CADb;QAEE,IAAI,EAAC,QAFP;QAGE,cAAYR,SA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Ma,UAAU,GAAIpB,KAAD,IAA4B;EAC7C,MAAM;IAACE,IAAD;IAAOC;EAAP,IAAkBH,KAAxB;EACA,oBACE;IACE,SAAS,EAAE,IAAAU,mBAAA,EACTC,cAAA,CAAMU,OADG,EAETnB,IAAI,KAAK,OAAT,IAAoBS,cAAA,CAAMW,KAFjB,EAGTpB,IAAI,KAAK,OAAT,IAAoBS,cAAA,CAAMY,KAHjB,EAITpB,OAAO,IAAIQ,cAAA,CAAMR,OAJR,EAKTD,IAAI,KAAK,OAAT,IAAoBS,cAAA,CAAMa,KALjB,EAMTtB,IAAI,KAAK,SAAT,IAAsBS,cAAA,CAAMc,OANnB,EAOTvB,IAAI,KAAK,eAAT,IAA4BS,cAAA,CAAMe,YAPzB,CADb;IAUE,aAAU;EAVZ,gBAYE,6BAAC,OAAD,EAAa1B,KAAb,CAZF,CADF;AAgBD,CAlBD;;AAoBAD,OAAO,CAAC4B,SAAR,2CAAoBA,cAApB;AAEA5B,OAAO,CAAC6B,YAAR,GAAuB;EACrBC,IAAI,EAAEC,iBAAA,CAASC,iBAAT,CAA2BF,IADZ;EAErBxB,SAAS,EAAEyB,iBAAA,CAASC,iBAAT,CAA2B1B;AAFjB,CAAvB;AAKAe,UAAU,CAACO,SAAX,2CAAuBA,cAAvB;eAEeP,U"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { StatusItemProps } from './types';
3
+ declare const Step: ({ value, icon, current }: StatusItemProps) => JSX.Element | null;
4
+ export default Step;
5
+ //# sourceMappingURL=index.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/status-item/index.native.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AA6CxC,QAAA,MAAM,IAAI,6BAA4B,eAAe,uBA2BpD,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
 
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
 
18
- const createStyle = (current, icon) => {
18
+ const createStyle = (icon, current) => {
19
19
  let backgroundColor;
20
20
 
21
21
  switch (icon) {
@@ -61,7 +61,7 @@ const Step = ({
61
61
  }) => {
62
62
  const [style, setStyle] = (0, _react.useState)(null);
63
63
  (0, _react.useEffect)(() => {
64
- const _style = createStyle(current, icon);
64
+ const _style = createStyle(icon, current);
65
65
 
66
66
  setStyle(_style);
67
67
  }, [current, icon]);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.native.js","names":["createStyle","icon","current","backgroundColor","COLORS","positive","negative","gray","StyleSheet","create","step","width","height","opacity","marginHorizontal","alignItems","justifyContent","borderRadius","stepText","fontWeight","fontSize","Step","value","style","setStyle","useState","useEffect","_style","child"],"sources":["../../../src/atom/status-item/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {StyleSheet, Text, TextStyle, View, ViewStyle} from 'react-native';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon\n} from '@coorpacademy/nova-icons';\nimport {COLORS} from '../../variables/colors';\nimport {StatusItemProps} from './types';\n\ntype StyleSheetType = {\n step: ViewStyle;\n stepText: TextStyle;\n icon: ViewStyle;\n};\n\nconst createStyle = (icon: StatusItemProps['icon'], current?: boolean): StyleSheetType => {\n let backgroundColor;\n\n switch (icon) {\n case 'right':\n backgroundColor = COLORS.positive;\n break;\n case 'wrong':\n backgroundColor = COLORS.negative;\n break;\n case 'no-answer':\n default:\n backgroundColor = COLORS.gray;\n }\n\n return StyleSheet.create({\n step: {\n width: current ? 40 : 32,\n height: current ? 40 : 32,\n opacity: current ? 1 : 0.5,\n marginHorizontal: 8,\n backgroundColor,\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 50\n },\n stepText: {\n fontWeight: '600',\n fontSize: current ? 16 : 12\n },\n icon: {\n width: current ? 14 : 12,\n height: current ? 14 : 12\n }\n });\n};\n\nconst Step = ({value, icon, current}: StatusItemProps) => {\n const [style, setStyle] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _style = createStyle(icon, current);\n setStyle(_style);\n }, [current, icon]);\n\n if (!style) {\n return null;\n }\n\n let child;\n\n switch (icon) {\n case 'right':\n child = <RightIcon style={style.icon} color=\"#fff\" />;\n break;\n case 'wrong':\n child = <WrongIcon style={style.icon} color=\"#fff\" />;\n break;\n case 'no-answer':\n default:\n child = <Text style={style.stepText}>{value}</Text>;\n }\n\n return <View style={style.step}>{child}</View>;\n};\n\nexport default Step;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAIA;;;;;;AASA,MAAMA,WAAW,GAAG,CAACC,IAAD,EAAgCC,OAAhC,KAAsE;EACxF,IAAIC,eAAJ;;EAEA,QAAQF,IAAR;IACE,KAAK,OAAL;MACEE,eAAe,GAAGC,cAAA,CAAOC,QAAzB;MACA;;IACF,KAAK,OAAL;MACEF,eAAe,GAAGC,cAAA,CAAOE,QAAzB;MACA;;IACF,KAAK,WAAL;IACA;MACEH,eAAe,GAAGC,cAAA,CAAOG,IAAzB;EATJ;;EAYA,OAAOC,uBAAA,CAAWC,MAAX,CAAkB;IACvBC,IAAI,EAAE;MACJC,KAAK,EAAET,OAAO,GAAG,EAAH,GAAQ,EADlB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,6BAAC,iBAAD;QAAM,KAAK,EAAEL,KAAK,CAACL;MAAnB,GAA8BI,KAA9B,CAAR;EATJ;;EAYA,oBAAO,6BAAC,iBAAD;IAAM,KAAK,EAAEC,KAAK,CAACb;EAAnB,GAA0BkB,KAA1B,CAAP;AACD,CA3BD;;eA6BeP,I"}
@@ -3,6 +3,12 @@
3
3
  @value cm_positive_100 from colors;
4
4
  @value cm_negative_100 from colors;
5
5
  @value white from colors;
6
+ @value positive from colors;
7
+ @value negative from colors;
8
+ @value cm_negative_50 from colors;
9
+ @value cm_green_secondary_200 from colors;
10
+ @value cm_green_secondary_100 from colors;
11
+ @value cm_pink_50 from colors;
6
12
 
7
13
  .default {
8
14
  width: 32px;
@@ -62,4 +68,45 @@
62
68
  transform: scale(1.5);
63
69
  }
64
70
 
71
+ /* ----------------- CM bulk theme ------------------------- */
65
72
 
73
+
74
+ .valid {
75
+ opacity: 1;
76
+ width: 24px;
77
+ height: 24px;
78
+ background-color: cm_green_secondary_100;
79
+ }
80
+
81
+ .validIcon {
82
+ color: cm_green_secondary_200;
83
+ width: 12px;
84
+ height: 10px;
85
+ transition: transform 0.25s ease;
86
+ }
87
+
88
+ .invalid {
89
+ opacity: 1;
90
+ width: 24px;
91
+ height: 24px;
92
+ background-color: cm_negative_50;
93
+ }
94
+
95
+ .invalidIcon {
96
+ color: cm_negative_100;
97
+ width: 10px;
98
+ height: 10px;
99
+ transition: color 0.25s ease;
100
+ }
101
+
102
+ .errorsNumber {
103
+ opacity: 1;
104
+ width: 24px;
105
+ height: 24px;
106
+ background-color: cm_pink_50;
107
+ color: cm_negative_100;
108
+ font-family: 'Gilroy';
109
+ font-style: normal;
110
+ font-weight: 600;
111
+ font-size: 14px;
112
+ }
@@ -5,12 +5,12 @@ declare const propTypes: {
5
5
  value: PropTypes.Requireable<string>;
6
6
  };
7
7
  export default propTypes;
8
- export declare type HeaderStepItemProps = {
9
- current: boolean;
10
- icon: 'no-answer' | 'right' | 'wrong';
11
- value: string;
8
+ export declare type StatusItemProps = {
9
+ current?: boolean;
10
+ icon: 'no-answer' | 'right' | 'wrong' | 'valid' | 'invalid' | 'errors-number';
11
+ value?: string;
12
12
  };
13
13
  export declare type Fixture = {
14
- props: HeaderStepItemProps;
14
+ props: StatusItemProps;
15
15
  };
16
16
  //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/status-item/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,QAAA,MAAM,SAAS;;;;CAId,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,eAAe,CAAC;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,OAAO,GAAG;IACpB,KAAK,EAAE,eAAe,CAAC;CACxB,CAAC"}
@@ -9,7 +9,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
9
9
 
10
10
  const propTypes = {
11
11
  current: _propTypes.default.bool,
12
- icon: _propTypes.default.oneOf(['no-answer', 'right', 'wrong']),
12
+ icon: _propTypes.default.oneOf(['no-answer', 'right', 'wrong', 'valid', 'invalid', 'errors-number']),
13
13
  value: _propTypes.default.string
14
14
  };
15
15
  var _default = propTypes;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":["propTypes","current","PropTypes","bool","icon","oneOf","value","string"],"sources":["../../../src/atom/status-item/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst propTypes = {\n current: PropTypes.bool,\n icon: PropTypes.oneOf(['no-answer', 'right', 'wrong', 'valid', 'invalid', 'errors-number']),\n value: PropTypes.string\n};\n\nexport default propTypes;\n\nexport type StatusItemProps = {\n current?: boolean;\n icon: 'no-answer' | 'right' | 'wrong' | 'valid' | 'invalid' | 'errors-number';\n value?: string;\n};\n\nexport type Fixture = {\n props: StatusItemProps;\n};\n"],"mappings":";;;;;AAAA;;;;AAEA,MAAMA,SAAS,GAAG;EAChBC,OAAO,EAAEC,kBAAA,CAAUC,IADH;EAEhBC,IAAI,EAAEF,kBAAA,CAAUG,KAAV,CAAgB,CAAC,WAAD,EAAc,OAAd,EAAuB,OAAvB,EAAgC,OAAhC,EAAyC,SAAzC,EAAoD,eAApD,CAAhB,CAFU;EAGhBC,KAAK,EAAEJ,kBAAA,CAAUK;AAHD,CAAlB;eAMeP,S"}
@@ -56,6 +56,8 @@ declare namespace BrandFormGroup {
56
56
  disabled: PropTypes.Requireable<boolean>;
57
57
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
58
58
  description: PropTypes.Requireable<string>;
59
+ 'aria-labelledby': PropTypes.Requireable<string>;
60
+ 'aria-label': PropTypes.Requireable<string>;
59
61
  modified: PropTypes.Requireable<boolean>;
60
62
  titlePosition: PropTypes.Requireable<string>;
61
63
  theme: PropTypes.Requireable<string>;
@@ -109,6 +111,7 @@ declare namespace BrandFormGroup {
109
111
  modified: PropTypes.Requireable<boolean>;
110
112
  error: PropTypes.Requireable<boolean>;
111
113
  'aria-label': PropTypes.Requireable<string>;
114
+ 'aria-labelledby': PropTypes.Requireable<string>;
112
115
  }> | PropTypes.InferProps<{
113
116
  type: PropTypes.Requireable<string>;
114
117
  title: PropTypes.Validator<string>;
@@ -188,6 +191,8 @@ declare namespace BrandFormGroup {
188
191
  disabled: PropTypes.Requireable<boolean>;
189
192
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
190
193
  description: PropTypes.Requireable<string>;
194
+ 'aria-labelledby': PropTypes.Requireable<string>;
195
+ 'aria-label': PropTypes.Requireable<string>;
191
196
  modified: PropTypes.Requireable<boolean>;
192
197
  titlePosition: PropTypes.Requireable<string>;
193
198
  theme: PropTypes.Requireable<string>;
@@ -224,6 +229,7 @@ declare namespace BrandFormGroup {
224
229
  modified: PropTypes.Requireable<boolean>;
225
230
  error: PropTypes.Requireable<boolean>;
226
231
  'aria-label': PropTypes.Requireable<string>;
232
+ 'aria-labelledby': PropTypes.Requireable<string>;
227
233
  }> | PropTypes.InferProps<{
228
234
  type: PropTypes.Requireable<string>;
229
235
  title: PropTypes.Validator<string>;
@@ -328,6 +334,8 @@ declare namespace BrandFormGroup {
328
334
  disabled: PropTypes.Requireable<boolean>;
329
335
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
330
336
  description: PropTypes.Requireable<string>;
337
+ 'aria-labelledby': PropTypes.Requireable<string>;
338
+ 'aria-label': PropTypes.Requireable<string>;
331
339
  modified: PropTypes.Requireable<boolean>;
332
340
  titlePosition: PropTypes.Requireable<string>;
333
341
  theme: PropTypes.Requireable<string>;
@@ -41,6 +41,8 @@ declare const propTypes: {
41
41
  disabled: PropTypes.Requireable<boolean>;
42
42
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
43
43
  description: PropTypes.Requireable<string>;
44
+ 'aria-labelledby': PropTypes.Requireable<string>;
45
+ 'aria-label': PropTypes.Requireable<string>;
44
46
  modified: PropTypes.Requireable<boolean>;
45
47
  titlePosition: PropTypes.Requireable<string>;
46
48
  theme: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCd,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE;QACZ,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,YAAY,CAAC,EAAE,eAAe,CAAC;CAChC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCd,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE;QACZ,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,YAAY,CAAC,EAAE,eAAe,CAAC;CAChC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -18,6 +18,8 @@ declare namespace DraggableList {
18
18
  disabled: PropTypes.Requireable<boolean>;
19
19
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
20
20
  description: PropTypes.Requireable<string>;
21
+ 'aria-labelledby': PropTypes.Requireable<string>;
22
+ 'aria-label': PropTypes.Requireable<string>;
21
23
  modified: PropTypes.Requireable<boolean>;
22
24
  titlePosition: PropTypes.Requireable<string>;
23
25
  theme: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"filters-wrapper.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/filters-wrapper.js"],"names":[],"mappings":";AAUA,sEA6DC"}
1
+ {"version":3,"file":"filters-wrapper.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/filters-wrapper.js"],"names":[],"mappings":";AAUA,sEA+DC"}
@@ -80,10 +80,13 @@ const FiltersWapper = (props, context) => {
80
80
  className: _filtersWapper.default.choice,
81
81
  key: idx
82
82
  }, /*#__PURE__*/_react.default.createElement("p", {
83
+ id: `title-id-${idx}`,
83
84
  className: _filtersWapper.default.title
84
85
  }, filter.title), /*#__PURE__*/_react.default.createElement("div", {
85
86
  className: _filtersWapper.default.toggle
86
- }, /*#__PURE__*/_react.default.createElement(_inputSwitch.default, filter.display)));
87
+ }, /*#__PURE__*/_react.default.createElement(_inputSwitch.default, _extends({}, filter.display, {
88
+ "aria-labelledby": `title-id-${idx}`
89
+ }))));
87
90
 
88
91
  default:
89
92
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"filters-wrapper.js","names":["FiltersWapper","props","context","filters","className","filterGroupAriaLabel","buildFilter","filter","idx","type","fieldName","style","choice","title","radioGroup","timerWrapper","timerSubtitle","subtitle","toggle","display","filtersList","convert","cap","emptyFilters","classnames","wrapperNone","wrapper","propTypes","PropTypes","string","arrayOf","shape","oneOf","isRequired"],"sources":["../../../src/molecule/filters/filters-wrapper.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Select from '../../atom/select';\nimport InputSwitch from '../../atom/input-switch';\nimport RadioGroup from '../../atom/radio-group';\nimport RangeSlider from '../../atom/range';\nimport style from './filters-wapper.css';\n\nconst FiltersWapper = (props, context) => {\n const {filters, className, filterGroupAriaLabel} = props;\n\n const buildFilter = (filter, idx) => {\n const {type, fieldName} = filter;\n switch (type) {\n case 'select':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <Select {...filter} />\n </div>\n );\n case 'radio':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p className={style.title}>{filter.title}</p>\n <RadioGroup {...filter} className={style.radioGroup} />\n </div>\n );\n case 'range':\n return (\n <div\n data-name=\"choice\"\n data-filter-type={fieldName}\n className={style.timerWrapper}\n key={idx}\n >\n <label>\n <span className={style.title}>{filter.title}</span>\n <p className={style.timerSubtitle}>{filter.subtitle}</p>\n <RangeSlider {...filter} />\n </label>\n </div>\n );\n case 'switch':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p className={style.title}>{filter.title}</p>\n <div className={style.toggle}>\n <InputSwitch {...filter.display} />\n </div>\n </div>\n );\n default:\n return null;\n }\n };\n\n const filtersList = map.convert({cap: false})(buildFilter, filters);\n const emptyFilters = isEmpty(filters);\n return (\n <form>\n <div\n className={classnames(className, emptyFilters ? style.wrapperNone : style.wrapper)}\n role=\"group\"\n aria-label={filterGroupAriaLabel}\n >\n {filtersList}\n </div>\n </form>\n );\n};\n\nFiltersWapper.propTypes = {\n className: PropTypes.string,\n filters: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf(['select', 'range', 'radio', 'switch']).isRequired,\n fieldName: PropTypes.string.isRequired\n })\n ),\n filterGroupAriaLabel: PropTypes.string\n};\nexport default FiltersWapper;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,aAAa,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACxC,MAAM;IAACC,OAAD;IAAUC,SAAV;IAAqBC;EAArB,IAA6CJ,KAAnD;;EAEA,MAAMK,WAAW,GAAG,CAACC,MAAD,EAASC,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CAACY,OAAxB,CADF,CAFF,CADF;;MAQF;QACE,OAAO,IAAP;IAvCJ;EAyCD,CA3CD;;EA6CA,MAAMC,WAAW,GAAG,cAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0BhB,WAA1B,EAAuCH,OAAvC,CAApB;;EACA,MAAMoB,YAAY,GAAG,uBAAQpB,OAAR,CAArB;EACA,oBACE,wDACE;IACE,SAAS,EAAE,IAAAqB,mBAAA,EAAWpB,SAAX,EAAsBmB,YAAY,GAAGZ,sBAAA,CAAMc,WAAT,GAAuBd,sBAAA,CAAMe,OAA/D,CADb;IAEE,IAAI,EAAC,OAFP;IAGE,cAAYrB;EAHd,GAKGe,WALH,CADF,CADF;AAWD,CA7DD;;AA+DApB,aAAa,CAAC2B,SAAd,2CAA0B;EACxBvB,SAAS,EAAEwB,kBAAA,CAAUC,MADG;EAExB1B,OAAO,EAAEyB,kBAAA,CAAUE,OAAV,CACPF,kBAAA,CAAUG,KAAV,CAAgB;IACdtB,IAAI,EAAEmB,kBAAA,CAAUI,KAAV,CAAgB,CAAC,QAAD,EAAW,OAAX,EAAoB,OAApB,EAA6B,QAA7B,CAAhB,EAAwDC,UADhD;IAEdvB,SAAS,EAAEkB,kBAAA,CAAUC,MAAV,CAAiBI;EAFd,CAAhB,CADO,CAFe;EAQxB5B,oBAAoB,EAAEuB,kBAAA,CAAUC;AARR,CAA1B;eAUe7B,a"}
1
+ {"version":3,"file":"filters-wrapper.js","names":["FiltersWapper","props","context","filters","className","filterGroupAriaLabel","buildFilter","filter","idx","type","fieldName","style","choice","title","radioGroup","timerWrapper","timerSubtitle","subtitle","toggle","display","filtersList","convert","cap","emptyFilters","classnames","wrapperNone","wrapper","propTypes","PropTypes","string","arrayOf","shape","oneOf","isRequired"],"sources":["../../../src/molecule/filters/filters-wrapper.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Select from '../../atom/select';\nimport InputSwitch from '../../atom/input-switch';\nimport RadioGroup from '../../atom/radio-group';\nimport RangeSlider from '../../atom/range';\nimport style from './filters-wapper.css';\n\nconst FiltersWapper = (props, context) => {\n const {filters, className, filterGroupAriaLabel} = props;\n\n const buildFilter = (filter, idx) => {\n const {type, fieldName} = filter;\n switch (type) {\n case 'select':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <Select {...filter} />\n </div>\n );\n case 'radio':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p className={style.title}>{filter.title}</p>\n <RadioGroup {...filter} className={style.radioGroup} />\n </div>\n );\n case 'range':\n return (\n <div\n data-name=\"choice\"\n data-filter-type={fieldName}\n className={style.timerWrapper}\n key={idx}\n >\n <label>\n <span className={style.title}>{filter.title}</span>\n <p className={style.timerSubtitle}>{filter.subtitle}</p>\n <RangeSlider {...filter} />\n </label>\n </div>\n );\n case 'switch':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p id={`title-id-${idx}`} className={style.title}>\n {filter.title}\n </p>\n <div className={style.toggle}>\n <InputSwitch {...filter.display} aria-labelledby={`title-id-${idx}`} />\n </div>\n </div>\n );\n default:\n return null;\n }\n };\n\n const filtersList = map.convert({cap: false})(buildFilter, filters);\n const emptyFilters = isEmpty(filters);\n return (\n <form>\n <div\n className={classnames(className, emptyFilters ? style.wrapperNone : style.wrapper)}\n role=\"group\"\n aria-label={filterGroupAriaLabel}\n >\n {filtersList}\n </div>\n </form>\n );\n};\n\nFiltersWapper.propTypes = {\n className: PropTypes.string,\n filters: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf(['select', 'range', 'radio', 'switch']).isRequired,\n fieldName: PropTypes.string.isRequired\n })\n ),\n filterGroupAriaLabel: PropTypes.string\n};\nexport default FiltersWapper;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;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,GAAG,EAAEJ;QAAnF,gBACE;UAAG,EAAE,EAAG,YAAWA,GAAI,EAAvB;UAA0B,SAAS,EAAEG,sBAAA,CAAME;QAA3C,GACGN,MAAM,CAACM,KADV,CADF,eAIE;UAAK,SAAS,EAAEF,sBAAA,CAAMO;QAAtB,gBACE,6BAAC,oBAAD,eAAiBX,MAAM,CAACY,OAAxB;UAAiC,mBAAkB,YAAWX,GAAI;QAAlE,GADF,CAJF,CADF;;MAUF;QACE,OAAO,IAAP;IAzCJ;EA2CD,CA7CD;;EA+CA,MAAMY,WAAW,GAAG,cAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0BhB,WAA1B,EAAuCH,OAAvC,CAApB;;EACA,MAAMoB,YAAY,GAAG,uBAAQpB,OAAR,CAArB;EACA,oBACE,wDACE;IACE,SAAS,EAAE,IAAAqB,mBAAA,EAAWpB,SAAX,EAAsBmB,YAAY,GAAGZ,sBAAA,CAAMc,WAAT,GAAuBd,sBAAA,CAAMe,OAA/D,CADb;IAEE,IAAI,EAAC,OAFP;IAGE,cAAYrB;EAHd,GAKGe,WALH,CADF,CADF;AAWD,CA/DD;;AAiEApB,aAAa,CAAC2B,SAAd,2CAA0B;EACxBvB,SAAS,EAAEwB,kBAAA,CAAUC,MADG;EAExB1B,OAAO,EAAEyB,kBAAA,CAAUE,OAAV,CACPF,kBAAA,CAAUG,KAAV,CAAgB;IACdtB,IAAI,EAAEmB,kBAAA,CAAUI,KAAV,CAAgB,CAAC,QAAD,EAAW,OAAX,EAAoB,OAApB,EAA6B,QAA7B,CAAhB,EAAwDC,UADhD;IAEdvB,SAAS,EAAEkB,kBAAA,CAAUC,MAAV,CAAiBI;EAFd,CAAhB,CADO,CAFe;EAQxB5B,oBAAoB,EAAEuB,kBAAA,CAAUC;AARR,CAA1B;eAUe7B,a"}
@@ -40,6 +40,7 @@ declare class Filters extends React.Component<any, any, any> {
40
40
  modified: PropTypes.Requireable<boolean>;
41
41
  error: PropTypes.Requireable<boolean>;
42
42
  'aria-label': PropTypes.Requireable<string>;
43
+ 'aria-labelledby': PropTypes.Requireable<string>;
43
44
  }>>;
44
45
  onSearch: PropTypes.Requireable<(...args: any[]) => any>;
45
46
  onToggleFilters: PropTypes.Requireable<(...args: any[]) => any>;
@@ -47,6 +48,7 @@ declare class Filters extends React.Component<any, any, any> {
47
48
  moreSortAriaLabel: PropTypes.Requireable<string>;
48
49
  moreFilterAriaLabel: PropTypes.Requireable<string>;
49
50
  filterGroupAriaLabel: PropTypes.Requireable<string>;
51
+ sortAriaLabel: PropTypes.Requireable<string>;
50
52
  };
51
53
  static contextTypes: {
52
54
  skin: PropTypes.Requireable<PropTypes.InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAeE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBASC;IAPC;;;MAGC;IAMH,yBAcC;IAED,uBAYC;IAED,qBAOC;IAED,sBA2FC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBASC;IAPC;;;MAGC;IAMH,yBAcC;IAED,uBAYC;IAED,qBAOC;IAED,sBA4FC;CACF"}
@@ -21,6 +21,8 @@ var _filtersWrapper = _interopRequireDefault(require("./filters-wrapper"));
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
24
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
+
24
26
  class Filters extends _react.default.Component {
25
27
  constructor(props) {
26
28
  super(props);
@@ -87,7 +89,8 @@ class Filters extends _react.default.Component {
87
89
  filters,
88
90
  moreFilterAriaLabel,
89
91
  moreSortAriaLabel,
90
- filterGroupAriaLabel
92
+ filterGroupAriaLabel,
93
+ sortAriaLabel
91
94
  } = this.props;
92
95
  const {
93
96
  filter,
@@ -103,7 +106,9 @@ class Filters extends _react.default.Component {
103
106
  const sortView = sorting !== undefined ? /*#__PURE__*/_react.default.createElement("div", {
104
107
  "data-name": "choice",
105
108
  className: _style.default.select
106
- }, /*#__PURE__*/_react.default.createElement(_select.default, sorting)) : null;
109
+ }, /*#__PURE__*/_react.default.createElement(_select.default, _extends({}, sorting, {
110
+ "aria-label": sortAriaLabel
111
+ }))) : null;
107
112
  return /*#__PURE__*/_react.default.createElement("div", {
108
113
  "data-name": "search",
109
114
  className: _style.default.search
@@ -185,7 +190,8 @@ Filters.propTypes = process.env.NODE_ENV !== "production" ? {
185
190
  onToggleSorts: _propTypes.default.func,
186
191
  moreSortAriaLabel: _propTypes.default.string,
187
192
  moreFilterAriaLabel: _propTypes.default.string,
188
- filterGroupAriaLabel: _propTypes.default.string
193
+ filterGroupAriaLabel: _propTypes.default.string,
194
+ sortAriaLabel: _propTypes.default.string
189
195
  } : {};
190
196
  var _default = Filters;
191
197
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Filters","React","Component","constructor","props","state","filter","openFilters","sorted","openSorts","handleOpenFilter","bind","handleOpenSort","handleSearch","onToggleFilters","newValue","setState","onToggleSorts","onSearch","render","sorting","filterCTALabel","filterTabLabel","sortCTALabel","sortTabLabel","filters","moreFilterAriaLabel","moreSortAriaLabel","filterGroupAriaLabel","skin","context","defaultColor","darkColor","filtersActive","sortingActive","sortView","undefined","style","select","search","activeDefault","default","title","arrow","color","activeWrapperSortBy","wrapperSortBy","activeWrapperFilters","wrapperFilters","wrapper","CTAfilter","backgroundColor","activeSorting","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","bool","FiltersWrapper","shape","Select","func"],"sources":["../../../src/molecule/filters/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Select from '../../atom/select';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\nimport FiltersWrapper from './filters-wrapper';\n\nclass Filters extends React.Component {\n static propTypes = {\n filterCTALabel: PropTypes.string,\n filterTabLabel: PropTypes.string,\n sortCTALabel: PropTypes.string,\n sortTabLabel: PropTypes.string,\n openFilters: PropTypes.bool,\n openSorts: PropTypes.bool,\n filters: FiltersWrapper.propTypes.filters,\n sorting: PropTypes.shape(Select.propTypes),\n onSearch: PropTypes.func,\n onToggleFilters: PropTypes.func,\n onToggleSorts: PropTypes.func,\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string,\n filterGroupAriaLabel: PropTypes.string\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n constructor(props) {\n super(props);\n this.state = {\n filter: !!props.openFilters,\n sorted: !!props.openSorts\n };\n this.handleOpenFilter = this.handleOpenFilter.bind(this);\n this.handleOpenSort = this.handleOpenSort.bind(this);\n this.handleSearch = this.handleSearch.bind(this);\n }\n\n handleOpenFilter() {\n const {filter} = this.state;\n const {onToggleFilters} = this.props;\n\n const newValue = !filter;\n\n this.setState({\n filter: newValue,\n sorted: false\n });\n\n if (onToggleFilters) {\n onToggleFilters(newValue);\n }\n }\n\n handleOpenSort() {\n const {sorted} = this.state;\n const {onToggleSorts} = this.props;\n\n const newValue = !sorted;\n\n this.setState({\n sorted: newValue,\n filter: false\n });\n\n if (onToggleSorts) onToggleSorts(newValue);\n }\n\n handleSearch() {\n const {onSearch} = this.props;\n this.setState({\n sorted: false,\n filter: false\n });\n if (onSearch) onSearch();\n }\n\n render() {\n const {\n sorting,\n filterCTALabel,\n filterTabLabel,\n sortCTALabel,\n sortTabLabel,\n filters,\n moreFilterAriaLabel,\n moreSortAriaLabel,\n filterGroupAriaLabel\n } = this.props;\n const {filter, sorted} = this.state;\n const {skin} = this.context;\n\n const defaultColor = get('common.primary', skin);\n const darkColor = get('common.dark', skin);\n const filtersActive = filter === true;\n const sortingActive = sorted === true;\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\" className={style.select}>\n <Select {...sorting} />\n </div>\n ) : null;\n\n return (\n <div data-name=\"search\" className={style.search}>\n <div\n data-name=\"filter\"\n data-open={filtersActive}\n className={filtersActive ? style.activeDefault : style.default}\n >\n <div className={style.title} data-name=\"filterButton\" onClick={this.handleOpenFilter}>\n {filterTabLabel}\n <div className={style.arrow}>\n <ArrowDown style={{color: darkColor}} height={14} aria-label={moreFilterAriaLabel} />\n </div>\n </div>\n </div>\n <div\n data-name=\"sortBy\"\n data-open={sortingActive}\n className={sortingActive ? style.activeWrapperSortBy : style.wrapperSortBy}\n >\n <div className={style.title} data-name=\"sortButton\" onClick={this.handleOpenSort}>\n {sortTabLabel}\n <div className={style.arrow}>\n <ArrowDown style={{color: darkColor}} height={14} aria-label={moreSortAriaLabel} />\n </div>\n </div>\n </div>\n <div\n data-name=\"filterWrapper\"\n className={filtersActive ? style.activeWrapperFilters : style.wrapperFilters}\n >\n <FiltersWrapper\n className={style.wrapper}\n filters={filters}\n filterGroupAriaLabel={filterGroupAriaLabel}\n />\n <div\n data-name=\"cta\"\n className={style.CTAfilter}\n style={{\n backgroundColor: defaultColor\n }}\n onClick={this.handleSearch}\n >\n {filterCTALabel}\n </div>\n </div>\n <div\n data-name=\"sortWrapper\"\n className={sortingActive ? style.activeSorting : style.sorting}\n >\n {sortView}\n <div\n data-name=\"cta\"\n className={style.CTAfilter}\n style={{\n backgroundColor: defaultColor\n }}\n onClick={this.handleSearch}\n >\n {sortCTALabel}\n </div>\n </div>\n </div>\n );\n }\n}\n\n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CACGwD,S,2CAAY;EACjBnC,cAAc,EAAEoC,kBAAA,CAAUC,MADT;EAEjBpC,cAAc,EAAEmC,kBAAA,CAAUC,MAFT;EAGjBnC,YAAY,EAAEkC,kBAAA,CAAUC,MAHP;EAIjBlC,YAAY,EAAEiC,kBAAA,CAAUC,MAJP;EAKjBnD,WAAW,EAAEkD,kBAAA,CAAUE,IALN;EAMjBlD,SAAS,EAAEgD,kBAAA,CAAUE,IANJ;EAOjBlC,OAAO,EAAEmC,uBAAA,CAAeJ,SAAf,CAAyB/B,OAPjB;EAQjBL,OAAO,EAAEqC,kBAAA,CAAUI,KAAV,CAAgBC,eAAA,CAAON,SAAvB,CARQ;EASjBtC,QAAQ,EAAEuC,kBAAA,CAAUM,IATH;EAUjBjD,eAAe,EAAE2C,kBAAA,CAAUM,IAVV;EAWjB9C,aAAa,EAAEwC,kBAAA,CAAUM,IAXR;EAYjBpC,iBAAiB,EAAE8B,kBAAA,CAAUC,MAZZ;EAajBhC,mBAAmB,EAAE+B,kBAAA,CAAUC,MAbd;EAcjB9B,oBAAoB,EAAE6B,kBAAA,CAAUC;AAdf,C;eAqKN1D,O"}
1
+ {"version":3,"file":"index.js","names":["Filters","React","Component","constructor","props","state","filter","openFilters","sorted","openSorts","handleOpenFilter","bind","handleOpenSort","handleSearch","onToggleFilters","newValue","setState","onToggleSorts","onSearch","render","sorting","filterCTALabel","filterTabLabel","sortCTALabel","sortTabLabel","filters","moreFilterAriaLabel","moreSortAriaLabel","filterGroupAriaLabel","sortAriaLabel","skin","context","defaultColor","darkColor","filtersActive","sortingActive","sortView","undefined","style","select","search","activeDefault","default","title","arrow","color","activeWrapperSortBy","wrapperSortBy","activeWrapperFilters","wrapperFilters","wrapper","CTAfilter","backgroundColor","activeSorting","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","bool","FiltersWrapper","shape","Select","func"],"sources":["../../../src/molecule/filters/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Select from '../../atom/select';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\nimport FiltersWrapper from './filters-wrapper';\n\nclass Filters extends React.Component {\n static propTypes = {\n filterCTALabel: PropTypes.string,\n filterTabLabel: PropTypes.string,\n sortCTALabel: PropTypes.string,\n sortTabLabel: PropTypes.string,\n openFilters: PropTypes.bool,\n openSorts: PropTypes.bool,\n filters: FiltersWrapper.propTypes.filters,\n sorting: PropTypes.shape(Select.propTypes),\n onSearch: PropTypes.func,\n onToggleFilters: PropTypes.func,\n onToggleSorts: PropTypes.func,\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string,\n filterGroupAriaLabel: PropTypes.string,\n sortAriaLabel: PropTypes.string\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n constructor(props) {\n super(props);\n this.state = {\n filter: !!props.openFilters,\n sorted: !!props.openSorts\n };\n this.handleOpenFilter = this.handleOpenFilter.bind(this);\n this.handleOpenSort = this.handleOpenSort.bind(this);\n this.handleSearch = this.handleSearch.bind(this);\n }\n\n handleOpenFilter() {\n const {filter} = this.state;\n const {onToggleFilters} = this.props;\n\n const newValue = !filter;\n\n this.setState({\n filter: newValue,\n sorted: false\n });\n\n if (onToggleFilters) {\n onToggleFilters(newValue);\n }\n }\n\n handleOpenSort() {\n const {sorted} = this.state;\n const {onToggleSorts} = this.props;\n\n const newValue = !sorted;\n\n this.setState({\n sorted: newValue,\n filter: false\n });\n\n if (onToggleSorts) onToggleSorts(newValue);\n }\n\n handleSearch() {\n const {onSearch} = this.props;\n this.setState({\n sorted: false,\n filter: false\n });\n if (onSearch) onSearch();\n }\n\n render() {\n const {\n sorting,\n filterCTALabel,\n filterTabLabel,\n sortCTALabel,\n sortTabLabel,\n filters,\n moreFilterAriaLabel,\n moreSortAriaLabel,\n filterGroupAriaLabel,\n sortAriaLabel\n } = this.props;\n const {filter, sorted} = this.state;\n const {skin} = this.context;\n\n const defaultColor = get('common.primary', skin);\n const darkColor = get('common.dark', skin);\n const filtersActive = filter === true;\n const sortingActive = sorted === true;\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\" className={style.select}>\n <Select {...sorting} aria-label={sortAriaLabel} />\n </div>\n ) : null;\n\n return (\n <div data-name=\"search\" className={style.search}>\n <div\n data-name=\"filter\"\n data-open={filtersActive}\n className={filtersActive ? style.activeDefault : style.default}\n >\n <div className={style.title} data-name=\"filterButton\" onClick={this.handleOpenFilter}>\n {filterTabLabel}\n <div className={style.arrow}>\n <ArrowDown style={{color: darkColor}} height={14} aria-label={moreFilterAriaLabel} />\n </div>\n </div>\n </div>\n <div\n data-name=\"sortBy\"\n data-open={sortingActive}\n className={sortingActive ? style.activeWrapperSortBy : style.wrapperSortBy}\n >\n <div className={style.title} data-name=\"sortButton\" onClick={this.handleOpenSort}>\n {sortTabLabel}\n <div className={style.arrow}>\n <ArrowDown style={{color: darkColor}} height={14} aria-label={moreSortAriaLabel} />\n </div>\n </div>\n </div>\n <div\n data-name=\"filterWrapper\"\n className={filtersActive ? style.activeWrapperFilters : style.wrapperFilters}\n >\n <FiltersWrapper\n className={style.wrapper}\n filters={filters}\n filterGroupAriaLabel={filterGroupAriaLabel}\n />\n <div\n data-name=\"cta\"\n className={style.CTAfilter}\n style={{\n backgroundColor: defaultColor\n }}\n onClick={this.handleSearch}\n >\n {filterCTALabel}\n </div>\n </div>\n <div\n data-name=\"sortWrapper\"\n className={sortingActive ? style.activeSorting : style.sorting}\n >\n {sortView}\n <div\n data-name=\"cta\"\n className={style.CTAfilter}\n style={{\n backgroundColor: defaultColor\n }}\n onClick={this.handleSearch}\n >\n {sortCTALabel}\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default Filters;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,OAAN,SAAsBC,cAAA,CAAMC,SAA5B,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AAA,CAAUC,MAFT;EAGjBpC,YAAY,EAAEmC,kBAAA,CAAUC,MAHP;EAIjBnC,YAAY,EAAEkC,kBAAA,CAAUC,MAJP;EAKjBpD,WAAW,EAAEmD,kBAAA,CAAUE,IALN;EAMjBnD,SAAS,EAAEiD,kBAAA,CAAUE,IANJ;EAOjBnC,OAAO,EAAEoC,uBAAA,CAAeJ,SAAf,CAAyBhC,OAPjB;EAQjBL,OAAO,EAAEsC,kBAAA,CAAUI,KAAV,CAAgBC,eAAA,CAAON,SAAvB,CARQ;EASjBvC,QAAQ,EAAEwC,kBAAA,CAAUM,IATH;EAUjBlD,eAAe,EAAE4C,kBAAA,CAAUM,IAVV;EAWjB/C,aAAa,EAAEyC,kBAAA,CAAUM,IAXR;EAYjBrC,iBAAiB,EAAE+B,kBAAA,CAAUC,MAZZ;EAajBjC,mBAAmB,EAAEgC,kBAAA,CAAUC,MAbd;EAcjB/B,oBAAoB,EAAE8B,kBAAA,CAAUC,MAdf;EAejB9B,aAAa,EAAE6B,kBAAA,CAAUC;AAfR,C;eAuKN3D,O"}
@@ -7,7 +7,7 @@ var _react = _interopRequireDefault(require("react"));
7
7
 
8
8
  var _map = _interopRequireDefault(require("lodash/fp/map"));
9
9
 
10
- var _reviewHeaderStepItem = _interopRequireDefault(require("../../atom/review-header-step-item"));
10
+ var _statusItem = _interopRequireDefault(require("../../atom/status-item"));
11
11
 
12
12
  var _style = _interopRequireDefault(require("./style.css"));
13
13
 
@@ -24,7 +24,7 @@ const ReviewHeaderSteps = props => {
24
24
 
25
25
  const items = _map.default.convert({
26
26
  cap: false
27
- })((step, index) => /*#__PURE__*/_react.default.createElement(_reviewHeaderStepItem.default, _extends({}, step, {
27
+ })((step, index) => /*#__PURE__*/_react.default.createElement(_statusItem.default, _extends({}, step, {
28
28
  key: index
29
29
  })), steps);
30
30
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ReviewHeaderSteps","props","steps","items","map","convert","cap","step","index","style","wrapper","propTypes"],"sources":["../../../src/molecule/review-header-steps/index.js"],"sourcesContent":["import React from 'react';\nimport map from 'lodash/fp/map';\nimport ReviewHeaderStepItem from '../../atom/review-header-step-item';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ReviewHeaderSteps = props => {\n const {steps} = props;\n\n const items = map.convert({cap: false})(\n (step, index) => <ReviewHeaderStepItem {...step} key={index} />,\n steps\n );\n\n return (\n <div className={style.wrapper} data-name=\"header-steps\">\n {items}\n </div>\n );\n};\n\nReviewHeaderSteps.propTypes = propTypes;\n\nexport default ReviewHeaderSteps;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,iBAAiB,GAAGC,KAAK,IAAI;EACjC,MAAM;IAACC;EAAD,IAAUD,KAAhB;;EAEA,MAAME,KAAK,GAAGC,YAAA,CAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EACZ,CAACC,IAAD,EAAOC,KAAP,kBAAiB,6BAAC,6BAAD,eAA0BD,IAA1B;IAAgC,GAAG,EAAEC;EAArC,GADL,EAEZN,KAFY,CAAd;;EAKA,oBACE;IAAK,SAAS,EAAEO,cAAA,CAAMC,OAAtB;IAA+B,aAAU;EAAzC,GACGP,KADH,CADF;AAKD,CAbD;;AAeAH,iBAAiB,CAACW,SAAlB,2CAA8BA,kBAA9B;eAEeX,iB"}
1
+ {"version":3,"file":"index.js","names":["ReviewHeaderSteps","props","steps","items","map","convert","cap","step","index","style","wrapper","propTypes"],"sources":["../../../src/molecule/review-header-steps/index.js"],"sourcesContent":["import React from 'react';\nimport map from 'lodash/fp/map';\nimport StatusItem from '../../atom/status-item';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ReviewHeaderSteps = props => {\n const {steps} = props;\n\n const items = map.convert({cap: false})(\n (step, index) => <StatusItem {...step} key={index} />,\n steps\n );\n\n return (\n <div className={style.wrapper} data-name=\"header-steps\">\n {items}\n </div>\n );\n};\n\nReviewHeaderSteps.propTypes = propTypes;\n\nexport default ReviewHeaderSteps;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,iBAAiB,GAAGC,KAAK,IAAI;EACjC,MAAM;IAACC;EAAD,IAAUD,KAAhB;;EAEA,MAAME,KAAK,GAAGC,YAAA,CAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EACZ,CAACC,IAAD,EAAOC,KAAP,kBAAiB,6BAAC,mBAAD,eAAgBD,IAAhB;IAAsB,GAAG,EAAEC;EAA3B,GADL,EAEZN,KAFY,CAAd;;EAKA,oBACE;IAAK,SAAS,EAAEO,cAAA,CAAMC,OAAtB;IAA+B,aAAU;EAAzC,GACGP,KADH,CADF;AAKD,CAbD;;AAeAH,iBAAiB,CAACW,SAAlB,2CAA8BA,kBAA9B;eAEeX,iB"}
@@ -1,5 +1,5 @@
1
1
  import PropTypes from 'prop-types';
2
- import { HeaderStepItemProps } from '../../atom/review-header-step-item/types';
2
+ import { StatusItemProps } from '../../atom/status-item/types';
3
3
  declare const propTypes: {
4
4
  steps: PropTypes.Requireable<(PropTypes.InferProps<{
5
5
  current: PropTypes.Requireable<boolean>;
@@ -9,6 +9,6 @@ declare const propTypes: {
9
9
  };
10
10
  export default propTypes;
11
11
  export declare type ReviewHeaderStepsProps = {
12
- steps: HeaderStepItemProps[];
12
+ steps: StatusItemProps[];
13
13
  };
14
14
  //# sourceMappingURL=prop-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/review-header-steps/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAsC,EACpC,mBAAmB,EACpB,MAAM,0CAA0C,CAAC;AAElD,QAAA,MAAM,SAAS;;;;;;CAEd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,sBAAsB,GAAG;IACnC,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC9B,CAAC"}
1
+ {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/review-header-steps/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAsC,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE5F,QAAA,MAAM,SAAS;;;;;;CAEd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,sBAAsB,GAAG;IACnC,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B,CAAC"}
@@ -5,7 +5,7 @@ exports.default = void 0;
5
5
 
6
6
  var _propTypes = _interopRequireDefault(require("prop-types"));
7
7
 
8
- var _types = _interopRequireDefault(require("../../atom/review-header-step-item/types"));
8
+ var _types = _interopRequireDefault(require("../../atom/status-item/types"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.js","names":["propTypes","steps","PropTypes","arrayOf","shape","ReviewHeaderStepItemPropTypes"],"sources":["../../../src/molecule/review-header-steps/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nimport ReviewHeaderStepItemPropTypes, {\n HeaderStepItemProps\n} from '../../atom/review-header-step-item/types';\n\nconst propTypes = {\n steps: PropTypes.arrayOf(PropTypes.shape(ReviewHeaderStepItemPropTypes))\n};\n\nexport default propTypes;\n\nexport type ReviewHeaderStepsProps = {\n steps: HeaderStepItemProps[];\n};\n"],"mappings":";;;;;AAAA;;AAEA;;;;AAIA,MAAMA,SAAS,GAAG;EAChBC,KAAK,EAAEC,kBAAA,CAAUC,OAAV,CAAkBD,kBAAA,CAAUE,KAAV,CAAgBC,cAAhB,CAAlB;AADS,CAAlB;eAIeL,S"}
1
+ {"version":3,"file":"prop-types.js","names":["propTypes","steps","PropTypes","arrayOf","shape","ReviewHeaderStepItemPropTypes"],"sources":["../../../src/molecule/review-header-steps/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nimport ReviewHeaderStepItemPropTypes, {StatusItemProps} from '../../atom/status-item/types';\n\nconst propTypes = {\n steps: PropTypes.arrayOf(PropTypes.shape(ReviewHeaderStepItemPropTypes))\n};\n\nexport default propTypes;\n\nexport type ReviewHeaderStepsProps = {\n steps: StatusItemProps[];\n};\n"],"mappings":";;;;;AAAA;;AAEA;;;;AAEA,MAAMA,SAAS,GAAG;EAChBC,KAAK,EAAEC,kBAAA,CAAUC,OAAV,CAAkBD,kBAAA,CAAUE,KAAV,CAAgBC,cAAhB,CAAlB;AADS,CAAlB;eAIeL,S"}
@@ -37,6 +37,8 @@ declare namespace SetupSection {
37
37
  disabled: PropTypes.Requireable<boolean>;
38
38
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
39
39
  description: PropTypes.Requireable<string>;
40
+ 'aria-labelledby': PropTypes.Requireable<string>;
41
+ 'aria-label': PropTypes.Requireable<string>;
40
42
  modified: PropTypes.Requireable<boolean>;
41
43
  titlePosition: PropTypes.Requireable<string>;
42
44
  theme: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/setup-section/index.js"],"names":[],"mappings":";AAsCA,qEAeC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA7CD,mFAiBC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/setup-section/index.js"],"names":[],"mappings":";AAsCA,qEAeC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA7CD,mFAiBC"}
@@ -18,6 +18,8 @@ declare namespace SetupSections {
18
18
  disabled: PropTypes.Requireable<boolean>;
19
19
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
20
20
  description: PropTypes.Requireable<string>;
21
+ 'aria-labelledby': PropTypes.Requireable<string>;
22
+ 'aria-label': PropTypes.Requireable<string>;
21
23
  modified: PropTypes.Requireable<boolean>;
22
24
  titlePosition: PropTypes.Requireable<string>;
23
25
  theme: PropTypes.Requireable<string>;