59 lines
2.0 KiB
JavaScript
59 lines
2.0 KiB
JavaScript
'use client';
|
|
|
|
import { __styles, mergeClasses } from '@griffel/react';
|
|
import { tokens } from '@fluentui/react-theme';
|
|
export const labelClassNames = {
|
|
root: 'fui-Label',
|
|
required: 'fui-Label__required'
|
|
};
|
|
/**
|
|
* Styles for the label
|
|
*/
|
|
const useStyles = /*#__PURE__*/__styles({
|
|
root: {
|
|
Bahqtrf: "fk6fouc",
|
|
sj55zd: "f19n0e5"
|
|
},
|
|
disabled: {
|
|
sj55zd: "f1s2aq7o",
|
|
B7iucu3: "f1cyfu5x"
|
|
},
|
|
required: {
|
|
sj55zd: "f1whyuy6",
|
|
uwmqm3: ["fruq291", "f7x41pl"]
|
|
},
|
|
small: {
|
|
Be2twd7: "fy9rknc",
|
|
Bg96gwp: "fwrc4pm"
|
|
},
|
|
medium: {
|
|
Be2twd7: "fkhj508",
|
|
Bg96gwp: "f1i3iumi"
|
|
},
|
|
large: {
|
|
Be2twd7: "fod5ikn",
|
|
Bg96gwp: "faaz57k",
|
|
Bhrd7zp: "fl43uef"
|
|
},
|
|
semibold: {
|
|
Bhrd7zp: "fl43uef"
|
|
}
|
|
}, {
|
|
d: [".fk6fouc{font-family:var(--fontFamilyBase);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f1whyuy6{color:var(--colorPaletteRedForeground3);}", ".fruq291{padding-left:var(--spacingHorizontalXS);}", ".f7x41pl{padding-right:var(--spacingHorizontalXS);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}"],
|
|
m: [["@media (forced-colors: active){.f1cyfu5x{color:GrayText;}}", {
|
|
m: "(forced-colors: active)"
|
|
}]]
|
|
});
|
|
/**
|
|
* Apply styling to the Label slots based on the state
|
|
*/
|
|
export const useLabelStyles_unstable = state => {
|
|
'use no memo';
|
|
|
|
const styles = useStyles();
|
|
state.root.className = mergeClasses(labelClassNames.root, styles.root, state.disabled && styles.disabled, styles[state.size], state.weight === 'semibold' && styles.semibold, state.root.className);
|
|
if (state.required) {
|
|
state.required.className = mergeClasses(labelClassNames.required, styles.required, state.disabled && styles.disabled, state.required.className);
|
|
}
|
|
return state;
|
|
}; |