Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fluentui/react-label

Package Overview
Dependencies
Maintainers
13
Versions
883
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/react-label - npm Package Compare versions

Comparing version 0.0.0-nightly0e0cf06c3420211029.1 to 0.0.0-nightly57a9843f2620211119.1

87

CHANGELOG.json

@@ -5,5 +5,5 @@ {

{
"date": "Fri, 29 Oct 2021 06:39:51 GMT",
"tag": "@fluentui/react-label_v0.0.0-nightly0e0cf06c3420211029.1",
"version": "0.0.0-nightly0e0cf06c3420211029.1",
"date": "Fri, 19 Nov 2021 04:18:54 GMT",
"tag": "@fluentui/react-label_v0.0.0-nightly57a9843f2620211119.1",
"version": "0.0.0-nightly57a9843f2620211119.1",
"comments": {

@@ -14,3 +14,3 @@ "prerelease": [

"package": "@fluentui/react-label",
"commit": "3535f78f7af73f13f2c1e7470293fb5e592866de",
"commit": "e6017db01058700b10f0f2b6b36ef51efb28b9b9",
"comment": "Release nightly v9"

@@ -21,4 +21,4 @@ },

"package": "@fluentui/react-label",
"comment": "Bump @fluentui/react-make-styles to v0.0.0-nightly0e0cf06c3420211029.1",
"commit": "3535f78f7af73f13f2c1e7470293fb5e592866de"
"comment": "Bump @fluentui/react-make-styles to v0.0.0-nightly57a9843f2620211119.1",
"commit": "e6017db01058700b10f0f2b6b36ef51efb28b9b9"
},

@@ -28,4 +28,4 @@ {

"package": "@fluentui/react-label",
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly0e0cf06c3420211029.1",
"commit": "3535f78f7af73f13f2c1e7470293fb5e592866de"
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly57a9843f2620211119.1",
"commit": "e6017db01058700b10f0f2b6b36ef51efb28b9b9"
},

@@ -35,4 +35,4 @@ {

"package": "@fluentui/react-label",
"comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightly0e0cf06c3420211029.1",
"commit": "3535f78f7af73f13f2c1e7470293fb5e592866de"
"comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightly57a9843f2620211119.1",
"commit": "e6017db01058700b10f0f2b6b36ef51efb28b9b9"
},

@@ -42,4 +42,4 @@ {

"package": "@fluentui/react-label",
"comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightly0e0cf06c3420211029.1",
"commit": "3535f78f7af73f13f2c1e7470293fb5e592866de"
"comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightly57a9843f2620211119.1",
"commit": "e6017db01058700b10f0f2b6b36ef51efb28b9b9"
},

@@ -49,6 +49,13 @@ {

"package": "@fluentui/react-label",
"comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightly0e0cf06c3420211029.1",
"commit": "3535f78f7af73f13f2c1e7470293fb5e592866de"
"comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightly57a9843f2620211119.1",
"commit": "e6017db01058700b10f0f2b6b36ef51efb28b9b9"
}
],
]
}
},
{
"date": "Fri, 12 Nov 2021 13:25:25 GMT",
"tag": "@fluentui/react-label_v9.0.0-beta.3",
"version": "9.0.0-beta.3",
"comments": {
"none": [

@@ -60,3 +67,53 @@ {

"comment": "chore(Label): Rework documentation to desired format"
},
{
"author": "lingfangao@hotmail.com",
"package": "@fluentui/react-label",
"commit": "00f70581480b536e723fb69edf0ae617beac4807",
"comment": "Remove beta release tag"
}
],
"prerelease": [
{
"author": "gcox@microsoft.com",
"package": "@fluentui/react-label",
"commit": "c9bd5b5a02ae94a8239ce1b56cac2f0d0dbd3586",
"comment": "Updated beta and RC components to ES2019"
},
{
"author": "olfedias@microsoft.com",
"package": "@fluentui/react-label",
"commit": "9186578324773f95f4d61be3d70e67752159d843",
"comment": "export static classes for components"
},
{
"author": "beachball",
"package": "@fluentui/react-label",
"comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.3",
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
},
{
"author": "beachball",
"package": "@fluentui/react-label",
"comment": "Bump @fluentui/react-utilities to v9.0.0-beta.3",
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
},
{
"author": "beachball",
"package": "@fluentui/react-label",
"comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.3",
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
},
{
"author": "beachball",
"package": "@fluentui/react-label",
"comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3",
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
},
{
"author": "beachball",
"package": "@fluentui/react-label",
"comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.3",
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
}
]

@@ -63,0 +120,0 @@ }

35

CHANGELOG.md
# Change Log - @fluentui/react-label
This log was last generated on Fri, 29 Oct 2021 06:39:51 GMT and should not be manually modified.
This log was last generated on Fri, 19 Nov 2021 04:18:54 GMT and should not be manually modified.
<!-- Start content -->
## [0.0.0-nightly0e0cf06c3420211029.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightly0e0cf06c3420211029.1)
## [0.0.0-nightly57a9843f2620211119.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightly57a9843f2620211119.1)
Fri, 29 Oct 2021 06:39:51 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.2..@fluentui/react-label_v0.0.0-nightly0e0cf06c3420211029.1)
Fri, 19 Nov 2021 04:18:54 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.3..@fluentui/react-label_v0.0.0-nightly57a9843f2620211119.1)
### Changes
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by email not defined)
- Bump @fluentui/react-make-styles to v0.0.0-nightly0e0cf06c3420211029.1 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by beachball)
- Bump @fluentui/react-utilities to v0.0.0-nightly0e0cf06c3420211029.1 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by beachball)
- Bump @fluentui/babel-make-styles to v0.0.0-nightly0e0cf06c3420211029.1 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by beachball)
- Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightly0e0cf06c3420211029.1 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by beachball)
- Bump @fluentui/react-conformance-make-styles to v0.0.0-nightly0e0cf06c3420211029.1 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by beachball)
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/e6017db01058700b10f0f2b6b36ef51efb28b9b9) by email not defined)
- Bump @fluentui/react-make-styles to v0.0.0-nightly57a9843f2620211119.1 ([commit](https://github.com/microsoft/fluentui/commit/e6017db01058700b10f0f2b6b36ef51efb28b9b9) by beachball)
- Bump @fluentui/react-utilities to v0.0.0-nightly57a9843f2620211119.1 ([commit](https://github.com/microsoft/fluentui/commit/e6017db01058700b10f0f2b6b36ef51efb28b9b9) by beachball)
- Bump @fluentui/babel-make-styles to v0.0.0-nightly57a9843f2620211119.1 ([commit](https://github.com/microsoft/fluentui/commit/e6017db01058700b10f0f2b6b36ef51efb28b9b9) by beachball)
- Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightly57a9843f2620211119.1 ([commit](https://github.com/microsoft/fluentui/commit/e6017db01058700b10f0f2b6b36ef51efb28b9b9) by beachball)
- Bump @fluentui/react-conformance-make-styles to v0.0.0-nightly57a9843f2620211119.1 ([commit](https://github.com/microsoft/fluentui/commit/e6017db01058700b10f0f2b6b36ef51efb28b9b9) by beachball)
## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-beta.3)
Fri, 12 Nov 2021 13:25:25 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.2..@fluentui/react-label_v9.0.0-beta.3)
### Changes
- Updated beta and RC components to ES2019 ([PR #20405](https://github.com/microsoft/fluentui/pull/20405) by gcox@microsoft.com)
- export static classes for components ([PR #20456](https://github.com/microsoft/fluentui/pull/20456) by olfedias@microsoft.com)
- Bump @fluentui/react-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
- Bump @fluentui/react-utilities to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
- Bump @fluentui/babel-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
- Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
- Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-beta.2)

@@ -22,0 +37,0 @@

@@ -13,2 +13,4 @@ import type { ComponentProps } from '@fluentui/react-utilities';

export declare const labelClassName = "fui-Label";
/**

@@ -15,0 +17,0 @@ * Label Props

@@ -8,8 +8,8 @@ "use strict";

var react_conformance_1 = /*#__PURE__*/require("@fluentui/react-conformance");
const react_conformance_1 = /*#__PURE__*/require("@fluentui/react-conformance");
var react_conformance_make_styles_1 = /*#__PURE__*/require("@fluentui/react-conformance-make-styles");
const react_conformance_make_styles_1 = /*#__PURE__*/require("@fluentui/react-conformance-make-styles");
function isConformant(testInfo) {
var defaultOptions = {
const defaultOptions = {
asPropHandlesRef: true,

@@ -16,0 +16,0 @@ componentPath: module.parent.filename.replace('.test', ''),

@@ -7,3 +7,3 @@ "use strict";

var tslib_1 = /*#__PURE__*/require("tslib");
const tslib_1 = /*#__PURE__*/require("tslib");

@@ -10,0 +10,0 @@ tslib_1.__exportStar(require("./Label"), exports);

@@ -8,9 +8,9 @@ "use strict";

var React = /*#__PURE__*/require("react");
const React = /*#__PURE__*/require("react");
var useLabel_1 = /*#__PURE__*/require("./useLabel");
const useLabel_1 = /*#__PURE__*/require("./useLabel");
var renderLabel_1 = /*#__PURE__*/require("./renderLabel");
const renderLabel_1 = /*#__PURE__*/require("./renderLabel");
var useLabelStyles_1 = /*#__PURE__*/require("./useLabelStyles");
const useLabelStyles_1 = /*#__PURE__*/require("./useLabelStyles");
/**

@@ -21,4 +21,4 @@ * A label component provides a title or name to a component.

exports.Label = /*#__PURE__*/React.forwardRef(function (props, ref) {
var state = useLabel_1.useLabel(props, ref);
exports.Label = /*#__PURE__*/React.forwardRef((props, ref) => {
const state = useLabel_1.useLabel(props, ref);
useLabelStyles_1.useLabelStyles(state);

@@ -25,0 +25,0 @@ return renderLabel_1.renderLabel(state);

@@ -8,9 +8,7 @@ "use strict";

var tslib_1 = /*#__PURE__*/require("tslib");
const React = /*#__PURE__*/require("react");
var React = /*#__PURE__*/require("react");
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
var useLabel_1 = /*#__PURE__*/require("./useLabel");
const useLabel_1 = /*#__PURE__*/require("./useLabel");
/**

@@ -21,8 +19,8 @@ * Render the final JSX of Label

var renderLabel = function (state) {
var _a = react_utilities_1.getSlots(state, useLabel_1.labelShorthandProps),
slots = _a.slots,
slotProps = _a.slotProps;
return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root), state.root.children, React.createElement(slots.required, tslib_1.__assign({}, slotProps.required)));
const renderLabel = state => {
const {
slots,
slotProps
} = react_utilities_1.getSlots(state, useLabel_1.labelShorthandProps);
return React.createElement(slots.root, Object.assign({}, slotProps.root), state.root.children, React.createElement(slots.required, Object.assign({}, slotProps.required)));
};

@@ -29,0 +27,0 @@

@@ -8,7 +8,5 @@ "use strict";

var tslib_1 = /*#__PURE__*/require("tslib");
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
var react_utilities_2 = /*#__PURE__*/require("@fluentui/react-utilities");
const react_utilities_2 = /*#__PURE__*/require("@fluentui/react-utilities");
/**

@@ -31,13 +29,11 @@ * Array of all shorthand properties listed in LabelShorthandProps

var useLabel = function (props, ref) {
var _a = props.disabled,
disabled = _a === void 0 ? false : _a,
_b = props.required,
required = _b === void 0 ? false : _b,
_c = props.strong,
strong = _c === void 0 ? false : _c,
_d = props.size,
size = _d === void 0 ? 'medium' : _d;
const useLabel = (props, ref) => {
const {
disabled = false,
required = false,
strong = false,
size = 'medium'
} = props;
return {
disabled: disabled,
disabled,
required: react_utilities_2.resolveShorthand(required === false ? null : required, {

@@ -49,4 +45,4 @@ required: !!required,

}),
strong: strong,
size: size,
strong,
size,
components: {

@@ -56,5 +52,6 @@ root: 'label',

},
root: react_utilities_1.getNativeElementProps('label', tslib_1.__assign({
ref: ref
}, props))
root: react_utilities_1.getNativeElementProps('label', {
ref,
...props
})
};

@@ -61,0 +58,0 @@ };

import type { LabelState } from './Label.types';
export declare const labelClassName = "fui-Label";
/**

@@ -3,0 +4,0 @@ * Apply styling to the Label slots based on the state

@@ -6,5 +6,7 @@ "use strict";

});
exports.useLabelStyles = void 0;
exports.useLabelStyles = exports.labelClassName = void 0;
var react_make_styles_1 = /*#__PURE__*/require("@fluentui/react-make-styles");
const react_make_styles_1 = /*#__PURE__*/require("@fluentui/react-make-styles");
exports.labelClassName = 'fui-Label';
/**

@@ -14,4 +16,3 @@ * Styles for the label

var useStyles = /*#__PURE__*/react_make_styles_1.__styles({
const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
"root": {

@@ -52,5 +53,5 @@ "Bahqtrf": "fk6fouc",

var useLabelStyles = function (state) {
var styles = useStyles();
state.root.className = react_make_styles_1.mergeClasses(styles.root, state.disabled && styles.disabled, styles[state.size], state.strong && styles.strong, state.root.className);
const useLabelStyles = state => {
const styles = useStyles();
state.root.className = react_make_styles_1.mergeClasses(exports.labelClassName, styles.root, state.disabled && styles.disabled, styles[state.size], state.strong && styles.strong, state.root.className);

@@ -57,0 +58,0 @@ if (state.required) {

@@ -7,5 +7,5 @@ "use strict";

var tslib_1 = /*#__PURE__*/require("tslib");
const tslib_1 = /*#__PURE__*/require("tslib");
tslib_1.__exportStar(require("./Label"), exports);
//# sourceMappingURL=index.js.map

@@ -7,5 +7,5 @@ "use strict";

var tslib_1 = /*#__PURE__*/require("tslib");
const tslib_1 = /*#__PURE__*/require("tslib");
tslib_1.__exportStar(require("./components/Label/index"), exports);
//# sourceMappingURL=Label.js.map
import { isConformant as baseIsConformant } from '@fluentui/react-conformance';
import makeStylesTests from '@fluentui/react-conformance-make-styles';
export function isConformant(testInfo) {
var defaultOptions = {
const defaultOptions = {
asPropHandlesRef: true,

@@ -6,0 +6,0 @@ componentPath: module.parent.filename.replace('.test', ''),

@@ -9,4 +9,4 @@ import * as React from 'react';

export var Label = /*#__PURE__*/React.forwardRef(function (props, ref) {
var state = useLabel(props, ref);
export const Label = /*#__PURE__*/React.forwardRef((props, ref) => {
const state = useLabel(props, ref);
useLabelStyles(state);

@@ -13,0 +13,0 @@ return renderLabel(state);

@@ -1,2 +0,1 @@

import { __assign } from "tslib";
import * as React from 'react';

@@ -9,9 +8,9 @@ import { getSlots } from '@fluentui/react-utilities';

export var renderLabel = function (state) {
var _a = getSlots(state, labelShorthandProps),
slots = _a.slots,
slotProps = _a.slotProps;
return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root), state.root.children, /*#__PURE__*/React.createElement(slots.required, __assign({}, slotProps.required)));
export const renderLabel = state => {
const {
slots,
slotProps
} = getSlots(state, labelShorthandProps);
return /*#__PURE__*/React.createElement(slots.root, Object.assign({}, slotProps.root), state.root.children, /*#__PURE__*/React.createElement(slots.required, Object.assign({}, slotProps.required)));
};
//# sourceMappingURL=renderLabel.js.map

@@ -1,2 +0,1 @@

import { __assign } from "tslib";
import { getNativeElementProps } from '@fluentui/react-utilities';

@@ -9,3 +8,3 @@ import { resolveShorthand } from '@fluentui/react-utilities';

export var labelShorthandProps = ['root', 'required'];
export const labelShorthandProps = ['root', 'required'];
/**

@@ -21,13 +20,11 @@ * Create the state required to render Label.

export var useLabel = function (props, ref) {
var _a = props.disabled,
disabled = _a === void 0 ? false : _a,
_b = props.required,
required = _b === void 0 ? false : _b,
_c = props.strong,
strong = _c === void 0 ? false : _c,
_d = props.size,
size = _d === void 0 ? 'medium' : _d;
export const useLabel = (props, ref) => {
const {
disabled = false,
required = false,
strong = false,
size = 'medium'
} = props;
return {
disabled: disabled,
disabled,
required: resolveShorthand(required === false ? null : required, {

@@ -39,4 +36,4 @@ required: !!required,

}),
strong: strong,
size: size,
strong,
size,
components: {

@@ -46,7 +43,8 @@ root: 'label',

},
root: getNativeElementProps('label', __assign({
ref: ref
}, props))
root: getNativeElementProps('label', {
ref,
...props
})
};
};
//# sourceMappingURL=useLabel.js.map
import type { LabelState } from './Label.types';
export declare const labelClassName = "fui-Label";
/**

@@ -3,0 +4,0 @@ * Apply styling to the Label slots based on the state

import { __styles, mergeClasses } from '@fluentui/react-make-styles';
export const labelClassName = 'fui-Label';
/**

@@ -6,3 +7,3 @@ * Styles for the label

var useStyles = /*#__PURE__*/__styles({
const useStyles = /*#__PURE__*/__styles({
"root": {

@@ -43,5 +44,5 @@ "Bahqtrf": "fk6fouc",

export var useLabelStyles = function (state) {
var styles = useStyles();
state.root.className = mergeClasses(styles.root, state.disabled && styles.disabled, styles[state.size], state.strong && styles.strong, state.root.className);
export const useLabelStyles = state => {
const styles = useStyles();
state.root.className = mergeClasses(labelClassName, styles.root, state.disabled && styles.disabled, styles[state.size], state.strong && styles.strong, state.root.className);

@@ -48,0 +49,0 @@ if (state.required) {

{
"name": "@fluentui/react-label",
"version": "0.0.0-nightly0e0cf06c3420211029.1",
"version": "0.0.0-nightly57a9843f2620211119.1",
"description": "Label component for FluentUI library.",

@@ -28,7 +28,7 @@ "main": "lib-commonjs/index.js",

"devDependencies": {
"@fluentui/babel-make-styles": "0.0.0-nightly0e0cf06c3420211029.1",
"@fluentui/babel-make-styles": "0.0.0-nightly57a9843f2620211119.1",
"@fluentui/eslint-plugin": "*",
"@fluentui/jest-serializer-make-styles": "0.0.0-nightly0e0cf06c3420211029.1",
"@fluentui/jest-serializer-make-styles": "0.0.0-nightly57a9843f2620211119.1",
"@fluentui/react-conformance": "*",
"@fluentui/react-conformance-make-styles": "0.0.0-nightly0e0cf06c3420211029.1",
"@fluentui/react-conformance-make-styles": "0.0.0-nightly57a9843f2620211119.1",
"@fluentui/scripts": "^1.0.0",

@@ -47,4 +47,4 @@ "@types/enzyme": "3.10.3",

"dependencies": {
"@fluentui/react-make-styles": "0.0.0-nightly0e0cf06c3420211029.1",
"@fluentui/react-utilities": "0.0.0-nightly0e0cf06c3420211029.1",
"@fluentui/react-make-styles": "0.0.0-nightly57a9843f2620211119.1",
"@fluentui/react-utilities": "0.0.0-nightly57a9843f2620211119.1",
"tslib": "^2.1.0"

@@ -59,3 +59,2 @@ },

"beachball": {
"tag": "beta",
"disallowedChangeTypes": [

@@ -62,0 +61,0 @@ "major",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc