@coorpacademy/components 11.40.12 → 11.40.13-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/es/molecule/dashboard/cards-list/style.css +4 -4
  2. package/es/molecule/quick-filters/index.d.ts +25 -3
  3. package/es/molecule/quick-filters/index.d.ts.map +1 -1
  4. package/es/molecule/quick-filters/index.js +54 -22
  5. package/es/molecule/quick-filters/index.js.map +1 -1
  6. package/es/molecule/quick-filters/style.css +87 -6
  7. package/es/molecule/quick-filters/types.d.ts +0 -4
  8. package/es/molecule/quick-filters/types.d.ts.map +1 -1
  9. package/es/molecule/quick-filters/types.js +0 -2
  10. package/es/molecule/quick-filters/types.js.map +1 -1
  11. package/es/template/common/search-page/index.d.ts +65 -0
  12. package/es/template/common/search-page/index.d.ts.map +1 -1
  13. package/es/template/common/search-page/index.js +12 -3
  14. package/es/template/common/search-page/index.js.map +1 -1
  15. package/es/template/common/search-page/style.css +4 -3
  16. package/lib/molecule/dashboard/cards-list/style.css +4 -4
  17. package/lib/molecule/quick-filters/index.d.ts +25 -3
  18. package/lib/molecule/quick-filters/index.d.ts.map +1 -1
  19. package/lib/molecule/quick-filters/index.js +55 -23
  20. package/lib/molecule/quick-filters/index.js.map +1 -1
  21. package/lib/molecule/quick-filters/style.css +87 -6
  22. package/lib/molecule/quick-filters/types.d.ts +0 -4
  23. package/lib/molecule/quick-filters/types.d.ts.map +1 -1
  24. package/lib/molecule/quick-filters/types.js +0 -2
  25. package/lib/molecule/quick-filters/types.js.map +1 -1
  26. package/lib/template/common/search-page/index.d.ts +65 -0
  27. package/lib/template/common/search-page/index.d.ts.map +1 -1
  28. package/lib/template/common/search-page/index.js +12 -3
  29. package/lib/template/common/search-page/index.js.map +1 -1
  30. package/lib/template/common/search-page/style.css +4 -3
  31. package/package.json +2 -2
@@ -21,11 +21,13 @@ import Tag from '../../../atom/tag';
21
21
  import { cardPropTypes } from '../../../molecule/card';
22
22
  import LearningPriorityCard from '../../../molecule/learning-priority-card';
23
23
  import { COLORS } from '../../../variables/colors';
24
+ import QuickFilters from '../../../molecule/quick-filters';
24
25
  import style from './style.css';
25
26
  const SearchPage = (props, context) => {
26
27
  const {
27
28
  title,
28
29
  searchFilters,
30
+ quickFilters,
29
31
  cards,
30
32
  count,
31
33
  noresultsfound,
@@ -43,7 +45,11 @@ const SearchPage = (props, context) => {
43
45
  } = context;
44
46
  const defaultColor = _getOr('#00B0FF', 'common.primary', skin);
45
47
  const nodeRef = useRef(null);
46
- const recommendationsView = _isEmpty(recommendations) ? null : /*#__PURE__*/React.createElement(CardsList, recommendations);
48
+ const recommendationsView = _isEmpty(recommendations) ? null : /*#__PURE__*/React.createElement(CardsList, _extends({}, recommendations, {
49
+ customStyle: {
50
+ padding: 0
51
+ }
52
+ }));
47
53
 
48
54
  // Helper function to render content sections
49
55
  const renderSection = section => {
@@ -128,12 +134,14 @@ const SearchPage = (props, context) => {
128
134
  })), /*#__PURE__*/React.createElement("div", {
129
135
  className: style.contentGrid
130
136
  }, " ", cardsView)));
131
- return /*#__PURE__*/React.createElement("div", null, searchFilters ? /*#__PURE__*/React.createElement(Filters, _extends({}, searchFilters, {
137
+ return /*#__PURE__*/React.createElement("div", {
138
+ "data-name": "filters"
139
+ }, searchFilters ? /*#__PURE__*/React.createElement(Filters, _extends({}, searchFilters, {
132
140
  moreSortAriaLabel: moreSortAriaLabel,
133
141
  moreFilterAriaLabel: moreFilterAriaLabel,
134
142
  filterGroupAriaLabel: filterGroupAriaLabel,
135
143
  sortAriaLabel: sortAriaLabel
136
- })) : null, hasSections ? /*#__PURE__*/React.createElement("div", {
144
+ })) : null, quickFilters ? /*#__PURE__*/React.createElement(QuickFilters, quickFilters) : null, hasSections ? /*#__PURE__*/React.createElement("div", {
137
145
  "data-name": "explorerSections",
138
146
  className: style.sectionsWrapper
139
147
  }, sortedSections.map((section, index) => /*#__PURE__*/React.createElement("div", {
@@ -157,6 +165,7 @@ SearchPage.propTypes = process.env.NODE_ENV !== "production" ? {
157
165
  noresultsfound: PropTypes.string,
158
166
  title: PropTypes.string,
159
167
  searchFilters: PropTypes.shape(Filters.propTypes),
168
+ quickFilters: PropTypes.shape(QuickFilters.propTypes),
160
169
  cards: PropTypes.shape(CardsGrid.propTypes),
161
170
  count: PropTypes.number,
162
171
  clearFilters: PropTypes.shape(Button.propTypes),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useRef","PropTypes","Provider","Button","Filters","CardsGrid","CardsList","CertificationCard","LearnerSkillCard","PlaylistCard","CMPopin","Tag","cardPropTypes","LearningPriorityCard","COLORS","style","SearchPage","props","context","title","searchFilters","cards","count","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","filterGroupAriaLabel","sortAriaLabel","popinWithCards","sections","skin","defaultColor","_getOr","nodeRef","recommendationsView","_isEmpty","createElement","renderSection","section","sectionCount","length","titleWithCount","className","sectionTitle","label","toString","type","size","customStyle","backgroundColor","cm_grey_100","color","neutral_500","sectionProps","dataName","key","_extends","cardsView","list","noresults","noresultstxt","clear","background","sortedSections","_pipe","_keys","_map","_sortBy","hasSections","_size","contentGridSection","contentSection","sectionHeader","contentGrid","sectionsWrapper","map","index","cardsWrapper","role","ref","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","string","shape","number","objectOf","arrayOf","oneOfType","showMore","onShowMore","func","order","showMoreOnLeftAriaLabel","showMoreOnRightAriaLabel"],"sources":["../../../../src/template/common/search-page/index.js"],"sourcesContent":["import React, {useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, isEmpty, keys, map, pipe, size, sortBy} from 'lodash/fp';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Filters from '../../../molecule/filters';\nimport CardsGrid from '../../../organism/cards-grid';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport CertificationCard from '../../../molecule/certification-card';\nimport LearnerSkillCard from '../../../molecule/learner-skill-card';\nimport PlaylistCard from '../../../molecule/playlist-card';\nimport CMPopin from '../../../molecule/cm-popin';\nimport Tag from '../../../atom/tag';\nimport {cardPropTypes} from '../../../molecule/card';\nimport LearningPriorityCard from '../../../molecule/learning-priority-card';\nimport {COLORS} from '../../../variables/colors';\nimport style from './style.css';\n\nconst SearchPage = (props, context) => {\n const {\n title,\n searchFilters,\n cards,\n count,\n noresultsfound,\n clearFilters,\n recommendations,\n moreSortAriaLabel,\n moreFilterAriaLabel,\n filterGroupAriaLabel,\n sortAriaLabel,\n popinWithCards,\n sections = {}\n } = props;\n const {skin} = context;\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n const nodeRef = useRef(null);\n const recommendationsView = isEmpty(recommendations) ? null : <CardsList {...recommendations} />;\n\n // Helper function to render content sections\n const renderSection = section => {\n if (!section || isEmpty(section.cards)) return null;\n\n // Use count from props, fallback to cards.length\n const sectionCount = section.count || section.cards.length;\n\n // Create title with count tag\n const titleWithCount = (\n <div className={style.sectionTitle}>\n <span data-name=\"section-title\">{section.title}</span>\n <Tag\n label={sectionCount.toString()}\n type=\"default\"\n size=\"S\"\n customStyle={{backgroundColor: COLORS.cm_grey_100, color: COLORS.neutral_500}}\n />\n </div>\n );\n\n const sectionProps = {\n ...section,\n title: titleWithCount,\n dataName: `${section.key}-section`\n };\n\n // Use CardsList with appropriate type for all sections\n if (section.key === 'certifications') {\n return <CardsList {...sectionProps} type=\"certifications\" />;\n }\n\n if (section.key === 'skills') {\n return <CardsList {...sectionProps} type=\"skills\" />;\n }\n\n if (section.key === 'playlists') {\n return <CardsList {...sectionProps} type=\"playlists\" />;\n }\n\n // For new content, use standard cards\n return <CardsList {...sectionProps} />;\n };\n\n const cardsView = isEmpty(cards?.list) ? (\n <div>\n <div className={style.noresults}>\n <div className={style.noresultstxt}>{noresultsfound}</div>\n <Button\n {...clearFilters}\n data-name=\"searchPageClear\"\n className={style.clear}\n style={{background: defaultColor}}\n type=\"link\"\n />\n </div>\n {recommendationsView}\n </div>\n ) : (\n <CardsGrid {...cards} />\n );\n\n // Convert sections object to array and sort by order\n const sortedSections = pipe(\n keys,\n map(key => ({key, ...sections[key]})),\n sortBy('order')\n )(sections);\n\n const hasSections = size(sortedSections) > 0;\n\n const contentGridSection = (\n <div className={style.contentSection}>\n <div className={style.sectionHeader}>\n <div className={style.sectionTitle}>\n <span>{title}</span>\n <Tag\n label={count || cards.list.length.toString()}\n type=\"default\"\n size=\"S\"\n customStyle={{backgroundColor: COLORS.cm_grey_100, color: COLORS.neutral_500}}\n />\n </div>\n <div className={style.contentGrid}> {cardsView}</div>\n </div>\n </div>\n );\n\n return (\n <div>\n {searchFilters ? (\n <Filters\n {...searchFilters}\n moreSortAriaLabel={moreSortAriaLabel}\n moreFilterAriaLabel={moreFilterAriaLabel}\n filterGroupAriaLabel={filterGroupAriaLabel}\n sortAriaLabel={sortAriaLabel}\n />\n ) : null}\n\n {hasSections ? (\n <div data-name=\"explorerSections\" className={style.sectionsWrapper}>\n {sortedSections.map((section, index) => (\n <div data-name={`section-${section.key}`} key={`${section.key}-${index}`}>\n {renderSection(section)}\n </div>\n ))}\n {contentGridSection ? <div>{contentGridSection}</div> : null}\n </div>\n ) : (\n <div data-name=\"searchResult\" className={style.cardsWrapper}>\n <div className={style.title} role=\"status\">\n {title}\n </div>\n {cardsView}\n </div>\n )}\n\n {popinWithCards ? (\n <div className={style.popinWithCards} ref={nodeRef}>\n <CMPopin {...popinWithCards} />\n </div>\n ) : null}\n </div>\n );\n};\n\nSearchPage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearchPage.propTypes = {\n noresultsfound: PropTypes.string,\n title: PropTypes.string,\n searchFilters: PropTypes.shape(Filters.propTypes),\n cards: PropTypes.shape(CardsGrid.propTypes),\n count: PropTypes.number,\n clearFilters: PropTypes.shape(Button.propTypes),\n recommendations: PropTypes.shape(CardsList.propTypes),\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string,\n filterGroupAriaLabel: PropTypes.string,\n sortAriaLabel: PropTypes.string,\n popinWithCards: PropTypes.shape(CMPopin.propTypes),\n sections: PropTypes.objectOf(\n PropTypes.shape({\n title: PropTypes.string,\n cards: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape(cardPropTypes),\n PropTypes.shape(LearnerSkillCard.propTypes),\n PropTypes.shape(CertificationCard.propTypes),\n PropTypes.shape(PlaylistCard.propTypes),\n PropTypes.shape(LearningPriorityCard.propTypes)\n ])\n ),\n showMore: PropTypes.string,\n onShowMore: PropTypes.func,\n order: PropTypes.number,\n count: PropTypes.number,\n 'arrows-aria-label': PropTypes.shape({\n showMoreOnLeftAriaLabel: PropTypes.string,\n showMoreOnRightAriaLabel: PropTypes.string\n })\n })\n )\n};\n\nexport default SearchPage;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,IAAGC,MAAM,QAAO,OAAO;AACnC,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,OAAOC,MAAM,MAAM,sBAAsB;AACzC,OAAOC,OAAO,MAAM,2BAA2B;AAC/C,OAAOC,SAAS,MAAM,8BAA8B;AACpD,OAAOC,SAAS,MAAM,wCAAwC;AAC9D,OAAOC,iBAAiB,MAAM,sCAAsC;AACpE,OAAOC,gBAAgB,MAAM,sCAAsC;AACnE,OAAOC,YAAY,MAAM,iCAAiC;AAC1D,OAAOC,OAAO,MAAM,4BAA4B;AAChD,OAAOC,GAAG,MAAM,mBAAmB;AACnC,SAAQC,aAAa,QAAO,wBAAwB;AACpD,OAAOC,oBAAoB,MAAM,0CAA0C;AAC3E,SAAQC,MAAM,QAAO,2BAA2B;AAChD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,UAAU,GAAGA,CAACC,KAAK,EAAEC,OAAO,KAAK;EACrC,MAAM;IACJC,KAAK;IACLC,aAAa;IACbC,KAAK;IACLC,KAAK;IACLC,cAAc;IACdC,YAAY;IACZC,eAAe;IACfC,iBAAiB;IACjBC,mBA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BAAwB,EAAElG,SAAS,CAACuF;IACtC,CAAC;EACH,CAAC,CACH;AACF,CAAC;AAED,eAAexE,UAAU","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","useRef","PropTypes","Provider","Button","Filters","CardsGrid","CardsList","CertificationCard","LearnerSkillCard","PlaylistCard","CMPopin","Tag","cardPropTypes","LearningPriorityCard","COLORS","QuickFilters","style","SearchPage","props","context","title","searchFilters","quickFilters","cards","count","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","filterGroupAriaLabel","sortAriaLabel","popinWithCards","sections","skin","defaultColor","_getOr","nodeRef","recommendationsView","_isEmpty","createElement","_extends","customStyle","padding","renderSection","section","sectionCount","length","titleWithCount","className","sectionTitle","label","toString","type","size","backgroundColor","cm_grey_100","color","neutral_500","sectionProps","dataName","key","cardsView","list","noresults","noresultstxt","clear","background","sortedSections","_pipe","_keys","_map","_sortBy","hasSections","_size","contentGridSection","contentSection","sectionHeader","contentGrid","sectionsWrapper","map","index","cardsWrapper","role","ref","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","string","shape","number","objectOf","arrayOf","oneOfType","showMore","onShowMore","func","order","showMoreOnLeftAriaLabel","showMoreOnRightAriaLabel"],"sources":["../../../../src/template/common/search-page/index.js"],"sourcesContent":["import React, {useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, isEmpty, keys, map, pipe, size, sortBy} from 'lodash/fp';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Filters from '../../../molecule/filters';\nimport CardsGrid from '../../../organism/cards-grid';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport CertificationCard from '../../../molecule/certification-card';\nimport LearnerSkillCard from '../../../molecule/learner-skill-card';\nimport PlaylistCard from '../../../molecule/playlist-card';\nimport CMPopin from '../../../molecule/cm-popin';\nimport Tag from '../../../atom/tag';\nimport {cardPropTypes} from '../../../molecule/card';\nimport LearningPriorityCard from '../../../molecule/learning-priority-card';\nimport {COLORS} from '../../../variables/colors';\nimport QuickFilters from '../../../molecule/quick-filters';\nimport style from './style.css';\n\nconst SearchPage = (props, context) => {\n const {\n title,\n searchFilters,\n quickFilters,\n cards,\n count,\n noresultsfound,\n clearFilters,\n recommendations,\n moreSortAriaLabel,\n moreFilterAriaLabel,\n filterGroupAriaLabel,\n sortAriaLabel,\n popinWithCards,\n sections = {}\n } = props;\n const {skin} = context;\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n const nodeRef = useRef(null);\n const recommendationsView = isEmpty(recommendations) ? null : (\n <CardsList {...recommendations} customStyle={{padding: 0}} />\n );\n\n // Helper function to render content sections\n const renderSection = section => {\n if (!section || isEmpty(section.cards)) return null;\n\n // Use count from props, fallback to cards.length\n const sectionCount = section.count || section.cards.length;\n\n // Create title with count tag\n const titleWithCount = (\n <div className={style.sectionTitle}>\n <span data-name=\"section-title\">{section.title}</span>\n <Tag\n label={sectionCount.toString()}\n type=\"default\"\n size=\"S\"\n customStyle={{backgroundColor: COLORS.cm_grey_100, color: COLORS.neutral_500}}\n />\n </div>\n );\n\n const sectionProps = {\n ...section,\n title: titleWithCount,\n dataName: `${section.key}-section`\n };\n\n // Use CardsList with appropriate type for all sections\n if (section.key === 'certifications') {\n return <CardsList {...sectionProps} type=\"certifications\" />;\n }\n\n if (section.key === 'skills') {\n return <CardsList {...sectionProps} type=\"skills\" />;\n }\n\n if (section.key === 'playlists') {\n return <CardsList {...sectionProps} type=\"playlists\" />;\n }\n\n // For new content, use standard cards\n return <CardsList {...sectionProps} />;\n };\n\n const cardsView = isEmpty(cards?.list) ? (\n <div>\n <div className={style.noresults}>\n <div className={style.noresultstxt}>{noresultsfound}</div>\n <Button\n {...clearFilters}\n data-name=\"searchPageClear\"\n className={style.clear}\n style={{background: defaultColor}}\n type=\"link\"\n />\n </div>\n {recommendationsView}\n </div>\n ) : (\n <CardsGrid {...cards} />\n );\n\n // Convert sections object to array and sort by order\n const sortedSections = pipe(\n keys,\n map(key => ({key, ...sections[key]})),\n sortBy('order')\n )(sections);\n\n const hasSections = size(sortedSections) > 0;\n\n const contentGridSection = (\n <div className={style.contentSection}>\n <div className={style.sectionHeader}>\n <div className={style.sectionTitle}>\n <span>{title}</span>\n <Tag\n label={count || cards.list.length.toString()}\n type=\"default\"\n size=\"S\"\n customStyle={{backgroundColor: COLORS.cm_grey_100, color: COLORS.neutral_500}}\n />\n </div>\n <div className={style.contentGrid}> {cardsView}</div>\n </div>\n </div>\n );\n\n return (\n <div data-name=\"filters\">\n {searchFilters ? (\n <Filters\n {...searchFilters}\n moreSortAriaLabel={moreSortAriaLabel}\n moreFilterAriaLabel={moreFilterAriaLabel}\n filterGroupAriaLabel={filterGroupAriaLabel}\n sortAriaLabel={sortAriaLabel}\n />\n ) : null}\n {quickFilters ? <QuickFilters {...quickFilters} /> : null}\n\n {hasSections ? (\n <div data-name=\"explorerSections\" className={style.sectionsWrapper}>\n {sortedSections.map((section, index) => (\n <div data-name={`section-${section.key}`} key={`${section.key}-${index}`}>\n {renderSection(section)}\n </div>\n ))}\n {contentGridSection ? <div>{contentGridSection}</div> : null}\n </div>\n ) : (\n <div data-name=\"searchResult\" className={style.cardsWrapper}>\n <div className={style.title} role=\"status\">\n {title}\n </div>\n {cardsView}\n </div>\n )}\n\n {popinWithCards ? (\n <div className={style.popinWithCards} ref={nodeRef}>\n <CMPopin {...popinWithCards} />\n </div>\n ) : null}\n </div>\n );\n};\n\nSearchPage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearchPage.propTypes = {\n noresultsfound: PropTypes.string,\n title: PropTypes.string,\n searchFilters: PropTypes.shape(Filters.propTypes),\n quickFilters: PropTypes.shape(QuickFilters.propTypes),\n cards: PropTypes.shape(CardsGrid.propTypes),\n count: PropTypes.number,\n clearFilters: PropTypes.shape(Button.propTypes),\n recommendations: PropTypes.shape(CardsList.propTypes),\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string,\n filterGroupAriaLabel: PropTypes.string,\n sortAriaLabel: PropTypes.string,\n popinWithCards: PropTypes.shape(CMPopin.propTypes),\n sections: PropTypes.objectOf(\n PropTypes.shape({\n title: PropTypes.string,\n cards: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape(cardPropTypes),\n PropTypes.shape(LearnerSkillCard.propTypes),\n PropTypes.shape(CertificationCard.propTypes),\n PropTypes.shape(PlaylistCard.propTypes),\n PropTypes.shape(LearningPriorityCard.propTypes)\n ])\n ),\n showMore: PropTypes.string,\n onShowMore: PropTypes.func,\n order: PropTypes.number,\n count: PropTypes.number,\n 'arrows-aria-label': PropTypes.shape({\n showMoreOnLeftAriaLabel: PropTypes.string,\n showMoreOnRightAriaLabel: PropTypes.string\n })\n })\n )\n};\n\nexport default SearchPage;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,IAAGC,MAAM,QAAO,OAAO;AACnC,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,OAAOC,MAAM,MAAM,sBAAsB;AACzC,OAAOC,OAAO,MAAM,2BAA2B;AAC/C,OAAOC,SAAS,MAAM,8BAA8B;AACpD,OAAOC,SAAS,MAAM,wCAAwC;AAC9D,OAAOC,iBAAiB,MAAM,sCAAsC;AACpE,OAAOC,gBAAgB,MAAM,sCAAsC;AACnE,OAAOC,YAAY,MAAM,iCAAiC;AAC1D,OAAOC,OAAO,MAAM,4BAA4B;AAChD,OAAOC,GAAG,MAAM,mBAAmB;AACnC,SAAQC,aAAa,QAAO,wBAAwB;AACpD,OAAOC,oBAAoB,MAAM,0CAA0C;AAC3E,SAAQC,MAAM,QAAO,2BAA2B;AAChD,OAAOC,YAAY,MAAM,iCAAiC;AAC1D,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,UAAU,GAAGA,CAACC,KAAK,EAAEC,OAAO,KAAK;EACrC,MAAM;IACJC,KAAK;IACLC,aAAa;IACbC,YAAY;IACZC,KAAK;IACLC,KAAK;IACLC,cAAc;IAC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K,CAAC/E,oBAAoB,CAAC0E,SAAS,CAAC,CAChD,CACH,CAAC;IACDU,QAAQ,EAAEhG,SAAS,CAAC0F,MAAM;IAC1BO,UAAU,EAAEjG,SAAS,CAACkG,IAAI;IAC1BC,KAAK,EAAEnG,SAAS,CAAC4F,MAAM;IACvBrE,KAAK,EAAEvB,SAAS,CAAC4F,MAAM;IACvB,mBAAmB,EAAE5F,SAAS,CAAC2F,KAAK,CAAC;MACnCS,uBAAuB,EAAEpG,SAAS,CAAC0F,MAAM;MACzCW,wBAAwB,EAAErG,SAAS,CAAC0F;IACtC,CAAC;EACH,CAAC,CACH;AACF,CAAC;AAED,eAAe1E,UAAU","ignoreList":[]}
@@ -4,7 +4,6 @@
4
4
  @value mobile from breakpoints;
5
5
  @value colors: "../../../variables/colors.css";
6
6
  @value xtraLightGrey from colors;
7
- @value dark from colors;
8
7
  @value black from colors;
9
8
  @value white from colors;
10
9
  @value cm_grey_500 from colors;
@@ -12,6 +11,8 @@
12
11
  .cardsWrapper {
13
12
  display: block;
14
13
  width: 100%;
14
+ max-width: 1100px;
15
+ margin: 0px auto;
15
16
  height: auto;
16
17
  box-sizing: border-box;
17
18
  padding: 0 0 16px;
@@ -35,7 +36,7 @@
35
36
  font-family: "Gilroy";
36
37
  font-size: 20px;
37
38
  font-weight: 700;
38
- color: dark;
39
+ color: cm_grey_500;
39
40
  padding: 25px;
40
41
  background: white;
41
42
  }
@@ -72,7 +73,7 @@
72
73
  font-family: "Gilroy";
73
74
  font-size: 16px;
74
75
  font-weight: 600;
75
- color: dark;
76
+ color: cm_grey_500;
76
77
  }
77
78
 
78
79
  .contentSection .sectionTitle {
@@ -3,13 +3,13 @@
3
3
  @value mobile from breakpoints;
4
4
  @value tablet from breakpoints;
5
5
  @value desktop from breakpoints;
6
- @value dark from colors;
7
6
  @value black from colors;
8
7
  @value lightMediumGray from colors;
9
8
  @value medium from colors;
10
9
  @value light from colors;
11
10
  @value cm_grey_100 from colors;
12
11
  @value cm_grey_75 from colors;
12
+ @value cm_grey_500 from colors;
13
13
 
14
14
  .wrapper {
15
15
  padding: 16px 30px 8px;
@@ -47,7 +47,7 @@
47
47
  display: flex;
48
48
  align-items: center;
49
49
  flex-grow: 1;
50
- color: dark;
50
+ color: cm_grey_500;
51
51
  }
52
52
 
53
53
  .titleNode {
@@ -71,13 +71,13 @@
71
71
  cursor: pointer;
72
72
  display: flex;
73
73
  align-items: center;
74
- color: dark;
74
+ color: cm_grey_500;
75
75
  padding-right: 16px;
76
76
  margin-right: 16px;
77
77
  }
78
78
  .showMoreBar {
79
79
  composes: showMore;
80
- border-right: 1px solid color(dark a(70%));
80
+ border-right: 1px solid color(cm_grey_500 a(70%));
81
81
  height: 16px;
82
82
  margin: auto 16px auto auto;
83
83
  padding-top: 2px;
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
+ import { WebContextValues } from '../../atom/provider/web-context';
2
3
  import { QuickFiltersProps } from './types';
3
4
  export declare const handleScroll: (direction: number, listRef: React.RefObject<HTMLDivElement>) => void;
4
5
  declare const QuickFilters: {
5
- ({ primaryOption, filterOptions, filterButton, nextFilterAriaLabel, previousFilterAriaLabel, filterOptionsAriaLabel }: QuickFiltersProps): JSX.Element;
6
+ ({ primaryOption, filterOptions, filterButton, filterOptionsAriaLabel }: QuickFiltersProps, context: WebContextValues): JSX.Element;
6
7
  propTypes: {
7
8
  primaryOption: import("prop-types").Requireable<import("prop-types").InferProps<{
8
9
  defaultLabel: import("prop-types").Requireable<string>;
@@ -12,8 +13,6 @@ declare const QuickFilters: {
12
13
  defaultAriaLabel: import("prop-types").Requireable<string>;
13
14
  onDefaultClick: import("prop-types").Requireable<(...args: any[]) => any>;
14
15
  }>>;
15
- nextFilterAriaLabel: import("prop-types").Requireable<string>;
16
- previousFilterAriaLabel: import("prop-types").Requireable<string>;
17
16
  filterOptionsAriaLabel: import("prop-types").Requireable<string>;
18
17
  filterOptions: import("prop-types").Requireable<(import("prop-types").InferProps<{
19
18
  iconName: import("prop-types").Requireable<string>;
@@ -70,6 +69,29 @@ declare const QuickFilters: {
70
69
  customLabelClassName: import("prop-types").Requireable<string>;
71
70
  }>>;
72
71
  };
72
+ contextTypes: {
73
+ skin: import("prop-types").Requireable<import("prop-types").InferProps<{
74
+ common: import("prop-types").Requireable<{
75
+ [x: string]: any;
76
+ }>;
77
+ images: import("prop-types").Requireable<import("prop-types").InferProps<{
78
+ 'logo-mobile': import("prop-types").Requireable<any>;
79
+ logo: import("prop-types").Requireable<any>;
80
+ 'logo-email': import("prop-types").Requireable<any>;
81
+ login: import("prop-types").Requireable<any>;
82
+ }>>;
83
+ icons: import("prop-types").Requireable<{
84
+ [x: string]: any;
85
+ }>;
86
+ mod: import("prop-types").Requireable<{
87
+ [x: string]: any;
88
+ }>;
89
+ courses: import("prop-types").Requireable<any[]>;
90
+ texts: import("prop-types").Requireable<{
91
+ [x: string]: any;
92
+ }>;
93
+ }>>;
94
+ };
73
95
  };
74
96
  export default QuickFilters;
75
97
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/quick-filters/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAO5D,OAAO,EAAC,iBAAiB,EAAY,MAAM,SAAS,CAAC;AAIrD,eAAO,MAAM,YAAY,cAAe,MAAM,WAAW,MAAM,SAAS,CAAC,cAAc,CAAC,SAOvF,CAAC;AA0BF,QAAA,MAAM,YAAY;2HAOf,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GnB,CAAC;AAGF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/quick-filters/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAO5D,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAGjE,OAAO,EAAC,iBAAiB,EAAY,MAAM,SAAS,CAAC;AAIrD,eAAO,MAAM,YAAY,cAAe,MAAM,WAAW,MAAM,SAAS,CAAC,cAAc,CAAC,SAOvF,CAAC;AAyCF,QAAA,MAAM,YAAY;6EACsD,iBAAiB,WAC9E,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmH1B,CAAC;AAMF,eAAe,YAAY,CAAC"}
@@ -2,19 +2,21 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.handleScroll = exports.default = void 0;
5
+ var _get2 = _interopRequireDefault(require("lodash/fp/get"));
5
6
  var _react = _interopRequireWildcard(require("react"));
6
7
  var _classnames = _interopRequireDefault(require("classnames"));
7
8
  var _icon = _interopRequireDefault(require("../../atom/icon"));
8
9
  var _colors = require("../../variables/colors");
9
10
  var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
11
+ var _provider = _interopRequireWildcard(require("../../atom/provider"));
10
12
  var _style = _interopRequireDefault(require("./style.css"));
11
13
  var _types = require("./types");
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
14
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
15
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
17
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
16
- const SCROLL_RIGHT_SIZE = 380;
17
- const SCROLL_LEFT_SIZE = -380;
18
+ const SCROLL_RIGHT_SIZE = 400;
19
+ const SCROLL_LEFT_SIZE = -400;
18
20
  const handleScroll = (direction, listRef) => {
19
21
  if (listRef.current) {
20
22
  listRef.current.scrollBy({
@@ -24,16 +26,20 @@ const handleScroll = (direction, listRef) => {
24
26
  }
25
27
  };
26
28
  exports.handleScroll = handleScroll;
27
- const getFilterButton = filterButtonProps => {
29
+ const getFilterButton = (filterButtonProps, primarySkinColor) => {
28
30
  if (!filterButtonProps) return null;
29
31
  const {
30
- tag
32
+ tag,
33
+ ...rest
31
34
  } = filterButtonProps;
32
35
  return /*#__PURE__*/_react.default.createElement("div", {
33
- className: tag ? _style.default.filterButtonWrapper : ''
36
+ className: _style.default.filterButtonWrapper,
37
+ style: {
38
+ borderColor: tag?.label ? primarySkinColor : 'transparent'
39
+ }
34
40
  }, /*#__PURE__*/_react.default.createElement("div", {
35
41
  className: _style.default.filterButton
36
- }, /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({}, filterButtonProps, {
42
+ }, /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({}, rest, {
37
43
  icon: {
38
44
  position: 'left',
39
45
  faIcon: {
@@ -42,6 +48,14 @@ const getFilterButton = filterButtonProps => {
42
48
  color: tag ? _colors.COLORS.cm_grey_700 : _colors.COLORS.neutral_500
43
49
  }
44
50
  },
51
+ tag: tag ? {
52
+ label: tag.label,
53
+ customStyle: {
54
+ backgroundColor: primarySkinColor,
55
+ color: '#FFFFFF'
56
+ }
57
+ } : undefined,
58
+ className: _style.default.filterButton,
45
59
  "data-testid": "open-filters-modal-button",
46
60
  customStyle: {
47
61
  borderRadius: '12px'
@@ -52,10 +66,10 @@ const QuickFilters = ({
52
66
  primaryOption,
53
67
  filterOptions,
54
68
  filterButton,
55
- nextFilterAriaLabel,
56
- previousFilterAriaLabel,
57
69
  filterOptionsAriaLabel
58
- }) => {
70
+ }, context) => {
71
+ const skin = (0, _provider.GetSkinFromContext)(context);
72
+ const primarySkinColor = (0, _get2.default)('common.primary', skin);
59
73
  const {
60
74
  defaultLabel,
61
75
  defaultIconName,
@@ -80,9 +94,12 @@ const QuickFilters = ({
80
94
  if (!list || !leftButton || !rightButton) return;
81
95
  const update = () => {
82
96
  const rightArrowWidth = rightButton.offsetWidth;
83
- rightButton.style.visibility = list.scrollLeft + list.clientWidth < list.scrollWidth - rightArrowWidth ? 'visible' : 'hidden';
84
- leftButton.style.visibility = list.scrollLeft > 0 ? 'visible' : 'hidden';
85
- leftButton.style.display = list.scrollLeft > 0 ? 'flex' : 'none';
97
+ const showingRightButton = list.scrollLeft + list.clientWidth < list.scrollWidth - rightArrowWidth;
98
+ const showingLeftButton = list.scrollLeft > 0;
99
+ rightButton.style.visibility = showingRightButton ? 'visible' : 'hidden';
100
+ rightButton.style.opacity = showingRightButton ? '1' : '0';
101
+ leftButton.style.visibility = showingLeftButton ? 'visible' : 'hidden';
102
+ leftButton.style.opacity = showingLeftButton ? '1' : '0';
86
103
  };
87
104
  list.addEventListener('scroll', update);
88
105
  window.addEventListener('resize', update);
@@ -93,7 +110,8 @@ const QuickFilters = ({
93
110
  };
94
111
  }, [filterOptions]);
95
112
  return /*#__PURE__*/_react.default.createElement("div", {
96
- className: _style.default.filtersMainContainer
113
+ className: _style.default.filtersMainContainer,
114
+ "data-name": "search"
97
115
  }, /*#__PURE__*/_react.default.createElement("div", {
98
116
  className: _style.default.leftArrowButton,
99
117
  ref: leftBtnRef,
@@ -109,11 +127,11 @@ const QuickFilters = ({
109
127
  }
110
128
  },
111
129
  onClick: handleScrollLeft,
130
+ className: _style.default.leftArrowButton,
112
131
  customStyle: {
113
132
  height: '36px'
114
133
  },
115
- "data-testid": "scroll-left-button",
116
- "aria-label": previousFilterAriaLabel
134
+ "data-testid": "scroll-left-button"
117
135
  })), /*#__PURE__*/_react.default.createElement("div", {
118
136
  className: _style.default.filtersList,
119
137
  ref: filtersListRef,
@@ -129,11 +147,15 @@ const QuickFilters = ({
129
147
  faSize: 20,
130
148
  wrapperSize: 20
131
149
  },
132
- iconColor: defaultSelected ? _colors.COLORS.cm_grey_700 : _colors.COLORS.neutral_500,
133
150
  "aria-label": defaultAriaLabel
134
151
  }), /*#__PURE__*/_react.default.createElement("span", {
135
152
  className: _style.default.filterLabel
136
- }, defaultLabel)), /*#__PURE__*/_react.default.createElement("div", {
153
+ }, defaultLabel), /*#__PURE__*/_react.default.createElement("div", {
154
+ className: _style.default.bar,
155
+ style: {
156
+ background: primarySkinColor
157
+ }
158
+ })), /*#__PURE__*/_react.default.createElement("div", {
137
159
  className: _style.default.filterSeparator
138
160
  }), /*#__PURE__*/_react.default.createElement("div", {
139
161
  className: _style.default.filtersContainer
@@ -150,16 +172,23 @@ const QuickFilters = ({
150
172
  key: idx,
151
173
  className: (0, _classnames.default)(_style.default.filterOption, selected && _style.default.filterSelected),
152
174
  "data-testid": `filter-${value}-${idx}`,
175
+ style: {
176
+ borderBottomColor: primarySkinColor
177
+ },
153
178
  onClick: onClick
154
179
  }, /*#__PURE__*/_react.default.createElement(_icon.default, {
155
180
  iconName: iconName,
156
- iconColor: selected ? _colors.COLORS.cm_grey_700 : _colors.COLORS.neutral_500,
157
181
  size: {
158
182
  faSize: 20,
159
183
  wrapperSize: 20
160
184
  },
161
185
  "aria-label": ariaLabel
162
- }), /*#__PURE__*/_react.default.createElement("span", null, label));
186
+ }), /*#__PURE__*/_react.default.createElement("span", null, label), /*#__PURE__*/_react.default.createElement("div", {
187
+ className: _style.default.bar,
188
+ style: {
189
+ background: primarySkinColor
190
+ }
191
+ }));
163
192
  }), /*#__PURE__*/_react.default.createElement("div", {
164
193
  className: _style.default.rightArrowButton,
165
194
  ref: rightBtnRef,
@@ -174,14 +203,17 @@ const QuickFilters = ({
174
203
  size: 15
175
204
  }
176
205
  },
206
+ className: _style.default.rightArrowButton,
177
207
  onClick: handleScrollRight,
178
208
  customStyle: {
179
209
  height: '36px'
180
210
  },
181
- "data-testid": "scroll-right-button",
182
- "aria-label": nextFilterAriaLabel
183
- })))), getFilterButton(filterButton));
211
+ "data-testid": "scroll-right-button"
212
+ })))), getFilterButton(filterButton, primarySkinColor));
184
213
  };
185
214
  QuickFilters.propTypes = process.env.NODE_ENV !== "production" ? _types.propTypes : {};
215
+ QuickFilters.contextTypes = {
216
+ skin: _provider.default.childContextTypes.skin
217
+ };
186
218
  var _default = exports.default = QuickFilters;
187
219
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_icon","_colors","_buttonLink","_style","_types","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","SCROLL_RIGHT_SIZE","SCROLL_LEFT_SIZE","handleScroll","direction","listRef","current","scrollBy","left","behavior","exports","getFilterButton","filterButtonProps","tag","createElement","className","style","filterButtonWrapper","filterButton","icon","position","faIcon","name","size","color","COLORS","cm_grey_700","neutral_500","customStyle","borderRadius","QuickFilters","primaryOption","filterOptions","nextFilterAriaLabel","previousFilterAriaLabel","filterOptionsAriaLabel","defaultLabel","defaultIconName","defaultSelected","defaultAriaLabel","onDefaultClick","filtersListRef","React","useRef","rightBtnRef","leftBtnRef","handleScrollRight","useCallback","handleScrollLeft","useEffect","list","rightButton","leftButton","update","rightArrowWidth","offsetWidth","visibility","scrollLeft","clientWidth","scrollWidth","display","addEventListener","window","removeEventListener","filtersMainContainer","leftArrowButton","ref","onClick","height","filtersList","classNames","defaultOption","filterSelected","iconName","faSize","wrapperSize","iconColor","filterLabel","filterSeparator","filtersContainer","map","filterOption","idx","label","selected","value","ariaLabel","key","rightArrowButton","propTypes","process","env","NODE_ENV","_default"],"sources":["../../../src/molecule/quick-filters/index.tsx"],"sourcesContent":["import React, {useCallback, useRef, useEffect} from 'react';\nimport classNames from 'classnames';\nimport FaIcon from '../../atom/icon';\nimport {COLORS} from '../../variables/colors';\nimport ButtonLink from '../../atom/button-link';\nimport {ButtonLinkProps} from '../../atom/button-link/types';\nimport style from './style.css';\nimport {QuickFiltersProps, propTypes} from './types';\n\nconst SCROLL_RIGHT_SIZE = 380;\nconst SCROLL_LEFT_SIZE = -380;\nexport const handleScroll = (direction: number, listRef: React.RefObject<HTMLDivElement>) => {\n if (listRef.current) {\n listRef.current.scrollBy({\n left: direction,\n behavior: 'smooth'\n });\n }\n};\n\nconst getFilterButton = (filterButtonProps: ButtonLinkProps | undefined) => {\n if (!filterButtonProps) return null;\n const {tag} = filterButtonProps;\n return (\n <div className={tag ? style.filterButtonWrapper : ''}>\n <div className={style.filterButton}>\n <ButtonLink\n {...filterButtonProps}\n icon={{\n position: 'left',\n faIcon: {\n name: 'sliders',\n size: 14,\n color: tag ? COLORS.cm_grey_700 : COLORS.neutral_500\n }\n }}\n data-testid=\"open-filters-modal-button\"\n customStyle={{borderRadius: '12px'}}\n />\n </div>\n </div>\n );\n};\n\nconst QuickFilters = ({\n primaryOption,\n filterOptions,\n filterButton,\n nextFilterAriaLabel,\n previousFilterAriaLabel,\n filterOptionsAriaLabel\n}: QuickFiltersProps) => {\n const {defaultLabel, defaultIconName, defaultSelected, defaultAriaLabel, onDefaultClick} =\n primaryOption;\n const filtersListRef = React.useRef<HTMLDivElement>(null);\n const rightBtnRef = useRef<HTMLDivElement>(null);\n const leftBtnRef = useRef<HTMLDivElement>(null);\n\n const handleScrollRight = useCallback(() => {\n handleScroll(SCROLL_RIGHT_SIZE, filtersListRef);\n }, [filtersListRef]);\n const handleScrollLeft = useCallback(() => {\n handleScroll(SCROLL_LEFT_SIZE, filtersListRef);\n }, [filtersListRef]);\n useEffect(() => {\n const list = filtersListRef.current;\n const rightButton = rightBtnRef.current;\n const leftButton = leftBtnRef.current;\n /* istanbul ignore next */ // not testable without complex mocking useRef\n if (!list || !leftButton || !rightButton) return;\n\n const update = () => {\n const rightArrowWidth = rightButton.offsetWidth;\n rightButton.style.visibility =\n list.scrollLeft + list.clientWidth < list.scrollWidth - rightArrowWidth\n ? 'visible'\n : 'hidden';\n leftButton.style.visibility = list.scrollLeft > 0 ? 'visible' : 'hidden';\n leftButton.style.display = list.scrollLeft > 0 ? 'flex' : 'none';\n };\n\n list.addEventListener('scroll', update);\n window.addEventListener('resize', update);\n update();\n return () => {\n list.removeEventListener('scroll', update);\n window.removeEventListener('resize', update);\n };\n }, [filterOptions]);\n\n return (\n <div className={style.filtersMainContainer}>\n <div className={style.leftArrowButton} ref={leftBtnRef} style={{visibility: 'hidden'}}>\n <ButtonLink\n icon={{position: 'left', faIcon: {name: 'arrow-left', size: 15}}}\n onClick={handleScrollLeft}\n customStyle={{height: '36px'}}\n data-testid=\"scroll-left-button\"\n aria-label={previousFilterAriaLabel}\n />\n </div>\n <div\n className={style.filtersList}\n ref={filtersListRef}\n data-testid=\"filters-options-list\"\n aria-label={filterOptionsAriaLabel}\n >\n <div\n data-testid=\"all-option\"\n className={classNames(style.defaultOption, defaultSelected && style.filterSelected)}\n onClick={onDefaultClick}\n >\n <FaIcon\n iconName={defaultIconName}\n size={{faSize: 20, wrapperSize: 20}}\n iconColor={defaultSelected ? COLORS.cm_grey_700 : COLORS.neutral_500}\n aria-label={defaultAriaLabel}\n />\n <span className={style.filterLabel}>{defaultLabel}</span>\n </div>\n <div className={style.filterSeparator} />\n <div className={style.filtersContainer}>\n {filterOptions.map((filterOption, idx) => {\n const {iconName, label, selected, value, onClick, ariaLabel} = filterOption;\n return (\n <div\n key={idx}\n className={classNames(style.filterOption, selected && style.filterSelected)}\n data-testid={`filter-${value}-${idx}`}\n onClick={onClick}\n >\n <FaIcon\n iconName={iconName}\n iconColor={selected ? COLORS.cm_grey_700 : COLORS.neutral_500}\n size={{faSize: 20, wrapperSize: 20}}\n aria-label={ariaLabel}\n />\n <span>{label}</span>\n </div>\n );\n })}\n <div className={style.rightArrowButton} ref={rightBtnRef} style={{visibility: 'hidden'}}>\n <ButtonLink\n icon={{\n position: 'left',\n faIcon: {\n name: 'arrow-right',\n size: 15\n }\n }}\n onClick={handleScrollRight}\n customStyle={{height: '36px'}}\n data-testid=\"scroll-right-button\"\n aria-label={nextFilterAriaLabel}\n />\n </div>\n </div>\n </div>\n {getFilterButton(filterButton)}\n </div>\n );\n};\n\nQuickFilters.propTypes = propTypes;\nexport default QuickFilters;\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAH,sBAAA,CAAAF,OAAA;AAEA,IAAAM,MAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAAqD,SAAAE,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CA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,OAAA,CAAAqC,aAAA,eAAOqE,KAAY,CAChB,CAAC;EAEV,CAAC,CAAC,eACFtH,MAAA,CAAAY,OAAA,CAAAqC,aAAA;IAAKC,SAAS,EAAEC,cAAK,CAACwE,gBAAiB;IAACtB,GAAG,EAAEtB,WAAY;IAAC5B,KAAK,EAAE;MAACwC,UAAU,EAAE;IAAQ;EAAE,gBACtF3F,MAAA,CAAAY,OAAA,CAAAqC,aAAA,CAAC1C,WAAA,CAAAK,OAAU;IACT0C,IAAI,EAAE;MACJC,QAAQ,EAAE,MAAM;MAChBC,MAAM,EAAE;QACNC,IAAI,EAAE,aAAa;QACnBC,IAAI,EAAE;MACR;IACF,CAAE;IACF4C,OAAO,EAAErB,iBAAkB;IAC3BlB,WAAW,EAAE;MAACwC,MAAM,EAAE;IAAM,CAAE;IAC9B,eAAY,qBAAqB;IACjC,cAAYnC;EAAoB,CACjC,CACE,CACF,CACF,CAAC,EACLtB,eAAe,CAACO,YAAY,CAC1B,CAAC;AAEV,CAAC;AAEDY,YAAY,CAAC2D,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,gBAAS;AAAC,IAAAI,QAAA,GAAAnF,OAAA,CAAAjC,OAAA,GACpBqD,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_icon","_colors","_buttonLink","_provider","_style","_types","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","SCROLL_RIGHT_SIZE","SCROLL_LEFT_SIZE","handleScroll","direction","listRef","current","scrollBy","left","behavior","exports","getFilterButton","filterButtonProps","primarySkinColor","tag","rest","createElement","className","style","filterButtonWrapper","borderColor","label","filterButton","icon","position","faIcon","name","size","color","COLORS","cm_grey_700","neutral_500","customStyle","backgroundColor","undefined","borderRadius","QuickFilters","primaryOption","filterOptions","filterOptionsAriaLabel","context","skin","GetSkinFromContext","_get2","defaultLabel","defaultIconName","defaultSelected","defaultAriaLabel","onDefaultClick","filtersListRef","React","useRef","rightBtnRef","leftBtnRef","handleScrollRight","useCallback","handleScrollLeft","useEffect","list","rightButton","leftButton","update","rightArrowWidth","offsetWidth","showingRightButton","scrollLeft","clientWidth","scrollWidth","showingLeftButton","visibility","opacity","addEventListener","window","removeEventListener","filtersMainContainer","leftArrowButton","ref","onClick","height","filtersList","classNames","defaultOption","filterSelected","iconName","faSize","wrapperSize","filterLabel","bar","background","filterSeparator","filtersContainer","map","filterOption","idx","selected","value","ariaLabel","key","borderBottomColor","rightArrowButton","propTypes","process","env","NODE_ENV","contextTypes","Provider","childContextTypes","_default"],"sources":["../../../src/molecule/quick-filters/index.tsx"],"sourcesContent":["import React, {useCallback, useRef, useEffect} from 'react';\nimport classNames from 'classnames';\nimport {get} from 'lodash/fp';\nimport FaIcon from '../../atom/icon';\nimport {COLORS} from '../../variables/colors';\nimport ButtonLink from '../../atom/button-link';\nimport {ButtonLinkProps} from '../../atom/button-link/types';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport Provider, {GetSkinFromContext} from '../../atom/provider';\nimport style from './style.css';\nimport {QuickFiltersProps, propTypes} from './types';\n\nconst SCROLL_RIGHT_SIZE = 400;\nconst SCROLL_LEFT_SIZE = -400;\nexport const handleScroll = (direction: number, listRef: React.RefObject<HTMLDivElement>) => {\n if (listRef.current) {\n listRef.current.scrollBy({\n left: direction,\n behavior: 'smooth'\n });\n }\n};\n\nconst getFilterButton = (\n filterButtonProps: ButtonLinkProps | undefined,\n primarySkinColor: string\n) => {\n if (!filterButtonProps) return null;\n const {tag, ...rest} = filterButtonProps;\n return (\n <div\n className={style.filterButtonWrapper}\n style={{borderColor: tag?.label ? primarySkinColor : 'transparent'}}\n >\n <div className={style.filterButton}>\n <ButtonLink\n {...rest}\n icon={{\n position: 'left',\n faIcon: {\n name: 'sliders',\n size: 14,\n color: tag ? COLORS.cm_grey_700 : COLORS.neutral_500\n }\n }}\n tag={\n tag\n ? {\n label: tag.label,\n customStyle: {backgroundColor: primarySkinColor, color: '#FFFFFF'}\n }\n : undefined\n }\n className={style.filterButton}\n data-testid=\"open-filters-modal-button\"\n customStyle={{borderRadius: '12px'}}\n />\n </div>\n </div>\n );\n};\n\nconst QuickFilters = (\n {primaryOption, filterOptions, filterButton, filterOptionsAriaLabel}: QuickFiltersProps,\n context: WebContextValues\n) => {\n const skin = GetSkinFromContext(context);\n const primarySkinColor = get('common.primary', skin);\n const {defaultLabel, defaultIconName, defaultSelected, defaultAriaLabel, onDefaultClick} =\n primaryOption;\n const filtersListRef = React.useRef<HTMLDivElement>(null);\n const rightBtnRef = useRef<HTMLDivElement>(null);\n const leftBtnRef = useRef<HTMLDivElement>(null);\n\n const handleScrollRight = useCallback(() => {\n handleScroll(SCROLL_RIGHT_SIZE, filtersListRef);\n }, [filtersListRef]);\n const handleScrollLeft = useCallback(() => {\n handleScroll(SCROLL_LEFT_SIZE, filtersListRef);\n }, [filtersListRef]);\n useEffect(() => {\n const list = filtersListRef.current;\n const rightButton = rightBtnRef.current;\n const leftButton = leftBtnRef.current;\n /* istanbul ignore next */ // not testable without complex mocking useRef\n if (!list || !leftButton || !rightButton) return;\n\n const update = () => {\n const rightArrowWidth = rightButton.offsetWidth;\n const showingRightButton =\n list.scrollLeft + list.clientWidth < list.scrollWidth - rightArrowWidth;\n const showingLeftButton = list.scrollLeft > 0;\n rightButton.style.visibility = showingRightButton ? 'visible' : 'hidden';\n rightButton.style.opacity = showingRightButton ? '1' : '0';\n leftButton.style.visibility = showingLeftButton ? 'visible' : 'hidden';\n leftButton.style.opacity = showingLeftButton ? '1' : '0';\n };\n\n list.addEventListener('scroll', update);\n window.addEventListener('resize', update);\n update();\n return () => {\n list.removeEventListener('scroll', update);\n window.removeEventListener('resize', update);\n };\n }, [filterOptions]);\n\n return (\n <div className={style.filtersMainContainer} data-name=\"search\">\n <div className={style.leftArrowButton} ref={leftBtnRef} style={{visibility: 'hidden'}}>\n <ButtonLink\n icon={{position: 'left', faIcon: {name: 'arrow-left', size: 15}}}\n onClick={handleScrollLeft}\n className={style.leftArrowButton}\n customStyle={{height: '36px'}}\n data-testid=\"scroll-left-button\"\n />\n </div>\n <div\n className={style.filtersList}\n ref={filtersListRef}\n data-testid=\"filters-options-list\"\n aria-label={filterOptionsAriaLabel}\n >\n <div\n data-testid=\"all-option\"\n className={classNames(style.defaultOption, defaultSelected && style.filterSelected)}\n onClick={onDefaultClick}\n >\n <FaIcon\n iconName={defaultIconName}\n size={{faSize: 20, wrapperSize: 20}}\n aria-label={defaultAriaLabel}\n />\n <span className={style.filterLabel}>{defaultLabel}</span>\n <div className={style.bar} style={{background: primarySkinColor}} />\n </div>\n <div className={style.filterSeparator} />\n <div className={style.filtersContainer}>\n {filterOptions.map((filterOption, idx) => {\n const {iconName, label, selected, value, onClick, ariaLabel} = filterOption;\n return (\n <div\n key={idx}\n className={classNames(style.filterOption, selected && style.filterSelected)}\n data-testid={`filter-${value}-${idx}`}\n style={{borderBottomColor: primarySkinColor}}\n onClick={onClick}\n >\n <FaIcon\n iconName={iconName}\n size={{faSize: 20, wrapperSize: 20}}\n aria-label={ariaLabel}\n />\n <span>{label}</span>\n <div className={style.bar} style={{background: primarySkinColor}} />\n </div>\n );\n })}\n <div className={style.rightArrowButton} ref={rightBtnRef} style={{visibility: 'hidden'}}>\n <ButtonLink\n icon={{\n position: 'left',\n faIcon: {\n name: 'arrow-right',\n size: 15\n }\n }}\n className={style.rightArrowButton}\n onClick={handleScrollRight}\n customStyle={{height: '36px'}}\n data-testid=\"scroll-right-button\"\n />\n </div>\n </div>\n </div>\n {getFilterButton(filterButton, primarySkinColor)}\n </div>\n );\n};\n\nQuickFilters.propTypes = propTypes;\nQuickFilters.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\nexport default QuickFilters;\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;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