@coorpacademy/components 11.6.0 → 11.7.2
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.native.js +1 -1
- package/es/atom/review-presentation/index.native.js.map +1 -1
- package/es/atom/select/index.d.ts.map +1 -1
- package/es/atom/select/index.js +48 -11
- package/es/atom/select/index.js.map +1 -1
- package/es/molecule/answer/index.d.ts.map +1 -1
- package/es/molecule/answer/index.js +1 -9
- package/es/molecule/answer/index.js.map +1 -1
- package/es/molecule/empty-state-dashboard/index.d.ts +23 -0
- package/es/molecule/empty-state-dashboard/index.d.ts.map +1 -0
- package/es/molecule/empty-state-dashboard/index.js +31 -0
- package/es/molecule/empty-state-dashboard/index.js.map +1 -0
- package/es/molecule/empty-state-dashboard/style.css +55 -0
- package/es/molecule/empty-state-dashboard/types.d.ts +19 -0
- package/es/molecule/empty-state-dashboard/types.d.ts.map +1 -0
- package/es/molecule/empty-state-dashboard/types.js +19 -0
- package/es/molecule/empty-state-dashboard/types.js.map +1 -0
- package/es/organism/list-item/index.d.ts +8 -6
- package/es/organism/list-item/index.d.ts.map +1 -1
- package/es/organism/list-item/index.js +16 -2
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +18 -0
- package/es/organism/list-items/index.d.ts +2 -0
- package/es/organism/list-items/index.js +5 -1
- package/es/organism/list-items/index.js.map +1 -1
- package/es/organism/review-header/index.native.d.ts.map +1 -1
- package/es/organism/review-header/index.native.js +8 -7
- package/es/organism/review-header/index.native.js.map +1 -1
- package/es/template/activity/index.d.ts +36 -40
- package/es/template/activity/index.d.ts.map +1 -1
- package/es/template/activity/index.js +89 -111
- package/es/template/activity/index.js.map +1 -1
- package/es/template/activity/stars-summary.d.ts +9 -18
- package/es/template/activity/stars-summary.d.ts.map +1 -1
- package/es/template/activity/stars-summary.js +94 -122
- package/es/template/activity/stars-summary.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +20 -0
- package/es/template/back-office/brand-update/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.js +12 -3
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/brand-update/style.css +5 -1
- package/es/util/button-icons.d.ts +1 -0
- package/es/util/button-icons.d.ts.map +1 -1
- package/es/util/button-icons.js +3 -2
- package/es/util/button-icons.js.map +1 -1
- package/lib/atom/review-presentation/index.native.js +1 -1
- package/lib/atom/review-presentation/index.native.js.map +1 -1
- package/lib/atom/select/index.d.ts.map +1 -1
- package/lib/atom/select/index.js +46 -9
- package/lib/atom/select/index.js.map +1 -1
- package/lib/molecule/answer/index.d.ts.map +1 -1
- package/lib/molecule/answer/index.js +1 -10
- package/lib/molecule/answer/index.js.map +1 -1
- package/lib/molecule/empty-state-dashboard/index.d.ts +23 -0
- package/lib/molecule/empty-state-dashboard/index.d.ts.map +1 -0
- package/lib/molecule/empty-state-dashboard/index.js +42 -0
- package/lib/molecule/empty-state-dashboard/index.js.map +1 -0
- package/lib/molecule/empty-state-dashboard/style.css +55 -0
- package/lib/molecule/empty-state-dashboard/types.d.ts +19 -0
- package/lib/molecule/empty-state-dashboard/types.d.ts.map +1 -0
- package/lib/molecule/empty-state-dashboard/types.js +29 -0
- package/lib/molecule/empty-state-dashboard/types.js.map +1 -0
- package/lib/organism/list-item/index.d.ts +8 -6
- package/lib/organism/list-item/index.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +16 -2
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +18 -0
- package/lib/organism/list-items/index.d.ts +2 -0
- package/lib/organism/list-items/index.js +5 -1
- package/lib/organism/list-items/index.js.map +1 -1
- package/lib/organism/review-header/index.native.d.ts.map +1 -1
- package/lib/organism/review-header/index.native.js +8 -7
- package/lib/organism/review-header/index.native.js.map +1 -1
- package/lib/template/activity/index.d.ts +36 -40
- package/lib/template/activity/index.d.ts.map +1 -1
- package/lib/template/activity/index.js +95 -110
- package/lib/template/activity/index.js.map +1 -1
- package/lib/template/activity/stars-summary.d.ts +9 -18
- package/lib/template/activity/stars-summary.d.ts.map +1 -1
- package/lib/template/activity/stars-summary.js +90 -119
- package/lib/template/activity/stars-summary.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +20 -0
- package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.js +13 -3
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/brand-update/style.css +5 -1
- package/lib/util/button-icons.d.ts +1 -0
- package/lib/util/button-icons.d.ts.map +1 -1
- package/lib/util/button-icons.js +2 -1
- package/lib/util/button-icons.js.map +1 -1
- package/locales/bs/global.json +8 -1
- package/locales/cs/global.json +8 -1
- package/locales/de/global.json +8 -1
- package/locales/en/global.json +0 -1
- package/locales/es/global.json +8 -1
- package/locales/et/global.json +8 -1
- package/locales/fr/global.json +0 -1
- package/locales/hr/global.json +8 -1
- package/locales/hu/global.json +8 -1
- package/locales/hy/global.json +0 -1
- package/locales/it/global.json +8 -1
- package/locales/ja/global.json +8 -1
- package/locales/ko/global.json +8 -1
- package/locales/nl/global.json +8 -1
- package/locales/pl/global.json +8 -1
- package/locales/pt/global.json +8 -1
- package/locales/ro/global.json +8 -1
- package/locales/ru/global.json +0 -1
- package/locales/sk/global.json +8 -1
- package/locales/tl/global.json +8 -1
- package/locales/tr/global.json +8 -1
- package/locales/uk/global.json +8 -1
- package/locales/vi/global.json +8 -1
- package/locales/zh/global.json +8 -1
- package/locales/zh_TW/global.json +8 -1
- package/package.json +2 -2
- package/locales/.mtslconfig.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useState","useEffect","View","StyleSheet","Text","NovaLineSelectionCursorsCursorArrowTarget","TargetIcon","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionMarkIcon","NovaSolidStatusCheckCircle2","CheckCircle2Icon","NovaCompositionCoorpacademyVoteHeartOutline","HeartIcon","useTemplateContext","Touchable","Html","createStyleSheet","brandTheme","theme","create","container","backgroundColor","colors","white","justifyContent","flex","padding","paddingTop","paddingBottom","title","height","width","fontSize","xxlarge","fontWeight","bold","lineHeight","color","text","primary","marginBottom","large","opacity","tips","marginTop","tip","flexDirection","overflow","alignItems","borderRadius","gray","extra","spacing","micro","tipText","icon","margin","button","cta","buttonText","alignSelf","Tip","props","templateContext","styleSheet","setStylesheet","Icon","_stylesheet","Onboarding","translations","onPress","appReview","presentation","labelList","skills","questions","lifes","allright","ok"],"sources":["../../../src/atom/review-presentation/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect} from 'react';\nimport {View, StyleSheet, Text, ViewStyle, TextStyle} from 'react-native';\nimport {\n NovaLineSelectionCursorsCursorArrowTarget as TargetIcon,\n NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionMarkIcon,\n NovaSolidStatusCheckCircle2 as CheckCircle2Icon,\n NovaCompositionCoorpacademyVoteHeartOutline as HeartIcon\n} from '@coorpacademy/nova-icons';\n\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\nimport Touchable from '../../hoc/touchable/index.native';\nimport Html from '../html/index.native';\nimport {Brand} from '../../variables/brand.native';\nimport {OnboardingProps, TipProps} from './prop-types';\n\ntype StyleSheetType = {\n container: ViewStyle;\n title: TextStyle;\n text: TextStyle;\n tips: ViewStyle;\n tip: ViewStyle;\n tipText: TextStyle;\n icon: ViewStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n};\n\nconst createStyleSheet = (brandTheme: Brand, theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n backgroundColor: theme.colors.white,\n justifyContent: 'space-between',\n flex: 1,\n padding: 20,\n paddingTop: 20,\n paddingBottom: 100\n },\n title: {\n height: 72,\n width: 268,\n fontSize: theme.fontSize.xxlarge,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 36,\n color: theme.colors.text.primary,\n marginBottom: 32\n },\n text: {\n fontSize: theme.fontSize.large,\n color: theme.colors.text.primary,\n opacity: 0.7\n },\n tips: {\n marginTop: 32,\n height: 300,\n justifyContent: 'center'\n },\n tip: {\n flexDirection: 'row',\n overflow: 'hidden',\n alignItems: 'center',\n height: 54,\n borderRadius: 8,\n backgroundColor: theme.colors.gray.extra,\n marginTop: theme.spacing.micro,\n marginBottom: theme.spacing.micro\n },\n tipText: {\n fontSize: 16,\n lineHeight: 22,\n color: theme.colors.text.primary\n },\n icon: {\n margin: 10\n },\n button: {\n height: 52,\n borderRadius: 7,\n marginBottom: 32,\n marginTop: 16,\n backgroundColor: brandTheme?.colors?.primary || theme.colors.cta,\n justifyContent: 'center'\n },\n buttonText: {\n alignSelf: 'center',\n fontWeight: theme.fontWeight.bold,\n fontSize: theme.fontSize.large,\n color: '#fff'\n }\n });\n\nconst Tip = (props: TipProps) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {brandTheme, theme} = templateContext;\n const {Icon, text} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(brandTheme, theme);\n setStylesheet(_stylesheet);\n }, [brandTheme, theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.tip}>\n <Icon height={16} width={16} style={styleSheet.icon} color={theme.colors.text.primary} />\n <Text style={styleSheet.tipText}>{text}</Text>\n </View>\n );\n};\n\nconst Onboarding = (props: OnboardingProps) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {brandTheme, theme, translations} = templateContext;\n const {onPress} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(brandTheme, theme);\n setStylesheet(_stylesheet);\n }, [brandTheme, theme]);\n\n // ------------------------------------\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.container}>\n <Html style={styleSheet.title}>{translations.appReview.presentation.title}</Html>\n <Html style={styleSheet.text}>{translations.appReview.presentation.text}</Html>\n\n <View style={styleSheet.tips}>\n <Tip Icon={TargetIcon} text={translations.appReview.presentation.labelList.skills.text} />\n <Tip\n Icon={QuestionMarkIcon}\n text={translations.appReview.presentation.labelList.questions.text}\n />\n <Tip Icon={HeartIcon} text={translations.appReview.presentation.labelList.lifes.text} />\n <Tip\n Icon={CheckCircle2Icon}\n text={translations.appReview.presentation.labelList.allright.text}\n />\n </View>\n <Touchable\n testID=\"button-quit-revision-onboarding\"\n onPress={onPress}\n analyticsID=\"button-start\"\n style={styleSheet.button}\n >\n <Text style={styleSheet.buttonText}>{translations.ok}</Text>\n </Touchable>\n </View>\n );\n};\n\nexport default Onboarding;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,SAAzB,QAAyC,OAAzC;AACA,SAAQC,IAAR,EAAcC,UAAd,EAA0BC,IAA1B,QAA2D,cAA3D;AACA,SACEC,yCAAyC,IAAIC,UAD/C,EAEEC,+CAA+C,IAAIC,gBAFrD,EAGEC,2BAA2B,IAAIC,gBAHjC,EAIEC,2CAA2C,IAAIC,SAJjD,QAKO,0BALP;AAOA,SAAQC,kBAAR,QAAiC,4CAAjC;AAEA,OAAOC,SAAP,MAAsB,kCAAtB;AACA,OAAOC,IAAP,MAAiB,sBAAjB;;AAgBA,MAAMC,gBAAgB,GAAG,CAACC,UAAD,EAAoBC,KAApB,KACvBf,UAAU,CAACgB,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,eAAe,EAAEH,KAAK,CAACI,MAAN,CAAaC,KADrB;IAETC,cAAc,EAAE,eAFP;IAGTC,IAAI,EAAE,CAHG;IAITC,OAAO,EAAE,EAJA;IAKTC,UAAU,EAAE,EALH;IAMTC,aAAa,EAAE;EANN,CADK;EAShBC,KAAK,EAAE;IACLC,MAAM,EAAE,EADH;IAELC,KAAK,EAAE,GAFF;IAGLC,QAAQ,EAAEd,KAAK,CAACc,QAAN,CAAeC,OAHpB;IAILC,UAAU,EAAEhB,KAAK,CAACgB,UAAN,CAAiBC,IAJxB;IAKLC,UAAU,EAAE,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,CAA8CI,QAA9C,CAAuDvC;EAF/D,EAPF,CAJF,eAgBE,oBAAC,SAAD;IACE,MAAM,EAAC,iCADT;IAEE,OAAO,EAAEgC,OAFX;IAGE,WAAW,EAAC,cAHd;IAIE,KAAK,EAAEN,UAAU,CAACP;EAJpB,gBAME,oBAAC,IAAD;IAAM,KAAK,EAAEO,UAAU,CAACL;EAAxB,GAAqCU,YAAY,CAACS,EAAlD,CANF,CAhBF,CADF;AA2BD,CA5CD;;AA8CA,eAAeV,UAAf"}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useState","useEffect","View","StyleSheet","Text","NovaLineSelectionCursorsCursorArrowTarget","TargetIcon","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionMarkIcon","NovaSolidStatusCheckCircle2","CheckCircle2Icon","NovaCompositionCoorpacademyVoteHeartOutline","HeartIcon","useTemplateContext","Touchable","Html","createStyleSheet","brandTheme","theme","create","container","backgroundColor","colors","white","justifyContent","flex","padding","paddingTop","paddingBottom","title","height","width","fontSize","xxlarge","fontWeight","bold","lineHeight","color","text","primary","marginBottom","large","opacity","tips","marginTop","tip","flexDirection","overflow","alignItems","borderRadius","gray","extra","spacing","micro","tipText","icon","margin","button","cta","buttonText","alignSelf","Tip","props","templateContext","styleSheet","setStylesheet","Icon","_stylesheet","Onboarding","translations","onPress","appReview","presentation","labelList","skills","questions","lifes","allright","ok"],"sources":["../../../src/atom/review-presentation/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect} from 'react';\nimport {View, StyleSheet, Text, ViewStyle, TextStyle} from 'react-native';\nimport {\n NovaLineSelectionCursorsCursorArrowTarget as TargetIcon,\n NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionMarkIcon,\n NovaSolidStatusCheckCircle2 as CheckCircle2Icon,\n NovaCompositionCoorpacademyVoteHeartOutline as HeartIcon\n} from '@coorpacademy/nova-icons';\n\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\nimport Touchable from '../../hoc/touchable/index.native';\nimport Html from '../html/index.native';\nimport {Brand} from '../../variables/brand.native';\nimport {OnboardingProps, TipProps} from './prop-types';\n\ntype StyleSheetType = {\n container: ViewStyle;\n title: TextStyle;\n text: TextStyle;\n tips: ViewStyle;\n tip: ViewStyle;\n tipText: TextStyle;\n icon: ViewStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n};\n\nconst createStyleSheet = (brandTheme: Brand, theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n backgroundColor: theme.colors.white,\n justifyContent: 'space-between',\n flex: 1,\n padding: 20,\n paddingTop: 20,\n paddingBottom: 100\n },\n title: {\n height: 72,\n width: 268,\n fontSize: theme.fontSize.xxlarge,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 36,\n color: theme.colors.text.primary,\n marginBottom: 32\n },\n text: {\n fontSize: theme.fontSize.large,\n color: theme.colors.text.primary,\n opacity: 0.7\n },\n tips: {\n marginTop: 32,\n height: 230,\n justifyContent: 'center'\n },\n tip: {\n flexDirection: 'row',\n overflow: 'hidden',\n alignItems: 'center',\n height: 54,\n borderRadius: 8,\n backgroundColor: theme.colors.gray.extra,\n marginTop: theme.spacing.micro,\n marginBottom: theme.spacing.micro\n },\n tipText: {\n fontSize: 16,\n lineHeight: 22,\n color: theme.colors.text.primary\n },\n icon: {\n margin: 10\n },\n button: {\n height: 52,\n borderRadius: 7,\n marginBottom: 32,\n marginTop: 16,\n backgroundColor: brandTheme?.colors?.primary || theme.colors.cta,\n justifyContent: 'center'\n },\n buttonText: {\n alignSelf: 'center',\n fontWeight: theme.fontWeight.bold,\n fontSize: theme.fontSize.large,\n color: '#fff'\n }\n });\n\nconst Tip = (props: TipProps) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {brandTheme, theme} = templateContext;\n const {Icon, text} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(brandTheme, theme);\n setStylesheet(_stylesheet);\n }, [brandTheme, theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.tip}>\n <Icon height={16} width={16} style={styleSheet.icon} color={theme.colors.text.primary} />\n <Text style={styleSheet.tipText}>{text}</Text>\n </View>\n );\n};\n\nconst Onboarding = (props: OnboardingProps) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {brandTheme, theme, translations} = templateContext;\n const {onPress} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(brandTheme, theme);\n setStylesheet(_stylesheet);\n }, [brandTheme, theme]);\n\n // ------------------------------------\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.container}>\n <Html style={styleSheet.title}>{translations.appReview.presentation.title}</Html>\n <Html style={styleSheet.text}>{translations.appReview.presentation.text}</Html>\n\n <View style={styleSheet.tips}>\n <Tip Icon={TargetIcon} text={translations.appReview.presentation.labelList.skills.text} />\n <Tip\n Icon={QuestionMarkIcon}\n text={translations.appReview.presentation.labelList.questions.text}\n />\n <Tip Icon={HeartIcon} text={translations.appReview.presentation.labelList.lifes.text} />\n <Tip\n Icon={CheckCircle2Icon}\n text={translations.appReview.presentation.labelList.allright.text}\n />\n </View>\n <Touchable\n testID=\"button-quit-revision-onboarding\"\n onPress={onPress}\n analyticsID=\"button-start\"\n style={styleSheet.button}\n >\n <Text style={styleSheet.buttonText}>{translations.ok}</Text>\n </Touchable>\n </View>\n );\n};\n\nexport default Onboarding;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,SAAzB,QAAyC,OAAzC;AACA,SAAQC,IAAR,EAAcC,UAAd,EAA0BC,IAA1B,QAA2D,cAA3D;AACA,SACEC,yCAAyC,IAAIC,UAD/C,EAEEC,+CAA+C,IAAIC,gBAFrD,EAGEC,2BAA2B,IAAIC,gBAHjC,EAIEC,2CAA2C,IAAIC,SAJjD,QAKO,0BALP;AAOA,SAAQC,kBAAR,QAAiC,4CAAjC;AAEA,OA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IAAI,EAAErC,UAAX;IAAuB,IAAI,EAAE+D,YAAY,CAACE,SAAb,CAAuBC,YAAvB,CAAoCC,SAApC,CAA8CC,MAA9C,CAAqDpC;EAAlF,EADF,eAEE,oBAAC,GAAD;IACE,IAAI,EAAE9B,gBADR;IAEE,IAAI,EAAE6D,YAAY,CAACE,SAAb,CAAuBC,YAAvB,CAAoCC,SAApC,CAA8CE,SAA9C,CAAwDrC;EAFhE,EAFF,eAME,oBAAC,GAAD;IAAK,IAAI,EAAE1B,SAAX;IAAsB,IAAI,EAAEyD,YAAY,CAACE,SAAb,CAAuBC,YAAvB,CAAoCC,SAApC,CAA8CG,KAA9C,CAAoDtC;EAAhF,EANF,eAOE,oBAAC,GAAD;IACE,IAAI,EAAE5B,gBADR;IAEE,IAAI,EAAE2D,YAAY,CAACE,SAAb,CAAuBC,YAAvB,CAAoCC,SAApC,CAA8CI,QAA9C,CAAuDvC;EAF/D,EAPF,CAJF,eAgBE,oBAAC,SAAD;IACE,MAAM,EAAC,iCADT;IAEE,OAAO,EAAEgC,OAFX;IAGE,WAAW,EAAC,cAHd;IAIE,KAAK,EAAEN,UAAU,CAACP;EAJpB,gBAME,oBAAC,IAAD;IAAM,KAAK,EAAEO,UAAU,CAACL;EAAxB,GAAqCU,YAAY,CAACS,EAAlD,CANF,CAhBF,CADF;AA2BD,CA5CD;;AA8CA,eAAeV,UAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;AAwDA,qEA4KC"}
|
package/es/atom/select/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
|
-
import React, { useMemo } from 'react';
|
|
3
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import classnames from 'classnames';
|
|
6
6
|
import filter from 'lodash/fp/filter';
|
|
@@ -11,7 +11,7 @@ import includes from 'lodash/fp/includes';
|
|
|
11
11
|
import keys from 'lodash/fp/keys';
|
|
12
12
|
import map from 'lodash/fp/map';
|
|
13
13
|
import size from 'lodash/fp/size';
|
|
14
|
-
import { NovaCompositionNavigationArrowDown as ArrowDown } from '@coorpacademy/nova-icons';
|
|
14
|
+
import { NovaCompositionNavigationArrowDown as ArrowDown, NovaCompositionNavigationArrowTop as ArrowUp } from '@coorpacademy/nova-icons';
|
|
15
15
|
import Provider, { GetSkinFromContext } from '../provider';
|
|
16
16
|
import getClassState from '../../util/get-class-state';
|
|
17
17
|
import style from './style.css';
|
|
@@ -28,6 +28,30 @@ const themeStyle = {
|
|
|
28
28
|
coorpmanager: null
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
const ArrowView = ({
|
|
32
|
+
shouldRender,
|
|
33
|
+
isArrowUp,
|
|
34
|
+
ariaLabel,
|
|
35
|
+
arrowClass,
|
|
36
|
+
arrowColor
|
|
37
|
+
}) => {
|
|
38
|
+
const props = useMemo(() => _extends({}, ariaLabel & {
|
|
39
|
+
'aria-label': ariaLabel
|
|
40
|
+
}, arrowColor & {
|
|
41
|
+
color: arrowColor
|
|
42
|
+
}, {
|
|
43
|
+
className: arrowClass
|
|
44
|
+
}), [ariaLabel, arrowClass, arrowColor]);
|
|
45
|
+
|
|
46
|
+
if (shouldRender) {
|
|
47
|
+
return isArrowUp ? /*#__PURE__*/React.createElement(ArrowUp, _extends({}, props, {
|
|
48
|
+
"data-testid": "select-arrow-up-icon"
|
|
49
|
+
})) : /*#__PURE__*/React.createElement(ArrowDown, _extends({}, props, {
|
|
50
|
+
"data-testid": "select-arrow-down-icon"
|
|
51
|
+
}));
|
|
52
|
+
} else return null;
|
|
53
|
+
};
|
|
54
|
+
|
|
31
55
|
const Select = (props, legacyContext) => {
|
|
32
56
|
const {
|
|
33
57
|
name,
|
|
@@ -47,6 +71,9 @@ const Select = (props, legacyContext) => {
|
|
|
47
71
|
} = props;
|
|
48
72
|
const skin = GetSkinFromContext(legacyContext);
|
|
49
73
|
const title = useMemo(() => propTitle ? `${propTitle}${required ? '*' : ''}` : null, [propTitle, required]);
|
|
74
|
+
const [isArrowUp, setIsArrowUp] = useState(false);
|
|
75
|
+
const handleSelectOnFocus = useCallback(() => setIsArrowUp(true), []);
|
|
76
|
+
const handleSelectOnBlur = useCallback(() => setIsArrowUp(false), []);
|
|
50
77
|
const optionList = options && options.map((option, index) => {
|
|
51
78
|
return /*#__PURE__*/React.createElement("option", {
|
|
52
79
|
key: index,
|
|
@@ -72,20 +99,17 @@ const Select = (props, legacyContext) => {
|
|
|
72
99
|
selected: true
|
|
73
100
|
}, options)), [options, theme]);
|
|
74
101
|
const handleChange = useMemo(() => multiple ? e => {
|
|
102
|
+
setIsArrowUp(false);
|
|
75
103
|
onChange(map(get('value'), e.target.selectedOptions));
|
|
76
104
|
} : e => {
|
|
105
|
+
setIsArrowUp(false);
|
|
77
106
|
onChange(e.target.value);
|
|
78
107
|
}, [onChange, multiple]);
|
|
79
108
|
const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);
|
|
80
109
|
const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);
|
|
81
|
-
const
|
|
110
|
+
const isThemeOneOfQuestionTemplateOrPlayer = useMemo(() => includes(theme, ['question', 'template', 'player']), [theme]);
|
|
111
|
+
const shouldUseSkinFontColor = useMemo(() => !isSelectedInValidOption && selected && isThemeOneOfQuestionTemplateOrPlayer, [isSelectedInValidOption, selected, isThemeOneOfQuestionTemplateOrPlayer]);
|
|
82
112
|
const arrowColor = selected ? color : undefined;
|
|
83
|
-
const arrowView = !multiple ? /*#__PURE__*/React.createElement(ArrowDown, {
|
|
84
|
-
color: includes(theme, ['question', 'template', 'player']) ? arrowColor : black,
|
|
85
|
-
className: shouldUseSkinFontColor ? style.selectedArrow : style.arrow,
|
|
86
|
-
"aria-label": ariaLabel,
|
|
87
|
-
"data-testid": "select-arrow-down-icon"
|
|
88
|
-
}) : null;
|
|
89
113
|
const behaviorClassName = useMemo(() => getClassState(style.default, style.modified, style.error, modified, error), [error, modified]);
|
|
90
114
|
const composedClassName = useMemo(() => classnames(theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName, selected ? style.selected : style.unselected, className), [behaviorClassName, className, selected, theme]);
|
|
91
115
|
const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);
|
|
@@ -104,7 +128,13 @@ const Select = (props, legacyContext) => {
|
|
|
104
128
|
style: _extends({}, shouldUseSkinFontColor && {
|
|
105
129
|
color
|
|
106
130
|
})
|
|
107
|
-
}, selectedLabel),
|
|
131
|
+
}, selectedLabel), /*#__PURE__*/React.createElement(ArrowView, {
|
|
132
|
+
shouldRender: !multiple,
|
|
133
|
+
isArrowUp: isArrowUp,
|
|
134
|
+
ariaLabel: ariaLabel,
|
|
135
|
+
arrowClass: shouldUseSkinFontColor ? style.selectedArrow : style.arrow,
|
|
136
|
+
arrowColor: isThemeOneOfQuestionTemplateOrPlayer ? arrowColor : black
|
|
137
|
+
}), /*#__PURE__*/React.createElement("select", {
|
|
108
138
|
"data-name": "native-select",
|
|
109
139
|
className: style.selectBox,
|
|
110
140
|
title: selectedLabel,
|
|
@@ -112,7 +142,14 @@ const Select = (props, legacyContext) => {
|
|
|
112
142
|
onChange: handleChange,
|
|
113
143
|
value: selected,
|
|
114
144
|
multiple: multiple,
|
|
115
|
-
disabled: disabled
|
|
145
|
+
disabled: disabled,
|
|
146
|
+
onClick: handleSelectOnFocus,
|
|
147
|
+
onBlur: handleSelectOnBlur // onBlur does not handle completely an out of bounds click
|
|
148
|
+
// ex: select is Opened and a click is done outside, cancelling the select
|
|
149
|
+
// that doesn't count as a Blur, so an onMouseLeave is needed
|
|
150
|
+
,
|
|
151
|
+
onMouseLeave: handleSelectOnBlur,
|
|
152
|
+
"data-testid": "native-select"
|
|
116
153
|
}, optionList)), /*#__PURE__*/React.createElement("div", {
|
|
117
154
|
className: style.description
|
|
118
155
|
}, description));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","filter","find","get","getOr","includes","keys","map","size","NovaCompositionNavigationArrowDown","ArrowDown","Provider","GetSkinFromContext","getClassState","style","themeStyle","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","optionList","option","index","value","selectOption","titleView","selected","selectedLabel","isSelectedInValidOption","validOption","handleChange","e","target","selectedOptions","black","color","shouldUseSkinFontColor","arrowColor","undefined","arrowView","selectedArrow","arrow","behaviorClassName","default","composedClassName","unselected","labelSize","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","selectBox","SelectOptionPropTypes","string","isRequired","oneOfType","number","bool","contextTypes","childContextTypes","propTypes","func","oneOf","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: PropT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AAS,CAACmF,IAHe;EAInC7B,WAAW,EAAEtD,SAAS,CAACmF;AAJY,CAA9B;AAOPzD,MAAM,CAAC0D,YAAP,GAAsB;EACpBxC,IAAI,EAAEhC,QAAQ,CAACyE,iBAAT,CAA2BzC;AADb,CAAtB;AAIAlB,MAAM,CAAC4D,SAAP,2CAAmB;EACjB7C,KAAK,EAAEzC,SAAS,CAAC+E,MADA;EAEjBlD,IAAI,EAAE7B,SAAS,CAAC+E,MAFC;EAGjBhD,SAAS,EAAE/B,SAAS,CAAC+E,MAHJ;EAIjB/C,eAAe,EAAEhC,SAAS,CAAC+E,MAJV;EAKjB5C,QAAQ,EAAEnC,SAAS,CAACmF,IALH;EAMjBjD,QAAQ,EAAElC,SAAS,CAACmF,IANH;EAOjB9C,WAAW,EAAErC,SAAS,CAAC+E,MAPN;EAQjB3C,QAAQ,EAAEpC,SAAS,CAACmF,IARH;EASjBlD,QAAQ,EAAEjC,SAAS,CAACuF,IATH;EAUjBjD,KAAK,EAAEtC,SAAS,CAACwF,KAAV,CAAgBjF,IAAI,CAACS,UAAD,CAApB,CAVU;EAWjBc,OAAO,EAAE9B,SAAS,CAACyF,OAAV,CAAkBzF,SAAS,CAAC0F,KAAV,CAAgBZ,qBAAhB,CAAlB,CAXQ;EAYjBvC,QAAQ,EAAEvC,SAAS,CAACmF,IAZH;EAajB3C,KAAK,EAAExC,SAAS,CAACmF,IAbA;EAcjB,cAAcnF,SAAS,CAAC+E;AAdP,CAAnB;AAiBA,eAAerD,MAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","PropTypes","classnames","filter","find","get","getOr","includes","keys","map","size","NovaCompositionNavigationArrowDown","ArrowDown","NovaCompositionNavigationArrowTop","ArrowUp","Provider","GetSkinFromContext","getClassState","style","themeStyle","invalid","header","mooc","question","sort","thematiques","player","template","coorpmanager","ArrowView","shouldRender","isArrowUp","ariaLabel","arrowClass","arrowColor","props","color","className","Select","legacyContext","name","options","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","skin","setIsArrowUp","handleSelectOnFocus","handleSelectOnBlur","optionList","option","index","value","selectOption","titleView","selected","selectedLabel","isSelectedInValidOption","validOption","handleChange","e","target","selectedOptions","black","isThemeOneOfQuestionTemplateOrPlayer","shouldUseSkinFontColor","undefined","behaviorClassName","default","composedClassName","unselected","labelSize","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","selectedArrow","arrow","selectBox","SelectOptionPropTypes","string","isRequired","oneOfType","number","bool","contextTypes","childContextTypes","propTypes","func","oneOf","arrayOf","shape"],"sources":["../../../src/atom/select/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} 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 {\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaCompositionNavigationArrowTop as ArrowUp\n} 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 ArrowView = ({shouldRender, isArrowUp, ariaLabel, arrowClass, arrowColor}) => {\n const props = useMemo(\n () => ({\n ...(ariaLabel &\n {\n 'aria-label': ariaLabel\n }),\n ...(arrowColor &\n {\n color: arrowColor\n }),\n className: arrowClass\n }),\n [ariaLabel, arrowClass, arrowColor]\n );\n if (shouldRender) {\n return isArrowUp ? (\n <ArrowUp {...props} data-testid=\"select-arrow-up-icon\" />\n ) : (\n <ArrowDown {...props} data-testid=\"select-arrow-down-icon\" />\n );\n } else return 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 [isArrowUp, setIsArrowUp] = useState(false);\n\n const handleSelectOnFocus = useCallback(() => setIsArrowUp(true), []);\n const handleSelectOnBlur = useCallback(() => setIsArrowUp(false), []);\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 setIsArrowUp(false);\n onChange(map(get('value'), e.target.selectedOptions));\n }\n : e => {\n setIsArrowUp(false);\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 isThemeOneOfQuestionTemplateOrPlayer = useMemo(\n () => includes(theme, ['question', 'template', 'player']),\n [theme]\n );\n const shouldUseSkinFontColor = useMemo(\n () => !isSelectedInValidOption && selected && isThemeOneOfQuestionTemplateOrPlayer,\n [isSelectedInValidOption, selected, isThemeOneOfQuestionTemplateOrPlayer]\n );\n const arrowColor = selected ? color : undefined;\n\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 shouldRender={!multiple}\n isArrowUp={isArrowUp}\n ariaLabel={ariaLabel}\n arrowClass={shouldUseSkinFontColor ? style.selectedArrow : style.arrow}\n arrowColor={isThemeOneOfQuestionTemplateOrPlayer ? arrowColor : black}\n />\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 onClick={handleSelectOnFocus}\n onBlur={handleSelectOnBlur}\n // onBlur does not handle completely an out of bounds click\n // ex: select is Opened and a click is done outside, cancelling the select\n // that doesn't count as a Blur, so an onMouseLeave is needed\n onMouseLeave={handleSelectOnBlur}\n data-testid=\"native-select\"\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,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,OAA5B,EAAqCC,QAArC,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,QAAP,MAAqB,oBAArB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,SACEC,kCAAkC,IAAIC,SADxC,EAEEC,iCAAiC,IAAIC,OAFvC,QAGO,0BAHP;AAIA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,aAA3C;AACA,OAAOC,aAAP,MAA0B,4BAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,UAAU,GAAG;EACjBhB,MAAM,EAAEe,KAAK,CAACf,MADG;EAEjBiB,OAAO,EAAEF,KAAK,CAACE,OAFE;EAGjBC,MAAM,EAAEH,KAAK,CAACG,MAHG;EAIjBC,IAAI,EAAEJ,KAAK,CAACI,IAJK;EAKjBC,QAAQ,EAAEL,KAAK,CAACK,QAL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
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/answer/index.js"],"names":[],"mappings":";AAuEA,iDASC"}
|
|
@@ -14,7 +14,6 @@ import Qcm from '../questions/qcm';
|
|
|
14
14
|
import QcmGraphic from '../questions/qcm-graphic';
|
|
15
15
|
import QuestionRange from '../questions/question-range';
|
|
16
16
|
import Template from '../questions/template';
|
|
17
|
-
import Provider from '../../atom/provider';
|
|
18
17
|
import Audio from '../audio';
|
|
19
18
|
import style from './style.css';
|
|
20
19
|
import propTypes, { MediaViewPropTypes, TYPE_AUDIO, TYPE_IMAGE, TYPE_VIDEO } from './prop-types';
|
|
@@ -64,8 +63,6 @@ MediaView.propTypes = process.env.NODE_ENV !== "production" ? MediaViewPropTypes
|
|
|
64
63
|
const Switch = ({
|
|
65
64
|
model,
|
|
66
65
|
help
|
|
67
|
-
}, {
|
|
68
|
-
translate
|
|
69
66
|
}) => {
|
|
70
67
|
const {
|
|
71
68
|
type
|
|
@@ -87,9 +84,7 @@ const Switch = ({
|
|
|
87
84
|
return /*#__PURE__*/React.createElement(FreeText, model);
|
|
88
85
|
|
|
89
86
|
case 'dropDown':
|
|
90
|
-
return /*#__PURE__*/React.createElement(DropDown,
|
|
91
|
-
"aria-label": translate('drop_down_icon')
|
|
92
|
-
}));
|
|
87
|
+
return /*#__PURE__*/React.createElement(DropDown, model);
|
|
93
88
|
|
|
94
89
|
case 'slider':
|
|
95
90
|
return /*#__PURE__*/React.createElement(QuestionRange, model);
|
|
@@ -103,9 +98,6 @@ Switch.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
103
98
|
model: propTypes.model,
|
|
104
99
|
help: propTypes.help
|
|
105
100
|
} : {};
|
|
106
|
-
Switch.contextTypes = {
|
|
107
|
-
translate: Provider.childContextTypes.translate
|
|
108
|
-
};
|
|
109
101
|
|
|
110
102
|
const Answer = props => {
|
|
111
103
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","VideoPlayer","DropDown","FreeText","QcmDrag","Qcm","QcmGraphic","QuestionRange","Template","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","VideoPlayer","DropDown","FreeText","QcmDrag","Qcm","QcmGraphic","QuestionRange","Template","Audio","style","propTypes","MediaViewPropTypes","TYPE_AUDIO","TYPE_IMAGE","TYPE_VIDEO","MediaView","media","videoId","type","childProps","backgroundImage","url","video","audio","Switch","model","help","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 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}) => {\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} />;\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\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,OAAOA,KAAP,MAAkB,OAAlB;AAEA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,OAAP,MAAoB,uBAApB;AACA,OAAOC,GAAP,MAAgB,kBAAhB;AACA,OAAOC,UAAP,MAAuB,0BAAvB;AACA,OAAOC,aAAP,MAA0B,6BAA1B;AACA,OAAOC,QAAP,MAAqB,uBAArB;AACA,OAAOC,KAAP,MAAkB,UAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,IAAmBC,kBAAnB,EAAuCC,UAAvC,EAAmDC,UAAnD,EAA+DC,UAA/D,QAAgF,cAAhF;;AAEA,MAAMC,SAAS,GAAG,CAAC;EAACC;AAAD,CAAD,KAAa;EAC7B,MAAM;IAACC,OAAD;IAAUC;EAAV,IAAiCF,KAAvC;EAAA,MAAyBG,UAAzB,iCAAuCH,KAAvC;;EACA,QAAQE,IAAR;IACE,KAAKL,UAAL;MACE,oBACE;QACE,SAAS,EAAEJ,KAAK,CAACO,KADnB;QAEE,KAAK,EAAE;UACLI,eAAe,EAAG,OAAMJ,KAAK,CAACK,GAAI;QAD7B;MAFT,EADF;;IAQF,KAAKP,UAAL;MACE,oBACE;QAAK,SAAS,EAAEL,KAAK,CAACa;MAAtB,gBACE,oBAAC,WAAD,eAAiB,MAAK,IAAL,EAAWH,UAAX,CAAjB;QAAyC,EAAE,EAAEF,OAA7C;QAAsD,MAAM,EAAC,MAA7D;QAAoE,KAAK,E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AK,gBAAG,oBAAC,SAAD;IAAW,KAAK,EAAEA;EAAlB,EAAH,GAAiC,IADzC,eAEE,oBAAC,MAAD;IAAQ,KAAK,EAAES,KAAf;IAAsB,IAAI,EAAEC;EAA5B,EAFF,CADF;AAMD,CATD;;AAWAC,MAAM,CAACjB,SAAP,2CAAmBA,SAAnB;AAEA,eAAeiB,MAAf"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Props } from './types';
|
|
3
|
+
declare const EmptyStateDashboard: {
|
|
4
|
+
({ mainText, subText, imageUrl, buttonLink }: Props): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
mainText: import("prop-types").Requireable<string>;
|
|
7
|
+
subText: import("prop-types").Requireable<string>;
|
|
8
|
+
imageUrl: import("prop-types").Requireable<any>;
|
|
9
|
+
buttonLink: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
10
|
+
type: import("prop-types").Requireable<string>;
|
|
11
|
+
label: import("prop-types").Requireable<string>;
|
|
12
|
+
ariaLabel: import("prop-types").Requireable<string>;
|
|
13
|
+
dataName: import("prop-types").Requireable<string>;
|
|
14
|
+
icon: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
15
|
+
position: import("prop-types").Requireable<string>;
|
|
16
|
+
type: import("prop-types").Requireable<string>;
|
|
17
|
+
}>>;
|
|
18
|
+
onClick: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
19
|
+
}>>;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default EmptyStateDashboard;
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/empty-state-dashboard/index.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAC,KAAK,EAAY,MAAM,SAAS,CAAC;AAEzC,QAAA,MAAM,mBAAmB;kDAA+C,KAAK;;;;;;;;;;;;;;;;;CAW5E,CAAC;AAIF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import ButtonLink from '../../atom/button-link';
|
|
5
|
+
import style from './style.css';
|
|
6
|
+
import { propTypes } from './types';
|
|
7
|
+
|
|
8
|
+
const EmptyStateDashboard = ({
|
|
9
|
+
mainText,
|
|
10
|
+
subText,
|
|
11
|
+
imageUrl,
|
|
12
|
+
buttonLink
|
|
13
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: style.container
|
|
15
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("img", {
|
|
16
|
+
className: style.img,
|
|
17
|
+
src: imageUrl,
|
|
18
|
+
"aria-hidden": "true"
|
|
19
|
+
})), /*#__PURE__*/React.createElement("p", {
|
|
20
|
+
className: style.mainText
|
|
21
|
+
}, mainText), /*#__PURE__*/React.createElement("p", {
|
|
22
|
+
className: style.subText
|
|
23
|
+
}, subText), /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
className: style.buttonContainer
|
|
25
|
+
}, /*#__PURE__*/React.createElement(ButtonLink, _extends({}, buttonLink, {
|
|
26
|
+
className: style.button
|
|
27
|
+
}))));
|
|
28
|
+
|
|
29
|
+
EmptyStateDashboard.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
30
|
+
export default EmptyStateDashboard;
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","ButtonLink","style","propTypes","EmptyStateDashboard","mainText","subText","imageUrl","buttonLink","container","img","buttonContainer","button"],"sources":["../../../src/molecule/empty-state-dashboard/index.tsx"],"sourcesContent":["import React from 'react';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\nimport {Props, propTypes} from './types';\n\nconst EmptyStateDashboard = ({mainText, subText, imageUrl, buttonLink}: Props) => (\n <div className={style.container}>\n <div>\n <img className={style.img} src={imageUrl} aria-hidden=\"true\" />\n </div>\n <p className={style.mainText}>{mainText}</p>\n <p className={style.subText}>{subText}</p>\n <div className={style.buttonContainer}>\n <ButtonLink {...buttonLink} className={style.button} />\n </div>\n </div>\n);\n\nEmptyStateDashboard.propTypes = propTypes;\n\nexport default EmptyStateDashboard;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,SAAeC,SAAf,QAA+B,SAA/B;;AAEA,MAAMC,mBAAmB,GAAG,CAAC;EAACC,QAAD;EAAWC,OAAX;EAAoBC,QAApB;EAA8BC;AAA9B,CAAD,kBAC1B;EAAK,SAAS,EAAEN,KAAK,CAACO;AAAtB,gBACE,8CACE;EAAK,SAAS,EAAEP,KAAK,CAACQ,GAAtB;EAA2B,GAAG,EAAEH,QAAhC;EAA0C,eAAY;AAAtD,EADF,CADF,eAIE;EAAG,SAAS,EAAEL,KAAK,CAACG;AAApB,GAA+BA,QAA/B,CAJF,eAKE;EAAG,SAAS,EAAEH,KAAK,CAACI;AAApB,GAA8BA,OAA9B,CALF,eAME;EAAK,SAAS,EAAEJ,KAAK,CAACS;AAAtB,gBACE,oBAAC,UAAD,eAAgBH,UAAhB;EAA4B,SAAS,EAAEN,KAAK,CAACU;AAA7C,GADF,CANF,CADF;;AAaAR,mBAAmB,CAACD,SAApB,2CAAgCA,SAAhC;AAEA,eAAeC,mBAAf"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value cm_grey_500: from colors;
|
|
3
|
+
@value cm_grey_800: from colors;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
.container {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
height: 100%;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
text-align: center;
|
|
13
|
+
width: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.img {
|
|
17
|
+
height: 170px;
|
|
18
|
+
width: 220px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.text {
|
|
22
|
+
font-family: 'Gilroy';
|
|
23
|
+
margin: 0 auto 0 auto;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mainText {
|
|
27
|
+
composes: text;
|
|
28
|
+
color: cm_grey_800;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
font-size: 24px;
|
|
31
|
+
line-height: 32px;
|
|
32
|
+
padding-top: 36px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.subText {
|
|
36
|
+
composes: text;
|
|
37
|
+
color: cm_grey_500;
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
font-size: 16px;
|
|
40
|
+
line-height: 24px;
|
|
41
|
+
padding-top: 4px;
|
|
42
|
+
;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.buttonContainer {
|
|
46
|
+
display: flex;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
padding-top: 32px;
|
|
49
|
+
width: 100%;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.button {
|
|
53
|
+
width: 152px;
|
|
54
|
+
height: 44px;
|
|
55
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export declare const propTypes: {
|
|
3
|
+
mainText: PropTypes.Requireable<string>;
|
|
4
|
+
subText: PropTypes.Requireable<string>;
|
|
5
|
+
imageUrl: PropTypes.Requireable<any>;
|
|
6
|
+
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
7
|
+
type: PropTypes.Requireable<string>;
|
|
8
|
+
label: PropTypes.Requireable<string>;
|
|
9
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
10
|
+
dataName: PropTypes.Requireable<string>;
|
|
11
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
12
|
+
position: PropTypes.Requireable<string>;
|
|
13
|
+
type: PropTypes.Requireable<string>;
|
|
14
|
+
}>>;
|
|
15
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
16
|
+
}>>;
|
|
17
|
+
};
|
|
18
|
+
export declare type Props = PropTypes.InferProps<typeof propTypes>;
|
|
19
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/empty-state-dashboard/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;CAerB,CAAC;AAEF,oBAAY,KAAK,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import Picture from '../../atom/picture';
|
|
3
|
+
export const propTypes = {
|
|
4
|
+
mainText: PropTypes.string,
|
|
5
|
+
subText: PropTypes.string,
|
|
6
|
+
imageUrl: Picture.propTypes.src,
|
|
7
|
+
buttonLink: PropTypes.shape({
|
|
8
|
+
type: PropTypes.string,
|
|
9
|
+
label: PropTypes.string,
|
|
10
|
+
ariaLabel: PropTypes.string,
|
|
11
|
+
dataName: PropTypes.string,
|
|
12
|
+
icon: PropTypes.shape({
|
|
13
|
+
position: PropTypes.string,
|
|
14
|
+
type: PropTypes.string
|
|
15
|
+
}),
|
|
16
|
+
onClick: PropTypes.func
|
|
17
|
+
})
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":["PropTypes","Picture","propTypes","mainText","string","subText","imageUrl","src","buttonLink","shape","type","label","ariaLabel","dataName","icon","position","onClick","func"],"sources":["../../../src/molecule/empty-state-dashboard/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport Picture from '../../atom/picture';\n\nexport const propTypes = {\n mainText: PropTypes.string,\n subText: PropTypes.string,\n imageUrl: Picture.propTypes.src,\n buttonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n })\n};\n\nexport type Props = PropTypes.InferProps<typeof propTypes>;\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,OAAP,MAAoB,oBAApB;AAEA,OAAO,MAAMC,SAAS,GAAG;EACvBC,QAAQ,EAAEH,SAAS,CAACI,MADG;EAEvBC,OAAO,EAAEL,SAAS,CAACI,MAFI;EAGvBE,QAAQ,EAAEL,OAAO,CAACC,SAAR,CAAkBK,GAHL;EAIvBC,UAAU,EAAER,SAAS,CAACS,KAAV,CAAgB;IAC1BC,IAAI,EAAEV,SAAS,CAACI,MADU;IAE1BO,KAAK,EAAEX,SAAS,CAACI,MAFS;IAG1BQ,SAAS,EAAEZ,SAAS,CAACI,MAHK;IAI1BS,QAAQ,EAAEb,SAAS,CAACI,MAJM;IAK1BU,IAAI,EAAEd,SAAS,CAACS,KAAV,CAAgB;MACpBM,QAAQ,EAAEf,SAAS,CAACI,MADA;MAEpBM,IAAI,EAAEV,SAAS,CAACI;IAFI,CAAhB,CALoB;IAS1BY,OAAO,EAAEhB,SAAS,CAACiB;EATO,CAAhB;AAJW,CAAlB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export default ListItem;
|
|
2
2
|
declare function ListItem(props: any): JSX.Element;
|
|
3
3
|
declare namespace ListItem {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const propTypes: {
|
|
5
|
+
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
6
|
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
7
7
|
menuAriaLabel: PropTypes.Requireable<string>;
|
|
8
8
|
buttons: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -13,7 +13,7 @@ declare namespace ListItem {
|
|
|
13
13
|
}> | null | undefined)[]>;
|
|
14
14
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
15
|
}>>;
|
|
16
|
-
|
|
16
|
+
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
17
17
|
type: PropTypes.Requireable<string>;
|
|
18
18
|
label: PropTypes.Requireable<string>;
|
|
19
19
|
ariaLabel: PropTypes.Requireable<string>;
|
|
@@ -24,12 +24,14 @@ declare namespace ListItem {
|
|
|
24
24
|
}>>;
|
|
25
25
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
26
26
|
}>>;
|
|
27
|
-
|
|
27
|
+
tags: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
28
28
|
label: PropTypes.Requireable<string>;
|
|
29
29
|
type: PropTypes.Requireable<string>;
|
|
30
30
|
}> | null | undefined)[]>;
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
title: PropTypes.Validator<string>;
|
|
32
|
+
order: PropTypes.Requireable<number>;
|
|
33
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
34
|
+
};
|
|
33
35
|
}
|
|
34
36
|
import PropTypes from "prop-types";
|
|
35
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";AAQA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";AAQA,mDAqCC"}
|
|
@@ -7,16 +7,20 @@ import BulletPointMenuButton from '../../molecule/bullet-point-menu-button';
|
|
|
7
7
|
import style from './style.css';
|
|
8
8
|
|
|
9
9
|
const ListItem = props => {
|
|
10
|
+
let isPublished = false;
|
|
10
11
|
const {
|
|
11
12
|
bulletPointMenuButton,
|
|
12
13
|
buttonLink,
|
|
13
14
|
tags,
|
|
14
|
-
title
|
|
15
|
+
title,
|
|
16
|
+
order,
|
|
17
|
+
'aria-label': ariaLabel
|
|
15
18
|
} = props;
|
|
16
19
|
|
|
17
20
|
const tagsView = _map.convert({
|
|
18
21
|
cap: false
|
|
19
22
|
})((tag, index) => {
|
|
23
|
+
isPublished = tag.type === 'published';
|
|
20
24
|
return /*#__PURE__*/React.createElement("div", {
|
|
21
25
|
key: index,
|
|
22
26
|
className: style.tag
|
|
@@ -25,7 +29,15 @@ const ListItem = props => {
|
|
|
25
29
|
|
|
26
30
|
return /*#__PURE__*/React.createElement("div", {
|
|
27
31
|
className: style.wrapper
|
|
32
|
+
}, isPublished ? /*#__PURE__*/React.createElement("div", {
|
|
33
|
+
className: style.orderWrapper
|
|
28
34
|
}, /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: style.order,
|
|
36
|
+
"aria-label": ariaLabel
|
|
37
|
+
}, order + 1), /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: style.title,
|
|
39
|
+
title: title
|
|
40
|
+
}, title)) : /*#__PURE__*/React.createElement("div", {
|
|
29
41
|
className: style.title,
|
|
30
42
|
title: title
|
|
31
43
|
}, title), /*#__PURE__*/React.createElement("div", {
|
|
@@ -62,7 +74,9 @@ ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
62
74
|
label: PropTypes.string,
|
|
63
75
|
type: PropTypes.oneOf(['published', 'draft', 'archived', 'revised', 'default'])
|
|
64
76
|
})),
|
|
65
|
-
title: PropTypes.string.isRequired
|
|
77
|
+
title: PropTypes.string.isRequired,
|
|
78
|
+
order: PropTypes.number,
|
|
79
|
+
'aria-label': PropTypes.string
|
|
66
80
|
} : {};
|
|
67
81
|
export default ListItem;
|
|
68
82
|
//# sourceMappingURL=index.js.map
|