carbon-react 125.4.0 → 125.5.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/esm/components/inline-inputs/inline-inputs.component.d.ts +3 -1
- package/esm/components/inline-inputs/inline-inputs.component.js +2 -0
- package/lib/components/inline-inputs/inline-inputs.component.d.ts +3 -1
- package/lib/components/inline-inputs/inline-inputs.component.js +2 -0
- package/package.json +1 -1
|
@@ -12,6 +12,8 @@ export interface InlineInputsProps extends MarginProps, StyledContentContainerPr
|
|
|
12
12
|
htmlFor?: string;
|
|
13
13
|
/** Defines the label text for the heading. */
|
|
14
14
|
label?: string;
|
|
15
|
+
/** Inline label alignment */
|
|
16
|
+
labelAlign?: "left" | "right";
|
|
15
17
|
/**
|
|
16
18
|
* Custom label id, could be used in combination with aria-labelledby prop of each input,
|
|
17
19
|
* to make them accesible for screen readers.
|
|
@@ -21,7 +23,7 @@ export interface InlineInputsProps extends MarginProps, StyledContentContainerPr
|
|
|
21
23
|
required?: boolean;
|
|
22
24
|
}
|
|
23
25
|
declare const InlineInputs: {
|
|
24
|
-
({ adaptiveLabelBreakpoint, label, labelId, htmlFor, children, className, gutter, inputWidth, labelInline, labelWidth, required, ...rest }: InlineInputsProps): React.JSX.Element;
|
|
26
|
+
({ adaptiveLabelBreakpoint, label, labelAlign, labelId, htmlFor, children, className, gutter, inputWidth, labelInline, labelWidth, required, ...rest }: InlineInputsProps): React.JSX.Element;
|
|
25
27
|
displayName: string;
|
|
26
28
|
};
|
|
27
29
|
export default InlineInputs;
|
|
@@ -17,6 +17,7 @@ const columnWrapper = (children, gutter) => {
|
|
|
17
17
|
const InlineInputs = ({
|
|
18
18
|
adaptiveLabelBreakpoint,
|
|
19
19
|
label,
|
|
20
|
+
labelAlign,
|
|
20
21
|
labelId,
|
|
21
22
|
htmlFor,
|
|
22
23
|
children = null,
|
|
@@ -36,6 +37,7 @@ const InlineInputs = ({
|
|
|
36
37
|
function renderLabel() {
|
|
37
38
|
if (!label) return null;
|
|
38
39
|
return /*#__PURE__*/React.createElement(Label, {
|
|
40
|
+
align: labelAlign,
|
|
39
41
|
labelId: labelId,
|
|
40
42
|
inline: inlineLabel,
|
|
41
43
|
htmlFor: htmlFor,
|
|
@@ -12,6 +12,8 @@ export interface InlineInputsProps extends MarginProps, StyledContentContainerPr
|
|
|
12
12
|
htmlFor?: string;
|
|
13
13
|
/** Defines the label text for the heading. */
|
|
14
14
|
label?: string;
|
|
15
|
+
/** Inline label alignment */
|
|
16
|
+
labelAlign?: "left" | "right";
|
|
15
17
|
/**
|
|
16
18
|
* Custom label id, could be used in combination with aria-labelledby prop of each input,
|
|
17
19
|
* to make them accesible for screen readers.
|
|
@@ -21,7 +23,7 @@ export interface InlineInputsProps extends MarginProps, StyledContentContainerPr
|
|
|
21
23
|
required?: boolean;
|
|
22
24
|
}
|
|
23
25
|
declare const InlineInputs: {
|
|
24
|
-
({ adaptiveLabelBreakpoint, label, labelId, htmlFor, children, className, gutter, inputWidth, labelInline, labelWidth, required, ...rest }: InlineInputsProps): React.JSX.Element;
|
|
26
|
+
({ adaptiveLabelBreakpoint, label, labelAlign, labelId, htmlFor, children, className, gutter, inputWidth, labelInline, labelWidth, required, ...rest }: InlineInputsProps): React.JSX.Element;
|
|
25
27
|
displayName: string;
|
|
26
28
|
};
|
|
27
29
|
export default InlineInputs;
|
|
@@ -26,6 +26,7 @@ const columnWrapper = (children, gutter) => {
|
|
|
26
26
|
const InlineInputs = ({
|
|
27
27
|
adaptiveLabelBreakpoint,
|
|
28
28
|
label,
|
|
29
|
+
labelAlign,
|
|
29
30
|
labelId,
|
|
30
31
|
htmlFor,
|
|
31
32
|
children = null,
|
|
@@ -45,6 +46,7 @@ const InlineInputs = ({
|
|
|
45
46
|
function renderLabel() {
|
|
46
47
|
if (!label) return null;
|
|
47
48
|
return /*#__PURE__*/_react.default.createElement(_label.default, {
|
|
49
|
+
align: labelAlign,
|
|
48
50
|
labelId: labelId,
|
|
49
51
|
inline: inlineLabel,
|
|
50
52
|
htmlFor: htmlFor,
|