stream-chat-react-native-core
Version:
The official React Native and Expo components for Stream Chat, a service for building chat applications
120 lines • 2.87 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.onlineIndicatorSizes = exports.numberOfInitials = exports.indicatorSizes = exports.indicatorPositions = exports.iconSizes = exports.fontSizes = exports.avatarSizes = void 0;
var _theme = require("../../../theme");
var avatarSizes = exports.avatarSizes = {
'2xl': {
height: 80,
width: 80
},
xl: {
height: 48,
width: 48
},
lg: {
height: 40,
width: 40
},
md: {
height: 32,
width: 32
},
sm: {
height: 24,
width: 24
},
xs: {
height: 20,
width: 20
}
};
var indicatorSizes = exports.indicatorSizes = {
'2xl': 'xl',
xl: 'xl',
lg: 'lg',
md: 'md',
sm: 'sm',
xs: 'sm'
};
var onlineIndicatorSizes = exports.onlineIndicatorSizes = {
xl: {
borderWidth: 2,
height: 16,
width: 16
},
lg: {
borderWidth: 2,
height: 14,
width: 14
},
md: {
borderWidth: 2,
height: 12,
width: 12
},
sm: {
borderWidth: 1,
height: 8,
width: 8
}
};
var indicatorPositions = exports.indicatorPositions = Object.keys(avatarSizes).reduce((acc, size) => {
var avatarDiameter = avatarSizes[size].width;
var indicatorDiameter = onlineIndicatorSizes[indicatorSizes[size]].width;
var offset = Math.round(avatarDiameter / 2 * (1 - Math.SQRT1_2) - indicatorDiameter / 2);
acc[size] = {
right: offset,
top: offset
};
return acc;
}, {});
var iconSizes = exports.iconSizes = {
xs: 10,
sm: 12,
md: 16,
lg: 20,
xl: 24,
'2xl': 32
};
var fontSizes = exports.fontSizes = {
xs: {
fontSize: _theme.primitives.typographyFontSizeXs,
fontWeight: _theme.primitives.typographyFontWeightSemiBold,
lineHeight: _theme.primitives.typographyLineHeightTight
},
sm: {
fontSize: _theme.primitives.typographyFontSizeSm,
fontWeight: _theme.primitives.typographyFontWeightSemiBold,
lineHeight: _theme.primitives.typographyLineHeightNormal
},
md: {
fontSize: _theme.primitives.typographyFontSizeSm,
fontWeight: _theme.primitives.typographyFontWeightSemiBold,
lineHeight: _theme.primitives.typographyLineHeightNormal
},
lg: {
fontSize: _theme.primitives.typographyFontSizeMd,
fontWeight: _theme.primitives.typographyFontWeightSemiBold,
lineHeight: _theme.primitives.typographyLineHeightNormal
},
xl: {
fontSize: _theme.primitives.typographyFontSizeLg,
fontWeight: _theme.primitives.typographyFontWeightSemiBold,
lineHeight: _theme.primitives.typographyLineHeightRelaxed
},
'2xl': {
fontSize: _theme.primitives.typographyFontSizeXl,
fontWeight: _theme.primitives.typographyFontWeightSemiBold,
lineHeight: _theme.primitives.typographyLineHeightRelaxed
}
};
var numberOfInitials = exports.numberOfInitials = {
xs: 1,
sm: 1,
md: 2,
lg: 2,
xl: 2,
'2xl': 2
};
//# sourceMappingURL=constants.js.map