@fluentui/react-label 9.1.23 → 9.1.24
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +40 -1
- package/CHANGELOG.md +15 -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 +5 -5
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,46 @@
|
|
2
2
|
"name": "@fluentui/react-label",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
5
|
+
"date": "Wed, 09 Aug 2023 13:11:39 GMT",
|
6
|
+
"tag": "@fluentui/react-label_v9.1.24",
|
7
|
+
"version": "9.1.24",
|
8
|
+
"comments": {
|
9
|
+
"patch": [
|
10
|
+
{
|
11
|
+
"author": "bernardo.sunderhus@gmail.com",
|
12
|
+
"package": "@fluentui/react-label",
|
13
|
+
"commit": "796e4426c50ede34b30e2dc2392328dcbadc2702",
|
14
|
+
"comment": "chore(cxe-red): migrate to new slot API"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "olfedias@microsoft.com",
|
18
|
+
"package": "@fluentui/react-label",
|
19
|
+
"commit": "b090c0339983847a62b9dc6187d08dc8c4b1d55f",
|
20
|
+
"comment": "chore: Update Griffel to latest version"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "beachball",
|
24
|
+
"package": "@fluentui/react-label",
|
25
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.7.2",
|
26
|
+
"commit": "d0e28b405dc91c4682aec72dd784767a3ce95c78"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-label",
|
31
|
+
"comment": "Bump @fluentui/react-theme to v9.1.11",
|
32
|
+
"commit": "d0e28b405dc91c4682aec72dd784767a3ce95c78"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"author": "beachball",
|
36
|
+
"package": "@fluentui/react-label",
|
37
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.14",
|
38
|
+
"commit": "d0e28b405dc91c4682aec72dd784767a3ce95c78"
|
39
|
+
}
|
40
|
+
]
|
41
|
+
}
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"date": "Fri, 04 Aug 2023 08:52:58 GMT",
|
6
45
|
"tag": "@fluentui/react-label_v9.1.23",
|
7
46
|
"version": "9.1.23",
|
8
47
|
"comments": {
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,25 @@
|
|
1
1
|
# Change Log - @fluentui/react-label
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Wed, 09 Aug 2023 13:11:39 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.1.24](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.1.24)
|
8
|
+
|
9
|
+
Wed, 09 Aug 2023 13:11:39 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.1.23..@fluentui/react-label_v9.1.24)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- chore(cxe-red): migrate to new slot API ([PR #28753](https://github.com/microsoft/fluentui/pull/28753) by bernardo.sunderhus@gmail.com)
|
15
|
+
- chore: Update Griffel to latest version ([PR #28684](https://github.com/microsoft/fluentui/pull/28684) by olfedias@microsoft.com)
|
16
|
+
- Bump @fluentui/react-shared-contexts to v9.7.2 ([commit](https://github.com/microsoft/fluentui/commit/d0e28b405dc91c4682aec72dd784767a3ce95c78) by beachball)
|
17
|
+
- Bump @fluentui/react-theme to v9.1.11 ([commit](https://github.com/microsoft/fluentui/commit/d0e28b405dc91c4682aec72dd784767a3ce95c78) by beachball)
|
18
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.14 ([commit](https://github.com/microsoft/fluentui/commit/d0e28b405dc91c4682aec72dd784767a3ce95c78) by beachball)
|
19
|
+
|
7
20
|
## [9.1.23](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.1.23)
|
8
21
|
|
9
|
-
Fri, 04 Aug 2023 08:
|
22
|
+
Fri, 04 Aug 2023 08:52:58 GMT
|
10
23
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.1.22..@fluentui/react-label_v9.1.23)
|
11
24
|
|
12
25
|
### 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.24",
|
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.
|
36
|
+
"@fluentui/react-shared-contexts": "^9.7.2",
|
37
|
+
"@fluentui/react-theme": "^9.1.11",
|
38
38
|
"@fluentui/react-utilities": "^9.11.0",
|
39
|
-
"@fluentui/react-jsx-runtime": "9.0.0-alpha.
|
40
|
-
"@griffel/react": "^1.5.
|
39
|
+
"@fluentui/react-jsx-runtime": "9.0.0-alpha.14",
|
40
|
+
"@griffel/react": "^1.5.14",
|
41
41
|
"@swc/helpers": "^0.4.14"
|
42
42
|
},
|
43
43
|
"peerDependencies": {
|