@primer/components 0.0.0-20211030163410 → 0.0.0-20211030164933
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.md +1 -1
- package/dist/browser.esm.js +3 -3
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +3 -3
- package/dist/browser.umd.js.map +1 -1
- package/lib/CheckboxInputField.d.ts +0 -1
- package/lib/CheckboxInputField.js +0 -1
- package/lib/RadioInputField.d.ts +0 -1
- package/lib/RadioInputField.js +0 -1
- package/lib/_InputCaption.d.ts +7 -0
- package/lib/_InputCaption.js +9 -6
- package/lib/_InputField/InputFieldCaption.js +4 -2
- package/lib-esm/CheckboxInputField.d.ts +0 -1
- package/lib-esm/CheckboxInputField.js +0 -1
- package/lib-esm/RadioInputField.d.ts +0 -1
- package/lib-esm/RadioInputField.js +0 -1
- package/lib-esm/_InputCaption.d.ts +7 -0
- package/lib-esm/_InputCaption.js +9 -6
- package/lib-esm/_InputField/InputFieldCaption.js +4 -2
- package/package.json +1 -1
@@ -5,7 +5,6 @@ declare const _default: React.FC<import("./_InputField/ToggleInputField").Props>
|
|
5
5
|
}>;
|
6
6
|
Caption: React.FC<{}>;
|
7
7
|
Label: React.FC<import("./_InputField/InputFieldLabel").Props>;
|
8
|
-
Validation: React.FC<import("./_InputField/InputFieldValidation").InputFieldValidationProps>;
|
9
8
|
LeadingVisual: React.FC<{}>;
|
10
9
|
};
|
11
10
|
export default _default;
|
package/lib/RadioInputField.d.ts
CHANGED
@@ -3,7 +3,6 @@ declare const _default: React.FC<import("./_InputField/ToggleInputField").Props>
|
|
3
3
|
Input: React.FC<React.HTMLProps<HTMLInputElement>>;
|
4
4
|
Caption: React.FC<{}>;
|
5
5
|
Label: React.FC<import("./_InputField/InputFieldLabel").Props>;
|
6
|
-
Validation: React.FC<import("./_InputField/InputFieldValidation").InputFieldValidationProps>;
|
7
6
|
LeadingVisual: React.FC<{}>;
|
8
7
|
};
|
9
8
|
export default _default;
|
package/lib/RadioInputField.js
CHANGED
package/lib/_InputCaption.d.ts
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
interface Props {
|
3
|
+
/**
|
4
|
+
* The unique identifier used to associate the caption with an input
|
5
|
+
*/
|
3
6
|
id: string;
|
7
|
+
/**
|
8
|
+
* Whether the input associated with this caption is disabled
|
9
|
+
*/
|
10
|
+
disabled?: boolean;
|
4
11
|
}
|
5
12
|
declare const InputCaption: React.FC<Props>;
|
6
13
|
export default InputCaption;
|
package/lib/_InputCaption.js
CHANGED
@@ -11,12 +11,15 @@ var _ = require(".");
|
|
11
11
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
const InputCaption = ({
|
15
|
+
children,
|
16
|
+
disabled,
|
17
|
+
id
|
18
|
+
}) => /*#__PURE__*/_react.default.createElement(_.Text, {
|
19
|
+
color: disabled ? 'fg.subtle' : 'fg.muted',
|
20
|
+
fontSize: 0,
|
21
|
+
id: id
|
22
|
+
}, children);
|
20
23
|
|
21
24
|
InputCaption.displayName = "InputCaption";
|
22
25
|
var _default = InputCaption;
|
@@ -18,9 +18,11 @@ const InputFieldCaption = ({
|
|
18
18
|
}) => /*#__PURE__*/_react.default.createElement(_slots.Slot, {
|
19
19
|
name: "Caption"
|
20
20
|
}, ({
|
21
|
-
captionId
|
21
|
+
captionId,
|
22
|
+
disabled
|
22
23
|
}) => /*#__PURE__*/_react.default.createElement(_InputCaption.default, {
|
23
|
-
id: captionId
|
24
|
+
id: captionId,
|
25
|
+
disabled: disabled
|
24
26
|
}, children));
|
25
27
|
|
26
28
|
InputFieldCaption.displayName = "InputFieldCaption";
|
@@ -5,7 +5,6 @@ declare const _default: React.FC<import("./_InputField/ToggleInputField").Props>
|
|
5
5
|
}>;
|
6
6
|
Caption: React.FC<{}>;
|
7
7
|
Label: React.FC<import("./_InputField/InputFieldLabel").Props>;
|
8
|
-
Validation: React.FC<import("./_InputField/InputFieldValidation").InputFieldValidationProps>;
|
9
8
|
LeadingVisual: React.FC<{}>;
|
10
9
|
};
|
11
10
|
export default _default;
|
@@ -3,7 +3,6 @@ declare const _default: React.FC<import("./_InputField/ToggleInputField").Props>
|
|
3
3
|
Input: React.FC<React.HTMLProps<HTMLInputElement>>;
|
4
4
|
Caption: React.FC<{}>;
|
5
5
|
Label: React.FC<import("./_InputField/InputFieldLabel").Props>;
|
6
|
-
Validation: React.FC<import("./_InputField/InputFieldValidation").InputFieldValidationProps>;
|
7
6
|
LeadingVisual: React.FC<{}>;
|
8
7
|
};
|
9
8
|
export default _default;
|
@@ -1,6 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
interface Props {
|
3
|
+
/**
|
4
|
+
* The unique identifier used to associate the caption with an input
|
5
|
+
*/
|
3
6
|
id: string;
|
7
|
+
/**
|
8
|
+
* Whether the input associated with this caption is disabled
|
9
|
+
*/
|
10
|
+
disabled?: boolean;
|
4
11
|
}
|
5
12
|
declare const InputCaption: React.FC<Props>;
|
6
13
|
export default InputCaption;
|
package/lib-esm/_InputCaption.js
CHANGED
@@ -1,12 +1,15 @@
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
2
|
-
|
3
1
|
import React from 'react';
|
4
2
|
import { Text } from '.';
|
5
3
|
|
6
|
-
const InputCaption =
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
const InputCaption = ({
|
5
|
+
children,
|
6
|
+
disabled,
|
7
|
+
id
|
8
|
+
}) => /*#__PURE__*/React.createElement(Text, {
|
9
|
+
color: disabled ? 'fg.subtle' : 'fg.muted',
|
10
|
+
fontSize: 0,
|
11
|
+
id: id
|
12
|
+
}, children);
|
10
13
|
|
11
14
|
InputCaption.displayName = "InputCaption";
|
12
15
|
export default InputCaption;
|
@@ -7,9 +7,11 @@ const InputFieldCaption = ({
|
|
7
7
|
}) => /*#__PURE__*/React.createElement(Slot, {
|
8
8
|
name: "Caption"
|
9
9
|
}, ({
|
10
|
-
captionId
|
10
|
+
captionId,
|
11
|
+
disabled
|
11
12
|
}) => /*#__PURE__*/React.createElement(InputCaption, {
|
12
|
-
id: captionId
|
13
|
+
id: captionId,
|
14
|
+
disabled: disabled
|
13
15
|
}, children));
|
14
16
|
|
15
17
|
InputFieldCaption.displayName = "InputFieldCaption";
|