@coorpacademy/components 11.9.3-alpha.26 → 11.9.3-alpha.28

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 (97) 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 +1 -0
  5. package/es/atom/input-switch/index.d.ts.map +1 -1
  6. package/es/atom/input-switch/index.js +23 -12
  7. package/es/atom/input-switch/index.js.map +1 -1
  8. package/es/molecule/brand-form-group/index.d.ts +3 -0
  9. package/es/molecule/cm-popin/types.d.ts +1 -0
  10. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  11. package/es/molecule/draggable-list/index.d.ts +1 -0
  12. package/es/molecule/filters/filters-wrapper.d.ts.map +1 -1
  13. package/es/molecule/filters/filters-wrapper.js +4 -1
  14. package/es/molecule/filters/filters-wrapper.js.map +1 -1
  15. package/es/molecule/filters/index.d.ts +1 -0
  16. package/es/molecule/filters/index.d.ts.map +1 -1
  17. package/es/molecule/filters/index.js +10 -3
  18. package/es/molecule/filters/index.js.map +1 -1
  19. package/es/molecule/setup-section/index.d.ts +1 -0
  20. package/es/molecule/setup-section/index.d.ts.map +1 -1
  21. package/es/molecule/setup-sections/index.d.ts +1 -0
  22. package/es/molecule/setup-slide/index.d.ts +1 -0
  23. package/es/molecule/setup-slider/index.d.ts +1 -0
  24. package/es/organism/brand-form/index.d.ts +3 -0
  25. package/es/organism/mooc-header/index.d.ts.map +1 -1
  26. package/es/organism/mooc-header/index.js +4 -1
  27. package/es/organism/mooc-header/index.js.map +1 -1
  28. package/es/organism/user-preferences/index.d.ts +1 -0
  29. package/es/organism/wizard-contents/index.d.ts +3 -0
  30. package/es/template/app-player/loading/index.d.ts +1 -0
  31. package/es/template/app-player/player/index.d.ts +2 -0
  32. package/es/template/app-player/player/slides/index.d.ts +1 -0
  33. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  34. package/es/template/app-player/popin-correction/index.d.ts +1 -0
  35. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  36. package/es/template/app-player/popin-end/index.d.ts +1 -0
  37. package/es/template/app-review/index.d.ts +1 -0
  38. package/es/template/app-review/index.d.ts.map +1 -1
  39. package/es/template/app-review/player/prop-types.d.ts +1 -0
  40. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  41. package/es/template/app-review/prop-types.d.ts +1 -0
  42. package/es/template/app-review/prop-types.d.ts.map +1 -1
  43. package/es/template/back-office/brand-update/index.d.ts +7 -0
  44. package/es/template/common/dashboard/index.d.ts +1 -0
  45. package/es/template/common/search-page/index.d.ts +2 -0
  46. package/es/template/common/search-page/index.d.ts.map +1 -1
  47. package/es/template/common/search-page/index.js +6 -3
  48. package/es/template/common/search-page/index.js.map +1 -1
  49. package/lib/atom/input-search/index.d.ts.map +1 -1
  50. package/lib/atom/input-search/index.js +1 -0
  51. package/lib/atom/input-search/index.js.map +1 -1
  52. package/lib/atom/input-switch/index.d.ts +1 -0
  53. package/lib/atom/input-switch/index.d.ts.map +1 -1
  54. package/lib/atom/input-switch/index.js +22 -12
  55. package/lib/atom/input-switch/index.js.map +1 -1
  56. package/lib/molecule/brand-form-group/index.d.ts +3 -0
  57. package/lib/molecule/cm-popin/types.d.ts +1 -0
  58. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  59. package/lib/molecule/draggable-list/index.d.ts +1 -0
  60. package/lib/molecule/filters/filters-wrapper.d.ts.map +1 -1
  61. package/lib/molecule/filters/filters-wrapper.js +4 -1
  62. package/lib/molecule/filters/filters-wrapper.js.map +1 -1
  63. package/lib/molecule/filters/index.d.ts +1 -0
  64. package/lib/molecule/filters/index.d.ts.map +1 -1
  65. package/lib/molecule/filters/index.js +9 -3
  66. package/lib/molecule/filters/index.js.map +1 -1
  67. package/lib/molecule/setup-section/index.d.ts +1 -0
  68. package/lib/molecule/setup-section/index.d.ts.map +1 -1
  69. package/lib/molecule/setup-sections/index.d.ts +1 -0
  70. package/lib/molecule/setup-slide/index.d.ts +1 -0
  71. package/lib/molecule/setup-slider/index.d.ts +1 -0
  72. package/lib/organism/brand-form/index.d.ts +3 -0
  73. package/lib/organism/mooc-header/index.d.ts.map +1 -1
  74. package/lib/organism/mooc-header/index.js +4 -1
  75. package/lib/organism/mooc-header/index.js.map +1 -1
  76. package/lib/organism/user-preferences/index.d.ts +1 -0
  77. package/lib/organism/wizard-contents/index.d.ts +3 -0
  78. package/lib/template/app-player/loading/index.d.ts +1 -0
  79. package/lib/template/app-player/player/index.d.ts +2 -0
  80. package/lib/template/app-player/player/slides/index.d.ts +1 -0
  81. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  82. package/lib/template/app-player/popin-correction/index.d.ts +1 -0
  83. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  84. package/lib/template/app-player/popin-end/index.d.ts +1 -0
  85. package/lib/template/app-review/index.d.ts +1 -0
  86. package/lib/template/app-review/index.d.ts.map +1 -1
  87. package/lib/template/app-review/player/prop-types.d.ts +1 -0
  88. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  89. package/lib/template/app-review/prop-types.d.ts +1 -0
  90. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  91. package/lib/template/back-office/brand-update/index.d.ts +7 -0
  92. package/lib/template/common/dashboard/index.d.ts +1 -0
  93. package/lib/template/common/search-page/index.d.ts +2 -0
  94. package/lib/template/common/search-page/index.d.ts.map +1 -1
  95. package/lib/template/common/search-page/index.js +6 -3
  96. package/lib/template/common/search-page/index.js.map +1 -1
  97. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-search/index.js"],"names":[],"mappings":";AAYA,iDA+CC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-search/index.js"],"names":[],"mappings":";AAYA,iDAgDC"}
@@ -39,6 +39,7 @@ const Search = props => {
39
39
  name: "search",
40
40
  id: "search",
41
41
  placeholder: placeholder,
42
+ title: placeholder,
42
43
  value: value,
43
44
  onInput: handleChange,
44
45
  onFocus: onFocus,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaCompositionCoorpacademySearchThin","CMSearchIcon","NovaCompositionCoorpacademySearch","SearchIcon","NovaSolidStatusClose","CloseIcon","Provider","style","Search","props","value","placeholder","onChange","onClear","onFocus","onBlur","theme","handleChange","e","target","cmStyle","coorpmanager","isDefaultTheme","wrapperSearch","searchIcon","title","noValue","search","clearIcon","contextTypes","skin","childContextTypes","propTypes","string","isRequired","func","oneOf"],"sources":["../../../src/atom/input-search/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademySearchThin as CMSearchIcon,\n NovaCompositionCoorpacademySearch as SearchIcon,\n NovaSolidStatusClose as CloseIcon\n} from '@coorpacademy/nova-icons';\nimport {noop, isEmpty} from 'lodash/fp';\nimport Provider from '../provider';\nimport style from './style.css';\n\nconst Search = props => {\n const {\n value,\n placeholder,\n onChange = noop,\n onClear = noop,\n onFocus,\n onBlur,\n theme = 'default'\n } = props;\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n const cmStyle = classnames(style.coorpmanager);\n const isDefaultTheme = theme === 'default';\n\n return (\n <div className={isDefaultTheme ? style.wrapperSearch : cmStyle}>\n <label htmlFor=\"search\" title={placeholder}>\n {!isDefaultTheme ? (\n <CMSearchIcon className={style.searchIcon} />\n ) : (\n <SearchIcon className={style.searchIcon} />\n )}\n {!isDefaultTheme ? (\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {placeholder}\n </span>\n ) : null}\n </label>\n <input\n data-name=\"search-input\"\n className={style.search}\n aria-label={placeholder}\n type=\"text\"\n name=\"search\"\n id=\"search\"\n placeholder={placeholder}\n value={value}\n onInput={handleChange}\n onFocus={onFocus}\n onChange={noop}\n onBlur={onBlur}\n />\n {value && !isDefaultTheme ? (\n <CloseIcon onClick={onClear} className={style.clearIcon} />\n ) : null}\n </div>\n );\n};\n\nSearch.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearch.propTypes = {\n value: PropTypes.string,\n placeholder: PropTypes.string.isRequired,\n onChange: PropTypes.func,\n onClear: PropTypes.func,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n theme: PropTypes.oneOf(['default', 'coorpmanager'])\n};\n\nexport default Search;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SACEC,qCAAqC,IAAIC,YAD3C,EAEEC,iCAAiC,IAAIC,UAFvC,EAGEC,oBAAoB,IAAIC,SAH1B,QAIO,0BAJP;AAMA,OAAOC,QAAP,MAAqB,aAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,MAAM,GAAGC,KAAK,IAAI;EACtB,MAAM;IACJC,KADI;IAEJC,WAFI;IAGJC,QAAQ,QAHJ;IAIJC,OAAO,QAJH;IAKJC,OALI;IAMJC,MANI;IAOJC,KAAK,GAAG;EAPJ,IAQFP,KARJ;EASA,MAAMQ,YAAY,GAAGpB,OAAO,CAAC,MAAMqB,CAAC,IAAIN,QAAQ,CAACM,CAAC,CAACC,MAAF,CAAST,KAAV,CAApB,EAAsC,CAACE,QAAD,CAAtC,CAA5B;EACA,MAAMQ,OAAO,GAAGrB,UAAU,CAACQ,KAAK,CAACc,YAAP,CAA1B;EACA,MAAMC,cAAc,GAAGN,KAAK,KAAK,SAAjC;EAEA,oBACE;IAAK,SAAS,EAAEM,cAAc,GAAGf,KAAK,CAACgB,aAAT,GAAyBH;EAAvD,gBACE;IAAO,OAAO,EAAC,QAAf;IAAwB,KAAK,EAAET;EAA/B,GACG,CAACW,cAAD,gBACC,oBAAC,YAAD;IA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AAe5B,MAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaCompositionCoorpacademySearchThin","CMSearchIcon","NovaCompositionCoorpacademySearch","SearchIcon","NovaSolidStatusClose","CloseIcon","Provider","style","Search","props","value","placeholder","onChange","onClear","onFocus","onBlur","theme","handleChange","e","target","cmStyle","coorpmanager","isDefaultTheme","wrapperSearch","searchIcon","title","noValue","search","clearIcon","contextTypes","skin","childContextTypes","propTypes","string","isRequired","func","oneOf"],"sources":["../../../src/atom/input-search/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademySearchThin as CMSearchIcon,\n NovaCompositionCoorpacademySearch as SearchIcon,\n NovaSolidStatusClose as CloseIcon\n} from '@coorpacademy/nova-icons';\nimport {noop, isEmpty} from 'lodash/fp';\nimport Provider from '../provider';\nimport style from './style.css';\n\nconst Search = props => {\n const {\n value,\n placeholder,\n onChange = noop,\n onClear = noop,\n onFocus,\n onBlur,\n theme = 'default'\n } = props;\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n const cmStyle = classnames(style.coorpmanager);\n const isDefaultTheme = theme === 'default';\n\n return (\n <div className={isDefaultTheme ? style.wrapperSearch : cmStyle}>\n <label htmlFor=\"search\" title={placeholder}>\n {!isDefaultTheme ? (\n <CMSearchIcon className={style.searchIcon} />\n ) : (\n <SearchIcon className={style.searchIcon} />\n )}\n {!isDefaultTheme ? (\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {placeholder}\n </span>\n ) : null}\n </label>\n <input\n data-name=\"search-input\"\n className={style.search}\n aria-label={placeholder}\n type=\"text\"\n name=\"search\"\n id=\"search\"\n placeholder={placeholder}\n title={placeholder}\n value={value}\n onInput={handleChange}\n onFocus={onFocus}\n onChange={noop}\n onBlur={onBlur}\n />\n {value && !isDefaultTheme ? (\n <CloseIcon onClick={onClear} className={style.clearIcon} />\n ) : null}\n </div>\n );\n};\n\nSearch.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearch.propTypes = {\n value: PropTypes.string,\n placeholder: PropTypes.string.isRequired,\n onChange: PropTypes.func,\n onClear: PropTypes.func,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n theme: PropTypes.oneOf(['default', 'coorpmanager'])\n};\n\nexport default Search;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SACEC,qCAAqC,IAAIC,YAD3C,EAEEC,iCAAiC,IAAIC,UAFvC,EAGEC,oBAAoB,IAAIC,SAH1B,QAIO,0BAJP;AAMA,OAAOC,QAAP,MAAqB,aAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,MAAM,GAAGC,KAAK,IAAI;EACtB,MAAM;IACJC,KADI;IAEJC,WAFI;IAGJC,QAAQ,QAHJ;IAIJC,OAAO,QAJH;IAKJC,OALI;IAMJC,MANI;IAOJC,KAAK,GAAG;EAPJ,IAQFP,KARJ;EASA,MAAMQ,YAAY,GAAGpB,OAAO,CAAC,MAAMqB,CAAC,IAAIN,QAAQ,CAACM,CAAC,CAACC,MAAF,CAAST,KAAV,CAApB,EAAsC,CAACE,QAAD,CAAtC,CAA5B;EACA,MAAMQ,OAAO,GAAGrB,UAAU,CAACQ,KAAK,CAACc,YAAP,CAA1B;EACA,MAAMC,cAAc,GAAGN,KAAK,KAAK,SAAjC;EAEA,oBACE;IAAK,SAAS,EAAEM,cAAc,GAAGf,KAAK,CAACgB,aAAT,GAAyBH;EAAvD,gBACE;IAAO,OAAO,EAAC,QAAf;IAAwB,KAAK,EAAET;EAA/B,GACG,CAACW,cAAD,gBACC,oBAAC,YAAD;IAAc,SAAS,EAAEf,KAAK,CAACiB;EAA/B,EADD,gBAGC,oBAAC,UAAD;IAAY,SAAS,EAAEjB,KAAK,CAACiB;EAA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boolean>;
10
10
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
11
11
  description: PropTypes.Requireable<string>;
12
+ 'aria-labelledby': PropTypes.Requireable<string>;
12
13
  modified: PropTypes.Requireable<boolean>;
13
14
  titlePosition: PropTypes.Requireable<string>;
14
15
  theme: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-switch/index.js"],"names":[],"mappings":";AAMA,sDAuEC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-switch/index.js"],"names":[],"mappings":";AAMA,sDA8EC"}
@@ -1,5 +1,8 @@
1
1
  import _uniqueId from "lodash/fp/uniqueId";
2
2
  import _noop from "lodash/fp/noop";
3
+
4
+ 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); }
5
+
3
6
  import React, { useMemo } from 'react';
4
7
  import PropTypes from 'prop-types';
5
8
  import getClassState from '../../util/get-class-state';
@@ -19,16 +22,19 @@ const InputSwitch = props => {
19
22
  titlePosition = 'left',
20
23
  details = '',
21
24
  requiredSelection = false,
22
- 'data-name': dataName
25
+ 'data-name': dataName,
26
+ 'aria-labelledby': ariaLabelledBy
23
27
  } = props;
24
28
 
25
29
  const idSwitch = id || _uniqueId('input-switch-');
26
30
 
27
31
  const isDisabled = disabled ? 'disabled' : '';
28
32
  const handleChange = useMemo(() => e => onChange(e.target.checked), [onChange]);
29
- const titleView = title ? /*#__PURE__*/React.createElement("span", {
33
+ const titleView = title ? /*#__PURE__*/React.createElement("div", {
34
+ id: `title-view-${dataName}`
35
+ }, /*#__PURE__*/React.createElement("span", {
30
36
  className: style.title
31
- }, `${title} `) : null;
37
+ }, `${title} `, " ")) : null;
32
38
  const descriptionView = description ? /*#__PURE__*/React.createElement("div", {
33
39
  className: style.description
34
40
  }, description) : null;
@@ -63,13 +69,17 @@ const InputSwitch = props => {
63
69
  return /*#__PURE__*/React.createElement("div", {
64
70
  className: className,
65
71
  "data-name": `switch-input-${theme}${dataName}`
66
- }, titlePosition === 'left' ? /*#__PURE__*/React.createElement("div", {
67
- id: `title-view-${dataName}`
68
- }, titleView, " ") : null, /*#__PURE__*/React.createElement("div", {
72
+ }, titlePosition === 'left' ? {
73
+ titleView
74
+ } : null, /*#__PURE__*/React.createElement("div", {
69
75
  className: requiredSelection ? style.requiredSelection : null
70
76
  }, /*#__PURE__*/React.createElement("div", {
71
77
  className: style.btnSwitchContainer
72
- }, /*#__PURE__*/React.createElement("input", {
78
+ }, /*#__PURE__*/React.createElement("input", _extends({}, ariaLabelledBy ? {
79
+ 'aria-labelledby': ariaLabelledBy
80
+ } : {}, title && !ariaLabelledBy ? {
81
+ 'aria-labelledby': `title-view-${dataName}`
82
+ } : {}, {
73
83
  type: "checkbox",
74
84
  id: idSwitch,
75
85
  name: name,
@@ -77,15 +87,15 @@ const InputSwitch = props => {
77
87
  checked: value,
78
88
  disabled: isDisabled,
79
89
  className: style.checkbox,
80
- "aria-labelledby": `title-view-${dataName}`
81
- }), /*#__PURE__*/React.createElement("label", {
90
+ "aria-labelledby": ariaLabelledBy
91
+ })), /*#__PURE__*/React.createElement("label", {
82
92
  htmlFor: idSwitch,
83
93
  "data-name": "input-switch-label"
84
94
  }))), /*#__PURE__*/React.createElement("div", {
85
95
  className: !details ? style.alignedTextContainer : null
86
- }, titlePosition === 'right' ? /*#__PURE__*/React.createElement("div", {
87
- id: `title-view-${dataName}`
88
- }, titleView, " ") : null, details ? /*#__PURE__*/React.createElement("div", {
96
+ }, titlePosition === 'right' ? {
97
+ titleView
98
+ } : null, details ? /*#__PURE__*/React.createElement("div", {
89
99
  className: style.detailsTxt
90
100
  }, details) : null), descriptionView);
91
101
  };
@@ -98,6 +108,7 @@ InputSwitch.propTypes = process.env.NODE_ENV !== "production" ? {
98
108
  disabled: PropTypes.bool,
99
109
  onChange: PropTypes.func,
100
110
  description: PropTypes.string,
111
+ 'aria-labelledby': PropTypes.string,
101
112
  modified: PropTypes.bool,
102
113
  titlePosition: PropTypes.oneOf(['right', 'left']),
103
114
  theme: PropTypes.oneOf(['default', 'coorpmanager', 'mooc']),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useMemo","PropTypes","getClassState","style","InputSwitch","props","title","name","id","value","disabled","onChange","description","modified","theme","titlePosition","details","requiredSelection","dataName","idSwitch","isDisabled","handleChange","e","target","checked","titleView","descriptionView","getClass","defaultClass","coorpmanager","modifiedClass","coorpmanagerModified","partielUncheck","default","className","btnSwitchContainer","checkbox","alignedTextContainer","detailsTxt","propTypes","string","bool","func","oneOf"],"sources":["../../../src/atom/input-switch/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, uniqueId} from 'lodash/fp';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst InputSwitch = props => {\n const {\n title,\n name,\n id,\n value,\n disabled,\n onChange = noop,\n description,\n modified = false,\n theme = 'default',\n titlePosition = 'left',\n details = '',\n requiredSelection = false,\n 'data-name': dataName\n } = props;\n\n const idSwitch = id || uniqueId('input-switch-');\n const isDisabled = disabled ? 'disabled' : '';\n const handleChange = useMemo(() => e => onChange(e.target.checked), [onChange]);\n\n const titleView = title ? <span className={style.title}>{`${title} `}</span> : null;\n\n const descriptionView = description ? (\n <div className={style.description}>{description}</div>\n ) : null;\n\n const getClass = () => {\n switch (theme) {\n case 'coorpmanager':\n return {\n defaultClass: style.coorpmanager,\n modifiedClass: style.coorpmanagerModified\n };\n case 'mooc':\n return {\n defaultClass: style.partielUncheck,\n modifiedClass: style.coorpmanagerModified\n };\n default:\n return {defaultClass: style.default, modifiedClass: style.modified};\n }\n };\n const {defaultClass, modifiedClass} = getClass();\n const className = getClassState(defaultClass, modifiedClass, null, modified);\n\n return (\n <div className={className} data-name={`switch-input-${theme}${dataName}`}>\n {titlePosition === 'left' ? <div id={`title-view-${dataName}`}>{titleView} </div> : null}\n <div className={requiredSelection ? style.requiredSelection : null}>\n <div className={style.btnSwitchContainer}>\n <input\n type=\"checkbox\"\n id={idSwitch}\n name={name}\n onChange={handleChange}\n checked={value}\n disabled={isDisabled}\n className={style.checkbox}\n aria-labelledby={`title-view-${dataName}`}\n />\n <label htmlFor={idSwitch} data-name=\"input-switch-label\" />\n </div>\n </div>\n <div className={!details ? style.alignedTextContainer : null}>\n {titlePosition === 'right' ? <div id={`title-view-${dataName}`}>{titleView} </div> : null}\n {details ? <div className={style.detailsTxt}>{details}</div> : null}\n </div>\n {descriptionView}\n </div>\n );\n};\n\nInputSwitch.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n id: PropTypes.string,\n value: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool,\n titlePosition: PropTypes.oneOf(['right', 'left']),\n theme: PropTypes.oneOf(['default', 'coorpmanager', 'mooc']),\n details: PropTypes.string,\n 'data-name': PropTypes.string,\n requiredSelection: PropTypes.bool\n};\nexport default InputSwitch;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,aAAP,MAA0B,4BAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAGC,KAAK,IAAI;EAC3B,MAAM;IACJC,KADI;IAEJC,IAFI;IAGJC,EAHI;IAIJC,KAJI;IAKJC,QALI;IAMJC,QAAQ,QANJ;IAOJC,WAPI;IAQJC,QAAQ,GAAG,KARP;IASJC,KAAK,GAAG,SATJ;IAUJC,aAAa,GAAG,MAVZ;IAWJC,OAAO,GAAG,EAXN;IAYJC,iBAAiB,GAAG,KAZhB;IAaJ,aAAaC;EAbT,IAcFb,KAdJ;;EAgBA,MAAMc,QAAQ,GAAGX,EA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AK,EAAEb,SAAS,CAAC0C,KAAV,CAAgB,CAAC,SAAD,EAAY,cAAZ,EAA4B,MAA5B,CAAhB,CAVe;EAWtB3B,OAAO,EAAEf,SAAS,CAACuC,MAXG;EAYtB,aAAavC,SAAS,CAACuC,MAZD;EAatBvB,iBAAiB,EAAEhB,SAAS,CAACwC;AAbP,CAAxB;AAeA,eAAerC,WAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useMemo","PropTypes","getClassState","style","InputSwitch","props","title","name","id","value","disabled","onChange","description","modified","theme","titlePosition","details","requiredSelection","dataName","ariaLabelledBy","idSwitch","isDisabled","handleChange","e","target","checked","titleView","descriptionView","getClass","defaultClass","coorpmanager","modifiedClass","coorpmanagerModified","partielUncheck","default","className","btnSwitchContainer","checkbox","alignedTextContainer","detailsTxt","propTypes","string","bool","func","oneOf"],"sources":["../../../src/atom/input-switch/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, uniqueId} from 'lodash/fp';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst InputSwitch = props => {\n const {\n title,\n name,\n id,\n value,\n disabled,\n onChange = noop,\n description,\n modified = false,\n theme = 'default',\n titlePosition = 'left',\n details = '',\n requiredSelection = false,\n 'data-name': dataName,\n 'aria-labelledby': ariaLabelledBy\n } = props;\n\n const idSwitch = id || uniqueId('input-switch-');\n const isDisabled = disabled ? 'disabled' : '';\n const handleChange = useMemo(() => e => onChange(e.target.checked), [onChange]);\n\n const titleView = title ? (\n <div id={`title-view-${dataName}`}>\n <span className={style.title}>{`${title} `} </span>\n </div>\n ) : null;\n\n const descriptionView = description ? (\n <div className={style.description}>{description}</div>\n ) : null;\n\n const getClass = () => {\n switch (theme) {\n case 'coorpmanager':\n return {\n defaultClass: style.coorpmanager,\n modifiedClass: style.coorpmanagerModified\n };\n case 'mooc':\n return {\n defaultClass: style.partielUncheck,\n modifiedClass: style.coorpmanagerModified\n };\n default:\n return {defaultClass: style.default, modifiedClass: style.modified};\n }\n };\n const {defaultClass, modifiedClass} = getClass();\n const className = getClassState(defaultClass, modifiedClass, null, modified);\n\n return (\n <div className={className} data-name={`switch-input-${theme}${dataName}`}>\n {titlePosition === 'left' ? {titleView} : null}\n <div className={requiredSelection ? style.requiredSelection : null}>\n <div className={style.btnSwitchContainer}>\n <input\n {...(ariaLabelledBy ? {'aria-labelledby': ariaLabelledBy} : {})}\n {...(title && !ariaLabelledBy ? {'aria-labelledby': `title-view-${dataName}`} : {})}\n type=\"checkbox\"\n id={idSwitch}\n name={name}\n onChange={handleChange}\n checked={value}\n disabled={isDisabled}\n className={style.checkbox}\n aria-labelledby={ariaLabelledBy}\n />\n <label htmlFor={idSwitch} data-name=\"input-switch-label\" />\n </div>\n </div>\n <div className={!details ? style.alignedTextContainer : null}>\n {titlePosition === 'right' ? {titleView} : null}\n {details ? <div className={style.detailsTxt}>{details}</div> : null}\n </div>\n {descriptionView}\n </div>\n );\n};\n\nInputSwitch.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n id: PropTypes.string,\n value: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func,\n description: PropTypes.string,\n 'aria-labelledby': PropTypes.string,\n modified: PropTypes.bool,\n titlePosition: PropTypes.oneOf(['right', 'left']),\n theme: PropTypes.oneOf(['default', 'coorpmanager', 'mooc']),\n details: PropTypes.string,\n 'data-name': PropTypes.string,\n requiredSelection: PropTypes.bool\n};\nexport default InputSwitch;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,aAAP,MAA0B,4BAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAGC,KAAK,IAAI;EAC3B,MAAM;IACJC,KADI;IAEJC,IAFI;IAGJC,EAHI;IAIJC,KAJI;IAKJC,QALI;IAMJC,QAAQ,QANJ;IAOJC,WAPI;IAQJC,QA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AAS,CAACwC,MAHQ;EAItBhC,KAAK,EAAER,SAAS,CAACyC,IAJK;EAKtBhC,QAAQ,EAAET,SAAS,CAACyC,IALE;EAMtB/B,QAAQ,EAAEV,SAAS,CAAC0C,IANE;EAOtB/B,WAAW,EAAEX,SAAS,CAACwC,MAPD;EAQtB,mBAAmBxC,SAAS,CAACwC,MARP;EAStB5B,QAAQ,EAAEZ,SAAS,CAACyC,IATE;EAUtB3B,aAAa,EAAEd,SAAS,CAAC2C,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CAVO;EAWtB9B,KAAK,EAAEb,SAAS,CAAC2C,KAAV,CAAgB,CAAC,SAAD,EAAY,cAAZ,EAA4B,MAA5B,CAAhB,CAXe;EAYtB5B,OAAO,EAAEf,SAAS,CAACwC,MAZG;EAatB,aAAaxC,SAAS,CAACwC,MAbD;EActBxB,iBAAiB,EAAEhB,SAAS,CAACyC;AAdP,CAAxB;AAgBA,eAAetC,WAAf"}
@@ -56,6 +56,7 @@ 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>;
59
60
  modified: PropTypes.Requireable<boolean>;
60
61
  titlePosition: PropTypes.Requireable<string>;
61
62
  theme: PropTypes.Requireable<string>;
@@ -189,6 +190,7 @@ declare namespace BrandFormGroup {
189
190
  disabled: PropTypes.Requireable<boolean>;
190
191
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
191
192
  description: PropTypes.Requireable<string>;
193
+ 'aria-labelledby': PropTypes.Requireable<string>;
192
194
  modified: PropTypes.Requireable<boolean>;
193
195
  titlePosition: PropTypes.Requireable<string>;
194
196
  theme: PropTypes.Requireable<string>;
@@ -330,6 +332,7 @@ declare namespace BrandFormGroup {
330
332
  disabled: PropTypes.Requireable<boolean>;
331
333
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
332
334
  description: PropTypes.Requireable<string>;
335
+ 'aria-labelledby': PropTypes.Requireable<string>;
333
336
  modified: PropTypes.Requireable<boolean>;
334
337
  titlePosition: PropTypes.Requireable<string>;
335
338
  theme: PropTypes.Requireable<string>;
@@ -41,6 +41,7 @@ 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>;
44
45
  modified: PropTypes.Requireable<boolean>;
45
46
  titlePosition: PropTypes.Requireable<string>;
46
47
  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,7 @@ 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>;
21
22
  modified: PropTypes.Requireable<boolean>;
22
23
  titlePosition: PropTypes.Requireable<string>;
23
24
  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: `titleId-${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": `titleId-${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,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,oB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E,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={`titleId-${idx}`} className={style.title}>\n {filter.title}\n </p>\n <div className={style.toggle}>\n <InputSwitch {...filter.display} aria-labelledby={`titleId-${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,GAA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,EAAtB;UAAyB,SAAS,EAAET,KAAK,CAACa;QAA1C,GACGL,MAAM,CAACK,KADV,CADF,eAIE;UAAK,SAAS,EAAEb,KAAK,CAACkB;QAAtB,gBACE,oBAAC,WAAD,eAAiBV,MAAM,CAACW,OAAxB;UAAiC,mBAAkB,WAAUV,GAAI;QAAjE,GADF,CAJF,CADF;;MAUF;QACE,OAAO,IAAP;IAzCJ;EA2CD,CA7CD;;EA+CA,MAAMW,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,CA/DD;;AAiEAnB,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"}
@@ -48,6 +48,7 @@ declare class Filters extends React.Component<any, any, any> {
48
48
  moreSortAriaLabel: PropTypes.Requireable<string>;
49
49
  moreFilterAriaLabel: PropTypes.Requireable<string>;
50
50
  filterGroupAriaLabel: PropTypes.Requireable<string>;
51
+ sortAriaLabel: PropTypes.Requireable<string>;
51
52
  };
52
53
  static contextTypes: {
53
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
@@ -170,7 +176,8 @@ Filters.propTypes = process.env.NODE_ENV !== "production" ? {
170
176
  onToggleSorts: PropTypes.func,
171
177
  moreSortAriaLabel: PropTypes.string,
172
178
  moreFilterAriaLabel: PropTypes.string,
173
- filterGroupAriaLabel: PropTypes.string
179
+ filterGroupAriaLabel: PropTypes.string,
180
+ sortAriaLabel: PropTypes.string
174
181
  } : {};
175
182
  export default Filters;
176
183
  //# 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","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 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 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,GA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AMjB9C,SAAS,EAAEf,SAAS,CAAC6D,IANJ;EAOjB9B,OAAO,EAAEzB,cAAc,CAACqD,SAAf,CAAyB5B,OAPjB;EAQjBL,OAAO,EAAE1B,SAAS,CAAC8D,KAAV,CAAgB3D,MAAM,CAACwD,SAAvB,CARQ;EASjBnC,QAAQ,EAAExB,SAAS,CAAC+D,IATH;EAUjB3C,eAAe,EAAEpB,SAAS,CAAC+D,IAVV;EAWjBxC,aAAa,EAAEvB,SAAS,CAAC+D,IAXR;EAYjB9B,iBAAiB,EAAEjC,SAAS,CAAC4D,MAZZ;EAajB5B,mBAAmB,EAAEhC,SAAS,CAAC4D,MAbd;EAcjB1B,oBAAoB,EAAElC,SAAS,CAAC4D;AAdf,C;AAqKrB,eAAerD,OAAf"}
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","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 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 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,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CAAC6D,MAHP;EAIjB/B,YAAY,EAAE9B,SAAS,CAAC6D,MAJP;EAKjBhD,WAAW,EAAEb,SAAS,CAAC8D,IALN;EAMjB/C,SAAS,EAAEf,SAAS,CAAC8D,IANJ;EAOjB/B,OAAO,EAAEzB,cAAc,CAACsD,SAAf,CAAyB7B,OAPjB;EAQjBL,OAAO,EAAE1B,SAAS,CAAC+D,KAAV,CAAgB5D,MAAM,CAACyD,SAAvB,CARQ;EASjBpC,QAAQ,EAAExB,SAAS,CAACgE,IATH;EAUjB5C,eAAe,EAAEpB,SAAS,CAACgE,IAVV;EAWjBzC,aAAa,EAAEvB,SAAS,CAACgE,IAXR;EAYjB/B,iBAAiB,EAAEjC,SAAS,CAAC6D,MAZZ;EAajB7B,mBAAmB,EAAEhC,SAAS,CAAC6D,MAbd;EAcjB3B,oBAAoB,EAAElC,SAAS,CAAC6D,MAdf;EAejB1B,aAAa,EAAEnC,SAAS,CAAC6D;AAfR,C;AAuKrB,eAAetD,OAAf"}
@@ -37,6 +37,7 @@ 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>;
40
41
  modified: PropTypes.Requireable<boolean>;
41
42
  titlePosition: PropTypes.Requireable<string>;
42
43
  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,7 @@ 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>;
21
22
  modified: PropTypes.Requireable<boolean>;
22
23
  titlePosition: PropTypes.Requireable<string>;
23
24
  theme: PropTypes.Requireable<string>;
@@ -30,6 +30,7 @@ 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>;
33
34
  modified: PropTypes.Requireable<boolean>;
34
35
  titlePosition: PropTypes.Requireable<string>;
35
36
  theme: PropTypes.Requireable<string>;
@@ -43,6 +43,7 @@ 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>;
46
47
  modified: PropTypes.Requireable<boolean>;
47
48
  titlePosition: PropTypes.Requireable<string>;
48
49
  theme: PropTypes.Requireable<string>;
@@ -86,6 +86,7 @@ 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>;
89
90
  modified: PropTypes.Requireable<boolean>;
90
91
  titlePosition: PropTypes.Requireable<string>;
91
92
  theme: PropTypes.Requireable<string>;
@@ -219,6 +220,7 @@ declare namespace BrandForm {
219
220
  disabled: PropTypes.Requireable<boolean>;
220
221
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
221
222
  description: PropTypes.Requireable<string>;
223
+ 'aria-labelledby': PropTypes.Requireable<string>;
222
224
  modified: PropTypes.Requireable<boolean>;
223
225
  titlePosition: PropTypes.Requireable<string>;
224
226
  theme: PropTypes.Requireable<string>;
@@ -360,6 +362,7 @@ declare namespace BrandForm {
360
362
  disabled: PropTypes.Requireable<boolean>;
361
363
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
362
364
  description: PropTypes.Requireable<string>;
365
+ 'aria-labelledby': PropTypes.Requireable<string>;
363
366
  modified: PropTypes.Requireable<boolean>;
364
367
  titlePosition: PropTypes.Requireable<string>;
365
368
  theme: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAwBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2FE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAmBC;IAjBC;;;;MAIC;IA6CH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IArFD,2EASC;IAGC,kBAAsB;IA2ExB,6BAmYC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAwBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2FE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAmBC;IAjBC;;;;MAIC;IA6CH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IArFD,2EASC;IAGC,kBAAsB;IA2ExB,6BAqYC;CACF"}
@@ -438,8 +438,11 @@ class MoocHeader extends React.Component {
438
438
  key: settingName,
439
439
  "aria-label": ariaLabel || title
440
440
  }, /*#__PURE__*/React.createElement("span", {
441
+ id: `titleId-${settingName}`,
441
442
  className: style.label
442
- }, title), /*#__PURE__*/React.createElement(InputSwitch, switchProps));
443
+ }, title), /*#__PURE__*/React.createElement(InputSwitch, _extends({}, switchProps, {
444
+ "aria-labelledby": `titleId-${settingName}`
445
+ })));
443
446
  break;
444
447
  }
445
448
  }