@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
@@ -1,7 +1,7 @@
1
1
  import PropTypes from 'prop-types';
2
2
  const propTypes = {
3
3
  current: PropTypes.bool,
4
- icon: PropTypes.oneOf(['no-answer', 'right', 'wrong']),
4
+ icon: PropTypes.oneOf(['no-answer', 'right', 'wrong', 'valid', 'invalid', 'errors-number']),
5
5
  value: PropTypes.string
6
6
  };
7
7
  export default propTypes;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":["PropTypes","propTypes","current","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,OAAOA,SAAP,MAAsB,YAAtB;AAEA,MAAMC,SAAS,GAAG;EAChBC,OAAO,EAAEF,SAAS,CAACG,IADH;EAEhBC,IAAI,EAAEJ,SAAS,CAACK,KAAV,CAAgB,CAAC,WAAD,EAAc,OAAd,EAAuB,OAAvB,EAAgC,OAAhC,EAAyC,SAAzC,EAAoD,eAApD,CAAhB,CAFU;EAGhBC,KAAK,EAAEN,SAAS,CAACO;AAHD,CAAlB;AAMA,eAAeN,SAAf"}
@@ -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"}
@@ -65,10 +65,13 @@ const FiltersWapper = (props, context) => {
65
65
  className: style.choice,
66
66
  key: idx
67
67
  }, /*#__PURE__*/React.createElement("p", {
68
+ id: `title-id-${idx}`,
68
69
  className: style.title
69
70
  }, filter.title), /*#__PURE__*/React.createElement("div", {
70
71
  className: style.toggle
71
- }, /*#__PURE__*/React.createElement(InputSwitch, filter.display)));
72
+ }, /*#__PURE__*/React.createElement(InputSwitch, _extends({}, filter.display, {
73
+ "aria-labelledby": `title-id-${idx}`
74
+ }))));
72
75
 
73
76
  default:
74
77
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"filters-wrapper.js","names":["React","PropTypes","classnames","Select","InputSwitch","RadioGroup","RangeSlider","style","FiltersWapper","props","context","filters","className","filterGroupAriaLabel","buildFilter","filter","idx","type","fieldName","choice","title","radioGroup","timerWrapper","timerSubtitle","subtitle","toggle","display","filtersList","convert","cap","emptyFilters","wrapperNone","wrapper","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,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,WAAP,MAAwB,kBAAxB;AACA,OAAO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AEH;QAAnF,gBACE;UAAG,SAAS,EAAET,KAAK,CAACa;QAApB,GAA4BL,MAAM,CAACK,KAAnC,CADF,eAEE;UAAK,SAAS,EAAEb,KAAK,CAACkB;QAAtB,gBACE,oBAAC,WAAD,EAAiBV,MAAM,CAACW,OAAxB,CADF,CAFF,CADF;;MAQF;QACE,OAAO,IAAP;IAvCJ;EAyCD,CA3CD;;EA6CA,MAAMC,WAAW,GAAG,KAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0Bf,WAA1B,EAAuCH,OAAvC,CAApB;;EACA,MAAMmB,YAAY,GAAG,SAAQnB,OAAR,CAArB;;EACA,oBACE,+CACE;IACE,SAAS,EAAET,UAAU,CAACU,SAAD,EAAYkB,YAAY,GAAGvB,KAAK,CAACwB,WAAT,GAAuBxB,KAAK,CAACyB,OAArD,CADvB;IAEE,IAAI,EAAC,OAFP;IAGE,cAAYnB;EAHd,GAKGc,WALH,CADF,CADF;AAWD,CA7DD;;AA+DAnB,aAAa,CAACyB,SAAd,2CAA0B;EACxBrB,SAAS,EAAEX,SAAS,CAACiC,MADG;EAExBvB,OAAO,EAAEV,SAAS,CAACkC,OAAV,CACPlC,SAAS,CAACmC,KAAV,CAAgB;IACdnB,IAAI,EAAEhB,SAAS,CAACoC,KAAV,CAAgB,CAAC,QAAD,EAAW,OAAX,EAAoB,OAApB,EAA6B,QAA7B,CAAhB,EAAwDC,UADhD;IAEdpB,SAAS,EAAEjB,SAAS,CAACiC,MAAV,CAAiBI;EAFd,CAAhB,CADO,CAFe;EAQxBzB,oBAAoB,EAAEZ,SAAS,CAACiC;AARR,CAA1B;AAUA,eAAe1B,aAAf"}
1
+ {"version":3,"file":"filters-wrapper.js","names":["React","PropTypes","classnames","Select","InputSwitch","RadioGroup","RangeSlider","style","FiltersWapper","props","context","filters","className","filterGroupAriaLabel","buildFilter","filter","idx","type","fieldName","choice","title","radioGroup","timerWrapper","timerSubtitle","subtitle","toggle","display","filtersList","convert","cap","emptyFilters","wrapperNone","wrapper","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,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,WAAP,MAAwB,kBAAxB;AACA,OAAOC,KAAP,MAAkB,sBAAlB;;AAEA,MAAMC,aAAa,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACxC,MAAM;IAACC,OAAD;IAAUC,SAAV;IAAqBC;EAArB,IAA6CJ,KAAnD;;EAEA,MAAMK,WAAW,GAAG,CAACC,MAAD,EAASC,GAAT,KAAiB;IACnC,MAAM;MAACC,IAAD;MAAOC;IAAP,IAAoBH,MAA1B;;IACA,QAAQE,IAAR;MACE,KAAK,QAAL;QACE,oBACE;UAAK,aAAU,QAAf;UAAwB,oBAAkBC,SAA1C;UAAqD,SAAS,EAAEX,KAAK,CAACY,MAAtE;UAA8E,GAAG,EAAEH;QAAnF,gBACE,oBAAC,MAAD,EAAYD,MAAZ,CADF,CADF;;MAKF,KAAK,OAAL;QACE,oBACE;UAAK,aAAU,QAAf;UAAwB,oBAAkBG,SAA1C;UAAqD,SAAS,EAAEX,KAAK,CAACY,MAAtE;UAA8E,GAAG,EAAEH;QAAnF,gBACE;UAAG,SAAS,EAAET,KAAK,CAACa;QAApB,GAA4BL,MAAM,CAACK,KAAnC,CADF,eAEE,oBAAC,UAAD,eAAgBL,MAAhB;UAAwB,SAAS,EAAER,KAAK,CAACc;QAAzC,GAFF,CADF;;MAMF,KAAK,OAAL;QACE,oBACE;UACE,aAAU,QADZ;UAEE,oBAAkBH,SAFpB;UAGE,SAAS,EAAEX,KAA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,EAAEhB,SAAS,CAACoC,KAAV,CAAgB,CAAC,QAAD,EAAW,OAAX,EAAoB,OAApB,EAA6B,QAA7B,CAAhB,EAAwDC,UADhD;IAEdpB,SAAS,EAAEjB,SAAS,CAACiC,MAAV,CAAiBI;EAFd,CAAhB,CADO,CAFe;EAQxBzB,oBAAoB,EAAEZ,SAAS,CAACiC;AARR,CAA1B;AAUA,eAAe1B,aAAf"}
@@ -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"}
@@ -1,4 +1,7 @@
1
1
  import _get from "lodash/fp/get";
2
+
3
+ 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); }
4
+
2
5
  import React from 'react';
3
6
  import PropTypes from 'prop-types';
4
7
  import { NovaCompositionNavigationArrowDown as ArrowDown } from '@coorpacademy/nova-icons';
@@ -73,7 +76,8 @@ class Filters extends React.Component {
73
76
  filters,
74
77
  moreFilterAriaLabel,
75
78
  moreSortAriaLabel,
76
- filterGroupAriaLabel
79
+ filterGroupAriaLabel,
80
+ sortAriaLabel
77
81
  } = this.props;
78
82
  const {
79
83
  filter,
@@ -92,7 +96,9 @@ class Filters extends React.Component {
92
96
  const sortView = sorting !== undefined ? /*#__PURE__*/React.createElement("div", {
93
97
  "data-name": "choice",
94
98
  className: style.select
95
- }, /*#__PURE__*/React.createElement(Select, sorting)) : null;
99
+ }, /*#__PURE__*/React.createElement(Select, _extends({}, sorting, {
100
+ "aria-label": sortAriaLabel
101
+ }))) : null;
96
102
  return /*#__PURE__*/React.createElement("div", {
97
103
  "data-name": "search",
98
104
  className: style.search
@@ -174,7 +180,8 @@ Filters.propTypes = process.env.NODE_ENV !== "production" ? {
174
180
  onToggleSorts: PropTypes.func,
175
181
  moreSortAriaLabel: PropTypes.string,
176
182
  moreFilterAriaLabel: PropTypes.string,
177
- filterGroupAriaLabel: PropTypes.string
183
+ filterGroupAriaLabel: PropTypes.string,
184
+ sortAriaLabel: PropTypes.string
178
185
  } : {};
179
186
  export default Filters;
180
187
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","NovaCompositionNavigationArrowDown","ArrowDown","Select","Provider","style","FiltersWrapper","Filters","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","select","search","activeDefault","default","title","arrow","color","activeWrapperSortBy","wrapperSortBy","activeWrapperFilters","wrapperFilters","wrapper","CTAfilter","backgroundColor","activeSorting","contextTypes","childContextTypes","propTypes","string","bool","shape","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\nexport default Filters;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,kCAAkC,IAAIC,SAA9C,QAA8D,0BAA9D;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,cAAP,MAA2B,mBAA3B;;AAEA,MAAMC,OAAN,SAAsBR,KAAK,CAACS,SAA5B,CAAsC;EAsBpCC,WAAW,CAACC,KAAD,EAAQ;IACjB,MAAMA,KAAN;IACA,KAAKC,KAAL,GAAa;MACXC,MAAM,EAAE,CAAC,CAACF,KAAK,CAACG,WADL;MAEXC,MAAM,EAAE,CAAC,CAACJ,KAAK,CAACK;IAFL,CAAb;IAIA,KAAKC,gBAAL,GAAwB,KAAKA,gBAAL,CAAsBC,IAAtB,CAA2B,IAA3B,CAAxB;IACA,KAAKC,cAAL,GAAsB,KAAKA,cAAL,CAAoBD,IAApB,CAAyB,IAAzB,CAAtB;IACA,KAAKE,YAAL,GAAoB,KAAKA,YAAL,CAAkBF,IAAlB,CAAuB,IAAvB,CAApB;EACD;;EAEDD,gBAAgB,GAAG;IACjB,MAAM;MAACJ;IAAD,IAAW,KAAKD,KAAtB;IACA,MAAM;MAACS;IAAD,IAAoB,KAAKV,KAA/B;IAEA,MAAMW,QAAQ,GAAG,CAACT,MAAlB;IAEA,KAAKU,QAAL,CAAc;MACZV,MA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}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","NovaCompositionNavigationArrowDown","ArrowDown","Select","Provider","style","FiltersWrapper","Filters","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","select","search","activeDefault","default","title","arrow","color","activeWrapperSortBy","wrapperSortBy","activeWrapperFilters","wrapperFilters","wrapper","CTAfilter","backgroundColor","activeSorting","contextTypes","childContextTypes","propTypes","string","bool","shape","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,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,kCAAkC,IAAIC,SAA9C,QAA8D,0BAA9D;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,cAAP,MAA2B,mBAA3B;;AAEA,MAAMC,OAAN,SAAsBR,KAAK,CAACS,SAA5B,CAAsC;EAuBpCC,WAAW,CAACC,KAAD,EAAQ;IACjB,MAAMA,KAAN;IACA,KAAKC,KAAL,GAAa;MACXC,MAAM,EAAE,CAAC,CAACF,KAAK,CAACG,WADL;MAEXC,MAAM,EAAE,CAAC,CAACJ,KAAK,CAACK;IAFL,CAAb;IAIA,KAAKC,gBAAL,GAAwB,KAAKA,gBAAL,CAAsBC,IAAtB,CAA2B,IAA3B,CAAxB;IACA,KAAKC,cAAL,GAAsB,KAAKA,cAAL,CAAoBD,IAApB,CAAyB,IAAzB,CAAtB;IACA,KAAKE,YAAL,GAAoB,KAAKA,YAAL,CAAkBF,IAAlB,CAAuB,IAAvB,CAApB;EACD;;EAEDD,gBAAgB,GAAG;IACjB,MAAM;MAACJ;IAAD,IAAW,KAAK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AYjBhC,iBAAiB,EAAEjC,SAAS,CAAC8D,MAZZ;EAajB9B,mBAAmB,EAAEhC,SAAS,CAAC8D,MAbd;EAcjB5B,oBAAoB,EAAElC,SAAS,CAAC8D,MAdf;EAejB3B,aAAa,EAAEnC,SAAS,CAAC8D;AAfR,C;AAuKrB,eAAevD,OAAf"}
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
2
2
 
3
3
  import React from 'react';
4
4
  import map from 'lodash/fp/map';
5
- import ReviewHeaderStepItem from '../../atom/review-header-step-item';
5
+ import StatusItem from '../../atom/status-item';
6
6
  import style from './style.css';
7
7
  import propTypes from './prop-types';
8
8
 
@@ -12,7 +12,7 @@ const ReviewHeaderSteps = props => {
12
12
  } = props;
13
13
  const items = map.convert({
14
14
  cap: false
15
- })((step, index) => /*#__PURE__*/React.createElement(ReviewHeaderStepItem, _extends({}, step, {
15
+ })((step, index) => /*#__PURE__*/React.createElement(StatusItem, _extends({}, step, {
16
16
  key: index
17
17
  })), steps);
18
18
  return /*#__PURE__*/React.createElement("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","map","ReviewHeaderStepItem","style","propTypes","ReviewHeaderSteps","props","steps","items","convert","cap","step","index","wrapper"],"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,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,oBAAP,MAAiC,oCAAjC;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,cAAtB;;AAEA,MAAMC,iBAAiB,GAAGC,KAAK,IAAI;EACjC,MAAM;IAACC;EAAD,IAAUD,KAAhB;EAEA,MAAME,KAAK,GAAGP,GAAG,CAACQ,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EACZ,CAACC,IAAD,EAAOC,KAAP,kBAAiB,oBAAC,oBAAD,eAA0BD,IAA1B;IAAgC,GAAG,EAAEC;EAArC,GADL,EAEZL,KAFY,CAAd;EAKA,oBACE;IAAK,SAAS,EAAEJ,KAAK,CAACU,OAAtB;IAA+B,aAAU;EAAzC,GACGL,KADH,CADF;AAKD,CAbD;;AAeAH,iBAAiB,CAACD,SAAlB,2CAA8BA,SAA9B;AAEA,eAAeC,iBAAf"}
1
+ {"version":3,"file":"index.js","names":["React","map","StatusItem","style","propTypes","ReviewHeaderSteps","props","steps","items","convert","cap","step","index","wrapper"],"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,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,cAAtB;;AAEA,MAAMC,iBAAiB,GAAGC,KAAK,IAAI;EACjC,MAAM;IAACC;EAAD,IAAUD,KAAhB;EAEA,MAAME,KAAK,GAAGP,GAAG,CAACQ,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EACZ,CAACC,IAAD,EAAOC,KAAP,kBAAiB,oBAAC,UAAD,eAAgBD,IAAhB;IAAsB,GAAG,EAAEC;EAA3B,GADL,EAEZL,KAFY,CAAd;EAKA,oBACE;IAAK,SAAS,EAAEJ,KAAK,CAACU,OAAtB;IAA+B,aAAU;EAAzC,GACGL,KADH,CADF;AAKD,CAbD;;AAeAH,iBAAiB,CAACD,SAAlB,2CAA8BA,SAA9B;AAEA,eAAeC,iBAAf"}
@@ -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"}
@@ -1,5 +1,5 @@
1
1
  import PropTypes from 'prop-types';
2
- import ReviewHeaderStepItemPropTypes from '../../atom/review-header-step-item/types';
2
+ import ReviewHeaderStepItemPropTypes from '../../atom/status-item/types';
3
3
  const propTypes = {
4
4
  steps: PropTypes.arrayOf(PropTypes.shape(ReviewHeaderStepItemPropTypes))
5
5
  };
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.js","names":["PropTypes","ReviewHeaderStepItemPropTypes","propTypes","steps","arrayOf","shape"],"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,OAAOA,SAAP,MAAsB,YAAtB;AAEA,OAAOC,6BAAP,MAEO,0CAFP;AAIA,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAEH,SAAS,CAACI,OAAV,CAAkBJ,SAAS,CAACK,KAAV,CAAgBJ,6BAAhB,CAAlB;AADS,CAAlB;AAIA,eAAeC,SAAf"}
1
+ {"version":3,"file":"prop-types.js","names":["PropTypes","ReviewHeaderStepItemPropTypes","propTypes","steps","arrayOf","shape"],"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,OAAOA,SAAP,MAAsB,YAAtB;AAEA,OAAOC,6BAAP,MAA6D,8BAA7D;AAEA,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAEH,SAAS,CAACI,OAAV,CAAkBJ,SAAS,CAACK,KAAV,CAAgBJ,6BAAhB,CAAlB;AADS,CAAlB;AAIA,eAAeC,SAAf"}
@@ -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>;
@@ -30,6 +30,8 @@ declare namespace SetupSlide {
30
30
  disabled: PropTypes.Requireable<boolean>;
31
31
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
32
32
  description: PropTypes.Requireable<string>;
33
+ 'aria-labelledby': PropTypes.Requireable<string>;
34
+ 'aria-label': PropTypes.Requireable<string>;
33
35
  modified: PropTypes.Requireable<boolean>;
34
36
  titlePosition: PropTypes.Requireable<string>;
35
37
  theme: PropTypes.Requireable<string>;
@@ -66,6 +68,7 @@ declare namespace SetupSlide {
66
68
  modified: PropTypes.Requireable<boolean>;
67
69
  error: PropTypes.Requireable<boolean>;
68
70
  'aria-label': PropTypes.Requireable<string>;
71
+ 'aria-labelledby': PropTypes.Requireable<string>;
69
72
  }> | PropTypes.InferProps<{
70
73
  type: PropTypes.Requireable<string>;
71
74
  title: PropTypes.Validator<string>;
@@ -43,6 +43,8 @@ declare namespace SetupSlider {
43
43
  disabled: PropTypes.Requireable<boolean>;
44
44
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
45
45
  description: PropTypes.Requireable<string>;
46
+ 'aria-labelledby': PropTypes.Requireable<string>;
47
+ 'aria-label': PropTypes.Requireable<string>;
46
48
  modified: PropTypes.Requireable<boolean>;
47
49
  titlePosition: PropTypes.Requireable<string>;
48
50
  theme: PropTypes.Requireable<string>;
@@ -79,6 +81,7 @@ declare namespace SetupSlider {
79
81
  modified: PropTypes.Requireable<boolean>;
80
82
  error: PropTypes.Requireable<boolean>;
81
83
  'aria-label': PropTypes.Requireable<string>;
84
+ 'aria-labelledby': PropTypes.Requireable<string>;
82
85
  }> | PropTypes.InferProps<{
83
86
  type: PropTypes.Requireable<string>;
84
87
  title: PropTypes.Validator<string>;
@@ -86,6 +86,8 @@ declare namespace BrandForm {
86
86
  disabled: PropTypes.Requireable<boolean>;
87
87
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
88
88
  description: PropTypes.Requireable<string>;
89
+ 'aria-labelledby': PropTypes.Requireable<string>;
90
+ 'aria-label': PropTypes.Requireable<string>;
89
91
  modified: PropTypes.Requireable<boolean>;
90
92
  titlePosition: PropTypes.Requireable<string>;
91
93
  theme: PropTypes.Requireable<string>;
@@ -139,6 +141,7 @@ declare namespace BrandForm {
139
141
  modified: PropTypes.Requireable<boolean>;
140
142
  error: PropTypes.Requireable<boolean>;
141
143
  'aria-label': PropTypes.Requireable<string>;
144
+ 'aria-labelledby': PropTypes.Requireable<string>;
142
145
  }> | PropTypes.InferProps<{
143
146
  type: PropTypes.Requireable<string>;
144
147
  title: PropTypes.Validator<string>;
@@ -218,6 +221,8 @@ declare namespace BrandForm {
218
221
  disabled: PropTypes.Requireable<boolean>;
219
222
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
220
223
  description: PropTypes.Requireable<string>;
224
+ 'aria-labelledby': PropTypes.Requireable<string>;
225
+ 'aria-label': PropTypes.Requireable<string>;
221
226
  modified: PropTypes.Requireable<boolean>;
222
227
  titlePosition: PropTypes.Requireable<string>;
223
228
  theme: PropTypes.Requireable<string>;
@@ -254,6 +259,7 @@ declare namespace BrandForm {
254
259
  modified: PropTypes.Requireable<boolean>;
255
260
  error: PropTypes.Requireable<boolean>;
256
261
  'aria-label': PropTypes.Requireable<string>;
262
+ 'aria-labelledby': PropTypes.Requireable<string>;
257
263
  }> | PropTypes.InferProps<{
258
264
  type: PropTypes.Requireable<string>;
259
265
  title: PropTypes.Validator<string>;
@@ -358,6 +364,8 @@ declare namespace BrandForm {
358
364
  disabled: PropTypes.Requireable<boolean>;
359
365
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
360
366
  description: PropTypes.Requireable<string>;
367
+ 'aria-labelledby': PropTypes.Requireable<string>;
368
+ 'aria-label': PropTypes.Requireable<string>;
361
369
  modified: PropTypes.Requireable<boolean>;
362
370
  titlePosition: PropTypes.Requireable<string>;
363
371
  theme: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAyBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6FE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAuBC;IArBC;;;;;MAKC;IAgDH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IAED,0BAIC;IAED,2BAIC;IAED,iCAUC;IA7GD,2EASC;IAGC,kBAAsB;IAmGxB,6BA0aC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAyBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6FE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAuBC;IArBC;;;;;MAKC;IAgDH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IAED,0BAIC;IAED,2BAIC;IAED,iCAUC;IA7GD,2EASC;IAGC,kBAAsB;IAmGxB,6BA4aC;CACF"}
@@ -477,8 +477,11 @@ class MoocHeader extends React.Component {
477
477
  key: settingName,
478
478
  "aria-label": ariaLabel || title
479
479
  }, /*#__PURE__*/React.createElement("span", {
480
+ id: `title-id-${settingName}`,
480
481
  className: style.label
481
- }, title), /*#__PURE__*/React.createElement(InputSwitch, switchProps));
482
+ }, title), /*#__PURE__*/React.createElement(InputSwitch, _extends({}, switchProps, {
483
+ "aria-labelledby": `title-id-${settingName}`
484
+ })));
482
485
  break;
483
486
  }
484
487
  }