@fluentui/react-label 0.0.0-nightly-20230831-0414.1 → 0.0.0-nightly-20230904-0415.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.json +15 -15
- package/CHANGELOG.md +10 -10
- 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 +12 -12
package/CHANGELOG.json
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
"name": "@fluentui/react-label",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-label_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Mon, 04 Sep 2023 04:22:35 GMT",
|
6
|
+
"tag": "@fluentui/react-label_v0.0.0-nightly-20230904-0415.1",
|
7
|
+
"version": "0.0.0-nightly-20230904-0415.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -16,38 +16,38 @@
|
|
16
16
|
{
|
17
17
|
"author": "beachball",
|
18
18
|
"package": "@fluentui/react-label",
|
19
|
-
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
20
|
-
"commit": "
|
19
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230904-0415.1",
|
20
|
+
"commit": "b3da35a3343968323dc9938d269df82b4cb2d618"
|
21
21
|
},
|
22
22
|
{
|
23
23
|
"author": "beachball",
|
24
24
|
"package": "@fluentui/react-label",
|
25
|
-
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-
|
26
|
-
"commit": "
|
25
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230904-0415.1",
|
26
|
+
"commit": "b3da35a3343968323dc9938d269df82b4cb2d618"
|
27
27
|
},
|
28
28
|
{
|
29
29
|
"author": "beachball",
|
30
30
|
"package": "@fluentui/react-label",
|
31
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-
|
32
|
-
"commit": "
|
31
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230904-0415.1",
|
32
|
+
"commit": "b3da35a3343968323dc9938d269df82b4cb2d618"
|
33
33
|
},
|
34
34
|
{
|
35
35
|
"author": "beachball",
|
36
36
|
"package": "@fluentui/react-label",
|
37
|
-
"comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-
|
38
|
-
"commit": "
|
37
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230904-0415.1",
|
38
|
+
"commit": "b3da35a3343968323dc9938d269df82b4cb2d618"
|
39
39
|
},
|
40
40
|
{
|
41
41
|
"author": "beachball",
|
42
42
|
"package": "@fluentui/react-label",
|
43
|
-
"comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-
|
44
|
-
"commit": "
|
43
|
+
"comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230904-0415.1",
|
44
|
+
"commit": "b3da35a3343968323dc9938d269df82b4cb2d618"
|
45
45
|
},
|
46
46
|
{
|
47
47
|
"author": "beachball",
|
48
48
|
"package": "@fluentui/react-label",
|
49
|
-
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
50
|
-
"commit": "
|
49
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230904-0415.1",
|
50
|
+
"commit": "b3da35a3343968323dc9938d269df82b4cb2d618"
|
51
51
|
}
|
52
52
|
]
|
53
53
|
}
|
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 Mon, 04 Sep 2023 04:22:35 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-20230904-0415.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightly-20230904-0415.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.1.30..@fluentui/react-label_v0.0.0-nightly-
|
9
|
+
Mon, 04 Sep 2023 04:22:35 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.1.30..@fluentui/react-label_v0.0.0-nightly-20230904-0415.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-20230904-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/b3da35a3343968323dc9938d269df82b4cb2d618) by beachball)
|
16
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20230904-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/b3da35a3343968323dc9938d269df82b4cb2d618) by beachball)
|
17
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20230904-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/b3da35a3343968323dc9938d269df82b4cb2d618) by beachball)
|
18
|
+
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230904-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/b3da35a3343968323dc9938d269df82b4cb2d618) by beachball)
|
19
|
+
- Bump @fluentui/react-conformance to v0.0.0-nightly-20230904-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/b3da35a3343968323dc9938d269df82b4cb2d618) by beachball)
|
20
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230904-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/b3da35a3343968323dc9938d269df82b4cb2d618) by beachball)
|
21
21
|
|
22
22
|
## [9.1.30](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.1.30)
|
23
23
|
|
@@ -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": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20230904-0415.1",
|
4
4
|
"description": "Fluent UI React Label component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -27,24 +27,24 @@
|
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
30
|
-
"@fluentui/react-conformance": "0.0.0-nightly-
|
31
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
30
|
+
"@fluentui/react-conformance": "0.0.0-nightly-20230904-0415.1",
|
31
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20230904-0415.1",
|
32
32
|
"@fluentui/scripts-api-extractor": "*",
|
33
33
|
"@fluentui/scripts-tasks": "*"
|
34
34
|
},
|
35
35
|
"dependencies": {
|
36
|
-
"@fluentui/react-shared-contexts": "0.0.0-nightly-
|
37
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
38
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
39
|
-
"@fluentui/react-jsx-runtime": "0.0.0-nightly-
|
36
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20230904-0415.1",
|
37
|
+
"@fluentui/react-theme": "0.0.0-nightly-20230904-0415.1",
|
38
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20230904-0415.1",
|
39
|
+
"@fluentui/react-jsx-runtime": "0.0.0-nightly-20230904-0415.1",
|
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
|
"exports": {
|