@coorpacademy/components 11.13.4 → 11.13.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/button-link/index.js +1 -1
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link/style.css +0 -9
- package/es/atom/button-link/types.d.ts +1 -1
- package/es/atom/button-link/types.d.ts.map +1 -1
- package/es/atom/button-link/types.js.map +1 -1
- package/es/atom/choice/index.native.d.ts.map +1 -1
- package/es/atom/choice/index.native.js +2 -1
- package/es/atom/choice/index.native.js.map +1 -1
- package/es/molecule/questions/qcm-graphic/style.css +2 -1
- package/es/molecule/review-correction-popin/index.native.d.ts.map +1 -1
- package/es/molecule/review-correction-popin/index.native.js +2 -1
- package/es/molecule/review-correction-popin/index.native.js.map +1 -1
- package/es/organism/list-items/index.d.ts +20 -1
- package/es/organism/list-items/index.d.ts.map +1 -1
- package/es/organism/list-items/index.js +8 -1
- package/es/organism/list-items/index.js.map +1 -1
- package/es/organism/list-items/style.css +10 -0
- package/es/organism/review-slide/index.native.d.ts.map +1 -1
- package/es/organism/review-slide/index.native.js +25 -9
- package/es/organism/review-slide/index.native.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +18 -0
- package/lib/atom/button-link/index.js +1 -1
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link/style.css +0 -9
- package/lib/atom/button-link/types.d.ts +1 -1
- package/lib/atom/button-link/types.d.ts.map +1 -1
- package/lib/atom/button-link/types.js.map +1 -1
- package/lib/atom/choice/index.native.d.ts.map +1 -1
- package/lib/atom/choice/index.native.js +2 -1
- package/lib/atom/choice/index.native.js.map +1 -1
- package/lib/molecule/questions/qcm-graphic/style.css +2 -1
- package/lib/molecule/review-correction-popin/index.native.d.ts.map +1 -1
- package/lib/molecule/review-correction-popin/index.native.js +2 -1
- package/lib/molecule/review-correction-popin/index.native.js.map +1 -1
- package/lib/organism/list-items/index.d.ts +20 -1
- package/lib/organism/list-items/index.d.ts.map +1 -1
- package/lib/organism/list-items/index.js +9 -1
- package/lib/organism/list-items/index.js.map +1 -1
- package/lib/organism/list-items/style.css +10 -0
- package/lib/organism/review-slide/index.native.d.ts.map +1 -1
- package/lib/organism/review-slide/index.native.js +25 -9
- package/lib/organism/review-slide/index.native.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +18 -0
- package/package.json +3 -3
|
@@ -56,7 +56,7 @@ const ButtonLink = props => {
|
|
|
56
56
|
useTitle = true
|
|
57
57
|
} = props;
|
|
58
58
|
const contentView = getButtonContent(icon, label);
|
|
59
|
-
const styleButton = classnames(
|
|
59
|
+
const styleButton = classnames(className, style.button, type === 'primary' && style.primary, type === 'secondary' && style.secondary, type === 'tertiary' && style.tertiary, type === 'text' && style.text, type === 'dangerous' && style.dangerous, link && style.link, disabled && style.disabled);
|
|
60
60
|
const handleOnClick = useCallback(() => onClick(), [onClick]);
|
|
61
61
|
const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);
|
|
62
62
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","classnames","Link","ICONS","propTypes","style","getButtonContent","icon","label","type","position","Icon","buttonContent","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","contentView","styleButton","button","primary","secondary","tertiary","text","dangerous","handleOnClick","handleOnKeyDown","event","title"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback} from 'react';\nimport {noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport {ICONS} from '../../util/button-icons';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst getButtonContent = (icon?: IconType, label?: string) => {\n const {type, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n\n if (!Icon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? <Icon className={style.icon} /> : null}\n <span className={style.label}>{label}</span>\n {position === 'right' ? <Icon className={style.icon} /> : null}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n label,\n disabled,\n icon,\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","classnames","Link","ICONS","propTypes","style","getButtonContent","icon","label","type","position","Icon","buttonContent","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","contentView","styleButton","button","primary","secondary","tertiary","text","dangerous","handleOnClick","handleOnKeyDown","event","title"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback} from 'react';\nimport {noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport {ICONS} from '../../util/button-icons';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst getButtonContent = (icon?: IconType, label?: string) => {\n const {type, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n\n if (!Icon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? <Icon className={style.icon} /> : null}\n <span className={style.label}>{label}</span>\n {position === 'right' ? <Icon className={style.icon} /> : null}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n label,\n disabled,\n icon,\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n type=\"button\"\n aria-label={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={customStyle}\n className={styleButton}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n tabIndex={0}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,SAAQC,KAAR,QAAoB,yBAApB;AACA,OAAOC,SAAP,MAAmD,SAAnD,C,CACA;;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,gBAAgB,GAAG,CAACC,IAAD,EAAkBC,KAAlB,KAAqC;EAC5D,MAAM;IAACC,IAAD;IAAOC;EAAP,IAAmBH,IAAI,IAAI;IAACE,IAAI,EAAE,EAAP;IAAWC,QAAQ,EAAE;EAArB,CAAjC;EACA,MAAMC,IAAI,GAAGF,IAAI,IAAIN,KAAK,CAACM,IAAD,CAA1B;;EAEA,IAAI,CAACE,IAAL,EAAW;IACT,oBACE;MAAK,SAAS,EAAEN,KAAK,CAACO;IAAtB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AC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;KAClD,CAAC;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,oBAAY,OAAO,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC;AAE/C,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["PropTypes","ICONS","propTypes","type","oneOf","label","string","icon","shape","position","onClick","func","link","href","download","bool","target","disabled","className","customStyle"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({})\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type: keyof typeof ICONS;\n};\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n label?: string;\n 'aria-label'?: string;\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: IconType;\n onClick?: () => void;\n onKeyDown?: () => void;\n link?: {\n href?: string;\n download?: boolean;\n target?: '_self' | '_blank' | '_parent' | '_top';\n };\n disabled?: boolean;\n className?: string;\n customStyle?: Record<string,
|
|
1
|
+
{"version":3,"file":"types.js","names":["PropTypes","ICONS","propTypes","type","oneOf","label","string","icon","shape","position","onClick","func","link","href","download","bool","target","disabled","className","customStyle"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({})\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type: keyof typeof ICONS;\n};\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n label?: string;\n 'aria-label'?: string;\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: IconType;\n onClick?: () => void;\n onKeyDown?: () => void;\n link?: {\n href?: string;\n download?: boolean;\n target?: '_self' | '_blank' | '_parent' | '_top';\n };\n disabled?: boolean;\n className?: string;\n customStyle?: Record<string, unknown>;\n useTitle?: boolean;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAEA,SAAQC,KAAR,QAAoB,yBAApB;AAEA,MAAMC,SAAS,GAAG;EAChBC,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,CAAC,SAAD,EAAY,WAAZ,EAAyB,UAAzB,EAAqC,MAArC,EAA6C,WAA7C,CAAhB,CADU;EAEhBC,KAAK,EAAEL,SAAS,CAACM,MAFD;EAGhB,cAAcN,SAAS,CAACM,MAHR;EAIhB,aAAaN,SAAS,CAACM,MAJP;EAKhB,eAAeN,SAAS,CAACM,MALT;EAMhBC,IAAI,EAAEP,SAAS,CAACQ,KAAV,CAAgB;IACpBC,QAAQ,EAAET,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CADU;IAEpBD,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,MAAKH,KAAL,CAAhB;EAFc,CAAhB,CANU;EAUhBS,OAAO,EAAEV,SAAS,CAACW,IAVH;EAWhBC,IAAI,EAAEZ,SAAS,CAACQ,KAAV,CAAgB;IACpBK,IAAI,EAAEb,SAAS,CAACM,MADI;IAEpBQ,QAAQ,EAAEd,SAAS,CAACe,IAFA;IAGpBC,MAAM,EAAEhB,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;EAHY,CAAhB,CAXU;EAgBhBa,QAAQ,EAAEjB,SAAS,CAACe,IAhBJ;EAiBhBG,SAAS,EAAElB,SAAS,CAACM,MAjBL;EAkBhBa,WAAW,EAAEnB,SAAS,CAACQ,KAAV,CAAgB,EAAhB;AAlBG,CAAlB;AA+CA,eAAeN,SAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/choice/index.native.tsx"],"names":[],"mappings":";AACA,OAAO,EAAmB,SAAS,EAAY,MAAM,cAAc,CAAC;AAIpE,OAAO,KAAK,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,gCAAgC,CAAC;AAMxE,oBAAY,KAAK,GAAG;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAqEF,QAAA,MAAM,MAAM,8GAUT,KAAK,
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/choice/index.native.tsx"],"names":[],"mappings":";AACA,OAAO,EAAmB,SAAS,EAAY,MAAM,cAAc,CAAC;AAIpE,OAAO,KAAK,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,gCAAgC,CAAC;AAMxE,oBAAY,KAAK,GAAG;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAqEF,QAAA,MAAM,MAAM,8GAUT,KAAK,uBAuFP,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -143,7 +143,8 @@ const Choice = ({
|
|
|
143
143
|
})) : null, children ? /*#__PURE__*/React.createElement(View, {
|
|
144
144
|
style: textWrapperStyle
|
|
145
145
|
}, /*#__PURE__*/React.createElement(Html, {
|
|
146
|
-
style: textStyle
|
|
146
|
+
style: textStyle,
|
|
147
|
+
isTextCentered: true
|
|
147
148
|
}, children)) : null));
|
|
148
149
|
};
|
|
149
150
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","View","StyleSheet","Html","ImageBackground","getCleanUri","Touchable","useTemplateContext","createStyleSheet","theme","squeezed","create","boxShadow","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","backgroundColor","container","colors","white","borderRadius","radius","regular","flexDirection","alignItems","minHeight","textContainer","paddingHorizontal","paddingVertical","justifyContent","flex","squeezedTextContainer","padding","spacing","small","paddingLeft","undefined","paddingRight","text","fontSize","medium","fontWeight","bold","color","black","textAlign","textSelected","unselectedImageContainer","borderRightColor","border","imageContainer","overflow","borderTopLeftRadius","borderBottomLeftRadius","image","Choice","children","isSelected","isDisabled","onPress","media","testID","prefixTestID","style","questionType","templateContext","brandTheme","styleSheet","setStylesheet","_stylesheet","selectedSuffix","mediaType","type","toLowerCase","url","src","length","source","uri","mediaSuffix","textStyle","textWrapperStyle","push","selectionStyle","primary","borderColor","borderTopRightRadius","borderBottomRightRadius"],"sources":["../../../src/atom/choice/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {View, StyleSheet, ViewStyle, TextStyle} from 'react-native';\n\nimport Html from '../html/index.native';\nimport ImageBackground from '../image-background/index.native';\nimport type {Media, QuestionType} from '../../molecule/questions/types';\nimport getCleanUri from '../../util/get-clean-uri';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\n\nexport type Props = {\n isSelected?: boolean;\n onPress: () => void;\n children?: string;\n isDisabled?: boolean;\n testID?: string;\n media?: Media;\n squeezed?: boolean;\n style?: ViewStyle;\n questionType: QuestionType;\n};\n\ntype StyleSheetType = {\n boxShadow: ViewStyle;\n container: ViewStyle;\n text: TextStyle;\n textSelected: TextStyle;\n textContainer: ViewStyle;\n squeezedTextContainer: ViewStyle;\n unselectedImageContainer: ViewStyle;\n imageContainer: ViewStyle;\n image: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme, squeezed: boolean): StyleSheetType =>\n StyleSheet.create({\n boxShadow: {\n shadowColor: '#000',\n shadowOffset: {width: 0, height: 4},\n shadowOpacity: 0.12,\n shadowRadius: 8,\n elevation: 8,\n backgroundColor: '#0000'\n },\n container: {\n backgroundColor: theme.colors.white,\n borderRadius: theme.radius.regular,\n flexDirection: 'row',\n alignItems: 'stretch',\n minHeight: 60\n },\n textContainer: {\n paddingHorizontal: 24,\n paddingVertical: 12,\n justifyContent: 'center',\n alignItems: 'center',\n flex: 1\n },\n squeezedTextContainer: {\n padding: theme.spacing.small,\n paddingLeft: undefined,\n paddingVertical: undefined,\n paddingRight: undefined,\n flex: 0\n },\n text: {\n fontSize: squeezed ? theme.fontSize.medium : theme.fontSize.regular,\n fontWeight: theme.fontWeight.bold,\n color: theme.colors.black,\n textAlign: 'center'\n },\n textSelected: {\n color: theme.colors.white\n },\n unselectedImageContainer: {\n borderRightColor: theme.colors.border\n },\n imageContainer: {\n height: '100%',\n width: '25%',\n overflow: 'hidden',\n borderTopLeftRadius: theme.radius.regular,\n borderBottomLeftRadius: theme.radius.regular\n },\n image: {\n flex: 1\n }\n });\n\nconst Choice = ({\n children,\n isSelected = false,\n squeezed = false,\n isDisabled,\n onPress,\n media,\n testID: prefixTestID,\n style,\n questionType\n}: Props) => {\n const templateContext = useTemplateContext();\n const {theme, brandTheme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme, squeezed);\n setStylesheet(_stylesheet);\n }, [theme, squeezed]);\n\n if (!styleSheet) {\n return null;\n }\n\n const selectedSuffix = prefixTestID && isSelected ? '-selected' : '';\n const mediaType = media && media.type && media.type === 'img' && media.type.toLowerCase();\n const url =\n media &&\n media.type === 'img' &&\n media.src &&\n media.src.length > 0 &&\n getCleanUri(media.src[0].url);\n\n const source = {uri: url ? getCleanUri(url) : undefined};\n const mediaSuffix = prefixTestID && mediaType ? `-${mediaType}` : '';\n\n const textStyle: TextStyle[] = [styleSheet.text];\n const textWrapperStyle: ViewStyle[] = [styleSheet.textContainer];\n\n if (squeezed) {\n textWrapperStyle.push(styleSheet.squeezedTextContainer);\n }\n\n if (isSelected) {\n textStyle.push(styleSheet.textSelected);\n\n // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread\n const selectionStyle = brandTheme && {\n backgroundColor: brandTheme.colors?.primary,\n borderColor: brandTheme.colors?.primary,\n ...(url\n ? {\n borderTopRightRadius: theme.radius.regular,\n borderBottomRightRadius: theme.radius.regular\n }\n : {\n borderRadius: theme.radius.regular\n })\n };\n\n if (selectionStyle) {\n textWrapperStyle.push(selectionStyle);\n }\n }\n\n return (\n <Touchable\n onPress={!isDisabled ? onPress : undefined}\n style={style}\n analyticsID=\"question-choice\"\n analyticsParams={{questionType}}\n >\n <View\n style={[styleSheet.boxShadow, styleSheet.container]}\n testID={prefixTestID && `${prefixTestID}${selectedSuffix}`}\n >\n {url ? (\n <View style={styleSheet.imageContainer}>\n <ImageBackground\n testID={prefixTestID && `${prefixTestID}${mediaSuffix}`}\n source={source}\n style={styleSheet.image}\n />\n </View>\n ) : null}\n\n {children ? (\n <View style={textWrapperStyle}>\n <Html style={textStyle}>{children}</Html>\n </View>\n ) : null}\n </View>\n </Touchable>\n );\n};\n\nexport default Choice;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,QAA1B,QAAyC,OAAzC;AACA,SAAQC,IAAR,EAAcC,UAAd,QAAqD,cAArD;AAEA,OAAOC,IAAP,MAAiB,sBAAjB;AACA,OAAOC,eAAP,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ACD;EACF;;EAED,oBACE,oBAAC,SAAD;IACE,OAAO,EAAE,CAACzB,UAAD,GAAcC,OAAd,GAAwBvB,SADnC;IAEE,KAAK,EAAE2B,KAFT;IAGE,WAAW,EAAC,iBAHd;IAIE,eAAe,EAAE;MAACC;IAAD;EAJnB,gBAME,oBAAC,IAAD;IACE,KAAK,EAAE,CAACG,UAAU,CAAC3D,SAAZ,EAAuB2D,UAAU,CAAClD,SAAlC,CADT;IAEE,MAAM,EAAE6C,YAAY,IAAK,GAAEA,YAAa,GAAEQ,cAAe;EAF3D,GAIGI,GAAG,gBACF,oBAAC,IAAD;IAAM,KAAK,EAAEP,UAAU,CAACjB;EAAxB,gBACE,oBAAC,eAAD;IACE,MAAM,EAAEY,YAAY,IAAK,GAAEA,YAAa,GAAEiB,WAAY,EADxD;IAEE,MAAM,EAAEF,MAFV;IAGE,KAAK,EAAEV,UAAU,CAACb;EAHpB,EADF,CADE,GAQA,IAZN,EAcGE,QAAQ,gBACP,oBAAC,IAAD;IAAM,KAAK,EAAEyB;EAAb,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAED;EAAb,GAAyBxB,QAAzB,CADF,CADO,GAIL,IAlBN,CANF,CADF;AA6BD,CA/FD;;AAiGA,eAAeD,MAAf"}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","View","StyleSheet","Html","ImageBackground","getCleanUri","Touchable","useTemplateContext","createStyleSheet","theme","squeezed","create","boxShadow","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","backgroundColor","container","colors","white","borderRadius","radius","regular","flexDirection","alignItems","minHeight","textContainer","paddingHorizontal","paddingVertical","justifyContent","flex","squeezedTextContainer","padding","spacing","small","paddingLeft","undefined","paddingRight","text","fontSize","medium","fontWeight","bold","color","black","textAlign","textSelected","unselectedImageContainer","borderRightColor","border","imageContainer","overflow","borderTopLeftRadius","borderBottomLeftRadius","image","Choice","children","isSelected","isDisabled","onPress","media","testID","prefixTestID","style","questionType","templateContext","brandTheme","styleSheet","setStylesheet","_stylesheet","selectedSuffix","mediaType","type","toLowerCase","url","src","length","source","uri","mediaSuffix","textStyle","textWrapperStyle","push","selectionStyle","primary","borderColor","borderTopRightRadius","borderBottomRightRadius"],"sources":["../../../src/atom/choice/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {View, StyleSheet, ViewStyle, TextStyle} from 'react-native';\n\nimport Html from '../html/index.native';\nimport ImageBackground from '../image-background/index.native';\nimport type {Media, QuestionType} from '../../molecule/questions/types';\nimport getCleanUri from '../../util/get-clean-uri';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\n\nexport type Props = {\n isSelected?: boolean;\n onPress: () => void;\n children?: string;\n isDisabled?: boolean;\n testID?: string;\n media?: Media;\n squeezed?: boolean;\n style?: ViewStyle;\n questionType: QuestionType;\n};\n\ntype StyleSheetType = {\n boxShadow: ViewStyle;\n container: ViewStyle;\n text: TextStyle;\n textSelected: TextStyle;\n textContainer: ViewStyle;\n squeezedTextContainer: ViewStyle;\n unselectedImageContainer: ViewStyle;\n imageContainer: ViewStyle;\n image: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme, squeezed: boolean): StyleSheetType =>\n StyleSheet.create({\n boxShadow: {\n shadowColor: '#000',\n shadowOffset: {width: 0, height: 4},\n shadowOpacity: 0.12,\n shadowRadius: 8,\n elevation: 8,\n backgroundColor: '#0000'\n },\n container: {\n backgroundColor: theme.colors.white,\n borderRadius: theme.radius.regular,\n flexDirection: 'row',\n alignItems: 'stretch',\n minHeight: 60\n },\n textContainer: {\n paddingHorizontal: 24,\n paddingVertical: 12,\n justifyContent: 'center',\n alignItems: 'center',\n flex: 1\n },\n squeezedTextContainer: {\n padding: theme.spacing.small,\n paddingLeft: undefined,\n paddingVertical: undefined,\n paddingRight: undefined,\n flex: 0\n },\n text: {\n fontSize: squeezed ? theme.fontSize.medium : theme.fontSize.regular,\n fontWeight: theme.fontWeight.bold,\n color: theme.colors.black,\n textAlign: 'center'\n },\n textSelected: {\n color: theme.colors.white\n },\n unselectedImageContainer: {\n borderRightColor: theme.colors.border\n },\n imageContainer: {\n height: '100%',\n width: '25%',\n overflow: 'hidden',\n borderTopLeftRadius: theme.radius.regular,\n borderBottomLeftRadius: theme.radius.regular\n },\n image: {\n flex: 1\n }\n });\n\nconst Choice = ({\n children,\n isSelected = false,\n squeezed = false,\n isDisabled,\n onPress,\n media,\n testID: prefixTestID,\n style,\n questionType\n}: Props) => {\n const templateContext = useTemplateContext();\n const {theme, brandTheme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme, squeezed);\n setStylesheet(_stylesheet);\n }, [theme, squeezed]);\n\n if (!styleSheet) {\n return null;\n }\n\n const selectedSuffix = prefixTestID && isSelected ? '-selected' : '';\n const mediaType = media && media.type && media.type === 'img' && media.type.toLowerCase();\n const url =\n media &&\n media.type === 'img' &&\n media.src &&\n media.src.length > 0 &&\n getCleanUri(media.src[0].url);\n\n const source = {uri: url ? getCleanUri(url) : undefined};\n const mediaSuffix = prefixTestID && mediaType ? `-${mediaType}` : '';\n\n const textStyle: TextStyle[] = [styleSheet.text];\n const textWrapperStyle: ViewStyle[] = [styleSheet.textContainer];\n\n if (squeezed) {\n textWrapperStyle.push(styleSheet.squeezedTextContainer);\n }\n\n if (isSelected) {\n textStyle.push(styleSheet.textSelected);\n\n // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread\n const selectionStyle = brandTheme && {\n backgroundColor: brandTheme.colors?.primary,\n borderColor: brandTheme.colors?.primary,\n ...(url\n ? {\n borderTopRightRadius: theme.radius.regular,\n borderBottomRightRadius: theme.radius.regular\n }\n : {\n borderRadius: theme.radius.regular\n })\n };\n\n if (selectionStyle) {\n textWrapperStyle.push(selectionStyle);\n }\n }\n\n return (\n <Touchable\n onPress={!isDisabled ? onPress : undefined}\n style={style}\n analyticsID=\"question-choice\"\n analyticsParams={{questionType}}\n >\n <View\n style={[styleSheet.boxShadow, styleSheet.container]}\n testID={prefixTestID && `${prefixTestID}${selectedSuffix}`}\n >\n {url ? (\n <View style={styleSheet.imageContainer}>\n <ImageBackground\n testID={prefixTestID && `${prefixTestID}${mediaSuffix}`}\n source={source}\n style={styleSheet.image}\n />\n </View>\n ) : null}\n\n {children ? (\n <View style={textWrapperStyle}>\n <Html style={textStyle} isTextCentered>\n {children}\n </Html>\n </View>\n ) : null}\n </View>\n </Touchable>\n );\n};\n\nexport default Choice;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,SAAf,EAA0BC,QAA1B,QAAyC,OAAzC;AACA,SAAQC,IAAR,EAAcC,UAAd,QAAqD,cAArD;AAEA,OAAOC,IAAP,MAAiB,sBAAjB;AACA,OAAOC,eAAP,MAA4B,kCAA5B;AAEA,OAAOC,WAAP,MAAwB,0BAAxB;AACA,OAAOC,SAAP,MAAsB,kCAAtB;AACA,SAAQC,kBAAR,QAAiC,4CAAjC;;AA2BA,MAAMC,gBAAgB,GAAG,CAACC,KAAD,EAAeC,QAAf,KACvBR,UAAU,CAACS,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,WAAW,EAAE,MADJ;IAETC,YAAY,EAAE;MAACC,KAAK,EAAE,CAAR;MAAWC,MAAM,EAAE;IAAnB,CAFL;IAGTC,aAAa,EAAE,IAHN;IAITC,YAAY,EAAE,CAJL;IAKTC,SAAS,EAAE,CALF;IAMTC,eAAe,EAAE;EANR,CADK;EAShBC,SAAS,EAAE;IACTD,eAAe,EAAEX,KAAK,CAACa,MAAN,CAAaC,KADrB;IAETC,YAAY,EAAEf,KAAK,CAACgB,MAAN,CAAaC,OAFlB;IAGTC,aAAa,EAAE,KAHN;IAITC,UAAU,EAAE,SAJH;IAKTC,SAAS,EAAE;EALF,CATK;EAgBhBC,aAAa,EAAE;IACbC,iBAAiB,EAAE,EADN;IAEbC,eAAe,EAA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IAAwB,cAAc;EAAtC,GACGxB,QADH,CADF,CADO,GAML,IApBN,CANF,CADF;AA+BD,CAjGD;;AAmGA,eAAeD,MAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/molecule/review-correction-popin/index.native.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAgC,0BAA0B,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/molecule/review-correction-popin/index.native.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAgC,0BAA0B,EAAC,MAAM,cAAc,CAAC;AAoQvF,QAAA,MAAM,qBAAqB,kDAMxB,0BAA0B,uBAiD5B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -194,11 +194,12 @@ const KlfButton = ({
|
|
|
194
194
|
property: 'opacity',
|
|
195
195
|
fromValue: 0,
|
|
196
196
|
toValue: 1,
|
|
197
|
+
duration: 250,
|
|
197
198
|
easing: Easing.bezier(0.25, 1, 0.5, 1)
|
|
198
199
|
});
|
|
199
200
|
const handlePressKey = useCallback(() => {
|
|
200
201
|
setDisplayTooltip(!displayTooltip);
|
|
201
|
-
!displayTooltip ? fadeIn.start() : fadeIn.
|
|
202
|
+
!displayTooltip ? fadeIn.start() : fadeIn.reset();
|
|
202
203
|
}, [displayTooltip, fadeIn]);
|
|
203
204
|
const {
|
|
204
205
|
buttonKlf,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useCallback","useEffect","useState","Animated","Easing","StyleSheet","View","NovaCompositionCoorpacademyCheck","RightIcon","NovaSolidStatusClose","WrongIcon","NovaLineLoginKey1","KlfIcon","useAnimateProp","Html","Text","Touchable","useTemplateContext","createStyleSheet","theme","type","create","wrapper","backgroundColor","height","display","justifyContent","popin","padding","spacing","medium","borderRadius","flexDirection","alignItems","colors","negative","positive","shadowColor","shadowOpacity","shadowOffset","width","shadowRadius","elevation","correctionSection","iconCircle","white","opacity","icon","resultLabel","color","fontSize","fontWeight","lineHeight","marginLeft","textTransform","feedbackSection","marginVertical","labelContainer","alignSelf","paddingHorizontal","tiny","paddingVertical","micro","marginBottom","label","extraBold","htmlInfoMessage","button","base","small","buttonText","cta","bold","textAlign","containerButtonKlf","buttonKlf","buttonKlfActive","buttonKlfText","iconKey","marginRight","containerTooltip","zIndex","position","black","buttonTooltip","bottom","right","htmlTooltipText","text","primary","triangleTooltip","borderStyle","borderLeftWidth","borderRightWidth","borderBottomWidth","borderTopWidth","borderLeftColor","borderTopColor","borderRightColor","borderBottomColor","transform","rotate","left","top","KlfButton","klf","styleSheet","displayTooltip","setDisplayTooltip","fadeIn","property","fromValue","toValue","easing","bezier","handlePressKey","start","revert","tooltip","animatedStyle","ICONS","wrong","ReviewCorrectionPopin","information","next","templateContext","setStylesheet","handlePressNext","onClick","Icon","_stylesheet","message"],"sources":["../../../src/molecule/review-correction-popin/index.native.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useState} from 'react';\nimport {Animated, Easing, TextStyle, StyleSheet, View, ViewStyle} from 'react-native';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon,\n NovaLineLoginKey1 as KlfIcon\n} from '@coorpacademy/nova-icons';\nimport {useAnimateProp} from '@coorpacademy/react-native-animation';\nimport Html from '../../atom/html/index.native';\nimport {Theme} from '../../variables/theme.native';\nimport Text from '../../atom/text/index.native';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {ReviewCorrectionPopinKLFProps, ReviewCorrectionPopinProps} from './prop-types';\n\ninterface StyleSheetType {\n wrapper: ViewStyle;\n popin: ViewStyle;\n correctionSection: ViewStyle;\n iconCircle: ViewStyle;\n icon: ViewStyle;\n resultLabel: TextStyle;\n feedbackSection: ViewStyle;\n labelContainer: ViewStyle;\n label: TextStyle;\n htmlInfoMessage: TextStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n buttonKlf: ViewStyle;\n buttonKlfActive: TextStyle;\n buttonKlfText: TextStyle;\n iconKey: ViewStyle;\n containerTooltip: ViewStyle;\n buttonTooltip: ViewStyle;\n containerButtonKlf: ViewStyle;\n triangleTooltip: ViewStyle;\n htmlTooltipText: TextStyle;\n}\n\nconst createStyleSheet = (theme: Theme, type: string): StyleSheetType =>\n StyleSheet.create({\n wrapper: {\n backgroundColor: '#00000000',\n height: 2000,\n display: 'flex',\n justifyContent: 'flex-end'\n },\n popin: {\n padding: theme.spacing.medium,\n borderRadius: 16,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n backgroundColor: type === 'wrong' ? theme.colors.negative : theme.colors.positive,\n shadowColor: type === 'wrong' ? theme.colors.negative : theme.colors.positive,\n shadowOpacity: 0.5,\n shadowOffset: {width: 0, height: 0},\n shadowRadius: 15,\n elevation: 4\n },\n correctionSection: {\n flexDirection: 'row',\n alignItems: 'center',\n width: '80%'\n },\n iconCircle: {\n width: 60,\n height: 60,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: theme.colors.white,\n opacity: 0.7,\n borderRadius: 50\n },\n icon: {\n height: 30,\n width: 30\n },\n resultLabel: {\n color: theme.colors.white,\n fontSize: 24,\n fontWeight: '600',\n lineHeight: 24,\n marginLeft: 12,\n textTransform: 'uppercase'\n },\n feedbackSection: {\n marginVertical: theme.spacing.medium\n },\n labelContainer: {\n alignSelf: 'flex-start',\n backgroundColor: 'rgba(255, 255, 255, 0.3)',\n borderRadius: 56,\n paddingHorizontal: theme.spacing.tiny,\n paddingVertical: theme.spacing.micro,\n marginBottom: 8\n },\n label: {\n color: theme.colors.white,\n fontSize: 14,\n fontWeight: theme.fontWeight.extraBold,\n lineHeight: 17\n },\n htmlInfoMessage: {\n color: theme.colors.white,\n fontSize: 16,\n fontWeight: '600',\n lineHeight: 19\n },\n button: {\n alignSelf: 'stretch',\n backgroundColor: theme.colors.white,\n borderRadius: 7,\n paddingHorizontal: theme.spacing.base,\n paddingVertical: theme.spacing.small\n },\n buttonText: {\n color: theme.colors.cta,\n fontSize: 14,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 20,\n textAlign: 'center'\n },\n containerButtonKlf: {\n width: '100%'\n },\n buttonKlf: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderRadius: 7,\n paddingHorizontal: theme.spacing.base,\n paddingVertical: theme.spacing.small,\n marginBottom: theme.spacing.tiny\n },\n buttonKlfActive: {\n backgroundColor:\n 'linear-gradient(0deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)), rgba(255, 255, 255, 0.1)'\n },\n buttonKlfText: {\n color: 'white',\n fontSize: 14,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 20,\n textAlign: 'center'\n },\n iconKey: {\n width: 12,\n height: 12,\n marginRight: theme.spacing.tiny\n },\n containerTooltip: {\n zIndex: 30,\n position: 'relative',\n shadowColor: theme.colors.black,\n shadowOpacity: 0.3,\n shadowOffset: {width: 0, height: 0},\n shadowRadius: 8\n },\n buttonTooltip: {\n zIndex: 20,\n flexDirection: 'column',\n justifyContent: 'center',\n backgroundColor: theme.colors.white,\n borderRadius: 15,\n padding: theme.spacing.small,\n width: '112%',\n position: 'absolute',\n bottom: 4,\n right: -15,\n shadowColor: theme.colors.black,\n shadowOpacity: 0.3,\n shadowOffset: {width: 0, height: 0},\n shadowRadius: 8,\n elevation: 6\n },\n htmlTooltipText: {\n color: theme.colors.text.primary,\n fontSize: 16,\n fontWeight: '600',\n lineHeight: 22,\n textAlign: 'center'\n },\n triangleTooltip: {\n zIndex: 31,\n width: 0,\n height: 0,\n backgroundColor: 'transparent',\n borderStyle: 'solid',\n borderLeftWidth: 13,\n borderRightWidth: 13,\n borderBottomWidth: 13,\n borderTopWidth: 13,\n borderLeftColor: 'transparent',\n borderTopColor: 'transparent',\n borderRightColor: theme.colors.white,\n borderBottomColor: theme.colors.white,\n transform: [{rotate: '45deg'}],\n position: 'absolute',\n left: 110,\n top: -20,\n borderRadius: 4\n }\n });\n\nconst KlfButton = ({\n klf,\n styleSheet\n}: {\n klf: ReviewCorrectionPopinKLFProps;\n styleSheet: StyleSheetType;\n}) => {\n const [displayTooltip, setDisplayTooltip] = useState(false);\n const fadeIn = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n easing: Easing.bezier(0.25, 1, 0.5, 1)\n });\n\n const handlePressKey = useCallback(() => {\n setDisplayTooltip(!displayTooltip);\n !displayTooltip ? fadeIn.start() : fadeIn.revert();\n }, [displayTooltip, fadeIn]);\n\n const {\n buttonKlf,\n buttonKlfActive,\n buttonKlfText,\n containerButtonKlf,\n containerTooltip,\n buttonTooltip,\n htmlTooltipText,\n iconKey,\n triangleTooltip\n } = styleSheet;\n\n const {label, tooltip} = klf;\n\n return (\n <View style={containerButtonKlf}>\n <Animated.View style={[containerTooltip, fadeIn.animatedStyle]}>\n <Touchable\n style={buttonTooltip}\n accessibilityLabel={`aria-label-tooltip`}\n isHighlight\n onPress={handlePressKey}\n testID=\"button-tooltip\"\n >\n <Html style={htmlTooltipText}>{tooltip}</Html>\n </Touchable>\n <View style={triangleTooltip} />\n </Animated.View>\n <Touchable\n style={displayTooltip ? {...buttonKlf, ...buttonKlfActive} : buttonKlf}\n accessibilityLabel={`aria-label-${label}`}\n onPress={handlePressKey}\n testID=\"button-klf\"\n >\n <KlfIcon style={iconKey} color=\"white\" />\n <Text style={buttonKlfText}>{label}</Text>\n </Touchable>\n </View>\n );\n};\n\nconst ICONS = {\n right: RightIcon,\n wrong: WrongIcon\n};\n\nconst ReviewCorrectionPopin = ({\n information,\n klf,\n next,\n type,\n resultLabel\n}: ReviewCorrectionPopinProps) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {theme} = templateContext;\n const handlePressNext = next.onClick;\n\n const Icon = ICONS[type];\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme, type);\n setStylesheet(_stylesheet);\n }, [theme, type]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.wrapper}>\n <View style={styleSheet.popin}>\n <View style={styleSheet.correctionSection}>\n <View style={styleSheet.iconCircle}>\n <Icon\n style={styleSheet.icon}\n color={type === 'wrong' ? theme.colors.negative : theme.colors.positive}\n />\n </View>\n <Text style={styleSheet.resultLabel}>{resultLabel}</Text>\n </View>\n <View style={styleSheet.feedbackSection} accessibilityLabel=\"answer-information\">\n <View style={styleSheet.labelContainer} needsOffscreenAlphaCompositing>\n <Text accessibilityLabel={information.label} style={styleSheet.label}>\n {information.label}\n </Text>\n </View>\n <Html style={styleSheet.htmlInfoMessage}>{information.message}</Html>\n </View>\n {klf && type === 'wrong' ? <KlfButton styleSheet={styleSheet} klf={klf} /> : null}\n <Touchable\n style={styleSheet.button}\n onPress={handlePressNext}\n accessibilityLabel={next['aria-label']}\n testID={next['data-name']}\n >\n <Text style={styleSheet.buttonText}>{next.label}</Text>\n </Touchable>\n </View>\n </View>\n );\n};\n\nexport default ReviewCorrectionPopin;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,SAA5B,EAAuCC,QAAvC,QAAsD,OAAtD;AACA,SAAQC,QAAR,EAAkBC,MAAlB,EAAqCC,UAArC,EAAiDC,IAAjD,QAAuE,cAAvE;AACA,SACEC,gCAAgC,IAAIC,SADtC,EAEEC,oBAAoB,IAAIC,SAF1B,EAGEC,iBAAiB,IAAIC,OAHvB,QAIO,0BAJP;AAKA,SAAQC,cAAR,QAA6B,sCAA7B;AACA,OAAOC,IAAP,MAAiB,8BAAjB;AAEA,OAAOC,IAAP,MAAiB,8BAAjB;AACA,OAAOC,SAAP,MAAsB,kCAAtB;AACA,SAAQC,kBAAR,QAAiC,4CAAjC;;AA2BA,MAAMC,gBAAgB,GAAG,CAACC,KAAD,EAAeC,IAAf,KACvBf,UAAU,CAACgB,MA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Animated","Easing","StyleSheet","View","NovaCompositionCoorpacademyCheck","RightIcon","NovaSolidStatusClose","WrongIcon","NovaLineLoginKey1","KlfIcon","useAnimateProp","Html","Text","Touchable","useTemplateContext","createStyleSheet","theme","type","create","wrapper","backgroundColor","height","display","justifyContent","popin","padding","spacing","medium","borderRadius","flexDirection","alignItems","colors","negative","positive","shadowColor","shadowOpacity","shadowOffset","width","shadowRadius","elevation","correctionSection","iconCircle","white","opacity","icon","resultLabel","color","fontSize","fontWeight","lineHeight","marginLeft","textTransform","feedbackSection","marginVertical","labelContainer","alignSelf","paddingHorizontal","tiny","paddingVertical","micro","marginBottom","label","extraBold","htmlInfoMessage","button","base","small","buttonText","cta","bold","textAlign","containerButtonKlf","buttonKlf","buttonKlfActive","buttonKlfText","iconKey","marginRight","containerTooltip","zIndex","position","black","buttonTooltip","bottom","right","htmlTooltipText","text","primary","triangleTooltip","borderStyle","borderLeftWidth","borderRightWidth","borderBottomWidth","borderTopWidth","borderLeftColor","borderTopColor","borderRightColor","borderBottomColor","transform","rotate","left","top","KlfButton","klf","styleSheet","displayTooltip","setDisplayTooltip","fadeIn","property","fromValue","toValue","duration","easing","bezier","handlePressKey","start","reset","tooltip","animatedStyle","ICONS","wrong","ReviewCorrectionPopin","information","next","templateContext","setStylesheet","handlePressNext","onClick","Icon","_stylesheet","message"],"sources":["../../../src/molecule/review-correction-popin/index.native.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useState} from 'react';\nimport {Animated, Easing, TextStyle, StyleSheet, View, ViewStyle} from 'react-native';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon,\n NovaLineLoginKey1 as KlfIcon\n} from '@coorpacademy/nova-icons';\nimport {useAnimateProp} from '@coorpacademy/react-native-animation';\nimport Html from '../../atom/html/index.native';\nimport {Theme} from '../../variables/theme.native';\nimport Text from '../../atom/text/index.native';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {ReviewCorrectionPopinKLFProps, ReviewCorrectionPopinProps} from './prop-types';\n\ninterface StyleSheetType {\n wrapper: ViewStyle;\n popin: ViewStyle;\n correctionSection: ViewStyle;\n iconCircle: ViewStyle;\n icon: ViewStyle;\n resultLabel: TextStyle;\n feedbackSection: ViewStyle;\n labelContainer: ViewStyle;\n label: TextStyle;\n htmlInfoMessage: TextStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n buttonKlf: ViewStyle;\n buttonKlfActive: TextStyle;\n buttonKlfText: TextStyle;\n iconKey: ViewStyle;\n containerTooltip: ViewStyle;\n buttonTooltip: ViewStyle;\n containerButtonKlf: ViewStyle;\n triangleTooltip: ViewStyle;\n htmlTooltipText: TextStyle;\n}\n\nconst createStyleSheet = (theme: Theme, type: string): StyleSheetType =>\n StyleSheet.create({\n wrapper: {\n backgroundColor: '#00000000',\n height: 2000,\n display: 'flex',\n justifyContent: 'flex-end'\n },\n popin: {\n padding: theme.spacing.medium,\n borderRadius: 16,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n backgroundColor: type === 'wrong' ? theme.colors.negative : theme.colors.positive,\n shadowColor: type === 'wrong' ? theme.colors.negative : theme.colors.positive,\n shadowOpacity: 0.5,\n shadowOffset: {width: 0, height: 0},\n shadowRadius: 15,\n elevation: 4\n },\n correctionSection: {\n flexDirection: 'row',\n alignItems: 'center',\n width: '80%'\n },\n iconCircle: {\n width: 60,\n height: 60,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: theme.colors.white,\n opacity: 0.7,\n borderRadius: 50\n },\n icon: {\n height: 30,\n width: 30\n },\n resultLabel: {\n color: theme.colors.white,\n fontSize: 24,\n fontWeight: '600',\n lineHeight: 24,\n marginLeft: 12,\n textTransform: 'uppercase'\n },\n feedbackSection: {\n marginVertical: theme.spacing.medium\n },\n labelContainer: {\n alignSelf: 'flex-start',\n backgroundColor: 'rgba(255, 255, 255, 0.3)',\n borderRadius: 56,\n paddingHorizontal: theme.spacing.tiny,\n paddingVertical: theme.spacing.micro,\n marginBottom: 8\n },\n label: {\n color: theme.colors.white,\n fontSize: 14,\n fontWeight: theme.fontWeight.extraBold,\n lineHeight: 17\n },\n htmlInfoMessage: {\n color: theme.colors.white,\n fontSize: 16,\n fontWeight: '600',\n lineHeight: 19\n },\n button: {\n alignSelf: 'stretch',\n backgroundColor: theme.colors.white,\n borderRadius: 7,\n paddingHorizontal: theme.spacing.base,\n paddingVertical: theme.spacing.small\n },\n buttonText: {\n color: theme.colors.cta,\n fontSize: 14,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 20,\n textAlign: 'center'\n },\n containerButtonKlf: {\n width: '100%'\n },\n buttonKlf: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderRadius: 7,\n paddingHorizontal: theme.spacing.base,\n paddingVertical: theme.spacing.small,\n marginBottom: theme.spacing.tiny\n },\n buttonKlfActive: {\n backgroundColor:\n 'linear-gradient(0deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)), rgba(255, 255, 255, 0.1)'\n },\n buttonKlfText: {\n color: 'white',\n fontSize: 14,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 20,\n textAlign: 'center'\n },\n iconKey: {\n width: 12,\n height: 12,\n marginRight: theme.spacing.tiny\n },\n containerTooltip: {\n zIndex: 30,\n position: 'relative',\n shadowColor: theme.colors.black,\n shadowOpacity: 0.3,\n shadowOffset: {width: 0, height: 0},\n shadowRadius: 8\n },\n buttonTooltip: {\n zIndex: 20,\n flexDirection: 'column',\n justifyContent: 'center',\n backgroundColor: theme.colors.white,\n borderRadius: 15,\n padding: theme.spacing.small,\n width: '112%',\n position: 'absolute',\n bottom: 4,\n right: -15,\n shadowColor: theme.colors.black,\n shadowOpacity: 0.3,\n shadowOffset: {width: 0, height: 0},\n shadowRadius: 8,\n elevation: 6\n },\n htmlTooltipText: {\n color: theme.colors.text.primary,\n fontSize: 16,\n fontWeight: '600',\n lineHeight: 22,\n textAlign: 'center'\n },\n triangleTooltip: {\n zIndex: 31,\n width: 0,\n height: 0,\n backgroundColor: 'transparent',\n borderStyle: 'solid',\n borderLeftWidth: 13,\n borderRightWidth: 13,\n borderBottomWidth: 13,\n borderTopWidth: 13,\n borderLeftColor: 'transparent',\n borderTopColor: 'transparent',\n borderRightColor: theme.colors.white,\n borderBottomColor: theme.colors.white,\n transform: [{rotate: '45deg'}],\n position: 'absolute',\n left: 110,\n top: -20,\n borderRadius: 4\n }\n });\n\nconst KlfButton = ({\n klf,\n styleSheet\n}: {\n klf: ReviewCorrectionPopinKLFProps;\n styleSheet: StyleSheetType;\n}) => {\n const [displayTooltip, setDisplayTooltip] = useState(false);\n const fadeIn = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 250,\n easing: Easing.bezier(0.25, 1, 0.5, 1)\n });\n\n const handlePressKey = useCallback(() => {\n setDisplayTooltip(!displayTooltip);\n !displayTooltip ? fadeIn.start() : fadeIn.reset();\n }, [displayTooltip, fadeIn]);\n\n const {\n buttonKlf,\n buttonKlfActive,\n buttonKlfText,\n containerButtonKlf,\n containerTooltip,\n buttonTooltip,\n htmlTooltipText,\n iconKey,\n triangleTooltip\n } = styleSheet;\n\n const {label, tooltip} = klf;\n\n return (\n <View style={containerButtonKlf}>\n <Animated.View style={[containerTooltip, fadeIn.animatedStyle]}>\n <Touchable\n style={buttonTooltip}\n accessibilityLabel={`aria-label-tooltip`}\n isHighlight\n onPress={handlePressKey}\n testID=\"button-tooltip\"\n >\n <Html style={htmlTooltipText}>{tooltip}</Html>\n </Touchable>\n <View style={triangleTooltip} />\n </Animated.View>\n <Touchable\n style={displayTooltip ? {...buttonKlf, ...buttonKlfActive} : buttonKlf}\n accessibilityLabel={`aria-label-${label}`}\n onPress={handlePressKey}\n testID=\"button-klf\"\n >\n <KlfIcon style={iconKey} color=\"white\" />\n <Text style={buttonKlfText}>{label}</Text>\n </Touchable>\n </View>\n );\n};\n\nconst ICONS = {\n right: RightIcon,\n wrong: WrongIcon\n};\n\nconst ReviewCorrectionPopin = ({\n information,\n klf,\n next,\n type,\n resultLabel\n}: ReviewCorrectionPopinProps) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {theme} = templateContext;\n const handlePressNext = next.onClick;\n\n const Icon = ICONS[type];\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme, type);\n setStylesheet(_stylesheet);\n }, [theme, type]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.wrapper}>\n <View style={styleSheet.popin}>\n <View style={styleSheet.correctionSection}>\n <View style={styleSheet.iconCircle}>\n <Icon\n style={styleSheet.icon}\n color={type === 'wrong' ? theme.colors.negative : theme.colors.positive}\n />\n </View>\n <Text style={styleSheet.resultLabel}>{resultLabel}</Text>\n </View>\n <View style={styleSheet.feedbackSection} accessibilityLabel=\"answer-information\">\n <View style={styleSheet.labelContainer} needsOffscreenAlphaCompositing>\n <Text accessibilityLabel={information.label} style={styleSheet.label}>\n {information.label}\n </Text>\n </View>\n <Html style={styleSheet.htmlInfoMessage}>{information.message}</Html>\n </View>\n {klf && type === 'wrong' ? <KlfButton styleSheet={styleSheet} klf={klf} /> : null}\n <Touchable\n style={styleSheet.button}\n onPress={handlePressNext}\n accessibilityLabel={next['aria-label']}\n testID={next['data-name']}\n >\n <Text style={styleSheet.buttonText}>{next.label}</Text>\n </Touchable>\n </View>\n </View>\n );\n};\n\nexport default ReviewCorrectionPopin;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,SAA5B,EAAuCC,QAAvC,QAAsD,OAAtD;AACA,SAAQC,QAAR,EAAkBC,MAAlB,EAAqCC,UAArC,EAAiDC,IAAjD,QAAuE,cAAvE;AACA,SACEC,gCAAgC,IAAIC,SADtC,EAEEC,oBAAoB,IAAIC,SAF1B,EAGEC,iBAAiB,IAAIC,OAHvB,QAIO,0BAJP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AEH,IAAI,CAAC,YAAD,CAH1B;IAIE,MAAM,EAAEA,IAAI,CAAC,WAAD;EAJd,gBAME,oBAAC,IAAD;IAAM,KAAK,EAAEnB,UAAU,CAACpC;EAAxB,GAAqCuD,IAAI,CAAC7D,KAA1C,CANF,CAnBF,CADF,CADF;AAgCD,CAvDD;;AAyDA,eAAe2D,qBAAf"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export default ListItems;
|
|
2
|
-
declare function ListItems({ title, buttonLink, content, "aria-label": ariaLabel }: {
|
|
2
|
+
declare function ListItems({ title, buttonLink, selectMultiple, content, "aria-label": ariaLabel }: {
|
|
3
3
|
title: any;
|
|
4
4
|
buttonLink: any;
|
|
5
|
+
selectMultiple: any;
|
|
5
6
|
content: any;
|
|
6
7
|
"aria-label": any;
|
|
7
8
|
}): JSX.Element;
|
|
@@ -28,6 +29,24 @@ declare namespace ListItems {
|
|
|
28
29
|
className: PropTypes.Requireable<string>;
|
|
29
30
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
30
31
|
}>>;
|
|
32
|
+
selectMultiple: PropTypes.Requireable<PropTypes.InferProps<{
|
|
33
|
+
title: PropTypes.Requireable<string>;
|
|
34
|
+
placeholder: PropTypes.Requireable<string>;
|
|
35
|
+
description: PropTypes.Requireable<string>;
|
|
36
|
+
hint: PropTypes.Requireable<string>;
|
|
37
|
+
options: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
38
|
+
selected: PropTypes.Validator<boolean>;
|
|
39
|
+
name: PropTypes.Validator<string>;
|
|
40
|
+
value: PropTypes.Requireable<string>;
|
|
41
|
+
}>>[]>;
|
|
42
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
43
|
+
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
44
|
+
multiple: PropTypes.Requireable<boolean>;
|
|
45
|
+
modified: PropTypes.Requireable<boolean>;
|
|
46
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
47
|
+
error: PropTypes.Requireable<string>;
|
|
48
|
+
theme: PropTypes.Requireable<string>;
|
|
49
|
+
}>>;
|
|
31
50
|
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
32
51
|
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
33
52
|
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-items/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-items/index.js"],"names":[],"mappings":";AAgCA;;;;;;gBAwBC"}
|
|
@@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import ListItem from '../list-item';
|
|
6
6
|
import Title from '../../atom/title';
|
|
7
7
|
import ButtonLink from '../../atom/button-link';
|
|
8
|
+
import SelectMultiple from '../../molecule/select-multiple';
|
|
8
9
|
import ExpandibleActionableTable from '../../molecule/expandible-actionable-table';
|
|
9
10
|
import style from './style.css';
|
|
10
11
|
|
|
@@ -45,6 +46,7 @@ const buildContentView = (content, ariaLabel) => {
|
|
|
45
46
|
const ListItems = ({
|
|
46
47
|
title,
|
|
47
48
|
buttonLink,
|
|
49
|
+
selectMultiple,
|
|
48
50
|
content,
|
|
49
51
|
'aria-label': ariaLabel
|
|
50
52
|
}) => {
|
|
@@ -58,13 +60,18 @@ const ListItems = ({
|
|
|
58
60
|
type: 'form-group',
|
|
59
61
|
"data-name": 'list-title'
|
|
60
62
|
})), /*#__PURE__*/React.createElement("div", {
|
|
63
|
+
className: style.actionsWrapper
|
|
64
|
+
}, selectMultiple ? /*#__PURE__*/React.createElement("div", {
|
|
65
|
+
className: style.selectMultiple
|
|
66
|
+
}, /*#__PURE__*/React.createElement(SelectMultiple, selectMultiple)) : null, /*#__PURE__*/React.createElement("div", {
|
|
61
67
|
className: style.buttonCreate
|
|
62
|
-
}, /*#__PURE__*/React.createElement(ButtonLink, buttonLink))), contentView);
|
|
68
|
+
}, /*#__PURE__*/React.createElement(ButtonLink, buttonLink)))), contentView);
|
|
63
69
|
};
|
|
64
70
|
|
|
65
71
|
ListItems.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
66
72
|
'aria-label': PropTypes.string,
|
|
67
73
|
buttonLink: PropTypes.shape(ButtonLink.propTypes),
|
|
74
|
+
selectMultiple: PropTypes.shape(SelectMultiple.propTypes),
|
|
68
75
|
items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),
|
|
69
76
|
content: PropTypes.oneOfType([PropTypes.shape({
|
|
70
77
|
items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","ListItem","Title","ButtonLink","ExpandibleActionableTable","style","buildListItemsView","content","ariaLabel","items","itemType","itemsView","map","item","index","id","list","buildContentView","type","ListItems","title","buttonLink","contentView","header","buttonCreate","propTypes","string","shape","arrayOf","oneOfType","oneOf"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport ExpandibleActionableTable from '../../molecule/expandible-actionable-table';\nimport style from './style.css';\n\nconst buildListItemsView = (content, ariaLabel) => {\n const {items, itemType} = content;\n const itemsView = items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} order={index} contentType={itemType} />\n </li>\n ));\n return (\n <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n );\n};\nconst buildContentView = (content, ariaLabel) => {\n const {type} = content;\n switch (type) {\n case 'list':\n return buildListItemsView(content, ariaLabel);\n case 'expandible-actionable-table':\n return <ExpandibleActionableTable {...content} />;\n }\n};\n\nconst ListItems = ({title, buttonLink, content, 'aria-label': ariaLabel}) => {\n const contentView = buildContentView(content, ariaLabel);\n\n return (\n <div>\n <div className={style.header}>\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'list-title'} />\n </div>\n <div className={style.
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","ListItem","Title","ButtonLink","SelectMultiple","ExpandibleActionableTable","style","buildListItemsView","content","ariaLabel","items","itemType","itemsView","map","item","index","id","list","buildContentView","type","ListItems","title","buttonLink","selectMultiple","contentView","header","actionsWrapper","buttonCreate","propTypes","string","shape","arrayOf","oneOfType","oneOf"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport SelectMultiple from '../../molecule/select-multiple';\nimport ExpandibleActionableTable from '../../molecule/expandible-actionable-table';\nimport style from './style.css';\n\nconst buildListItemsView = (content, ariaLabel) => {\n const {items, itemType} = content;\n const itemsView = items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} order={index} contentType={itemType} />\n </li>\n ));\n return (\n <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n );\n};\nconst buildContentView = (content, ariaLabel) => {\n const {type} = content;\n switch (type) {\n case 'list':\n return buildListItemsView(content, ariaLabel);\n case 'expandible-actionable-table':\n return <ExpandibleActionableTable {...content} />;\n }\n};\n\nconst ListItems = ({title, buttonLink, selectMultiple, content, 'aria-label': ariaLabel}) => {\n const contentView = buildContentView(content, ariaLabel);\n\n return (\n <div>\n <div className={style.header}>\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'list-title'} />\n </div>\n <div className={style.actionsWrapper}>\n {selectMultiple ? (\n <div className={style.selectMultiple}>\n <SelectMultiple {...selectMultiple} />\n </div>\n ) : null}\n\n <div className={style.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n </div>\n {contentView}\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n selectMultiple: PropTypes.shape(SelectMultiple.propTypes),\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n content: PropTypes.oneOfType([\n PropTypes.shape({\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n type: PropTypes.oneOf(['list']),\n itemType: PropTypes.string\n }),\n PropTypes.shape({\n ...ExpandibleActionableTable.propTypes,\n type: PropTypes.oneOf(['expandible-actionable-table'])\n })\n ]),\n title: PropTypes.string\n};\n\nexport default ListItems;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,cAAP,MAA2B,gCAA3B;AACA,OAAOC,yBAAP,MAAsC,4CAAtC;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,kBAAkB,GAAG,CAACC,OAAD,EAAUC,SAAV,KAAwB;EACjD,MAAM;IAACC,KAAD;IAAQC;EAAR,IAAoBH,OAA1B;EACA,MAAMI,SAAS,GAAGF,KAAK,CAACG,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,kBAC1B;IAAI,GAAG,EAAED,IAAI,CAACE,EAAd;IAAkB,SAAS,EAAEV,KAAK,CAACQ,IAAnC;IAAyC,aAAY,WAAUC,KAAM;EAArE,gBACE,oBAAC,QAAD,eAAcD,IAAd;IAAoB,KAAK,EAAEC,KAA3B;IAAkC,WAAW,EAAEJ;EAA/C,GADF,CADgB,CAAlB;EAKA,oBACE;IAAI,SAAS,EAAEL,KAAK,CAACW,IAArB;IAA2B,cAAYR,SAAvC;IAAkD,aAAW;EAA7D,GACGG,SADH,CADF;AAKD,CAZD;;AAaA,MAAMM,gBAAgB,GAAG,CAACV,OAAD,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AgB7B,QAAQ,CAAC2B,SAAzB,CAAlB,CAJa;EAKpBpB,OAAO,EAAER,SAAS,CAACgC,SAAV,CAAoB,CAC3BhC,SAAS,CAAC8B,KAAV,CAAgB;IACdpB,KAAK,EAAEV,SAAS,CAAC+B,OAAV,CAAkB/B,SAAS,CAAC8B,KAAV,CAAgB7B,QAAQ,CAAC2B,SAAzB,CAAlB,CADO;IAEdT,IAAI,EAAEnB,SAAS,CAACiC,KAAV,CAAgB,CAAC,MAAD,CAAhB,CAFQ;IAGdtB,QAAQ,EAAEX,SAAS,CAAC6B;EAHN,CAAhB,CAD2B,EAM3B7B,SAAS,CAAC8B,KAAV,cACKzB,yBAAyB,CAACuB,SAD/B;IAEET,IAAI,EAAEnB,SAAS,CAACiC,KAAV,CAAgB,CAAC,6BAAD,CAAhB;EAFR,GAN2B,CAApB,CALW;EAgBpBZ,KAAK,EAAErB,SAAS,CAAC6B;AAhBG,CAAtB;AAmBA,eAAeT,SAAf"}
|
|
@@ -12,6 +12,12 @@
|
|
|
12
12
|
padding: 0 24px;
|
|
13
13
|
margin-bottom: 24px;
|
|
14
14
|
}
|
|
15
|
+
.actionsWrapper {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
gap: 32px;
|
|
20
|
+
}
|
|
15
21
|
|
|
16
22
|
.title {
|
|
17
23
|
font-family: Gilroy;
|
|
@@ -28,6 +34,10 @@
|
|
|
28
34
|
width: 194px;
|
|
29
35
|
}
|
|
30
36
|
|
|
37
|
+
.selectMultiple {
|
|
38
|
+
width: 291px;
|
|
39
|
+
}
|
|
40
|
+
|
|
31
41
|
.item {
|
|
32
42
|
margin-bottom: 8px;
|
|
33
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/organism/review-slide/index.native.tsx"],"names":[],"mappings":";AA0BA,OAAO,EAAa,gBAAgB,EAAa,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/organism/review-slide/index.native.tsx"],"names":[],"mappings":";AA0BA,OAAO,EAAa,gBAAgB,EAAa,MAAM,cAAc,CAAC;AAoQtE,QAAA,MAAM,KAAK,UAAW,gBAAgB,gBAmFrC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -110,20 +110,28 @@ const createQuestionStyle = theme => StyleSheet.create({
|
|
|
110
110
|
justifyContent: 'space-between',
|
|
111
111
|
alignItems: 'center'
|
|
112
112
|
},
|
|
113
|
+
questionOriginContainer: {
|
|
114
|
+
marginBottom: theme.spacing.tiny,
|
|
115
|
+
marginTop: theme.spacing.small
|
|
116
|
+
},
|
|
113
117
|
questionOrigin: {
|
|
114
118
|
fontSize: 12,
|
|
115
119
|
lineHeight: 16,
|
|
116
120
|
color: theme.colors.text.primary,
|
|
117
|
-
|
|
118
|
-
|
|
121
|
+
textAlign: 'center'
|
|
122
|
+
},
|
|
123
|
+
questionTextContainer: {
|
|
124
|
+
marginVertical: 4,
|
|
119
125
|
textAlign: 'center'
|
|
120
126
|
},
|
|
121
127
|
questionText: {
|
|
122
128
|
fontSize: 16,
|
|
123
129
|
lineHeight: 22,
|
|
124
130
|
fontWeight: '700',
|
|
125
|
-
color: theme.colors.text.primary
|
|
126
|
-
|
|
131
|
+
color: theme.colors.text.primary
|
|
132
|
+
},
|
|
133
|
+
questionHelpContainer: {
|
|
134
|
+
marginVertical: 4
|
|
127
135
|
},
|
|
128
136
|
questionHelp: {
|
|
129
137
|
fontSize: 12,
|
|
@@ -164,13 +172,21 @@ const Question = props => {
|
|
|
164
172
|
const hasVideoOrImage = answerUI.media?.type && [TYPE_VIDEO, TYPE_IMAGE].includes(answerUI.media.type);
|
|
165
173
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(View, {
|
|
166
174
|
style: style.questionHeading
|
|
175
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
176
|
+
style: style.questionOriginContainer
|
|
177
|
+
}, /*#__PURE__*/React.createElement(Html, {
|
|
178
|
+
style: style.questionOrigin,
|
|
179
|
+
isTextCentered: true
|
|
180
|
+
}, questionOrigin)), /*#__PURE__*/React.createElement(View, {
|
|
181
|
+
style: style.questionTextContainer
|
|
182
|
+
}, /*#__PURE__*/React.createElement(Html, {
|
|
183
|
+
style: style.questionText,
|
|
184
|
+
isTextCentered: true
|
|
185
|
+
}, questionText)), /*#__PURE__*/React.createElement(View, {
|
|
186
|
+
style: style.questionHelpContainer
|
|
167
187
|
}, /*#__PURE__*/React.createElement(Html, {
|
|
168
|
-
style: style.questionOrigin
|
|
169
|
-
}, questionOrigin), /*#__PURE__*/React.createElement(Html, {
|
|
170
|
-
style: style.questionText
|
|
171
|
-
}, questionText), /*#__PURE__*/React.createElement(Html, {
|
|
172
188
|
style: style.questionHelp
|
|
173
|
-
}, get('help', answerUI))), /*#__PURE__*/React.createElement(ScrollView, {
|
|
189
|
+
}, get('help', answerUI)))), /*#__PURE__*/React.createElement(ScrollView, {
|
|
174
190
|
style: style.choicesScrollView,
|
|
175
191
|
contentContainerStyle: style.choicesScrollContent,
|
|
176
192
|
showsHorizontalScrollIndicator: false,
|