@fluentui/react-label 0.0.0-nightly-20250702-0405.1 → 0.0.0-nightly-20250703-1103.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/CHANGELOG.md +10 -10
- package/lib/components/Label/useLabelStyles.styles.raw.js +51 -0
- package/lib/components/Label/useLabelStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/Label/useLabelStyles.styles.raw.js +67 -0
- package/lib-commonjs/components/Label/useLabelStyles.styles.raw.js.map +1 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
# Change Log - @fluentui/react-label
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 03 Jul 2025 11:19:20 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-nightly-
|
7
|
+
## [0.0.0-nightly-20250703-1103.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightly-20250703-1103.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.2.2..@fluentui/react-label_v0.0.0-nightly-
|
9
|
+
Thu, 03 Jul 2025 11:19:20 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.2.2..@fluentui/react-label_v0.0.0-nightly-20250703-1103.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
15
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
16
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
17
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
18
|
-
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-
|
19
|
-
- Bump @fluentui/react-conformance to v0.0.0-nightly-
|
20
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
15
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20250703-1103.1 ([commit](https://github.com/microsoft/fluentui/commit/526d249cdcd844e3f173f9163b3ce779fe6035e8) by beachball)
|
16
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20250703-1103.1 ([commit](https://github.com/microsoft/fluentui/commit/526d249cdcd844e3f173f9163b3ce779fe6035e8) by beachball)
|
17
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20250703-1103.1 ([commit](https://github.com/microsoft/fluentui/commit/526d249cdcd844e3f173f9163b3ce779fe6035e8) by beachball)
|
18
|
+
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20250703-1103.1 ([commit](https://github.com/microsoft/fluentui/commit/526d249cdcd844e3f173f9163b3ce779fe6035e8) by beachball)
|
19
|
+
- Bump @fluentui/react-conformance to v0.0.0-nightly-20250703-1103.1 ([commit](https://github.com/microsoft/fluentui/commit/526d249cdcd844e3f173f9163b3ce779fe6035e8) by beachball)
|
20
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20250703-1103.1 ([commit](https://github.com/microsoft/fluentui/commit/526d249cdcd844e3f173f9163b3ce779fe6035e8) by beachball)
|
21
21
|
|
22
22
|
## [9.2.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.2.2)
|
23
23
|
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import { makeStyles, mergeClasses } from '@griffel/react';
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
3
|
+
export const labelClassNames = {
|
4
|
+
root: 'fui-Label',
|
5
|
+
required: 'fui-Label__required'
|
6
|
+
};
|
7
|
+
/**
|
8
|
+
* Styles for the label
|
9
|
+
*/ const useStyles = makeStyles({
|
10
|
+
root: {
|
11
|
+
fontFamily: tokens.fontFamilyBase,
|
12
|
+
color: tokens.colorNeutralForeground1
|
13
|
+
},
|
14
|
+
disabled: {
|
15
|
+
color: tokens.colorNeutralForegroundDisabled,
|
16
|
+
'@media (forced-colors: active)': {
|
17
|
+
color: 'GrayText'
|
18
|
+
}
|
19
|
+
},
|
20
|
+
required: {
|
21
|
+
color: tokens.colorPaletteRedForeground3,
|
22
|
+
paddingLeft: tokens.spacingHorizontalXS
|
23
|
+
},
|
24
|
+
small: {
|
25
|
+
fontSize: tokens.fontSizeBase200,
|
26
|
+
lineHeight: tokens.lineHeightBase200
|
27
|
+
},
|
28
|
+
medium: {
|
29
|
+
fontSize: tokens.fontSizeBase300,
|
30
|
+
lineHeight: tokens.lineHeightBase300
|
31
|
+
},
|
32
|
+
large: {
|
33
|
+
fontSize: tokens.fontSizeBase400,
|
34
|
+
lineHeight: tokens.lineHeightBase400,
|
35
|
+
fontWeight: tokens.fontWeightSemibold
|
36
|
+
},
|
37
|
+
semibold: {
|
38
|
+
fontWeight: tokens.fontWeightSemibold
|
39
|
+
}
|
40
|
+
});
|
41
|
+
/**
|
42
|
+
* Apply styling to the Label slots based on the state
|
43
|
+
*/ export const useLabelStyles_unstable = (state)=>{
|
44
|
+
'use no memo';
|
45
|
+
const styles = useStyles();
|
46
|
+
state.root.className = mergeClasses(labelClassNames.root, styles.root, state.disabled && styles.disabled, styles[state.size], state.weight === 'semibold' && styles.semibold, state.root.className);
|
47
|
+
if (state.required) {
|
48
|
+
state.required.className = mergeClasses(labelClassNames.required, styles.required, state.disabled && styles.disabled, state.required.className);
|
49
|
+
}
|
50
|
+
return state;
|
51
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/components/Label/useLabelStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { LabelSlots, LabelState } from './Label.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const labelClassNames: SlotClassNames<LabelSlots> = {\n root: 'fui-Label',\n required: 'fui-Label__required',\n};\n\n/**\n * Styles for the label\n */\nconst useStyles = makeStyles({\n root: {\n fontFamily: tokens.fontFamilyBase,\n color: tokens.colorNeutralForeground1,\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n\n required: {\n color: tokens.colorPaletteRedForeground3,\n paddingLeft: tokens.spacingHorizontalXS,\n },\n\n small: {\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n },\n\n medium: {\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n\n large: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n fontWeight: tokens.fontWeightSemibold,\n },\n\n semibold: {\n fontWeight: tokens.fontWeightSemibold,\n },\n});\n\n/**\n * Apply styling to the Label slots based on the state\n */\nexport const useLabelStyles_unstable = (state: LabelState): LabelState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(\n labelClassNames.root,\n styles.root,\n state.disabled && styles.disabled,\n styles[state.size],\n state.weight === 'semibold' && styles.semibold,\n state.root.className,\n );\n\n if (state.required) {\n state.required.className = mergeClasses(\n labelClassNames.required,\n styles.required,\n state.disabled && styles.disabled,\n state.required.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","labelClassNames","root","required","useStyles","fontFamily","fontFamilyBase","color","colorNeutralForeground1","disabled","colorNeutralForegroundDisabled","colorPaletteRedForeground3","paddingLeft","spacingHorizontalXS","small","fontSize","fontSizeBase200","lineHeight","lineHeightBase200","medium","fontSizeBase300","lineHeightBase300","large","fontSizeBase400","lineHeightBase400","fontWeight","fontWeightSemibold","semibold","useLabelStyles_unstable","state","styles","className","size","weight"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAC1D,SAASC,MAAM,QAAQ,wBAAwB;AAI/C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AAOF;AACT,EAAE"}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
labelClassNames: function() {
|
13
|
+
return labelClassNames;
|
14
|
+
},
|
15
|
+
useLabelStyles_unstable: function() {
|
16
|
+
return useLabelStyles_unstable;
|
17
|
+
}
|
18
|
+
});
|
19
|
+
const _react = require("@griffel/react");
|
20
|
+
const _reacttheme = require("@fluentui/react-theme");
|
21
|
+
const labelClassNames = {
|
22
|
+
root: 'fui-Label',
|
23
|
+
required: 'fui-Label__required'
|
24
|
+
};
|
25
|
+
/**
|
26
|
+
* Styles for the label
|
27
|
+
*/ const useStyles = (0, _react.makeStyles)({
|
28
|
+
root: {
|
29
|
+
fontFamily: _reacttheme.tokens.fontFamilyBase,
|
30
|
+
color: _reacttheme.tokens.colorNeutralForeground1
|
31
|
+
},
|
32
|
+
disabled: {
|
33
|
+
color: _reacttheme.tokens.colorNeutralForegroundDisabled,
|
34
|
+
'@media (forced-colors: active)': {
|
35
|
+
color: 'GrayText'
|
36
|
+
}
|
37
|
+
},
|
38
|
+
required: {
|
39
|
+
color: _reacttheme.tokens.colorPaletteRedForeground3,
|
40
|
+
paddingLeft: _reacttheme.tokens.spacingHorizontalXS
|
41
|
+
},
|
42
|
+
small: {
|
43
|
+
fontSize: _reacttheme.tokens.fontSizeBase200,
|
44
|
+
lineHeight: _reacttheme.tokens.lineHeightBase200
|
45
|
+
},
|
46
|
+
medium: {
|
47
|
+
fontSize: _reacttheme.tokens.fontSizeBase300,
|
48
|
+
lineHeight: _reacttheme.tokens.lineHeightBase300
|
49
|
+
},
|
50
|
+
large: {
|
51
|
+
fontSize: _reacttheme.tokens.fontSizeBase400,
|
52
|
+
lineHeight: _reacttheme.tokens.lineHeightBase400,
|
53
|
+
fontWeight: _reacttheme.tokens.fontWeightSemibold
|
54
|
+
},
|
55
|
+
semibold: {
|
56
|
+
fontWeight: _reacttheme.tokens.fontWeightSemibold
|
57
|
+
}
|
58
|
+
});
|
59
|
+
const useLabelStyles_unstable = (state)=>{
|
60
|
+
'use no memo';
|
61
|
+
const styles = useStyles();
|
62
|
+
state.root.className = (0, _react.mergeClasses)(labelClassNames.root, styles.root, state.disabled && styles.disabled, styles[state.size], state.weight === 'semibold' && styles.semibold, state.root.className);
|
63
|
+
if (state.required) {
|
64
|
+
state.required.className = (0, _react.mergeClasses)(labelClassNames.required, styles.required, state.disabled && styles.disabled, state.required.className);
|
65
|
+
}
|
66
|
+
return state;
|
67
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/components/Label/useLabelStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { LabelSlots, LabelState } from './Label.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const labelClassNames: SlotClassNames<LabelSlots> = {\n root: 'fui-Label',\n required: 'fui-Label__required',\n};\n\n/**\n * Styles for the label\n */\nconst useStyles = makeStyles({\n root: {\n fontFamily: tokens.fontFamilyBase,\n color: tokens.colorNeutralForeground1,\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n\n required: {\n color: tokens.colorPaletteRedForeground3,\n paddingLeft: tokens.spacingHorizontalXS,\n },\n\n small: {\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n },\n\n medium: {\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n\n large: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n fontWeight: tokens.fontWeightSemibold,\n },\n\n semibold: {\n fontWeight: tokens.fontWeightSemibold,\n },\n});\n\n/**\n * Apply styling to the Label slots based on the state\n */\nexport const useLabelStyles_unstable = (state: LabelState): LabelState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(\n labelClassNames.root,\n styles.root,\n state.disabled && styles.disabled,\n styles[state.size],\n state.weight === 'semibold' && styles.semibold,\n state.root.className,\n );\n\n if (state.required) {\n state.required.className = mergeClasses(\n labelClassNames.required,\n styles.required,\n state.disabled && styles.disabled,\n state.required.className,\n );\n }\n\n return state;\n};\n"],"names":["labelClassNames","useLabelStyles_unstable","root","required","useStyles","makeStyles","fontFamily","tokens","fontFamilyBase","color","colorNeutralForeground1","disabled","colorNeutralForegroundDisabled","colorPaletteRedForeground3","paddingLeft","spacingHorizontalXS","small","fontSize","fontSizeBase200","lineHeight","lineHeightBase200","medium","fontSizeBase300","lineHeightBase300","large","fontSizeBase400","lineHeightBase400","fontWeight","fontWeightSemibold","semibold","state","styles","className","mergeClasses","size","weight"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,eAAAA;eAAAA;;IAkDAC,uBAAAA;eAAAA;;;uBAvD4B;4BAClB;AAIhB,MAAMD,kBAA8C;IACzDE,MAAM;IACNC,UAAU;AACZ;AAEA;;CAEC,GACD,MAAMC,YAAYC,IAAAA,iBAAAA,EAAW;IAC3BH,MAAM;QACJI,YAAYC,kBAAAA,CAAOC,cAAc;QACjCC,OAAOF,kBAAAA,CAAOG,uBAAuB;IACvC;IAEAC,UAAU;QACRF,OAAOF,kBAAAA,CAAOK,8BAA8B;QAC5C,kCAAkC;YAChCH,OAAO;QACT;IACF;IAEAN,UAAU;QACRM,OAAOF,kBAAAA,CAAOM,0BAA0B;QACxCC,aAAaP,kBAAAA,CAAOQ,mBAAmB;IACzC;IAEAC,OAAO;QACLC,UAAUV,kBAAAA,CAAOW,eAAe;QAChCC,YAAYZ,kBAAAA,CAAOa,iBAAiB;IACtC;IAEAC,QAAQ;QACNJ,UAAUV,kBAAAA,CAAOe,eAAe;QAChCH,YAAYZ,kBAAAA,CAAOgB,iBAAiB;IACtC;IAEAC,OAAO;QACLP,UAAUV,kBAAAA,CAAOkB,eAAe;QAChCN,YAAYZ,kBAAAA,CAAOmB,iBAAiB;QACpCC,YAAYpB,kBAAAA,CAAOqB,kBAAkB;IACvC;IAEAC,UAAU;QACRF,YAAYpB,kBAAAA,CAAOqB,kBAAkB;IACvC;AACF;AAKO,MAAM3B,0BAA0B,CAAC6B;IACtC;IAEA,MAAMC,SAAS3B;IACf0B,MAAM5B,IAAI,CAAC8B,SAAS,GAAGC,IAAAA,mBAAAA,EACrBjC,gBAAgBE,IAAI,EACpB6B,OAAO7B,IAAI,EACX4B,MAAMnB,QAAQ,IAAIoB,OAAOpB,QAAQ,EACjCoB,MAAM,CAACD,MAAMI,IAAI,CAAC,EAClBJ,MAAMK,MAAM,KAAK,cAAcJ,OAAOF,QAAQ,EAC9CC,MAAM5B,IAAI,CAAC8B,SAAS;IAGtB,IAAIF,MAAM3B,QAAQ,EAAE;QAClB2B,MAAM3B,QAAQ,CAAC6B,SAAS,GAAGC,IAAAA,mBAAAA,EACzBjC,gBAAgBG,QAAQ,EACxB4B,OAAO5B,QAAQ,EACf2B,MAAMnB,QAAQ,IAAIoB,OAAOpB,QAAQ,EACjCmB,MAAM3B,QAAQ,CAAC6B,SAAS;IAE5B;IAEA,OAAOF;AACT"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-label",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20250703-1103.1",
|
4
4
|
"description": "Fluent UI React Label component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -13,15 +13,15 @@
|
|
13
13
|
"license": "MIT",
|
14
14
|
"devDependencies": {
|
15
15
|
"@fluentui/eslint-plugin": "*",
|
16
|
-
"@fluentui/react-conformance": "0.0.0-nightly-
|
17
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
16
|
+
"@fluentui/react-conformance": "0.0.0-nightly-20250703-1103.1",
|
17
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20250703-1103.1",
|
18
18
|
"@fluentui/scripts-api-extractor": "*"
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
|
-
"@fluentui/react-shared-contexts": "0.0.0-nightly-
|
22
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
23
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
24
|
-
"@fluentui/react-jsx-runtime": "0.0.0-nightly-
|
21
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20250703-1103.1",
|
22
|
+
"@fluentui/react-theme": "0.0.0-nightly-20250703-1103.1",
|
23
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20250703-1103.1",
|
24
|
+
"@fluentui/react-jsx-runtime": "0.0.0-nightly-20250703-1103.1",
|
25
25
|
"@griffel/react": "^1.5.22",
|
26
26
|
"@swc/helpers": "^0.5.1"
|
27
27
|
},
|