@coorpacademy/components 11.7.3-alpha.5 → 11.7.3-alpha.7

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 +5 -2
  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 +5 -2
  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,sDAsEC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-switch/index.js"],"names":[],"mappings":";AAMA,sDAwEC"}
@@ -19,7 +19,8 @@ const InputSwitch = props => {
19
19
  titlePosition = 'left',
20
20
  details = '',
21
21
  requiredSelection = false,
22
- 'data-name': dataName
22
+ 'data-name': dataName,
23
+ 'aria-labelledby': ariaLabelledBy
23
24
  } = props;
24
25
 
25
26
  const idSwitch = id || _uniqueId('input-switch-');
@@ -74,7 +75,8 @@ const InputSwitch = props => {
74
75
  onChange: handleChange,
75
76
  checked: value,
76
77
  disabled: isDisabled,
77
- className: style.checkbox
78
+ className: style.checkbox,
79
+ "aria-labelledby": ariaLabelledBy
78
80
  }), /*#__PURE__*/React.createElement("label", {
79
81
  htmlFor: idSwitch,
80
82
  "data-name": "input-switch-label"
@@ -93,6 +95,7 @@ InputSwitch.propTypes = process.env.NODE_ENV !== "production" ? {
93
95
  disabled: PropTypes.bool,
94
96
  onChange: PropTypes.func,
95
97
  description: PropTypes.string,
98
+ 'aria-labelledby': PropTypes.string,
96
99
  modified: PropTypes.bool,
97
100
  titlePosition: PropTypes.oneOf(['right', 'left']),
98
101
  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' ? titleView : 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 />\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 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,EAAE,IAAI,UAAS,eAAT,CAAvB;;EACA,MAAMY,UAAU,GAAGV,QAAQ,GAAG,UAAH,GAAgB,EAA3C;EACA,MAAMW,YAAY,GAAGrB,OAAO,CAAC,MAAMsB,CAAC,IAAIX,QAAQ,CAACW,CAAC,CAACC,MAAF,CAASC,OAAV,CAApB,EAAwC,CAACb,QAAD,CAAxC,CAA5B;EAEA,MAAMc,SAAS,GAAGnB,KAAK,gBAAG;IAAM,SAAS,EAAEH,KAAK,CAACG;EAAvB,GAAgC,GAAEA,KAAM,GAAxC,CAAH,GAAwD,IAA/E;EAEA,MAAMoB,eAAe,GAAGd,WAAW,gBACjC;IAAK,SAAS,EAAET,KAAK,CAACS;EAAtB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,aAAa,KAAK,OAAlB,GAA4BU,SAA5B,GAAwC,IAD3C,EAEGT,OAAO,gBAAG;IAAK,SAAS,EAAEb,KAAK,CAACmC;EAAtB,GAAmCtB,OAAnC,CAAH,GAAuD,IAFjE,CAhBF,EAoBGU,eApBH,CADF;AAwBD,CAtED;;AAwEAtB,WAAW,CAACmC,SAAZ,2CAAwB;EACtBjC,KAAK,EAAEL,SAAS,CAACuC,MADK;EAEtBjC,IAAI,EAAEN,SAAS,CAACuC,MAFM;EAGtBhC,EAAE,EAAEP,SAAS,CAACuC,MAHQ;EAItB/B,KAAK,EAAER,SAAS,CAACwC,IAJK;EAKtB/B,QAAQ,EAAET,SAAS,CAACwC,IALE;EAMtB9B,QAAQ,EAAEV,SAAS,CAACyC,IANE;EAOtB9B,WAAW,EAAEX,SAAS,CAACuC,MAPD;EAQtB3B,QAAQ,EAAEZ,SAAS,CAACwC,IARE;EAStB1B,aAAa,EAAEd,SAAS,CAAC0C,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CATO;EAUtB7B,KAAK,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 ? <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' ? titleView : 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={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,QAAQ,GAAG,KARP;IASJC,KAAK,GAAG,SATJ;IAUJC,aAAa,GAAG,MAVZ;IAWJC,OAAO,GAAG,EAXN;IAYJC,iBAAiB,GAAG,KAZhB;IAaJ,aAAaC,QAbT;IAcJ,mBAAmBC;EAdf,IAeFd,KAfJ;;EAiBA,MAAMe,QAAQ,GAAGZ,EAAE,IAAI,UAAS,eAAT,CAAvB;;EACA,MAAMa,UAAU,GAAGX,QAAQ,GAAG,UAAH,GAAgB,EAA3C;EACA,MAAMY,YAAY,GAAGtB,OAAO,CAAC,MAAMuB,CAAC,IAAIZ,QAAQ,CAACY,CAAC,CAACC,MAAF,CAASC,OAAV,CAApB,EAAwC,CAACd,QAAD,CAAxC,CAA5B;EAEA,MAAMe,SAAS,GAAGpB,KAAK,gBAAG;IAAM,SAAS,EAAEH,KAAK,CAACG;EAAvB,GAAgC,GAAEA,KAAM,GAAxC,CAAH,GAAwD,IAA/E;EAEA,MAAMqB,eAAe,GAAGf,WAAW,gBACjC;IAAK,SAAS,EAAET,KAAK,CAACS;EAAtB,GAAoCA,WAApC,CADiC,GAE/B,IAFJ;;EAIA,MAAMgB,QAAQ,GAAG,MAAM;I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AEGV,OAAO,gBAAG;IAAK,SAAS,EAAEb,KAAK,CAACoC;EAAtB,GAAmCvB,OAAnC,CAAH,GAAuD,IAFjE,CAjBF,EAqBGW,eArBH,CADF;AAyBD,CAxED;;AA0EAvB,WAAW,CAACoC,SAAZ,2CAAwB;EACtBlC,KAAK,EAAEL,SAAS,CAACwC,MADK;EAEtBlC,IAAI,EAAEN,SAAS,CAACwC,MAFM;EAGtBjC,EAAE,EAAEP,SAAS,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"}
@@ -55,6 +55,7 @@ declare namespace BrandFormGroup {
55
55
  disabled: PropTypes.Requireable<boolean>;
56
56
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
57
57
  description: PropTypes.Requireable<string>;
58
+ 'aria-labelledby': PropTypes.Requireable<string>;
58
59
  modified: PropTypes.Requireable<boolean>;
59
60
  titlePosition: PropTypes.Requireable<string>;
60
61
  theme: PropTypes.Requireable<string>;
@@ -177,6 +178,7 @@ declare namespace BrandFormGroup {
177
178
  disabled: PropTypes.Requireable<boolean>;
178
179
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
179
180
  description: PropTypes.Requireable<string>;
181
+ 'aria-labelledby': PropTypes.Requireable<string>;
180
182
  modified: PropTypes.Requireable<boolean>;
181
183
  titlePosition: PropTypes.Requireable<string>;
182
184
  theme: PropTypes.Requireable<string>;
@@ -307,6 +309,7 @@ declare namespace BrandFormGroup {
307
309
  disabled: PropTypes.Requireable<boolean>;
308
310
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
309
311
  description: PropTypes.Requireable<string>;
312
+ 'aria-labelledby': PropTypes.Requireable<string>;
310
313
  modified: PropTypes.Requireable<boolean>;
311
314
  titlePosition: PropTypes.Requireable<string>;
312
315
  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,sEAuDC"}
1
+ {"version":3,"file":"filters-wrapper.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/filters-wrapper.js"],"names":[],"mappings":";AAUA,sEAyDC"}
@@ -64,10 +64,13 @@ const FiltersWapper = (props, context) => {
64
64
  className: style.choice,
65
65
  key: idx
66
66
  }, /*#__PURE__*/React.createElement("p", {
67
+ id: `titleId-${idx}`,
67
68
  className: style.title
68
69
  }, filter.title), /*#__PURE__*/React.createElement("div", {
69
70
  className: style.toggle
70
- }, /*#__PURE__*/React.createElement(InputSwitch, filter.display)));
71
+ }, /*#__PURE__*/React.createElement(InputSwitch, _extends({}, filter.display, {
72
+ "aria-labelledby": `titleId-${idx}`
73
+ }))));
71
74
 
72
75
  default:
73
76
  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","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} = 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 <div className={classnames(className, emptyFilters ? style.wrapperNone : style.wrapper)}>\n {filtersList}\n </div>\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};\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;EAAV,IAAuBH,KAA7B;;EAEA,MAAMI,WAAW,GAAG,CAACC,MAAD,EAASC,GAAT,KAAiB;IACnC,MAAM;MAACC,IAAD;MAAOC;IAAP,IAAoBH,MAA1B;;IACA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AAG,KAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0Bf,WAA1B,EAAuCF,OAAvC,CAApB;;EACA,MAAMkB,YAAY,GAAG,SAAQlB,OAAR,CAArB;;EACA,oBACE;IAAK,SAAS,EAAET,UAAU,CAACU,SAAD,EAAYiB,YAAY,GAAGtB,KAAK,CAACuB,WAAT,GAAuBvB,KAAK,CAACwB,OAArD;EAA1B,GACGL,WADH,CADF;AAKD,CAvDD;;AAyDAlB,aAAa,CAACwB,SAAd,2CAA0B;EACxBpB,SAAS,EAAEX,SAAS,CAACgC,MADG;EAExBtB,OAAO,EAAEV,SAAS,CAACiC,OAAV,CACPjC,SAAS,CAACkC,KAAV,CAAgB;IACdnB,IAAI,EAAEf,SAAS,CAACmC,KAAV,CAAgB,CAAC,QAAD,EAAW,OAAX,EAAoB,OAApB,EAA6B,QAA7B,CAAhB,EAAwDC,UADhD;IAEdpB,SAAS,EAAEhB,SAAS,CAACgC,MAAV,CAAiBI;EAFd,CAAhB,CADO;AAFe,CAA1B;AASA,eAAe7B,aAAf"}
1
+ {"version":3,"file":"filters-wrapper.js","names":["React","PropTypes","classnames","Select","InputSwitch","RadioGroup","RangeSlider","style","FiltersWapper","props","context","filters","className","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} = 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 <div className={classnames(className, emptyFilters ? style.wrapperNone : style.wrapper)}>\n {filtersList}\n </div>\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};\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,MAA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CAACK,KADV,CADF,eAIE;UAAK,SAAS,EAAEZ,KAAK,CAACiB;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,EAAuCF,OAAvC,CAApB;;EACA,MAAMkB,YAAY,GAAG,SAAQlB,OAAR,CAArB;;EACA,oBACE;IAAK,SAAS,EAAET,UAAU,CAACU,SAAD,EAAYiB,YAAY,GAAGtB,KAAK,CAACuB,WAAT,GAAuBvB,KAAK,CAACwB,OAArD;EAA1B,GACGL,WADH,CADF;AAKD,CAzDD;;AA2DAlB,aAAa,CAACwB,SAAd,2CAA0B;EACxBpB,SAAS,EAAEX,SAAS,CAACgC,MADG;EAExBtB,OAAO,EAAEV,SAAS,CAACiC,OAAV,CACPjC,SAAS,CAACkC,KAAV,CAAgB;IACdnB,IAAI,EAAEf,SAAS,CAACmC,KAAV,CAAgB,CAAC,QAAD,EAAW,OAAX,EAAoB,OAApB,EAA6B,QAA7B,CAAhB,EAAwDC,UADhD;IAEdpB,SAAS,EAAEhB,SAAS,CAACgC,MAAV,CAAiBI;EAFd,CAAhB,CADO;AAFe,CAA1B;AASA,eAAe7B,aAAf"}
@@ -38,6 +38,7 @@ declare class Filters extends React.Component<any, any, any> {
38
38
  onToggleSorts: PropTypes.Requireable<(...args: any[]) => any>;
39
39
  moreSortAriaLabel: PropTypes.Requireable<string>;
40
40
  moreFilterAriaLabel: PropTypes.Requireable<string>;
41
+ sortAriaLabel: PropTypes.Requireable<string>;
41
42
  };
42
43
  static contextTypes: {
43
44
  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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAcE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBASC;IAPC;;;MAGC;IAMH,yBAcC;IAED,uBAYC;IAED,qBAOC;IAED,sBAsFC;CACF"}
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,sBAuFC;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';
@@ -72,7 +75,8 @@ class Filters extends React.Component {
72
75
  sortTabLabel,
73
76
  filters,
74
77
  moreFilterAriaLabel,
75
- moreSortAriaLabel
78
+ moreSortAriaLabel,
79
+ sortAriaLabel
76
80
  } = this.props;
77
81
  const {
78
82
  filter,
@@ -91,7 +95,9 @@ class Filters extends React.Component {
91
95
  const sortView = sorting !== undefined ? /*#__PURE__*/React.createElement("div", {
92
96
  "data-name": "choice",
93
97
  className: style.select
94
- }, /*#__PURE__*/React.createElement(Select, sorting)) : null;
98
+ }, /*#__PURE__*/React.createElement(Select, _extends({}, sorting, {
99
+ "aria-label": sortAriaLabel
100
+ }))) : null;
95
101
  return /*#__PURE__*/React.createElement("div", {
96
102
  "data-name": "search",
97
103
  className: style.search
@@ -167,7 +173,8 @@ Filters.propTypes = process.env.NODE_ENV !== "production" ? {
167
173
  onToggleFilters: PropTypes.func,
168
174
  onToggleSorts: PropTypes.func,
169
175
  moreSortAriaLabel: PropTypes.string,
170
- moreFilterAriaLabel: PropTypes.string
176
+ moreFilterAriaLabel: PropTypes.string,
177
+ sortAriaLabel: PropTypes.string
171
178
  } : {};
172
179
  export default Filters;
173
180
  //# 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","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 };\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 } = 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 className={style.wrapper} filters={filters} />\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;EAqBpCC,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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BAAiB,EAAEjC,SAAS,CAAC2D,MAZZ;EAajB3B,mBAAmB,EAAEhC,SAAS,CAAC2D;AAbd,C;AA+JrB,eAAepD,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","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 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 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 className={style.wrapper} filters={filters} />\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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4D,MAbd;EAcjB1B,aAAa,EAAElC,SAAS,CAAC4D;AAdR,C;AAiKrB,eAAerD,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>;
@@ -85,6 +85,7 @@ declare namespace BrandForm {
85
85
  disabled: PropTypes.Requireable<boolean>;
86
86
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
87
87
  description: PropTypes.Requireable<string>;
88
+ 'aria-labelledby': PropTypes.Requireable<string>;
88
89
  modified: PropTypes.Requireable<boolean>;
89
90
  titlePosition: PropTypes.Requireable<string>;
90
91
  theme: PropTypes.Requireable<string>;
@@ -207,6 +208,7 @@ declare namespace BrandForm {
207
208
  disabled: PropTypes.Requireable<boolean>;
208
209
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
209
210
  description: PropTypes.Requireable<string>;
211
+ 'aria-labelledby': PropTypes.Requireable<string>;
210
212
  modified: PropTypes.Requireable<boolean>;
211
213
  titlePosition: PropTypes.Requireable<string>;
212
214
  theme: PropTypes.Requireable<string>;
@@ -337,6 +339,7 @@ declare namespace BrandForm {
337
339
  disabled: PropTypes.Requireable<boolean>;
338
340
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
339
341
  description: PropTypes.Requireable<string>;
342
+ 'aria-labelledby': PropTypes.Requireable<string>;
340
343
  modified: PropTypes.Requireable<boolean>;
341
344
  titlePosition: PropTypes.Requireable<string>;
342
345
  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
  }