@coorpacademy/components 11.40.14 → 11.40.16
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.
- package/es/atom/button/style.css +2 -2
- package/es/atom/button-menu/utils.d.ts +1 -1
- package/es/atom/checkbox-with-title/index.d.ts +25 -1
- package/es/atom/checkbox-with-title/index.d.ts.map +1 -1
- package/es/atom/checkbox-with-title/index.js +19 -2
- package/es/atom/checkbox-with-title/index.js.map +1 -1
- package/es/atom/chip/index.d.ts.map +1 -1
- package/es/atom/chip/index.js +4 -4
- package/es/atom/chip/index.js.map +1 -1
- package/es/atom/content-badge/style.css +2 -2
- package/es/atom/input-html/index.d.ts.map +1 -1
- package/es/atom/input-html/index.js +2 -1
- package/es/atom/input-html/index.js.map +1 -1
- package/es/atom/input-switch/index.d.ts +24 -1
- package/es/atom/input-switch/index.d.ts.map +1 -1
- package/es/atom/input-switch/index.js +18 -4
- package/es/atom/input-switch/index.js.map +1 -1
- package/es/atom/input-switch/style.css +3 -0
- package/es/atom/range/index.d.ts +35 -3
- package/es/atom/range/index.d.ts.map +1 -1
- package/es/atom/range/index.js +95 -20
- package/es/atom/range/index.js.map +1 -1
- package/es/atom/range/style.css +40 -2
- package/es/atom/resource-miniature/style.css +3 -3
- package/es/atom/status-item/index.native.js +1 -1
- package/es/atom/status-item/index.native.js.map +1 -1
- package/es/molecule/base-modal/index.d.ts.map +1 -1
- package/es/molecule/base-modal/index.js +11 -5
- package/es/molecule/base-modal/index.js.map +1 -1
- package/es/molecule/card/favorite.d.ts.map +1 -1
- package/es/molecule/card/favorite.js +15 -16
- package/es/molecule/card/favorite.js.map +1 -1
- package/es/molecule/card/notification.css +0 -6
- package/es/molecule/card/notification.d.ts.map +1 -1
- package/es/molecule/card/notification.js +12 -14
- package/es/molecule/card/notification.js.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +2 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/coorpmanager-base-banner/style.css +1 -1
- package/es/molecule/dashboard/cards-list/index.d.ts +9 -0
- package/es/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/index.js +5 -1
- package/es/molecule/dashboard/cards-list/index.js.map +1 -1
- package/es/molecule/dashboard/cards-list/style.css +1 -1
- package/es/molecule/draggable-list/index.d.ts +1 -0
- package/es/molecule/go1-banner/style.css +3 -3
- package/es/molecule/learning-priority-modal/index.js +1 -1
- package/es/molecule/learning-priority-modal/index.js.map +1 -1
- package/es/molecule/modal/style.css +3 -3
- package/es/molecule/multi-filter-panel/index.d.ts +42 -0
- package/es/molecule/multi-filter-panel/index.d.ts.map +1 -1
- package/es/molecule/multi-filter-panel/index.js +28 -15
- package/es/molecule/multi-filter-panel/index.js.map +1 -1
- package/es/molecule/multi-filter-panel/prop-types.d.ts +32 -5
- package/es/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
- package/es/molecule/multi-filter-panel/prop-types.js +4 -0
- package/es/molecule/multi-filter-panel/prop-types.js.map +1 -1
- package/es/molecule/questions/question-range/index.d.ts +6 -1
- package/es/molecule/quick-filters/index.js +3 -1
- package/es/molecule/quick-filters/index.js.map +1 -1
- package/es/molecule/quick-filters/style.css +7 -2
- package/es/molecule/tabs/index.d.ts +39 -0
- package/es/molecule/tabs/index.d.ts.map +1 -0
- package/es/molecule/tabs/index.js +69 -0
- package/es/molecule/tabs/index.js.map +1 -0
- package/es/molecule/tabs/style.css +28 -0
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
- package/es/organism/brand-analytics/style.css +1 -1
- package/es/organism/brand-learning-priorities/index.d.ts +1 -0
- package/es/organism/content-skill-modal/index.d.ts +23 -0
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +23 -0
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/filter-checkbox-and-search/index.d.ts +22 -0
- package/es/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
- package/es/organism/filter-checkbox-and-search/index.js +21 -4
- package/es/organism/filter-checkbox-and-search/index.js.map +1 -1
- package/es/organism/filter-checkbox-and-search/props-types.d.ts +3 -0
- package/es/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
- package/es/organism/filter-checkbox-and-search/props-types.js +1 -0
- package/es/organism/filter-checkbox-and-search/props-types.js.map +1 -1
- package/es/organism/filter-chip/index.d.ts +21 -0
- package/es/organism/filter-chip/index.d.ts.map +1 -1
- package/es/organism/filter-chip/index.js +14 -2
- package/es/organism/filter-chip/index.js.map +1 -1
- package/es/organism/filter-range/index.d.ts +28 -0
- package/es/organism/filter-range/index.d.ts.map +1 -0
- package/es/organism/filter-range/index.js +101 -0
- package/es/organism/filter-range/index.js.map +1 -0
- package/es/organism/filter-range/prop-types.d.ts +40 -0
- package/es/organism/filter-range/prop-types.d.ts.map +1 -0
- package/es/organism/filter-range/prop-types.js +20 -0
- package/es/organism/filter-range/prop-types.js.map +1 -0
- package/es/organism/filter-range/style.css +15 -0
- package/es/organism/filter-switch/index.d.ts +22 -0
- package/es/organism/filter-switch/index.d.ts.map +1 -1
- package/es/organism/filter-switch/index.js +18 -3
- package/es/organism/filter-switch/index.js.map +1 -1
- package/es/organism/filter-switch/prop-types.d.ts +2 -0
- package/es/organism/filter-switch/prop-types.d.ts.map +1 -1
- package/es/organism/filter-switch/prop-types.js +2 -1
- package/es/organism/filter-switch/prop-types.js.map +1 -1
- package/es/organism/list-item/index.d.ts +1 -0
- package/es/organism/list-items/index.d.ts +2 -0
- package/es/organism/list-items/style.css +1 -1
- package/es/organism/mooc-footer/style.css +2 -2
- package/es/organism/rewards-form/index.d.ts +1 -0
- package/es/organism/select-opponents/index.d.ts +1 -0
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +1 -0
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/sidebar/style.css +3 -3
- package/es/organism/title-and-input/index.d.ts +1 -0
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +1 -0
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +1 -0
- package/es/template/activity/stars-summary.css +2 -2
- package/es/template/app-player/loading/index.d.ts +2 -0
- package/es/template/app-player/player/index.d.ts +4 -0
- package/es/template/app-player/player/slides/index.d.ts +2 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +2 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +11 -0
- package/es/template/app-player/popin-end/summary.d.ts +9 -0
- package/es/template/app-review/index.d.ts +2 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +2 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +2 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +28 -0
- package/es/template/back-office/brand-update/utils.d.ts +1 -1
- package/es/template/common/dashboard/index.d.ts +4 -0
- package/es/template/common/search-page/index.d.ts +106 -21
- package/es/template/common/search-page/index.d.ts.map +1 -1
- package/es/template/common/search-page/index.js +76 -21
- package/es/template/common/search-page/index.js.map +1 -1
- package/es/template/common/search-page/style.css +52 -4
- package/es/template/external-course/index.d.ts +2 -0
- package/es/template/my-learning/index.d.ts +9 -0
- package/es/template/teams-dashboard/index.d.ts +9 -0
- package/es/util/external-content.js +2 -2
- package/es/util/external-content.js.map +1 -1
- package/es/variables/colors.css +6 -6
- package/es/variables/colors.d.ts +5 -4
- package/es/variables/colors.d.ts.map +1 -1
- package/es/variables/colors.js +5 -4
- package/es/variables/colors.js.map +1 -1
- package/lib/atom/button/style.css +2 -2
- package/lib/atom/button-menu/utils.d.ts +1 -1
- package/lib/atom/checkbox-with-title/index.d.ts +25 -1
- package/lib/atom/checkbox-with-title/index.d.ts.map +1 -1
- package/lib/atom/checkbox-with-title/index.js +19 -2
- package/lib/atom/checkbox-with-title/index.js.map +1 -1
- package/lib/atom/chip/index.d.ts.map +1 -1
- package/lib/atom/chip/index.js +4 -4
- package/lib/atom/chip/index.js.map +1 -1
- package/lib/atom/content-badge/style.css +2 -2
- package/lib/atom/input-html/index.d.ts.map +1 -1
- package/lib/atom/input-html/index.js +2 -1
- package/lib/atom/input-html/index.js.map +1 -1
- package/lib/atom/input-switch/index.d.ts +24 -1
- package/lib/atom/input-switch/index.d.ts.map +1 -1
- package/lib/atom/input-switch/index.js +18 -4
- package/lib/atom/input-switch/index.js.map +1 -1
- package/lib/atom/input-switch/style.css +3 -0
- package/lib/atom/range/index.d.ts +35 -3
- package/lib/atom/range/index.d.ts.map +1 -1
- package/lib/atom/range/index.js +95 -20
- package/lib/atom/range/index.js.map +1 -1
- package/lib/atom/range/style.css +40 -2
- package/lib/atom/resource-miniature/style.css +3 -3
- package/lib/atom/status-item/index.native.js +1 -1
- package/lib/atom/status-item/index.native.js.map +1 -1
- package/lib/molecule/base-modal/index.d.ts.map +1 -1
- package/lib/molecule/base-modal/index.js +11 -5
- package/lib/molecule/base-modal/index.js.map +1 -1
- package/lib/molecule/card/favorite.d.ts.map +1 -1
- package/lib/molecule/card/favorite.js +15 -16
- package/lib/molecule/card/favorite.js.map +1 -1
- package/lib/molecule/card/notification.css +0 -6
- package/lib/molecule/card/notification.d.ts.map +1 -1
- package/lib/molecule/card/notification.js +12 -14
- package/lib/molecule/card/notification.js.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +2 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/coorpmanager-base-banner/style.css +1 -1
- package/lib/molecule/dashboard/cards-list/index.d.ts +9 -0
- package/lib/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/index.js +5 -1
- package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
- package/lib/molecule/dashboard/cards-list/style.css +1 -1
- package/lib/molecule/draggable-list/index.d.ts +1 -0
- package/lib/molecule/go1-banner/style.css +3 -3
- package/lib/molecule/learning-priority-modal/index.js +1 -1
- package/lib/molecule/learning-priority-modal/index.js.map +1 -1
- package/lib/molecule/modal/style.css +3 -3
- package/lib/molecule/multi-filter-panel/index.d.ts +42 -0
- package/lib/molecule/multi-filter-panel/index.d.ts.map +1 -1
- package/lib/molecule/multi-filter-panel/index.js +28 -15
- package/lib/molecule/multi-filter-panel/index.js.map +1 -1
- package/lib/molecule/multi-filter-panel/prop-types.d.ts +32 -5
- package/lib/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
- package/lib/molecule/multi-filter-panel/prop-types.js +4 -0
- package/lib/molecule/multi-filter-panel/prop-types.js.map +1 -1
- package/lib/molecule/questions/question-range/index.d.ts +6 -1
- package/lib/molecule/quick-filters/index.js +3 -1
- package/lib/molecule/quick-filters/index.js.map +1 -1
- package/lib/molecule/quick-filters/style.css +7 -2
- package/lib/molecule/tabs/index.d.ts +39 -0
- package/lib/molecule/tabs/index.d.ts.map +1 -0
- package/lib/molecule/tabs/index.js +74 -0
- package/lib/molecule/tabs/index.js.map +1 -0
- package/lib/molecule/tabs/style.css +28 -0
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
- package/lib/organism/brand-analytics/style.css +1 -1
- package/lib/organism/brand-learning-priorities/index.d.ts +1 -0
- package/lib/organism/content-skill-modal/index.d.ts +23 -0
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +23 -0
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/filter-checkbox-and-search/index.d.ts +22 -0
- package/lib/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
- package/lib/organism/filter-checkbox-and-search/index.js +21 -4
- package/lib/organism/filter-checkbox-and-search/index.js.map +1 -1
- package/lib/organism/filter-checkbox-and-search/props-types.d.ts +3 -0
- package/lib/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
- package/lib/organism/filter-checkbox-and-search/props-types.js +1 -0
- package/lib/organism/filter-checkbox-and-search/props-types.js.map +1 -1
- package/lib/organism/filter-chip/index.d.ts +21 -0
- package/lib/organism/filter-chip/index.d.ts.map +1 -1
- package/lib/organism/filter-chip/index.js +14 -2
- package/lib/organism/filter-chip/index.js.map +1 -1
- package/lib/organism/filter-range/index.d.ts +28 -0
- package/lib/organism/filter-range/index.d.ts.map +1 -0
- package/lib/organism/filter-range/index.js +108 -0
- package/lib/organism/filter-range/index.js.map +1 -0
- package/lib/organism/filter-range/prop-types.d.ts +40 -0
- package/lib/organism/filter-range/prop-types.d.ts.map +1 -0
- package/lib/organism/filter-range/prop-types.js +25 -0
- package/lib/organism/filter-range/prop-types.js.map +1 -0
- package/lib/organism/filter-range/style.css +15 -0
- package/lib/organism/filter-switch/index.d.ts +22 -0
- package/lib/organism/filter-switch/index.d.ts.map +1 -1
- package/lib/organism/filter-switch/index.js +18 -3
- package/lib/organism/filter-switch/index.js.map +1 -1
- package/lib/organism/filter-switch/prop-types.d.ts +2 -0
- package/lib/organism/filter-switch/prop-types.d.ts.map +1 -1
- package/lib/organism/filter-switch/prop-types.js +2 -1
- package/lib/organism/filter-switch/prop-types.js.map +1 -1
- package/lib/organism/list-item/index.d.ts +1 -0
- package/lib/organism/list-items/index.d.ts +2 -0
- package/lib/organism/list-items/style.css +1 -1
- package/lib/organism/mooc-footer/style.css +2 -2
- package/lib/organism/rewards-form/index.d.ts +1 -0
- package/lib/organism/select-opponents/index.d.ts +1 -0
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +1 -0
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/sidebar/style.css +3 -3
- package/lib/organism/title-and-input/index.d.ts +1 -0
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +1 -0
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +1 -0
- package/lib/template/activity/stars-summary.css +2 -2
- package/lib/template/app-player/loading/index.d.ts +2 -0
- package/lib/template/app-player/player/index.d.ts +4 -0
- package/lib/template/app-player/player/slides/index.d.ts +2 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +2 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +11 -0
- package/lib/template/app-player/popin-end/summary.d.ts +9 -0
- package/lib/template/app-review/index.d.ts +2 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +2 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +2 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +28 -0
- package/lib/template/back-office/brand-update/utils.d.ts +1 -1
- package/lib/template/common/dashboard/index.d.ts +4 -0
- package/lib/template/common/search-page/index.d.ts +106 -21
- package/lib/template/common/search-page/index.d.ts.map +1 -1
- package/lib/template/common/search-page/index.js +75 -20
- package/lib/template/common/search-page/index.js.map +1 -1
- package/lib/template/common/search-page/style.css +52 -4
- package/lib/template/external-course/index.d.ts +2 -0
- package/lib/template/my-learning/index.d.ts +9 -0
- package/lib/template/teams-dashboard/index.d.ts +9 -0
- package/lib/util/external-content.js +2 -2
- package/lib/util/external-content.js.map +1 -1
- package/lib/variables/colors.css +6 -6
- package/lib/variables/colors.d.ts +5 -4
- package/lib/variables/colors.d.ts.map +1 -1
- package/lib/variables/colors.js +5 -4
- package/lib/variables/colors.js.map +1 -1
- package/locales/cs/global.json +1 -1
- package/locales/de/global.json +1 -1
- package/locales/et/global.json +1 -1
- package/locales/fi/global.json +1 -1
- package/locales/fr/global.json +1 -1
- package/locales/hu/global.json +1 -1
- package/locales/hy/global.json +1 -1
- package/locales/ja/global.json +1 -1
- package/locales/ko/global.json +1 -1
- package/locales/lt/global.json +1 -1
- package/locales/pl/global.json +1 -1
- package/locales/ro/global.json +1 -1
- package/locales/ru/global.json +1 -1
- package/locales/sk/global.json +1 -1
- package/locales/sv/global.json +1 -1
- package/locales/uk/global.json +1 -1
- package/locales/vi/global.json +1 -1
- package/locales/zh/global.json +1 -1
- package/locales/zh_TW/global.json +1 -1
- package/package.json +4 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_chip","_title","_tag","_buttonLink","_provider","_interopRequireWildcard","_colors","_propTypes","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","FilterChip","props","context","options","titleAriaLabel","title","onClear","selectedFiltersCount","_pipe2","_filter2","selected","_size2","hasSelectedFilters","translate","GetTranslateFromContext","createElement","Fragment","className","style","header","titleContainer","ariaLabel","label","_toString2","type","size","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_cssColorFunction","_chip","_title","_tag","_buttonLink","_provider","_interopRequireWildcard","_colors","_propTypes","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","FilterChip","props","context","skin","primaryColor","_getOr2","COLORS","cm_grey_700","options","titleAriaLabel","title","onClear","selectedFiltersCount","_pipe2","_filter2","selected","_size2","hasSelectedFilters","translate","GetTranslateFromContext","createElement","Fragment","className","style","header","titleContainer","ariaLabel","label","_toString2","type","size","customStyle","color","backgroundColor","convert","buttonContainer","fontWeight","padding","onClick","hoverColor","optionsContainer","_map2","icon","textColor","customIcon","handleClick","leftIcon","text","key","propTypes","process","env","NODE_ENV","contextTypes","Provider","childContextTypes","_default","exports"],"sources":["../../../src/organism/filter-chip/index.tsx"],"sourcesContent":["import React from 'react';\nimport {filter, getOr, map, pipe, size, toString} from 'lodash/fp';\nimport {convert} from 'css-color-function';\nimport Chip from '../../atom/chip';\nimport Title from '../../atom/title';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport {COLORS} from '../../variables/colors';\nimport propTypes, {FilterChipProps} from './prop-types';\nimport style from './style.css';\n\nconst FilterChip = (props: FilterChipProps, context: WebContextValues) => {\n const {skin} = context;\n const primaryColor = getOr(COLORS.cm_grey_700, 'common.primary', skin);\n const {options, titleAriaLabel, title, onClear} = props;\n const selectedFiltersCount = pipe(filter({selected: true}), size)(options);\n const hasSelectedFilters = selectedFiltersCount > 0;\n const translate = GetTranslateFromContext(context);\n return (\n <>\n <div className={style.header}>\n <div className={style.titleContainer}>\n <Title title={title} ariaLabel={titleAriaLabel} />\n {hasSelectedFilters ? (\n <Tag\n label={toString(selectedFiltersCount)}\n type=\"info\"\n size=\"S\"\n customStyle={{\n color: primaryColor,\n backgroundColor: convert(`color(${primaryColor} lightness(92%))`)\n }}\n />\n ) : null}\n </div>\n {hasSelectedFilters ? (\n <div className={style.buttonContainer}>\n <ButtonLink\n customStyle={{fontWeight: 'normal', padding: 0}}\n label={translate('clear')}\n type=\"text\"\n data-name=\"filter-chip-clear-button\"\n aria-label=\"filter chip clear button\"\n onClick={onClear}\n hoverColor={COLORS.cm_grey_700}\n />\n </div>\n ) : null}\n </div>\n <div className={style.optionsContainer}>\n {map(({icon, label, onClick, textColor, type, selected, customIcon}) => {\n function handleClick() {\n onClick(type);\n }\n return (\n <Chip\n leftIcon={icon}\n text={label}\n textColor={textColor}\n key={label}\n backgroundColor=\"skin\"\n selected={selected}\n onClick={handleClick}\n customIcon={customIcon}\n />\n );\n }, options)}\n </div>\n </>\n );\n};\n\nFilterChip.propTypes = propTypes;\n\nFilterChip.contextTypes = {\n translate: Provider.childContextTypes.translate,\n skin: Provider.childCont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6B;EAAU,CAAC,KAAK;IACtE,SAASC,WAAWA,CAAA,EAAG;MACrBP,OAAO,CAACT,IAAI,CAAC;IACf;IACA,oBACE9D,MAAA,CAAAmB,OAAA,CAAAkC,aAAA,CAACjD,KAAA,CAAAe,OAAI;MACH4D,QAAQ,EAAEJ,IAAK;MACfK,IAAI,EAAEpB,KAAM;MACZgB,SAAS,EAAEA,SAAU;MACrBK,GAAG,EAAErB,KAAM;MACXM,eAAe,EAAC,MAAM;MACtBlB,QAAQ,EAAEA,QAAS;MACnBuB,OAAO,EAAEO,WAAY;MACrBD,UAAU,EAAEA;IAAW,CACxB,CAAC;EAEN,CAAC,EAAEpC,OAAO,CACP,CACL,CAAC;AAEP,CAAC;AAEDR,UAAU,CAACiD,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,kBAAS;AAEhCjD,UAAU,CAACqD,YAAY,GAAG;EACxBnC,SAAS,EAAEoC,iBAAQ,CAACC,iBAAiB,CAACrC,SAAS;EAC/Cf,IAAI,EAAEmD,iBAAQ,CAACC,iBAAiB,CAACpD;AACnC,CAAC;AAAC,IAAAqD,QAAA,GAAAC,OAAA,CAAAvE,OAAA,GAEac,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { WebContextValues } from '../../atom/provider/web-context';
|
|
3
|
+
import { FilterRangeProps } from './prop-types';
|
|
4
|
+
declare const FilterRange: {
|
|
5
|
+
(props: FilterRangeProps, context: WebContextValues): JSX.Element;
|
|
6
|
+
propTypes: {
|
|
7
|
+
title: import("prop-types").Validator<string>;
|
|
8
|
+
titleAriaLabel: import("prop-types").Requireable<string>;
|
|
9
|
+
onClear: import("prop-types").Validator<(...args: any[]) => any>;
|
|
10
|
+
options: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
11
|
+
label: import("prop-types").Validator<string>;
|
|
12
|
+
min: import("prop-types").Validator<number>;
|
|
13
|
+
max: import("prop-types").Validator<number>;
|
|
14
|
+
step: import("prop-types").Requireable<number>;
|
|
15
|
+
value: import("prop-types").Requireable<(number | null | undefined)[]>;
|
|
16
|
+
minLabel: import("prop-types").Requireable<string>;
|
|
17
|
+
maxLabel: import("prop-types").Requireable<string>;
|
|
18
|
+
onChange: import("prop-types").Validator<(...args: any[]) => any>;
|
|
19
|
+
theme: import("prop-types").Requireable<string>;
|
|
20
|
+
selected: import("prop-types").Requireable<boolean>;
|
|
21
|
+
}>>;
|
|
22
|
+
};
|
|
23
|
+
contextTypes: {
|
|
24
|
+
translate: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default FilterRange;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-range/index.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAGjE,OAAkB,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAIzD,QAAA,MAAM,WAAW;YAAW,gBAAgB,WAAW,gBAAgB;;;;;;;;;;;;;;;;;;;;;CAuFtE,CAAC;AAQF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _range = _interopRequireDefault(require("../../atom/range"));
|
|
7
|
+
var _title = _interopRequireDefault(require("../../atom/title"));
|
|
8
|
+
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
9
|
+
var _provider = _interopRequireWildcard(require("../../atom/provider"));
|
|
10
|
+
var _colors = require("../../variables/colors");
|
|
11
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("./prop-types"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
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); }
|
|
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
|
+
const CLEAR_BUTTON_STYLE = {
|
|
17
|
+
fontWeight: 'normal',
|
|
18
|
+
padding: 0,
|
|
19
|
+
width: 'auto'
|
|
20
|
+
};
|
|
21
|
+
const FilterRange = (props, context) => {
|
|
22
|
+
const {
|
|
23
|
+
title,
|
|
24
|
+
titleAriaLabel,
|
|
25
|
+
onClear,
|
|
26
|
+
options
|
|
27
|
+
} = props;
|
|
28
|
+
const translate = (0, _provider.GetTranslateFromContext)(context);
|
|
29
|
+
const {
|
|
30
|
+
min,
|
|
31
|
+
max,
|
|
32
|
+
step,
|
|
33
|
+
value,
|
|
34
|
+
minLabel,
|
|
35
|
+
maxLabel,
|
|
36
|
+
onChange,
|
|
37
|
+
theme,
|
|
38
|
+
minValueLabel,
|
|
39
|
+
maxValueLabel
|
|
40
|
+
} = options;
|
|
41
|
+
const [isDragging, setIsDragging] = (0, _react.useState)(false);
|
|
42
|
+
const [pendingValue, setPendingValue] = (0, _react.useState)(null);
|
|
43
|
+
const containerRef = (0, _react.useRef)(null);
|
|
44
|
+
const handleRangeChange = (0, _react.useCallback)(newValue => {
|
|
45
|
+
if (isDragging) {
|
|
46
|
+
setPendingValue(newValue);
|
|
47
|
+
} else {
|
|
48
|
+
onChange(newValue);
|
|
49
|
+
}
|
|
50
|
+
}, [isDragging, onChange]);
|
|
51
|
+
const finalize = (0, _react.useCallback)(() => {
|
|
52
|
+
setIsDragging(false);
|
|
53
|
+
if (pendingValue) {
|
|
54
|
+
onChange(pendingValue);
|
|
55
|
+
setPendingValue(null);
|
|
56
|
+
}
|
|
57
|
+
}, [pendingValue, onChange]);
|
|
58
|
+
const handlePointerDown = (0, _react.useCallback)(e => {
|
|
59
|
+
containerRef.current?.setPointerCapture(e.pointerId);
|
|
60
|
+
setIsDragging(true);
|
|
61
|
+
}, []);
|
|
62
|
+
const handlePointerUp = (0, _react.useCallback)(e => {
|
|
63
|
+
containerRef.current?.releasePointerCapture(e.pointerId);
|
|
64
|
+
finalize();
|
|
65
|
+
}, [finalize]);
|
|
66
|
+
const hasValue = value && value.length > 0 && (value[0] !== min || value[1] !== max);
|
|
67
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
68
|
+
className: _style.default.container
|
|
69
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
70
|
+
className: _style.default.header
|
|
71
|
+
}, /*#__PURE__*/_react.default.createElement(_title.default, {
|
|
72
|
+
title: title,
|
|
73
|
+
type: "form-group",
|
|
74
|
+
titleSize: "standard-light-weight",
|
|
75
|
+
ariaLabel: titleAriaLabel
|
|
76
|
+
}), hasValue ? /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
77
|
+
customStyle: CLEAR_BUTTON_STYLE,
|
|
78
|
+
label: translate('clear'),
|
|
79
|
+
type: "text",
|
|
80
|
+
"data-name": "range-clear-button",
|
|
81
|
+
"aria-label": "range clear button",
|
|
82
|
+
onClick: onClear,
|
|
83
|
+
hoverColor: _colors.COLORS.primary_600
|
|
84
|
+
}) : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
85
|
+
ref: containerRef,
|
|
86
|
+
className: _style.default.rangeContainer,
|
|
87
|
+
onPointerDown: handlePointerDown,
|
|
88
|
+
onPointerUp: handlePointerUp
|
|
89
|
+
}, /*#__PURE__*/_react.default.createElement(_range.default, {
|
|
90
|
+
multi: true,
|
|
91
|
+
theme: theme || 'mooc',
|
|
92
|
+
min: min,
|
|
93
|
+
max: max,
|
|
94
|
+
step: step,
|
|
95
|
+
value: pendingValue || value,
|
|
96
|
+
minLabel: minLabel,
|
|
97
|
+
maxLabel: maxLabel,
|
|
98
|
+
minValueLabel: minValueLabel,
|
|
99
|
+
maxValueLabel: maxValueLabel,
|
|
100
|
+
onChange: handleRangeChange
|
|
101
|
+
})));
|
|
102
|
+
};
|
|
103
|
+
FilterRange.propTypes = process.env.NODE_ENV !== "production" ? _propTypes.default : {};
|
|
104
|
+
FilterRange.contextTypes = {
|
|
105
|
+
translate: _provider.default.childContextTypes.translate
|
|
106
|
+
};
|
|
107
|
+
var _default = exports.default = FilterRange;
|
|
108
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_range","_interopRequireDefault","_title","_buttonLink","_provider","_colors","_style","_propTypes","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CLEAR_BUTTON_STYLE","fontWeight","padding","width","FilterRange","props","context","title","titleAriaLabel","onClear","options","translate","GetTranslateFromContext","min","max","step","value","minLabel","maxLabel","onChange","theme","minValueLabel","maxValueLabel","isDragging","setIsDragging","useState","pendingValue","setPendingValue","containerRef","useRef","handleRangeChange","useCallback","newValue","finalize","handlePointerDown","current","setPointerCapture","pointerId","handlePointerUp","releasePointerCapture","hasValue","length","createElement","className","style","container","header","type","titleSize","ariaLabel","customStyle","label","onClick","hoverColor","COLORS","primary_600","ref","rangeContainer","onPointerDown","onPointerUp","multi","propTypes","process","env","NODE_ENV","contextTypes","Provider","childContextTypes","_default","exports"],"sources":["../../../src/organism/filter-range/index.tsx"],"sourcesContent":["import React, {useState, useCallback, useRef} from 'react';\nimport Range from '../../atom/range';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\nimport propTypes, {FilterRangeProps} from './prop-types';\n\nconst CLEAR_BUTTON_STYLE = {fontWeight: 'normal', padding: 0, width: 'auto'};\n\nconst FilterRange = (props: FilterRangeProps, context: WebContextValues) => {\n const {title, titleAriaLabel, onClear, options} = props;\n const translate = GetTranslateFromContext(context);\n const {min, max, step, value, minLabel, maxLabel, onChange, theme, minValueLabel, maxValueLabel} =\n options;\n\n const [isDragging, setIsDragging] = useState(false);\n const [pendingValue, setPendingValue] = useState<number[] | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n\n const handleRangeChange = useCallback(\n (newValue: number[]) => {\n if (isDragging) {\n setPendingValue(newValue);\n } else {\n onChange(newValue);\n }\n },\n [isDragging, onChange]\n );\n\n const finalize = useCallback(() => {\n setIsDragging(false);\n if (pendingValue) {\n onChange(pendingValue);\n setPendingValue(null);\n }\n }, [pendingValue, onChange]);\n\n const handlePointerDown = useCallback((e: React.PointerEvent<HTMLDivElement>) => {\n containerRef.current?.setPointerCapture(e.pointerId);\n setIsDragging(true);\n }, []);\n\n const handlePointerUp = useCallback(\n (e: React.PointerEvent<HTMLDivElement>) => {\n containerRef.current?.releasePointerCapture(e.pointerId);\n finalize();\n },\n [finalize]\n );\n\n const hasValue = value && value.length > 0 && (value[0] !== min || value[1] !== max);\n\n return (\n <div className={style.container}>\n <div className={style.header}>\n <Title\n title={title}\n type=\"form-group\"\n titleSize=\"standard-light-weight\"\n ariaLabel={titleAriaLabel}\n />\n {hasValue ? (\n <ButtonLink\n customStyle={CLEAR_BUTTON_STYLE}\n label={translate('clear')}\n type=\"text\"\n data-name=\"range-clear-button\"\n aria-label=\"range clear button\"\n onClick={onClear}\n hoverColor={COLORS.primary_600}\n />\n ) : null}\n </div>\n <div\n ref={containerRef}\n className={style.rangeContainer}\n onPointerDown={handlePointerDown}\n onPointerUp={handlePointerUp}\n >\n <Range\n multi\n theme={theme || 'mooc'}\n min={min}\n max={max}\n step={step}\n value={pendingValue || value}\n minLabel={minLabel}\n maxLabel={maxLabel}\n minValueLabel={minValueLabel}\n maxValueLabel={maxValueLabel}\n onChange={handleRangeChange}\n />\n </div>\n </div>\n );\n};\n\nFilterRange.propTypes = propTypes;\n\nFilterRange.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default FilterRange;\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,SAAA,GAAAN,uBAAA,CAAAC,OAAA;AAEA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,UAAA,GAAAN,sBAAA,CAAAF,OAAA;AAAyD,SAAAE,uBAAAO,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,SAAAV,wBAAAU,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CA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B,CACE,CACF,CAAC;AAEV,CAAC;AAED1B,WAAW,CAACyD,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,kBAAS;AAEjCzD,WAAW,CAAC6D,YAAY,GAAG;EACzBtD,SAAS,EAAEuD,iBAAQ,CAACC,iBAAiB,CAACxD;AACxC,CAAC;AAAC,IAAAyD,QAAA,GAAAC,OAAA,CAAAvF,OAAA,GAEasB,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
declare const propTypes: {
|
|
3
|
+
title: PropTypes.Validator<string>;
|
|
4
|
+
titleAriaLabel: PropTypes.Requireable<string>;
|
|
5
|
+
onClear: PropTypes.Validator<(...args: any[]) => any>;
|
|
6
|
+
options: PropTypes.Requireable<PropTypes.InferProps<{
|
|
7
|
+
label: PropTypes.Validator<string>;
|
|
8
|
+
min: PropTypes.Validator<number>;
|
|
9
|
+
max: PropTypes.Validator<number>;
|
|
10
|
+
step: PropTypes.Requireable<number>;
|
|
11
|
+
value: PropTypes.Requireable<(number | null | undefined)[]>;
|
|
12
|
+
minLabel: PropTypes.Requireable<string>;
|
|
13
|
+
maxLabel: PropTypes.Requireable<string>;
|
|
14
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
15
|
+
theme: PropTypes.Requireable<string>;
|
|
16
|
+
selected: PropTypes.Requireable<boolean>;
|
|
17
|
+
}>>;
|
|
18
|
+
};
|
|
19
|
+
export declare type FilterRangeOptionsProps = {
|
|
20
|
+
label: string;
|
|
21
|
+
min: number;
|
|
22
|
+
max: number;
|
|
23
|
+
step?: number;
|
|
24
|
+
value: number[];
|
|
25
|
+
minLabel?: string;
|
|
26
|
+
maxLabel?: string;
|
|
27
|
+
minValueLabel?: string;
|
|
28
|
+
maxValueLabel?: string;
|
|
29
|
+
onChange: (value: number[]) => void;
|
|
30
|
+
theme?: string;
|
|
31
|
+
selected?: boolean;
|
|
32
|
+
};
|
|
33
|
+
export declare type FilterRangeProps = {
|
|
34
|
+
title: string;
|
|
35
|
+
titleAriaLabel?: string;
|
|
36
|
+
onClear: () => void;
|
|
37
|
+
options: FilterRangeOptionsProps;
|
|
38
|
+
};
|
|
39
|
+
export default propTypes;
|
|
40
|
+
//# sourceMappingURL=prop-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-range/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;CAgBd,CAAC;AAEF,oBAAY,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,uBAAuB,CAAC;CAClC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
const propTypes = {
|
|
8
|
+
title: _propTypes.default.string.isRequired,
|
|
9
|
+
titleAriaLabel: _propTypes.default.string,
|
|
10
|
+
onClear: _propTypes.default.func.isRequired,
|
|
11
|
+
options: _propTypes.default.shape({
|
|
12
|
+
label: _propTypes.default.string.isRequired,
|
|
13
|
+
min: _propTypes.default.number.isRequired,
|
|
14
|
+
max: _propTypes.default.number.isRequired,
|
|
15
|
+
step: _propTypes.default.number,
|
|
16
|
+
value: _propTypes.default.arrayOf(_propTypes.default.number),
|
|
17
|
+
minLabel: _propTypes.default.string,
|
|
18
|
+
maxLabel: _propTypes.default.string,
|
|
19
|
+
onChange: _propTypes.default.func.isRequired,
|
|
20
|
+
theme: _propTypes.default.string,
|
|
21
|
+
selected: _propTypes.default.bool
|
|
22
|
+
})
|
|
23
|
+
};
|
|
24
|
+
var _default = exports.default = propTypes;
|
|
25
|
+
//# sourceMappingURL=prop-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prop-types.js","names":["_propTypes","_interopRequireDefault","require","e","__esModule","default","propTypes","title","PropTypes","string","isRequired","titleAriaLabel","onClear","func","options","shape","label","min","number","max","step","value","arrayOf","minLabel","maxLabel","onChange","theme","selected","bool","_default","exports"],"sources":["../../../src/organism/filter-range/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst propTypes = {\n title: PropTypes.string.isRequired,\n titleAriaLabel: PropTypes.string,\n onClear: PropTypes.func.isRequired,\n options: PropTypes.shape({\n label: PropTypes.string.isRequired,\n min: PropTypes.number.isRequired,\n max: PropTypes.number.isRequired,\n step: PropTypes.number,\n value: PropTypes.arrayOf(PropTypes.number),\n minLabel: PropTypes.string,\n maxLabel: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n theme: PropTypes.string,\n selected: PropTypes.bool\n })\n};\n\nexport type FilterRangeOptionsProps = {\n label: string;\n min: number;\n max: number;\n step?: number;\n value: number[];\n minLabel?: string;\n maxLabel?: string;\n minValueLabel?: string;\n maxValueLabel?: string;\n onChange: (value: number[]) => void;\n theme?: string;\n selected?: boolean;\n};\n\nexport type FilterRangeProps = {\n title: string;\n titleAriaLabel?: string;\n onClear: () => void;\n options: FilterRangeOptionsProps;\n};\n\nexport default propTypes;\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAmC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnC,MAAMG,SAAS,GAAG;EAChBC,KAAK,EAAEC,kBAAS,CAACC,MAAM,CAACC,UAAU;EAClCC,cAAc,EAAEH,kBAAS,CAACC,MAAM;EAChCG,OAAO,EAAEJ,kBAAS,CAACK,IAAI,CAACH,UAAU;EAClCI,OAAO,EAAEN,kBAAS,CAACO,KAAK,CAAC;IACvBC,KAAK,EAAER,kBAAS,CAACC,MAAM,CAACC,UAAU;IAClCO,GAAG,EAAET,kBAAS,CAACU,MAAM,CAACR,UAAU;IAChCS,GAAG,EAAEX,kBAAS,CAACU,MAAM,CAACR,UAAU;IAChCU,IAAI,EAAEZ,kBAAS,CAACU,MAAM;IACtBG,KAAK,EAAEb,kBAAS,CAACc,OAAO,CAACd,kBAAS,CAACU,MAAM,CAAC;IAC1CK,QAAQ,EAAEf,kBAAS,CAACC,MAAM;IAC1Be,QAAQ,EAAEhB,kBAAS,CAACC,MAAM;IAC1BgB,QAAQ,EAAEjB,kBAAS,CAACK,IAAI,CAACH,UAAU;IACnCgB,KAAK,EAAElB,kBAAS,CAACC,MAAM;IACvBkB,QAAQ,EAAEnB,kBAAS,CAACoB;EACtB,CAAC;AACH,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAzB,OAAA,GAwBaC,SAAS","ignoreList":[]}
|
|
@@ -13,10 +13,32 @@ declare const FilterSwitch: {
|
|
|
13
13
|
onChange: import("prop-types").Validator<(...args: any[]) => any>;
|
|
14
14
|
theme: import("prop-types").Validator<string>;
|
|
15
15
|
ariaLabel: import("prop-types").Validator<string>;
|
|
16
|
+
id: import("prop-types").Requireable<string>;
|
|
16
17
|
}> | null | undefined)[]>;
|
|
17
18
|
};
|
|
18
19
|
contextTypes: {
|
|
19
20
|
translate: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
21
|
+
skin: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
22
|
+
common: import("prop-types").Requireable<{
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
}>;
|
|
25
|
+
images: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
26
|
+
'logo-mobile': import("prop-types").Requireable<any>;
|
|
27
|
+
logo: import("prop-types").Requireable<any>;
|
|
28
|
+
'logo-email': import("prop-types").Requireable<any>;
|
|
29
|
+
login: import("prop-types").Requireable<any>;
|
|
30
|
+
}>>;
|
|
31
|
+
icons: import("prop-types").Requireable<{
|
|
32
|
+
[x: string]: any;
|
|
33
|
+
}>;
|
|
34
|
+
mod: import("prop-types").Requireable<{
|
|
35
|
+
[x: string]: any;
|
|
36
|
+
}>;
|
|
37
|
+
courses: import("prop-types").Requireable<any[]>;
|
|
38
|
+
texts: import("prop-types").Requireable<{
|
|
39
|
+
[x: string]: any;
|
|
40
|
+
}>;
|
|
41
|
+
}>>;
|
|
20
42
|
};
|
|
21
43
|
};
|
|
22
44
|
export default FilterSwitch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-switch/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-switch/index.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAEjE,OAAkB,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAG1D,QAAA,MAAM,YAAY;YAAW,iBAAiB,WAAW,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiExE,CAAC;AASF,eAAe,YAAY,CAAC"}
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _toString2 = _interopRequireDefault(require("lodash/fp/toString"));
|
|
6
|
+
var _getOr2 = _interopRequireDefault(require("lodash/fp/getOr"));
|
|
6
7
|
var _size2 = _interopRequireDefault(require("lodash/fp/size"));
|
|
7
8
|
var _pipe2 = _interopRequireDefault(require("lodash/fp/pipe"));
|
|
8
9
|
var _filter2 = _interopRequireDefault(require("lodash/fp/filter"));
|
|
9
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _cssColorFunction = require("css-color-function");
|
|
10
12
|
var _title = _interopRequireDefault(require("../../atom/title"));
|
|
11
13
|
var _inputSwitch = _interopRequireDefault(require("../../atom/input-switch"));
|
|
12
14
|
var _tag = _interopRequireDefault(require("../../atom/tag"));
|
|
@@ -19,6 +21,10 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
19
21
|
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; }
|
|
20
22
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
23
|
const FilterSwitch = (props, context) => {
|
|
24
|
+
const {
|
|
25
|
+
skin
|
|
26
|
+
} = context;
|
|
27
|
+
const primaryColor = (0, _getOr2.default)(_colors.COLORS.cm_primary_blue, 'common.primary', skin);
|
|
22
28
|
const {
|
|
23
29
|
title,
|
|
24
30
|
titleAriaLabel,
|
|
@@ -40,7 +46,11 @@ const FilterSwitch = (props, context) => {
|
|
|
40
46
|
}), hasSelectedFilters ? /*#__PURE__*/_react.default.createElement(_tag.default, {
|
|
41
47
|
label: (0, _toString2.default)(selectedFiltersCount),
|
|
42
48
|
type: "info",
|
|
43
|
-
size: "S"
|
|
49
|
+
size: "S",
|
|
50
|
+
customStyle: {
|
|
51
|
+
color: primaryColor,
|
|
52
|
+
backgroundColor: (0, _cssColorFunction.convert)(`color(${primaryColor} lightness(92%))`)
|
|
53
|
+
}
|
|
44
54
|
}) : null), hasSelectedFilters ? /*#__PURE__*/_react.default.createElement("div", {
|
|
45
55
|
className: _style.default.buttonContainer
|
|
46
56
|
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
@@ -61,12 +71,16 @@ const FilterSwitch = (props, context) => {
|
|
|
61
71
|
label,
|
|
62
72
|
value,
|
|
63
73
|
onChange,
|
|
64
|
-
ariaLabel
|
|
74
|
+
ariaLabel,
|
|
75
|
+
id
|
|
65
76
|
} = optionItem;
|
|
77
|
+
// Use provided id or generate fallback id
|
|
78
|
+
const switchId = id || `filter-switch-${label.toLowerCase().replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, '')}`;
|
|
66
79
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
67
80
|
key: label,
|
|
68
81
|
className: _style.default.switchOption
|
|
69
82
|
}, /*#__PURE__*/_react.default.createElement(_inputSwitch.default, {
|
|
83
|
+
id: switchId,
|
|
70
84
|
title: label,
|
|
71
85
|
value: value,
|
|
72
86
|
theme: 'newMooc',
|
|
@@ -77,7 +91,8 @@ const FilterSwitch = (props, context) => {
|
|
|
77
91
|
};
|
|
78
92
|
FilterSwitch.propTypes = process.env.NODE_ENV !== "production" ? _propTypes.default : {};
|
|
79
93
|
FilterSwitch.contextTypes = {
|
|
80
|
-
translate: _provider.default.childContextTypes.translate
|
|
94
|
+
translate: _provider.default.childContextTypes.translate,
|
|
95
|
+
skin: _provider.default.childContextTypes.skin
|
|
81
96
|
};
|
|
82
97
|
var _default = exports.default = FilterSwitch;
|
|
83
98
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_title","_inputSwitch","_tag","_buttonLink","_provider","_interopRequireWildcard","_colors","_propTypes","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","FilterSwitch","props","context","title","titleAriaLabel","onClear","options","selectedFiltersCount","_pipe2","_filter2","value","_size2","hasSelectedFilters","translate","GetTranslateFromContext","createElement","className","style","header","titleContainer","ariaLabel","label","_toString2","type","size","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_cssColorFunction","_title","_inputSwitch","_tag","_buttonLink","_provider","_interopRequireWildcard","_colors","_propTypes","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","FilterSwitch","props","context","skin","primaryColor","_getOr2","COLORS","cm_primary_blue","title","titleAriaLabel","onClear","options","selectedFiltersCount","_pipe2","_filter2","value","_size2","hasSelectedFilters","translate","GetTranslateFromContext","createElement","className","style","header","titleContainer","ariaLabel","label","_toString2","type","size","customStyle","color","backgroundColor","convert","buttonContainer","fontWeight","padding","onClick","hoverColor","cm_grey_700","optionsContainer","map","optionItem","onChange","id","switchId","toLowerCase","replace","key","switchOption","theme","propTypes","process","env","NODE_ENV","contextTypes","Provider","childContextTypes","_default","exports"],"sources":["../../../src/organism/filter-switch/index.tsx"],"sourcesContent":["import React from 'react';\nimport {filter, pipe, size, getOr, toString} from 'lodash/fp';\nimport {convert} from 'css-color-function';\nimport Title from '../../atom/title';\nimport InputSwitch from '../../atom/input-switch';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport {COLORS} from '../../variables/colors';\nimport propTypes, {FilterSwitchProps} from './prop-types';\nimport style from './style.css';\n\nconst FilterSwitch = (props: FilterSwitchProps, context: WebContextValues) => {\n const {skin} = context;\n const primaryColor = getOr(COLORS.cm_primary_blue, 'common.primary', skin);\n const {title, titleAriaLabel, onClear, options} = props;\n const selectedFiltersCount = pipe(filter({value: true}), size)(options);\n const hasSelectedFilters = selectedFiltersCount > 0;\n const translate = GetTranslateFromContext(context);\n\n return (\n <div>\n <div className={style.header}>\n <div className={style.titleContainer}>\n <Title title={title} ariaLabel={titleAriaLabel} />\n {hasSelectedFilters ? (\n <Tag\n label={toString(selectedFiltersCount)}\n type=\"info\"\n size=\"S\"\n customStyle={{\n color: primaryColor,\n backgroundColor: convert(`color(${primaryColor} lightness(92%))`)\n }}\n />\n ) : null}\n </div>\n {hasSelectedFilters ? (\n <div className={style.buttonContainer}>\n <ButtonLink\n customStyle={{fontWeight: 'normal', padding: 0}}\n label={translate('clear')}\n type=\"text\"\n data-name=\"filter-chip-clear-button\"\n aria-label=\"filter chip clear button\"\n onClick={onClear}\n hoverColor={COLORS.cm_grey_700}\n />\n </div>\n ) : null}\n </div>\n <div className={style.optionsContainer}>\n {options.map(optionItem => {\n const {label, value, onChange, ariaLabel, id} = optionItem;\n // Use provided id or generate fallback id\n const switchId =\n id ||\n `filter-switch-${label\n .toLowerCase()\n .replace(/\\s+/g, '-')\n .replace(/[^a-z0-9-]/g, '')}`;\n return (\n <div key={label} className={style.switchOption}>\n <InputSwitch\n id={switchId}\n title={label}\n value={value}\n theme={'newMooc'}\n onChange={onChange}\n aria-label={ariaLabel}\n />\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n\nFilterSwitch.propTypes = propTypes;\n\n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EmB;IAAE,CAAC,GAAGF,UAAU;IAC1D;IACA,MAAMG,QAAQ,GACZD,EAAE,IACF,iBAAiBlB,KAAK,CACnBoB,WAAW,CAAC,CAAC,CACbC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CACpBA,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,EAAE;IACjC,oBACEhF,MAAA,CAAAmB,OAAA,CAAAkC,aAAA;MAAK4B,GAAG,EAAEtB,KAAM;MAACL,SAAS,EAAEC,cAAK,CAAC2B;IAAa,gBAC7ClF,MAAA,CAAAmB,OAAA,CAAAkC,aAAA,CAAChD,YAAA,CAAAc,OAAW;MACV0D,EAAE,EAAEC,QAAS;MACbrC,KAAK,EAAEkB,KAAM;MACbX,KAAK,EAAEA,KAAM;MACbmC,KAAK,EAAE,SAAU;MACjBP,QAAQ,EAAEA,QAAS;MACnB,cAAYlB;IAAU,CACvB,CACE,CAAC;EAEV,CAAC,CACE,CACF,CAAC;AAEV,CAAC;AAEDzB,YAAY,CAACmD,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,kBAAS;AAElCnD,YAAY,CAACuD,YAAY,GAAG;EAC1BrC,SAAS,EAAEsC,iBAAQ,CAACC,iBAAiB,CAACvC,SAAS;EAC/Cf,IAAI,EAAEqD,iBAAQ,CAACC,iBAAiB,CAACtD;AACnC,CAAC;AAAC,IAAAuD,QAAA,GAAAC,OAAA,CAAAzE,OAAA,GAEac,YAAY","ignoreList":[]}
|
|
@@ -9,6 +9,7 @@ declare const propTypes: {
|
|
|
9
9
|
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
10
10
|
theme: PropTypes.Validator<string>;
|
|
11
11
|
ariaLabel: PropTypes.Validator<string>;
|
|
12
|
+
id: PropTypes.Requireable<string>;
|
|
12
13
|
}> | null | undefined)[]>;
|
|
13
14
|
};
|
|
14
15
|
export declare type FilterSwitchOptionsProps = {
|
|
@@ -17,6 +18,7 @@ export declare type FilterSwitchOptionsProps = {
|
|
|
17
18
|
onChange: (value: string) => void;
|
|
18
19
|
theme: string;
|
|
19
20
|
ariaLabel: string;
|
|
21
|
+
id?: string;
|
|
20
22
|
};
|
|
21
23
|
export declare type FilterSwitchProps = {
|
|
22
24
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-switch/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-switch/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,QAAA,MAAM,SAAS;;;;;;;;;;;;CAcd,CAAC;AAEF,oBAAY,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,wBAAwB,EAAE,CAAC;CACrC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -13,7 +13,8 @@ const propTypes = {
|
|
|
13
13
|
value: _propTypes.default.bool.isRequired,
|
|
14
14
|
onChange: _propTypes.default.func.isRequired,
|
|
15
15
|
theme: _propTypes.default.string.isRequired,
|
|
16
|
-
ariaLabel: _propTypes.default.string.isRequired
|
|
16
|
+
ariaLabel: _propTypes.default.string.isRequired,
|
|
17
|
+
id: _propTypes.default.string
|
|
17
18
|
}))
|
|
18
19
|
};
|
|
19
20
|
var _default = exports.default = propTypes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.js","names":["_propTypes","_interopRequireDefault","require","e","__esModule","default","propTypes","title","PropTypes","string","isRequired","titleAriaLabel","onClear","func","options","arrayOf","shape","label","value","bool","onChange","theme","ariaLabel","_default","exports"],"sources":["../../../src/organism/filter-switch/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst propTypes = {\n title: PropTypes.string.isRequired,\n titleAriaLabel: PropTypes.string,\n onClear: PropTypes.func.isRequired,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string.isRequired,\n value: PropTypes.bool.isRequired,\n onChange: PropTypes.func.isRequired,\n theme: PropTypes.string.isRequired,\n ariaLabel: PropTypes.string.isRequired\n })\n )\n};\n\nexport type FilterSwitchOptionsProps = {\n label: string;\n value: boolean;\n onChange: (value: string) => void;\n theme: string;\n ariaLabel: string;\n};\n\nexport type FilterSwitchProps = {\n title: string;\n titleAriaLabel?: string;\n onClear: () => void;\n options: FilterSwitchOptionsProps[];\n};\n\nexport default propTypes;\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAmC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnC,MAAMG,SAAS,GAAG;EAChBC,KAAK,EAAEC,kBAAS,CAACC,MAAM,CAACC,UAAU;EAClCC,cAAc,EAAEH,kBAAS,CAACC,MAAM;EAChCG,OAAO,EAAEJ,kBAAS,CAACK,IAAI,CAACH,UAAU;EAClCI,OAAO,EAAEN,kBAAS,CAACO,OAAO,CACxBP,kBAAS,CAACQ,KAAK,CAAC;IACdC,KAAK,EAAET,kBAAS,CAACC,MAAM,CAACC,UAAU;IAClCQ,KAAK,EAAEV,kBAAS,CAACW,IAAI,CAACT,UAAU;IAChCU,QAAQ,EAAEZ,kBAAS,CAACK,IAAI,CAACH,UAAU;IACnCW,KAAK,EAAEb,kBAAS,CAACC,MAAM,CAACC,UAAU;IAClCY,SAAS,EAAEd,kBAAS,CAACC,MAAM,CAACC;
|
|
1
|
+
{"version":3,"file":"prop-types.js","names":["_propTypes","_interopRequireDefault","require","e","__esModule","default","propTypes","title","PropTypes","string","isRequired","titleAriaLabel","onClear","func","options","arrayOf","shape","label","value","bool","onChange","theme","ariaLabel","id","_default","exports"],"sources":["../../../src/organism/filter-switch/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst propTypes = {\n title: PropTypes.string.isRequired,\n titleAriaLabel: PropTypes.string,\n onClear: PropTypes.func.isRequired,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string.isRequired,\n value: PropTypes.bool.isRequired,\n onChange: PropTypes.func.isRequired,\n theme: PropTypes.string.isRequired,\n ariaLabel: PropTypes.string.isRequired,\n id: PropTypes.string\n })\n )\n};\n\nexport type FilterSwitchOptionsProps = {\n label: string;\n value: boolean;\n onChange: (value: string) => void;\n theme: string;\n ariaLabel: string;\n id?: string;\n};\n\nexport type FilterSwitchProps = {\n title: string;\n titleAriaLabel?: string;\n onClear: () => void;\n options: FilterSwitchOptionsProps[];\n};\n\nexport default propTypes;\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAmC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnC,MAAMG,SAAS,GAAG;EAChBC,KAAK,EAAEC,kBAAS,CAACC,MAAM,CAACC,UAAU;EAClCC,cAAc,EAAEH,kBAAS,CAACC,MAAM;EAChCG,OAAO,EAAEJ,kBAAS,CAACK,IAAI,CAACH,UAAU;EAClCI,OAAO,EAAEN,kBAAS,CAACO,OAAO,CACxBP,kBAAS,CAACQ,KAAK,CAAC;IACdC,KAAK,EAAET,kBAAS,CAACC,MAAM,CAACC,UAAU;IAClCQ,KAAK,EAAEV,kBAAS,CAACW,IAAI,CAACT,UAAU;IAChCU,QAAQ,EAAEZ,kBAAS,CAACK,IAAI,CAACH,UAAU;IACnCW,KAAK,EAAEb,kBAAS,CAACC,MAAM,CAACC,UAAU;IAClCY,SAAS,EAAEd,kBAAS,CAACC,MAAM,CAACC,UAAU;IACtCa,EAAE,EAAEf,kBAAS,CAACC;EAChB,CAAC,CACH;AACF,CAAC;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAApB,OAAA,GAkBaC,SAAS","ignoreList":[]}
|
|
@@ -119,6 +119,7 @@ declare namespace ListItem {
|
|
|
119
119
|
}>>;
|
|
120
120
|
image: PropTypes.Requireable<string>;
|
|
121
121
|
checkbox: PropTypes.Requireable<PropTypes.InferProps<{
|
|
122
|
+
value: PropTypes.Requireable<string>;
|
|
122
123
|
title: PropTypes.Requireable<string>;
|
|
123
124
|
name: PropTypes.Requireable<string>;
|
|
124
125
|
checked: PropTypes.Requireable<boolean>;
|
|
@@ -151,6 +151,7 @@ declare namespace ListItems {
|
|
|
151
151
|
}>>;
|
|
152
152
|
image: PropTypes.Requireable<string>;
|
|
153
153
|
checkbox: PropTypes.Requireable<PropTypes.InferProps<{
|
|
154
|
+
value: PropTypes.Requireable<string>;
|
|
154
155
|
title: PropTypes.Requireable<string>;
|
|
155
156
|
name: PropTypes.Requireable<string>;
|
|
156
157
|
checked: PropTypes.Requireable<boolean>;
|
|
@@ -539,6 +540,7 @@ declare namespace ListItems {
|
|
|
539
540
|
searchIconAriaLabel: PropTypes.Requireable<string>;
|
|
540
541
|
}>>;
|
|
541
542
|
checkboxWithTitle: PropTypes.Requireable<PropTypes.InferProps<{
|
|
543
|
+
value: PropTypes.Requireable<string>;
|
|
542
544
|
title: PropTypes.Requireable<string>;
|
|
543
545
|
name: PropTypes.Requireable<string>;
|
|
544
546
|
checked: PropTypes.Requireable<boolean>;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
@value black from colors;
|
|
9
9
|
@value transparent from colors;
|
|
10
10
|
@value lightBlack from colors;
|
|
11
|
-
@value
|
|
11
|
+
@value lightMediumGrey from colors;
|
|
12
12
|
|
|
13
13
|
.headSpacingContainer {
|
|
14
14
|
width: 100%;
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
|
|
84
84
|
.sectionTitle {
|
|
85
85
|
padding-top: 16px;
|
|
86
|
-
color:
|
|
86
|
+
color: lightMediumGrey;
|
|
87
87
|
font-size: 16px;
|
|
88
88
|
font-weight: 300;
|
|
89
89
|
font-stretch: normal;
|
|
@@ -6,6 +6,7 @@ declare namespace RewardsForm {
|
|
|
6
6
|
namespace propTypes {
|
|
7
7
|
const items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
8
8
|
checkboxWithTitle: PropTypes.Requireable<PropTypes.InferProps<{
|
|
9
|
+
value: PropTypes.Requireable<string>;
|
|
9
10
|
title: PropTypes.Requireable<string>;
|
|
10
11
|
name: PropTypes.Requireable<string>;
|
|
11
12
|
checked: PropTypes.Requireable<boolean>;
|
|
@@ -5,6 +5,7 @@ declare const SelectOpponents: {
|
|
|
5
5
|
propTypes: {
|
|
6
6
|
items: import("prop-types").Requireable<(import("prop-types").InferProps<{
|
|
7
7
|
checkboxWithTitle: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
8
|
+
value: import("prop-types").Requireable<string>;
|
|
8
9
|
title: import("prop-types").Requireable<string>;
|
|
9
10
|
name: import("prop-types").Requireable<string>;
|
|
10
11
|
checked: import("prop-types").Requireable<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAkB,EAAC,oBAAoB,EAA+B,MAAM,SAAS,CAAC;AAMtF,QAAA,MAAM,eAAe;YAAW,oBAAoB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAkB,EAAC,oBAAoB,EAA+B,MAAM,SAAS,CAAC;AAMtF,QAAA,MAAM,eAAe;YAAW,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBnD,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
export declare const propTypes: {
|
|
4
4
|
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
5
5
|
checkboxWithTitle: PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
|
+
value: PropTypes.Requireable<string>;
|
|
6
7
|
title: PropTypes.Requireable<string>;
|
|
7
8
|
name: PropTypes.Requireable<string>;
|
|
8
9
|
checked: PropTypes.Requireable<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAErB,CAAC;AAEF,oBAAY,4BAA4B,GAAG;IACzC,KAAK,EAAE;QACL,SAAS,EAAE,iBAAiB,GAAG,cAAc,CAAC;QAC9C,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;KACtB,CAAC;IACF,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,KAAK,EAAE,4BAA4B,EAAE,CAAC;CACvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|