@coorpacademy/components 11.4.5-alpha.36 → 11.4.5-alpha.37.36
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/review-presentation/index.d.ts.map +1 -1
- package/es/atom/review-presentation/index.js +75 -18
- package/es/atom/review-presentation/index.js.map +1 -1
- package/es/atom/review-presentation/prop-types.d.ts +4 -0
- package/es/atom/review-presentation/prop-types.d.ts.map +1 -1
- package/es/atom/review-presentation/prop-types.js +2 -1
- package/es/atom/review-presentation/prop-types.js.map +1 -1
- package/es/atom/review-presentation/style.css +5 -14
- package/es/atom/select/index.d.ts +2 -0
- package/es/atom/select/index.d.ts.map +1 -1
- package/es/atom/select/index.js +26 -10
- package/es/atom/select/index.js.map +1 -1
- package/es/atom/select/style.css +6 -6
- package/es/atom/select/test.html +44 -0
- package/es/molecule/answer/index.d.ts.map +1 -1
- package/es/molecule/answer/index.js +6 -16
- package/es/molecule/answer/index.js.map +1 -1
- package/es/molecule/brand-form-group/index.d.ts +4 -0
- package/es/molecule/filters/filters-wrapper.d.ts +0 -1
- package/es/molecule/filters/filters-wrapper.d.ts.map +1 -1
- package/es/molecule/filters/filters-wrapper.js +5 -9
- package/es/molecule/filters/filters-wrapper.js.map +1 -1
- package/es/molecule/filters/index.d.ts +2 -1
- package/es/molecule/filters/index.d.ts.map +1 -1
- package/es/molecule/filters/index.js +3 -6
- package/es/molecule/filters/index.js.map +1 -1
- package/es/molecule/questions/drop-down/index.d.ts +0 -1
- package/es/molecule/questions/drop-down/index.js +3 -7
- package/es/molecule/questions/drop-down/index.js.map +1 -1
- package/es/molecule/questions/qcm/index.d.ts +0 -1
- package/es/molecule/questions/qcm/index.js +3 -7
- package/es/molecule/questions/qcm/index.js.map +1 -1
- package/es/molecule/questions/qcm-drag/index.d.ts +1 -3
- package/es/molecule/questions/qcm-drag/index.d.ts.map +1 -1
- package/es/molecule/questions/qcm-drag/index.js +3 -7
- package/es/molecule/questions/qcm-drag/index.js.map +1 -1
- package/es/molecule/questions/qcm-graphic/index.d.ts +0 -1
- package/es/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
- package/es/molecule/questions/qcm-graphic/index.js +3 -7
- package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/es/molecule/questions/question-range/index.d.ts +0 -1
- package/es/molecule/questions/question-range/index.js +4 -8
- package/es/molecule/questions/question-range/index.js.map +1 -1
- package/es/molecule/questions/template/index.d.ts +2 -6
- package/es/molecule/questions/template/index.d.ts.map +1 -1
- package/es/molecule/questions/template/index.js +3 -7
- package/es/molecule/questions/template/index.js.map +1 -1
- package/es/molecule/setup-slide/index.d.ts +2 -0
- package/es/molecule/setup-slider/index.d.ts +2 -0
- package/es/organism/brand-form/index.d.ts +4 -0
- package/es/organism/user-preferences/index.d.ts +0 -1
- package/es/organism/user-preferences/index.js +3 -7
- package/es/organism/user-preferences/index.js.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +4 -0
- package/es/template/back-office/brand-update/index.d.ts +8 -0
- package/es/template/back-office/brand-update/style.css +2 -2
- package/es/template/common/search-page/index.d.ts +2 -2
- package/es/template/common/search-page/index.d.ts.map +1 -1
- package/es/template/common/search-page/index.js +3 -6
- package/es/template/common/search-page/index.js.map +1 -1
- package/es/template/review-dashboard-skills/index.d.ts +4 -0
- package/lib/atom/review-presentation/index.d.ts.map +1 -1
- package/lib/atom/review-presentation/index.js +79 -18
- package/lib/atom/review-presentation/index.js.map +1 -1
- package/lib/atom/review-presentation/prop-types.d.ts +4 -0
- package/lib/atom/review-presentation/prop-types.d.ts.map +1 -1
- package/lib/atom/review-presentation/prop-types.js +2 -1
- package/lib/atom/review-presentation/prop-types.js.map +1 -1
- package/lib/atom/review-presentation/style.css +5 -14
- package/lib/atom/select/index.d.ts +2 -0
- package/lib/atom/select/index.d.ts.map +1 -1
- package/lib/atom/select/index.js +26 -10
- package/lib/atom/select/index.js.map +1 -1
- package/lib/atom/select/style.css +6 -6
- package/lib/atom/select/test.html +44 -0
- package/lib/molecule/answer/index.d.ts.map +1 -1
- package/lib/molecule/answer/index.js +6 -16
- package/lib/molecule/answer/index.js.map +1 -1
- package/lib/molecule/brand-form-group/index.d.ts +4 -0
- package/lib/molecule/filters/filters-wrapper.d.ts +0 -1
- package/lib/molecule/filters/filters-wrapper.d.ts.map +1 -1
- package/lib/molecule/filters/filters-wrapper.js +5 -9
- package/lib/molecule/filters/filters-wrapper.js.map +1 -1
- package/lib/molecule/filters/index.d.ts +2 -1
- package/lib/molecule/filters/index.d.ts.map +1 -1
- package/lib/molecule/filters/index.js +3 -6
- package/lib/molecule/filters/index.js.map +1 -1
- package/lib/molecule/questions/drop-down/index.d.ts +0 -1
- package/lib/molecule/questions/drop-down/index.js +3 -7
- package/lib/molecule/questions/drop-down/index.js.map +1 -1
- package/lib/molecule/questions/qcm/index.d.ts +0 -1
- package/lib/molecule/questions/qcm/index.js +3 -7
- package/lib/molecule/questions/qcm/index.js.map +1 -1
- package/lib/molecule/questions/qcm-drag/index.d.ts +1 -3
- package/lib/molecule/questions/qcm-drag/index.d.ts.map +1 -1
- package/lib/molecule/questions/qcm-drag/index.js +3 -7
- package/lib/molecule/questions/qcm-drag/index.js.map +1 -1
- package/lib/molecule/questions/qcm-graphic/index.d.ts +0 -1
- package/lib/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
- package/lib/molecule/questions/qcm-graphic/index.js +3 -7
- package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/lib/molecule/questions/question-range/index.d.ts +0 -1
- package/lib/molecule/questions/question-range/index.js +4 -8
- package/lib/molecule/questions/question-range/index.js.map +1 -1
- package/lib/molecule/questions/template/index.d.ts +2 -6
- package/lib/molecule/questions/template/index.d.ts.map +1 -1
- package/lib/molecule/questions/template/index.js +3 -7
- package/lib/molecule/questions/template/index.js.map +1 -1
- package/lib/molecule/setup-slide/index.d.ts +2 -0
- package/lib/molecule/setup-slider/index.d.ts +2 -0
- package/lib/organism/brand-form/index.d.ts +4 -0
- package/lib/organism/user-preferences/index.d.ts +0 -1
- package/lib/organism/user-preferences/index.js +3 -7
- package/lib/organism/user-preferences/index.js.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +4 -0
- package/lib/template/back-office/brand-update/index.d.ts +8 -0
- package/lib/template/back-office/brand-update/style.css +2 -2
- package/lib/template/common/search-page/index.d.ts +2 -2
- package/lib/template/common/search-page/index.d.ts.map +1 -1
- package/lib/template/common/search-page/index.js +3 -6
- package/lib/template/common/search-page/index.js.map +1 -1
- package/lib/template/review-dashboard-skills/index.d.ts +4 -0
- package/locales/en/global.json +0 -1
- package/package.json +2 -2
|
@@ -10,21 +10,25 @@ declare const propTypes: {
|
|
|
10
10
|
text: PropTypes.Requireable<string>;
|
|
11
11
|
tooltipText: PropTypes.Requireable<string>;
|
|
12
12
|
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
13
|
+
closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
|
|
13
14
|
}>>;
|
|
14
15
|
questions: PropTypes.Requireable<PropTypes.InferProps<{
|
|
15
16
|
text: PropTypes.Requireable<string>;
|
|
16
17
|
tooltipText: PropTypes.Requireable<string>;
|
|
17
18
|
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
19
|
+
closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
|
|
18
20
|
}>>;
|
|
19
21
|
lifes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
20
22
|
text: PropTypes.Requireable<string>;
|
|
21
23
|
tooltipText: PropTypes.Requireable<string>;
|
|
22
24
|
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
25
|
+
closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
|
|
23
26
|
}>>;
|
|
24
27
|
allright: PropTypes.Requireable<PropTypes.InferProps<{
|
|
25
28
|
text: PropTypes.Requireable<string>;
|
|
26
29
|
tooltipText: PropTypes.Requireable<string>;
|
|
27
30
|
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
31
|
+
closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
|
|
28
32
|
}>>;
|
|
29
33
|
}>>;
|
|
30
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/prop-types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,UAAU,EAAE,qBAAqB,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/prop-types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,UAAU,EAAE,qBAAqB,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAS1E,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AAEF,eAAO,MAAM,aAAa;;;CAGzB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,UAAU,CAAC,EAAE;QACX,MAAM,CAAC,EACH;YACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,GACD,SAAS,CAAC;QACd,SAAS,CAAC,EAAE;YACV,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,CAAC;QACF,KAAK,CAAC,EACF;YACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,GACD,SAAS,CAAC;QACd,QAAQ,CAAC,EACL;YACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,GACD,SAAS,CAAC;KACf,CAAC;IACF,OAAO,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACjD,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,CAAC;QAAC,KAAK,EAAE,UAAU,CAAA;KAAC,CAAC,CAAC;CACtF,CAAC"}
|
|
@@ -10,7 +10,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
10
10
|
const levelItem = _propTypes.default.shape({
|
|
11
11
|
text: _propTypes.default.string,
|
|
12
12
|
tooltipText: _propTypes.default.string,
|
|
13
|
-
moreDetailsAreaLabel: _propTypes.default.string
|
|
13
|
+
moreDetailsAreaLabel: _propTypes.default.string,
|
|
14
|
+
closeToolTipInformationTextAriaLabel: _propTypes.default.string
|
|
14
15
|
});
|
|
15
16
|
|
|
16
17
|
const propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.js","names":["levelItem","PropTypes","shape","text","string","tooltipText","moreDetailsAreaLabel","propTypes","reviewTitle","reviewText","labelsList","skills","questions","lifes","allright","OnboardingPropsTypes","onPress","func","TipPropsTypes","Icon","any"],"sources":["../../../src/atom/review-presentation/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ColorValue, GestureResponderEvent, ViewStyle} from 'react-native';\n\nconst levelItem = PropTypes.shape({\n text: PropTypes.string,\n tooltipText: PropTypes.string,\n moreDetailsAreaLabel: PropTypes.string\n});\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n reviewTitle: PropTypes.string,\n reviewText: PropTypes.string,\n labelsList: PropTypes.shape({\n skills: levelItem,\n questions: levelItem,\n lifes: levelItem,\n allright: levelItem\n })\n};\n\nexport default propTypes;\n\nexport const OnboardingPropsTypes = {\n onPress: PropTypes.func\n};\n\nexport const TipPropsTypes = {\n text: PropTypes.string,\n Icon: PropTypes.any\n};\n\nexport type OnboardingProps = {\n 'aria-label'?: string | undefined;\n reviewTitle?: string | undefined;\n reviewText?: string | undefined;\n labelsList?: {\n skills?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n questions?: {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n };\n lifes?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n allright?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n };\n onPress: (event: GestureResponderEvent) => void;\n};\n\nexport type TipProps = {\n text: string | undefined;\n Icon: React.FC<{height: number; width: number; style: ViewStyle; color: ColorValue}>;\n};\n"],"mappings":";;;;;AAAA;;;;AAGA,MAAMA,SAAS,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EAChCC,IAAI,EAAEF,kBAAA,CAAUG,MADgB;EAEhCC,WAAW,EAAEJ,kBAAA,CAAUG,MAFS;EAGhCE,oBAAoB,EAAEL,kBAAA,CAAUG;
|
|
1
|
+
{"version":3,"file":"prop-types.js","names":["levelItem","PropTypes","shape","text","string","tooltipText","moreDetailsAreaLabel","closeToolTipInformationTextAriaLabel","propTypes","reviewTitle","reviewText","labelsList","skills","questions","lifes","allright","OnboardingPropsTypes","onPress","func","TipPropsTypes","Icon","any"],"sources":["../../../src/atom/review-presentation/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ColorValue, GestureResponderEvent, ViewStyle} from 'react-native';\n\nconst levelItem = PropTypes.shape({\n text: PropTypes.string,\n tooltipText: PropTypes.string,\n moreDetailsAreaLabel: PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string\n});\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n reviewTitle: PropTypes.string,\n reviewText: PropTypes.string,\n labelsList: PropTypes.shape({\n skills: levelItem,\n questions: levelItem,\n lifes: levelItem,\n allright: levelItem\n })\n};\n\nexport default propTypes;\n\nexport const OnboardingPropsTypes = {\n onPress: PropTypes.func\n};\n\nexport const TipPropsTypes = {\n text: PropTypes.string,\n Icon: PropTypes.any\n};\n\nexport type OnboardingProps = {\n 'aria-label'?: string | undefined;\n reviewTitle?: string | undefined;\n reviewText?: string | undefined;\n labelsList?: {\n skills?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n questions?: {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n };\n lifes?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n allright?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n };\n onPress: (event: GestureResponderEvent) => void;\n};\n\nexport type TipProps = {\n text: string | undefined;\n Icon: React.FC<{height: number; width: number; style: ViewStyle; color: ColorValue}>;\n};\n"],"mappings":";;;;;AAAA;;;;AAGA,MAAMA,SAAS,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EAChCC,IAAI,EAAEF,kBAAA,CAAUG,MADgB;EAEhCC,WAAW,EAAEJ,kBAAA,CAAUG,MAFS;EAGhCE,oBAAoB,EAAEL,kBAAA,CAAUG,MAHA;EAIhCG,oCAAoC,EAAEN,kBAAA,CAAUG;AAJhB,CAAhB,CAAlB;;AAOA,MAAMI,SAAS,GAAG;EAChB,cAAcP,kBAAA,CAAUG,MADR;EAEhBK,WAAW,EAAER,kBAAA,CAAUG,MAFP;EAGhBM,UAAU,EAAET,kBAAA,CAAUG,MAHN;EAIhBO,UAAU,EAAEV,kBAAA,CAAUC,KAAV,CAAgB;IAC1BU,MAAM,EAAEZ,SADkB;IAE1Ba,SAAS,EAAEb,SAFe;IAG1Bc,KAAK,EAAEd,SAHmB;IAI1Be,QAAQ,EAAEf;EAJgB,CAAhB;AAJI,CAAlB;eAYeQ,S;;AAER,MAAMQ,oBAAoB,GAAG;EAClCC,OAAO,EAAEhB,kBAAA,CAAUiB;AADe,CAA7B;;AAIA,MAAMC,aAAa,GAAG;EAC3BhB,IAAI,EAAEF,kBAAA,CAAUG,MADW;EAE3BgB,IAAI,EAAEnB,kBAAA,CAAUoB;AAFW,CAAtB"}
|
|
@@ -82,8 +82,6 @@
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
.toolTip {
|
|
85
|
-
visibility: hidden;
|
|
86
|
-
opacity: 0;
|
|
87
85
|
transition: opacity 0.8s;
|
|
88
86
|
position: absolute;
|
|
89
87
|
height: auto;
|
|
@@ -97,8 +95,8 @@
|
|
|
97
95
|
.toolTip::before {
|
|
98
96
|
content: '';
|
|
99
97
|
display: inline-block;
|
|
100
|
-
visibility:
|
|
101
|
-
opacity:
|
|
98
|
+
visibility: inherit;
|
|
99
|
+
opacity: inherit;
|
|
102
100
|
width: 15px;
|
|
103
101
|
height: 15px;
|
|
104
102
|
transform: rotate(-45deg);
|
|
@@ -126,19 +124,12 @@
|
|
|
126
124
|
position: relative;
|
|
127
125
|
}
|
|
128
126
|
|
|
129
|
-
.reviewListItemWrapper:hover .tooltipContainer .toolTip {
|
|
130
|
-
visibility: visible;
|
|
131
|
-
opacity: 1;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.reviewListItemWrapper:hover .tooltipContainer .toolTip::before {
|
|
135
|
-
visibility: visible;
|
|
136
|
-
opacity: 1;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
127
|
.tooltipIconContainer {
|
|
140
128
|
display: flex;
|
|
141
129
|
justify-content: flex-end;
|
|
130
|
+
border: none;
|
|
131
|
+
background: cm_grey_75;
|
|
132
|
+
height: 25px;
|
|
142
133
|
}
|
|
143
134
|
|
|
144
135
|
@media tablet {
|
|
@@ -51,6 +51,8 @@ declare namespace Select {
|
|
|
51
51
|
modified: PropTypes.Requireable<boolean>;
|
|
52
52
|
error: PropTypes.Requireable<boolean>;
|
|
53
53
|
'aria-label': PropTypes.Requireable<string>;
|
|
54
|
+
selectId: PropTypes.Requireable<string>;
|
|
55
|
+
titleClassName: PropTypes.Requireable<string>;
|
|
54
56
|
};
|
|
55
57
|
}
|
|
56
58
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;AA6BA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;AA6BA,qEAqKC"}
|
package/lib/atom/select/index.js
CHANGED
|
@@ -69,7 +69,9 @@ const Select = (props, legacyContext) => {
|
|
|
69
69
|
modified = false,
|
|
70
70
|
error = false,
|
|
71
71
|
title: propTitle,
|
|
72
|
-
'aria-label': ariaLabel
|
|
72
|
+
'aria-label': ariaLabel,
|
|
73
|
+
selectId,
|
|
74
|
+
titleClassName
|
|
73
75
|
} = props;
|
|
74
76
|
const skin = (0, _provider.GetSkinFromContext)(legacyContext);
|
|
75
77
|
const title = (0, _react.useMemo)(() => propTitle ? `${propTitle}${required ? '*' : ''}` : null, [propTitle, required]);
|
|
@@ -80,9 +82,18 @@ const Select = (props, legacyContext) => {
|
|
|
80
82
|
className: _style.default.selectOption
|
|
81
83
|
}, option.name);
|
|
82
84
|
});
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
let titleView = null;
|
|
86
|
+
|
|
87
|
+
if (selectId) {
|
|
88
|
+
titleView = /*#__PURE__*/_react.default.createElement("div", {
|
|
89
|
+
className: titleClassName
|
|
90
|
+
}, title, " ");
|
|
91
|
+
} else if (title) {
|
|
92
|
+
titleView = /*#__PURE__*/_react.default.createElement("span", {
|
|
93
|
+
className: _style.default.title
|
|
94
|
+
}, title, " ");
|
|
95
|
+
}
|
|
96
|
+
|
|
86
97
|
const selected = (0, _react.useMemo)(() => multiple ? (0, _map.default)((0, _get.default)('value'), (0, _filter.default)({
|
|
87
98
|
selected: true
|
|
88
99
|
}, options)) : (0, _get.default)('value', (0, _find.default)({
|
|
@@ -118,28 +129,31 @@ const Select = (props, legacyContext) => {
|
|
|
118
129
|
const isLongLabel = (0, _react.useMemo)(() => labelSize >= 65, [labelSize]);
|
|
119
130
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
120
131
|
className: (0, _classnames.default)(composedClassName, theme === 'coorpmanager' ? _style.default.coorpmanager : null)
|
|
121
|
-
}, /*#__PURE__*/_react.default.createElement("
|
|
132
|
+
}, /*#__PURE__*/_react.default.createElement("div", _extends({}, selectId ? {
|
|
133
|
+
htmlFor: selectId
|
|
134
|
+
} : {}, {
|
|
122
135
|
"data-name": "select-wrapper",
|
|
123
136
|
style: _extends({}, shouldUseSkinFontColor && {
|
|
124
137
|
color
|
|
125
138
|
}),
|
|
126
139
|
className: _style.default.selectWrapper
|
|
127
|
-
}, titleView, /*#__PURE__*/_react.default.createElement("span", {
|
|
140
|
+
}), /*#__PURE__*/_react.default.createElement("label", null, titleView), /*#__PURE__*/_react.default.createElement("span", {
|
|
128
141
|
"data-name": "select-span",
|
|
129
142
|
className: (0, _classnames.default)(_style.default.selectSpan, (0, _includes.default)(theme, ['player', 'invalid', 'question', 'thematiques', 'template']) ? _style.default.noLabelCommon : null, borderClassName, isLongLabel ? _style.default.longLabel : null),
|
|
130
143
|
style: _extends({}, shouldUseSkinFontColor && {
|
|
131
144
|
color
|
|
132
145
|
})
|
|
133
|
-
}, selectedLabel), arrowView, /*#__PURE__*/_react.default.createElement("select", {
|
|
146
|
+
}, selectedLabel), arrowView, /*#__PURE__*/_react.default.createElement("select", _extends({}, selectId ? {
|
|
147
|
+
id: selectId
|
|
148
|
+
} : {}, {
|
|
134
149
|
"data-name": "native-select",
|
|
135
150
|
className: _style.default.selectBox,
|
|
136
|
-
title: selectedLabel,
|
|
137
151
|
name: name,
|
|
138
152
|
onChange: handleChange,
|
|
139
153
|
value: selected,
|
|
140
154
|
multiple: multiple,
|
|
141
155
|
disabled: disabled
|
|
142
|
-
}, optionList)), /*#__PURE__*/_react.default.createElement("div", {
|
|
156
|
+
}), optionList)), /*#__PURE__*/_react.default.createElement("div", {
|
|
143
157
|
className: _style.default.description
|
|
144
158
|
}, description));
|
|
145
159
|
};
|
|
@@ -168,7 +182,9 @@ Select.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
168
182
|
options: _propTypes.default.arrayOf(_propTypes.default.shape(SelectOptionPropTypes)),
|
|
169
183
|
modified: _propTypes.default.bool,
|
|
170
184
|
error: _propTypes.default.bool,
|
|
171
|
-
'aria-label': _propTypes.default.string
|
|
185
|
+
'aria-label': _propTypes.default.string,
|
|
186
|
+
selectId: _propTypes.default.string,
|
|
187
|
+
titleClassName: _propTypes.default.string
|
|
172
188
|
} : {};
|
|
173
189
|
var _default = Select;
|
|
174
190
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["themeStyle","filter","style","invalid","header","mooc","question","sort","thematiques","player","template","coorpmanager","Select","props","legacyContext","name","options","className","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","ariaLabel","skin","GetSkinFromContext","useMemo","optionList","map","option","index","value","selectOption","titleView","selected","get","find","selectedLabel","isSelectedInValidOption","getOr","validOption","handleChange","e","target","selectedOptions","black","color","shouldUseSkinFontColor","includes","arrowColor","undefined","arrowView","selectedArrow","arrow","behaviorClassName","getClassState","default","composedClassName","classnames","unselected","labelSize","size","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","selectBox","SelectOptionPropTypes","PropTypes","string","isRequired","oneOfType","number","bool","contextTypes","Provider","childContextTypes","propTypes","func","oneOf","keys","arrayOf","shape"],"sources":["../../../src/atom/select/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport filter from 'lodash/fp/filter';\nimport find from 'lodash/fp/find';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport map from 'lodash/fp/map';\nimport size from 'lodash/fp/size';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n filter: style.filter,\n invalid: style.invalid,\n header: style.header,\n mooc: style.mooc,\n question: style.question,\n sort: style.sort,\n thematiques: style.thematiques,\n player: style.player,\n template: style.template,\n coorpmanager: null\n};\n\nconst Select = (props, legacyContext) => {\n const {\n name,\n options = [],\n className,\n borderClassName,\n onChange,\n multiple = false,\n disabled,\n required,\n description,\n theme,\n modified = false,\n error = false,\n title: propTitle,\n 'aria-label': ariaLabel\n } = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const title = useMemo(\n () => (propTitle ? `${propTitle}${required ? '*' : ''}` : null),\n [propTitle, required]\n );\n\n const optionList =\n options &&\n options.map((option, index) => {\n return (\n <option key={index} value={option.value} className={style.selectOption}>\n {option.name}\n </option>\n );\n });\n\n const titleView = title ? <span className={style.title}>{title} </span> : null;\n\n const selected = useMemo(\n () =>\n multiple\n ? map(get('value'), filter({selected: true}, options))\n : get('value', find({selected: true}, options)),\n [multiple, options]\n );\n const selectedLabel = useMemo(\n () =>\n multiple\n ? map(get('name'), filter({selected: true}, options))\n : get('name', find({selected: true}, options)),\n [multiple, options]\n );\n\n const isSelectedInValidOption = useMemo(\n () =>\n theme === 'player' &&\n getOr(false, 'name', find({validOption: false, selected: true}, options)),\n [options, theme]\n );\n\n const handleChange = useMemo(\n () =>\n multiple\n ? e => {\n onChange(map(get('value'), e.target.selectedOptions));\n }\n : e => {\n onChange(e.target.value);\n },\n [onChange, multiple]\n );\n\n const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);\n const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const shouldUseSkinFontColor = useMemo(\n () =>\n !isSelectedInValidOption && selected && includes(theme, ['question', 'template', 'player']),\n [isSelectedInValidOption, selected, theme]\n );\n const arrowColor = selected ? color : undefined;\n\n const arrowView = !multiple ? (\n <ArrowDown\n color={includes(theme, ['question', 'template', 'player']) ? arrowColor : black}\n className={shouldUseSkinFontColor ? style.selectedArrow : style.arrow}\n aria-label={ariaLabel}\n data-testid=\"select-arrow-down-icon\"\n />\n ) : null;\n const behaviorClassName = useMemo(\n () => getClassState(style.default, style.modified, style.error, modified, error),\n [error, modified]\n );\n const composedClassName = useMemo(\n () =>\n classnames(\n theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName,\n selected ? style.selected : style.unselected,\n className\n ),\n [behaviorClassName, className, selected, theme]\n );\n\n const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);\n\n const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);\n\n return (\n <div\n className={classnames(\n composedClassName,\n theme === 'coorpmanager' ? style.coorpmanager : null\n )}\n >\n <label\n data-name=\"select-wrapper\"\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n className={style.selectWrapper}\n >\n {titleView}\n <span\n data-name=\"select-span\"\n className={classnames(\n style.selectSpan,\n includes(theme, ['player', 'invalid', 'question', 'thematiques', 'template'])\n ? style.noLabelCommon\n : null,\n borderClassName,\n isLongLabel ? style.longLabel : null\n )}\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n >\n {selectedLabel}\n </span>\n {arrowView}\n <select\n data-name=\"native-select\"\n className={style.selectBox}\n title={selectedLabel}\n name={name}\n onChange={handleChange}\n value={selected}\n multiple={multiple}\n disabled={disabled}\n >\n {optionList}\n </select>\n </label>\n <div className={style.description}>{description}</div>\n </div>\n );\n};\n\nexport const SelectOptionPropTypes = {\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n selected: PropTypes.bool,\n validOption: PropTypes.bool\n};\n\nSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSelect.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n borderClassName: PropTypes.string,\n disabled: PropTypes.bool,\n multiple: PropTypes.bool,\n description: PropTypes.string,\n required: PropTypes.bool,\n onChange: PropTypes.func,\n theme: PropTypes.oneOf(keys(themeStyle)),\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n modified: PropTypes.bool,\n error: PropTypes.bool,\n 'aria-label': PropTypes.string\n};\n\nexport default Select;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG;EACjBC,MAAM,EAAEC,cAAA,CAAMD,MADG;EAEjBE,OAAO,EAAED,cAAA,CAAMC,OAFE;EAGjBC,MAAM,EAAEF,cAAA,CAAME,MAHG;EAIjBC,IAAI,EAAEH,cAAA,CAAMG,IAJK;EAKjBC,QAAQ,EAAEJ,cAAA,CAAMI,QALC;EAMjBC,IAAI,EAAEL,cAAA,CAAMK,IANK;EAO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AAV,CAAgB,IAAAC,aAAA,EAAKvF,UAAL,CAAhB,CAVU;EAWjBgB,OAAO,EAAE2D,kBAAA,CAAUa,OAAV,CAAkBb,kBAAA,CAAUc,KAAV,CAAgBf,qBAAhB,CAAlB,CAXQ;EAYjBjD,QAAQ,EAAEkD,kBAAA,CAAUK,IAZH;EAajBtD,KAAK,EAAEiD,kBAAA,CAAUK,IAbA;EAcjB,cAAcL,kBAAA,CAAUC;AAdP,CAAnB;eAiBehE,M"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["themeStyle","filter","style","invalid","header","mooc","question","sort","thematiques","player","template","coorpmanager","Select","props","legacyContext","name","options","className","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","ariaLabel","selectId","titleClassName","skin","GetSkinFromContext","useMemo","optionList","map","option","index","value","selectOption","titleView","selected","get","find","selectedLabel","isSelectedInValidOption","getOr","validOption","handleChange","e","target","selectedOptions","black","color","shouldUseSkinFontColor","includes","arrowColor","undefined","arrowView","selectedArrow","arrow","behaviorClassName","getClassState","default","composedClassName","classnames","unselected","labelSize","size","isLongLabel","htmlFor","selectWrapper","selectSpan","noLabelCommon","longLabel","id","selectBox","SelectOptionPropTypes","PropTypes","string","isRequired","oneOfType","number","bool","contextTypes","Provider","childContextTypes","propTypes","func","oneOf","keys","arrayOf","shape"],"sources":["../../../src/atom/select/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport filter from 'lodash/fp/filter';\nimport find from 'lodash/fp/find';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport map from 'lodash/fp/map';\nimport size from 'lodash/fp/size';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n filter: style.filter,\n invalid: style.invalid,\n header: style.header,\n mooc: style.mooc,\n question: style.question,\n sort: style.sort,\n thematiques: style.thematiques,\n player: style.player,\n template: style.template,\n coorpmanager: null\n};\n\nconst Select = (props, legacyContext) => {\n const {\n name,\n options = [],\n className,\n borderClassName,\n onChange,\n multiple = false,\n disabled,\n required,\n description,\n theme,\n modified = false,\n error = false,\n title: propTitle,\n 'aria-label': ariaLabel,\n selectId,\n titleClassName\n } = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const title = useMemo(\n () => (propTitle ? `${propTitle}${required ? '*' : ''}` : null),\n [propTitle, required]\n );\n\n const optionList =\n options &&\n options.map((option, index) => {\n return (\n <option key={index} value={option.value} className={style.selectOption}>\n {option.name}\n </option>\n );\n });\n\n let titleView = null;\n if (selectId) {\n titleView = <div className={titleClassName}>{title} </div>;\n } else if (title) {\n titleView = <span className={style.title}>{title} </span>;\n }\n\n const selected = useMemo(\n () =>\n multiple\n ? map(get('value'), filter({selected: true}, options))\n : get('value', find({selected: true}, options)),\n [multiple, options]\n );\n const selectedLabel = useMemo(\n () =>\n multiple\n ? map(get('name'), filter({selected: true}, options))\n : get('name', find({selected: true}, options)),\n [multiple, options]\n );\n\n const isSelectedInValidOption = useMemo(\n () =>\n theme === 'player' &&\n getOr(false, 'name', find({validOption: false, selected: true}, options)),\n [options, theme]\n );\n\n const handleChange = useMemo(\n () =>\n multiple\n ? e => {\n onChange(map(get('value'), e.target.selectedOptions));\n }\n : e => {\n onChange(e.target.value);\n },\n [onChange, multiple]\n );\n\n const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);\n const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const shouldUseSkinFontColor = useMemo(\n () =>\n !isSelectedInValidOption && selected && includes(theme, ['question', 'template', 'player']),\n [isSelectedInValidOption, selected, theme]\n );\n const arrowColor = selected ? color : undefined;\n\n const arrowView = !multiple ? (\n <ArrowDown\n color={includes(theme, ['question', 'template', 'player']) ? arrowColor : black}\n className={shouldUseSkinFontColor ? style.selectedArrow : style.arrow}\n aria-label={ariaLabel}\n data-testid=\"select-arrow-down-icon\"\n />\n ) : null;\n const behaviorClassName = useMemo(\n () => getClassState(style.default, style.modified, style.error, modified, error),\n [error, modified]\n );\n const composedClassName = useMemo(\n () =>\n classnames(\n theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName,\n selected ? style.selected : style.unselected,\n className\n ),\n [behaviorClassName, className, selected, theme]\n );\n\n const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);\n\n const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);\n\n return (\n <div\n className={classnames(\n composedClassName,\n theme === 'coorpmanager' ? style.coorpmanager : null\n )}\n >\n <div\n {...(selectId ? {htmlFor: selectId} : {})}\n data-name=\"select-wrapper\"\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n className={style.selectWrapper}\n >\n <label>{titleView}</label>\n <span\n data-name=\"select-span\"\n className={classnames(\n style.selectSpan,\n includes(theme, ['player', 'invalid', 'question', 'thematiques', 'template'])\n ? style.noLabelCommon\n : null,\n borderClassName,\n isLongLabel ? style.longLabel : null\n )}\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n >\n {selectedLabel}\n </span>\n {arrowView}\n <select\n {...(selectId ? {id: selectId} : {})}\n data-name=\"native-select\"\n className={style.selectBox}\n name={name}\n onChange={handleChange}\n value={selected}\n multiple={multiple}\n disabled={disabled}\n >\n {optionList}\n </select>\n </div>\n <div className={style.description}>{description}</div>\n </div>\n );\n};\n\nexport const SelectOptionPropTypes = {\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n selected: PropTypes.bool,\n validOption: PropTypes.bool\n};\n\nSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSelect.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n borderClassName: PropTypes.string,\n disabled: PropTypes.bool,\n multiple: PropTypes.bool,\n description: PropTypes.string,\n required: PropTypes.bool,\n onChange: PropTypes.func,\n theme: PropTypes.oneOf(keys(themeStyle)),\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n modified: PropTypes.bool,\n error: PropTypes.bool,\n 'aria-label': PropTypes.string,\n selectId: PropTypes.string,\n titleClassName: PropTypes.string\n};\n\nexport default Select;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG;EACjBC,MAAM,EAAEC,cAAA,CAAMD,MADG;EAEjBE,OAAO,EAAED,cAAA,CAAMC,OAFE;EAGjBC,MAAM,EAAEF,cAAA,CAAME,MAHG;EAIjBC,IAAI,EAAEH,cAAA,CAAMG,IAJK;EAKjBC,QAAQ,EAAEJ,cAAA,CAAMI,QALC;EAMjBC,IAAI,EAAEL,cAAA,CAAMK,IANK;EAOjBC,WAAW,EAAEN,cAAA,CAAMM,WAPF;EAQjBC,MAAM,EAAEP,cAAA,CAAMO,MARG;EASjBC,QAAQ,EAAER,cAAA,CAAMQ,QATC;EAUjBC,YAAY,EAAE;AAVG,CAAnB;;AAaA,MAAMC,MAAM,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACvC,MAAM;IACJC,IADI;IAEJC,OAAO,GAAG,EAFN;IAGJC,SAHI;IAIJC,eAJI;IAKJC,QALI;IAMJC,QAAQ,GAAG,KANP;IAOJC,QAPI;IAQJC,QARI;IASJC,WATI;IAUJC,KAVI;IAWJC,QAAQ,GAAG,KAXP;IAYJC,KAAK,GAAG,KAZJ;IAaJC,KAAK,EAAEC,SAbH;IAcJ,cAAcC,SAdV;IAeJC,QAfI;IAgBJC;EAhBI,IAiBFlB,KAjBJ;EAmBA,MAAMmB,IAAI,GAAG,IAAAC,4BAAA,EAAmBnB,aAAnB,CAAb;EACA,MAAMa,KAAK,GAAG,IAA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AUC,MAfH;EAgBjBjD,cAAc,EAAEgD,kBAAA,CAAUC;AAhBT,CAAnB;eAmBepE,M"}
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
composes: default;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
div.coorpmanager
|
|
27
|
+
div.coorpmanager div.selectWrapper {
|
|
28
28
|
max-width: fit-content;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.coorpmanager
|
|
31
|
+
.coorpmanager div.selectWrapper select.selectBox {
|
|
32
32
|
padding-left: 10px;
|
|
33
33
|
position: relative;
|
|
34
34
|
border-radius: 2px;
|
|
@@ -38,13 +38,13 @@ div.coorpmanager label.selectWrapper {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
@media tablet {
|
|
41
|
-
.coorpmanager
|
|
41
|
+
.coorpmanager div.selectWrapper .description {
|
|
42
42
|
max-width: 120px;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
@media mobile {
|
|
47
|
-
.coorpmanager
|
|
47
|
+
.coorpmanager div.selectWrapper select.selectBox {
|
|
48
48
|
width: 100%;
|
|
49
49
|
min-width: 180px;
|
|
50
50
|
}
|
|
@@ -272,7 +272,7 @@ div.coorpmanager label.selectWrapper {
|
|
|
272
272
|
box-sizing: border-box;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
div.default
|
|
275
|
+
div.default div.selectWrapper span.longLabel {
|
|
276
276
|
min-width: 230px;
|
|
277
277
|
max-width: 280px;
|
|
278
278
|
white-space: pre-wrap;
|
|
@@ -529,7 +529,7 @@ div.player:hover span.selectSpan {
|
|
|
529
529
|
|
|
530
530
|
/* mozilla specific styling */
|
|
531
531
|
@supports (-moz-appearance:none) {
|
|
532
|
-
.player
|
|
532
|
+
.player div.selectWrapper select.selectBox {
|
|
533
533
|
width: 100%;
|
|
534
534
|
}
|
|
535
535
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<label for="playListSelect"
|
|
2
|
+
><div class="title-f3Apo">Choisissez une Playlist :</div>
|
|
3
|
+
</label>
|
|
4
|
+
<div data-name="select-wrapper" class="selectWrapper-jVG0x">
|
|
5
|
+
<span data-name="select-span" class="selectSpan-5Rz8p noLabelCommon-Ktfrm"
|
|
6
|
+
>Toutes les thématiques</span
|
|
7
|
+
><svg
|
|
8
|
+
id="prefix__Calque_1"
|
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
+
x="0"
|
|
11
|
+
y="0"
|
|
12
|
+
viewBox="0 0 20 20"
|
|
13
|
+
xml:space="preserve"
|
|
14
|
+
color="#14171A"
|
|
15
|
+
class="arrow-GiHtK"
|
|
16
|
+
data-testid="select-arrow-down-icon"
|
|
17
|
+
role="img"
|
|
18
|
+
aria-label="afficher plus de cours"
|
|
19
|
+
>
|
|
20
|
+
<style></style>
|
|
21
|
+
<g id="prefix__Page-1">
|
|
22
|
+
<path
|
|
23
|
+
fill="currentColor"
|
|
24
|
+
d="M0 6.5l3-2.9 7 6.9 7-6.9 3 2.9-10 9.9z"
|
|
25
|
+
id="prefix__arrow_down"
|
|
26
|
+
></path>
|
|
27
|
+
</g></svg
|
|
28
|
+
><select
|
|
29
|
+
id="playListSelect"
|
|
30
|
+
data-name="native-select"
|
|
31
|
+
class="selectBox-OGec0"
|
|
32
|
+
>
|
|
33
|
+
<option value="ALL" class="selectOption-QMj7b">
|
|
34
|
+
Toutes les thématiques
|
|
35
|
+
</option>
|
|
36
|
+
<option value="biba" class="selectOption-QMj7b">Biba</option>
|
|
37
|
+
<option value="cplaylist_0000000000" class="selectOption-QMj7b">
|
|
38
|
+
Reprise en douceur
|
|
39
|
+
</option>
|
|
40
|
+
<option value="ref-1" class="selectOption-QMj7b">Thématique n°1</option>
|
|
41
|
+
<option value="ref-2" class="selectOption-QMj7b">Thématique n°2</option>
|
|
42
|
+
<option value="ref-3" class="selectOption-QMj7b">Thématique n°3</option>
|
|
43
|
+
</select>
|
|
44
|
+
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/answer/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/answer/index.js"],"names":[],"mappings":";AA4EA,iDASC"}
|
|
@@ -98,38 +98,28 @@ const Switch = ({
|
|
|
98
98
|
switch (type) {
|
|
99
99
|
case 'qcmDrag':
|
|
100
100
|
return /*#__PURE__*/_react.default.createElement(_qcmDrag.default, _extends({}, model, {
|
|
101
|
-
help: help
|
|
102
|
-
groupAriaLabel: translate('answer_the_question')
|
|
101
|
+
help: help
|
|
103
102
|
}));
|
|
104
103
|
|
|
105
104
|
case 'qcm':
|
|
106
|
-
return /*#__PURE__*/_react.default.createElement(_qcm.default,
|
|
107
|
-
groupAriaLabel: translate('answer_the_question')
|
|
108
|
-
}));
|
|
105
|
+
return /*#__PURE__*/_react.default.createElement(_qcm.default, model);
|
|
109
106
|
|
|
110
107
|
case 'qcmGraphic':
|
|
111
|
-
return /*#__PURE__*/_react.default.createElement(_qcmGraphic.default,
|
|
112
|
-
groupAriaLabel: translate('answer_the_question')
|
|
113
|
-
}));
|
|
108
|
+
return /*#__PURE__*/_react.default.createElement(_qcmGraphic.default, model);
|
|
114
109
|
|
|
115
110
|
case 'freeText':
|
|
116
111
|
return /*#__PURE__*/_react.default.createElement(_freeText.default, model);
|
|
117
112
|
|
|
118
113
|
case 'dropDown':
|
|
119
114
|
return /*#__PURE__*/_react.default.createElement(_dropDown.default, _extends({}, model, {
|
|
120
|
-
"aria-label": translate('drop_down_icon')
|
|
121
|
-
groupAriaLabel: translate('answer_the_question')
|
|
115
|
+
"aria-label": translate('drop_down_icon')
|
|
122
116
|
}));
|
|
123
117
|
|
|
124
118
|
case 'slider':
|
|
125
|
-
return /*#__PURE__*/_react.default.createElement(_questionRange.default,
|
|
126
|
-
groupAriaLabel: translate('answer_the_question')
|
|
127
|
-
}));
|
|
119
|
+
return /*#__PURE__*/_react.default.createElement(_questionRange.default, model);
|
|
128
120
|
|
|
129
121
|
case 'template':
|
|
130
|
-
return /*#__PURE__*/_react.default.createElement(_template.default,
|
|
131
|
-
groupAriaLabel: translate('answer_the_question')
|
|
132
|
-
}));
|
|
122
|
+
return /*#__PURE__*/_react.default.createElement(_template.default, model);
|
|
133
123
|
}
|
|
134
124
|
};
|
|
135
125
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["MediaView","media","videoId","type","childProps","TYPE_IMAGE","style","backgroundImage","url","TYPE_VIDEO","video","TYPE_AUDIO","audio","propTypes","MediaViewPropTypes","Switch","model","help","translate","contextTypes","Provider","childContextTypes","Answer","props","wrapper"],"sources":["../../../src/molecule/answer/index.js"],"sourcesContent":["import React from 'react';\nimport {omit} from 'lodash/fp';\nimport VideoPlayer from '../video-player';\nimport DropDown from '../questions/drop-down';\nimport FreeText from '../questions/free-text';\nimport QcmDrag from '../questions/qcm-drag';\nimport Qcm from '../questions/qcm';\nimport QcmGraphic from '../questions/qcm-graphic';\nimport QuestionRange from '../questions/question-range';\nimport Template from '../questions/template';\nimport Provider from '../../atom/provider';\nimport Audio from '../audio';\nimport style from './style.css';\nimport propTypes, {MediaViewPropTypes, TYPE_AUDIO, TYPE_IMAGE, TYPE_VIDEO} from './prop-types';\n\nconst MediaView = ({media}) => {\n const {videoId, type, ...childProps} = media;\n switch (type) {\n case TYPE_IMAGE:\n return (\n <div\n className={style.media}\n style={{\n backgroundImage: `url(${media.url})`\n }}\n />\n );\n case TYPE_VIDEO:\n return (\n <div className={style.video}>\n <VideoPlayer {...omit('id', childProps)} id={videoId} height=\"100%\" width=\"100%\" />\n </div>\n );\n case TYPE_AUDIO:\n return (\n <div className={style.audio}>\n <Audio {...omit('id', childProps)} height=\"100%\" width=\"100%\" />\n </div>\n );\n default:\n return null;\n }\n};\n\nMediaView.propTypes = MediaViewPropTypes;\n\nconst Switch = ({model, help}, {translate}) => {\n const {type} = model;\n\n switch (type) {\n case 'qcmDrag':\n return <QcmDrag {...model} help={help}
|
|
1
|
+
{"version":3,"file":"index.js","names":["MediaView","media","videoId","type","childProps","TYPE_IMAGE","style","backgroundImage","url","TYPE_VIDEO","video","TYPE_AUDIO","audio","propTypes","MediaViewPropTypes","Switch","model","help","translate","contextTypes","Provider","childContextTypes","Answer","props","wrapper"],"sources":["../../../src/molecule/answer/index.js"],"sourcesContent":["import React from 'react';\nimport {omit} from 'lodash/fp';\nimport VideoPlayer from '../video-player';\nimport DropDown from '../questions/drop-down';\nimport FreeText from '../questions/free-text';\nimport QcmDrag from '../questions/qcm-drag';\nimport Qcm from '../questions/qcm';\nimport QcmGraphic from '../questions/qcm-graphic';\nimport QuestionRange from '../questions/question-range';\nimport Template from '../questions/template';\nimport Provider from '../../atom/provider';\nimport Audio from '../audio';\nimport style from './style.css';\nimport propTypes, {MediaViewPropTypes, TYPE_AUDIO, TYPE_IMAGE, TYPE_VIDEO} from './prop-types';\n\nconst MediaView = ({media}) => {\n const {videoId, type, ...childProps} = media;\n switch (type) {\n case TYPE_IMAGE:\n return (\n <div\n className={style.media}\n style={{\n backgroundImage: `url(${media.url})`\n }}\n />\n );\n case TYPE_VIDEO:\n return (\n <div className={style.video}>\n <VideoPlayer {...omit('id', childProps)} id={videoId} height=\"100%\" width=\"100%\" />\n </div>\n );\n case TYPE_AUDIO:\n return (\n <div className={style.audio}>\n <Audio {...omit('id', childProps)} height=\"100%\" width=\"100%\" />\n </div>\n );\n default:\n return null;\n }\n};\n\nMediaView.propTypes = MediaViewPropTypes;\n\nconst Switch = ({model, help}, {translate}) => {\n const {type} = model;\n\n switch (type) {\n case 'qcmDrag':\n return <QcmDrag {...model} help={help} />;\n case 'qcm':\n return <Qcm {...model} />;\n case 'qcmGraphic':\n return <QcmGraphic {...model} />;\n case 'freeText':\n return <FreeText {...model} />;\n case 'dropDown':\n return <DropDown {...model} aria-label={translate('drop_down_icon')} />;\n case 'slider':\n return <QuestionRange {...model} />;\n case 'template':\n return <Template {...model} />;\n }\n};\n\nSwitch.propTypes = {\n model: propTypes.model,\n help: propTypes.help\n};\n\nSwitch.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nconst Answer = props => {\n const {model, media, help} = props;\n\n return (\n <div data-name=\"answer\" className={style.wrapper}>\n {media ? <MediaView media={media} /> : null}\n <Switch model={model} help={help} />\n </div>\n );\n};\n\nAnswer.propTypes = propTypes;\n\nexport default Answer;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,MAAMA,SAAS,GAAG,CAAC;EAACC;AAAD,CAAD,KAAa;EAC7B,MAAM;IAACC,OAAD;IAAUC;EAAV,IAAiCF,KAAvC;EAAA,MAAyBG,UAAzB,iCAAuCH,KAAvC;;EACA,QAAQE,IAAR;IACE,KAAKE,qBAAL;MACE,oBACE;QACE,SAAS,EAAEC,cAAA,CAAML,KADnB;QAEE,KAAK,EAAE;UACLM,eAAe,EAAG,OAAMN,KAAK,CAACO,GAAI;QAD7B;MAFT,EADF;;IAQF,KAAKC,qBAAL;MACE,oBACE;QAAK,SAAS,EAAEH,cAAA,CAAMI;MAAtB,gBACE,6BAAC,oBAAD,eAAiB,oBAAK,IAAL,EAAWN,UAAX,CAAjB;QAAyC,EAAE,EAAEF,OAA7C;QAAsD,MAAM,EAAC,MAA7D;QAAoE,KAAK,EAAC;MAA1E,GADF,CADF;;IAKF,KAAKS,qBAAL;MACE,oBACE;QAAK,SAAS,EAAEL,cAAA,CAAMM;MAAtB,gBACE,6BAAC,cAAD,eAAW,oBAAK,IAAL,EAAWR,UAAX,CAAX;QAAmC,MAAM,EAAC,MAA1C;QAAiD,KAAK,EAAC;MAAvD,GADF,CADF;;IAKF;MACE,OAAO,IAAP;EAvBJ;AAyBD,CA3BD;;AA6BAJ,SAAS,CAACa,SAAV,2CAAsBC,6BAAtB;;AAEA,MAAMC,MAA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F,CADF;AAMD,CATD;;AAWAK,MAAM,CAACT,SAAP,2CAAmBA,kBAAnB;eAEeS,M"}
|
|
@@ -99,6 +99,8 @@ declare namespace BrandFormGroup {
|
|
|
99
99
|
modified: PropTypes.Requireable<boolean>;
|
|
100
100
|
error: PropTypes.Requireable<boolean>;
|
|
101
101
|
'aria-label': PropTypes.Requireable<string>;
|
|
102
|
+
selectId: PropTypes.Requireable<string>;
|
|
103
|
+
titleClassName: PropTypes.Requireable<string>;
|
|
102
104
|
}> | PropTypes.InferProps<{
|
|
103
105
|
type: PropTypes.Requireable<string>;
|
|
104
106
|
title: PropTypes.Validator<string>;
|
|
@@ -203,6 +205,8 @@ declare namespace BrandFormGroup {
|
|
|
203
205
|
modified: PropTypes.Requireable<boolean>;
|
|
204
206
|
error: PropTypes.Requireable<boolean>;
|
|
205
207
|
'aria-label': PropTypes.Requireable<string>;
|
|
208
|
+
selectId: PropTypes.Requireable<string>;
|
|
209
|
+
titleClassName: PropTypes.Requireable<string>;
|
|
206
210
|
}> | PropTypes.InferProps<{
|
|
207
211
|
type: PropTypes.Requireable<string>;
|
|
208
212
|
title: PropTypes.Validator<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters-wrapper.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/filters-wrapper.js"],"names":[],"mappings":";AAUA,
|
|
1
|
+
{"version":3,"file":"filters-wrapper.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/filters-wrapper.js"],"names":[],"mappings":";AAUA,sEAuDC"}
|
|
@@ -30,8 +30,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
30
30
|
const FiltersWapper = (props, context) => {
|
|
31
31
|
const {
|
|
32
32
|
filters,
|
|
33
|
-
className
|
|
34
|
-
filterGroupAriaLabel
|
|
33
|
+
className
|
|
35
34
|
} = props;
|
|
36
35
|
|
|
37
36
|
const buildFilter = (filter, idx) => {
|
|
@@ -95,11 +94,9 @@ const FiltersWapper = (props, context) => {
|
|
|
95
94
|
})(buildFilter, filters);
|
|
96
95
|
|
|
97
96
|
const emptyFilters = (0, _isEmpty2.default)(filters);
|
|
98
|
-
return /*#__PURE__*/_react.default.createElement("
|
|
99
|
-
className: (0, _classnames.default)(className, emptyFilters ? _filtersWapper.default.wrapperNone : _filtersWapper.default.wrapper)
|
|
100
|
-
|
|
101
|
-
"aria-label": filterGroupAriaLabel
|
|
102
|
-
}, filtersList));
|
|
97
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
98
|
+
className: (0, _classnames.default)(className, emptyFilters ? _filtersWapper.default.wrapperNone : _filtersWapper.default.wrapper)
|
|
99
|
+
}, filtersList);
|
|
103
100
|
};
|
|
104
101
|
|
|
105
102
|
FiltersWapper.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -107,8 +104,7 @@ FiltersWapper.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
107
104
|
filters: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
108
105
|
type: _propTypes.default.oneOf(['select', 'range', 'radio', 'switch']).isRequired,
|
|
109
106
|
fieldName: _propTypes.default.string.isRequired
|
|
110
|
-
}))
|
|
111
|
-
filterGroupAriaLabel: _propTypes.default.string
|
|
107
|
+
}))
|
|
112
108
|
} : {};
|
|
113
109
|
var _default = FiltersWapper;
|
|
114
110
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters-wrapper.js","names":["FiltersWapper","props","context","filters","className","
|
|
1
|
+
{"version":3,"file":"filters-wrapper.js","names":["FiltersWapper","props","context","filters","className","buildFilter","filter","idx","type","fieldName","style","choice","title","radioGroup","timerWrapper","timerSubtitle","subtitle","toggle","display","filtersList","convert","cap","emptyFilters","classnames","wrapperNone","wrapper","propTypes","PropTypes","string","arrayOf","shape","oneOf","isRequired"],"sources":["../../../src/molecule/filters/filters-wrapper.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Select from '../../atom/select';\nimport InputSwitch from '../../atom/input-switch';\nimport RadioGroup from '../../atom/radio-group';\nimport RangeSlider from '../../atom/range';\nimport style from './filters-wapper.css';\n\nconst FiltersWapper = (props, context) => {\n const {filters, className} = props;\n\n const buildFilter = (filter, idx) => {\n const {type, fieldName} = filter;\n switch (type) {\n case 'select':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <Select {...filter} />\n </div>\n );\n case 'radio':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p className={style.title}>{filter.title}</p>\n <RadioGroup {...filter} className={style.radioGroup} />\n </div>\n );\n case 'range':\n return (\n <div\n data-name=\"choice\"\n data-filter-type={fieldName}\n className={style.timerWrapper}\n key={idx}\n >\n <label>\n <span className={style.title}>{filter.title}</span>\n <p className={style.timerSubtitle}>{filter.subtitle}</p>\n <RangeSlider {...filter} />\n </label>\n </div>\n );\n case 'switch':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p className={style.title}>{filter.title}</p>\n <div className={style.toggle}>\n <InputSwitch {...filter.display} />\n </div>\n </div>\n );\n default:\n return null;\n }\n };\n\n const filtersList = map.convert({cap: false})(buildFilter, filters);\n const emptyFilters = isEmpty(filters);\n return (\n <div className={classnames(className, emptyFilters ? style.wrapperNone : style.wrapper)}>\n {filtersList}\n </div>\n );\n};\n\nFiltersWapper.propTypes = {\n className: PropTypes.string,\n filters: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf(['select', 'range', 'radio', 'switch']).isRequired,\n fieldName: PropTypes.string.isRequired\n })\n )\n};\nexport default FiltersWapper;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,aAAa,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACxC,MAAM;IAACC,OAAD;IAAUC;E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,EAAEF,sBAAA,CAAMO;QAAtB,gBACE,6BAAC,oBAAD,EAAiBX,MAAM,CAACY,OAAxB,CADF,CAFF,CADF;;MAQF;QACE,OAAO,IAAP;IAvCJ;EAyCD,CA3CD;;EA6CA,MAAMC,WAAW,GAAG,cAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0BhB,WAA1B,EAAuCF,OAAvC,CAApB;;EACA,MAAMmB,YAAY,GAAG,uBAAQnB,OAAR,CAArB;EACA,oBACE;IAAK,SAAS,EAAE,IAAAoB,mBAAA,EAAWnB,SAAX,EAAsBkB,YAAY,GAAGZ,sBAAA,CAAMc,WAAT,GAAuBd,sBAAA,CAAMe,OAA/D;EAAhB,GACGN,WADH,CADF;AAKD,CAvDD;;AAyDAnB,aAAa,CAAC0B,SAAd,2CAA0B;EACxBtB,SAAS,EAAEuB,kBAAA,CAAUC,MADG;EAExBzB,OAAO,EAAEwB,kBAAA,CAAUE,OAAV,CACPF,kBAAA,CAAUG,KAAV,CAAgB;IACdtB,IAAI,EAAEmB,kBAAA,CAAUI,KAAV,CAAgB,CAAC,QAAD,EAAW,OAAX,EAAoB,OAApB,EAA6B,QAA7B,CAAhB,EAAwDC,UADhD;IAEdvB,SAAS,EAAEkB,kBAAA,CAAUC,MAAV,CAAiBI;EAFd,CAAhB,CADO;AAFe,CAA1B;eASehC,a"}
|
|
@@ -31,13 +31,14 @@ declare class Filters extends React.Component<any, any, any> {
|
|
|
31
31
|
modified: PropTypes.Requireable<boolean>;
|
|
32
32
|
error: PropTypes.Requireable<boolean>;
|
|
33
33
|
'aria-label': PropTypes.Requireable<string>;
|
|
34
|
+
selectId: PropTypes.Requireable<string>;
|
|
35
|
+
titleClassName: PropTypes.Requireable<string>;
|
|
34
36
|
}>>;
|
|
35
37
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
36
38
|
onToggleFilters: PropTypes.Requireable<(...args: any[]) => any>;
|
|
37
39
|
onToggleSorts: PropTypes.Requireable<(...args: any[]) => any>;
|
|
38
40
|
moreSortAriaLabel: PropTypes.Requireable<string>;
|
|
39
41
|
moreFilterAriaLabel: PropTypes.Requireable<string>;
|
|
40
|
-
filterGroupAriaLabel: PropTypes.Requireable<string>;
|
|
41
42
|
};
|
|
42
43
|
static contextTypes: {
|
|
43
44
|
skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAcE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBASC;IAPC;;;MAGC;IAMH,yBAcC;IAED,uBAYC;IAED,qBAOC;IAED,sBAsFC;CACF"}
|
|
@@ -86,8 +86,7 @@ class Filters extends _react.default.Component {
|
|
|
86
86
|
sortTabLabel,
|
|
87
87
|
filters,
|
|
88
88
|
moreFilterAriaLabel,
|
|
89
|
-
moreSortAriaLabel
|
|
90
|
-
filterGroupAriaLabel
|
|
89
|
+
moreSortAriaLabel
|
|
91
90
|
} = this.props;
|
|
92
91
|
const {
|
|
93
92
|
filter,
|
|
@@ -140,8 +139,7 @@ class Filters extends _react.default.Component {
|
|
|
140
139
|
className: filtersActive ? _style.default.activeWrapperFilters : _style.default.wrapperFilters
|
|
141
140
|
}, /*#__PURE__*/_react.default.createElement(_filtersWrapper.default, {
|
|
142
141
|
className: _style.default.wrapper,
|
|
143
|
-
filters: filters
|
|
144
|
-
filterGroupAriaLabel: filterGroupAriaLabel
|
|
142
|
+
filters: filters
|
|
145
143
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
146
144
|
"data-name": "cta",
|
|
147
145
|
className: _style.default.CTAfilter,
|
|
@@ -180,8 +178,7 @@ Filters.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
180
178
|
onToggleFilters: _propTypes.default.func,
|
|
181
179
|
onToggleSorts: _propTypes.default.func,
|
|
182
180
|
moreSortAriaLabel: _propTypes.default.string,
|
|
183
|
-
moreFilterAriaLabel: _propTypes.default.string
|
|
184
|
-
filterGroupAriaLabel: _propTypes.default.string
|
|
181
|
+
moreFilterAriaLabel: _propTypes.default.string
|
|
185
182
|
} : {};
|
|
186
183
|
var _default = Filters;
|
|
187
184
|
exports.default = _default;
|