@fluentui/react-label
Advanced tools
Comparing version 0.0.0-nightlyebf02572f720211207.1 to 0.0.0-nightlyecca467a8920220110.1
@@ -5,5 +5,5 @@ { | ||
{ | ||
"date": "Tue, 07 Dec 2021 04:14:33 GMT", | ||
"tag": "@fluentui/react-label_v0.0.0-nightlyebf02572f720211207.1", | ||
"version": "0.0.0-nightlyebf02572f720211207.1", | ||
"date": "Mon, 10 Jan 2022 04:15:27 GMT", | ||
"tag": "@fluentui/react-label_v0.0.0-nightlyecca467a8920220110.1", | ||
"version": "0.0.0-nightlyecca467a8920220110.1", | ||
"comments": { | ||
@@ -14,10 +14,16 @@ "prerelease": [ | ||
"package": "@fluentui/react-label", | ||
"commit": "2523b8c9da23ec860780244563814b63ba963043", | ||
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814", | ||
"comment": "Release nightly v9" | ||
}, | ||
{ | ||
"author": "Humberto.Morimoto@microsoft.com", | ||
"package": "@fluentui/react-label", | ||
"commit": "a052fbc9204600669d32b0ac346032d2cd8d9204", | ||
"comment": "react-label: Replacing use of functions in makeStyles with direct use of tokens." | ||
}, | ||
{ | ||
"author": "beachball", | ||
"package": "@fluentui/react-label", | ||
"comment": "Bump @fluentui/react-make-styles to v0.0.0-nightlyebf02572f720211207.1", | ||
"commit": "2523b8c9da23ec860780244563814b63ba963043" | ||
"comment": "Bump @fluentui/react-make-styles to v0.0.0-nightlyecca467a8920220110.1", | ||
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814" | ||
}, | ||
@@ -27,4 +33,4 @@ { | ||
"package": "@fluentui/react-label", | ||
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightlyebf02572f720211207.1", | ||
"commit": "2523b8c9da23ec860780244563814b63ba963043" | ||
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightlyecca467a8920220110.1", | ||
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814" | ||
}, | ||
@@ -34,4 +40,4 @@ { | ||
"package": "@fluentui/react-label", | ||
"comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightlyebf02572f720211207.1", | ||
"commit": "2523b8c9da23ec860780244563814b63ba963043" | ||
"comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightlyecca467a8920220110.1", | ||
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814" | ||
}, | ||
@@ -41,4 +47,4 @@ { | ||
"package": "@fluentui/react-label", | ||
"comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlyebf02572f720211207.1", | ||
"commit": "2523b8c9da23ec860780244563814b63ba963043" | ||
"comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlyecca467a8920220110.1", | ||
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814" | ||
}, | ||
@@ -48,4 +54,4 @@ { | ||
"package": "@fluentui/react-label", | ||
"comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlyebf02572f720211207.1", | ||
"commit": "2523b8c9da23ec860780244563814b63ba963043" | ||
"comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlyecca467a8920220110.1", | ||
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814" | ||
} | ||
@@ -55,2 +61,8 @@ ], | ||
{ | ||
"author": "elcraig@microsoft.com", | ||
"package": "@fluentui/react-label", | ||
"commit": "d892c7f79c543b6008634ecd669b75b5108cad46", | ||
"comment": "Relocate comment about props to the correct type, and update spec to accurately reflect props" | ||
}, | ||
{ | ||
"author": "andredias@microsoft.com", | ||
@@ -57,0 +69,0 @@ "package": "@fluentui/react-label", |
# Change Log - @fluentui/react-label | ||
This log was last generated on Tue, 07 Dec 2021 04:14:33 GMT and should not be manually modified. | ||
This log was last generated on Mon, 10 Jan 2022 04:15:27 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## [0.0.0-nightlyebf02572f720211207.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightlyebf02572f720211207.1) | ||
## [0.0.0-nightlyecca467a8920220110.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightlyecca467a8920220110.1) | ||
Tue, 07 Dec 2021 04:14:33 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.4..@fluentui/react-label_v0.0.0-nightlyebf02572f720211207.1) | ||
Mon, 10 Jan 2022 04:15:27 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.4..@fluentui/react-label_v0.0.0-nightlyecca467a8920220110.1) | ||
### Changes | ||
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/2523b8c9da23ec860780244563814b63ba963043) by email not defined) | ||
- Bump @fluentui/react-make-styles to v0.0.0-nightlyebf02572f720211207.1 ([commit](https://github.com/microsoft/fluentui/commit/2523b8c9da23ec860780244563814b63ba963043) by beachball) | ||
- Bump @fluentui/react-utilities to v0.0.0-nightlyebf02572f720211207.1 ([commit](https://github.com/microsoft/fluentui/commit/2523b8c9da23ec860780244563814b63ba963043) by beachball) | ||
- Bump @fluentui/babel-make-styles to v0.0.0-nightlyebf02572f720211207.1 ([commit](https://github.com/microsoft/fluentui/commit/2523b8c9da23ec860780244563814b63ba963043) by beachball) | ||
- Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlyebf02572f720211207.1 ([commit](https://github.com/microsoft/fluentui/commit/2523b8c9da23ec860780244563814b63ba963043) by beachball) | ||
- Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlyebf02572f720211207.1 ([commit](https://github.com/microsoft/fluentui/commit/2523b8c9da23ec860780244563814b63ba963043) by beachball) | ||
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by email not defined) | ||
- react-label: Replacing use of functions in makeStyles with direct use of tokens. ([PR #21046](https://github.com/microsoft/fluentui/pull/21046) by Humberto.Morimoto@microsoft.com) | ||
- Bump @fluentui/react-make-styles to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball) | ||
- Bump @fluentui/react-utilities to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball) | ||
- Bump @fluentui/babel-make-styles to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball) | ||
- Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball) | ||
- Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball) | ||
@@ -21,0 +22,0 @@ ## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-beta.4) |
@@ -15,5 +15,2 @@ import type { ComponentProps } from '@fluentui/react-utilities'; | ||
/** | ||
* Label Props | ||
*/ | ||
export declare type LabelCommons = { | ||
@@ -37,2 +34,5 @@ /** | ||
/** | ||
* Label Props | ||
*/ | ||
export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & { | ||
@@ -39,0 +39,0 @@ /** |
import type { ComponentProps, ComponentState, IntrinsicShorthandProps, ObjectShorthandProps } from '@fluentui/react-utilities'; | ||
import * as React from 'react'; | ||
/** | ||
* Label Props | ||
*/ | ||
export declare type LabelCommons = { | ||
@@ -31,2 +28,5 @@ /** | ||
export declare type LabelState = ComponentState<LabelSlots> & LabelCommons; | ||
/** | ||
* Label Props | ||
*/ | ||
export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & { | ||
@@ -33,0 +33,0 @@ /** |
@@ -23,3 +23,5 @@ "use strict"; | ||
} = 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))); | ||
return React.createElement(slots.root, { ...slotProps.root | ||
}, state.root.children, React.createElement(slots.required, { ...slotProps.required | ||
})); | ||
}; | ||
@@ -26,0 +28,0 @@ |
@@ -10,2 +10,4 @@ "use strict"; | ||
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme"); | ||
exports.labelClassName = 'fui-Label'; | ||
@@ -12,0 +14,0 @@ /** |
import type { ComponentProps, ComponentState, IntrinsicShorthandProps, ObjectShorthandProps } from '@fluentui/react-utilities'; | ||
import * as React from 'react'; | ||
/** | ||
* Label Props | ||
*/ | ||
export declare type LabelCommons = { | ||
@@ -31,2 +28,5 @@ /** | ||
export declare type LabelState = ComponentState<LabelSlots> & LabelCommons; | ||
/** | ||
* Label Props | ||
*/ | ||
export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & { | ||
@@ -33,0 +33,0 @@ /** |
@@ -13,4 +13,6 @@ import * as React from 'react'; | ||
} = 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))); | ||
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root | ||
}, state.root.children, /*#__PURE__*/React.createElement(slots.required, { ...slotProps.required | ||
})); | ||
}; | ||
//# sourceMappingURL=renderLabel.js.map |
import { __styles, mergeClasses } from '@fluentui/react-make-styles'; | ||
import { tokens } from '@fluentui/react-theme'; | ||
export const labelClassName = 'fui-Label'; | ||
@@ -3,0 +4,0 @@ /** |
{ | ||
"name": "@fluentui/react-label", | ||
"version": "0.0.0-nightlyebf02572f720211207.1", | ||
"version": "0.0.0-nightlyecca467a8920220110.1", | ||
"description": "Label component for FluentUI library.", | ||
@@ -29,7 +29,7 @@ "main": "lib-commonjs/index.js", | ||
"devDependencies": { | ||
"@fluentui/babel-make-styles": "0.0.0-nightlyebf02572f720211207.1", | ||
"@fluentui/babel-make-styles": "0.0.0-nightlyecca467a8920220110.1", | ||
"@fluentui/eslint-plugin": "*", | ||
"@fluentui/jest-serializer-make-styles": "0.0.0-nightlyebf02572f720211207.1", | ||
"@fluentui/jest-serializer-make-styles": "0.0.0-nightlyecca467a8920220110.1", | ||
"@fluentui/react-conformance": "*", | ||
"@fluentui/react-conformance-make-styles": "0.0.0-nightlyebf02572f720211207.1", | ||
"@fluentui/react-conformance-make-styles": "0.0.0-nightlyecca467a8920220110.1", | ||
"@fluentui/scripts": "^1.0.0", | ||
@@ -48,4 +48,4 @@ "@types/enzyme": "3.10.3", | ||
"dependencies": { | ||
"@fluentui/react-make-styles": "0.0.0-nightlyebf02572f720211207.1", | ||
"@fluentui/react-utilities": "0.0.0-nightlyebf02572f720211207.1", | ||
"@fluentui/react-make-styles": "0.0.0-nightlyecca467a8920220110.1", | ||
"@fluentui/react-utilities": "0.0.0-nightlyecca467a8920220110.1", | ||
"tslib": "^2.1.0" | ||
@@ -52,0 +52,0 @@ }, |
73
Spec.md
@@ -78,51 +78,44 @@ # @fluentui/react-label Spec | ||
```ts | ||
/** | ||
* Label Props | ||
*/ | ||
export type LabelProps = ComponentProps & | ||
React.LabelHTMLAttributes<HTMLElement> & { | ||
/** | ||
* Renders the label as disabled | ||
* @defaultvalue false | ||
*/ | ||
disabled?: boolean; | ||
export type LabelCommons = { | ||
/** | ||
* Renders the label as disabled | ||
* @defaultvalue false | ||
*/ | ||
disabled: boolean; | ||
/** | ||
* Whether the associated form field is required or not. If true it will be an asterisk, otherwise it will be what is provided. | ||
* @defaultvalue false | ||
*/ | ||
required?: boolean | ShorthandProps<ComponentProps>; | ||
/** | ||
* A label supports different sizes. | ||
* @defaultvalue 'medium' | ||
*/ | ||
size: 'small' | 'medium' | 'large'; | ||
/** | ||
* A label supports different font sizes, see tokens for reference. | ||
* @defaultvalue 'medium' | ||
*/ | ||
size?: 'small' | 'medium' | 'large'; | ||
/** | ||
* A label supports semibold/strong fontweight. | ||
* @defaultvalue false | ||
*/ | ||
strong: boolean; | ||
}; | ||
/** | ||
* A label supports semibold/strong fontweight. When size is set to large, label strong will be set by default. | ||
* @defaultvalue false | ||
*/ | ||
strong?: boolean; | ||
}; | ||
export type LabelSlots = { | ||
root: IntrinsicShorthandProps<'label'>; | ||
required?: IntrinsicShorthandProps<'span'>; | ||
}; | ||
/** | ||
* Names of the shorthand properties in LabelProps | ||
* State used in rendering Label | ||
*/ | ||
export type LabelShorthandProps = 'required'; | ||
export type LabelState = ComponentState<LabelSlots> & LabelCommons; | ||
/** | ||
* Names of LabelProps that have a default value in useLabel | ||
* Label Props | ||
*/ | ||
export type LabelDefaultedProps = never; | ||
/** | ||
* State used in rendering Label | ||
*/ | ||
export type LabelState = ComponentState<LabelProps, LabelShorthandProps, LabelDefaultedProps> & { | ||
/** | ||
* Ref to the root element | ||
*/ | ||
ref: React.Ref<HTMLElement>; | ||
}; | ||
export type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & | ||
Partial<LabelCommons> & { | ||
/** | ||
* Displays and indicator that the label is for a required field. The required prop can be set to true to display | ||
* an asterisk (*). Or it can be set to a string or jsx content to display a different indicator. | ||
* @defaultvalue false | ||
*/ | ||
required?: boolean | ObjectShorthandProps<React.HTMLAttributes<HTMLElement>> | React.ReactNode; | ||
}; | ||
``` | ||
@@ -129,0 +122,0 @@ |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
129322
2209
107389
+ Added@fluentui/keyboard-keys@0.0.0-nightlyecca467a8920220110.1(transitive)
+ Added@fluentui/make-styles@0.0.0-nightlyecca467a8920220110.1(transitive)
+ Added@fluentui/react-make-styles@0.0.0-nightlyecca467a8920220110.1(transitive)
+ Added@fluentui/react-shared-contexts@0.0.0-nightlyecca467a8920220110.1(transitive)
+ Added@fluentui/react-theme@0.0.0-nightlyecca467a8920220110.1(transitive)
+ Added@fluentui/react-utilities@0.0.0-nightlyecca467a8920220110.1(transitive)
- Removed@fluentui/keyboard-keys@0.0.0-nightlyebf02572f720211207.1(transitive)
- Removed@fluentui/make-styles@0.0.0-nightlyebf02572f720211207.1(transitive)
- Removed@fluentui/react-make-styles@0.0.0-nightlyebf02572f720211207.1(transitive)
- Removed@fluentui/react-shared-contexts@0.0.0-nightlyebf02572f720211207.1(transitive)
- Removed@fluentui/react-theme@0.0.0-nightlyebf02572f720211207.1(transitive)
- Removed@fluentui/react-utilities@0.0.0-nightlyebf02572f720211207.1(transitive)
- Removedinline-style-expand-shorthand@1.6.0(transitive)
Updated@fluentui/react-make-styles@0.0.0-nightlyecca467a8920220110.1
Updated@fluentui/react-utilities@0.0.0-nightlyecca467a8920220110.1