@fluentui/react-label 9.1.29 → 9.1.31
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +67 -1
- package/CHANGELOG.md +26 -2
- package/lib/components/Label/Label.js.map +1 -1
- package/lib/components/Label/renderLabel.js +7 -2
- package/lib/components/Label/renderLabel.js.map +1 -1
- package/lib/components/Label/useLabel.js +1 -1
- package/lib/components/Label/useLabel.js.map +1 -1
- package/lib-commonjs/Label.js +2 -2
- package/lib-commonjs/Label.js.map +1 -1
- package/lib-commonjs/components/Label/Label.js +9 -7
- package/lib-commonjs/components/Label/Label.js.map +1 -1
- package/lib-commonjs/components/Label/index.js +6 -6
- package/lib-commonjs/components/Label/index.js.map +1 -1
- package/lib-commonjs/components/Label/renderLabel.js +13 -6
- package/lib-commonjs/components/Label/renderLabel.js.map +1 -1
- package/lib-commonjs/components/Label/useLabel.js +9 -7
- package/lib-commonjs/components/Label/useLabel.js.map +1 -1
- package/lib-commonjs/components/Label/useLabelStyles.styles.js +7 -3
- package/lib-commonjs/components/Label/useLabelStyles.styles.js.map +1 -1
- package/lib-commonjs/index.js +16 -6
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,73 @@
|
|
2
2
|
"name": "@fluentui/react-label",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
5
|
+
"date": "Tue, 05 Sep 2023 13:23:30 GMT",
|
6
|
+
"tag": "@fluentui/react-label_v9.1.31",
|
7
|
+
"version": "9.1.31",
|
8
|
+
"comments": {
|
9
|
+
"patch": [
|
10
|
+
{
|
11
|
+
"author": "bernardo.sunderhus@gmail.com",
|
12
|
+
"package": "@fluentui/react-label",
|
13
|
+
"commit": "eea6d93a62249ba4fba3347fb291c67ee1a3fb24",
|
14
|
+
"comment": "chore: migrate package to use JSX importSource"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "bernardo.sunderhus@gmail.com",
|
18
|
+
"package": "@fluentui/react-label",
|
19
|
+
"commit": "b93c2ac22355b6cb6f33dd509c6cd9c21f4fffc8",
|
20
|
+
"comment": "bumps @swc/helpers version to 0.5.1"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "beachball",
|
24
|
+
"package": "@fluentui/react-label",
|
25
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.7.3",
|
26
|
+
"commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-label",
|
31
|
+
"comment": "Bump @fluentui/react-theme to v9.1.12",
|
32
|
+
"commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"author": "beachball",
|
36
|
+
"package": "@fluentui/react-label",
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.1",
|
38
|
+
"commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"author": "beachball",
|
42
|
+
"package": "@fluentui/react-label",
|
43
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.4",
|
44
|
+
"commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
|
45
|
+
}
|
46
|
+
]
|
47
|
+
}
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"date": "Tue, 29 Aug 2023 12:57:36 GMT",
|
51
|
+
"tag": "@fluentui/react-label_v9.1.30",
|
52
|
+
"version": "9.1.30",
|
53
|
+
"comments": {
|
54
|
+
"patch": [
|
55
|
+
{
|
56
|
+
"author": "beachball",
|
57
|
+
"package": "@fluentui/react-label",
|
58
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.0",
|
59
|
+
"commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"author": "beachball",
|
63
|
+
"package": "@fluentui/react-label",
|
64
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.3",
|
65
|
+
"commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
|
66
|
+
}
|
67
|
+
]
|
68
|
+
}
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"date": "Thu, 24 Aug 2023 10:26:35 GMT",
|
6
72
|
"tag": "@fluentui/react-label_v9.1.29",
|
7
73
|
"version": "9.1.29",
|
8
74
|
"comments": {
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,36 @@
|
|
1
1
|
# Change Log - @fluentui/react-label
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Tue, 05 Sep 2023 13:23:30 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.1.31](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.1.31)
|
8
|
+
|
9
|
+
Tue, 05 Sep 2023 13:23:30 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.1.30..@fluentui/react-label_v9.1.31)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- chore: migrate package to use JSX importSource ([PR #28959](https://github.com/microsoft/fluentui/pull/28959) by bernardo.sunderhus@gmail.com)
|
15
|
+
- bumps @swc/helpers version to 0.5.1 ([PR #28989](https://github.com/microsoft/fluentui/pull/28989) by bernardo.sunderhus@gmail.com)
|
16
|
+
- Bump @fluentui/react-shared-contexts to v9.7.3 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
|
17
|
+
- Bump @fluentui/react-theme to v9.1.12 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
|
18
|
+
- Bump @fluentui/react-utilities to v9.13.1 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
|
19
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.4 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
|
20
|
+
|
21
|
+
## [9.1.30](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.1.30)
|
22
|
+
|
23
|
+
Tue, 29 Aug 2023 12:57:36 GMT
|
24
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.1.29..@fluentui/react-label_v9.1.30)
|
25
|
+
|
26
|
+
### Patches
|
27
|
+
|
28
|
+
- Bump @fluentui/react-utilities to v9.13.0 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
|
29
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.3 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
|
30
|
+
|
7
31
|
## [9.1.29](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.1.29)
|
8
32
|
|
9
|
-
Thu, 24 Aug 2023 10:
|
33
|
+
Thu, 24 Aug 2023 10:26:35 GMT
|
10
34
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.1.28..@fluentui/react-label_v9.1.29)
|
11
35
|
|
12
36
|
### Patches
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Label.tsx"],"sourcesContent":["import * 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,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
|
1
|
+
{"version":3,"sources":["Label.tsx"],"sourcesContent":["import * 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,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,8 +1,13 @@
|
|
1
|
-
/** @jsxRuntime
|
1
|
+
/** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
2
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
6
|
assertSlots(state);
|
7
|
-
return /*#__PURE__*/
|
7
|
+
return /*#__PURE__*/ _jsxs(state.root, {
|
8
|
+
children: [
|
9
|
+
state.root.children,
|
10
|
+
state.required && /*#__PURE__*/ _jsx(state.required, {})
|
11
|
+
]
|
12
|
+
});
|
8
13
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["renderLabel.tsx"],"sourcesContent":["/** @jsxRuntime
|
1
|
+
{"version":3,"sources":["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;AAGxD;;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"}
|
@@ -9,7 +9,7 @@ import { getNativeElementProps, slot } from '@fluentui/react-utilities';
|
|
9
9
|
* @param props - props from this instance of Label
|
10
10
|
* @param ref - reference to root HTMLElement of Label
|
11
11
|
*/ export const useLabel_unstable = (props, ref)=>{
|
12
|
-
const { disabled =false
|
12
|
+
const { disabled = false, required = false, weight = 'regular', size = 'medium' } = props;
|
13
13
|
return {
|
14
14
|
disabled,
|
15
15
|
required: slot.optional(required === true ? '*' : required || undefined, {
|
@@ -1 +1 @@
|
|
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
|
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;IACnD,MAAM,EAAEC,WAAW,KAAK,EAAEC,WAAW,KAAK,EAAEC,SAAS,SAAS,EAAEC,OAAO,QAAQ,EAAE,GAAGL;IACpF,OAAO;QACLE;QACAC,UAAUL,KAAKQ,QAAQ,CAACH,aAAa,OAAO,MAAMA,YAAYI,WAAW;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"}
|
package/lib-commonjs/Label.js
CHANGED
@@ -2,5 +2,5 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
3
3
|
value: true
|
4
4
|
});
|
5
|
-
const
|
6
|
-
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
6
|
+
_export_star._(require("./components/Label/index"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Label.js"],"sourcesContent":["export * from './components/Label/index';\n"],"names":[],"mappings":";;;;;
|
1
|
+
{"version":3,"sources":["Label.js"],"sourcesContent":["export * from './components/Label/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
|
@@ -4,18 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "Label", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return Label;
|
9
|
+
}
|
8
10
|
});
|
9
|
-
const
|
10
|
-
const _react = /*#__PURE__*/
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
11
13
|
const _useLabel = require("./useLabel");
|
12
14
|
const _renderLabel = require("./renderLabel");
|
13
|
-
const
|
14
|
-
const
|
15
|
+
const _useLabelStylesstyles = require("./useLabelStyles.styles");
|
16
|
+
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
15
17
|
const Label = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
16
18
|
const state = (0, _useLabel.useLabel_unstable)(props, ref);
|
17
|
-
(0,
|
18
|
-
(0,
|
19
|
+
(0, _useLabelStylesstyles.useLabelStyles_unstable)(state);
|
20
|
+
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useLabelStyles_unstable')(state);
|
19
21
|
return (0, _renderLabel.renderLabel_unstable)(state);
|
20
22
|
});
|
21
23
|
Label.displayName = 'Label';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Label.js"],"sourcesContent":["import * as React from 'react';\nimport { useLabel_unstable } from './useLabel';\nimport { renderLabel_unstable } from './renderLabel';\nimport { useLabelStyles_unstable } from './useLabelStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * A label component provides a title or name to a component.\n */ export const Label = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useLabel_unstable(props, ref);\n useLabelStyles_unstable(state);\n useCustomStyleHook_unstable('useLabelStyles_unstable')(state);\n return renderLabel_unstable(state);\n});\nLabel.displayName = 'Label';\n"],"names":["Label","React","forwardRef","props","ref","state","useLabel_unstable","useLabelStyles_unstable","useCustomStyleHook_unstable","renderLabel_unstable","displayName"],"mappings":";;;;+BAOiBA
|
1
|
+
{"version":3,"sources":["Label.js"],"sourcesContent":["import * as React from 'react';\nimport { useLabel_unstable } from './useLabel';\nimport { renderLabel_unstable } from './renderLabel';\nimport { useLabelStyles_unstable } from './useLabelStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * A label component provides a title or name to a component.\n */ export const Label = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useLabel_unstable(props, ref);\n useLabelStyles_unstable(state);\n useCustomStyleHook_unstable('useLabelStyles_unstable')(state);\n return renderLabel_unstable(state);\n});\nLabel.displayName = 'Label';\n"],"names":["Label","React","forwardRef","props","ref","state","useLabel_unstable","useLabelStyles_unstable","useCustomStyleHook_unstable","renderLabel_unstable","displayName"],"mappings":";;;;+BAOiBA;;;eAAAA;;;;iEAPM;0BACW;6BACG;sCACG;qCACI;AAGjC,MAAMA,QAAQ,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC5D,MAAMC,QAAQC,IAAAA,2BAAiB,EAACH,OAAOC;IACvCG,IAAAA,6CAAuB,EAACF;IACxBG,IAAAA,gDAA2B,EAAC,2BAA2BH;IACvD,OAAOI,IAAAA,iCAAoB,EAACJ;AAChC;AACAL,MAAMU,WAAW,GAAG"}
|
@@ -2,9 +2,9 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
3
3
|
value: true
|
4
4
|
});
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
6
|
+
_export_star._(require("./Label"), exports);
|
7
|
+
_export_star._(require("./Label.types"), exports);
|
8
|
+
_export_star._(require("./renderLabel"), exports);
|
9
|
+
_export_star._(require("./useLabel"), exports);
|
10
|
+
_export_star._(require("./useLabelStyles.styles"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './Label';\nexport * from './Label.types';\nexport * from './renderLabel';\nexport * from './useLabel';\nexport * from './useLabelStyles.styles';\n"],"names":[],"mappings":";;;;;
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './Label';\nexport * from './Label.types';\nexport * from './renderLabel';\nexport * from './useLabel';\nexport * from './useLabelStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
@@ -1,14 +1,21 @@
|
|
1
|
-
/** @jsxRuntime
|
1
|
+
/** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ "use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
3
3
|
value: true
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "renderLabel_unstable", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return renderLabel_unstable;
|
9
|
+
}
|
8
10
|
});
|
9
|
-
const
|
10
|
-
const
|
11
|
+
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
12
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
11
13
|
const renderLabel_unstable = (state)=>{
|
12
|
-
(0,
|
13
|
-
return /*#__PURE__*/ (0,
|
14
|
+
(0, _reactutilities.assertSlots)(state);
|
15
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
|
16
|
+
children: [
|
17
|
+
state.root.children,
|
18
|
+
state.required && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.required, {})
|
19
|
+
]
|
20
|
+
});
|
14
21
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["renderLabel.js"],"sourcesContent":["/** @jsxRuntime
|
1
|
+
{"version":3,"sources":["renderLabel.js"],"sourcesContent":["/** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/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__*/ _jsxs(state.root, {\n children: [\n state.root.children,\n state.required && /*#__PURE__*/ _jsx(state.required, {})\n ]\n });\n};\n"],"names":["renderLabel_unstable","state","assertSlots","_jsxs","root","children","required","_jsx"],"mappings":"AAAA,0BAA0B,GAAG,iDAAiD;;;;+BAI7DA;;;eAAAA;;;4BAJ2G;gCAChG;AAGjB,MAAMA,uBAAuB,CAACC;IACrCC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,gBAAK,EAACF,MAAMG,IAAI,EAAE;QACnCC,UAAU;YACNJ,MAAMG,IAAI,CAACC,QAAQ;YACnBJ,MAAMK,QAAQ,IAAI,WAAW,GAAGC,IAAAA,eAAI,EAACN,MAAMK,QAAQ,EAAE,CAAC;SACzD;IACL;AACJ"}
|
@@ -4,16 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "useLabel_unstable", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return useLabel_unstable;
|
9
|
+
}
|
8
10
|
});
|
9
|
-
const
|
10
|
-
const _react = /*#__PURE__*/
|
11
|
-
const
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
13
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
12
14
|
const useLabel_unstable = (props, ref)=>{
|
13
|
-
const { disabled =false
|
15
|
+
const { disabled = false, required = false, weight = 'regular', size = 'medium' } = props;
|
14
16
|
return {
|
15
17
|
disabled,
|
16
|
-
required:
|
18
|
+
required: _reactutilities.slot.optional(required === true ? '*' : required || undefined, {
|
17
19
|
defaultProps: {
|
18
20
|
'aria-hidden': 'true'
|
19
21
|
},
|
@@ -25,7 +27,7 @@ const useLabel_unstable = (props, ref)=>{
|
|
25
27
|
root: 'label',
|
26
28
|
required: 'span'
|
27
29
|
},
|
28
|
-
root:
|
30
|
+
root: _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)('label', {
|
29
31
|
ref,
|
30
32
|
...props
|
31
33
|
}), {
|
@@ -1 +1 @@
|
|
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
|
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;;;eAAAA;;;;iEAVM;gCACqB;AASjC,MAAMA,oBAAoB,CAACC,OAAOC;IACzC,MAAM,EAAEC,WAAW,KAAK,EAAEC,WAAW,KAAK,EAAEC,SAAS,SAAS,EAAEC,OAAO,QAAQ,EAAE,GAAGL;IACpF,OAAO;QACHE;QACAC,UAAUG,oBAAI,CAACC,QAAQ,CAACJ,aAAa,OAAO,MAAMA,YAAYK,WAAW;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"}
|
@@ -9,8 +9,12 @@ function _export(target, all) {
|
|
9
9
|
});
|
10
10
|
}
|
11
11
|
_export(exports, {
|
12
|
-
labelClassNames: ()
|
13
|
-
|
12
|
+
labelClassNames: function() {
|
13
|
+
return labelClassNames;
|
14
|
+
},
|
15
|
+
useLabelStyles_unstable: function() {
|
16
|
+
return useLabelStyles_unstable;
|
17
|
+
}
|
14
18
|
});
|
15
19
|
const _react = require("@griffel/react");
|
16
20
|
const labelClassNames = {
|
@@ -19,7 +23,7 @@ const labelClassNames = {
|
|
19
23
|
};
|
20
24
|
/**
|
21
25
|
* Styles for the label
|
22
|
-
*/ const useStyles = /*#__PURE__*/ (0, _react
|
26
|
+
*/ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
23
27
|
root: {
|
24
28
|
Bahqtrf: "fk6fouc",
|
25
29
|
sj55zd: "f19n0e5"
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useLabelStyles.styles.js"],"sourcesContent":["import { __styles, 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 */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n Bahqtrf: \"fk6fouc\",\n sj55zd: \"f19n0e5\"\n },\n disabled: {\n sj55zd: \"f1s2aq7o\"\n },\n required: {\n sj55zd: \"f1whyuy6\",\n uwmqm3: [\"fycuoez\", \"f8wuabp\"]\n },\n requiredDisabled: {\n sj55zd: \"f1s2aq7o\"\n },\n small: {\n Be2twd7: \"fy9rknc\",\n Bg96gwp: \"fwrc4pm\"\n },\n medium: {\n Be2twd7: \"fkhj508\",\n Bg96gwp: \"f1i3iumi\"\n },\n large: {\n Be2twd7: \"fod5ikn\",\n Bg96gwp: \"faaz57k\",\n Bhrd7zp: \"fl43uef\"\n },\n semibold: {\n Bhrd7zp: \"fl43uef\"\n }\n}, {\n d: [\".fk6fouc{font-family:var(--fontFamilyBase);}\", \".f19n0e5{color:var(--colorNeutralForeground1);}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".f1whyuy6{color:var(--colorPaletteRedForeground3);}\", \".fycuoez{padding-left:4px;}\", \".f8wuabp{padding-right:4px;}\", \".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);}\"]\n});\n/**\n * Apply styling to the Label slots based on the state\n */\nexport const useLabelStyles_unstable = state => {\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.requiredDisabled, state.required.className);\n }\n return state;\n};\n//# sourceMappingURL=useLabelStyles.styles.js.map"],"names":["labelClassNames","useLabelStyles_unstable","root","required","useStyles","__styles","Bahqtrf","sj55zd","disabled","uwmqm3","requiredDisabled","small","Be2twd7","Bg96gwp","medium","large","Bhrd7zp","semibold","d","state","styles","className","mergeClasses","size","weight"],"mappings":";;;;;;;;;;;IAEaA,eAAe
|
1
|
+
{"version":3,"sources":["useLabelStyles.styles.js"],"sourcesContent":["import { __styles, 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 */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n Bahqtrf: \"fk6fouc\",\n sj55zd: \"f19n0e5\"\n },\n disabled: {\n sj55zd: \"f1s2aq7o\"\n },\n required: {\n sj55zd: \"f1whyuy6\",\n uwmqm3: [\"fycuoez\", \"f8wuabp\"]\n },\n requiredDisabled: {\n sj55zd: \"f1s2aq7o\"\n },\n small: {\n Be2twd7: \"fy9rknc\",\n Bg96gwp: \"fwrc4pm\"\n },\n medium: {\n Be2twd7: \"fkhj508\",\n Bg96gwp: \"f1i3iumi\"\n },\n large: {\n Be2twd7: \"fod5ikn\",\n Bg96gwp: \"faaz57k\",\n Bhrd7zp: \"fl43uef\"\n },\n semibold: {\n Bhrd7zp: \"fl43uef\"\n }\n}, {\n d: [\".fk6fouc{font-family:var(--fontFamilyBase);}\", \".f19n0e5{color:var(--colorNeutralForeground1);}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".f1whyuy6{color:var(--colorPaletteRedForeground3);}\", \".fycuoez{padding-left:4px;}\", \".f8wuabp{padding-right:4px;}\", \".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);}\"]\n});\n/**\n * Apply styling to the Label slots based on the state\n */\nexport const useLabelStyles_unstable = state => {\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.requiredDisabled, state.required.className);\n }\n return state;\n};\n//# sourceMappingURL=useLabelStyles.styles.js.map"],"names":["labelClassNames","useLabelStyles_unstable","root","required","useStyles","__styles","Bahqtrf","sj55zd","disabled","uwmqm3","requiredDisabled","small","Be2twd7","Bg96gwp","medium","large","Bhrd7zp","semibold","d","state","styles","className","mergeClasses","size","weight"],"mappings":";;;;;;;;;;;IAEaA,eAAe;eAAfA;;IA4CAC,uBAAuB;eAAvBA;;;uBA9C0B;AAEhC,MAAMD,kBAAkB;IAC7BE,MAAM;IACNC,UAAU;AACZ;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCH,MAAM;QACJI,SAAS;QACTC,QAAQ;IACV;IACAC,UAAU;QACRD,QAAQ;IACV;IACAJ,UAAU;QACRI,QAAQ;QACRE,QAAQ;YAAC;YAAW;SAAU;IAChC;IACAC,kBAAkB;QAChBH,QAAQ;IACV;IACAI,OAAO;QACLC,SAAS;QACTC,SAAS;IACX;IACAC,QAAQ;QACNF,SAAS;QACTC,SAAS;IACX;IACAE,OAAO;QACLH,SAAS;QACTC,SAAS;QACTG,SAAS;IACX;IACAC,UAAU;QACRD,SAAS;IACX;AACF,GAAG;IACDE,GAAG;QAAC;QAAgD;QAAmD;QAA2D;QAAuD;QAA+B;QAAgC;QAA+C;QAAmD;QAA+C;QAAoD;QAA+C;QAAmD;KAAmD;AACpnB;AAIO,MAAMjB,0BAA0BkB,CAAAA;IACrC,MAAMC,SAAShB;IACfe,MAAMjB,IAAI,CAACmB,SAAS,GAAGC,IAAAA,mBAAY,EAACtB,gBAAgBE,IAAI,EAAEkB,OAAOlB,IAAI,EAAEiB,MAAMX,QAAQ,IAAIY,OAAOZ,QAAQ,EAAEY,MAAM,CAACD,MAAMI,IAAI,CAAC,EAAEJ,MAAMK,MAAM,KAAK,cAAcJ,OAAOH,QAAQ,EAAEE,MAAMjB,IAAI,CAACmB,SAAS;IAClM,IAAIF,MAAMhB,QAAQ,EAAE;QAClBgB,MAAMhB,QAAQ,CAACkB,SAAS,GAAGC,IAAAA,mBAAY,EAACtB,gBAAgBG,QAAQ,EAAEiB,OAAOjB,QAAQ,EAAEgB,MAAMX,QAAQ,IAAIY,OAAOV,gBAAgB,EAAES,MAAMhB,QAAQ,CAACkB,SAAS;IACxJ;IACA,OAAOF;AACT,GACA,iDAAiD"}
|
package/lib-commonjs/index.js
CHANGED
@@ -9,10 +9,20 @@ function _export(target, all) {
|
|
9
9
|
});
|
10
10
|
}
|
11
11
|
_export(exports, {
|
12
|
-
Label: ()
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
Label: function() {
|
13
|
+
return _Label.Label;
|
14
|
+
},
|
15
|
+
labelClassNames: function() {
|
16
|
+
return _Label.labelClassNames;
|
17
|
+
},
|
18
|
+
renderLabel_unstable: function() {
|
19
|
+
return _Label.renderLabel_unstable;
|
20
|
+
},
|
21
|
+
useLabelStyles_unstable: function() {
|
22
|
+
return _Label.useLabelStyles_unstable;
|
23
|
+
},
|
24
|
+
useLabel_unstable: function() {
|
25
|
+
return _Label.useLabel_unstable;
|
26
|
+
}
|
17
27
|
});
|
18
|
-
const
|
28
|
+
const _Label = require("./Label");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.js"],"sourcesContent":["export { Label, labelClassNames, renderLabel_unstable, useLabelStyles_unstable, useLabel_unstable } from './Label';\n"],"names":["Label","labelClassNames","renderLabel_unstable","useLabelStyles_unstable","useLabel_unstable"],"mappings":";;;;;;;;;;;IAASA,KAAK,
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export { Label, labelClassNames, renderLabel_unstable, useLabelStyles_unstable, useLabel_unstable } from './Label';\n"],"names":["Label","labelClassNames","renderLabel_unstable","useLabelStyles_unstable","useLabel_unstable"],"mappings":";;;;;;;;;;;IAASA,KAAK;eAALA,YAAK;;IAAEC,eAAe;eAAfA,sBAAe;;IAAEC,oBAAoB;eAApBA,2BAAoB;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,iBAAiB;eAAjBA,wBAAiB;;;uBAAQ"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-label",
|
3
|
-
"version": "9.1.
|
3
|
+
"version": "9.1.31",
|
4
4
|
"description": "Fluent UI React Label component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -33,18 +33,18 @@
|
|
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.
|
39
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
36
|
+
"@fluentui/react-shared-contexts": "^9.7.3",
|
37
|
+
"@fluentui/react-theme": "^9.1.12",
|
38
|
+
"@fluentui/react-utilities": "^9.13.1",
|
39
|
+
"@fluentui/react-jsx-runtime": "^9.0.4",
|
40
40
|
"@griffel/react": "^1.5.14",
|
41
|
-
"@swc/helpers": "^0.
|
41
|
+
"@swc/helpers": "^0.5.1"
|
42
42
|
},
|
43
43
|
"peerDependencies": {
|
44
|
-
"@types/react": ">=16.
|
45
|
-
"@types/react-dom": ">=16.
|
46
|
-
"react": ">=16.
|
47
|
-
"react-dom": ">=16.
|
44
|
+
"@types/react": ">=16.14.0 <19.0.0",
|
45
|
+
"@types/react-dom": ">=16.14.0 <19.0.0",
|
46
|
+
"react": ">=16.14.0 <19.0.0",
|
47
|
+
"react-dom": ">=16.14.0 <19.0.0"
|
48
48
|
},
|
49
49
|
"beachball": {
|
50
50
|
"disallowedChangeTypes": [
|