@ntbjs/react-components 2.0.3-rc.2 → 2.0.7-rc.1
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/build/data/Badge/Badge.js +1 -1
- package/build/data/Badge/Badge.js.map +1 -1
- package/build/data/Badge/Badge.styled.js +2 -3
- package/build/data/Badge/Badge.styled.js.map +1 -1
- package/build/hooks/useTooltipAutoShow.js +1 -1
- package/build/hooks/useTooltipAutoShow.js.map +1 -1
- package/build/inputs/ActionButton/ActionButton.js +9 -5
- package/build/inputs/ActionButton/ActionButton.js.map +1 -1
- package/build/inputs/ActionButton/ActionButton.styled.js +16 -13
- package/build/inputs/ActionButton/ActionButton.styled.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +4 -4
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +8 -8
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +5 -3
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +6 -6
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +5 -5
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js.map +1 -1
- package/build/widgets/Instructions/Instructions.js +0 -9
- package/build/widgets/Instructions/Instructions.js.map +1 -1
- package/package.json +1 -1
|
@@ -46,7 +46,7 @@ const Badge = React__default.forwardRef(function Badge({
|
|
|
46
46
|
$elevatedverticalPadding: verticalPadding,
|
|
47
47
|
$horizontalPadding: horizontalPadding,
|
|
48
48
|
height: height,
|
|
49
|
-
minHeight: minHeight,
|
|
49
|
+
$minHeight: minHeight,
|
|
50
50
|
width: width,
|
|
51
51
|
$minWidth: minWidth
|
|
52
52
|
}, badgeIcon && React__default.createElement(BadgeIcon, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sources":["../../../src/components/data/Badge/Badge.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport * as S from './Badge.styled';\n\n/**\n * Badges show a bubble containing a `number` or a `string`. It may be used by itself or with children passed as props\n * (to display a badge on top of an icon, for example, pass the icon as the child).\n *\n * If the badge content is passed as a `float`, it will be rounded up to the nearest `integer`,\n * and if the number is higher than 1 000 or 1 000 000 it will be abbreviated to for example \"1.4K\" or \"1.4M\" respectively.\n * If you need to display a `float` instead of a rounded `integer`, pass it as a `string` instead (e.g. \"1,4\").\n *\n * ### Import\n *\n * ``` js\n * import { Badge } from '@ntbjs/react-components/data'\n * // or\n * import Badge from '@ntbjs/react-components/data/Badge'\n * ```\n * ## Props\n * ```\n * Pass `badgeIcon={<svg></svg>}` to display an icon.\n * Pass a number or string to the badgeContent to display it alongside the icon.\n * Pass `align={\"left\"}`or `align={\"center\"}` to align content.\n * Pass `elevated={true}` to display the badge on top of the children\n * Pass `active={true}` to reflect the active status of the badge\n * Pass `error={true}` to reflect the error status of the badge\n * Pass `warning={true}` to reflect the warning status of the badge\n * Pass `fontSize={15}` to set the font size of the badge in pixel\n * Pass `fontWeight={500}` to set the font weight of the badge\n * Pass `lineHeight={12}` to set the line height of the badge in pixel\n * Pass `colors={[#ffffff, #000000]}` to set the font color of the badge\n * Pass `backgroundColors={[#ffffff, #000000]}` to set the background color of the badge\n * Pass `verticalPadding={15}` to set the bottom and top padding of the badge in pixel\n * Pass `horizontalPadding={20}` to set the left and right padding of the badge in pixel\n * Pass `height={24}` to set the height of the badge in pixel\n * Pass `minHeight={24}` to set the minimum height of the badge in pixel\n * Pass `width={50}` to set the width of the badge in pixel\n * Pass `minWidth={32}` to set the minimum width of the badge in pixel\n * ```\n */\nconst Badge = React.forwardRef(function Badge(\n {\n badgeContent,\n badgeIcon,\n children,\n elevated,\n fontSize,\n fontWeight,\n lineHeight,\n active,\n error,\n warning,\n backgroundColors,\n colors,\n verticalPadding,\n horizontalPadding,\n height,\n minHeight,\n width,\n minWidth,\n ...props\n },\n forwardedRef\n) {\n if (typeof badgeContent === 'number') {\n badgeContent = Intl.NumberFormat('en', { notation: 'compact' }).format(badgeContent);\n }\n\n return (\n <S.Badge ref={forwardedRef} $elevated={elevated} $hasChildren={Boolean(children)} {...props}>\n {children && <S.BadgeChildrenContainer>{children}</S.BadgeChildrenContainer>}\n {(badgeIcon || badgeContent) && (\n <S.BadgeLabel\n $backgroundColors={backgroundColors}\n $colors={colors}\n $elevated={elevated}\n fontSize={fontSize}\n fontWeight={fontWeight}\n $lineHeight={lineHeight}\n $active={active}\n $error={error}\n $warning={warning}\n $elevatedverticalPadding={verticalPadding}\n $horizontalPadding={horizontalPadding}\n height={height}\n minHeight={minHeight}\n width={width}\n $minWidth={minWidth}\n >\n {badgeIcon && <S.BadgeIcon $useGutter={!!badgeContent}>{badgeIcon}</S.BadgeIcon>}\n {badgeContent}\n </S.BadgeLabel>\n )}\n </S.Badge>\n );\n});\n\nBadge.propTypes = {\n /**\n * An Icon to show in the badge alongside with a text\n */\n badgeIcon: PropTypes.node,\n\n /**\n * Content to be showed in the badge – e.g. number of results.\n */\n badgeContent: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.func,\n PropTypes.element\n ]),\n\n /**\n * The element(s) for which the badge will be displayed – e.g. an icon or a text.\n */\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),\n\n /**\n * Whether the badge should be displayed in an elevated position on top of the child element(s) or not.\n */\n elevated: PropTypes.bool,\n\n /**\n * Whether the element is active or not (e.g. the currently selected menu item). This changes the color of the badge.\n */\n active: PropTypes.bool,\n\n /**\n * There is an error present – 'error be prioritized over warnings if both are set to `true`.\n */\n error: PropTypes.bool,\n\n /**\n * There is a warning present.\n */\n warning: PropTypes.bool,\n /**\n * Font size for the badge\n */\n fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Font weight for the badge\n */\n fontWeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Line weight for the badge\n */\n lineHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Colors of the font in the manner of [darkThemeColor, lightThemeColor]\n */\n colors: PropTypes.arrayOf(PropTypes.string),\n /**\n * Background colors for the badge in the manner of [darkThemeColor, lightThemeColor]\n */\n backgroundColors: PropTypes.arrayOf(PropTypes.string),\n /**\n * Top and bottom padding for the badge\n */\n verticalPadding: PropTypes.number,\n /**\n * Left and right padding for the badge\n */\n horizontalPadding: PropTypes.number,\n /**\n * Height of the badge\n */\n height: PropTypes.number,\n /**\n * Minimum height of the badge\n */\n minHeight: PropTypes.number,\n /**\n * Width of the badge\n */\n width: PropTypes.number,\n /**\n * Minimum width of the badge\n */\n minWidth: PropTypes.number\n};\n\nBadge.defaultProps = {\n elevated: false,\n active: false,\n error: false,\n warning: false,\n badgeIcon: null,\n fontWeight: 'normal',\n lineHeight: 'normal'\n};\n\nexport default Badge;\n"],"names":["Badge","React","forwardRef","badgeContent","badgeIcon","children","elevated","fontSize","fontWeight","lineHeight","active","error","warning","backgroundColors","colors","verticalPadding","horizontalPadding","height","minHeight","width","minWidth","props","forwardedRef","Intl","NumberFormat","notation","format","createElement","S","_extends","ref","$elevated","$hasChildren","Boolean","$backgroundColors","$colors","$lineHeight","$active","$error","$warning","$elevatedverticalPadding","$horizontalPadding","$minWidth","$useGutter","propTypes","process","env","NODE_ENV","PropTypes","node","oneOfType","string","number","func","element","bool","arrayOf","defaultProps"],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E3B,KAAM;AACd4B,IAAAA,QAAQ,EAAE3B,OAAQ;AAClB4B,IAAAA,wBAAwB,EAAEzB,eAAgB;AAC1C0B,IAAAA,kBAAkB,EAAEzB,iBAAkB;AACtCC,IAAAA,MAAM,EAAEA,MAAO;
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../../../src/components/data/Badge/Badge.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport * as S from './Badge.styled';\n\n/**\n * Badges show a bubble containing a `number` or a `string`. It may be used by itself or with children passed as props\n * (to display a badge on top of an icon, for example, pass the icon as the child).\n *\n * If the badge content is passed as a `float`, it will be rounded up to the nearest `integer`,\n * and if the number is higher than 1 000 or 1 000 000 it will be abbreviated to for example \"1.4K\" or \"1.4M\" respectively.\n * If you need to display a `float` instead of a rounded `integer`, pass it as a `string` instead (e.g. \"1,4\").\n *\n * ### Import\n *\n * ``` js\n * import { Badge } from '@ntbjs/react-components/data'\n * // or\n * import Badge from '@ntbjs/react-components/data/Badge'\n * ```\n * ## Props\n * ```\n * Pass `badgeIcon={<svg></svg>}` to display an icon.\n * Pass a number or string to the badgeContent to display it alongside the icon.\n * Pass `align={\"left\"}`or `align={\"center\"}` to align content.\n * Pass `elevated={true}` to display the badge on top of the children\n * Pass `active={true}` to reflect the active status of the badge\n * Pass `error={true}` to reflect the error status of the badge\n * Pass `warning={true}` to reflect the warning status of the badge\n * Pass `fontSize={15}` to set the font size of the badge in pixel\n * Pass `fontWeight={500}` to set the font weight of the badge\n * Pass `lineHeight={12}` to set the line height of the badge in pixel\n * Pass `colors={[#ffffff, #000000]}` to set the font color of the badge\n * Pass `backgroundColors={[#ffffff, #000000]}` to set the background color of the badge\n * Pass `verticalPadding={15}` to set the bottom and top padding of the badge in pixel\n * Pass `horizontalPadding={20}` to set the left and right padding of the badge in pixel\n * Pass `height={24}` to set the height of the badge in pixel\n * Pass `minHeight={24}` to set the minimum height of the badge in pixel\n * Pass `width={50}` to set the width of the badge in pixel\n * Pass `minWidth={32}` to set the minimum width of the badge in pixel\n * ```\n */\nconst Badge = React.forwardRef(function Badge(\n {\n badgeContent,\n badgeIcon,\n children,\n elevated,\n fontSize,\n fontWeight,\n lineHeight,\n active,\n error,\n warning,\n backgroundColors,\n colors,\n verticalPadding,\n horizontalPadding,\n height,\n minHeight,\n width,\n minWidth,\n ...props\n },\n forwardedRef\n) {\n if (typeof badgeContent === 'number') {\n badgeContent = Intl.NumberFormat('en', { notation: 'compact' }).format(badgeContent);\n }\n\n return (\n <S.Badge ref={forwardedRef} $elevated={elevated} $hasChildren={Boolean(children)} {...props}>\n {children && <S.BadgeChildrenContainer>{children}</S.BadgeChildrenContainer>}\n {(badgeIcon || badgeContent) && (\n <S.BadgeLabel\n $backgroundColors={backgroundColors}\n $colors={colors}\n $elevated={elevated}\n fontSize={fontSize}\n fontWeight={fontWeight}\n $lineHeight={lineHeight}\n $active={active}\n $error={error}\n $warning={warning}\n $elevatedverticalPadding={verticalPadding}\n $horizontalPadding={horizontalPadding}\n height={height}\n $minHeight={minHeight}\n width={width}\n $minWidth={minWidth}\n >\n {badgeIcon && <S.BadgeIcon $useGutter={!!badgeContent}>{badgeIcon}</S.BadgeIcon>}\n {badgeContent}\n </S.BadgeLabel>\n )}\n </S.Badge>\n );\n});\n\nBadge.propTypes = {\n /**\n * An Icon to show in the badge alongside with a text\n */\n badgeIcon: PropTypes.node,\n\n /**\n * Content to be showed in the badge – e.g. number of results.\n */\n badgeContent: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.func,\n PropTypes.element\n ]),\n\n /**\n * The element(s) for which the badge will be displayed – e.g. an icon or a text.\n */\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),\n\n /**\n * Whether the badge should be displayed in an elevated position on top of the child element(s) or not.\n */\n elevated: PropTypes.bool,\n\n /**\n * Whether the element is active or not (e.g. the currently selected menu item). This changes the color of the badge.\n */\n active: PropTypes.bool,\n\n /**\n * There is an error present – 'error be prioritized over warnings if both are set to `true`.\n */\n error: PropTypes.bool,\n\n /**\n * There is a warning present.\n */\n warning: PropTypes.bool,\n /**\n * Font size for the badge\n */\n fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Font weight for the badge\n */\n fontWeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Line weight for the badge\n */\n lineHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Colors of the font in the manner of [darkThemeColor, lightThemeColor]\n */\n colors: PropTypes.arrayOf(PropTypes.string),\n /**\n * Background colors for the badge in the manner of [darkThemeColor, lightThemeColor]\n */\n backgroundColors: PropTypes.arrayOf(PropTypes.string),\n /**\n * Top and bottom padding for the badge\n */\n verticalPadding: PropTypes.number,\n /**\n * Left and right padding for the badge\n */\n horizontalPadding: PropTypes.number,\n /**\n * Height of the badge\n */\n height: PropTypes.number,\n /**\n * Minimum height of the badge\n */\n minHeight: PropTypes.number,\n /**\n * Width of the badge\n */\n width: PropTypes.number,\n /**\n * Minimum width of the badge\n */\n minWidth: PropTypes.number\n};\n\nBadge.defaultProps = {\n elevated: false,\n active: false,\n error: false,\n warning: false,\n badgeIcon: null,\n fontWeight: 'normal',\n lineHeight: 'normal'\n};\n\nexport default Badge;\n"],"names":["Badge","React","forwardRef","badgeContent","badgeIcon","children","elevated","fontSize","fontWeight","lineHeight","active","error","warning","backgroundColors","colors","verticalPadding","horizontalPadding","height","minHeight","width","minWidth","props","forwardedRef","Intl","NumberFormat","notation","format","createElement","S","_extends","ref","$elevated","$hasChildren","Boolean","$backgroundColors","$colors","$lineHeight","$active","$error","$warning","$elevatedverticalPadding","$horizontalPadding","$minHeight","$minWidth","$useGutter","propTypes","process","env","NODE_ENV","PropTypes","node","oneOfType","string","number","func","element","bool","arrayOf","defaultProps"],"mappings":";;;;;AAyCMA,MAAAA,KAAK,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,KAAKA,CAC3C;EACEG,YAAY;EACZC,SAAS;EACTC,QA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,SAAS,CAACG,MAAM,CAAC,CAAC;EAIrEtC,MAAM,EAAEmC,SAAS,CAACQ,OAAO,CAACR,SAAS,CAACG,MAAM,CAAC;EAI3CvC,gBAAgB,EAAEoC,SAAS,CAACQ,OAAO,CAACR,SAAS,CAACG,MAAM,CAAC;EAIrDrC,eAAe,EAAEkC,SAAS,CAACI,MAAM;EAIjCrC,iBAAiB,EAAEiC,SAAS,CAACI,MAAM;EAInCpC,MAAM,EAAEgC,SAAS,CAACI,MAAM;EAIxBnC,SAAS,EAAE+B,SAAS,CAACI,MAAM;EAI3BlC,KAAK,EAAE8B,SAAS,CAACI,MAAM;EAIvBjC,QAAQ,EAAE6B,SAAS,CAACI,MAAAA;AACtB,CAAC,GAAA,EAAA,CAAA;AAEDrD,KAAK,CAAC0D,YAAY,GAAG;AACnBpD,EAAAA,QAAQ,EAAE,KAAK;AACfI,EAAAA,MAAM,EAAE,KAAK;AACbC,EAAAA,KAAK,EAAE,KAAK;AACZC,EAAAA,OAAO,EAAE,KAAK;AACdR,EAAAA,SAAS,EAAE,IAAI;AACfI,EAAAA,UAAU,EAAE,QAAQ;AACpBC,EAAAA,UAAU,EAAE,QAAA;AACd,CAAC;;;;"}
|
|
@@ -56,10 +56,9 @@ const BadgeLabel = styled.span.withConfig({
|
|
|
56
56
|
min-width: ${props.$minWidth}px;
|
|
57
57
|
` : null}
|
|
58
58
|
|
|
59
|
-
${props => props
|
|
60
|
-
min-height: ${props
|
|
59
|
+
${props => props.$minHeight ? css`
|
|
60
|
+
min-height: ${props.$minHeight}px;
|
|
61
61
|
` : null}
|
|
62
|
-
|
|
63
62
|
|
|
64
63
|
${props => {
|
|
65
64
|
const verticalPadding = props.verticalPadding ? `${props.verticalPadding}px` : props.$elevated ? '4px' : '6px';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.styled.js","sources":["../../../src/components/data/Badge/Badge.styled.js"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\n\nconst shouldForwardProp = prop => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const Badge = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n align-content: center;\n display: ${props => (props.$elevated || !props.$hasChildren ? 'inline-flex' : 'flex')};\n font-family: ${props => props.theme.primaryFontFamily};\n font-size: 1rem;\n font-weight: 500;\n min-height: 24px;\n position: relative;\n width: ${props => (props.$elevated ? 'fit-content' : 'initial')};\n`;\n\nexport const BadgeChildrenContainer = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n align-self: center;\n height: fit-content;\n margin-right: 8px;\n`;\n\nexport const BadgeLabel = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n border-radius: ${props => (props.$elevated ? '12px' : '14px')};\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n\n font-size: ${props => {\n if (props.fontSize) {\n return `${props.fontSize}px`;\n } else {\n return props.elevated ? '0.625rem' : '0.750rem';\n }\n }};\n font-weight: ${props => (props.fontWeight ? props.fontWeight : 'normal')};\n line-height: ${props => (props.$lineHeight ? `${props.$lineHeight}px` : 'normal')};\n height: ${props => (props.height ? `${props.height}px` : 'fit-content')};\n letter-spacing: 0.32px;\n margin-left: ${props => (props.$elevated ? '15px' : 'auto')};\n position: ${props => (props.$elevated ? 'absolute' : 'initial')};\n right: 0;\n transform: ${props => (props.$elevated ? 'translate(33%, -8px)' : 'initial')};\n\n ${props =>\n props.width\n ? css`\n width: ${props.width}px;\n `\n : null}\n\n ${props =>\n props.$minWidth\n ? css`\n min-width: ${props.$minWidth}px;\n `\n : null}\n\n ${props =>\n props.minHeight\n ? css`\n min-height: ${props.minHeight}px;\n `\n : null}\n \n\n ${props => {\n const verticalPadding = props.verticalPadding\n ? `${props.verticalPadding}px`\n : props.$elevated\n ? '4px'\n : '6px';\n const horizontalPadding = props.$horizontalPadding\n ? `${props.$horizontalPadding}px`\n : props.$elevated\n ? '7px'\n : '10px';\n return css`\n padding: ${verticalPadding} ${horizontalPadding};\n `;\n }}\n\n ${props =>\n props.theme.themeProp(\n 'background',\n () => {\n const active = props.$active;\n const error = props.$error;\n const warning = props.$warning;\n\n const defaultBgColor = props?.backgroundColors?.[0] ?? props.theme.getColor('gray-600');\n\n switch (true) {\n case !error && !warning && !active:\n return defaultBgColor;\n\n case !error && !warning && active:\n return props.theme.getColor('gray-700');\n\n case error && active:\n return props.theme.getColor('red-500');\n\n case error:\n return props.theme.getColor('red-200');\n\n case warning && active:\n return props.theme.getColor('signal-yellow-500');\n\n case warning:\n return props.theme.getColor('signal-yellow-400');\n\n default:\n return props.theme.getColor('gray-600');\n }\n },\n () => {\n const active = props.$active;\n const error = props.$error;\n const warning = props.$warning;\n\n const defaultBgColor = props?.$backgroundColors?.[1] ?? props.theme.getColor('gray-200');\n\n switch (true) {\n case !error && !warning && !active:\n return defaultBgColor;\n\n case !error && !warning && active:\n return props.theme.getColor('white');\n\n case error && active:\n return props.theme.getColor('red-500');\n\n case error:\n return props.theme.getColor('red-200');\n\n case warning && active:\n return props.theme.getColor('signal-yellow-500');\n\n case warning:\n return props.theme.getColor('signal-yellow-400');\n\n default:\n return props.theme.getColor('gray-200');\n }\n }\n )}\n\n ${props =>\n props.theme.themeProp(\n 'color',\n () => {\n const defaultColor = props?.$colors?.[0] ?? props.theme.getColor('white');\n if ((props.$warning && !props.$error) || (props.error && !props.$active)) {\n return props.theme.getColor('gray-900');\n } else {\n return defaultColor;\n }\n },\n () => {\n const defaultColor = props?.$colors?.[1] ?? props.theme.getColor('gray-900');\n if (props.$error && props.$active) {\n return props.theme.getColor('white');\n } else {\n return defaultColor;\n }\n }\n )}\n`;\n\nexport const BadgeIcon = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n margin-right: ${props => (props.$useGutter ? '4px' : 0)};\n svg {\n height: 12px;\n }\n`;\n"],"names":["shouldForwardProp","prop","startsWith","Badge","styled","span","withConfig","attrs","applyDefaultTheme","props","$elevated","$hasChildren","theme","primaryFontFamily","BadgeChildrenContainer","BadgeLabel","fontSize","elevated","fontWeight","$lineHeight","height","width","css","$minWidth","minHeight","verticalPadding","horizontalPadding","$horizontalPadding","themeProp","active","$active","error","$error","warning","$warning","defaultBgColor","backgroundColors","getColor","$backgroundColors","defaultColor","$colors","BadgeIcon","$useGutter"],"mappings":";;;AAGA,MAAMA,iBAAiB,GAAGC,IAAI,IAAI;EAChC,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,CAAA;AAClD,CAAC,CAAA;AAEM,MAAMC,KAAK,GAAGC,MAAM,CAACC,IAAI,CAC7BC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA,WAAA,EAAaC,KAAK,IAAKA,KAAK,CAACC,SAAS,IAAI,CAACD,KAAK,CAACE,YAAY,GAAG,aAAa,GAAG,MAAO,CAAA;AACvF,eAAA,EAAiBF,KAAK,IAAIA,KAAK,CAACG,KAAK,CAACC,iBAAiB,CAAA;AACvD;AACA;AACA;AACA;AACA,SAAWJ,EAAAA,KAAK,IAAKA,KAAK,CAACC,SAAS,GAAG,aAAa,GAAG,SAAU,CAAA;AACjE,EAAC;AAEM,MAAMI,sBAAsB,GAAGV,MAAM,CAACC,IAAI,CAC9CC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA;AACA,EAAC;AAEM,MAAMO,UAAU,GAAGX,MAAM,CAACC,IAAI,CAClCC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B,iBAAmBC,EAAAA,KAAK,IAAKA,KAAK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AAC5E,EAAA,IAAI5B,KAAK,CAACuB,MAAM,IAAIvB,KAAK,CAACqB,OAAO,EAAE;AACjC,IAAA,OAAOrB,KAAK,CAACG,KAAK,CAACyB,QAAQ,CAAC,OAAO,CAAC,CAAA;AACtC,GAAC,MAAM;AACL,IAAA,OAAOE,YAAY,CAAA;AACrB,GAAA;AACF,CACF,CAAC,CAAA;AACP,EAAC;AAEM,MAAME,SAAS,GAAGrC,MAAM,CAACC,IAAI,CACjCC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA,gBAAkBC,EAAAA,KAAK,IAAKA,KAAK,CAACiC,UAAU,GAAG,KAAK,GAAG,CAAE,CAAA;AACzD;AACA;AACA;AACA;;;;"}
|
|
1
|
+
{"version":3,"file":"Badge.styled.js","sources":["../../../src/components/data/Badge/Badge.styled.js"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\n\nconst shouldForwardProp = prop => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const Badge = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n align-content: center;\n display: ${props => (props.$elevated || !props.$hasChildren ? 'inline-flex' : 'flex')};\n font-family: ${props => props.theme.primaryFontFamily};\n font-size: 1rem;\n font-weight: 500;\n min-height: 24px;\n position: relative;\n width: ${props => (props.$elevated ? 'fit-content' : 'initial')};\n`;\n\nexport const BadgeChildrenContainer = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n align-self: center;\n height: fit-content;\n margin-right: 8px;\n`;\n\nexport const BadgeLabel = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n border-radius: ${props => (props.$elevated ? '12px' : '14px')};\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n\n font-size: ${props => {\n if (props.fontSize) {\n return `${props.fontSize}px`;\n } else {\n return props.elevated ? '0.625rem' : '0.750rem';\n }\n }};\n font-weight: ${props => (props.fontWeight ? props.fontWeight : 'normal')};\n line-height: ${props => (props.$lineHeight ? `${props.$lineHeight}px` : 'normal')};\n height: ${props => (props.height ? `${props.height}px` : 'fit-content')};\n letter-spacing: 0.32px;\n margin-left: ${props => (props.$elevated ? '15px' : 'auto')};\n position: ${props => (props.$elevated ? 'absolute' : 'initial')};\n right: 0;\n transform: ${props => (props.$elevated ? 'translate(33%, -8px)' : 'initial')};\n\n ${props =>\n props.width\n ? css`\n width: ${props.width}px;\n `\n : null}\n\n ${props =>\n props.$minWidth\n ? css`\n min-width: ${props.$minWidth}px;\n `\n : null}\n\n ${props =>\n props.$minHeight\n ? css`\n min-height: ${props.$minHeight}px;\n `\n : null}\n\n ${props => {\n const verticalPadding = props.verticalPadding\n ? `${props.verticalPadding}px`\n : props.$elevated\n ? '4px'\n : '6px';\n const horizontalPadding = props.$horizontalPadding\n ? `${props.$horizontalPadding}px`\n : props.$elevated\n ? '7px'\n : '10px';\n return css`\n padding: ${verticalPadding} ${horizontalPadding};\n `;\n }}\n\n ${props =>\n props.theme.themeProp(\n 'background',\n () => {\n const active = props.$active;\n const error = props.$error;\n const warning = props.$warning;\n\n const defaultBgColor = props?.backgroundColors?.[0] ?? props.theme.getColor('gray-600');\n\n switch (true) {\n case !error && !warning && !active:\n return defaultBgColor;\n\n case !error && !warning && active:\n return props.theme.getColor('gray-700');\n\n case error && active:\n return props.theme.getColor('red-500');\n\n case error:\n return props.theme.getColor('red-200');\n\n case warning && active:\n return props.theme.getColor('signal-yellow-500');\n\n case warning:\n return props.theme.getColor('signal-yellow-400');\n\n default:\n return props.theme.getColor('gray-600');\n }\n },\n () => {\n const active = props.$active;\n const error = props.$error;\n const warning = props.$warning;\n\n const defaultBgColor = props?.$backgroundColors?.[1] ?? props.theme.getColor('gray-200');\n\n switch (true) {\n case !error && !warning && !active:\n return defaultBgColor;\n\n case !error && !warning && active:\n return props.theme.getColor('white');\n\n case error && active:\n return props.theme.getColor('red-500');\n\n case error:\n return props.theme.getColor('red-200');\n\n case warning && active:\n return props.theme.getColor('signal-yellow-500');\n\n case warning:\n return props.theme.getColor('signal-yellow-400');\n\n default:\n return props.theme.getColor('gray-200');\n }\n }\n )}\n\n ${props =>\n props.theme.themeProp(\n 'color',\n () => {\n const defaultColor = props?.$colors?.[0] ?? props.theme.getColor('white');\n if ((props.$warning && !props.$error) || (props.error && !props.$active)) {\n return props.theme.getColor('gray-900');\n } else {\n return defaultColor;\n }\n },\n () => {\n const defaultColor = props?.$colors?.[1] ?? props.theme.getColor('gray-900');\n if (props.$error && props.$active) {\n return props.theme.getColor('white');\n } else {\n return defaultColor;\n }\n }\n )}\n`;\n\nexport const BadgeIcon = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n margin-right: ${props => (props.$useGutter ? '4px' : 0)};\n svg {\n height: 12px;\n }\n`;\n"],"names":["shouldForwardProp","prop","startsWith","Badge","styled","span","withConfig","attrs","applyDefaultTheme","props","$elevated","$hasChildren","theme","primaryFontFamily","BadgeChildrenContainer","BadgeLabel","fontSize","elevated","fontWeight","$lineHeight","height","width","css","$minWidth","$minHeight","verticalPadding","horizontalPadding","$horizontalPadding","themeProp","active","$active","error","$error","warning","$warning","defaultBgColor","backgroundColors","getColor","$backgroundColors","defaultColor","$colors","BadgeIcon","$useGutter"],"mappings":";;;AAGA,MAAMA,iBAAiB,GAAGC,IAAI,IAAI;EAChC,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,CAAA;AAClD,CAAC,CAAA;AAEM,MAAMC,KAAK,GAAGC,MAAM,CAACC,IAAI,CAC7BC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA,WAAA,EAAaC,KAAK,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content) {
|
|
4
|
-
const displayContent = useRef(content);
|
|
4
|
+
const displayContent = useRef(content || '');
|
|
5
5
|
const prevContentRef = useRef(content);
|
|
6
6
|
const [forceVisible, setForceVisible] = useState(false);
|
|
7
7
|
const toolTipDisabled = !content;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTooltipAutoShow.js","sources":["../../src/hooks/useTooltipAutoShow.js"],"sourcesContent":["import { useRef, useState, useEffect } from 'react';\n\n/**\n * Tracks a tooltip's content and automatically forces it to be visible when the\n * content transitions from empty → non-empty, then defaults to trigger prop.\n */\nfunction useTooltipAutoShow(content) {\n const displayContent = useRef(content);\n const prevContentRef = useRef(content);\n const [forceVisible, setForceVisible] = useState(false);\n\n const toolTipDisabled = !content;\n const toolTipVisible = forceVisible ? true : undefined;\n\n useEffect(() => {\n if (content) {\n displayContent.current = content;\n }\n\n return () => {};\n }, [content]);\n\n if (prevContentRef.current !== content) {\n const appeared = content && !prevContentRef.current;\n const disappeared = !content;\n\n if (appeared) setForceVisible(true);\n else if (disappeared) setForceVisible(false);\n\n prevContentRef.current = content;\n }\n\n return {\n toolTipOnMouseLeave: () => setForceVisible(false),\n toolTipContent: displayContent.current,\n toolTipDisabled,\n toolTipVisible\n };\n}\n\nexport default useTooltipAutoShow;\n"],"names":["useTooltipAutoShow","content","displayContent","useRef","prevContentRef","forceVisible","setForceVisible","useState","toolTipDisabled","toolTipVisible","undefined","useEffect","current","appeared","disappeared","toolTipOnMouseLeave","toolTipContent"],"mappings":";;AAMA,SAASA,kBAAkBA,CAACC,OAAO,EAAE;AACnC,EAAA,MAAMC,cAAc,GAAGC,MAAM,CAACF,OAAO,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"useTooltipAutoShow.js","sources":["../../src/hooks/useTooltipAutoShow.js"],"sourcesContent":["import { useRef, useState, useEffect } from 'react';\n\n/**\n * Tracks a tooltip's content and automatically forces it to be visible when the\n * content transitions from empty → non-empty, then defaults to trigger prop.\n */\nfunction useTooltipAutoShow(content) {\n const displayContent = useRef(content || '');\n const prevContentRef = useRef(content);\n const [forceVisible, setForceVisible] = useState(false);\n\n const toolTipDisabled = !content;\n const toolTipVisible = forceVisible ? true : undefined;\n\n useEffect(() => {\n if (content) {\n displayContent.current = content;\n }\n\n return () => {};\n }, [content]);\n\n if (prevContentRef.current !== content) {\n const appeared = content && !prevContentRef.current;\n const disappeared = !content;\n\n if (appeared) setForceVisible(true);\n else if (disappeared) setForceVisible(false);\n\n prevContentRef.current = content;\n }\n\n return {\n toolTipOnMouseLeave: () => setForceVisible(false),\n toolTipContent: displayContent.current,\n toolTipDisabled,\n toolTipVisible\n };\n}\n\nexport default useTooltipAutoShow;\n"],"names":["useTooltipAutoShow","content","displayContent","useRef","prevContentRef","forceVisible","setForceVisible","useState","toolTipDisabled","toolTipVisible","undefined","useEffect","current","appeared","disappeared","toolTipOnMouseLeave","toolTipContent"],"mappings":";;AAMA,SAASA,kBAAkBA,CAACC,OAAO,EAAE;AACnC,EAAA,MAAMC,cAAc,GAAGC,MAAM,CAACF,OAAO,IAAI,EAAE,CAAC,CAAA;AAC5C,EAAA,MAAMG,cAAc,GAAGD,MAAM,CAACF,OAAO,CAAC,CAAA;EACtC,MAAM,CAACI,YAAY,EAAEC,eAAe,CAAC,GAAGC,QAAQ,CAAC,KAAK,CAAC,CAAA;EAEvD,MAAMC,eAAe,GAAG,CAACP,OAAO,CAAA;AAChC,EAAA,MAAMQ,cAAc,GAAGJ,YAAY,GAAG,IAAI,GAAGK,SAAS,CAAA;AAEtDC,EAAAA,SAAS,CAAC,MAAM;AACd,IAAA,IAAIV,OAAO,EAAE;MACXC,cAAc,CAACU,OAAO,GAAGX,OAAO,CAAA;AAClC,KAAA;IAEA,OAAO,MAAM,EAAE,CAAA;AACjB,GAAC,EAAE,CAACA,OAAO,CAAC,CAAC,CAAA;AAEb,EAAA,IAAIG,cAAc,CAACQ,OAAO,KAAKX,OAAO,EAAE;AACtC,IAAA,MAAMY,QAAQ,GAAGZ,OAAO,IAAI,CAACG,cAAc,CAACQ,OAAO,CAAA;IACnD,MAAME,WAAW,GAAG,CAACb,OAAO,CAAA;AAE5B,IAAA,IAAIY,QAAQ,EAAEP,eAAe,CAAC,IAAI,CAAC,CAAC,KAC/B,IAAIQ,WAAW,EAAER,eAAe,CAAC,KAAK,CAAC,CAAA;IAE5CF,cAAc,CAACQ,OAAO,GAAGX,OAAO,CAAA;AAClC,GAAA;EAEA,OAAO;AACLc,IAAAA,mBAAmB,EAAEA,MAAMT,eAAe,CAAC,KAAK,CAAC;IACjDU,cAAc,EAAEd,cAAc,CAACU,OAAO;IACtCJ,eAAe;AACfC,IAAAA,cAAAA;GACD,CAAA;AACH;;;;"}
|
|
@@ -9,16 +9,18 @@ const ActionButton = React__default.forwardRef(function ActionButton({
|
|
|
9
9
|
active,
|
|
10
10
|
onClick,
|
|
11
11
|
actionWidthHeight,
|
|
12
|
+
useShadow,
|
|
12
13
|
backgroundColors,
|
|
13
14
|
...props
|
|
14
15
|
}, forwardedRef) {
|
|
15
16
|
return React__default.createElement(ActionButton$1, _extends({
|
|
16
17
|
ref: forwardedRef,
|
|
17
18
|
disabled: disabled,
|
|
18
|
-
active: active,
|
|
19
|
+
$active: active,
|
|
19
20
|
onClick: onClick,
|
|
20
|
-
actionWidthHeight: actionWidthHeight,
|
|
21
|
-
backgroundColors: backgroundColors
|
|
21
|
+
$actionWidthHeight: actionWidthHeight,
|
|
22
|
+
$backgroundColors: backgroundColors,
|
|
23
|
+
$useShadow: useShadow
|
|
22
24
|
}, props), icon);
|
|
23
25
|
});
|
|
24
26
|
ActionButton.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -27,11 +29,13 @@ ActionButton.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
27
29
|
active: PropTypes.bool,
|
|
28
30
|
onClick: PropTypes.func,
|
|
29
31
|
backgroundColors: PropTypes.arrayOf(PropTypes.string),
|
|
30
|
-
actionWidthHeight: PropTypes.array
|
|
32
|
+
actionWidthHeight: PropTypes.array,
|
|
33
|
+
useShadow: PropTypes.bool
|
|
31
34
|
} : {};
|
|
32
35
|
ActionButton.defaultProps = {
|
|
33
36
|
onClick: () => {},
|
|
34
|
-
actionWidthHeight: [40, 40]
|
|
37
|
+
actionWidthHeight: [40, 40],
|
|
38
|
+
useShadow: false
|
|
35
39
|
};
|
|
36
40
|
|
|
37
41
|
export { ActionButton as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButton.js","sources":["../../../src/components/inputs/ActionButton/ActionButton.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport * as S from './ActionButton.styled';\n\n/**\n * An action button.\n *\n * ### Import\n *\n * ``` js\n * import { ActionButton } from '@ntbjs/react-components/inputs'\n * // or\n * import ActionButton from '@ntbjs/react-components/inputs/ActionButton'\n * ```\n *\n * ### Props\n * ```\n * Pass `icon={<svg></svg>}` to display an icon.\n * Pass `disabled={true}` to disable the button.\n * Pass `active={true}` to lock the hover state of the button.\n * Pass `onClick={() => {}}` to add an on-click effect.\n * Pass `backgroundColors={[#ffffff, #000000]}` to set the background color of the button\n * ```\n */\nconst ActionButton = React.forwardRef(function ActionButton(\n { icon, disabled, active, onClick, actionWidthHeight, backgroundColors, ...props },\n forwardedRef\n) {\n return (\n <S.ActionButton\n ref={forwardedRef}\n disabled={disabled}\n active={active}\n onClick={onClick}\n actionWidthHeight={actionWidthHeight}\n backgroundColors={backgroundColors}\n {...props}\n >\n {icon}\n </S.ActionButton>\n );\n});\n\nActionButton.propTypes = {\n /**\n * Icon element – e.g: `icon={<SvgAddCircle />}`\n */\n icon: PropTypes.element.isRequired,\n /**\n * Disable the action button\n */\n disabled: PropTypes.bool,\n /**\n * Locks the hover state of the `ActionButton` – this prop only affects the visual appearance of the\n * `ActionButton`\n */\n active: PropTypes.bool,\n /**\n * On-click effect for the action button\n */\n onClick: PropTypes.func,\n /**\n * Color of the button background as an array of [darkThemeColor, lightThemeColor]\n */\n backgroundColors: PropTypes.arrayOf(PropTypes.string),\n /**\n * Width and Height of the Action Button [50, 50]\n */\n actionWidthHeight: PropTypes.array\n};\n\nActionButton.defaultProps = {\n onClick: () => {},\n actionWidthHeight: [40, 40]\n};\n\nexport default ActionButton;\n"],"names":["ActionButton","React","forwardRef","icon","disabled","active","onClick","actionWidthHeight","backgroundColors","props","forwardedRef","createElement","S","_extends","ref","propTypes","process","env","NODE_ENV","PropTypes","element","isRequired","bool","func","arrayOf","string","array","defaultProps"],"mappings":";;;;;AAwBMA,MAAAA,YAAY,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,YAAYA,CACzD;EAAEG,IAAI;EAAEC,QAAQ;EAAEC,MAAM;EAAEC,OAAO;EAAEC,iBAAiB;EAAEC,gBAAgB;EAAE,GAAGC,KAAAA;AAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"ActionButton.js","sources":["../../../src/components/inputs/ActionButton/ActionButton.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport * as S from './ActionButton.styled';\n\n/**\n * An action button.\n *\n * ### Import\n *\n * ``` js\n * import { ActionButton } from '@ntbjs/react-components/inputs'\n * // or\n * import ActionButton from '@ntbjs/react-components/inputs/ActionButton'\n * ```\n *\n * ### Props\n * ```\n * Pass `icon={<svg></svg>}` to display an icon.\n * Pass `disabled={true}` to disable the button.\n * Pass `active={true}` to lock the hover state of the button.\n * Pass `onClick={() => {}}` to add an on-click effect.\n * Pass `backgroundColors={[#ffffff, #000000]}` to set the background color of the button\n * ```\n */\nconst ActionButton = React.forwardRef(function ActionButton(\n { icon, disabled, active, onClick, actionWidthHeight, useShadow, backgroundColors, ...props },\n forwardedRef\n) {\n return (\n <S.ActionButton\n ref={forwardedRef}\n disabled={disabled}\n $active={active}\n onClick={onClick}\n $actionWidthHeight={actionWidthHeight}\n $backgroundColors={backgroundColors}\n $useShadow={useShadow}\n {...props}\n >\n {icon}\n </S.ActionButton>\n );\n});\n\nActionButton.propTypes = {\n /**\n * Icon element – e.g: `icon={<SvgAddCircle />}`\n */\n icon: PropTypes.element.isRequired,\n /**\n * Disable the action button\n */\n disabled: PropTypes.bool,\n /**\n * Locks the hover state of the `ActionButton` – this prop only affects the visual appearance of the\n * `ActionButton`\n */\n active: PropTypes.bool,\n /**\n * On-click effect for the action button\n */\n onClick: PropTypes.func,\n /**\n * Color of the button background as an array of [darkThemeColor, lightThemeColor]\n */\n backgroundColors: PropTypes.arrayOf(PropTypes.string),\n /**\n * Width and Height of the Action Button [50, 50]\n */\n actionWidthHeight: PropTypes.array,\n /**\n *Use shadow for the action button\n */\n useShadow: PropTypes.bool\n};\n\nActionButton.defaultProps = {\n onClick: () => {},\n actionWidthHeight: [40, 40],\n useShadow: false\n};\n\nexport default ActionButton;\n"],"names":["ActionButton","React","forwardRef","icon","disabled","active","onClick","actionWidthHeight","useShadow","backgroundColors","props","forwardedRef","createElement","S","_extends","ref","$active","$actionWidthHeight","$backgroundColors","$useShadow","propTypes","process","env","NODE_ENV","PropTypes","element","isRequired","bool","func","arrayOf","string","array","defaultProps"],"mappings":";;;;;AAwBMA,MAAAA,YAAY,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,YAAYA,CACzD;EAAEG,IAAI;EAAEC,QAAQ;EAAEC,MAAM;EAAEC,OAAO;EAAEC,iBAAiB;EAAEC,SAAS;EAAEC,gBAAgB;EAAE,GAAGC,KAAAA;AAAM,CAAC,EAC7FC,YAAY,EACZ;EACA,OACEV,cAAA,CAAAW,aAAA,CAACC,cAAc,EAAAC,QAAA,CAAA;AACbC,IAAAA,GAAG,EAAEJ,YAAa;AAClBP,IAAAA,QAAQ,EAAEA,QAAS;AACnBY,IAAAA,OAAO,EAAEX,MAAO;AAChBC,IAAAA,OAAO,EAAEA,OAAQ;AACjBW,IAAAA,kBAAkB,EAAEV,iBAAkB;AACtCW,IAAAA,iBAAiB,EAAET,gBAAiB;AACpCU,IAAAA,UAAU,EAAEX,SAAAA;GACRE,EAAAA,KAAK,CAERP,EAAAA,IACa,CAAC,CAAA;AAErB,CAAC,EAAC;AAEFH,YAAY,CAACoB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,KAAG,YAAA,GAAA;AAIvBpB,EAAAA,IAAI,EAAEqB,SAAS,CAACC,OAAO,CAACC,UAAU;EAIlCtB,QAAQ,EAAEoB,SAAS,CAACG,IAAI;EAKxBtB,MAAM,EAAEmB,SAAS,CAACG,IAAI;EAItBrB,OAAO,EAAEkB,SAAS,CAACI,IAAI;EAIvBnB,gBAAgB,EAAEe,SAAS,CAACK,OAAO,CAACL,SAAS,CAACM,MAAM,CAAC;EAIrDvB,iBAAiB,EAAEiB,SAAS,CAACO,KAAK;EAIlCvB,SAAS,EAAEgB,SAAS,CAACG,IAAAA;AACvB,CAAC,GAAA,EAAA,CAAA;AAED3B,YAAY,CAACgC,YAAY,GAAG;AAC1B1B,EAAAA,OAAO,EAAEA,MAAM,EAAE;AACjBC,EAAAA,iBAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;AAC3BC,EAAAA,SAAS,EAAE,KAAA;AACb,CAAC;;;;"}
|
|
@@ -2,13 +2,16 @@ import styled, { css } from 'styled-components';
|
|
|
2
2
|
import { rgba } from 'polished';
|
|
3
3
|
import { applyDefaultTheme } from '../../utils/defaultTheme.js';
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const shouldForwardProp = prop => prop !== 'theme' && !prop.startsWith('$');
|
|
6
|
+
const ActionButton = styled.button.withConfig({
|
|
7
|
+
shouldForwardProp
|
|
8
|
+
}).attrs(applyDefaultTheme)`
|
|
6
9
|
display: inline-flex;
|
|
7
10
|
justify-content: center;
|
|
8
11
|
align-items: center;
|
|
9
12
|
border-radius: 50%;
|
|
10
|
-
width: ${props => `${props
|
|
11
|
-
height: ${props => `${props
|
|
13
|
+
width: ${props => `${props.$actionWidthHeight[0]}px`};
|
|
14
|
+
height: ${props => `${props.$actionWidthHeight[1]}px`};
|
|
12
15
|
border: 0;
|
|
13
16
|
color: inherit;
|
|
14
17
|
background-color: transparent;
|
|
@@ -20,30 +23,30 @@ const ActionButton = styled.button.attrs(applyDefaultTheme)`
|
|
|
20
23
|
cursor: pointer;
|
|
21
24
|
|
|
22
25
|
${props => {
|
|
23
|
-
const darkThemeBgColor = props
|
|
24
|
-
const lightThemeBgColor = props
|
|
26
|
+
const darkThemeBgColor = props?.$backgroundColors?.[0] ?? props.theme.getColor('gray-600');
|
|
27
|
+
const lightThemeBgColor = props?.$backgroundColors?.[1] ?? props.theme.getColor('gray-200');
|
|
25
28
|
return props.theme.themeProp('background-image', `radial-gradient(circle at center, ${darkThemeBgColor} 50%, transparent 51%)`, `radial-gradient(circle at center, ${lightThemeBgColor} 50%, transparent 51%)`);
|
|
26
29
|
}}
|
|
27
30
|
|
|
28
31
|
&:hover:not(:disabled) {
|
|
29
|
-
background-size: ${props => Math.max(props
|
|
30
|
-
${props => Math.max(props
|
|
32
|
+
background-size: ${props => Math.max(props.$actionWidthHeight[0], props.$actionWidthHeight[1]) * 2}px
|
|
33
|
+
${props => Math.max(props.$actionWidthHeight[0], props.$actionWidthHeight[1]) * 2}px;
|
|
31
34
|
|
|
32
35
|
svg {
|
|
33
36
|
${props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-700'))};
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
|
|
37
|
-
${props => props
|
|
38
|
-
background-size: ${Math.max(props
|
|
39
|
-
${Math.max(props
|
|
40
|
+
${props => props.$active && css`
|
|
41
|
+
background-size: ${Math.max(props.$actionWidthHeight[0], props.$actionWidthHeight[1]) * 2}px
|
|
42
|
+
${Math.max(props.$actionWidthHeight[0], props.$actionWidthHeight[1]) * 2}px;
|
|
40
43
|
|
|
41
44
|
svg {
|
|
42
45
|
${props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-700'))};
|
|
43
46
|
}
|
|
44
47
|
`}
|
|
45
48
|
|
|
46
|
-
${props => props
|
|
49
|
+
${props => props.$useShadow ? props.theme.themeProp('box-shadow', `0px 3px 6px ${rgba(props.theme.getColor('black'), 0.7)}`, `0px 3px 6px ${props.theme.getColor('black')}`) : null}
|
|
47
50
|
|
|
48
51
|
&:disabled {
|
|
49
52
|
opacity: 0.5;
|
|
@@ -53,8 +56,8 @@ const ActionButton = styled.button.attrs(applyDefaultTheme)`
|
|
|
53
56
|
|
|
54
57
|
svg {
|
|
55
58
|
width: 100%;
|
|
56
|
-
max-width: ${props => `${props
|
|
57
|
-
max-height: ${props => `${props
|
|
59
|
+
max-width: ${props => `${props.$actionWidthHeight[0] - 15}px`};
|
|
60
|
+
max-height: ${props => `${props.$actionWidthHeight[1] - 15}px`};
|
|
58
61
|
pointer-events: none;
|
|
59
62
|
transition: color 250ms;
|
|
60
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButton.styled.js","sources":["../../../src/components/inputs/ActionButton/ActionButton.styled.js"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { rgba } from 'polished';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\n\nexport const ActionButton = styled.button.attrs(applyDefaultTheme)`\n display: inline-flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n width: ${props => `${props
|
|
1
|
+
{"version":3,"file":"ActionButton.styled.js","sources":["../../../src/components/inputs/ActionButton/ActionButton.styled.js"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { rgba } from 'polished';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\n\nconst shouldForwardProp = prop => prop !== 'theme' && !prop.startsWith('$');\n\nexport const ActionButton = styled.button\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: inline-flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n width: ${props => `${props.$actionWidthHeight[0]}px`};\n height: ${props => `${props.$actionWidthHeight[1]}px`};\n border: 0;\n color: inherit;\n background-color: transparent;\n\n background-position: center;\n background-repeat: no-repeat;\n background-size: 0 0;\n transition: background-size 250ms ease;\n cursor: pointer;\n\n ${props => {\n const darkThemeBgColor = props?.$backgroundColors?.[0] ?? props.theme.getColor('gray-600');\n const lightThemeBgColor = props?.$backgroundColors?.[1] ?? props.theme.getColor('gray-200');\n return props.theme.themeProp(\n 'background-image',\n `radial-gradient(circle at center, ${darkThemeBgColor} 50%, transparent 51%)`,\n `radial-gradient(circle at center, ${lightThemeBgColor} 50%, transparent 51%)`\n );\n }}\n\n &:hover:not(:disabled) {\n background-size: ${props =>\n Math.max(props.$actionWidthHeight[0], props.$actionWidthHeight[1]) * 2}px\n ${props => Math.max(props.$actionWidthHeight[0], props.$actionWidthHeight[1]) * 2}px;\n\n svg {\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-700')\n )};\n }\n }\n\n ${props =>\n props.$active &&\n css`\n background-size: ${Math.max(props.$actionWidthHeight[0], props.$actionWidthHeight[1]) * 2}px\n ${Math.max(props.$actionWidthHeight[0], props.$actionWidthHeight[1]) * 2}px;\n\n svg {\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-700')\n )};\n }\n `}\n\n ${props =>\n props.$useShadow\n ? props.theme.themeProp(\n 'box-shadow',\n `0px 3px 6px ${rgba(props.theme.getColor('black'), 0.7)}`,\n `0px 3px 6px ${props.theme.getColor('black')}`\n )\n : null}\n\n &:disabled {\n opacity: 0.5;\n color: inherit;\n cursor: not-allowed;\n }\n\n svg {\n width: 100%;\n max-width: ${props => `${props.$actionWidthHeight[0] - 15}px`};\n max-height: ${props => `${props.$actionWidthHeight[1] - 15}px`};\n pointer-events: none;\n transition: color 250ms;\n }\n`;\n"],"names":["shouldForwardProp","prop","startsWith","ActionButton","styled","button","withConfig","attrs","applyDefaultTheme","props","$actionWidthHeight","darkThemeBgColor","$backgroundColors","theme","getColor","lightThemeBgColor","themeProp","Math","max","$active","css","$useShadow","rgba"],"mappings":";;;;AAIA,MAAMA,iBAAiB,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AC,OAAO,CAAC,CAC9C,CAAA,CAAC,GACD,IAAI,CAAA;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAiBL,EAAAA,KAAK,IAAI,CAAA,EAAGA,KAAK,CAACC,kBAAkB,CAAC,CAAC,CAAC,GAAG,EAAE,CAAI,EAAA,CAAA,CAAA;AACjE,gBAAkBD,EAAAA,KAAK,IAAI,CAAA,EAAGA,KAAK,CAACC,kBAAkB,CAAC,CAAC,CAAC,GAAG,EAAE,CAAI,EAAA,CAAA,CAAA;AAClE;AACA;AACA;AACA;;;;"}
|
|
@@ -344,21 +344,21 @@ const AssetGalleryBase = React__default.forwardRef(function AssetGalleryBase({
|
|
|
344
344
|
extendedSelectMode: Boolean(selectedAssetKeys.length),
|
|
345
345
|
onAssetSelected: onAssetSelected,
|
|
346
346
|
onAssetUnselected: onAssetUnselected,
|
|
347
|
-
|
|
347
|
+
softSelected: softSelectedAssetKey === asset.key,
|
|
348
348
|
component: component
|
|
349
349
|
}) : React__default.createElement(AssetGalleryCompactCard, {
|
|
350
350
|
asset: asset,
|
|
351
351
|
activeSummaryCard: activeSummaryCard,
|
|
352
352
|
displayIcon: displayIcon,
|
|
353
|
-
|
|
354
|
-
|
|
353
|
+
hasHeightAndWidth: asset.layout.hasHeightAndWidth,
|
|
354
|
+
collapseExtraInfo: asset.layout.width < 90,
|
|
355
355
|
selectable: 'selectable' in asset ? asset.selectable : selectable,
|
|
356
356
|
selected: selectedAssetKeys.includes(asset.key),
|
|
357
357
|
customSelectedBorder: customSelectedBorder,
|
|
358
358
|
extendedSelectMode: Boolean(selectedAssetKeys.length),
|
|
359
359
|
onAssetSelected: onAssetSelected,
|
|
360
360
|
onAssetUnselected: onAssetUnselected,
|
|
361
|
-
|
|
361
|
+
softSelected: softSelectedAssetKey === asset.key,
|
|
362
362
|
component: component
|
|
363
363
|
}))))));
|
|
364
364
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetGalleryBase.js","sources":["../../../../src/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { throttle } from 'lodash';\nimport PropTypes from 'prop-types';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { assetShape } from '../asset.propType';\nimport useIsomorphicLayoutEffect from './../../../../hooks/useIsomorphicLayoutEffect';\nimport * as S from './AssetGalleryBase.styled';\nimport AssetGalleryCompactCard from './AssetGalleryCompactCard/AssetGalleryCompactCard';\nimport AssetGalleryGridCard from './AssetGalleryGridCard/AssetGalleryGridCard';\n\nconst AssetGalleryBase = React.forwardRef(function AssetGalleryBase(\n {\n assets: assetsProp,\n activeSummaryCard,\n displayIcon,\n viewMode,\n thumbnailMaxHeight,\n selectable,\n customSelectedBorder,\n selectedAssetKeys,\n onAssetSelected,\n onAssetUnselected,\n softSelectable,\n softSelectedAssetKey,\n scrollElement: scrollElementProp,\n onAssetSoftSelectedChanged,\n component,\n ...props\n },\n forwardedRef\n) {\n // Combine forwarded ref and the local ref\n const assetGalleryDOMNode = useRef();\n const assetGalleryCompactRef = useMergedRefs(forwardedRef, assetGalleryDOMNode);\n\n const assetGalleryWidth = useRef(0);\n const minimumRowAspectRatio = useRef(0);\n\n // Calculated assets\n const calculatedAssets = useRef([]);\n const [assets, setAssets] = useState([]);\n\n // Constants\n const MAXIMUM_ROW_HEIGHT = useMemo(\n () => (viewMode === 'grid' ? 450 : thumbnailMaxHeight),\n [viewMode, thumbnailMaxHeight]\n );\n const SPACE_BETWEEN_ASSETS = 8;\n const SPACE_UNDER_ASSETS = 8;\n const PRIMARY_SCROLL_BUFFER_HEIGHT = 1500;\n const SECONDARY_SCROLL_BUFFER_HEIGHT = 500;\n const GRID_VIEW_MODE_ASSET_MIN_WIDTH = 300;\n const GRID_VIEW_MODE_ASSET_HEIGHT = 427;\n const MISSING_WIDTH_PLACEHOLDER = 1920;\n const MISSING_HEIGHT_PLACEHOLDER = 1080;\n\n const isBrowser = typeof window !== 'undefined';\n\n const scrollElement = scrollElementProp || window;\n\n // Scroll position and direction\n const previousYOffset = useRef(isBrowser ? scrollElement.pageYOffset : 0);\n const latestYOffset = useRef(isBrowser ? scrollElement.pageYOffset : 0);\n const scrollDirection = useRef('down');\n\n // Track resize changes and set the current Asset Gallery width\n useIsomorphicLayoutEffect(() => {\n if (!assetGalleryDOMNode.current) return;\n\n const throttledOnResize = throttle(onResize, 1);\n\n const resizeObserver = new ResizeObserver(throttledOnResize);\n\n resizeObserver.observe(assetGalleryDOMNode.current);\n\n function onResize(entries) {\n entries.forEach(entry => {\n // setAssetGalleryWidth(entry.contentRect.width);\n if (assetGalleryWidth.current === entry.contentRect.width) return;\n window.requestAnimationFrame(() => {\n assetGalleryWidth.current = entry.contentRect.width;\n main();\n });\n });\n }\n\n return () => {\n resizeObserver.unobserve(assetGalleryDOMNode.current);\n };\n }, [assetsProp, assetGalleryDOMNode, MAXIMUM_ROW_HEIGHT]);\n\n //Re calculate Asset Gallery when something changes `MAXIMUM_ROW_HEIGHT` or `assetsProp` changes\n useEffect(() => {\n main();\n }, [MAXIMUM_ROW_HEIGHT, assetsProp]);\n\n const main = () => {\n calculateAssetGalleryAspectRatio();\n calculateLayout();\n calculateVisibility();\n };\n\n const calculateAssetGalleryAspectRatio = () => {\n // We don't care to compute the aspect ratio if the width of the gallery is 0\n if (assetGalleryWidth.current > 0) {\n minimumRowAspectRatio.current = calculateAspectRatio(\n assetGalleryWidth.current,\n MAXIMUM_ROW_HEIGHT\n );\n }\n };\n\n // Calculate asset gallery layout\n const calculateLayout = () => {\n // Check for required attributes and omit assets that are missing the attribute\n const assetsWithoutAKey = assetsProp.filter(a => !a.key);\n if (assetsWithoutAKey.length > 0) {\n assetsProp = assetsProp.filter(a => a.key);\n assetsWithoutAKey.forEach(a =>\n console.warn(\n 'Omitted asset from the gallery because it was missing the unique `key` property.',\n a\n )\n );\n }\n\n if (viewMode === 'grid' && assetGalleryWidth.current > 0) {\n // State\n let row = []; // The list of images in the current row.\n let translateX = 0; // The current translateX value that we are at\n let translateY = 0; // The current translateY value that we are at\n const computedAssets = [];\n let lastGroup = null; // The last group that was created\n\n // Calculate how many assets we can put in a row before violating `ASSET_MIN_WIDTH`\n // but we always want minimum of 1 asset in a row\n const desiredAssetCountInRow =\n Math.floor(assetGalleryWidth.current / GRID_VIEW_MODE_ASSET_MIN_WIDTH) || 1;\n\n // Calculate the width of each asset in a row\n const desiredAssetWidth =\n assetGalleryWidth.current / desiredAssetCountInRow -\n SPACE_BETWEEN_ASSETS +\n SPACE_BETWEEN_ASSETS / desiredAssetCountInRow;\n\n assetsProp.forEach((asset, index) => {\n // Create a group label\n if (asset.group && asset.group !== lastGroup) {\n computedAssets.push({\n title: asset.group,\n key: asset.key,\n layout: {\n type: 'groupLabel',\n height: 50,\n translateX: Math.round(translateX),\n translateY: Math.round(translateY)\n }\n });\n lastGroup = asset.group;\n translateY += 50 + SPACE_UNDER_ASSETS;\n }\n\n row.push(asset);\n\n if (\n row.length === desiredAssetCountInRow ||\n index + 1 === assetsProp.length ||\n (assetsProp[index + 1]?.group && assetsProp[index + 1].group !== asset.group)\n ) {\n row.forEach(rowAsset => {\n computedAssets.push({\n ...rowAsset,\n layout: {\n type: 'asset', // Indicates that this is an asset and not a group label\n width: Math.round(desiredAssetWidth),\n height: Math.round(GRID_VIEW_MODE_ASSET_HEIGHT),\n translateX: Math.round(translateX),\n translateY: Math.round(translateY)\n }\n });\n\n translateX += desiredAssetWidth + SPACE_BETWEEN_ASSETS;\n });\n\n row = [];\n translateX = 0;\n translateY += GRID_VIEW_MODE_ASSET_HEIGHT + SPACE_UNDER_ASSETS;\n }\n });\n\n calculatedAssets.current = computedAssets;\n } else {\n if (minimumRowAspectRatio.current > 0) {\n // State\n let row = []; // The list of images in the current row.\n let translateX = 0; // The current translateX value that we are at\n let translateY = 0; // The current translateY value that we are at\n let rowAspectRatio = 0; // The aspect ratio of the row we are building\n let lastGroup = null; // The last group that was created\n\n const computedAssets = [];\n\n // Loop through all our images, building them up into rows and computing\n // the working rowAspectRatio.\n assetsProp.forEach((asset, index) => {\n // Create a group label\n if (asset.group && asset.group !== lastGroup) {\n computedAssets.push({\n title: asset.group,\n key: asset.key,\n layout: {\n type: 'groupLabel',\n height: 50,\n translateX: Math.round(translateX),\n translateY: Math.round(translateY)\n }\n });\n lastGroup = asset.group;\n translateY += 50 + SPACE_UNDER_ASSETS;\n }\n\n rowAspectRatio += calculateAspectRatio(\n asset.width || MISSING_WIDTH_PLACEHOLDER,\n asset.height || MISSING_HEIGHT_PLACEHOLDER\n );\n\n row.push(asset);\n\n // End the row if any of the conditions match\n if (\n rowAspectRatio >= minimumRowAspectRatio.current ||\n index + 1 === assetsProp.length ||\n (assetsProp[index + 1]?.group && assetsProp[index + 1].group !== asset.group)\n ) {\n // Make sure that the last row also has a reasonable height\n rowAspectRatio = Math.max(rowAspectRatio, minimumRowAspectRatio.current);\n\n // Compute this row's height.\n const totalDesiredWidthOfImages =\n assetGalleryWidth.current - SPACE_BETWEEN_ASSETS * (row.length - 1);\n const rowHeight = totalDesiredWidthOfImages / rowAspectRatio;\n\n row.forEach(rowAsset => {\n const assetWidth =\n rowHeight *\n calculateAspectRatio(\n rowAsset.width || MISSING_WIDTH_PLACEHOLDER,\n rowAsset.height || MISSING_HEIGHT_PLACEHOLDER\n );\n\n computedAssets.push({\n ...rowAsset,\n layout: {\n type: 'asset', // Indicates that this is an asset an not a group label\n width: Math.round(assetWidth),\n height: Math.round(rowHeight),\n translateX: Math.round(translateX),\n translateY: Math.round(translateY),\n hasHeightAndWidth: Boolean(rowAsset.width && rowAsset.height)\n }\n });\n\n // The next image is `SPACE_BETWEEN_ASSETS` pixels to the right of this image.\n translateX += assetWidth + SPACE_BETWEEN_ASSETS;\n });\n\n // Reset our state variables for next row.\n row = [];\n rowAspectRatio = 0;\n translateY += rowHeight + SPACE_UNDER_ASSETS;\n translateX = 0;\n }\n });\n\n calculatedAssets.current = computedAssets;\n }\n }\n };\n\n // Utility function to calculate the aspect ratio of a width and height\n function calculateAspectRatio(width, height) {\n return width / height;\n }\n\n // Calculate the total height of the gallery\n const totalGalleryHeight = useMemo(() => {\n if (assets.length === 0) {\n return 0;\n }\n\n const lastAsset = assets[assets.length - 1];\n\n if (assets.length < 8) {\n return (lastAsset.layout.translateY + lastAsset.layout.height) * 2;\n }\n\n return lastAsset.layout.translateY + lastAsset.layout.height;\n }, [assets]);\n\n useEffect(() => {\n const throttledOnScroll = throttle(onScroll, 200);\n\n scrollElement.addEventListener('scroll', throttledOnScroll, false);\n return () => scrollElement.removeEventListener('scroll', throttledOnScroll, false);\n }, [assetGalleryDOMNode, calculatedAssets]);\n\n function onScroll() {\n setScrollPositionAndDirection();\n calculateVisibility();\n }\n\n function setScrollPositionAndDirection() {\n const newYOffset = scrollElement.pageYOffset;\n previousYOffset.current = latestYOffset.current;\n latestYOffset.current = newYOffset;\n scrollDirection.current = latestYOffset.current > previousYOffset.current ? 'down' : 'up';\n }\n\n /**\n * +---------------------------+\n * | |\n * | |\n * | |\n * | |\n * + - - - - - - - - - - - - - + -------\n * | | A\n * | Secondary Buffer | SECONDARY_SCROLL_BUFFER_HEIGHT\n * | | V\n * +---------------------------+ -------\n * | | A\n * | | |\n * | | |\n * | Viewport | window.innerHeight\n * | | |\n * | | |\n * | | V\n * +---------------------------+ -------\n * | | A\n * | | |\n * | | |\n * | | |\n * | Primary Buffer | PRIMARY_SCROLL_BUFFER_HEIGHT\n * | | |\n * | | |\n * | | |\n * | | V\n * + - - - - - - - - - - - - - + -------\n * | |\n * | (Scroll direction) |\n * | | |\n * | | |\n * | V |\n * | |\n *\n */\n\n const calculateVisibility = () => {\n if (!assetGalleryDOMNode.current) return;\n\n // Get the top and bottom buffers heights.\n const bufferTop =\n scrollDirection.current === 'up'\n ? PRIMARY_SCROLL_BUFFER_HEIGHT\n : SECONDARY_SCROLL_BUFFER_HEIGHT;\n\n const bufferBottom =\n scrollDirection.current === 'up'\n ? SECONDARY_SCROLL_BUFFER_HEIGHT\n : PRIMARY_SCROLL_BUFFER_HEIGHT;\n\n const containerOffset = getOffsetTop(assetGalleryDOMNode.current);\n const scrollerHeight = scrollElement.innerHeight;\n\n const yOffset = latestYOffset.current;\n\n // This is the top of the top buffer. If the bottom of an image is above\n // this line, it will be removed.\n const minTranslateYPlusHeight = yOffset - containerOffset - bufferTop;\n\n // This is the bottom of the bottom buffer. If the top of an image is\n // below this line, it will be removed.\n const maxTranslateY = yOffset - containerOffset + scrollerHeight + bufferBottom;\n\n const finalizedAssets = calculatedAssets.current.map(asset => {\n if (\n scrollElement.self == window &&\n (asset.layout.translateY + asset.layout.height < minTranslateYPlusHeight ||\n asset.layout.translateY > maxTranslateY)\n ) {\n // Hide Image\n asset.layout.show = false;\n } else {\n // Show Image\n asset.layout.show = true;\n }\n\n return asset;\n });\n\n setAssets(finalizedAssets);\n };\n\n // Utility function that returns the distance from `elem` to the top of the page.\n // This is done by walking up the node tree, getting the offsetTop of each\n // parent node, until the top of the page.\n function getOffsetTop(elem) {\n let offsetTop = 0;\n do {\n if (!isNaN(elem.offsetTop)) {\n offsetTop += elem.offsetTop;\n }\n elem = elem.offsetParent;\n } while (elem);\n return offsetTop;\n }\n\n const handleKeyPress = useCallback(\n e => {\n function isElementVisible(el) {\n const rect = el.getBoundingClientRect(),\n vWidth = scrollElement.innerWidth || document.documentElement.clientWidth,\n vHeight = scrollElement.innerHeight || document.documentElement.clientHeight,\n efp = function (x, y) {\n return document.elementFromPoint(x, y);\n };\n\n // Return false if it's not in the viewport\n if (rect.right < 0 || rect.bottom < 0 || rect.left > vWidth || rect.top > vHeight)\n return false;\n\n // Return true if any of its four corners are visible\n return (\n el.contains(efp(rect.left, rect.top)) ||\n el.contains(efp(rect.right, rect.top)) ||\n el.contains(efp(rect.right, rect.bottom)) ||\n el.contains(efp(rect.left, rect.bottom))\n );\n }\n\n function softSelectFirstVisibleAsset() {\n const visibleAssets = assets.filter(asset => asset.layout.show);\n\n for (let i = 0; i < assetGalleryDOMNode.current.children.length; i++) {\n if (isElementVisible(assetGalleryDOMNode.current.children[i])) {\n onAssetSoftSelectedChanged(visibleAssets[i].key);\n break;\n }\n }\n }\n\n if (assets.length === 0) return;\n\n if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {\n if (softSelectedAssetKey === null) {\n softSelectFirstVisibleAsset();\n\n return;\n }\n }\n\n if (e.key === 'ArrowLeft') {\n const previousAssetIndex =\n assets.findIndex(asset => asset.key === softSelectedAssetKey) - 1;\n\n const previousAsset = assets[previousAssetIndex];\n\n if (previousAsset) {\n if (previousAsset.layout.show) {\n onAssetSoftSelectedChanged(previousAsset.key);\n } else {\n softSelectFirstVisibleAsset();\n }\n }\n\n return;\n }\n\n if (e.key === 'ArrowRight') {\n const nextAssetIndex = assets.findIndex(asset => asset.key === softSelectedAssetKey) + 1;\n\n const nextAsset = assets[nextAssetIndex];\n\n if (nextAsset) {\n if (nextAsset.layout.show) {\n onAssetSoftSelectedChanged(nextAsset.key);\n } else {\n softSelectFirstVisibleAsset();\n }\n }\n\n return;\n }\n\n if (e.key === 'Enter') {\n if (softSelectedAssetKey === null) return;\n\n if (selectedAssetKeys.includes(softSelectedAssetKey)) {\n onAssetUnselected(softSelectedAssetKey);\n } else {\n onAssetSelected(softSelectedAssetKey);\n }\n }\n },\n [\n assets,\n softSelectedAssetKey,\n onAssetSoftSelectedChanged,\n selectedAssetKeys,\n assetGalleryCompactRef\n ]\n );\n\n const handleClick = useCallback(() => {\n onAssetSoftSelectedChanged(null);\n }, []);\n\n // Add event listeners for keyboard navigation (soft select)\n useEffect(() => {\n if (softSelectable) {\n document.addEventListener('keydown', handleKeyPress);\n }\n\n return () => document.removeEventListener('keydown', handleKeyPress);\n }, [softSelectable, handleKeyPress]);\n\n useEffect(() => {\n if (softSelectable && softSelectedAssetKey !== null) {\n document.addEventListener('click', handleClick, true);\n }\n\n return () => document.removeEventListener('click', handleClick, true);\n }, [softSelectable, softSelectedAssetKey, handleClick]);\n\n return (\n <>\n <S.AssetGalleryBase\n ref={assetGalleryCompactRef}\n style={{ height: `${totalGalleryHeight}px` }}\n className={props.className}\n {...props}\n >\n {assets.map(\n asset =>\n asset.layout.show && (\n <React.Fragment key={`asset-gallery-${asset.layout.type}-${asset.key}`}>\n {asset.layout.type === 'groupLabel' && (\n <S.GroupLabel\n style={{\n transform: `translate3d(${asset.layout.translateX}px,${asset.layout.translateY}px, 0)`,\n height: `${asset.layout.height}px`\n }}\n >\n {asset.title}\n </S.GroupLabel>\n )}\n\n {asset.layout.type === 'asset' && (\n <S.AssetGalleryCardBase\n style={{\n transform: `translate3d(${asset.layout.translateX}px, ${asset.layout.translateY}px, 0)`,\n width: `${asset.layout.width}px`,\n height: `${asset.layout.height}px`,\n display: 'flex',\n justifyContent: 'center'\n }}\n >\n {viewMode === 'grid' ? (\n <AssetGalleryGridCard\n asset={asset}\n selectable={'selectable' in asset ? asset.selectable : selectable}\n selected={selectedAssetKeys.includes(asset.key)}\n customSelectedBorder={customSelectedBorder}\n extendedSelectMode={Boolean(selectedAssetKeys.length)}\n onAssetSelected={onAssetSelected}\n onAssetUnselected={onAssetUnselected}\n $softSelected={softSelectedAssetKey === asset.key}\n component={component}\n />\n ) : (\n <AssetGalleryCompactCard\n asset={asset}\n activeSummaryCard={activeSummaryCard}\n displayIcon={displayIcon}\n $hasHeightAndWidth={asset.layout.hasHeightAndWidth}\n $collapseExtraInfo={asset.layout.width < 90}\n selectable={'selectable' in asset ? asset.selectable : selectable}\n selected={selectedAssetKeys.includes(asset.key)}\n customSelectedBorder={customSelectedBorder}\n extendedSelectMode={Boolean(selectedAssetKeys.length)}\n onAssetSelected={onAssetSelected}\n onAssetUnselected={onAssetUnselected}\n $softSelected={softSelectedAssetKey === asset.key}\n component={component}\n />\n )}\n </S.AssetGalleryCardBase>\n )}\n </React.Fragment>\n )\n )}\n </S.AssetGalleryBase>\n </>\n );\n});\n\nAssetGalleryBase.propTypes = {\n /**\n * An array of assets to display in the gallery.\n */\n assets: PropTypes.arrayOf(PropTypes.shape(assetShape)),\n\n /**\n * Whether the asset gallery should render the Asset Summary Card on hover.\n */\n activeSummaryCard: PropTypes.bool,\n\n /**\n * Whether the asset gallery should display the Version Count or Verifications on default.\n */\n displayIcon: PropTypes.string,\n\n /**\n * The view mode of the gallery.\n */\n viewMode: PropTypes.oneOf(['compact', 'grid']),\n\n /**\n * The maximum height of thumbnails in the gallery. When the grid is computed the gallery will try\n * to have each row of the gallery as close to the max height as possible.\n */\n thumbnailMaxHeight: PropTypes.number,\n\n /**\n * Whether or not the asset gallery should have selectable asset cards\n */\n selectable: PropTypes.bool,\n\n /**\n * Whether or not the asset gallery should have custom borders on selected asset\n */\n customSelectedBorder: PropTypes.arrayOf(PropTypes.string),\n\n /**\n * An array containing the key of all selected assets\n */\n selectedAssetKeys: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.string),\n PropTypes.arrayOf(PropTypes.number)\n ]).isRequired,\n\n /**\n * Scrollable element to attach event listeners to. Defaults to window.\n */\n scrollElement: PropTypes.instanceOf(Element),\n\n /**\n * The callback function when an asset is selected - returns the selected asset key\n */\n onAssetSelected: PropTypes.func.isRequired,\n\n /**\n * The callback function when an asset is unselected - returns the unselected asset key\n */\n onAssetUnselected: PropTypes.func.isRequired,\n\n /**\n * Whether or not the asset gallery should have soft selectable asset cards\n */\n softSelectable: PropTypes.bool,\n\n /**\n * A value containing the key of the soft selected asset or null\n */\n softSelectedAssetKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * The callback function when soft selected asset changes - returns the selected asset key or null\n */\n onAssetSoftSelectedChanged: PropTypes.func.isRequired,\n\n /**\n * A function that returns a custom component to use for the card in the gallery - The function provides\n * `asset` as its first argument\n */\n component: PropTypes.func,\n\n /**\n * Optional className\n */\n className: PropTypes.string\n};\n\nexport default AssetGalleryBase;\n"],"names":["AssetGalleryBase","React","forwardRef","assets","assetsProp","activeSummaryCard","displayIcon","viewMode","thumbnailMaxHeight","selectable","customSelectedBorder","selectedAssetKeys","onAssetSelected","onAssetUnselected","softSelectable","softSelectedAssetKey","scrollElement","scrollElementProp","onAssetSoftSelectedChanged","component","props","forwardedRef","assetGalleryDOMNode","useRef","assetGalleryCompactRef","useMergedRefs","assetGalleryWidth","minimumRowAspectRatio","calculatedAssets","setAssets","useState","MAXIMUM_ROW_HEIGHT","useMemo","SPACE_BETWEEN_ASSETS","SPACE_UNDER_ASSETS","PRIMARY_SCROLL_BUFFER_HEIGHT","SECONDARY_SCROLL_BUFFER_HEIGHT","GRID_VIEW_MODE_ASSET_MIN_WIDTH","GRID_VIEW_MODE_ASSET_HEIGHT","MISSING_WIDTH_PLACEHOLDER","MISSING_HEIGHT_PLACEHOLDER","isBrowser","window","previousYOffset","pageYOffset","latestYOffset","scrollDirection","useIsomorphicLayoutEffect","current","throttledOnResize","throttle","onResize","resizeObserver","ResizeObserver","observe","entries","forEach","entry","contentRect","width","requestAnimationFrame","main","unobserve","useEffect","calculateAssetGalleryAspectRatio","calculateLayout","calculateVisibility","calculateAspectRatio","assetsWithoutAKey","filter","a","key","length","console","warn","row","translateX","translateY","computedAssets","lastGroup","desiredAssetCountInRow","Math","floor","desiredAssetWidth","asset","index","group","push","title","layout","type","height","round","rowAsset","rowAspectRatio","max","totalDesiredWidthOfImages","rowHeight","assetWidth","hasHeightAndWidth","Boolean","totalGalleryHeight","lastAsset","throttledOnScroll","onScroll","addEventListener","removeEventListener","setScrollPositionAndDirection","newYOffset","bufferTop","bufferBottom","containerOffset","getOffsetTop","scrollerHeight","innerHeight","yOffset","minTranslateYPlusHeight","maxTranslateY","finalizedAssets","map","self","show","elem","offsetTop","isNaN","offsetParent","handleKeyPress","useCallback","e","isElementVisible","el","rect","getBoundingClientRect","vWidth","innerWidth","document","documentElement","clientWidth","vHeight","clientHeight","efp","x","y","elementFromPoint","right","bottom","left","top","contains","softSelectFirstVisibleAsset","visibleAssets","i","children","previousAssetIndex","findIndex","previousAsset","nextAssetIndex","nextAsset","includes","handleClick","createElement","Fragment","S","_extends","ref","style","className","transform","display","justifyContent","AssetGalleryGridCard","selected","extendedSelectMode","$softSelected","AssetGalleryCompactCard","$hasHeightAndWidth","$collapseExtraInfo","propTypes","process","env","NODE_ENV","PropTypes","arrayOf","shape","assetShape","bool","string","oneOf","number","oneOfType","isRequired","instanceOf","Element","func"],"mappings":";;;;;;;;;;;;AAWMA,MAAAA,gBAAgB,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,gBAAgBA,CACjE;AACEG,EAAAA,MAAM,EAAEC,UAAU;EAClBC,iBAAiB;EACjBC,WAAW;EACXC,QAAQ;EACRC,kBAAkB;EAClBC,UAAU;EACVC,oBAAoB;EACpBC,iBAAiB;EACjBC,eAAe;EACfC,iBAAiB;EACjBC,cAAc;EACdC,oBAAoB;AACpBC,EAAAA,aAAa,EAAEC,iBAAiB;EAChCC,0BAA0B;EAC1BC,SAAS;EACT,GAAGC,KAAAA;AACL,CAAC,EACDC,YAAY,EACZ;AAEA,EAAA,MAAMC,mBAAmB,GAAGC,MAAM,EAAE,CAAA;AACpC,EAAA,MAAMC,sBAAsB,GAAGC,aAAa,CAACJ,YAAY,EAAEC,mBAAmB,CAAC,CAAA;AAE/E,EAAA,MAAMI,iBAAiB,GAAGH,MAAM,CAAC,CAAC,CAAC,CAAA;AACnC,EAAA,MAAMI,qBAAqB,GAAGJ,MAAM,CAAC,CAAC,CAAC,CAAA;AAGvC,EAAA,MAAMK,gBAAgB,GAAGL,MAAM,CAAC,EAAE,CAAC,CAAA;EACnC,MAAM,CAACpB,MAAM,EAAE0B,SAAS,CAAC,GAAGC,QAAQ,CAAC,EAAE,CAAC,CAAA;AAGxC,EAAA,MAAMC,kBAAkB,GAAGC,OAAO,CAChC,MAAOzB,QAAQ,KAAK,MAAM,GAAG,GAAG,GAAGC,kBAAmB,EACtD,CAACD,QAAQ,EAAEC,kBAAkB,CAC/B,CAAC,CAAA;EACD,MAAMyB,oB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AAEwK,SAAS,CAACY,IAAI,CAACH,UAAU;EAK5ChL,cAAc,EAAEuK,SAAS,CAACI,IAAI;AAK9B1K,EAAAA,oBAAoB,EAAEsK,SAAS,CAACQ,SAAS,CAAC,CAACR,SAAS,CAACK,MAAM,EAAEL,SAAS,CAACO,MAAM,CAAC,CAAC;AAK/E1K,EAAAA,0BAA0B,EAAEmK,SAAS,CAACY,IAAI,CAACH,UAAU;EAMrD3K,SAAS,EAAEkK,SAAS,CAACY,IAAI;EAKzB3B,SAAS,EAAEe,SAAS,CAACK,MAAAA;AACvB,CAAC,GAAA,EAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"AssetGalleryBase.js","sources":["../../../../src/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { throttle } from 'lodash';\nimport PropTypes from 'prop-types';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { assetShape } from '../asset.propType';\nimport useIsomorphicLayoutEffect from './../../../../hooks/useIsomorphicLayoutEffect';\nimport * as S from './AssetGalleryBase.styled';\nimport AssetGalleryCompactCard from './AssetGalleryCompactCard/AssetGalleryCompactCard';\nimport AssetGalleryGridCard from './AssetGalleryGridCard/AssetGalleryGridCard';\n\nconst AssetGalleryBase = React.forwardRef(function AssetGalleryBase(\n {\n assets: assetsProp,\n activeSummaryCard,\n displayIcon,\n viewMode,\n thumbnailMaxHeight,\n selectable,\n customSelectedBorder,\n selectedAssetKeys,\n onAssetSelected,\n onAssetUnselected,\n softSelectable,\n softSelectedAssetKey,\n scrollElement: scrollElementProp,\n onAssetSoftSelectedChanged,\n component,\n ...props\n },\n forwardedRef\n) {\n // Combine forwarded ref and the local ref\n const assetGalleryDOMNode = useRef();\n const assetGalleryCompactRef = useMergedRefs(forwardedRef, assetGalleryDOMNode);\n\n const assetGalleryWidth = useRef(0);\n const minimumRowAspectRatio = useRef(0);\n\n // Calculated assets\n const calculatedAssets = useRef([]);\n const [assets, setAssets] = useState([]);\n\n // Constants\n const MAXIMUM_ROW_HEIGHT = useMemo(\n () => (viewMode === 'grid' ? 450 : thumbnailMaxHeight),\n [viewMode, thumbnailMaxHeight]\n );\n const SPACE_BETWEEN_ASSETS = 8;\n const SPACE_UNDER_ASSETS = 8;\n const PRIMARY_SCROLL_BUFFER_HEIGHT = 1500;\n const SECONDARY_SCROLL_BUFFER_HEIGHT = 500;\n const GRID_VIEW_MODE_ASSET_MIN_WIDTH = 300;\n const GRID_VIEW_MODE_ASSET_HEIGHT = 427;\n const MISSING_WIDTH_PLACEHOLDER = 1920;\n const MISSING_HEIGHT_PLACEHOLDER = 1080;\n\n const isBrowser = typeof window !== 'undefined';\n\n const scrollElement = scrollElementProp || window;\n\n // Scroll position and direction\n const previousYOffset = useRef(isBrowser ? scrollElement.pageYOffset : 0);\n const latestYOffset = useRef(isBrowser ? scrollElement.pageYOffset : 0);\n const scrollDirection = useRef('down');\n\n // Track resize changes and set the current Asset Gallery width\n useIsomorphicLayoutEffect(() => {\n if (!assetGalleryDOMNode.current) return;\n\n const throttledOnResize = throttle(onResize, 1);\n\n const resizeObserver = new ResizeObserver(throttledOnResize);\n\n resizeObserver.observe(assetGalleryDOMNode.current);\n\n function onResize(entries) {\n entries.forEach(entry => {\n // setAssetGalleryWidth(entry.contentRect.width);\n if (assetGalleryWidth.current === entry.contentRect.width) return;\n window.requestAnimationFrame(() => {\n assetGalleryWidth.current = entry.contentRect.width;\n main();\n });\n });\n }\n\n return () => {\n resizeObserver.unobserve(assetGalleryDOMNode.current);\n };\n }, [assetsProp, assetGalleryDOMNode, MAXIMUM_ROW_HEIGHT]);\n\n //Re calculate Asset Gallery when something changes `MAXIMUM_ROW_HEIGHT` or `assetsProp` changes\n useEffect(() => {\n main();\n }, [MAXIMUM_ROW_HEIGHT, assetsProp]);\n\n const main = () => {\n calculateAssetGalleryAspectRatio();\n calculateLayout();\n calculateVisibility();\n };\n\n const calculateAssetGalleryAspectRatio = () => {\n // We don't care to compute the aspect ratio if the width of the gallery is 0\n if (assetGalleryWidth.current > 0) {\n minimumRowAspectRatio.current = calculateAspectRatio(\n assetGalleryWidth.current,\n MAXIMUM_ROW_HEIGHT\n );\n }\n };\n\n // Calculate asset gallery layout\n const calculateLayout = () => {\n // Check for required attributes and omit assets that are missing the attribute\n const assetsWithoutAKey = assetsProp.filter(a => !a.key);\n if (assetsWithoutAKey.length > 0) {\n assetsProp = assetsProp.filter(a => a.key);\n assetsWithoutAKey.forEach(a =>\n console.warn(\n 'Omitted asset from the gallery because it was missing the unique `key` property.',\n a\n )\n );\n }\n\n if (viewMode === 'grid' && assetGalleryWidth.current > 0) {\n // State\n let row = []; // The list of images in the current row.\n let translateX = 0; // The current translateX value that we are at\n let translateY = 0; // The current translateY value that we are at\n const computedAssets = [];\n let lastGroup = null; // The last group that was created\n\n // Calculate how many assets we can put in a row before violating `ASSET_MIN_WIDTH`\n // but we always want minimum of 1 asset in a row\n const desiredAssetCountInRow =\n Math.floor(assetGalleryWidth.current / GRID_VIEW_MODE_ASSET_MIN_WIDTH) || 1;\n\n // Calculate the width of each asset in a row\n const desiredAssetWidth =\n assetGalleryWidth.current / desiredAssetCountInRow -\n SPACE_BETWEEN_ASSETS +\n SPACE_BETWEEN_ASSETS / desiredAssetCountInRow;\n\n assetsProp.forEach((asset, index) => {\n // Create a group label\n if (asset.group && asset.group !== lastGroup) {\n computedAssets.push({\n title: asset.group,\n key: asset.key,\n layout: {\n type: 'groupLabel',\n height: 50,\n translateX: Math.round(translateX),\n translateY: Math.round(translateY)\n }\n });\n lastGroup = asset.group;\n translateY += 50 + SPACE_UNDER_ASSETS;\n }\n\n row.push(asset);\n\n if (\n row.length === desiredAssetCountInRow ||\n index + 1 === assetsProp.length ||\n (assetsProp[index + 1]?.group && assetsProp[index + 1].group !== asset.group)\n ) {\n row.forEach(rowAsset => {\n computedAssets.push({\n ...rowAsset,\n layout: {\n type: 'asset', // Indicates that this is an asset and not a group label\n width: Math.round(desiredAssetWidth),\n height: Math.round(GRID_VIEW_MODE_ASSET_HEIGHT),\n translateX: Math.round(translateX),\n translateY: Math.round(translateY)\n }\n });\n\n translateX += desiredAssetWidth + SPACE_BETWEEN_ASSETS;\n });\n\n row = [];\n translateX = 0;\n translateY += GRID_VIEW_MODE_ASSET_HEIGHT + SPACE_UNDER_ASSETS;\n }\n });\n\n calculatedAssets.current = computedAssets;\n } else {\n if (minimumRowAspectRatio.current > 0) {\n // State\n let row = []; // The list of images in the current row.\n let translateX = 0; // The current translateX value that we are at\n let translateY = 0; // The current translateY value that we are at\n let rowAspectRatio = 0; // The aspect ratio of the row we are building\n let lastGroup = null; // The last group that was created\n\n const computedAssets = [];\n\n // Loop through all our images, building them up into rows and computing\n // the working rowAspectRatio.\n assetsProp.forEach((asset, index) => {\n // Create a group label\n if (asset.group && asset.group !== lastGroup) {\n computedAssets.push({\n title: asset.group,\n key: asset.key,\n layout: {\n type: 'groupLabel',\n height: 50,\n translateX: Math.round(translateX),\n translateY: Math.round(translateY)\n }\n });\n lastGroup = asset.group;\n translateY += 50 + SPACE_UNDER_ASSETS;\n }\n\n rowAspectRatio += calculateAspectRatio(\n asset.width || MISSING_WIDTH_PLACEHOLDER,\n asset.height || MISSING_HEIGHT_PLACEHOLDER\n );\n\n row.push(asset);\n\n // End the row if any of the conditions match\n if (\n rowAspectRatio >= minimumRowAspectRatio.current ||\n index + 1 === assetsProp.length ||\n (assetsProp[index + 1]?.group && assetsProp[index + 1].group !== asset.group)\n ) {\n // Make sure that the last row also has a reasonable height\n rowAspectRatio = Math.max(rowAspectRatio, minimumRowAspectRatio.current);\n\n // Compute this row's height.\n const totalDesiredWidthOfImages =\n assetGalleryWidth.current - SPACE_BETWEEN_ASSETS * (row.length - 1);\n const rowHeight = totalDesiredWidthOfImages / rowAspectRatio;\n\n row.forEach(rowAsset => {\n const assetWidth =\n rowHeight *\n calculateAspectRatio(\n rowAsset.width || MISSING_WIDTH_PLACEHOLDER,\n rowAsset.height || MISSING_HEIGHT_PLACEHOLDER\n );\n\n computedAssets.push({\n ...rowAsset,\n layout: {\n type: 'asset', // Indicates that this is an asset an not a group label\n width: Math.round(assetWidth),\n height: Math.round(rowHeight),\n translateX: Math.round(translateX),\n translateY: Math.round(translateY),\n hasHeightAndWidth: Boolean(rowAsset.width && rowAsset.height)\n }\n });\n\n // The next image is `SPACE_BETWEEN_ASSETS` pixels to the right of this image.\n translateX += assetWidth + SPACE_BETWEEN_ASSETS;\n });\n\n // Reset our state variables for next row.\n row = [];\n rowAspectRatio = 0;\n translateY += rowHeight + SPACE_UNDER_ASSETS;\n translateX = 0;\n }\n });\n\n calculatedAssets.current = computedAssets;\n }\n }\n };\n\n // Utility function to calculate the aspect ratio of a width and height\n function calculateAspectRatio(width, height) {\n return width / height;\n }\n\n // Calculate the total height of the gallery\n const totalGalleryHeight = useMemo(() => {\n if (assets.length === 0) {\n return 0;\n }\n\n const lastAsset = assets[assets.length - 1];\n\n if (assets.length < 8) {\n return (lastAsset.layout.translateY + lastAsset.layout.height) * 2;\n }\n\n return lastAsset.layout.translateY + lastAsset.layout.height;\n }, [assets]);\n\n useEffect(() => {\n const throttledOnScroll = throttle(onScroll, 200);\n\n scrollElement.addEventListener('scroll', throttledOnScroll, false);\n return () => scrollElement.removeEventListener('scroll', throttledOnScroll, false);\n }, [assetGalleryDOMNode, calculatedAssets]);\n\n function onScroll() {\n setScrollPositionAndDirection();\n calculateVisibility();\n }\n\n function setScrollPositionAndDirection() {\n const newYOffset = scrollElement.pageYOffset;\n previousYOffset.current = latestYOffset.current;\n latestYOffset.current = newYOffset;\n scrollDirection.current = latestYOffset.current > previousYOffset.current ? 'down' : 'up';\n }\n\n /**\n * +---------------------------+\n * | |\n * | |\n * | |\n * | |\n * + - - - - - - - - - - - - - + -------\n * | | A\n * | Secondary Buffer | SECONDARY_SCROLL_BUFFER_HEIGHT\n * | | V\n * +---------------------------+ -------\n * | | A\n * | | |\n * | | |\n * | Viewport | window.innerHeight\n * | | |\n * | | |\n * | | V\n * +---------------------------+ -------\n * | | A\n * | | |\n * | | |\n * | | |\n * | Primary Buffer | PRIMARY_SCROLL_BUFFER_HEIGHT\n * | | |\n * | | |\n * | | |\n * | | V\n * + - - - - - - - - - - - - - + -------\n * | |\n * | (Scroll direction) |\n * | | |\n * | | |\n * | V |\n * | |\n *\n */\n\n const calculateVisibility = () => {\n if (!assetGalleryDOMNode.current) return;\n\n // Get the top and bottom buffers heights.\n const bufferTop =\n scrollDirection.current === 'up'\n ? PRIMARY_SCROLL_BUFFER_HEIGHT\n : SECONDARY_SCROLL_BUFFER_HEIGHT;\n\n const bufferBottom =\n scrollDirection.current === 'up'\n ? SECONDARY_SCROLL_BUFFER_HEIGHT\n : PRIMARY_SCROLL_BUFFER_HEIGHT;\n\n const containerOffset = getOffsetTop(assetGalleryDOMNode.current);\n const scrollerHeight = scrollElement.innerHeight;\n\n const yOffset = latestYOffset.current;\n\n // This is the top of the top buffer. If the bottom of an image is above\n // this line, it will be removed.\n const minTranslateYPlusHeight = yOffset - containerOffset - bufferTop;\n\n // This is the bottom of the bottom buffer. If the top of an image is\n // below this line, it will be removed.\n const maxTranslateY = yOffset - containerOffset + scrollerHeight + bufferBottom;\n\n const finalizedAssets = calculatedAssets.current.map(asset => {\n if (\n scrollElement.self == window &&\n (asset.layout.translateY + asset.layout.height < minTranslateYPlusHeight ||\n asset.layout.translateY > maxTranslateY)\n ) {\n // Hide Image\n asset.layout.show = false;\n } else {\n // Show Image\n asset.layout.show = true;\n }\n\n return asset;\n });\n\n setAssets(finalizedAssets);\n };\n\n // Utility function that returns the distance from `elem` to the top of the page.\n // This is done by walking up the node tree, getting the offsetTop of each\n // parent node, until the top of the page.\n function getOffsetTop(elem) {\n let offsetTop = 0;\n do {\n if (!isNaN(elem.offsetTop)) {\n offsetTop += elem.offsetTop;\n }\n elem = elem.offsetParent;\n } while (elem);\n return offsetTop;\n }\n\n const handleKeyPress = useCallback(\n e => {\n function isElementVisible(el) {\n const rect = el.getBoundingClientRect(),\n vWidth = scrollElement.innerWidth || document.documentElement.clientWidth,\n vHeight = scrollElement.innerHeight || document.documentElement.clientHeight,\n efp = function (x, y) {\n return document.elementFromPoint(x, y);\n };\n\n // Return false if it's not in the viewport\n if (rect.right < 0 || rect.bottom < 0 || rect.left > vWidth || rect.top > vHeight)\n return false;\n\n // Return true if any of its four corners are visible\n return (\n el.contains(efp(rect.left, rect.top)) ||\n el.contains(efp(rect.right, rect.top)) ||\n el.contains(efp(rect.right, rect.bottom)) ||\n el.contains(efp(rect.left, rect.bottom))\n );\n }\n\n function softSelectFirstVisibleAsset() {\n const visibleAssets = assets.filter(asset => asset.layout.show);\n\n for (let i = 0; i < assetGalleryDOMNode.current.children.length; i++) {\n if (isElementVisible(assetGalleryDOMNode.current.children[i])) {\n onAssetSoftSelectedChanged(visibleAssets[i].key);\n break;\n }\n }\n }\n\n if (assets.length === 0) return;\n\n if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {\n if (softSelectedAssetKey === null) {\n softSelectFirstVisibleAsset();\n\n return;\n }\n }\n\n if (e.key === 'ArrowLeft') {\n const previousAssetIndex =\n assets.findIndex(asset => asset.key === softSelectedAssetKey) - 1;\n\n const previousAsset = assets[previousAssetIndex];\n\n if (previousAsset) {\n if (previousAsset.layout.show) {\n onAssetSoftSelectedChanged(previousAsset.key);\n } else {\n softSelectFirstVisibleAsset();\n }\n }\n\n return;\n }\n\n if (e.key === 'ArrowRight') {\n const nextAssetIndex = assets.findIndex(asset => asset.key === softSelectedAssetKey) + 1;\n\n const nextAsset = assets[nextAssetIndex];\n\n if (nextAsset) {\n if (nextAsset.layout.show) {\n onAssetSoftSelectedChanged(nextAsset.key);\n } else {\n softSelectFirstVisibleAsset();\n }\n }\n\n return;\n }\n\n if (e.key === 'Enter') {\n if (softSelectedAssetKey === null) return;\n\n if (selectedAssetKeys.includes(softSelectedAssetKey)) {\n onAssetUnselected(softSelectedAssetKey);\n } else {\n onAssetSelected(softSelectedAssetKey);\n }\n }\n },\n [\n assets,\n softSelectedAssetKey,\n onAssetSoftSelectedChanged,\n selectedAssetKeys,\n assetGalleryCompactRef\n ]\n );\n\n const handleClick = useCallback(() => {\n onAssetSoftSelectedChanged(null);\n }, []);\n\n // Add event listeners for keyboard navigation (soft select)\n useEffect(() => {\n if (softSelectable) {\n document.addEventListener('keydown', handleKeyPress);\n }\n\n return () => document.removeEventListener('keydown', handleKeyPress);\n }, [softSelectable, handleKeyPress]);\n\n useEffect(() => {\n if (softSelectable && softSelectedAssetKey !== null) {\n document.addEventListener('click', handleClick, true);\n }\n\n return () => document.removeEventListener('click', handleClick, true);\n }, [softSelectable, softSelectedAssetKey, handleClick]);\n\n return (\n <>\n <S.AssetGalleryBase\n ref={assetGalleryCompactRef}\n style={{ height: `${totalGalleryHeight}px` }}\n className={props.className}\n {...props}\n >\n {assets.map(\n asset =>\n asset.layout.show && (\n <React.Fragment key={`asset-gallery-${asset.layout.type}-${asset.key}`}>\n {asset.layout.type === 'groupLabel' && (\n <S.GroupLabel\n style={{\n transform: `translate3d(${asset.layout.translateX}px,${asset.layout.translateY}px, 0)`,\n height: `${asset.layout.height}px`\n }}\n >\n {asset.title}\n </S.GroupLabel>\n )}\n\n {asset.layout.type === 'asset' && (\n <S.AssetGalleryCardBase\n style={{\n transform: `translate3d(${asset.layout.translateX}px, ${asset.layout.translateY}px, 0)`,\n width: `${asset.layout.width}px`,\n height: `${asset.layout.height}px`,\n display: 'flex',\n justifyContent: 'center'\n }}\n >\n {viewMode === 'grid' ? (\n <AssetGalleryGridCard\n asset={asset}\n selectable={'selectable' in asset ? asset.selectable : selectable}\n selected={selectedAssetKeys.includes(asset.key)}\n customSelectedBorder={customSelectedBorder}\n extendedSelectMode={Boolean(selectedAssetKeys.length)}\n onAssetSelected={onAssetSelected}\n onAssetUnselected={onAssetUnselected}\n softSelected={softSelectedAssetKey === asset.key}\n component={component}\n />\n ) : (\n <AssetGalleryCompactCard\n asset={asset}\n activeSummaryCard={activeSummaryCard}\n displayIcon={displayIcon}\n hasHeightAndWidth={asset.layout.hasHeightAndWidth}\n collapseExtraInfo={asset.layout.width < 90}\n selectable={'selectable' in asset ? asset.selectable : selectable}\n selected={selectedAssetKeys.includes(asset.key)}\n customSelectedBorder={customSelectedBorder}\n extendedSelectMode={Boolean(selectedAssetKeys.length)}\n onAssetSelected={onAssetSelected}\n onAssetUnselected={onAssetUnselected}\n softSelected={softSelectedAssetKey === asset.key}\n component={component}\n />\n )}\n </S.AssetGalleryCardBase>\n )}\n </React.Fragment>\n )\n )}\n </S.AssetGalleryBase>\n </>\n );\n});\n\nAssetGalleryBase.propTypes = {\n /**\n * An array of assets to display in the gallery.\n */\n assets: PropTypes.arrayOf(PropTypes.shape(assetShape)),\n\n /**\n * Whether the asset gallery should render the Asset Summary Card on hover.\n */\n activeSummaryCard: PropTypes.bool,\n\n /**\n * Whether the asset gallery should display the Version Count or Verifications on default.\n */\n displayIcon: PropTypes.string,\n\n /**\n * The view mode of the gallery.\n */\n viewMode: PropTypes.oneOf(['compact', 'grid']),\n\n /**\n * The maximum height of thumbnails in the gallery. When the grid is computed the gallery will try\n * to have each row of the gallery as close to the max height as possible.\n */\n thumbnailMaxHeight: PropTypes.number,\n\n /**\n * Whether or not the asset gallery should have selectable asset cards\n */\n selectable: PropTypes.bool,\n\n /**\n * Whether or not the asset gallery should have custom borders on selected asset\n */\n customSelectedBorder: PropTypes.arrayOf(PropTypes.string),\n\n /**\n * An array containing the key of all selected assets\n */\n selectedAssetKeys: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.string),\n PropTypes.arrayOf(PropTypes.number)\n ]).isRequired,\n\n /**\n * Scrollable element to attach event listeners to. Defaults to window.\n */\n scrollElement: PropTypes.instanceOf(Element),\n\n /**\n * The callback function when an asset is selected - returns the selected asset key\n */\n onAssetSelected: PropTypes.func.isRequired,\n\n /**\n * The callback function when an asset is unselected - returns the unselected asset key\n */\n onAssetUnselected: PropTypes.func.isRequired,\n\n /**\n * Whether or not the asset gallery should have soft selectable asset cards\n */\n softSelectable: PropTypes.bool,\n\n /**\n * A value containing the key of the soft selected asset or null\n */\n softSelectedAssetKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * The callback function when soft selected asset changes - returns the selected asset key or null\n */\n onAssetSoftSelectedChanged: PropTypes.func.isRequired,\n\n /**\n * A function that returns a custom component to use for the card in the gallery - The function provides\n * `asset` as its first argument\n */\n component: PropTypes.func,\n\n /**\n * Optional className\n */\n className: PropTypes.string\n};\n\nexport default AssetGalleryBase;\n"],"names":["AssetGalleryBase","React","forwardRef","assets","assetsProp","activeSummaryCard","displayIcon","viewMode","thumbnailMaxHeight","selectable","customSelectedBorder","selectedAssetKeys","onAssetSelected","onAssetUnselected","softSelectable","softSelectedAssetKey","scrollElement","scrollElementProp","onAssetSoftSelectedChanged","component","props","forwardedRef","assetGalleryDOMNode","useRef","assetGalleryCompactRef","useMergedRefs","assetGalleryWidth","minimumRowAspectRatio","calculatedAssets","setAssets","useState","MAXIMUM_ROW_HEIGHT","useMemo","SPACE_BETWEEN_ASSETS","SPACE_UNDER_ASSETS","PRIMARY_SCROLL_BUFFER_HEIGHT","SECONDARY_SCROLL_BUFFER_HEIGHT","GRID_VIEW_MODE_ASSET_MIN_WIDTH","GRID_VIEW_MODE_ASSET_HEIGHT","MISSING_WIDTH_PLACEHOLDER","MISSING_HEIGHT_PLACEHOLDER","isBrowser","window","previousYOffset","pageYOffset","latestYOffset","scrollDirection","useIsomorphicLayoutEffect","current","throttledOnResize","throttle","onResize","resizeObserver","ResizeObserver","observe","entries","forEach","entry","contentRect","width","requestAnimationFrame","main","unobserve","useEffect","calculateAssetGalleryAspectRatio","calculateLayout","calculateVisibility","calculateAspectRatio","assetsWithoutAKey","filter","a","key","length","console","warn","row","translateX","translateY","computedAssets","lastGroup","desiredAssetCountInRow","Math","floor","desiredAssetWidth","asset","index","group","push","title","layout","type","height","round","rowAsset","rowAspectRatio","max","totalDesiredWidthOfImages","rowHeight","assetWidth","hasHeightAndWidth","Boolean","totalGalleryHeight","lastAsset","throttledOnScroll","onScroll","addEventListener","removeEventListener","setScrollPositionAndDirection","newYOffset","bufferTop","bufferBottom","containerOffset","getOffsetTop","scrollerHeight","innerHeight","yOffset","minTranslateYPlusHeight","maxTranslateY","finalizedAssets","map","self","show","elem","offsetTop","isNaN","offsetParent","handleKeyPress","useCallback","e","isElementVisible","el","rect","getBoundingClientRect","vWidth","innerWidth","document","documentElement","clientWidth","vHeight","clientHeight","efp","x","y","elementFromPoint","right","bottom","left","top","contains","softSelectFirstVisibleAsset","visibleAssets","i","children","previousAssetIndex","findIndex","previousAsset","nextAssetIndex","nextAsset","includes","handleClick","createElement","Fragment","S","_extends","ref","style","className","transform","display","justifyContent","AssetGalleryGridCard","selected","extendedSelectMode","softSelected","AssetGalleryCompactCard","collapseExtraInfo","propTypes","process","env","NODE_ENV","PropTypes","arrayOf","shape","assetShape","bool","string","oneOf","number","oneOfType","isRequired","instanceOf","Element","func"],"mappings":";;;;;;;;;;;;AAWMA,MAAAA,gBAAgB,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,gBAAgBA,CACjE;AACEG,EAAAA,MAAM,EAAEC,UAAU;EAClBC,iBAAiB;EACjBC,WAAW;EACXC,QAAQ;EACRC,kBAAkB;EAClBC,UAAU;EACVC,oBAAoB;EACpBC,iBAAiB;EACjBC,eAAe;EACfC,iBAAiB;EACjBC,cAAc;EACdC,oBAAoB;AACpBC,EAAAA,aAAa,EAAEC,iBAAiB;EAChCC,0BAA0B;EAC1BC,SAAS;EACT,GAAGC,KAAAA;AACL,CAAC,EACDC,YAAY,EACZ;AAEA,EAAA,MAAMC,mBAAmB,GAAGC,MAAM,EAAE,CAAA;AACpC,EAAA,MAAMC,sBAAsB,GAAGC,aAAa,CAACJ,YAAY,EAAEC,mBAAmB,CAAC,CAAA;AAE/E,EAAA,MAAMI,iBAAiB,GAAGH,MAAM,CAAC,CAAC,CAAC,CAAA;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