@fluentui/react-label 0.0.0-nightly-20230223-2115.1 → 0.0.0-nightly-20230227-0424.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 +9 -9
- package/CHANGELOG.md +7 -7
- package/lib/Label.js.map +1 -1
- package/lib/components/Label/Label.js.map +1 -1
- package/lib/components/Label/Label.types.js.map +1 -1
- package/lib/components/Label/index.js.map +1 -1
- package/lib/components/Label/renderLabel.js +5 -2
- package/lib/components/Label/renderLabel.js.map +1 -1
- package/lib/components/Label/useLabel.js +0 -1
- package/lib/components/Label/useLabel.js.map +1 -1
- package/lib/components/Label/useLabelStyles.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Label.js +4 -5
- package/lib-commonjs/Label.js.map +1 -1
- package/lib-commonjs/components/Label/Label.js +15 -16
- package/lib-commonjs/components/Label/Label.js.map +1 -1
- package/lib-commonjs/components/Label/Label.types.js +2 -3
- package/lib-commonjs/components/Label/Label.types.js.map +1 -1
- package/lib-commonjs/components/Label/index.js +8 -9
- package/lib-commonjs/components/Label/index.js.map +1 -1
- package/lib-commonjs/components/Label/renderLabel.js +20 -15
- package/lib-commonjs/components/Label/renderLabel.js.map +1 -1
- package/lib-commonjs/components/Label/useLabel.js +41 -30
- package/lib-commonjs/components/Label/useLabel.js.map +1 -1
- package/lib-commonjs/components/Label/useLabelStyles.js +53 -73
- package/lib-commonjs/components/Label/useLabelStyles.js.map +1 -1
- package/lib-commonjs/index.js +33 -16
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +6 -6
- package/.swcrc +0 -33
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, 27 Feb 2023 04:31:24 GMT",
|
6
|
+
"tag": "@fluentui/react-label_v0.0.0-nightly-20230227-0424.1",
|
7
|
+
"version": "0.0.0-nightly-20230227-0424.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -16,20 +16,20 @@
|
|
16
16
|
{
|
17
17
|
"author": "beachball",
|
18
18
|
"package": "@fluentui/react-label",
|
19
|
-
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-
|
20
|
-
"commit": "
|
19
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230227-0424.1",
|
20
|
+
"commit": "aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d"
|
21
21
|
},
|
22
22
|
{
|
23
23
|
"author": "beachball",
|
24
24
|
"package": "@fluentui/react-label",
|
25
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-
|
26
|
-
"commit": "
|
25
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230227-0424.1",
|
26
|
+
"commit": "aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d"
|
27
27
|
},
|
28
28
|
{
|
29
29
|
"author": "beachball",
|
30
30
|
"package": "@fluentui/react-label",
|
31
|
-
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
32
|
-
"commit": "
|
31
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230227-0424.1",
|
32
|
+
"commit": "aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d"
|
33
33
|
}
|
34
34
|
]
|
35
35
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
# Change Log - @fluentui/react-label
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Mon, 27 Feb 2023 04:31:24 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-20230227-0424.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightly-20230227-0424.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.22..@fluentui/react-label_v0.0.0-nightly-
|
9
|
+
Mon, 27 Feb 2023 04:31:24 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.22..@fluentui/react-label_v0.0.0-nightly-20230227-0424.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-theme to v0.0.0-nightly-
|
16
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
17
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
15
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20230227-0424.1 ([commit](https://github.com/microsoft/fluentui/commit/aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d) by beachball)
|
16
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20230227-0424.1 ([commit](https://github.com/microsoft/fluentui/commit/aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d) by beachball)
|
17
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230227-0424.1 ([commit](https://github.com/microsoft/fluentui/commit/aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d) by beachball)
|
18
18
|
|
19
19
|
## [9.0.22](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.22)
|
20
20
|
|
package/lib/Label.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-label/src/Label.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './components/Label/index';\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"mappings":"AAAA,
|
1
|
+
{"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SAASC,uBAAuB,QAAQ,kBAAkB;AAI1D;;;AAGA,OAAO,MAAMC,KAAK,gBAAoCJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpF,MAAMC,KAAK,GAAGP,iBAAiB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAE3CJ,uBAAuB,CAACK,KAAK,CAAC;EAC9B,OAAON,oBAAoB,CAACM,KAAK,CAAC;AACpC,CAAC,CAAC;AAEFJ,KAAK,CAACK,WAAW,GAAG,OAAO","names":["React","useLabel_unstable","renderLabel_unstable","useLabelStyles_unstable","Label","forwardRef","props","ref","state","displayName"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-label/src/components/Label/Label.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useLabel_unstable } from './useLabel';\nimport { renderLabel_unstable } from './renderLabel';\nimport { useLabelStyles_unstable } from './useLabelStyles';\nimport type { LabelProps } from './Label.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\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 return renderLabel_unstable(state);\n});\n\nLabel.displayName = 'Label';\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"file":"Label.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-label/src/components/Label/Label.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Label Props\n */\nexport type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & {\n /**\n * Renders the label as disabled\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Displays an indicator that the label is for a required field. The required prop can be set to true to display\n * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.\n * @default false\n */\n required?: boolean | Slot<'span'>;\n\n /**\n * A label supports different sizes.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * A label supports regular and semibold fontweight.\n * @default regular\n */\n weight?: 'regular' | 'semibold';\n};\n\nexport type LabelSlots = {\n root: Slot<'label'>;\n required?: Slot<'span'>;\n};\n\n/**\n * State used in rendering Label\n */\nexport type LabelState = ComponentState<LabelSlots> & Required<Pick<LabelProps, 'disabled' | 'size' | 'weight'>>;\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-label/src/components/Label/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './Label';\nexport * from './Label.types';\nexport * from './renderLabel';\nexport * from './useLabel';\nexport * from './useLabelStyles';\n"]}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import _extends from "@swc/helpers/src/_extends.mjs";
|
2
1
|
import * as React from 'react';
|
3
2
|
import { getSlots } from '@fluentui/react-utilities';
|
4
3
|
/**
|
@@ -9,6 +8,10 @@ export const renderLabel_unstable = state => {
|
|
9
8
|
slots,
|
10
9
|
slotProps
|
11
10
|
} = getSlots(state);
|
12
|
-
return /*#__PURE__*/React.createElement(slots.root,
|
11
|
+
return /*#__PURE__*/React.createElement(slots.root, {
|
12
|
+
...slotProps.root
|
13
|
+
}, state.root.children, slots.required && /*#__PURE__*/React.createElement(slots.required, {
|
14
|
+
...slotProps.required
|
15
|
+
}));
|
13
16
|
};
|
14
17
|
//# sourceMappingURL=renderLabel.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"mappings":"
|
1
|
+
{"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,oBAAoB,GAAIC,KAAiB,IAAI;EACxD,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAaE,KAAK,CAAC;EAExD,oBACEH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,GAC3BH,KAAK,CAACG,IAAI,CAACC,QAAQ,EACnBH,KAAK,CAACI,QAAQ,iBAAIR,oBAACI,KAAK,CAACI,QAAQ;IAAA,GAAKH,SAAS,CAACG;EAAQ,EAAI,CAClD;AAEjB,CAAC","names":["React","getSlots","renderLabel_unstable","state","slots","slotProps","root","children","required"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-label/src/components/Label/renderLabel.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } 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 const { slots, slotProps } = getSlots<LabelSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.root.children}\n {slots.required && <slots.required {...slotProps.required} />}\n </slots.root>\n );\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"mappings":"
|
1
|
+
{"version":3,"mappings":"AACA,SAASA,qBAAqB,QAAQ,2BAA2B;AAEjE,SAASC,gBAAgB,QAAQ,2BAA2B;AAE5D;;;;;;;;;AASA,OAAO,MAAMC,iBAAiB,GAAG,CAACC,KAAiB,EAAEC,GAA2B,KAAgB;EAC9F,MAAM;IAAEC,QAAQ,GAAG,KAAK;IAAEC,QAAQ,GAAG,KAAK;IAAEC,MAAM,GAAG,SAAS;IAAEC,IAAI,GAAG;EAAQ,CAAE,GAAGL,KAAK;EACzF,OAAO;IACLE,QAAQ;IACRC,QAAQ,EAAEL,gBAAgB,CAACK,QAAQ,KAAK,IAAI,GAAG,GAAG,GAAGA,QAAQ,IAAIG,SAAS,EAAE;MAC1EC,YAAY,EAAE;QAAE,aAAa,EAAE;MAAM;KACtC,CAAC;IACFH,MAAM;IACNC,IAAI;IACJG,UAAU,EAAE;MAAEC,IAAI,EAAE,OAAO;MAAEN,QAAQ,EAAE;IAAM,CAAE;IAC/CM,IAAI,EAAEZ,qBAAqB,CAAC,OAAO,EAAE;MAAEI,GAAG;MAAE,GAAGD;IAAK,CAAE;GACvD;AACH,CAAC","names":["getNativeElementProps","resolveShorthand","useLabel_unstable","props","ref","disabled","required","weight","size","undefined","defaultProps","components","root"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-label/src/components/Label/useLabel.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { LabelProps, LabelState } from './Label.types';\nimport { resolveShorthand } from '@fluentui/react-utilities';\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: resolveShorthand(required === true ? '*' : required || undefined, {\n defaultProps: { 'aria-hidden': 'true' },\n }),\n weight,\n size,\n components: { root: 'label', required: 'span' },\n root: getNativeElementProps('label', { ref, ...props }),\n };\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"mappings":"AAAA,mBAAqBA,YAAY,QAAQ;
|
1
|
+
{"version":3,"mappings":"AAAA,mBAAqBA,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAI9C,OAAO,MAAMC,eAAe,GAA+B;EACzDC,IAAI,EAAE,WAAW;EACjBC,QAAQ,EAAE;CACX;AAED;;;AAGA,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAsChB;AAEF;;;AAGA,OAAO,MAAMC,uBAAuB,GAAIC,KAAiB,IAAgB;EACvE,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1BE,KAAK,CAACJ,IAAI,CAACM,SAAS,GAAGT,YAAY,CACjCE,eAAe,CAACC,IAAI,EACpBK,MAAM,CAACL,IAAI,EACXI,KAAK,CAACG,QAAQ,IAAIF,MAAM,CAACE,QAAQ,EACjCF,MAAM,CAACD,KAAK,CAACI,IAAI,CAAC,EAClBJ,KAAK,CAACK,MAAM,KAAK,UAAU,IAAIJ,MAAM,CAACK,QAAQ,EAC9CN,KAAK,CAACJ,IAAI,CAACM,SAAS,CACrB;EAED,IAAIF,KAAK,CAACH,QAAQ,EAAE;IAClBG,KAAK,CAACH,QAAQ,CAACK,SAAS,GAAGT,YAAY,CACrCE,eAAe,CAACE,QAAQ,EACxBI,MAAM,CAACJ,QAAQ,EACfG,KAAK,CAACG,QAAQ,IAAIF,MAAM,CAACM,gBAAgB,EACzCP,KAAK,CAACH,QAAQ,CAACK,SAAS,CACzB;;EAGH,OAAOF,KAAK;AACd,CAAC","names":["mergeClasses","tokens","labelClassNames","root","required","useStyles","useLabelStyles_unstable","state","styles","className","disabled","size","weight","semibold","requiredDisabled"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-label/src/components/Label/useLabelStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { LabelSlots, LabelState } from './Label.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const labelClassNames: SlotClassNames<LabelSlots> = {\n root: 'fui-Label',\n required: 'fui-Label__required',\n};\n\n/**\n * Styles for the label\n */\nconst useStyles = makeStyles({\n root: {\n fontFamily: tokens.fontFamilyBase,\n color: tokens.colorNeutralForeground1,\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n required: {\n color: tokens.colorPaletteRedForeground3,\n paddingLeft: '4px', // TODO: Once spacing tokens are added, change this to Horizontal XS\n },\n\n requiredDisabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n small: {\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n },\n\n medium: {\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n\n large: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n fontWeight: tokens.fontWeightSemibold,\n },\n\n semibold: {\n fontWeight: tokens.fontWeightSemibold,\n },\n});\n\n/**\n * Apply styling to the Label slots based on the state\n */\nexport const useLabelStyles_unstable = (state: LabelState): LabelState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n labelClassNames.root,\n styles.root,\n state.disabled && styles.disabled,\n styles[state.size],\n state.weight === 'semibold' && styles.semibold,\n state.root.className,\n );\n\n if (state.required) {\n state.required.className = mergeClasses(\n labelClassNames.required,\n styles.required,\n state.disabled && styles.requiredDisabled,\n state.required.className,\n );\n }\n\n return state;\n};\n"]}
|
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-label/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC","sourcesContent":["export { Label, labelClassNames, renderLabel_unstable, useLabelStyles_unstable, useLabel_unstable } from './Label';\nexport type { LabelProps, LabelSlots, LabelState } from './Label';\n"]}
|
package/lib-commonjs/Label.js
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
+
value: true
|
4
5
|
});
|
5
|
-
const
|
6
|
-
|
7
|
-
//# sourceMappingURL=Label.js.map
|
8
|
-
|
6
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
7
|
+
tslib_1.__exportStar(require("./components/Label/index"), exports);
|
9
8
|
//# sourceMappingURL=Label.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-label/src/Label.ts"],"sourcesContent":["export * from './components/Label/index';\n"]}
|
@@ -1,21 +1,20 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "Label", {
|
6
|
-
enumerable: true,
|
7
|
-
get: ()=>Label
|
4
|
+
value: true
|
8
5
|
});
|
9
|
-
|
10
|
-
const
|
11
|
-
const
|
12
|
-
const
|
13
|
-
const
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
6
|
+
exports.Label = void 0;
|
7
|
+
const React = /*#__PURE__*/require("react");
|
8
|
+
const useLabel_1 = /*#__PURE__*/require("./useLabel");
|
9
|
+
const renderLabel_1 = /*#__PURE__*/require("./renderLabel");
|
10
|
+
const useLabelStyles_1 = /*#__PURE__*/require("./useLabelStyles");
|
11
|
+
/**
|
12
|
+
* A label component provides a title or name to a component.
|
13
|
+
*/
|
14
|
+
exports.Label = /*#__PURE__*/React.forwardRef((props, ref) => {
|
15
|
+
const state = useLabel_1.useLabel_unstable(props, ref);
|
16
|
+
useLabelStyles_1.useLabelStyles_unstable(state);
|
17
|
+
return renderLabel_1.renderLabel_unstable(state);
|
18
18
|
});
|
19
|
-
Label.displayName = 'Label';
|
20
|
-
|
19
|
+
exports.Label.displayName = 'Label';
|
21
20
|
//# sourceMappingURL=Label.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA;;;AAGaA,aAAK,gBAAoCC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpF,MAAMC,KAAK,GAAGC,4BAAiB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAE3CG,wCAAuB,CAACF,KAAK,CAAC;EAC9B,OAAOG,kCAAoB,CAACH,KAAK,CAAC;AACpC,CAAC,CAAC;AAEFL,aAAK,CAACS,WAAW,GAAG,OAAO","names":["exports","React","forwardRef","props","ref","state","useLabel_1","useLabelStyles_1","renderLabel_1","displayName"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-label/src/components/Label/Label.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useLabel_unstable } from './useLabel';\nimport { renderLabel_unstable } from './renderLabel';\nimport { useLabelStyles_unstable } from './useLabelStyles';\nimport type { LabelProps } from './Label.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\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 return renderLabel_unstable(state);\n});\n\nLabel.displayName = 'Label';\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"mappings":"","names":[],"sourceRoot":"","sources":[],"sourcesContent":[]}
|
@@ -1,13 +1,12 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
+
value: true
|
4
5
|
});
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
//# sourceMappingURL=index.js.map
|
12
|
-
|
6
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
7
|
+
tslib_1.__exportStar(require("./Label"), exports);
|
8
|
+
tslib_1.__exportStar(require("./Label.types"), exports);
|
9
|
+
tslib_1.__exportStar(require("./renderLabel"), exports);
|
10
|
+
tslib_1.__exportStar(require("./useLabel"), exports);
|
11
|
+
tslib_1.__exportStar(require("./useLabelStyles"), exports);
|
13
12
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-label/src/components/Label/index.ts"],"sourcesContent":["export * from './Label';\nexport * from './Label.types';\nexport * from './renderLabel';\nexport * from './useLabel';\nexport * from './useLabelStyles';\n"]}
|
@@ -1,19 +1,24 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "renderLabel_unstable", {
|
6
|
-
enumerable: true,
|
7
|
-
get: ()=>renderLabel_unstable
|
4
|
+
value: true
|
8
5
|
});
|
9
|
-
|
10
|
-
const
|
11
|
-
const
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
6
|
+
exports.renderLabel_unstable = void 0;
|
7
|
+
const React = /*#__PURE__*/require("react");
|
8
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
9
|
+
/**
|
10
|
+
* Render the final JSX of Label
|
11
|
+
*/
|
12
|
+
const renderLabel_unstable = state => {
|
13
|
+
const {
|
14
|
+
slots,
|
15
|
+
slotProps
|
16
|
+
} = react_utilities_1.getSlots(state);
|
17
|
+
return React.createElement(slots.root, {
|
18
|
+
...slotProps.root
|
19
|
+
}, state.root.children, slots.required && React.createElement(slots.required, {
|
20
|
+
...slotProps.required
|
21
|
+
}));
|
22
|
+
};
|
23
|
+
exports.renderLabel_unstable = renderLabel_unstable;
|
19
24
|
//# sourceMappingURL=renderLabel.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AAGA;;;AAGO,MAAMA,oBAAoB,GAAIC,KAAiB,IAAI;EACxD,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAaH,KAAK,CAAC;EAExD,OACEI,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAC3BL,KAAK,CAACK,IAAI,CAACC,QAAQ,EACnBL,KAAK,CAACM,QAAQ,IAAIH,oBAACH,KAAK,CAACM,QAAQ;IAAA,GAAKL,SAAS,CAACK;EAAQ,EAAI,CAClD;AAEjB,CAAC;AATYC,4BAAoB","names":["renderLabel_unstable","state","slots","slotProps","react_utilities_1","React","root","children","required","exports"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-label/src/components/Label/renderLabel.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } 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 const { slots, slotProps } = getSlots<LabelSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.root.children}\n {slots.required && <slots.required {...slotProps.required} />}\n </slots.root>\n );\n};\n"]}
|
@@ -1,34 +1,45 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "useLabel_unstable", {
|
6
|
-
enumerable: true,
|
7
|
-
get: ()=>useLabel_unstable
|
4
|
+
value: true
|
8
5
|
});
|
9
|
-
|
10
|
-
const
|
11
|
-
const
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
6
|
+
exports.useLabel_unstable = void 0;
|
7
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
8
|
+
const react_utilities_2 = /*#__PURE__*/require("@fluentui/react-utilities");
|
9
|
+
/**
|
10
|
+
* Create the state required to render Label.
|
11
|
+
*
|
12
|
+
* The returned state can be modified with hooks such as useLabelStyles_unstable,
|
13
|
+
* before being passed to renderLabel_unstable.
|
14
|
+
*
|
15
|
+
* @param props - props from this instance of Label
|
16
|
+
* @param ref - reference to root HTMLElement of Label
|
17
|
+
*/
|
18
|
+
const useLabel_unstable = (props, ref) => {
|
19
|
+
const {
|
20
|
+
disabled = false,
|
21
|
+
required = false,
|
22
|
+
weight = 'regular',
|
23
|
+
size = 'medium'
|
24
|
+
} = props;
|
25
|
+
return {
|
26
|
+
disabled,
|
27
|
+
required: react_utilities_2.resolveShorthand(required === true ? '*' : required || undefined, {
|
28
|
+
defaultProps: {
|
29
|
+
'aria-hidden': 'true'
|
30
|
+
}
|
31
|
+
}),
|
32
|
+
weight,
|
33
|
+
size,
|
34
|
+
components: {
|
35
|
+
root: 'label',
|
36
|
+
required: 'span'
|
37
|
+
},
|
38
|
+
root: react_utilities_1.getNativeElementProps('label', {
|
39
|
+
ref,
|
40
|
+
...props
|
41
|
+
})
|
42
|
+
};
|
43
|
+
};
|
44
|
+
exports.useLabel_unstable = useLabel_unstable;
|
34
45
|
//# sourceMappingURL=useLabel.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"mappings":";;;;;;AACA;AAEA;AAEA;;;;;;;;;AASO,MAAMA,iBAAiB,GAAG,CAACC,KAAiB,EAAEC,GAA2B,KAAgB;EAC9F,MAAM;IAAEC,QAAQ,GAAG,KAAK;IAAEC,QAAQ,GAAG,KAAK;IAAEC,MAAM,GAAG,SAAS;IAAEC,IAAI,GAAG;EAAQ,CAAE,GAAGL,KAAK;EACzF,OAAO;IACLE,QAAQ;IACRC,QAAQ,EAAEG,kCAAgB,CAACH,QAAQ,KAAK,IAAI,GAAG,GAAG,GAAGA,QAAQ,IAAII,SAAS,EAAE;MAC1EC,YAAY,EAAE;QAAE,aAAa,EAAE;MAAM;KACtC,CAAC;IACFJ,MAAM;IACNC,IAAI;IACJI,UAAU,EAAE;MAAEC,IAAI,EAAE,OAAO;MAAEP,QAAQ,EAAE;IAAM,CAAE;IAC/CO,IAAI,EAAEC,uCAAqB,CAAC,OAAO,EAAE;MAAEV,GAAG;MAAE,GAAGD;IAAK,CAAE;GACvD;AACH,CAAC;AAZYY,yBAAiB","names":["useLabel_unstable","props","ref","disabled","required","weight","size","react_utilities_2","undefined","defaultProps","components","root","react_utilities_1","exports"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-label/src/components/Label/useLabel.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { LabelProps, LabelState } from './Label.types';\nimport { resolveShorthand } from '@fluentui/react-utilities';\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: resolveShorthand(required === true ? '*' : required || undefined, {\n defaultProps: { 'aria-hidden': 'true' },\n }),\n weight,\n size,\n components: { root: 'label', required: 'span' },\n root: getNativeElementProps('label', { ref, ...props }),\n };\n};\n"]}
|
@@ -1,82 +1,62 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
-
});
|
5
|
-
function _export(target, all) {
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
7
|
-
enumerable: true,
|
8
|
-
get: all[name]
|
9
|
-
});
|
10
|
-
}
|
11
|
-
_export(exports, {
|
12
|
-
labelClassNames: ()=>labelClassNames,
|
13
|
-
useLabelStyles_unstable: ()=>useLabelStyles_unstable
|
4
|
+
value: true
|
14
5
|
});
|
15
|
-
|
16
|
-
const
|
17
|
-
|
18
|
-
|
6
|
+
exports.useLabelStyles_unstable = exports.labelClassNames = void 0;
|
7
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
8
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
9
|
+
exports.labelClassNames = {
|
10
|
+
root: 'fui-Label',
|
11
|
+
required: 'fui-Label__required'
|
19
12
|
};
|
20
13
|
/**
|
21
14
|
* Styles for the label
|
22
|
-
*/
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
Bhrd7zp: "fl43uef"
|
55
|
-
}
|
15
|
+
*/
|
16
|
+
const useStyles = /*#__PURE__*/react_1.__styles({
|
17
|
+
root: {
|
18
|
+
Bahqtrf: "fk6fouc",
|
19
|
+
sj55zd: "f19n0e5"
|
20
|
+
},
|
21
|
+
disabled: {
|
22
|
+
sj55zd: "f1s2aq7o"
|
23
|
+
},
|
24
|
+
required: {
|
25
|
+
sj55zd: "f1whyuy6",
|
26
|
+
uwmqm3: ["fycuoez", "f8wuabp"]
|
27
|
+
},
|
28
|
+
requiredDisabled: {
|
29
|
+
sj55zd: "f1s2aq7o"
|
30
|
+
},
|
31
|
+
small: {
|
32
|
+
Be2twd7: "fy9rknc",
|
33
|
+
Bg96gwp: "fwrc4pm"
|
34
|
+
},
|
35
|
+
medium: {
|
36
|
+
Be2twd7: "fkhj508",
|
37
|
+
Bg96gwp: "f1i3iumi"
|
38
|
+
},
|
39
|
+
large: {
|
40
|
+
Be2twd7: "fod5ikn",
|
41
|
+
Bg96gwp: "faaz57k",
|
42
|
+
Bhrd7zp: "fl43uef"
|
43
|
+
},
|
44
|
+
semibold: {
|
45
|
+
Bhrd7zp: "fl43uef"
|
46
|
+
}
|
56
47
|
}, {
|
57
|
-
|
58
|
-
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
59
|
-
".f19n0e5{color:var(--colorNeutralForeground1);}",
|
60
|
-
".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",
|
61
|
-
".f1whyuy6{color:var(--colorPaletteRedForeground3);}",
|
62
|
-
".fycuoez{padding-left:4px;}",
|
63
|
-
".f8wuabp{padding-right:4px;}",
|
64
|
-
".fy9rknc{font-size:var(--fontSizeBase200);}",
|
65
|
-
".fwrc4pm{line-height:var(--lineHeightBase200);}",
|
66
|
-
".fkhj508{font-size:var(--fontSizeBase300);}",
|
67
|
-
".f1i3iumi{line-height:var(--lineHeightBase300);}",
|
68
|
-
".fod5ikn{font-size:var(--fontSizeBase400);}",
|
69
|
-
".faaz57k{line-height:var(--lineHeightBase400);}",
|
70
|
-
".fl43uef{font-weight:var(--fontWeightSemibold);}"
|
71
|
-
]
|
48
|
+
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);}"]
|
72
49
|
});
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
50
|
+
/**
|
51
|
+
* Apply styling to the Label slots based on the state
|
52
|
+
*/
|
53
|
+
const useLabelStyles_unstable = state => {
|
54
|
+
const styles = useStyles();
|
55
|
+
state.root.className = react_1.mergeClasses(exports.labelClassNames.root, styles.root, state.disabled && styles.disabled, styles[state.size], state.weight === 'semibold' && styles.semibold, state.root.className);
|
56
|
+
if (state.required) {
|
57
|
+
state.required.className = react_1.mergeClasses(exports.labelClassNames.required, styles.required, state.disabled && styles.requiredDisabled, state.required.className);
|
58
|
+
}
|
59
|
+
return state;
|
60
|
+
};
|
61
|
+
exports.useLabelStyles_unstable = useLabelStyles_unstable;
|
82
62
|
//# sourceMappingURL=useLabelStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AAIaA,uBAAe,GAA+B;EACzDC,IAAI,EAAE,WAAW;EACjBC,QAAQ,EAAE;CACX;AAED;;;AAGA,MAAMC,SAAS,gBAAGC,gBAAU;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAsC1B;AAEF;;;AAGO,MAAMC,uBAAuB,GAAIC,KAAiB,IAAgB;EACvE,MAAMC,MAAM,GAAGJ,SAAS,EAAE;EAC1BG,KAAK,CAACL,IAAI,CAACO,SAAS,GAAGJ,oBAAY,CACjCJ,uBAAe,CAACC,IAAI,EACpBM,MAAM,CAACN,IAAI,EACXK,KAAK,CAACG,QAAQ,IAAIF,MAAM,CAACE,QAAQ,EACjCF,MAAM,CAACD,KAAK,CAACI,IAAI,CAAC,EAClBJ,KAAK,CAACK,MAAM,KAAK,UAAU,IAAIJ,MAAM,CAACK,QAAQ,EAC9CN,KAAK,CAACL,IAAI,CAACO,SAAS,CACrB;EAED,IAAIF,KAAK,CAACJ,QAAQ,EAAE;IAClBI,KAAK,CAACJ,QAAQ,CAACM,SAAS,GAAGJ,oBAAY,CACrCJ,uBAAe,CAACE,QAAQ,EACxBK,MAAM,CAACL,QAAQ,EACfI,KAAK,CAACG,QAAQ,IAAIF,MAAM,CAACM,gBAAgB,EACzCP,KAAK,CAACJ,QAAQ,CAACM,SAAS,CACzB;;EAGH,OAAOF,KAAK;AACd,CAAC;AArBYN,+BAAuB","names":["exports","root","required","useStyles","react_1","useLabelStyles_unstable","state","styles","className","disabled","size","weight","semibold","requiredDisabled"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-label/src/components/Label/useLabelStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { LabelSlots, LabelState } from './Label.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const labelClassNames: SlotClassNames<LabelSlots> = {\n root: 'fui-Label',\n required: 'fui-Label__required',\n};\n\n/**\n * Styles for the label\n */\nconst useStyles = makeStyles({\n root: {\n fontFamily: tokens.fontFamilyBase,\n color: tokens.colorNeutralForeground1,\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n required: {\n color: tokens.colorPaletteRedForeground3,\n paddingLeft: '4px', // TODO: Once spacing tokens are added, change this to Horizontal XS\n },\n\n requiredDisabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n small: {\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n },\n\n medium: {\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n\n large: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n fontWeight: tokens.fontWeightSemibold,\n },\n\n semibold: {\n fontWeight: tokens.fontWeightSemibold,\n },\n});\n\n/**\n * Apply styling to the Label slots based on the state\n */\nexport const useLabelStyles_unstable = (state: LabelState): LabelState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n labelClassNames.root,\n styles.root,\n state.disabled && styles.disabled,\n styles[state.size],\n state.weight === 'semibold' && styles.semibold,\n state.root.className,\n );\n\n if (state.required) {\n state.required.className = mergeClasses(\n labelClassNames.required,\n styles.required,\n state.disabled && styles.requiredDisabled,\n state.required.className,\n );\n }\n\n return state;\n};\n"]}
|
package/lib-commonjs/index.js
CHANGED
@@ -1,21 +1,38 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
+
value: true
|
4
5
|
});
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
6
|
+
exports.useLabel_unstable = exports.useLabelStyles_unstable = exports.renderLabel_unstable = exports.labelClassNames = exports.Label = void 0;
|
7
|
+
var Label_1 = /*#__PURE__*/require("./Label");
|
8
|
+
Object.defineProperty(exports, "Label", {
|
9
|
+
enumerable: true,
|
10
|
+
get: function () {
|
11
|
+
return Label_1.Label;
|
12
|
+
}
|
13
|
+
});
|
14
|
+
Object.defineProperty(exports, "labelClassNames", {
|
15
|
+
enumerable: true,
|
16
|
+
get: function () {
|
17
|
+
return Label_1.labelClassNames;
|
18
|
+
}
|
19
|
+
});
|
20
|
+
Object.defineProperty(exports, "renderLabel_unstable", {
|
21
|
+
enumerable: true,
|
22
|
+
get: function () {
|
23
|
+
return Label_1.renderLabel_unstable;
|
24
|
+
}
|
25
|
+
});
|
26
|
+
Object.defineProperty(exports, "useLabelStyles_unstable", {
|
27
|
+
enumerable: true,
|
28
|
+
get: function () {
|
29
|
+
return Label_1.useLabelStyles_unstable;
|
30
|
+
}
|
31
|
+
});
|
32
|
+
Object.defineProperty(exports, "useLabel_unstable", {
|
33
|
+
enumerable: true,
|
34
|
+
get: function () {
|
35
|
+
return Label_1.useLabel_unstable;
|
36
|
+
}
|
17
37
|
});
|
18
|
-
const _label = require("./Label");
|
19
|
-
//# sourceMappingURL=index.js.map
|
20
|
-
|
21
38
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AAASA;EAAAC;EAAAC;IAAA,oBAAK;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,8BAAe;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,mCAAoB;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,sCAAuB;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,gCAAiB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-label/src/index.ts"],"sourcesContent":["export { Label, labelClassNames, renderLabel_unstable, useLabelStyles_unstable, useLabel_unstable } from './Label';\nexport type { LabelProps, LabelSlots, LabelState } from './Label';\n"]}
|
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-20230227-0424.1",
|
4
4
|
"description": "Fluent UI React Label component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -22,20 +22,20 @@
|
|
22
22
|
"test": "jest --passWithNoTests",
|
23
23
|
"storybook": "start-storybook",
|
24
24
|
"type-check": "tsc -b tsconfig.json",
|
25
|
-
"generate-api": "just-scripts
|
25
|
+
"generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
|
26
26
|
},
|
27
27
|
"devDependencies": {
|
28
28
|
"@fluentui/eslint-plugin": "*",
|
29
29
|
"@fluentui/react-conformance": "*",
|
30
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
30
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20230227-0424.1",
|
31
31
|
"@fluentui/scripts-api-extractor": "*",
|
32
32
|
"@fluentui/scripts-tasks": "*"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
36
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
35
|
+
"@fluentui/react-theme": "0.0.0-nightly-20230227-0424.1",
|
36
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20230227-0424.1",
|
37
37
|
"@griffel/react": "^1.5.2",
|
38
|
-
"
|
38
|
+
"tslib": "^2.1.0"
|
39
39
|
},
|
40
40
|
"peerDependencies": {
|
41
41
|
"@types/react": ">=16.8.0 <19.0.0",
|
package/.swcrc
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "https://json.schemastore.org/swcrc",
|
3
|
-
"env": {
|
4
|
-
"targets": {
|
5
|
-
"chrome": "84",
|
6
|
-
"edge": "84",
|
7
|
-
"firefox": "75",
|
8
|
-
"opera": "73",
|
9
|
-
"safari": "14.1"
|
10
|
-
}
|
11
|
-
},
|
12
|
-
"exclude": [
|
13
|
-
"/testing",
|
14
|
-
"/**/*.cy.ts",
|
15
|
-
"/**/*.cy.tsx",
|
16
|
-
"/**/*.spec.ts",
|
17
|
-
"/**/*.spec.tsx",
|
18
|
-
"/**/*.test.ts",
|
19
|
-
"/**/*.test.tsx"
|
20
|
-
],
|
21
|
-
"jsc": {
|
22
|
-
"parser": {
|
23
|
-
"syntax": "typescript",
|
24
|
-
"tsx": true,
|
25
|
-
"decorators": false,
|
26
|
-
"dynamicImport": false
|
27
|
-
},
|
28
|
-
"target": "es2019",
|
29
|
-
"externalHelpers": true
|
30
|
-
},
|
31
|
-
"minify": false,
|
32
|
-
"sourceMaps": true
|
33
|
-
}
|