@primer/components 0.0.0-2021113144816 → 0.0.0-2021113204024
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 +986 -0
- package/dist/browser.esm.js +2227 -2
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +2227 -2
- package/dist/browser.umd.js.map +1 -1
- package/lib/ActionList/Header.js +1 -1
- package/lib/ActionList/Item.js +10 -10
- package/lib/ActionList/List.js +1 -1
- package/lib/ActionList2/Divider.d.ts +2 -3
- package/lib/ActionList2/Divider.js +5 -10
- package/lib/ActionList2/Item.js +6 -22
- package/lib/ActionList2/List.js +2 -12
- package/lib/ActionList2/Selection.js +0 -11
- package/lib/ActionList2/index.d.ts +2 -1
- package/lib/Autocomplete/Autocomplete.d.ts +1 -2
- package/lib/Autocomplete/AutocompleteInput.d.ts +1 -2
- package/lib/Autocomplete/AutocompleteMenu.js +6 -13
- package/lib/Avatar.d.ts +2 -1
- package/lib/Avatar.js +1 -1
- package/lib/BaseStyles.js +20 -2
- package/lib/BorderBox.js +1 -1
- package/lib/Box.js +1 -1
- package/lib/BranchName.d.ts +2 -1
- package/lib/BranchName.js +1 -1
- package/lib/Breadcrumbs.js +3 -3
- package/lib/Button/Button.d.ts +2 -2
- package/lib/Button/Button.js +1 -1
- package/lib/Button/ButtonClose.d.ts +2 -2
- package/lib/Button/ButtonDanger.d.ts +2 -2
- package/lib/Button/ButtonGroup.js +1 -1
- package/lib/Button/ButtonInvisible.d.ts +2 -2
- package/lib/Button/ButtonOutline.d.ts +2 -2
- package/lib/Button/ButtonPrimary.d.ts +2 -2
- package/lib/Checkbox.d.ts +1 -1
- package/lib/Checkbox.js +1 -1
- package/lib/CheckboxInputField.d.ts +11 -0
- package/lib/CheckboxInputField.js +73 -0
- package/lib/ChoiceFieldset/ChoiceFieldCaption.d.ts +3 -0
- package/lib/ChoiceFieldset/ChoiceFieldCaption.js +35 -0
- package/lib/ChoiceFieldset/ChoiceFieldLabel.d.ts +3 -0
- package/lib/ChoiceFieldset/ChoiceFieldLabel.js +35 -0
- package/lib/ChoiceFieldset/ChoiceFieldset.d.ts +65 -0
- package/lib/ChoiceFieldset/ChoiceFieldset.js +95 -0
- package/lib/ChoiceFieldset/ChoiceFieldsetDescription.d.ts +3 -0
- package/lib/ChoiceFieldset/ChoiceFieldsetDescription.js +29 -0
- package/lib/ChoiceFieldset/ChoiceFieldsetLegend.d.ts +9 -0
- package/lib/ChoiceFieldset/ChoiceFieldsetLegend.js +44 -0
- package/lib/ChoiceFieldset/ChoiceFieldsetList.d.ts +9 -0
- package/lib/ChoiceFieldset/ChoiceFieldsetList.js +80 -0
- package/lib/ChoiceFieldset/ChoiceFieldsetListContext.d.ts +19 -0
- package/lib/ChoiceFieldset/ChoiceFieldsetListContext.js +15 -0
- package/lib/ChoiceFieldset/ChoiceFieldsetListItem.d.ts +25 -0
- package/lib/ChoiceFieldset/ChoiceFieldsetListItem.js +75 -0
- package/lib/ChoiceFieldset/ChoiceFieldsetValidation.d.ts +6 -0
- package/lib/ChoiceFieldset/ChoiceFieldsetValidation.js +17 -0
- package/lib/ChoiceFieldset/index.d.ts +3 -0
- package/lib/ChoiceFieldset/index.js +23 -0
- package/lib/CircleOcticon.d.ts +35 -35
- package/lib/Details.d.ts +2 -1
- package/lib/Details.js +4 -2
- package/lib/Dialog.d.ts +37 -37
- package/lib/Dropdown.d.ts +72 -8
- package/lib/DropdownMenu/DropdownButton.d.ts +3 -6
- package/lib/FilterList.d.ts +1 -1
- package/lib/FilteredActionList/FilteredActionList.js +1 -1
- package/lib/Flex.js +1 -1
- package/lib/Heading.d.ts +2 -1
- package/lib/Heading.js +6 -1
- package/lib/LabelGroup.js +1 -1
- package/lib/Overlay.js +1 -1
- package/lib/Pagination/Pagination.js +2 -2
- package/lib/Position.d.ts +4 -4
- package/lib/Position.js +1 -1
- package/lib/ProgressBar.d.ts +11 -16
- package/lib/ProgressBar.js +10 -6
- package/lib/RadioInputField.d.ts +9 -0
- package/lib/RadioInputField.js +82 -0
- package/lib/SelectMenu/SelectMenu.d.ts +10 -11
- package/lib/SelectMenu/SelectMenu.js +1 -1
- package/lib/SelectMenu/SelectMenuFilter.js +1 -1
- package/lib/SelectMenu/SelectMenuFooter.js +1 -1
- package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib/SelectMenu/SelectMenuItem.js +1 -1
- package/lib/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib/SelectMenu/SelectMenuTab.js +1 -1
- package/lib/SelectMenu/SelectMenuTabPanel.js +1 -1
- package/lib/SelectMenu/SelectMenuTabs.js +1 -1
- package/lib/Spinner.d.ts +2 -1
- package/lib/Spinner.js +3 -1
- package/lib/StateLabel.js +1 -1
- package/lib/StyledOcticon.js +1 -1
- package/lib/SubNav.js +3 -3
- package/lib/TextInputField.d.ts +581 -0
- package/lib/TextInputField.js +66 -0
- package/lib/TextInputWithTokens.d.ts +1 -2
- package/lib/ThemeProvider.d.ts +0 -1
- package/lib/ThemeProvider.js +4 -17
- package/lib/Timeline.js +4 -4
- package/lib/Token/AvatarToken.d.ts +1 -1
- package/lib/Token/AvatarToken.js +1 -1
- package/lib/Token/IssueLabelToken.d.ts +1 -1
- package/lib/Token/Token.d.ts +1 -1
- package/lib/Token/TokenBase.js +1 -1
- package/lib/Tooltip.js +1 -1
- package/lib/UnderlineNav.js +2 -2
- package/lib/_InputCaption.d.ts +13 -0
- package/lib/_InputCaption.js +27 -0
- package/lib/_InputField/InputField.d.ts +39 -0
- package/lib/_InputField/InputField.js +90 -0
- package/lib/_InputField/InputFieldCaption.d.ts +3 -0
- package/lib/_InputField/InputFieldCaption.js +30 -0
- package/lib/_InputField/InputFieldLabel.d.ts +9 -0
- package/lib/_InputField/InputFieldLabel.js +34 -0
- package/lib/_InputField/InputFieldValidation.d.ts +6 -0
- package/lib/{ActionList2/MenuContext.js → _InputField/InputFieldValidation.js} +6 -4
- package/lib/_InputField/ToggleInputField.d.ts +13 -0
- package/lib/_InputField/ToggleInputField.js +71 -0
- package/lib/_InputField/ToggleInputLeadingVisual.d.ts +3 -0
- package/lib/_InputField/ToggleInputLeadingVisual.js +22 -0
- package/lib/_InputField/ValidationAnimationContainer.d.ts +6 -0
- package/lib/_InputField/ValidationAnimationContainer.js +48 -0
- package/lib/_InputField/index.d.ts +1 -0
- package/lib/_InputField/index.js +15 -0
- package/lib/_InputField/slots.d.ts +13 -0
- package/lib/_InputField/slots.js +17 -0
- package/lib/_InputLabel.d.ts +8 -0
- package/lib/_InputLabel.js +44 -0
- package/lib/_InputValidation.d.ts +8 -0
- package/lib/_InputValidation.js +56 -0
- package/lib/_VisuallyHidden.d.ts +6 -0
- package/lib/_VisuallyHidden.js +39 -0
- package/lib/drafts.d.ts +0 -1
- package/lib/drafts.js +0 -13
- package/lib/index.d.ts +4 -0
- package/lib/index.js +38 -0
- package/lib/utils/types/FormValidationStatus.d.ts +1 -0
- package/lib/utils/types/FormValidationStatus.js +1 -0
- package/lib-esm/ActionList/Header.js +1 -1
- package/lib-esm/ActionList/Item.js +10 -10
- package/lib-esm/ActionList/List.js +1 -1
- package/lib-esm/ActionList2/Divider.d.ts +2 -3
- package/lib-esm/ActionList2/Divider.js +5 -8
- package/lib-esm/ActionList2/Item.js +6 -20
- package/lib-esm/ActionList2/List.js +2 -10
- package/lib-esm/ActionList2/Selection.js +0 -9
- package/lib-esm/ActionList2/index.d.ts +2 -1
- package/lib-esm/Autocomplete/Autocomplete.d.ts +1 -2
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +1 -2
- package/lib-esm/Autocomplete/AutocompleteMenu.js +3 -13
- package/lib-esm/Avatar.d.ts +2 -1
- package/lib-esm/Avatar.js +2 -2
- package/lib-esm/BaseStyles.js +20 -2
- package/lib-esm/BorderBox.js +1 -1
- package/lib-esm/Box.js +1 -1
- package/lib-esm/BranchName.d.ts +2 -1
- package/lib-esm/BranchName.js +2 -2
- package/lib-esm/Breadcrumbs.js +3 -3
- package/lib-esm/Button/Button.d.ts +2 -2
- package/lib-esm/Button/Button.js +1 -1
- package/lib-esm/Button/ButtonClose.d.ts +2 -2
- package/lib-esm/Button/ButtonDanger.d.ts +2 -2
- package/lib-esm/Button/ButtonGroup.js +1 -1
- package/lib-esm/Button/ButtonInvisible.d.ts +2 -2
- package/lib-esm/Button/ButtonOutline.d.ts +2 -2
- package/lib-esm/Button/ButtonPrimary.d.ts +2 -2
- package/lib-esm/Checkbox.d.ts +1 -1
- package/lib-esm/Checkbox.js +1 -1
- package/lib-esm/CheckboxInputField.d.ts +11 -0
- package/lib-esm/CheckboxInputField.js +56 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldCaption.d.ts +3 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldCaption.js +20 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldLabel.d.ts +3 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldLabel.js +20 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldset.d.ts +65 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldset.js +72 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetDescription.d.ts +3 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetDescription.js +17 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetLegend.d.ts +9 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetLegend.js +31 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetList.d.ts +9 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetList.js +63 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetListContext.d.ts +19 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetListContext.js +5 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetListItem.d.ts +25 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetListItem.js +51 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetValidation.d.ts +6 -0
- package/lib-esm/ChoiceFieldset/ChoiceFieldsetValidation.js +7 -0
- package/lib-esm/ChoiceFieldset/index.d.ts +3 -0
- package/lib-esm/ChoiceFieldset/index.js +2 -0
- package/lib-esm/CircleOcticon.d.ts +35 -35
- package/lib-esm/Details.d.ts +2 -1
- package/lib-esm/Details.js +3 -2
- package/lib-esm/Dialog.d.ts +37 -37
- package/lib-esm/Dropdown.d.ts +72 -8
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +3 -6
- package/lib-esm/FilterList.d.ts +1 -1
- package/lib-esm/FilteredActionList/FilteredActionList.js +1 -1
- package/lib-esm/Flex.js +1 -1
- package/lib-esm/Heading.d.ts +2 -1
- package/lib-esm/Heading.js +6 -2
- package/lib-esm/LabelGroup.js +1 -1
- package/lib-esm/Overlay.js +1 -1
- package/lib-esm/Pagination/Pagination.js +2 -2
- package/lib-esm/Position.d.ts +4 -4
- package/lib-esm/Position.js +1 -1
- package/lib-esm/ProgressBar.d.ts +11 -16
- package/lib-esm/ProgressBar.js +11 -7
- package/lib-esm/RadioInputField.d.ts +9 -0
- package/lib-esm/RadioInputField.js +65 -0
- package/lib-esm/SelectMenu/SelectMenu.d.ts +10 -11
- package/lib-esm/SelectMenu/SelectMenu.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuFilter.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuFooter.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib-esm/SelectMenu/SelectMenuItem.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib-esm/SelectMenu/SelectMenuTab.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuTabPanel.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuTabs.js +1 -1
- package/lib-esm/Spinner.d.ts +2 -1
- package/lib-esm/Spinner.js +2 -1
- package/lib-esm/StateLabel.js +1 -1
- package/lib-esm/StyledOcticon.js +1 -1
- package/lib-esm/SubNav.js +3 -3
- package/lib-esm/TextInputField.d.ts +581 -0
- package/lib-esm/TextInputField.js +50 -0
- package/lib-esm/TextInputWithTokens.d.ts +1 -2
- package/lib-esm/ThemeProvider.d.ts +0 -1
- package/lib-esm/ThemeProvider.js +4 -17
- package/lib-esm/Timeline.js +4 -4
- package/lib-esm/Token/AvatarToken.d.ts +1 -1
- package/lib-esm/Token/AvatarToken.js +1 -1
- package/lib-esm/Token/IssueLabelToken.d.ts +1 -1
- package/lib-esm/Token/Token.d.ts +1 -1
- package/lib-esm/Token/TokenBase.js +1 -1
- package/lib-esm/Tooltip.js +1 -1
- package/lib-esm/UnderlineNav.js +2 -2
- package/lib-esm/_InputCaption.d.ts +13 -0
- package/lib-esm/_InputCaption.js +16 -0
- package/lib-esm/_InputField/InputField.d.ts +39 -0
- package/lib-esm/_InputField/InputField.js +70 -0
- package/lib-esm/_InputField/InputFieldCaption.d.ts +3 -0
- package/lib-esm/_InputField/InputFieldCaption.js +18 -0
- package/lib-esm/_InputField/InputFieldLabel.d.ts +9 -0
- package/lib-esm/_InputField/InputFieldLabel.js +22 -0
- package/lib-esm/_InputField/InputFieldValidation.d.ts +6 -0
- package/lib-esm/_InputField/InputFieldValidation.js +7 -0
- package/lib-esm/_InputField/ToggleInputField.d.ts +13 -0
- package/lib-esm/_InputField/ToggleInputField.js +54 -0
- package/lib-esm/_InputField/ToggleInputLeadingVisual.d.ts +3 -0
- package/lib-esm/_InputField/ToggleInputLeadingVisual.js +11 -0
- package/lib-esm/_InputField/ValidationAnimationContainer.d.ts +6 -0
- package/lib-esm/_InputField/ValidationAnimationContainer.js +33 -0
- package/lib-esm/_InputField/index.d.ts +1 -0
- package/lib-esm/_InputField/index.js +1 -0
- package/lib-esm/_InputField/slots.d.ts +13 -0
- package/lib-esm/_InputField/slots.js +5 -0
- package/lib-esm/_InputLabel.d.ts +8 -0
- package/lib-esm/_InputLabel.js +32 -0
- package/lib-esm/_InputValidation.d.ts +8 -0
- package/lib-esm/_InputValidation.js +43 -0
- package/lib-esm/_VisuallyHidden.d.ts +6 -0
- package/lib-esm/_VisuallyHidden.js +26 -0
- package/lib-esm/drafts.d.ts +0 -1
- package/lib-esm/drafts.js +1 -2
- package/lib-esm/index.d.ts +4 -0
- package/lib-esm/index.js +4 -0
- package/lib-esm/utils/types/FormValidationStatus.d.ts +1 -0
- package/lib-esm/utils/types/FormValidationStatus.js +1 -0
- package/package.json +9 -17
- package/lib/ActionList2/MenuContext.d.ts +0 -10
- package/lib/ActionMenu2.d.ts +0 -313
- package/lib/ActionMenu2.js +0 -91
- package/lib-esm/ActionList2/MenuContext.d.ts +0 -10
- package/lib-esm/ActionList2/MenuContext.js +0 -3
- package/lib-esm/ActionMenu2.d.ts +0 -313
- package/lib-esm/ActionMenu2.js +0 -67
@@ -0,0 +1,66 @@
|
|
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 _ = require(".");
|
11
|
+
|
12
|
+
var _InputField = _interopRequireDefault(require("./_InputField/InputField"));
|
13
|
+
|
14
|
+
var _slots = require("./_InputField/slots");
|
15
|
+
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
|
+
|
18
|
+
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); }
|
19
|
+
|
20
|
+
const Input = /*#__PURE__*/_react.default.forwardRef(({
|
21
|
+
as: Component = _.TextInput,
|
22
|
+
id: idProp,
|
23
|
+
required: requiredProp,
|
24
|
+
disabled: disabledProp,
|
25
|
+
...rest
|
26
|
+
}, ref) => {
|
27
|
+
if (idProp) {
|
28
|
+
// eslint-disable-next-line no-console
|
29
|
+
console.warn("instead of passing the 'id' prop directly to <TextInputField.Input>, it should be passed to the parent component, <TextInputField>");
|
30
|
+
}
|
31
|
+
|
32
|
+
if (disabledProp) {
|
33
|
+
// eslint-disable-next-line no-console
|
34
|
+
console.warn("instead of passing the 'disabled' prop directly to <TextInputField.Input>, it should be passed to the parent component, <TextInputField>");
|
35
|
+
}
|
36
|
+
|
37
|
+
if (requiredProp) {
|
38
|
+
// eslint-disable-next-line no-console
|
39
|
+
console.warn("instead of passing the 'required' prop directly to <TextInputField.Input>, it should be passed to the parent component, <TextInputField>");
|
40
|
+
}
|
41
|
+
|
42
|
+
return /*#__PURE__*/_react.default.createElement(_slots.Slot, {
|
43
|
+
name: "Input"
|
44
|
+
}, ({
|
45
|
+
disabled,
|
46
|
+
id,
|
47
|
+
required,
|
48
|
+
validationMessageId,
|
49
|
+
captionId
|
50
|
+
}) => /*#__PURE__*/_react.default.createElement(Component, _extends({
|
51
|
+
ref: ref,
|
52
|
+
"aria-describedby": [validationMessageId, captionId].filter(Boolean).join(' '),
|
53
|
+
id: id,
|
54
|
+
required: required,
|
55
|
+
disabled: disabled
|
56
|
+
}, rest)));
|
57
|
+
});
|
58
|
+
|
59
|
+
var _default = Object.assign(_InputField.default, {
|
60
|
+
Input,
|
61
|
+
Caption: _InputField.default.Caption,
|
62
|
+
Label: _InputField.default.Label,
|
63
|
+
Validation: _InputField.default.Validation
|
64
|
+
});
|
65
|
+
|
66
|
+
exports.default = _default;
|
@@ -39,7 +39,6 @@ declare const TextInputWithTokens: React.ForwardRefExoticComponent<Pick<{
|
|
39
39
|
} & Pick<Omit<Pick<{
|
40
40
|
[x: string]: any;
|
41
41
|
[x: number]: any;
|
42
|
-
[x: symbol]: any;
|
43
42
|
} & {
|
44
43
|
theme?: any;
|
45
44
|
} & {
|
@@ -52,7 +51,6 @@ declare const TextInputWithTokens: React.ForwardRefExoticComponent<Pick<{
|
|
52
51
|
}> | undefined;
|
53
52
|
} & Pick<{
|
54
53
|
color?: string | undefined;
|
55
|
-
property?: string | undefined;
|
56
54
|
maxWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
57
55
|
minWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
58
56
|
translate?: "yes" | "no" | undefined;
|
@@ -88,6 +86,7 @@ declare const TextInputWithTokens: React.ForwardRefExoticComponent<Pick<{
|
|
88
86
|
datatype?: string | undefined;
|
89
87
|
inlist?: any;
|
90
88
|
prefix?: string | undefined;
|
89
|
+
property?: string | undefined;
|
91
90
|
resource?: string | undefined;
|
92
91
|
typeof?: string | undefined;
|
93
92
|
vocab?: string | undefined;
|
package/lib/ThemeProvider.d.ts
CHANGED
@@ -16,7 +16,6 @@ export declare function useTheme(): {
|
|
16
16
|
colorScheme?: string | undefined;
|
17
17
|
colorMode?: ColorModeWithAuto | undefined;
|
18
18
|
resolvedColorMode?: ColorMode | undefined;
|
19
|
-
resolvedColorScheme?: string | undefined;
|
20
19
|
dayScheme?: string | undefined;
|
21
20
|
nightScheme?: string | undefined;
|
22
21
|
setColorMode: React.Dispatch<React.SetStateAction<ColorModeWithAuto>>;
|
package/lib/ThemeProvider.js
CHANGED
@@ -53,10 +53,7 @@ const ThemeProvider = ({
|
|
53
53
|
const resolvedColorMode = resolveColorMode(colorMode, systemColorMode);
|
54
54
|
const colorScheme = chooseColorScheme(resolvedColorMode, dayScheme, nightScheme);
|
55
55
|
|
56
|
-
const
|
57
|
-
resolvedTheme,
|
58
|
-
resolvedColorScheme
|
59
|
-
} = _react.default.useMemo(() => applyColorScheme(theme, colorScheme), [theme, colorScheme]); // Update state if props change
|
56
|
+
const resolvedTheme = _react.default.useMemo(() => applyColorScheme(theme, colorScheme), [theme, colorScheme]); // Update state if props change
|
60
57
|
|
61
58
|
|
62
59
|
_react.default.useEffect(() => {
|
@@ -83,7 +80,6 @@ const ThemeProvider = ({
|
|
83
80
|
colorScheme,
|
84
81
|
colorMode,
|
85
82
|
resolvedColorMode,
|
86
|
-
resolvedColorScheme,
|
87
83
|
dayScheme,
|
88
84
|
nightScheme,
|
89
85
|
setColorMode,
|
@@ -179,10 +175,7 @@ function chooseColorScheme(colorMode, dayScheme, nightScheme) {
|
|
179
175
|
|
180
176
|
function applyColorScheme(theme, colorScheme) {
|
181
177
|
if (!theme.colorSchemes) {
|
182
|
-
return
|
183
|
-
resolvedTheme: theme,
|
184
|
-
resolvedColorScheme: undefined
|
185
|
-
};
|
178
|
+
return theme;
|
186
179
|
}
|
187
180
|
|
188
181
|
if (!theme.colorSchemes[colorScheme]) {
|
@@ -190,16 +183,10 @@ function applyColorScheme(theme, colorScheme) {
|
|
190
183
|
console.error(`\`${colorScheme}\` scheme not defined in \`theme.colorSchemes\``); // Apply the first defined color scheme
|
191
184
|
|
192
185
|
const defaultColorScheme = Object.keys(theme.colorSchemes)[0];
|
193
|
-
return
|
194
|
-
resolvedTheme: (0, _deepmerge.default)(theme, theme.colorSchemes[defaultColorScheme]),
|
195
|
-
resolvedColorScheme: defaultColorScheme
|
196
|
-
};
|
186
|
+
return (0, _deepmerge.default)(theme, theme.colorSchemes[defaultColorScheme]);
|
197
187
|
}
|
198
188
|
|
199
|
-
return
|
200
|
-
resolvedTheme: (0, _deepmerge.default)(theme, theme.colorSchemes[colorScheme]),
|
201
|
-
resolvedColorScheme: colorScheme
|
202
|
-
};
|
189
|
+
return (0, _deepmerge.default)(theme, theme.colorSchemes[colorScheme]);
|
203
190
|
}
|
204
191
|
|
205
192
|
var _default = ThemeProvider;
|
package/lib/Timeline.js
CHANGED
@@ -25,14 +25,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
25
25
|
|
26
26
|
const Timeline = _styledComponents.default.div.withConfig({
|
27
27
|
displayName: "Timeline",
|
28
|
-
componentId: "
|
28
|
+
componentId: "c4dq2e-0"
|
29
29
|
})(["display:flex;flex-direction:column;", " ", ";"], props => props.clipSidebar && (0, _styledComponents.css)([".Timeline-Item:first-child{padding-top:0;}.Timeline-Item:last-child{padding-bottom:0;}"]), _sx.default);
|
30
30
|
|
31
31
|
const TimelineItem = _styledComponents.default.div.attrs(props => ({
|
32
32
|
className: (0, _classnames.default)('Timeline-Item', props.className)
|
33
33
|
})).withConfig({
|
34
34
|
displayName: "Timeline__TimelineItem",
|
35
|
-
componentId: "
|
35
|
+
componentId: "c4dq2e-1"
|
36
36
|
})(["display:flex;position:relative;padding:", " 0;margin-left:", ";&::before{position:absolute;top:0;bottom:0;left:0;display:block;width:2px;content:'';background-color:", ";}", " ", ";"], (0, _constants.get)('space.3'), (0, _constants.get)('space.3'), (0, _constants.get)('colors.border.muted'), props => props.condensed && (0, _styledComponents.css)(["padding-top:", ";padding-bottom:0;&:last-child{padding-bottom:", ";}.TimelineItem-Badge{height:16px;margin-top:", ";margin-bottom:", ";color:", ";background-color:", ";border:0;}"], (0, _constants.get)('space.1'), (0, _constants.get)('space.3'), (0, _constants.get)('space.2'), (0, _constants.get)('space.2'), (0, _constants.get)('colors.fg.muted'), (0, _constants.get)('colors.canvas.default')), _sx.default);
|
37
37
|
|
38
38
|
const TimelineBadge = props => {
|
@@ -64,12 +64,12 @@ TimelineBadge.displayName = "TimelineBadge";
|
|
64
64
|
|
65
65
|
const TimelineBody = _styledComponents.default.div.withConfig({
|
66
66
|
displayName: "Timeline__TimelineBody",
|
67
|
-
componentId: "
|
67
|
+
componentId: "c4dq2e-2"
|
68
68
|
})(["min-width:0;max-width:100%;margin-top:", ";color:", ";flex:auto;font-size:", ";", ";"], (0, _constants.get)('space.1'), (0, _constants.get)('colors.fg.muted'), (0, _constants.get)('fontSizes.1'), _sx.default);
|
69
69
|
|
70
70
|
const TimelineBreak = _styledComponents.default.div.withConfig({
|
71
71
|
displayName: "Timeline__TimelineBreak",
|
72
|
-
componentId: "
|
72
|
+
componentId: "c4dq2e-3"
|
73
73
|
})(["position:relative z-index:1;height:24px;margin:0;margin-bottom:-", ";margin-left:0;background-color:", ";border:0;border-top:", " solid ", ";", ";"], (0, _constants.get)('space.3'), (0, _constants.get)('colors.canvas.default'), (0, _constants.get)('space.1'), (0, _constants.get)('colors.border.default'), _sx.default);
|
74
74
|
|
75
75
|
TimelineItem.displayName = 'Timeline.Item';
|
@@ -3,5 +3,5 @@ import { TokenBaseProps } from './TokenBase';
|
|
3
3
|
export interface AvatarTokenProps extends TokenBaseProps {
|
4
4
|
avatarSrc: string;
|
5
5
|
}
|
6
|
-
declare const AvatarToken: React.ForwardRefExoticComponent<Pick<AvatarTokenProps, "default" | "muted" | "sizes" | "color" | "
|
6
|
+
declare const AvatarToken: React.ForwardRefExoticComponent<Pick<AvatarTokenProps, "default" | "muted" | "sizes" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "children" | "value" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "text" | "start" | "size" | "wrap" | "open" | "list" | "multiple" | "role" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "as" | "step" | "disabled" | "selected" | "download" | "href" | "hrefLang" | "media" | "rel" | "target" | "max" | "method" | "min" | "crossOrigin" | "classID" | "useMap" | "wmode" | "integrity" | "charSet" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "rows" | "kind" | "srcLang" | "poster" | "onRemove" | "isSelected" | "avatarSrc"> & React.RefAttributes<HTMLElement>>;
|
7
7
|
export default AvatarToken;
|
package/lib/Token/AvatarToken.js
CHANGED
@@ -27,7 +27,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
27
27
|
|
28
28
|
const AvatarContainer = _styledComponents.default.span.withConfig({
|
29
29
|
displayName: "AvatarToken__AvatarContainer",
|
30
|
-
componentId: "
|
30
|
+
componentId: "ubyudc-0"
|
31
31
|
})(["--spacing:calc(", " * 2);display:block;height:", ";width:", ";"], (0, _constants.get)('space.1'), props => `calc(${_TokenBase.tokenSizes[props.avatarSize]} - var(--spacing))`, props => `calc(${_TokenBase.tokenSizes[props.avatarSize]} - var(--spacing))`);
|
32
32
|
|
33
33
|
const AvatarToken = /*#__PURE__*/(0, _react.forwardRef)(({
|
@@ -10,5 +10,5 @@ export interface IssueLabelTokenProps extends TokenBaseProps {
|
|
10
10
|
*/
|
11
11
|
hideRemoveButton?: boolean;
|
12
12
|
}
|
13
|
-
declare const IssueLabelToken: React.ForwardRefExoticComponent<Pick<IssueLabelTokenProps, "default" | "muted" | "sizes" | "color" | "
|
13
|
+
declare const IssueLabelToken: React.ForwardRefExoticComponent<Pick<IssueLabelTokenProps, "default" | "muted" | "sizes" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "children" | "value" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "text" | "start" | "size" | "wrap" | "open" | "list" | "multiple" | "role" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "as" | "step" | "disabled" | "selected" | "download" | "href" | "hrefLang" | "media" | "rel" | "target" | "max" | "method" | "min" | "crossOrigin" | "classID" | "useMap" | "wmode" | "integrity" | "charSet" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "rows" | "kind" | "srcLang" | "poster" | "onRemove" | "isSelected" | "hideRemoveButton" | "fillColor"> & React.RefAttributes<HTMLElement>>;
|
14
14
|
export default IssueLabelToken;
|
package/lib/Token/Token.d.ts
CHANGED
@@ -11,5 +11,5 @@ export interface TokenProps extends TokenBaseProps {
|
|
11
11
|
*/
|
12
12
|
hideRemoveButton?: boolean;
|
13
13
|
}
|
14
|
-
declare const Token: React.ForwardRefExoticComponent<Pick<TokenProps & SxProp, "default" | "muted" | "sizes" | "color" | "
|
14
|
+
declare const Token: React.ForwardRefExoticComponent<Pick<TokenProps & SxProp, "default" | "muted" | "sizes" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "children" | "value" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "text" | "start" | "size" | "wrap" | "open" | "list" | "multiple" | "role" | "sx" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "as" | "step" | "disabled" | "selected" | "download" | "href" | "hrefLang" | "media" | "rel" | "target" | "max" | "method" | "min" | "crossOrigin" | "classID" | "useMap" | "wmode" | "integrity" | "charSet" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "rows" | "kind" | "srcLang" | "poster" | "leadingVisual" | "onRemove" | "isSelected" | "hideRemoveButton"> & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement | HTMLSpanElement>>;
|
15
15
|
export default Token;
|
package/lib/Token/TokenBase.js
CHANGED
@@ -93,7 +93,7 @@ const TokenBase = _styledComponents.default.span.attrs(({
|
|
93
93
|
'aria-label': onRemove ? `${text}, press backspace or delete to remove` : undefined
|
94
94
|
})).withConfig({
|
95
95
|
displayName: "TokenBase",
|
96
|
-
componentId: "
|
96
|
+
componentId: "opajvp-0"
|
97
97
|
})(["align-items:center;border-radius:999px;cursor:", ";display:inline-flex;font-weight:", ";font-family:inherit;text-decoration:none;white-space:nowrap;", " ", ""], props => isTokenInteractive(props) ? 'pointer' : 'auto', (0, _constants.get)('fontWeights.bold'), variants, _sx.default);
|
98
98
|
|
99
99
|
TokenBase.defaultProps = {
|
package/lib/Tooltip.js
CHANGED
@@ -21,7 +21,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
21
21
|
|
22
22
|
const TooltipBase = _styledComponents.default.span.withConfig({
|
23
23
|
displayName: "Tooltip__TooltipBase",
|
24
|
-
componentId: "
|
24
|
+
componentId: "kp39nc-0"
|
25
25
|
})(["position:relative;&::before{position:absolute;z-index:1000001;display:none;width:0px;height:0px;color:", ";pointer-events:none;content:'';border:6px solid transparent;opacity:0;}&::after{position:absolute;z-index:1000000;display:none;padding:0.5em 0.75em;font:normal normal 11px/1.5 ", ";-webkit-font-smoothing:subpixel-antialiased;color:", ";text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:", ";border-radius:", ";opacity:0;}@keyframes tooltip-appear{from{opacity:0;}to{opacity:1;}}&:hover,&:active,&:focus{&::before,&::after{display:inline-block;text-decoration:none;animation-name:tooltip-appear;animation-duration:0.1s;animation-fill-mode:forwards;animation-timing-function:ease-in;animation-delay:0.4s;}}&.tooltipped-no-delay:hover,&.tooltipped-no-delay:active,&.tooltipped-no-delay:focus{&::before,&::after{animation-delay:0s;}}&.tooltipped-multiline:hover,&.tooltipped-multiline:active,&.tooltipped-multiline:focus{&::after{display:table-cell;}}&.tooltipped-s,&.tooltipped-se,&.tooltipped-sw{&::after{top:100%;right:50%;margin-top:6px;}&::before{top:auto;right:50%;bottom:-7px;margin-right:-6px;border-bottom-color:", ";}}&.tooltipped-se{&::after{right:auto;left:50%;margin-left:-", ";}}&.tooltipped-sw::after{margin-right:-", ";}&.tooltipped-n,&.tooltipped-ne,&.tooltipped-nw{&::after{right:50%;bottom:100%;margin-bottom:6px;}&::before{top:-7px;right:50%;bottom:auto;margin-right:-6px;border-top-color:", ";}}&.tooltipped-ne{&::after{right:auto;left:50%;margin-left:-", ";}}&.tooltipped-nw::after{margin-right:-", ";}&.tooltipped-s::after,&.tooltipped-n::after{transform:translateX(50%);}&.tooltipped-w{&::after{right:100%;bottom:50%;margin-right:6px;transform:translateY(50%);}&::before{top:50%;bottom:50%;left:-7px;margin-top:-6px;border-left-color:", ";}}&.tooltipped-e{&::after{bottom:50%;left:100%;margin-left:6px;transform:translateY(50%);}&::before{top:50%;right:-7px;bottom:50%;margin-top:-6px;border-right-color:", ";}}&.tooltipped-multiline{&::after{width:max-content;max-width:250px;word-wrap:break-word;white-space:pre-line;border-collapse:separate;}&.tooltipped-s::after,&.tooltipped-n::after{right:auto;left:50%;transform:translateX(-50%);}&.tooltipped-w::after,&.tooltipped-e::after{right:100%;}}&.tooltipped-align-right-2::after{right:0;margin-right:0;}&.tooltipped-align-right-2::before{right:15px;}&.tooltipped-align-left-2::after{left:0;margin-left:0;}&.tooltipped-align-left-2::before{left:10px;}", ";"], (0, _constants.get)('colors.neutral.emphasisPlus'), (0, _constants.get)('fonts.normal'), (0, _constants.get)('colors.fg.onEmphasis'), (0, _constants.get)('colors.neutral.emphasisPlus'), (0, _constants.get)('radii.1'), (0, _constants.get)('colors.neutral.emphasisPlus'), (0, _constants.get)('space.3'), (0, _constants.get)('space.3'), (0, _constants.get)('colors.neutral.emphasisPlus'), (0, _constants.get)('space.3'), (0, _constants.get)('space.3'), (0, _constants.get)('colors.neutral.emphasisPlus'), (0, _constants.get)('colors.neutral.emphasisPlus'), _sx.default);
|
26
26
|
|
27
27
|
function Tooltip({
|
package/lib/UnderlineNav.js
CHANGED
@@ -24,7 +24,7 @@ const SELECTED_CLASS = 'selected';
|
|
24
24
|
|
25
25
|
const UnderlineNavBase = _styledComponents.default.nav.withConfig({
|
26
26
|
displayName: "UnderlineNav__UnderlineNavBase",
|
27
|
-
componentId: "
|
27
|
+
componentId: "zrnxqt-0"
|
28
28
|
})(["display:flex;justify-content:space-between;border-bottom:1px solid ", ";&.UnderlineNav--right{justify-content:flex-end;.UnderlineNav-item{margin-right:0;margin-left:", ";}.UnderlineNav-actions{flex:1 1 auto;}}&.UnderlineNav--full{display:block;}.UnderlineNav-body{display:flex;margin-bottom:-1px;}.UnderlineNav-actions{align-self:center;}", ";"], (0, _constants.get)('colors.border.muted'), (0, _constants.get)('space.3'), _sx.default);
|
29
29
|
|
30
30
|
function UnderlineNav({
|
@@ -56,7 +56,7 @@ const UnderlineNavLink = _styledComponents.default.a.attrs(props => ({
|
|
56
56
|
className: (0, _classnames.default)(ITEM_CLASS, props.selected && SELECTED_CLASS, props.className)
|
57
57
|
})).withConfig({
|
58
58
|
displayName: "UnderlineNav__UnderlineNavLink",
|
59
|
-
componentId: "
|
59
|
+
componentId: "zrnxqt-1"
|
60
60
|
})(["padding:", " ", ";margin-right:", ";font-size:", ";line-height:", ";color:", ";text-align:center;border-bottom:2px solid transparent;text-decoration:none;&:hover,&:focus{color:", ";text-decoration:none;border-bottom-color:", ";transition:0.2s ease;.UnderlineNav-octicon{color:", ";}}&.selected{color:", ";border-bottom-color:", ";.UnderlineNav-octicon{color:", ";}}", ";"], (0, _constants.get)('space.3'), (0, _constants.get)('space.2'), (0, _constants.get)('space.3'), (0, _constants.get)('fontSizes.1'), (0, _constants.get)('lineHeights.default'), (0, _constants.get)('colors.fg.default'), (0, _constants.get)('colors.fg.default'), (0, _constants.get)('colors.neutral.muted'), (0, _constants.get)('colors.fg.muted'), (0, _constants.get)('colors.fg.default'), (0, _constants.get)('colors.primer.border.active'), (0, _constants.get)('colors.fg.default'), _sx.default);
|
61
61
|
|
62
62
|
UnderlineNavLink.displayName = 'UnderlineNav.Link';
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
interface Props {
|
3
|
+
/**
|
4
|
+
* The unique identifier used to associate the caption with an input
|
5
|
+
*/
|
6
|
+
id: string;
|
7
|
+
/**
|
8
|
+
* Whether the input associated with this caption is disabled
|
9
|
+
*/
|
10
|
+
disabled?: boolean;
|
11
|
+
}
|
12
|
+
declare const InputCaption: React.FC<Props>;
|
13
|
+
export default InputCaption;
|
@@ -0,0 +1,27 @@
|
|
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 _ = require(".");
|
11
|
+
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
|
+
|
14
|
+
const InputCaption = ({
|
15
|
+
children,
|
16
|
+
disabled,
|
17
|
+
id
|
18
|
+
}) => /*#__PURE__*/_react.default.createElement(_.Text, {
|
19
|
+
color: disabled ? 'fg.subtle' : 'fg.muted',
|
20
|
+
display: "block",
|
21
|
+
fontSize: 0,
|
22
|
+
id: id
|
23
|
+
}, children);
|
24
|
+
|
25
|
+
InputCaption.displayName = "InputCaption";
|
26
|
+
var _default = InputCaption;
|
27
|
+
exports.default = _default;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ComponentProps } from '../utils/types';
|
3
|
+
import { FormValidationStatus } from '../utils/types/FormValidationStatus';
|
4
|
+
export interface Props<T = Record<string, FormValidationStatus>> {
|
5
|
+
children?: React.ReactNode;
|
6
|
+
/**
|
7
|
+
* Whether the field is ready for user input
|
8
|
+
*/
|
9
|
+
disabled?: boolean;
|
10
|
+
/**
|
11
|
+
* The unique identifier for this field. Used to associate the label, validation text, and caption text
|
12
|
+
*/
|
13
|
+
id?: string;
|
14
|
+
/**
|
15
|
+
* Whether this field must have a value for the user to complete their task
|
16
|
+
*/
|
17
|
+
required?: boolean;
|
18
|
+
/**
|
19
|
+
* A map of validation statuses and their associated validation keys. When one of the validation keys is passed to the `validationResult` prop,
|
20
|
+
* the associated validation message will be rendered in the correct style
|
21
|
+
*/
|
22
|
+
validationMap?: T;
|
23
|
+
/**
|
24
|
+
* The key of the validation message to show
|
25
|
+
*/
|
26
|
+
validationResult?: keyof T;
|
27
|
+
}
|
28
|
+
export interface InputFieldContext extends Pick<Props<Record<string, FormValidationStatus>>, 'disabled' | 'id' | 'required'> {
|
29
|
+
captionId: string;
|
30
|
+
validationMessageId: string;
|
31
|
+
}
|
32
|
+
declare const InputField: <T extends Record<string, FormValidationStatus>>({ children, disabled, id: idProp, required, validationMap, validationResult }: Props<T>) => JSX.Element;
|
33
|
+
export declare type InputFieldComponentProps = ComponentProps<typeof InputField>;
|
34
|
+
declare const _default: (<T extends Record<string, FormValidationStatus>>({ children, disabled, id: idProp, required, validationMap, validationResult }: Props<T>) => JSX.Element) & {
|
35
|
+
Caption: React.FC<{}>;
|
36
|
+
Label: React.FC<import("./InputFieldLabel").Props>;
|
37
|
+
Validation: React.FC<import("./InputFieldValidation").InputFieldValidationProps>;
|
38
|
+
};
|
39
|
+
export default _default;
|
@@ -0,0 +1,90 @@
|
|
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 _ = require("..");
|
11
|
+
|
12
|
+
var _InputValidation = _interopRequireDefault(require("../_InputValidation"));
|
13
|
+
|
14
|
+
var _uniqueId = require("../utils/uniqueId");
|
15
|
+
|
16
|
+
var _InputFieldCaption = _interopRequireDefault(require("./InputFieldCaption"));
|
17
|
+
|
18
|
+
var _InputFieldLabel = _interopRequireDefault(require("./InputFieldLabel"));
|
19
|
+
|
20
|
+
var _InputFieldValidation = _interopRequireDefault(require("./InputFieldValidation"));
|
21
|
+
|
22
|
+
var _slots = require("./slots");
|
23
|
+
|
24
|
+
var _ValidationAnimationContainer = _interopRequireDefault(require("./ValidationAnimationContainer"));
|
25
|
+
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
27
|
+
|
28
|
+
const InputField = ({
|
29
|
+
children,
|
30
|
+
disabled,
|
31
|
+
id: idProp,
|
32
|
+
required,
|
33
|
+
validationMap,
|
34
|
+
validationResult
|
35
|
+
}) => {
|
36
|
+
var _React$Children$map, _React$Children$map2;
|
37
|
+
|
38
|
+
const id = idProp || (0, _uniqueId.uniqueId)();
|
39
|
+
const validationChildren = (_React$Children$map = _react.default.Children.map(children, child => /*#__PURE__*/_react.default.isValidElement(child) && child.type === _InputFieldValidation.default ? child : null)) === null || _React$Children$map === void 0 ? void 0 : _React$Children$map.filter(Boolean);
|
40
|
+
const captionChildren = (_React$Children$map2 = _react.default.Children.map(children, child => /*#__PURE__*/_react.default.isValidElement(child) && child.type === _InputFieldCaption.default ? child : null)) === null || _React$Children$map2 === void 0 ? void 0 : _React$Children$map2.filter(Boolean);
|
41
|
+
const validationChildToRender = validationChildren === null || validationChildren === void 0 ? void 0 : validationChildren.find(child => child.props.validationKey === validationResult);
|
42
|
+
const validationMessageId = validationChildToRender ? `${id}-validationMsg` : undefined;
|
43
|
+
const captionId = captionChildren !== null && captionChildren !== void 0 && captionChildren.length ? `${id}-caption` : undefined;
|
44
|
+
return /*#__PURE__*/_react.default.createElement(_slots.Slots, {
|
45
|
+
context: {
|
46
|
+
captionId,
|
47
|
+
disabled,
|
48
|
+
id,
|
49
|
+
required,
|
50
|
+
validationMessageId
|
51
|
+
}
|
52
|
+
}, slots => {
|
53
|
+
const isLabelHidden = /*#__PURE__*/_react.default.isValidElement(slots.Label) && slots.Label.props.visuallyHidden;
|
54
|
+
|
55
|
+
if (slots.Input && !slots.Label) {
|
56
|
+
// eslint-disable-next-line no-console
|
57
|
+
console.error(`The input field with the id ${id} MUST have a Label child (e.g.: <TextInputField.Label>).\n\nIf you want to hide the label, pass the 'visuallyHidden' prop to the Label component.`);
|
58
|
+
}
|
59
|
+
|
60
|
+
return /*#__PURE__*/_react.default.createElement(_.Box, {
|
61
|
+
display: "flex",
|
62
|
+
flexDirection: "column",
|
63
|
+
width: "100%",
|
64
|
+
sx: isLabelHidden ? {
|
65
|
+
'> *:not(label) + *': {
|
66
|
+
marginTop: 2
|
67
|
+
}
|
68
|
+
} : {
|
69
|
+
'> * + *': {
|
70
|
+
marginTop: 2
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}, _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && child.type !== _InputFieldValidation.default), slots.Label, slots.Input, validationChildToRender && validationMap && validationResult && validationMessageId && /*#__PURE__*/_react.default.createElement(_ValidationAnimationContainer.default, {
|
74
|
+
show: true
|
75
|
+
}, /*#__PURE__*/_react.default.createElement(_InputValidation.default, {
|
76
|
+
validationStatus: validationMap[validationResult],
|
77
|
+
id: validationMessageId
|
78
|
+
}, validationChildToRender)), slots.Caption);
|
79
|
+
});
|
80
|
+
};
|
81
|
+
|
82
|
+
InputField.displayName = "InputField";
|
83
|
+
|
84
|
+
var _default = Object.assign(InputField, {
|
85
|
+
Caption: _InputFieldCaption.default,
|
86
|
+
Label: _InputFieldLabel.default,
|
87
|
+
Validation: _InputFieldValidation.default
|
88
|
+
});
|
89
|
+
|
90
|
+
exports.default = _default;
|
@@ -0,0 +1,30 @@
|
|
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 _InputCaption = _interopRequireDefault(require("../_InputCaption"));
|
11
|
+
|
12
|
+
var _slots = require("./slots");
|
13
|
+
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
|
+
|
16
|
+
const InputFieldCaption = ({
|
17
|
+
children
|
18
|
+
}) => /*#__PURE__*/_react.default.createElement(_slots.Slot, {
|
19
|
+
name: "Caption"
|
20
|
+
}, ({
|
21
|
+
captionId,
|
22
|
+
disabled
|
23
|
+
}) => /*#__PURE__*/_react.default.createElement(_InputCaption.default, {
|
24
|
+
id: captionId,
|
25
|
+
disabled: disabled
|
26
|
+
}, children));
|
27
|
+
|
28
|
+
InputFieldCaption.displayName = "InputFieldCaption";
|
29
|
+
var _default = InputFieldCaption;
|
30
|
+
exports.default = _default;
|