@commercetools-uikit/field-label 12.2.3 → 12.2.7
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/dist/commercetools-uikit-field-label.cjs.dev.js +25 -25
- package/dist/commercetools-uikit-field-label.cjs.prod.js +14 -14
- package/dist/commercetools-uikit-field-label.esm.js +2 -2
- package/dist/declarations/src/export-types.d.ts +2 -2
- package/dist/declarations/src/field-label.d.ts +22 -22
- package/dist/declarations/src/index.d.ts +3 -3
- package/dist/declarations/src/version.d.ts +2 -2
- package/package.json +11 -15
|
@@ -43,15 +43,15 @@ var FieldLabel = function FieldLabel(props) {
|
|
|
43
43
|
process.env.NODE_ENV !== "production" ? utils.warning(Boolean(props.hint), 'ui-kit/FieldLabel: `hint` is required when `hintIcon` is provided') : void 0;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
return jsxRuntime.jsx(Constraints__default[
|
|
46
|
+
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
47
47
|
max: props.horizontalConstraint,
|
|
48
|
-
children: jsxRuntime.jsxs(Stack__default[
|
|
48
|
+
children: jsxRuntime.jsxs(Stack__default["default"], {
|
|
49
49
|
scale: "xs",
|
|
50
|
-
children: [jsxRuntime.jsxs(Inline__default[
|
|
50
|
+
children: [jsxRuntime.jsxs(Inline__default["default"], {
|
|
51
51
|
alignItems: "flexStart",
|
|
52
52
|
scale: "xs",
|
|
53
|
-
children: [jsxRuntime.jsx(Text__default[
|
|
54
|
-
children: jsxRuntime.jsx(Label__default[
|
|
53
|
+
children: [jsxRuntime.jsx(Text__default["default"].Wrap, {
|
|
54
|
+
children: jsxRuntime.jsx(Label__default["default"], {
|
|
55
55
|
isBold: true,
|
|
56
56
|
isRequiredIndicatorVisible: props.hasRequiredIndicator,
|
|
57
57
|
tone: props.tone,
|
|
@@ -59,7 +59,7 @@ var FieldLabel = function FieldLabel(props) {
|
|
|
59
59
|
htmlFor: props.htmlFor,
|
|
60
60
|
children: props.title
|
|
61
61
|
})
|
|
62
|
-
}), props.onInfoButtonClick && jsxRuntime.jsx(IconButton__default[
|
|
62
|
+
}), props.onInfoButtonClick && jsxRuntime.jsx(IconButton__default["default"], {
|
|
63
63
|
label: "More Info",
|
|
64
64
|
icon: jsxRuntime.jsx(icons.InformationIcon, {
|
|
65
65
|
size: "medium"
|
|
@@ -67,21 +67,21 @@ var FieldLabel = function FieldLabel(props) {
|
|
|
67
67
|
size: "small",
|
|
68
68
|
onClick: props.onInfoButtonClick
|
|
69
69
|
})]
|
|
70
|
-
}), props.hint && jsxRuntime.jsxs(Inline__default[
|
|
70
|
+
}), props.hint && jsxRuntime.jsxs(Inline__default["default"], {
|
|
71
71
|
alignItems: "flexStart",
|
|
72
72
|
scale: "xs",
|
|
73
|
-
children: [props.hintIcon && jsxRuntime.jsx(Inline__default[
|
|
73
|
+
children: [props.hintIcon && jsxRuntime.jsx(Inline__default["default"], {
|
|
74
74
|
children: /*#__PURE__*/react.cloneElement(props.hintIcon, {
|
|
75
75
|
// FIXME: add proper tone when tones are refactored
|
|
76
76
|
size: 'medium',
|
|
77
77
|
color: props.hintIcon.props.color || 'warning'
|
|
78
78
|
})
|
|
79
|
-
}), props.hint && jsxRuntime.jsx(Text__default[
|
|
79
|
+
}), props.hint && jsxRuntime.jsx(Text__default["default"].Detail, {
|
|
80
80
|
tone: props.tone,
|
|
81
81
|
children: props.hint
|
|
82
82
|
})]
|
|
83
|
-
}), props.description && jsxRuntime.jsx(Text__default[
|
|
84
|
-
children: jsxRuntime.jsx(Text__default[
|
|
83
|
+
}), props.description && jsxRuntime.jsx(Text__default["default"].Wrap, {
|
|
84
|
+
children: jsxRuntime.jsx(Text__default["default"].Detail, {
|
|
85
85
|
tone: props.tone,
|
|
86
86
|
children: props.description
|
|
87
87
|
})
|
|
@@ -94,17 +94,17 @@ var FieldLabel = function FieldLabel(props) {
|
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
FieldLabel.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
97
|
-
title: _pt__default[
|
|
98
|
-
hint: _pt__default[
|
|
99
|
-
description: _pt__default[
|
|
100
|
-
onInfoButtonClick: _pt__default[
|
|
101
|
-
tone: _pt__default[
|
|
102
|
-
hintIcon: _pt__default[
|
|
103
|
-
badge: _pt__default[
|
|
104
|
-
hasRequiredIndicator: _pt__default[
|
|
105
|
-
htmlFor: _pt__default[
|
|
106
|
-
id: _pt__default[
|
|
107
|
-
horizontalConstraint: _pt__default[
|
|
97
|
+
title: _pt__default["default"].oneOfType([_pt__default["default"].string, _pt__default["default"].node]).isRequired,
|
|
98
|
+
hint: _pt__default["default"].oneOfType([_pt__default["default"].string, _pt__default["default"].node]),
|
|
99
|
+
description: _pt__default["default"].oneOfType([_pt__default["default"].string, _pt__default["default"].node]),
|
|
100
|
+
onInfoButtonClick: _pt__default["default"].func,
|
|
101
|
+
tone: _pt__default["default"].oneOf(['primary', 'inverted']),
|
|
102
|
+
hintIcon: _pt__default["default"].element,
|
|
103
|
+
badge: _pt__default["default"].node,
|
|
104
|
+
hasRequiredIndicator: _pt__default["default"].bool,
|
|
105
|
+
htmlFor: _pt__default["default"].string,
|
|
106
|
+
id: _pt__default["default"].string,
|
|
107
|
+
horizontalConstraint: _pt__default["default"].oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto'])
|
|
108
108
|
} : {};
|
|
109
109
|
FieldLabel.displayName = 'FieldLabel';
|
|
110
110
|
FieldLabel.defaultProps = {
|
|
@@ -112,8 +112,8 @@ FieldLabel.defaultProps = {
|
|
|
112
112
|
};
|
|
113
113
|
var FieldLabel$1 = FieldLabel;
|
|
114
114
|
|
|
115
|
-
// NOTE: This string will be replaced
|
|
116
|
-
var version =
|
|
115
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
116
|
+
var version = "12.2.7";
|
|
117
117
|
|
|
118
|
-
exports[
|
|
118
|
+
exports["default"] = FieldLabel$1;
|
|
119
119
|
exports.version = version;
|
|
@@ -32,15 +32,15 @@ var _ref = {
|
|
|
32
32
|
var FieldLabel = function FieldLabel(props) {
|
|
33
33
|
if (props.hintIcon) ;
|
|
34
34
|
|
|
35
|
-
return jsxRuntime.jsx(Constraints__default[
|
|
35
|
+
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
36
36
|
max: props.horizontalConstraint,
|
|
37
|
-
children: jsxRuntime.jsxs(Stack__default[
|
|
37
|
+
children: jsxRuntime.jsxs(Stack__default["default"], {
|
|
38
38
|
scale: "xs",
|
|
39
|
-
children: [jsxRuntime.jsxs(Inline__default[
|
|
39
|
+
children: [jsxRuntime.jsxs(Inline__default["default"], {
|
|
40
40
|
alignItems: "flexStart",
|
|
41
41
|
scale: "xs",
|
|
42
|
-
children: [jsxRuntime.jsx(Text__default[
|
|
43
|
-
children: jsxRuntime.jsx(Label__default[
|
|
42
|
+
children: [jsxRuntime.jsx(Text__default["default"].Wrap, {
|
|
43
|
+
children: jsxRuntime.jsx(Label__default["default"], {
|
|
44
44
|
isBold: true,
|
|
45
45
|
isRequiredIndicatorVisible: props.hasRequiredIndicator,
|
|
46
46
|
tone: props.tone,
|
|
@@ -48,7 +48,7 @@ var FieldLabel = function FieldLabel(props) {
|
|
|
48
48
|
htmlFor: props.htmlFor,
|
|
49
49
|
children: props.title
|
|
50
50
|
})
|
|
51
|
-
}), props.onInfoButtonClick && jsxRuntime.jsx(IconButton__default[
|
|
51
|
+
}), props.onInfoButtonClick && jsxRuntime.jsx(IconButton__default["default"], {
|
|
52
52
|
label: "More Info",
|
|
53
53
|
icon: jsxRuntime.jsx(icons.InformationIcon, {
|
|
54
54
|
size: "medium"
|
|
@@ -56,21 +56,21 @@ var FieldLabel = function FieldLabel(props) {
|
|
|
56
56
|
size: "small",
|
|
57
57
|
onClick: props.onInfoButtonClick
|
|
58
58
|
})]
|
|
59
|
-
}), props.hint && jsxRuntime.jsxs(Inline__default[
|
|
59
|
+
}), props.hint && jsxRuntime.jsxs(Inline__default["default"], {
|
|
60
60
|
alignItems: "flexStart",
|
|
61
61
|
scale: "xs",
|
|
62
|
-
children: [props.hintIcon && jsxRuntime.jsx(Inline__default[
|
|
62
|
+
children: [props.hintIcon && jsxRuntime.jsx(Inline__default["default"], {
|
|
63
63
|
children: /*#__PURE__*/react.cloneElement(props.hintIcon, {
|
|
64
64
|
// FIXME: add proper tone when tones are refactored
|
|
65
65
|
size: 'medium',
|
|
66
66
|
color: props.hintIcon.props.color || 'warning'
|
|
67
67
|
})
|
|
68
|
-
}), props.hint && jsxRuntime.jsx(Text__default[
|
|
68
|
+
}), props.hint && jsxRuntime.jsx(Text__default["default"].Detail, {
|
|
69
69
|
tone: props.tone,
|
|
70
70
|
children: props.hint
|
|
71
71
|
})]
|
|
72
|
-
}), props.description && jsxRuntime.jsx(Text__default[
|
|
73
|
-
children: jsxRuntime.jsx(Text__default[
|
|
72
|
+
}), props.description && jsxRuntime.jsx(Text__default["default"].Wrap, {
|
|
73
|
+
children: jsxRuntime.jsx(Text__default["default"].Detail, {
|
|
74
74
|
tone: props.tone,
|
|
75
75
|
children: props.description
|
|
76
76
|
})
|
|
@@ -89,8 +89,8 @@ FieldLabel.defaultProps = {
|
|
|
89
89
|
};
|
|
90
90
|
var FieldLabel$1 = FieldLabel;
|
|
91
91
|
|
|
92
|
-
// NOTE: This string will be replaced
|
|
93
|
-
var version =
|
|
92
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
93
|
+
var version = "12.2.7";
|
|
94
94
|
|
|
95
|
-
exports[
|
|
95
|
+
exports["default"] = FieldLabel$1;
|
|
96
96
|
exports.version = version;
|
|
@@ -98,7 +98,7 @@ FieldLabel.defaultProps = {
|
|
|
98
98
|
};
|
|
99
99
|
var FieldLabel$1 = FieldLabel;
|
|
100
100
|
|
|
101
|
-
// NOTE: This string will be replaced
|
|
102
|
-
var version =
|
|
101
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
102
|
+
var version = "12.2.7";
|
|
103
103
|
|
|
104
104
|
export { FieldLabel$1 as default, version };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { TFieldLabelProps as FieldLabelProps } from './field-label';
|
|
2
|
-
export declare type TFieldLabelProps = FieldLabelProps;
|
|
1
|
+
import type { TFieldLabelProps as FieldLabelProps } from './field-label';
|
|
2
|
+
export declare type TFieldLabelProps = FieldLabelProps;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { MouseEvent, KeyboardEvent, ReactElement, ReactNode } from 'react';
|
|
2
|
-
export declare type TFieldLabelProps = {
|
|
3
|
-
title: string | ReactNode;
|
|
4
|
-
hint?: string | ReactNode;
|
|
5
|
-
description?: string | ReactNode;
|
|
6
|
-
onInfoButtonClick?: (event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
|
|
7
|
-
tone?: 'primary' | 'inverted';
|
|
8
|
-
hintIcon?: ReactElement;
|
|
9
|
-
badge?: ReactNode;
|
|
10
|
-
hasRequiredIndicator?: boolean;
|
|
11
|
-
htmlFor?: string;
|
|
12
|
-
id?: string;
|
|
13
|
-
horizontalConstraint?: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
|
|
14
|
-
};
|
|
15
|
-
declare const FieldLabel: {
|
|
16
|
-
(props: TFieldLabelProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
17
|
-
displayName: string;
|
|
18
|
-
defaultProps: {
|
|
19
|
-
horizontalConstraint: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export default FieldLabel;
|
|
1
|
+
import { MouseEvent, KeyboardEvent, ReactElement, ReactNode } from 'react';
|
|
2
|
+
export declare type TFieldLabelProps = {
|
|
3
|
+
title: string | ReactNode;
|
|
4
|
+
hint?: string | ReactNode;
|
|
5
|
+
description?: string | ReactNode;
|
|
6
|
+
onInfoButtonClick?: (event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
|
|
7
|
+
tone?: 'primary' | 'inverted';
|
|
8
|
+
hintIcon?: ReactElement;
|
|
9
|
+
badge?: ReactNode;
|
|
10
|
+
hasRequiredIndicator?: boolean;
|
|
11
|
+
htmlFor?: string;
|
|
12
|
+
id?: string;
|
|
13
|
+
horizontalConstraint?: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
|
|
14
|
+
};
|
|
15
|
+
declare const FieldLabel: {
|
|
16
|
+
(props: TFieldLabelProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
defaultProps: {
|
|
19
|
+
horizontalConstraint: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default FieldLabel;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default } from './field-label';
|
|
2
|
-
export { default as version } from './version';
|
|
3
|
-
export * from './export-types';
|
|
1
|
+
export { default } from './field-label';
|
|
2
|
+
export { default as version } from './version';
|
|
3
|
+
export * from './export-types';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "
|
|
2
|
-
export default _default;
|
|
1
|
+
declare const _default: "__@UI_KIT_PACKAGE/VERSION_OF_RELEASE__";
|
|
2
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/field-label",
|
|
3
3
|
"description": "The FieldLabel component represents the label for a field in a form.",
|
|
4
|
-
"version": "12.2.
|
|
4
|
+
"version": "12.2.7",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"homepage": "https://uikit.commercetools.com",
|
|
12
12
|
"keywords": ["javascript", "design system", "react", "uikit"],
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"private": false,
|
|
15
14
|
"publishConfig": {
|
|
16
15
|
"access": "public"
|
|
17
16
|
},
|
|
@@ -19,20 +18,17 @@
|
|
|
19
18
|
"main": "dist/commercetools-uikit-field-label.cjs.js",
|
|
20
19
|
"module": "dist/commercetools-uikit-field-label.esm.js",
|
|
21
20
|
"files": ["dist"],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"prepare": "../../../scripts/version.js replace"
|
|
24
|
-
},
|
|
25
21
|
"dependencies": {
|
|
26
|
-
"@babel/runtime": "7.
|
|
27
|
-
"@babel/runtime-corejs3": "7.
|
|
28
|
-
"@commercetools-uikit/constraints": "12.2.
|
|
29
|
-
"@commercetools-uikit/icon-button": "12.2.
|
|
30
|
-
"@commercetools-uikit/icons": "12.2.
|
|
31
|
-
"@commercetools-uikit/label": "12.2.
|
|
32
|
-
"@commercetools-uikit/spacings-inline": "12.2.
|
|
33
|
-
"@commercetools-uikit/spacings-stack": "12.2.
|
|
34
|
-
"@commercetools-uikit/text": "12.2.
|
|
35
|
-
"@commercetools-uikit/utils": "12.2.
|
|
22
|
+
"@babel/runtime": "7.16.3",
|
|
23
|
+
"@babel/runtime-corejs3": "7.16.3",
|
|
24
|
+
"@commercetools-uikit/constraints": "12.2.5",
|
|
25
|
+
"@commercetools-uikit/icon-button": "12.2.5",
|
|
26
|
+
"@commercetools-uikit/icons": "12.2.7",
|
|
27
|
+
"@commercetools-uikit/label": "12.2.5",
|
|
28
|
+
"@commercetools-uikit/spacings-inline": "12.2.5",
|
|
29
|
+
"@commercetools-uikit/spacings-stack": "12.2.5",
|
|
30
|
+
"@commercetools-uikit/text": "12.2.5",
|
|
31
|
+
"@commercetools-uikit/utils": "12.2.5",
|
|
36
32
|
"@emotion/react": "^11.4.0",
|
|
37
33
|
"@emotion/styled": "^11.3.0",
|
|
38
34
|
"prop-types": "15.7.2",
|