@fluentui/react-label 0.0.0-nightlyff78d1e27a20220217.1 → 0.0.0
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 +405 -10
- package/CHANGELOG.md +192 -62
- package/MIGRATION.md +19 -6
- package/README.md +27 -5
- package/Spec.md +27 -67
- package/dist/{react-label.d.ts → index.d.ts} +19 -21
- package/{lib → dist}/tsdoc-metadata.json +0 -0
- package/lib/components/Label/Label.js.map +1 -1
- package/lib/components/Label/Label.types.js.map +1 -1
- package/lib/components/Label/renderLabel.js.map +1 -1
- package/lib/components/Label/useLabel.js +2 -2
- package/lib/components/Label/useLabel.js.map +1 -1
- package/lib/components/Label/useLabelStyles.js +10 -4
- package/lib/components/Label/useLabelStyles.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/components/Label/Label.js.map +1 -1
- package/lib-commonjs/components/Label/renderLabel.js.map +1 -1
- package/lib-commonjs/components/Label/useLabel.js +2 -2
- package/lib-commonjs/components/Label/useLabel.js.map +1 -1
- package/lib-commonjs/components/Label/useLabelStyles.js +11 -5
- package/lib-commonjs/components/Label/useLabelStyles.js.map +1 -1
- package/lib-commonjs/index.js +32 -2
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +17 -21
- package/lib/Label.d.ts +0 -1
- package/lib/components/Label/Label.d.ts +0 -6
- package/lib/components/Label/Label.types.d.ts +0 -38
- package/lib/components/Label/index.d.ts +0 -5
- package/lib/components/Label/renderLabel.d.ts +0 -5
- package/lib/components/Label/useLabel.d.ts +0 -12
- package/lib/components/Label/useLabelStyles.d.ts +0 -6
- package/lib/index.d.ts +0 -2
- package/lib-commonjs/Label.d.ts +0 -1
- package/lib-commonjs/components/Label/Label.d.ts +0 -6
- package/lib-commonjs/components/Label/Label.types.d.ts +0 -38
- package/lib-commonjs/components/Label/index.d.ts +0 -5
- package/lib-commonjs/components/Label/renderLabel.d.ts +0 -5
- package/lib-commonjs/components/Label/useLabel.d.ts +0 -12
- package/lib-commonjs/components/Label/useLabelStyles.d.ts +0 -6
- package/lib-commonjs/index.d.ts +0 -2
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-label",
|
3
|
-
"version": "0.0.0
|
3
|
+
"version": "0.0.0",
|
4
4
|
"description": "Fluent UI React Label component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
7
|
-
"typings": "
|
7
|
+
"typings": "dist/index.d.ts",
|
8
8
|
"sideEffects": false,
|
9
9
|
"repository": {
|
10
10
|
"type": "git",
|
@@ -21,29 +21,20 @@
|
|
21
21
|
"start": "yarn storybook",
|
22
22
|
"test": "jest --passWithNoTests",
|
23
23
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
24
|
-
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node
|
25
|
-
"storybook": "node
|
24
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/packages/react-components/react-label/src && yarn docs",
|
25
|
+
"storybook": "node ../../../scripts/storybook/runner",
|
26
26
|
"type-check": "tsc -b tsconfig.json"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
30
30
|
"@fluentui/react-conformance": "*",
|
31
|
-
"@fluentui/react-conformance-griffel": "0.0.0-
|
32
|
-
"@fluentui/scripts": "^1.0.0"
|
33
|
-
"@types/enzyme": "3.10.3",
|
34
|
-
"@types/enzyme-adapter-react-16": "1.0.3",
|
35
|
-
"@types/react": "16.9.42",
|
36
|
-
"@types/react-dom": "16.9.10",
|
37
|
-
"@types/react-test-renderer": "^16.0.0",
|
38
|
-
"enzyme": "~3.10.0",
|
39
|
-
"enzyme-adapter-react-16": "^1.15.0",
|
40
|
-
"react": "16.8.6",
|
41
|
-
"react-dom": "16.8.6",
|
42
|
-
"react-test-renderer": "^16.3.0"
|
31
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20220628-0417.1",
|
32
|
+
"@fluentui/scripts": "^1.0.0"
|
43
33
|
},
|
44
34
|
"dependencies": {
|
45
|
-
"@fluentui/react-
|
46
|
-
"@
|
35
|
+
"@fluentui/react-theme": "^0.0.0",
|
36
|
+
"@fluentui/react-utilities": "^0.0.0",
|
37
|
+
"@griffel/react": "1.2.0",
|
47
38
|
"tslib": "^2.1.0"
|
48
39
|
},
|
49
40
|
"peerDependencies": {
|
@@ -54,9 +45,14 @@
|
|
54
45
|
},
|
55
46
|
"beachball": {
|
56
47
|
"disallowedChangeTypes": [
|
57
|
-
"major"
|
58
|
-
"minor",
|
59
|
-
"patch"
|
48
|
+
"major"
|
60
49
|
]
|
50
|
+
},
|
51
|
+
"exports": {
|
52
|
+
".": {
|
53
|
+
"types": "./lib/index.d.ts",
|
54
|
+
"import": "./lib/index.js",
|
55
|
+
"require": "./lib-commonjs/index.js"
|
56
|
+
}
|
61
57
|
}
|
62
58
|
}
|
package/lib/Label.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/Label/index';
|
@@ -1,38 +0,0 @@
|
|
1
|
-
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
2
|
-
declare type LabelCommons = {
|
3
|
-
/**
|
4
|
-
* Renders the label as disabled
|
5
|
-
* @defaultvalue false
|
6
|
-
*/
|
7
|
-
disabled: boolean;
|
8
|
-
/**
|
9
|
-
* A label supports different sizes.
|
10
|
-
* @defaultvalue 'medium'
|
11
|
-
*/
|
12
|
-
size: 'small' | 'medium' | 'large';
|
13
|
-
/**
|
14
|
-
* A label supports semibold/strong fontweight.
|
15
|
-
* @defaultvalue false
|
16
|
-
*/
|
17
|
-
strong: boolean;
|
18
|
-
};
|
19
|
-
export declare type LabelSlots = {
|
20
|
-
root: Slot<'label'>;
|
21
|
-
required?: Slot<'span'>;
|
22
|
-
};
|
23
|
-
/**
|
24
|
-
* State used in rendering Label
|
25
|
-
*/
|
26
|
-
export declare type LabelState = ComponentState<LabelSlots> & LabelCommons;
|
27
|
-
/**
|
28
|
-
* Label Props
|
29
|
-
*/
|
30
|
-
export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & {
|
31
|
-
/**
|
32
|
-
* Displays and indicator that the label is for a required field. The required prop can be set to true to display
|
33
|
-
* an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
|
34
|
-
* @defaultvalue false
|
35
|
-
*/
|
36
|
-
required?: boolean | Slot<'span'>;
|
37
|
-
};
|
38
|
-
export {};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import type { LabelProps, LabelState } from './Label.types';
|
3
|
-
/**
|
4
|
-
* Create the state required to render Label.
|
5
|
-
*
|
6
|
-
* The returned state can be modified with hooks such as useLabelStyles_unstable,
|
7
|
-
* before being passed to renderLabel_unstable.
|
8
|
-
*
|
9
|
-
* @param props - props from this instance of Label
|
10
|
-
* @param ref - reference to root HTMLElement of Label
|
11
|
-
*/
|
12
|
-
export declare const useLabel_unstable: (props: LabelProps, ref: React.Ref<HTMLElement>) => LabelState;
|
package/lib/index.d.ts
DELETED
package/lib-commonjs/Label.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/Label/index';
|
@@ -1,38 +0,0 @@
|
|
1
|
-
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
2
|
-
declare type LabelCommons = {
|
3
|
-
/**
|
4
|
-
* Renders the label as disabled
|
5
|
-
* @defaultvalue false
|
6
|
-
*/
|
7
|
-
disabled: boolean;
|
8
|
-
/**
|
9
|
-
* A label supports different sizes.
|
10
|
-
* @defaultvalue 'medium'
|
11
|
-
*/
|
12
|
-
size: 'small' | 'medium' | 'large';
|
13
|
-
/**
|
14
|
-
* A label supports semibold/strong fontweight.
|
15
|
-
* @defaultvalue false
|
16
|
-
*/
|
17
|
-
strong: boolean;
|
18
|
-
};
|
19
|
-
export declare type LabelSlots = {
|
20
|
-
root: Slot<'label'>;
|
21
|
-
required?: Slot<'span'>;
|
22
|
-
};
|
23
|
-
/**
|
24
|
-
* State used in rendering Label
|
25
|
-
*/
|
26
|
-
export declare type LabelState = ComponentState<LabelSlots> & LabelCommons;
|
27
|
-
/**
|
28
|
-
* Label Props
|
29
|
-
*/
|
30
|
-
export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & {
|
31
|
-
/**
|
32
|
-
* Displays and indicator that the label is for a required field. The required prop can be set to true to display
|
33
|
-
* an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
|
34
|
-
* @defaultvalue false
|
35
|
-
*/
|
36
|
-
required?: boolean | Slot<'span'>;
|
37
|
-
};
|
38
|
-
export {};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import type { LabelProps, LabelState } from './Label.types';
|
3
|
-
/**
|
4
|
-
* Create the state required to render Label.
|
5
|
-
*
|
6
|
-
* The returned state can be modified with hooks such as useLabelStyles_unstable,
|
7
|
-
* before being passed to renderLabel_unstable.
|
8
|
-
*
|
9
|
-
* @param props - props from this instance of Label
|
10
|
-
* @param ref - reference to root HTMLElement of Label
|
11
|
-
*/
|
12
|
-
export declare const useLabel_unstable: (props: LabelProps, ref: React.Ref<HTMLElement>) => LabelState;
|
package/lib-commonjs/index.d.ts
DELETED