@primer/components 0.0.0-202111231117 → 0.0.0-202111245715
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 +9 -3
- package/dist/browser.esm.js +586 -604
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +204 -222
- package/dist/browser.umd.js.map +1 -1
- package/lib/Autocomplete/AutocompleteMenu.js +13 -6
- package/lib/Avatar.d.ts +1 -2
- package/lib/Avatar.js +1 -1
- package/lib/BranchName.d.ts +1 -2
- package/lib/BranchName.js +1 -1
- package/lib/Checkbox.d.ts +1 -1
- package/lib/Details.d.ts +1 -2
- package/lib/Details.js +1 -3
- package/lib/Dropdown.d.ts +2 -66
- package/lib/Heading.d.ts +1 -2
- package/lib/Heading.js +1 -6
- package/lib/NewButton/button-base.d.ts +6 -0
- package/lib/NewButton/button-base.js +69 -0
- package/lib/NewButton/button-link.d.ts +26 -0
- package/lib/{ChoiceFieldset/ChoiceFieldLabel.js → NewButton/button-link.js} +14 -18
- package/lib/NewButton/button.d.ts +2 -11
- package/lib/NewButton/button.js +6 -283
- package/lib/NewButton/icon-button.d.ts +4 -0
- package/lib/NewButton/icon-button.js +57 -0
- package/lib/NewButton/index.d.ts +6 -11
- package/lib/NewButton/index.js +18 -0
- package/lib/NewButton/styles.d.ts +202 -0
- package/lib/NewButton/styles.js +248 -0
- package/lib/NewButton/types.d.ts +28 -8
- package/lib/NewButton/types.js +19 -1
- package/lib/ProgressBar.d.ts +16 -11
- package/lib/ProgressBar.js +6 -10
- package/lib/Spinner.d.ts +1 -2
- package/lib/Spinner.js +1 -3
- package/lib/index.d.ts +0 -4
- package/lib/index.js +0 -38
- package/lib-esm/Autocomplete/AutocompleteMenu.js +13 -3
- package/lib-esm/Avatar.d.ts +1 -2
- package/lib-esm/Avatar.js +2 -2
- package/lib-esm/BranchName.d.ts +1 -2
- package/lib-esm/BranchName.js +2 -2
- package/lib-esm/Checkbox.d.ts +1 -1
- package/lib-esm/Details.d.ts +1 -2
- package/lib-esm/Details.js +1 -2
- package/lib-esm/Dropdown.d.ts +2 -66
- package/lib-esm/Heading.d.ts +1 -2
- package/lib-esm/Heading.js +2 -6
- package/lib-esm/NewButton/button-base.d.ts +6 -0
- package/lib-esm/NewButton/button-base.js +47 -0
- package/lib-esm/NewButton/button-link.d.ts +26 -0
- package/lib-esm/NewButton/button-link.js +15 -0
- package/lib-esm/NewButton/button.d.ts +2 -11
- package/lib-esm/NewButton/button.js +4 -275
- package/lib-esm/NewButton/icon-button.d.ts +4 -0
- package/lib-esm/NewButton/icon-button.js +35 -0
- package/lib-esm/NewButton/index.d.ts +6 -11
- package/lib-esm/NewButton/index.js +4 -1
- package/lib-esm/NewButton/styles.d.ts +202 -0
- package/lib-esm/NewButton/styles.js +229 -0
- package/lib-esm/NewButton/types.d.ts +28 -8
- package/lib-esm/NewButton/types.js +6 -1
- package/lib-esm/ProgressBar.d.ts +16 -11
- package/lib-esm/ProgressBar.js +7 -11
- package/lib-esm/Spinner.d.ts +1 -2
- package/lib-esm/Spinner.js +1 -2
- package/lib-esm/index.d.ts +0 -4
- package/lib-esm/index.js +0 -4
- package/package.json +2 -2
- package/lib/CheckboxInputField.d.ts +0 -11
- package/lib/CheckboxInputField.js +0 -73
- package/lib/ChoiceFieldset/ChoiceFieldCaption.d.ts +0 -3
- package/lib/ChoiceFieldset/ChoiceFieldCaption.js +0 -35
- package/lib/ChoiceFieldset/ChoiceFieldLabel.d.ts +0 -3
- package/lib/ChoiceFieldset/ChoiceFieldset.d.ts +0 -65
- package/lib/ChoiceFieldset/ChoiceFieldset.js +0 -95
- package/lib/ChoiceFieldset/ChoiceFieldsetDescription.d.ts +0 -3
- package/lib/ChoiceFieldset/ChoiceFieldsetDescription.js +0 -29
- package/lib/ChoiceFieldset/ChoiceFieldsetLegend.d.ts +0 -9
- package/lib/ChoiceFieldset/ChoiceFieldsetLegend.js +0 -44
- package/lib/ChoiceFieldset/ChoiceFieldsetList.d.ts +0 -9
- package/lib/ChoiceFieldset/ChoiceFieldsetList.js +0 -80
- package/lib/ChoiceFieldset/ChoiceFieldsetListContext.d.ts +0 -19
- package/lib/ChoiceFieldset/ChoiceFieldsetListContext.js +0 -15
- package/lib/ChoiceFieldset/ChoiceFieldsetListItem.d.ts +0 -25
- package/lib/ChoiceFieldset/ChoiceFieldsetListItem.js +0 -75
- package/lib/ChoiceFieldset/ChoiceFieldsetValidation.d.ts +0 -6
- package/lib/ChoiceFieldset/ChoiceFieldsetValidation.js +0 -17
- package/lib/ChoiceFieldset/index.d.ts +0 -3
- package/lib/ChoiceFieldset/index.js +0 -23
- package/lib/RadioInputField.d.ts +0 -9
- package/lib/RadioInputField.js +0 -82
- package/lib/TextInputField.d.ts +0 -581
- package/lib/TextInputField.js +0 -66
- package/lib/_InputCaption.d.ts +0 -13
- package/lib/_InputCaption.js +0 -27
- package/lib/_InputField/InputField.d.ts +0 -39
- package/lib/_InputField/InputField.js +0 -90
- package/lib/_InputField/InputFieldCaption.d.ts +0 -3
- package/lib/_InputField/InputFieldCaption.js +0 -30
- package/lib/_InputField/InputFieldLabel.d.ts +0 -9
- package/lib/_InputField/InputFieldLabel.js +0 -34
- package/lib/_InputField/InputFieldValidation.d.ts +0 -6
- package/lib/_InputField/InputFieldValidation.js +0 -17
- package/lib/_InputField/ToggleInputField.d.ts +0 -13
- package/lib/_InputField/ToggleInputField.js +0 -71
- package/lib/_InputField/ToggleInputLeadingVisual.d.ts +0 -3
- package/lib/_InputField/ToggleInputLeadingVisual.js +0 -22
- package/lib/_InputField/ValidationAnimationContainer.d.ts +0 -6
- package/lib/_InputField/ValidationAnimationContainer.js +0 -48
- package/lib/_InputField/index.d.ts +0 -1
- package/lib/_InputField/index.js +0 -15
- package/lib/_InputField/slots.d.ts +0 -13
- package/lib/_InputField/slots.js +0 -17
- package/lib/_InputLabel.d.ts +0 -8
- package/lib/_InputLabel.js +0 -44
- package/lib/_InputValidation.d.ts +0 -8
- package/lib/_InputValidation.js +0 -56
- package/lib/_VisuallyHidden.d.ts +0 -6
- package/lib/_VisuallyHidden.js +0 -39
- package/lib/utils/types/FormValidationStatus.d.ts +0 -1
- package/lib/utils/types/FormValidationStatus.js +0 -1
- package/lib-esm/CheckboxInputField.d.ts +0 -11
- package/lib-esm/CheckboxInputField.js +0 -56
- package/lib-esm/ChoiceFieldset/ChoiceFieldCaption.d.ts +0 -3
- package/lib-esm/ChoiceFieldset/ChoiceFieldCaption.js +0 -20
- package/lib-esm/ChoiceFieldset/ChoiceFieldLabel.d.ts +0 -3
- package/lib-esm/ChoiceFieldset/ChoiceFieldLabel.js +0 -20
- package/lib-esm/ChoiceFieldset/ChoiceFieldset.d.ts +0 -65
- package/lib-esm/ChoiceFieldset/ChoiceFieldset.js +0 -72
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetDescription.d.ts +0 -3
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetDescription.js +0 -17
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetLegend.d.ts +0 -9
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetLegend.js +0 -31
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetList.d.ts +0 -9
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetList.js +0 -63
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetListContext.d.ts +0 -19
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetListContext.js +0 -5
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetListItem.d.ts +0 -25
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetListItem.js +0 -51
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetValidation.d.ts +0 -6
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetValidation.js +0 -7
- package/lib-esm/ChoiceFieldset/index.d.ts +0 -3
- package/lib-esm/ChoiceFieldset/index.js +0 -2
- package/lib-esm/RadioInputField.d.ts +0 -9
- package/lib-esm/RadioInputField.js +0 -65
- package/lib-esm/TextInputField.d.ts +0 -581
- package/lib-esm/TextInputField.js +0 -50
- package/lib-esm/_InputCaption.d.ts +0 -13
- package/lib-esm/_InputCaption.js +0 -16
- package/lib-esm/_InputField/InputField.d.ts +0 -39
- package/lib-esm/_InputField/InputField.js +0 -70
- package/lib-esm/_InputField/InputFieldCaption.d.ts +0 -3
- package/lib-esm/_InputField/InputFieldCaption.js +0 -18
- package/lib-esm/_InputField/InputFieldLabel.d.ts +0 -9
- package/lib-esm/_InputField/InputFieldLabel.js +0 -22
- package/lib-esm/_InputField/InputFieldValidation.d.ts +0 -6
- package/lib-esm/_InputField/InputFieldValidation.js +0 -7
- package/lib-esm/_InputField/ToggleInputField.d.ts +0 -13
- package/lib-esm/_InputField/ToggleInputField.js +0 -54
- package/lib-esm/_InputField/ToggleInputLeadingVisual.d.ts +0 -3
- package/lib-esm/_InputField/ToggleInputLeadingVisual.js +0 -11
- package/lib-esm/_InputField/ValidationAnimationContainer.d.ts +0 -6
- package/lib-esm/_InputField/ValidationAnimationContainer.js +0 -33
- package/lib-esm/_InputField/index.d.ts +0 -1
- package/lib-esm/_InputField/index.js +0 -1
- package/lib-esm/_InputField/slots.d.ts +0 -13
- package/lib-esm/_InputField/slots.js +0 -5
- package/lib-esm/_InputLabel.d.ts +0 -8
- package/lib-esm/_InputLabel.js +0 -32
- package/lib-esm/_InputValidation.d.ts +0 -8
- package/lib-esm/_InputValidation.js +0 -43
- package/lib-esm/_VisuallyHidden.d.ts +0 -6
- package/lib-esm/_VisuallyHidden.js +0 -26
- package/lib-esm/utils/types/FormValidationStatus.d.ts +0 -1
- package/lib-esm/utils/types/FormValidationStatus.js +0 -1
package/lib/RadioInputField.d.ts
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ToggleInputFieldProps } from './_InputField/ToggleInputField';
|
3
|
-
declare const _default: React.FC<ToggleInputFieldProps> & {
|
4
|
-
Input: React.FC<React.HTMLProps<HTMLInputElement>>;
|
5
|
-
Caption: React.FC<{}>;
|
6
|
-
Label: React.FC<import("./_InputField/InputFieldLabel").Props>;
|
7
|
-
LeadingVisual: React.FC<{}>;
|
8
|
-
};
|
9
|
-
export default _default;
|
package/lib/RadioInputField.js
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
9
|
-
|
10
|
-
var _InputField = _interopRequireDefault(require("./_InputField/InputField"));
|
11
|
-
|
12
|
-
var _slots = require("./_InputField/slots");
|
13
|
-
|
14
|
-
var _ToggleInputField = _interopRequireDefault(require("./_InputField/ToggleInputField"));
|
15
|
-
|
16
|
-
var _ToggleInputLeadingVisual = _interopRequireDefault(require("./_InputField/ToggleInputLeadingVisual"));
|
17
|
-
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
|
-
|
20
|
-
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); }
|
21
|
-
|
22
|
-
// TODO: use Primer's checkbox input once it's available
|
23
|
-
// https://github.com/github/primer/issues/489
|
24
|
-
const RadioInput = props => {
|
25
|
-
return /*#__PURE__*/_react.default.createElement("input", _extends({
|
26
|
-
type: "radio"
|
27
|
-
}, props));
|
28
|
-
};
|
29
|
-
|
30
|
-
RadioInput.displayName = "RadioInput";
|
31
|
-
|
32
|
-
// pulling out `id`, `disabled`, and `required` because those should come from the parent TextInputField component
|
33
|
-
const Input = ({
|
34
|
-
id: idProp,
|
35
|
-
required: requiredProp,
|
36
|
-
disabled: disabledProp,
|
37
|
-
...rest
|
38
|
-
}) => {
|
39
|
-
if (idProp) {
|
40
|
-
// eslint-disable-next-line no-console
|
41
|
-
console.warn("instead of passing the 'id' prop directly to <TextInputField.Input>, it should be passed to the parent component, <TextInputField>");
|
42
|
-
}
|
43
|
-
|
44
|
-
if (disabledProp) {
|
45
|
-
// eslint-disable-next-line no-console
|
46
|
-
console.warn("instead of passing the 'disabled' prop directly to <TextInputField.Input>, it should be passed to the parent component, <TextInputField>");
|
47
|
-
}
|
48
|
-
|
49
|
-
if (requiredProp) {
|
50
|
-
// eslint-disable-next-line no-console
|
51
|
-
console.warn("instead of passing the 'required' prop directly to <TextInputField.Input>, it should be passed to the parent component, <TextInputField>");
|
52
|
-
}
|
53
|
-
|
54
|
-
return /*#__PURE__*/_react.default.createElement(_slots.Slot, {
|
55
|
-
name: "Input"
|
56
|
-
}, ({
|
57
|
-
disabled,
|
58
|
-
id,
|
59
|
-
required,
|
60
|
-
captionId
|
61
|
-
}) => /*#__PURE__*/_react.default.createElement(RadioInput, _extends({
|
62
|
-
"aria-describedby": captionId,
|
63
|
-
id: id,
|
64
|
-
required: required,
|
65
|
-
disabled: disabled
|
66
|
-
}, rest)));
|
67
|
-
};
|
68
|
-
|
69
|
-
Input.displayName = "Input";
|
70
|
-
|
71
|
-
const RadioInputField = props => /*#__PURE__*/_react.default.createElement(_ToggleInputField.default, props);
|
72
|
-
|
73
|
-
RadioInputField.displayName = "RadioInputField";
|
74
|
-
|
75
|
-
var _default = Object.assign(RadioInputField, {
|
76
|
-
Input,
|
77
|
-
Caption: _InputField.default.Caption,
|
78
|
-
Label: _InputField.default.Label,
|
79
|
-
LeadingVisual: _ToggleInputLeadingVisual.default
|
80
|
-
});
|
81
|
-
|
82
|
-
exports.default = _default;
|