103 lines
3.3 KiB
JavaScript
103 lines
3.3 KiB
JavaScript
'use client';
|
|
|
|
import { __styles, mergeClasses } from '@griffel/react';
|
|
import { tokens } from '@fluentui/react-theme';
|
|
import { typographyStyles } from '@fluentui/react-theme';
|
|
export const tableCellLayoutClassNames = {
|
|
root: 'fui-TableCellLayout',
|
|
media: 'fui-TableCellLayout__media',
|
|
main: 'fui-TableCellLayout__main',
|
|
description: 'fui-TableCellLayout__description',
|
|
content: 'fui-TableCellLayout__content'
|
|
};
|
|
/**
|
|
* Styles for the root slot
|
|
*/
|
|
const useStyles = /*#__PURE__*/__styles({
|
|
root: {
|
|
mc9l5x: "f22iagw",
|
|
Bt984gj: "f122n59",
|
|
i8kkvl: 0,
|
|
Belr9w4: 0,
|
|
rmohyg: "faqewft",
|
|
xawz: 0,
|
|
Bh6795r: 0,
|
|
Bnnss6s: 0,
|
|
fkmc3a: "f1izfyrr"
|
|
},
|
|
rootTruncate: {
|
|
B68tc82: "f1p9o1ba"
|
|
},
|
|
content: {
|
|
mc9l5x: "f22iagw",
|
|
Beiy3e4: "f1vx9l62"
|
|
},
|
|
contentTruncate: {
|
|
B68tc82: "f1p9o1ba"
|
|
},
|
|
media: {
|
|
mc9l5x: "f22iagw",
|
|
Bt984gj: "f122n59"
|
|
},
|
|
mediaExtraSmall: {
|
|
Be2twd7: "f4ybsrx"
|
|
},
|
|
mediaSmallAndMedium: {
|
|
Be2twd7: "fe5j1ua"
|
|
},
|
|
mediaPrimary: {
|
|
Be2twd7: "f1rt2boy"
|
|
},
|
|
mainPrimary: {
|
|
Bhrd7zp: "fl43uef"
|
|
},
|
|
mainTruncate: {
|
|
B68tc82: "f1p9o1ba",
|
|
Huce71: "fz5stix",
|
|
ygn44y: "f1cmbuwj"
|
|
},
|
|
description: {
|
|
sj55zd: "fkfq4zb",
|
|
Bahqtrf: "fk6fouc",
|
|
Be2twd7: "fy9rknc",
|
|
Bhrd7zp: "figsok6",
|
|
Bg96gwp: "fwrc4pm"
|
|
}
|
|
}, {
|
|
d: [".f22iagw{display:flex;}", ".f122n59{align-items:center;}", [".faqewft{gap:var(--spacingHorizontalS);}", {
|
|
p: -1
|
|
}], [".f1izfyrr{flex:1 1 0px;}", {
|
|
p: -1
|
|
}], ".f1p9o1ba{overflow-x:hidden;}", ".f1vx9l62{flex-direction:column;}", ".f4ybsrx{font-size:16px;}", ".fe5j1ua{font-size:20px;}", ".f1rt2boy{font-size:24px;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fz5stix{white-space:nowrap;}", ".f1cmbuwj{text-overflow:ellipsis;}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}"]
|
|
});
|
|
/**
|
|
* Apply styling to the TableCellLayout slots based on the state
|
|
*/
|
|
export const useTableCellLayoutStyles_unstable = state => {
|
|
'use no memo';
|
|
|
|
const styles = useStyles();
|
|
const {
|
|
truncate
|
|
} = state;
|
|
state.root.className = mergeClasses(tableCellLayoutClassNames.root, styles.root, truncate && styles.rootTruncate, state.root.className);
|
|
const primary = state.appearance === 'primary';
|
|
if (state.media) {
|
|
const mediaSizedStyles = {
|
|
small: styles.mediaSmallAndMedium,
|
|
medium: styles.mediaSmallAndMedium,
|
|
'extra-small': styles.mediaExtraSmall
|
|
};
|
|
state.media.className = mergeClasses(tableCellLayoutClassNames.media, styles.media, mediaSizedStyles[state.size], primary && styles.mediaPrimary, state.media.className);
|
|
}
|
|
if (state.main) {
|
|
state.main.className = mergeClasses(tableCellLayoutClassNames.main, truncate && styles.mainTruncate, primary && styles.mainPrimary, state.main.className);
|
|
}
|
|
if (state.description) {
|
|
state.description.className = mergeClasses(tableCellLayoutClassNames.description, styles.description, state.description.className);
|
|
}
|
|
if (state.content) {
|
|
state.content.className = mergeClasses(tableCellLayoutClassNames.content, styles.content, truncate && styles.contentTruncate, state.content.className);
|
|
}
|
|
return state;
|
|
}; |