@fluentui/react-label 9.1.23 → 9.1.25
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.json +61 -1
- package/CHANGELOG.md +25 -2
- package/lib/components/Label/renderLabel.js +3 -3
- package/lib/components/Label/renderLabel.js.map +1 -1
- package/lib/components/Label/useLabel.js +7 -5
- package/lib/components/Label/useLabel.js.map +1 -1
- package/lib-commonjs/components/Label/renderLabel.js +2 -2
- package/lib-commonjs/components/Label/renderLabel.js.map +1 -1
- package/lib-commonjs/components/Label/useLabel.js +6 -3
- package/lib-commonjs/components/Label/useLabel.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,67 @@
|
|
|
2
2
|
"name": "@fluentui/react-label",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Fri,
|
|
5
|
+
"date": "Fri, 11 Aug 2023 12:10:20 GMT",
|
|
6
|
+
"tag": "@fluentui/react-label_v9.1.25",
|
|
7
|
+
"version": "9.1.25",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui/react-label",
|
|
13
|
+
"comment": "Bump @fluentui/react-utilities to v9.11.1",
|
|
14
|
+
"commit": "a77bcda1628e8b20b113d0237317efd7ebbc5294"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui/react-label",
|
|
19
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.15",
|
|
20
|
+
"commit": "a77bcda1628e8b20b113d0237317efd7ebbc5294"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"date": "Wed, 09 Aug 2023 13:16:58 GMT",
|
|
27
|
+
"tag": "@fluentui/react-label_v9.1.24",
|
|
28
|
+
"version": "9.1.24",
|
|
29
|
+
"comments": {
|
|
30
|
+
"patch": [
|
|
31
|
+
{
|
|
32
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
33
|
+
"package": "@fluentui/react-label",
|
|
34
|
+
"commit": "796e4426c50ede34b30e2dc2392328dcbadc2702",
|
|
35
|
+
"comment": "chore(cxe-red): migrate to new slot API"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"author": "olfedias@microsoft.com",
|
|
39
|
+
"package": "@fluentui/react-label",
|
|
40
|
+
"commit": "b090c0339983847a62b9dc6187d08dc8c4b1d55f",
|
|
41
|
+
"comment": "chore: Update Griffel to latest version"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"author": "beachball",
|
|
45
|
+
"package": "@fluentui/react-label",
|
|
46
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.7.2",
|
|
47
|
+
"commit": "9509e950254d838cdfe3718a775ba5c78cb8f11a"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"author": "beachball",
|
|
51
|
+
"package": "@fluentui/react-label",
|
|
52
|
+
"comment": "Bump @fluentui/react-theme to v9.1.11",
|
|
53
|
+
"commit": "9509e950254d838cdfe3718a775ba5c78cb8f11a"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"author": "beachball",
|
|
57
|
+
"package": "@fluentui/react-label",
|
|
58
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.14",
|
|
59
|
+
"commit": "9509e950254d838cdfe3718a775ba5c78cb8f11a"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"date": "Fri, 04 Aug 2023 08:52:58 GMT",
|
|
6
66
|
"tag": "@fluentui/react-label_v9.1.23",
|
|
7
67
|
"version": "9.1.23",
|
|
8
68
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,35 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-label
|
|
2
2
|
|
|
3
|
-
This log was last generated on Fri,
|
|
3
|
+
This log was last generated on Fri, 11 Aug 2023 12:10:20 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.1.25](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.1.25)
|
|
8
|
+
|
|
9
|
+
Fri, 11 Aug 2023 12:10:20 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.1.24..@fluentui/react-label_v9.1.25)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- Bump @fluentui/react-utilities to v9.11.1 ([PR #28808](https://github.com/microsoft/fluentui/pull/28808) by beachball)
|
|
15
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.15 ([PR #28808](https://github.com/microsoft/fluentui/pull/28808) by beachball)
|
|
16
|
+
|
|
17
|
+
## [9.1.24](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.1.24)
|
|
18
|
+
|
|
19
|
+
Wed, 09 Aug 2023 13:16:58 GMT
|
|
20
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.1.23..@fluentui/react-label_v9.1.24)
|
|
21
|
+
|
|
22
|
+
### Patches
|
|
23
|
+
|
|
24
|
+
- chore(cxe-red): migrate to new slot API ([PR #28753](https://github.com/microsoft/fluentui/pull/28753) by bernardo.sunderhus@gmail.com)
|
|
25
|
+
- chore: Update Griffel to latest version ([PR #28684](https://github.com/microsoft/fluentui/pull/28684) by olfedias@microsoft.com)
|
|
26
|
+
- Bump @fluentui/react-shared-contexts to v9.7.2 ([PR #28775](https://github.com/microsoft/fluentui/pull/28775) by beachball)
|
|
27
|
+
- Bump @fluentui/react-theme to v9.1.11 ([PR #28775](https://github.com/microsoft/fluentui/pull/28775) by beachball)
|
|
28
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.14 ([PR #28775](https://github.com/microsoft/fluentui/pull/28775) by beachball)
|
|
29
|
+
|
|
7
30
|
## [9.1.23](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.1.23)
|
|
8
31
|
|
|
9
|
-
Fri, 04 Aug 2023 08:
|
|
32
|
+
Fri, 04 Aug 2023 08:52:58 GMT
|
|
10
33
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.1.22..@fluentui/react-label_v9.1.23)
|
|
11
34
|
|
|
12
35
|
### Patches
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { assertSlots } from '@fluentui/react-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of Label
|
|
5
5
|
*/ export const renderLabel_unstable = (state)=>{
|
|
6
|
-
|
|
7
|
-
return /*#__PURE__*/ createElement(
|
|
6
|
+
assertSlots(state);
|
|
7
|
+
return /*#__PURE__*/ createElement(state.root, null, state.root.children, state.required && /*#__PURE__*/ createElement(state.required, null));
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderLabel.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport {
|
|
1
|
+
{"version":3,"sources":["renderLabel.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@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":["createElement","assertSlots","renderLabel_unstable","state","root","children","required"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,uBAAuB,CAACC,QAAsB;IACzDF,YAAwBE;IAExB,qBACE,AAdJ,cAcKA,MAAMC,IAAI,QACRD,MAAMC,IAAI,CAACC,QAAQ,EACnBF,MAAMG,QAAQ,kBAAI,AAhBzB,cAgB0BH,MAAMG,QAAQ;AAGxC,EAAE"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { getNativeElementProps } from '@fluentui/react-utilities';
|
|
3
|
-
import { resolveShorthand } from '@fluentui/react-utilities';
|
|
2
|
+
import { getNativeElementProps, slot } from '@fluentui/react-utilities';
|
|
4
3
|
/**
|
|
5
4
|
* Create the state required to render Label.
|
|
6
5
|
*
|
|
@@ -13,10 +12,11 @@ import { resolveShorthand } from '@fluentui/react-utilities';
|
|
|
13
12
|
const { disabled =false , required =false , weight ='regular' , size ='medium' } = props;
|
|
14
13
|
return {
|
|
15
14
|
disabled,
|
|
16
|
-
required:
|
|
15
|
+
required: slot.optional(required === true ? '*' : required || undefined, {
|
|
17
16
|
defaultProps: {
|
|
18
17
|
'aria-hidden': 'true'
|
|
19
|
-
}
|
|
18
|
+
},
|
|
19
|
+
elementType: 'span'
|
|
20
20
|
}),
|
|
21
21
|
weight,
|
|
22
22
|
size,
|
|
@@ -24,9 +24,11 @@ import { resolveShorthand } from '@fluentui/react-utilities';
|
|
|
24
24
|
root: 'label',
|
|
25
25
|
required: 'span'
|
|
26
26
|
},
|
|
27
|
-
root: getNativeElementProps('label', {
|
|
27
|
+
root: slot.always(getNativeElementProps('label', {
|
|
28
28
|
ref,
|
|
29
29
|
...props
|
|
30
|
+
}), {
|
|
31
|
+
elementType: 'label'
|
|
30
32
|
})
|
|
31
33
|
};
|
|
32
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useLabel.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { LabelProps, LabelState } from './Label.types';\
|
|
1
|
+
{"version":3,"sources":["useLabel.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport type { LabelProps, LabelState } from './Label.types';\n\n/**\n * Create the state required to render Label.\n *\n * The returned state can be modified with hooks such as useLabelStyles_unstable,\n * before being passed to renderLabel_unstable.\n *\n * @param props - props from this instance of Label\n * @param ref - reference to root HTMLElement of Label\n */\nexport const useLabel_unstable = (props: LabelProps, ref: React.Ref<HTMLElement>): LabelState => {\n const { disabled = false, required = false, weight = 'regular', size = 'medium' } = props;\n return {\n disabled,\n required: slot.optional(required === true ? '*' : required || undefined, {\n defaultProps: { 'aria-hidden': 'true' },\n elementType: 'span',\n }),\n weight,\n size,\n components: { root: 'label', required: 'span' },\n root: slot.always(getNativeElementProps('label', { ref, ...props }), { elementType: 'label' }),\n };\n};\n"],"names":["React","getNativeElementProps","slot","useLabel_unstable","props","ref","disabled","required","weight","size","optional","undefined","defaultProps","elementType","components","root","always"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AAGxE;;;;;;;;CAQC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC,MAA4C;IAC/F,MAAM,EAAEC,UAAW,KAAK,CAAA,EAAEC,UAAW,KAAK,CAAA,EAAEC,QAAS,UAAS,EAAEC,MAAO,SAAQ,EAAE,GAAGL;IACpF,OAAO;QACLE;QACAC,UAAUL,KAAKQ,QAAQ,CAACH,aAAa,IAAI,GAAG,MAAMA,YAAYI,SAAS,EAAE;YACvEC,cAAc;gBAAE,eAAe;YAAO;YACtCC,aAAa;QACf;QACAL;QACAC;QACAK,YAAY;YAAEC,MAAM;YAASR,UAAU;QAAO;QAC9CQ,MAAMb,KAAKc,MAAM,CAACf,sBAAsB,SAAS;YAAEI;YAAK,GAAGD,KAAK;QAAC,IAAI;YAAES,aAAa;QAAQ;IAC9F;AACF,EAAE"}
|
|
@@ -9,6 +9,6 @@ Object.defineProperty(exports, "renderLabel_unstable", {
|
|
|
9
9
|
const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
|
|
10
10
|
const _reactUtilities = require("@fluentui/react-utilities");
|
|
11
11
|
const renderLabel_unstable = (state)=>{
|
|
12
|
-
|
|
13
|
-
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(
|
|
12
|
+
(0, _reactUtilities.assertSlots)(state);
|
|
13
|
+
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null, state.root.children, state.required && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.required, null));
|
|
14
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderLabel.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport {
|
|
1
|
+
{"version":3,"sources":["renderLabel.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Label\n */ export const renderLabel_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(state.root, null, state.root.children, state.required && /*#__PURE__*/ createElement(state.required, null));\n};\n"],"names":["renderLabel_unstable","state","assertSlots","createElement","root","children","required"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACvD;AAGjB,MAAMA,uBAAuB,CAACC,QAAQ;IAC7CC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,8BAAa,EAACF,MAAMG,IAAI,EAAE,IAAI,EAAEH,MAAMG,IAAI,CAACC,QAAQ,EAAEJ,MAAMK,QAAQ,IAAI,WAAW,GAAGH,IAAAA,8BAAa,EAACF,MAAMK,QAAQ,EAAE,IAAI;AAChJ"}
|
|
@@ -13,10 +13,11 @@ const useLabel_unstable = (props, ref)=>{
|
|
|
13
13
|
const { disabled =false , required =false , weight ='regular' , size ='medium' } = props;
|
|
14
14
|
return {
|
|
15
15
|
disabled,
|
|
16
|
-
required:
|
|
16
|
+
required: _reactUtilities.slot.optional(required === true ? '*' : required || undefined, {
|
|
17
17
|
defaultProps: {
|
|
18
18
|
'aria-hidden': 'true'
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
|
+
elementType: 'span'
|
|
20
21
|
}),
|
|
21
22
|
weight,
|
|
22
23
|
size,
|
|
@@ -24,9 +25,11 @@ const useLabel_unstable = (props, ref)=>{
|
|
|
24
25
|
root: 'label',
|
|
25
26
|
required: 'span'
|
|
26
27
|
},
|
|
27
|
-
root: (0, _reactUtilities.getNativeElementProps)('label', {
|
|
28
|
+
root: _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)('label', {
|
|
28
29
|
ref,
|
|
29
30
|
...props
|
|
31
|
+
}), {
|
|
32
|
+
elementType: 'label'
|
|
30
33
|
})
|
|
31
34
|
};
|
|
32
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useLabel.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps
|
|
1
|
+
{"version":3,"sources":["useLabel.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\n/**\n * Create the state required to render Label.\n *\n * The returned state can be modified with hooks such as useLabelStyles_unstable,\n * before being passed to renderLabel_unstable.\n *\n * @param props - props from this instance of Label\n * @param ref - reference to root HTMLElement of Label\n */ export const useLabel_unstable = (props, ref)=>{\n const { disabled =false , required =false , weight ='regular' , size ='medium' } = props;\n return {\n disabled,\n required: slot.optional(required === true ? '*' : required || undefined, {\n defaultProps: {\n 'aria-hidden': 'true'\n },\n elementType: 'span'\n }),\n weight,\n size,\n components: {\n root: 'label',\n required: 'span'\n },\n root: slot.always(getNativeElementProps('label', {\n ref,\n ...props\n }), {\n elementType: 'label'\n })\n };\n};\n"],"names":["useLabel_unstable","props","ref","disabled","required","weight","size","slot","optional","undefined","defaultProps","elementType","components","root","always","getNativeElementProps"],"mappings":";;;;+BAUiBA;;aAAAA;;;6DAVM;gCACqB;AASjC,MAAMA,oBAAoB,CAACC,OAAOC,MAAM;IAC/C,MAAM,EAAEC,UAAU,KAAK,CAAA,EAAGC,UAAU,KAAK,CAAA,EAAGC,QAAQ,UAAS,EAAGC,MAAM,SAAQ,EAAG,GAAGL;IACpF,OAAO;QACHE;QACAC,UAAUG,oBAAI,CAACC,QAAQ,CAACJ,aAAa,IAAI,GAAG,MAAMA,YAAYK,SAAS,EAAE;YACrEC,cAAc;gBACV,eAAe;YACnB;YACAC,aAAa;QACjB;QACAN;QACAC;QACAM,YAAY;YACRC,MAAM;YACNT,UAAU;QACd;QACAS,MAAMN,oBAAI,CAACO,MAAM,CAACC,IAAAA,qCAAqB,EAAC,SAAS;YAC7Cb;YACA,GAAGD,KAAK;QACZ,IAAI;YACAU,aAAa;QACjB;IACJ;AACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-label",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.25",
|
|
4
4
|
"description": "Fluent UI React Label component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"@fluentui/scripts-tasks": "*"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluentui/react-shared-contexts": "^9.7.
|
|
37
|
-
"@fluentui/react-theme": "^9.1.
|
|
38
|
-
"@fluentui/react-utilities": "^9.11.
|
|
39
|
-
"@fluentui/react-jsx-runtime": "9.0.0-alpha.
|
|
40
|
-
"@griffel/react": "^1.5.
|
|
36
|
+
"@fluentui/react-shared-contexts": "^9.7.2",
|
|
37
|
+
"@fluentui/react-theme": "^9.1.11",
|
|
38
|
+
"@fluentui/react-utilities": "^9.11.1",
|
|
39
|
+
"@fluentui/react-jsx-runtime": "9.0.0-alpha.15",
|
|
40
|
+
"@griffel/react": "^1.5.14",
|
|
41
41
|
"@swc/helpers": "^0.4.14"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|