@talxis/base-controls 1.2503.2 → 1.2503.4
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.
|
@@ -5,7 +5,7 @@ const getGridCellLabelStyles = (columnAlignment, dataType, rowHeight, theme) =>
|
|
|
5
5
|
root: {
|
|
6
6
|
display: 'flex',
|
|
7
7
|
alignItems: 'center',
|
|
8
|
-
height: rowHeight
|
|
8
|
+
height: rowHeight,
|
|
9
9
|
paddingLeft: 8,
|
|
10
10
|
paddingRight: 8,
|
|
11
11
|
justifyContent: getJustifyContent(columnAlignment),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../src/components/GridCellRenderer/styles.ts"],"sourcesContent":["import { mergeStyleSets } from \"@fluentui/react\"\nimport { DataType, IColumn } from \"@talxis/client-libraries\";\nimport { ITheme } from \"@talxis/react-components\";\n\nexport const getGridCellLabelStyles = (columnAlignment: IColumn['alignment'], dataType: DataType, rowHeight: number, theme: ITheme) => {\n return mergeStyleSets({\n root: {\n display: 'flex',\n alignItems: 'center',\n height: rowHeight
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/components/GridCellRenderer/styles.ts"],"sourcesContent":["import { mergeStyleSets } from \"@fluentui/react\"\nimport { DataType, IColumn } from \"@talxis/client-libraries\";\nimport { ITheme } from \"@talxis/react-components\";\n\nexport const getGridCellLabelStyles = (columnAlignment: IColumn['alignment'], dataType: DataType, rowHeight: number, theme: ITheme) => {\n return mergeStyleSets({\n root: {\n display: 'flex',\n alignItems: 'center',\n height: rowHeight,\n paddingLeft: 8,\n paddingRight: 8,\n justifyContent: getJustifyContent(columnAlignment),\n gap: 10,\n },\n fileWrapper: {\n display: 'flex',\n gap: 5,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n alignItems: 'center'\n },\n contentWrapper: {\n flexGrow: 1,\n textAlign: columnAlignment,\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n fileImage: {\n marginRight: 5,\n flexShrink: 0,\n 'img': {\n width: 32\n }\n },\n link: {\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n ...(isMultiple(dataType) ? getMultilineStyles(rowHeight, theme) : {})\n },\n icon: {\n 'img': {\n width: 20\n }\n },\n fileIcon: {\n fontSize: 18\n },\n loadingSpinnerCircle: {\n width: 20,\n height: 20\n }\n })\n}\nexport const getDefaultContentRendererStyles = (theme: ITheme, dataType: DataType, rowHeight: number) => {\n return mergeStyleSets({\n content: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n flexGrow: 1,\n ...(isMultiple(dataType) ? getMultilineStyles(rowHeight, theme) : {})\n },\n placeholder: {\n color: theme.semanticColors.inputPlaceholderText\n }\n });\n}\n\nconst getJustifyContent = (columnAlignment: IColumn['alignment']) => {\n switch (columnAlignment) {\n case 'left': {\n return 'flex-start';\n }\n case 'center': {\n return 'center';\n }\n case 'right': {\n return 'flex-end';\n }\n }\n}\n\nconst getMultilineStyles = (rowHeight: number, theme: ITheme) => {\n let fontSize = 20;\n const themeFontSize = theme.fonts.medium.fontSize;\n theme.fonts.medium.lineHeight\n if(typeof themeFontSize === 'number') {\n fontSize = themeFontSize;\n }\n else if(typeof themeFontSize === 'string' && themeFontSize.endsWith('px')) {\n fontSize = parseInt(themeFontSize.replace('px', ''));\n }\n const clamp = Math.floor(rowHeight / fontSize) - 1;\n return {\n lineHeight: '1.2',\n display: '-webkit-box',\n whiteSpace: 'normal',\n '-webkit-box-orient': 'vertical',\n wordBreak: 'break-all',\n '-webkit-line-clamp': clamp.toString(),\n };\n}\n\nconst isMultiple = (dataType: DataType) => {\n return dataType === 'Multiple' || dataType === 'SingleLine.TextArea';\n}\n"],"names":[],"mappings":";;AAIO,MAAM,sBAAsB,GAAG,CAAC,eAAqC,EAAE,QAAkB,EAAE,SAAiB,EAAE,KAAa,KAAI;AAClI,IAAA,OAAO,cAAc,CAAC;AAClB,QAAA,IAAI,EAAE;AACF,YAAA,O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