@fluentui/react-label 9.3.4 → 9.3.6
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 +31 -5
- package/dist/index.d.ts +2 -1
- package/lib/components/Label/Label.js +1 -0
- package/lib/components/Label/Label.js.map +1 -1
- package/lib/components/Label/renderLabel.js.map +1 -1
- package/lib/components/Label/useLabelStyles.styles.js +2 -0
- package/lib/components/Label/useLabelStyles.styles.js.map +1 -1
- package/lib/components/Label/useLabelStyles.styles.raw.js +1 -0
- package/lib/components/Label/useLabelStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Label/Label.js +1 -0
- package/lib-commonjs/components/Label/Label.js.map +1 -1
- package/lib-commonjs/components/Label/renderLabel.js.map +1 -1
- package/lib-commonjs/components/Label/useLabelStyles.styles.js +1 -0
- package/lib-commonjs/components/Label/useLabelStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Label/useLabelStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/Label/useLabelStyles.styles.raw.js.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
@@ -1,19 +1,45 @@
|
|
1
1
|
# Change Log - @fluentui/react-label
|
2
2
|
|
3
|
-
This log was last generated on Thu,
|
3
|
+
This log was last generated on Thu, 02 Oct 2025 15:07:11 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.3.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.3.6)
|
8
|
+
|
9
|
+
Thu, 02 Oct 2025 15:07:11 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.3.5..@fluentui/react-label_v9.3.6)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- feat: enforce usage of use client directive for files with client-only features ([PR #35173](https://github.com/microsoft/fluentui/pull/35173) by dmytrokirpa@microsoft.com)
|
15
|
+
- Bump @fluentui/react-shared-contexts to v9.25.2 ([PR #35133](https://github.com/microsoft/fluentui/pull/35133) by beachball)
|
16
|
+
- Bump @fluentui/react-utilities to v9.25.0 ([PR #35133](https://github.com/microsoft/fluentui/pull/35133) by beachball)
|
17
|
+
- Bump @fluentui/react-jsx-runtime to v9.2.1 ([PR #35133](https://github.com/microsoft/fluentui/pull/35133) by beachball)
|
18
|
+
|
19
|
+
## [9.3.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.3.5)
|
20
|
+
|
21
|
+
Mon, 08 Sep 2025 12:51:02 GMT
|
22
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.3.4..@fluentui/react-label_v9.3.5)
|
23
|
+
|
24
|
+
### Patches
|
25
|
+
|
26
|
+
- fix: react 19 type issues ([PR #34864](https://github.com/microsoft/fluentui/pull/34864) by dmytrokirpa@microsoft.com)
|
27
|
+
- chore: extend peer dependencies versions to support React 19 ([PR #35145](https://github.com/microsoft/fluentui/pull/35145) by dmytrokirpa@microsoft.com)
|
28
|
+
- chore: enforce explicit module boundary types ([PR #35080](https://github.com/microsoft/fluentui/pull/35080) by dmytrokirpa@microsoft.com)
|
29
|
+
- Bump @fluentui/react-shared-contexts to v9.25.1 ([commit](https://github.com/microsoft/fluentui/commit/17af11b3c9f4cac2beeaf4342a81c1f08e95fd29) by beachball)
|
30
|
+
- Bump @fluentui/react-utilities to v9.24.1 ([commit](https://github.com/microsoft/fluentui/commit/17af11b3c9f4cac2beeaf4342a81c1f08e95fd29) by beachball)
|
31
|
+
- Bump @fluentui/react-jsx-runtime to v9.2.0 ([commit](https://github.com/microsoft/fluentui/commit/17af11b3c9f4cac2beeaf4342a81c1f08e95fd29) by beachball)
|
32
|
+
|
7
33
|
## [9.3.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.3.4)
|
8
34
|
|
9
|
-
Thu, 21 Aug 2025 12:
|
35
|
+
Thu, 21 Aug 2025 12:25:39 GMT
|
10
36
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.3.3..@fluentui/react-label_v9.3.4)
|
11
37
|
|
12
38
|
### Patches
|
13
39
|
|
14
|
-
- Bump @fluentui/react-shared-contexts to v9.25.0 ([
|
15
|
-
- Bump @fluentui/react-utilities to v9.24.0 ([
|
16
|
-
- Bump @fluentui/react-jsx-runtime to v9.1.6 ([
|
40
|
+
- Bump @fluentui/react-shared-contexts to v9.25.0 ([commit](https://github.com/microsoft/fluentui/commit/884c695de4f736774c224fa33b2e410bf42752b0) by beachball)
|
41
|
+
- Bump @fluentui/react-utilities to v9.24.0 ([commit](https://github.com/microsoft/fluentui/commit/884c695de4f736774c224fa33b2e410bf42752b0) by beachball)
|
42
|
+
- Bump @fluentui/react-jsx-runtime to v9.1.6 ([commit](https://github.com/microsoft/fluentui/commit/884c695de4f736774c224fa33b2e410bf42752b0) by beachball)
|
17
43
|
|
18
44
|
## [9.3.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.3.3)
|
19
45
|
|
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { ComponentProps } from '@fluentui/react-utilities';
|
2
2
|
import type { ComponentState } from '@fluentui/react-utilities';
|
3
3
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
4
|
+
import type { JSXElement } from '@fluentui/react-utilities';
|
4
5
|
import * as React_2 from 'react';
|
5
6
|
import type { Slot } from '@fluentui/react-utilities';
|
6
7
|
import type { SlotClassNames } from '@fluentui/react-utilities';
|
@@ -52,7 +53,7 @@ export declare type LabelState = ComponentState<LabelSlots> & Required<Pick<Labe
|
|
52
53
|
/**
|
53
54
|
* Render the final JSX of Label
|
54
55
|
*/
|
55
|
-
export declare const renderLabel_unstable: (state: LabelState) =>
|
56
|
+
export declare const renderLabel_unstable: (state: LabelState) => JSXElement;
|
56
57
|
|
57
58
|
/**
|
58
59
|
* Create the state required to render Label.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/Label/Label.tsx"],"sourcesContent":["
|
1
|
+
{"version":3,"sources":["../src/components/Label/Label.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useLabel_unstable } from './useLabel';\nimport { renderLabel_unstable } from './renderLabel';\nimport { useLabelStyles_unstable } from './useLabelStyles.styles';\nimport type { LabelProps } from './Label.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A label component provides a title or name to a component.\n */\nexport const Label: ForwardRefComponent<LabelProps> = React.forwardRef((props, ref) => {\n const state = useLabel_unstable(props, ref);\n\n useLabelStyles_unstable(state);\n\n useCustomStyleHook_unstable('useLabelStyles_unstable')(state);\n\n return renderLabel_unstable(state);\n});\n\nLabel.displayName = 'Label';\n"],"names":["React","useLabel_unstable","renderLabel_unstable","useLabelStyles_unstable","useCustomStyleHook_unstable","Label","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,uBAAuB,QAAQ,0BAA0B;AAGlE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,sBAAyCL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,QAAQR,kBAAkBM,OAAOC;IAEvCL,wBAAwBM;IAExBL,4BAA4B,2BAA2BK;IAEvD,OAAOP,qBAAqBO;AAC9B,GAAG;AAEHJ,MAAMK,WAAW,GAAG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/Label/renderLabel.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { LabelState, LabelSlots } from './Label.types';\n\n/**\n * Render the final JSX of Label\n */\nexport const renderLabel_unstable = (state: LabelState) => {\n assertSlots<LabelSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n {state.required && <state.required />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderLabel_unstable","state","root","children","required"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;
|
1
|
+
{"version":3,"sources":["../src/components/Label/renderLabel.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { LabelState, LabelSlots } from './Label.types';\n\n/**\n * Render the final JSX of Label\n */\nexport const renderLabel_unstable = (state: LabelState): JSXElement => {\n assertSlots<LabelSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n {state.required && <state.required />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderLabel_unstable","state","root","children","required"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,uBAAuB,CAACC;IACnCF,YAAwBE;IAExB,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAMC,IAAI,CAACC,QAAQ;YACnBF,MAAMG,QAAQ,kBAAI,KAACH,MAAMG,QAAQ;;;AAGxC,EAAE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","tokens","labelClassNames","root","required","useStyles","Bahqtrf","sj55zd","disabled","Bbusuzp","uwmqm3","small","Be2twd7","Bg96gwp","medium","large","Bhrd7zp","semibold","d","m","useLabelStyles_unstable","state","styles","className","size","weight"],"sources":["useLabelStyles.styles.js"],"sourcesContent":["
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","tokens","labelClassNames","root","required","useStyles","Bahqtrf","sj55zd","disabled","Bbusuzp","uwmqm3","small","Be2twd7","Bg96gwp","medium","large","Bhrd7zp","semibold","d","m","useLabelStyles_unstable","state","styles","className","size","weight"],"sources":["useLabelStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const labelClassNames = {\n root: 'fui-Label',\n required: 'fui-Label__required'\n};\n/**\n * Styles for the label\n */ const useStyles = makeStyles({\n root: {\n fontFamily: tokens.fontFamilyBase,\n color: tokens.colorNeutralForeground1\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n '@media (forced-colors: active)': {\n color: 'GrayText'\n }\n },\n required: {\n color: tokens.colorPaletteRedForeground3,\n paddingLeft: tokens.spacingHorizontalXS\n },\n small: {\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200\n },\n medium: {\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300\n },\n large: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n fontWeight: tokens.fontWeightSemibold\n },\n semibold: {\n fontWeight: tokens.fontWeightSemibold\n }\n});\n/**\n * Apply styling to the Label slots based on the state\n */ export const useLabelStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n state.root.className = mergeClasses(labelClassNames.root, styles.root, state.disabled && styles.disabled, styles[state.size], state.weight === 'semibold' && styles.semibold, state.root.className);\n if (state.required) {\n state.required.className = mergeClasses(labelClassNames.required, styles.required, state.disabled && styles.disabled, state.required.className);\n }\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,eAAe,GAAG;EAC3BC,IAAI,EAAE,WAAW;EACjBC,QAAQ,EAAE;AACd,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGN,QAAA;EAAAI,IAAA;IAAAG,OAAA;IAAAC,MAAA;EAAA;EAAAC,QAAA;IAAAD,MAAA;IAAAE,OAAA;EAAA;EAAAL,QAAA;IAAAG,MAAA;IAAAG,MAAA;EAAA;EAAAC,KAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,MAAA;IAAAF,OAAA;IAAAC,OAAA;EAAA;EAAAE,KAAA;IAAAH,OAAA;IAAAC,OAAA;IAAAG,OAAA;EAAA;EAAAC,QAAA;IAAAD,OAAA;EAAA;AAAA;EAAAE,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;AAAA,CA+BrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,uBAAuB,GAAIC,KAAK,IAAG;EAChD,aAAa;;EACb,MAAMC,MAAM,GAAGjB,SAAS,CAAC,CAAC;EAC1BgB,KAAK,CAAClB,IAAI,CAACoB,SAAS,GAAGvB,YAAY,CAACE,eAAe,CAACC,IAAI,EAAEmB,MAAM,CAACnB,IAAI,EAAEkB,KAAK,CAACb,QAAQ,IAAIc,MAAM,CAACd,QAAQ,EAAEc,MAAM,CAACD,KAAK,CAACG,IAAI,CAAC,EAAEH,KAAK,CAACI,MAAM,KAAK,UAAU,IAAIH,MAAM,CAACL,QAAQ,EAAEI,KAAK,CAAClB,IAAI,CAACoB,SAAS,CAAC;EACnM,IAAIF,KAAK,CAACjB,QAAQ,EAAE;IAChBiB,KAAK,CAACjB,QAAQ,CAACmB,SAAS,GAAGvB,YAAY,CAACE,eAAe,CAACE,QAAQ,EAAEkB,MAAM,CAAClB,QAAQ,EAAEiB,KAAK,CAACb,QAAQ,IAAIc,MAAM,CAACd,QAAQ,EAAEa,KAAK,CAACjB,QAAQ,CAACmB,SAAS,CAAC;EACnJ;EACA,OAAOF,KAAK;AAChB,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/Label/useLabelStyles.styles.ts"],"sourcesContent":["
|
1
|
+
{"version":3,"sources":["../src/components/Label/useLabelStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { 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","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,QAAQ,EACf0B,MAAMpB,QAAQ,IAAIqB,OAAOrB,QAAQ,EACjCoB,MAAM1B,QAAQ,CAAC4B,SAAS;IAE5B;IAEA,OAAOF;AACT,EAAE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/Label/Label.tsx"],"sourcesContent":["
|
1
|
+
{"version":3,"sources":["../src/components/Label/Label.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useLabel_unstable } from './useLabel';\nimport { renderLabel_unstable } from './renderLabel';\nimport { useLabelStyles_unstable } from './useLabelStyles.styles';\nimport type { LabelProps } from './Label.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A label component provides a title or name to a component.\n */\nexport const Label: ForwardRefComponent<LabelProps> = React.forwardRef((props, ref) => {\n const state = useLabel_unstable(props, ref);\n\n useLabelStyles_unstable(state);\n\n useCustomStyleHook_unstable('useLabelStyles_unstable')(state);\n\n return renderLabel_unstable(state);\n});\n\nLabel.displayName = 'Label';\n"],"names":["React","useLabel_unstable","renderLabel_unstable","useLabelStyles_unstable","useCustomStyleHook_unstable","Label","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;0BACG,aAAa;6BACV,gBAAgB;sCACb,0BAA0B;qCAGtB,kCAAkC;AAKvE,MAAMK,QAAAA,WAAAA,GAAyCL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,YAAQR,2BAAAA,EAAkBM,OAAOC;QAEvCL,6CAAAA,EAAwBM;QAExBL,gDAAAA,EAA4B,2BAA2BK;IAEvD,WAAOP,iCAAAA,EAAqBO;AAC9B,GAAG;AAEHJ,MAAMK,WAAW,GAAG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/components/Label/renderLabel.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { LabelState, LabelSlots } from './Label.types';\n\n/**\n * Render the final JSX of Label\n */\nexport const renderLabel_unstable = (state: LabelState) => {\n assertSlots<LabelSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n {state.required && <state.required />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderLabel_unstable","state","root","children","required"],"mappings":";;;;+
|
1
|
+
{"version":3,"sources":["../src/components/Label/renderLabel.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { LabelState, LabelSlots } from './Label.types';\n\n/**\n * Render the final JSX of Label\n */\nexport const renderLabel_unstable = (state: LabelState): JSXElement => {\n assertSlots<LabelSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n {state.required && <state.required />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderLabel_unstable","state","root","children","required"],"mappings":";;;;+BAUaC;;;;;;4BATb,iCAAiD;gCAErB,4BAA4B;AAOjD,6BAA6B,CAACC;QACnCF,2BAAAA,EAAwBE;IAExB,OAAA,WAAA,OACE,gBAAA,EAACA,MAAMC,IAAI,EAAA;;YACRD,MAAMC,IAAI,CAACC,QAAQ;YACnBF,MAAMG,QAAQ,IAAA,WAAA,OAAI,eAAA,EAACH,MAAMG,QAAQ,EAAA,CAAA;;;AAGxC,EAAE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useLabelStyles.styles.js"],"sourcesContent":["
|
1
|
+
{"version":3,"sources":["useLabelStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const labelClassNames = {\n root: 'fui-Label',\n required: 'fui-Label__required'\n};\n/**\n * Styles for the label\n */ const useStyles = makeStyles({\n root: {\n fontFamily: tokens.fontFamilyBase,\n color: tokens.colorNeutralForeground1\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n '@media (forced-colors: active)': {\n color: 'GrayText'\n }\n },\n required: {\n color: tokens.colorPaletteRedForeground3,\n paddingLeft: tokens.spacingHorizontalXS\n },\n small: {\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200\n },\n medium: {\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300\n },\n large: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n fontWeight: tokens.fontWeightSemibold\n },\n semibold: {\n fontWeight: tokens.fontWeightSemibold\n }\n});\n/**\n * Apply styling to the Label slots based on the state\n */ export const useLabelStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n state.root.className = mergeClasses(labelClassNames.root, styles.root, state.disabled && styles.disabled, styles[state.size], state.weight === 'semibold' && styles.semibold, state.root.className);\n if (state.required) {\n state.required.className = mergeClasses(labelClassNames.required, styles.required, state.disabled && styles.disabled, state.required.className);\n }\n return state;\n};\n"],"names":["__styles","mergeClasses","tokens","labelClassNames","root","required","useStyles","Bahqtrf","sj55zd","disabled","Bbusuzp","uwmqm3","small","Be2twd7","Bg96gwp","medium","large","Bhrd7zp","semibold","d","m","useLabelStyles_unstable","state","styles","className","size","weight"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAGCG,eAAe;;;2BAwCY;eAAvBkB;;;uBA1CwB,gBAAgB;AAElD,wBAAwB;IAC3BjB,IAAI,EAAE,WAAW;IACjBC,QAAQ,EAAE;AACd,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGN,eAAA,EAAA;IAAAI,IAAA,EAAA;QAAAG,OAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;IAAAC,QAAA,EAAA;QAAAD,MAAA,EAAA;QAAAE,OAAA,EAAA;IAAA;IAAAL,QAAA,EAAA;QAAAG,MAAA,EAAA;QAAAG,MAAA,EAAA;YAAA;Y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elStyles.styles.ts"],"sourcesContent":["
|
1
|
+
{"version":3,"sources":["../src/components/Label/useLabelStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { 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"],"mappings":"AAAA;;;;;;;;;;;;IAOaG,eAAAA;;;IAkDA2B,uBAAAA;;;;uBAvD4B,iBAAiB;4BACnC,wBAAwB;AAIxC,wBAAoD;IACzD1B,MAAM;IACNC,UAAU;AACZ,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYN,iBAAAA,EAAW;IAC3BI,MAAM;QACJG,YAAYL,kBAAAA,CAAOM,cAAc;QACjCC,OAAOP,kBAAAA,CAAOQ,uBAAuB;IACvC;IAEAC,UAAU;QACRF,OAAOP,kBAAAA,CAAOU,8BAA8B;QAC5C,kCAAkC;YAChCH,OAAO;QACT;IACF;IAEAJ,UAAU;QACRI,OAAOP,kBAAAA,CAAOW,0BAA0B;QACxCC,aAAaZ,kBAAAA,CAAOa,mBAAmB;IACzC;IAEAC,OAAO;QACLC,UAAUf,kBAAAA,CAAOgB,eAAe;QAChCC,YAAYjB,kBAAAA,CAAOkB,iBAAiB;IACtC;IAEAC,QAAQ;QACNJ,UAAUf,kBAAAA,CAAOoB,eAAe;QAChCH,YAAYjB,kBAAAA,CAAOqB,iBAAiB;IACtC;IAEAC,OAAO;QACLP,UAAUf,kBAAAA,CAAOuB,eAAe;QAChCN,YAAYjB,kBAAAA,CAAOwB,iBAAiB;QACpCC,YAAYzB,kBAAAA,CAAO0B,kBAAkB;IACvC;IAEAC,UAAU;QACRF,YAAYzB,kBAAAA,CAAO0B,kBAAkB;IACvC;AACF;AAKO,gCAAgC,CAACG;IACtC;IAEA,MAAMC,SAAS1B;IACfyB,MAAM3B,IAAI,CAAC6B,SAAS,GAAGhC,uBAAAA,EACrBE,gBAAgBC,IAAI,EACpB4B,OAAO5B,IAAI,EACX2B,MAAMpB,QAAQ,IAAIqB,OAAOrB,QAAQ,EACjCqB,MAAM,CAACD,MAAMG,IAAI,CAAC,EAClBH,MAAMI,MAAM,KAAK,cAAcH,OAAOH,QAAQ,EAC9CE,MAAM3B,IAAI,CAAC6B,SAAS;IAGtB,IAAIF,MAAM1B,QAAQ,EAAE;QAClB0B,MAAM1B,QAAQ,CAAC4B,SAAS,OAAGhC,mBAAAA,EACzBE,gBAAgBE,QAAQ,EACxB2B,OAAO3B,QAAQ,EACf0B,MAAMpB,QAAQ,IAAIqB,OAAOrB,QAAQ,EACjCoB,MAAM1B,QAAQ,CAAC4B,SAAS;IAE5B;IAEA,OAAOF;AACT,EAAE"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-label",
|
3
|
-
"version": "9.3.
|
3
|
+
"version": "9.3.6",
|
4
4
|
"description": "Fluent UI React Label component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -18,18 +18,18 @@
|
|
18
18
|
"@fluentui/scripts-api-extractor": "*"
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
|
-
"@fluentui/react-shared-contexts": "^9.25.
|
21
|
+
"@fluentui/react-shared-contexts": "^9.25.2",
|
22
22
|
"@fluentui/react-theme": "^9.2.0",
|
23
|
-
"@fluentui/react-utilities": "^9.
|
24
|
-
"@fluentui/react-jsx-runtime": "^9.1
|
23
|
+
"@fluentui/react-utilities": "^9.25.0",
|
24
|
+
"@fluentui/react-jsx-runtime": "^9.2.1",
|
25
25
|
"@griffel/react": "^1.5.22",
|
26
26
|
"@swc/helpers": "^0.5.1"
|
27
27
|
},
|
28
28
|
"peerDependencies": {
|
29
|
-
"@types/react": ">=16.14.0 <
|
30
|
-
"@types/react-dom": ">=16.9.0 <
|
31
|
-
"react": ">=16.14.0 <
|
32
|
-
"react-dom": ">=16.14.0 <
|
29
|
+
"@types/react": ">=16.14.0 <20.0.0",
|
30
|
+
"@types/react-dom": ">=16.9.0 <20.0.0",
|
31
|
+
"react": ">=16.14.0 <20.0.0",
|
32
|
+
"react-dom": ">=16.14.0 <20.0.0"
|
33
33
|
},
|
34
34
|
"beachball": {
|
35
35
|
"disallowedChangeTypes": [
|