@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
@@ -48,15 +48,15 @@ const getItemVariant = (variant = 'default', disabled) => {
|
|
48
48
|
|
49
49
|
const DividedContent = styled.div.withConfig({
|
50
50
|
displayName: "Item__DividedContent",
|
51
|
-
componentId: "
|
51
|
+
componentId: "jqpvy8-0"
|
52
52
|
})(["display:flex;min-width:0;position:relative;flex-grow:1;"]);
|
53
53
|
const MainContent = styled.div.withConfig({
|
54
54
|
displayName: "Item__MainContent",
|
55
|
-
componentId: "
|
55
|
+
componentId: "jqpvy8-1"
|
56
56
|
})(["align-items:baseline;display:flex;min-width:0;flex-direction:var(--main-content-flex-direction);flex-grow:1;"]);
|
57
57
|
const StyledItem = styled.div.withConfig({
|
58
58
|
displayName: "Item__StyledItem",
|
59
|
-
componentId: "
|
59
|
+
componentId: "jqpvy8-2"
|
60
60
|
})(["padding:6px ", ";display:flex;border-radius:", ";color:", ";transition:background 33.333ms linear;text-decoration:none;@media (hover:hover) and (pointer:fine){:hover{background:var( --item-hover-bg-override,", " );color:", ";cursor:", ";}}:not(:first-of-type):not(", " + &):not(", " + &){margin-top:", ";", "::before{content:' ';display:block;position:absolute;width:100%;top:-7px;border:0 solid ", ";border-top-width:", ";}}&:hover ", "::before,:hover + * ", "::before{border-color:var(--item-hover-divider-border-color-override,transparent) !important;}&:focus ", "::before,:focus + * ", "::before,&[", "] ", "::before,[", "] + & ", "::before{border-color:transparent !important;}&[", "='", "']{background:", ";}&[", "='", "']{background:", ";}&:focus{background:", ";outline:none;}&:active{background:", ";}", ""], get('space.2'), get('radii.2'), ({
|
61
61
|
variant,
|
62
62
|
item
|
@@ -88,37 +88,37 @@ const StyledItem = styled.div.withConfig({
|
|
88
88
|
}) => getItemVariant(variant, item === null || item === void 0 ? void 0 : item.disabled).focusBg, sx);
|
89
89
|
export const TextContainer = styled.span.withConfig({
|
90
90
|
displayName: "Item__TextContainer",
|
91
|
-
componentId: "
|
91
|
+
componentId: "jqpvy8-3"
|
92
92
|
})([""]);
|
93
93
|
const BaseVisualContainer = styled.div.withConfig({
|
94
94
|
displayName: "Item__BaseVisualContainer",
|
95
|
-
componentId: "
|
95
|
+
componentId: "jqpvy8-4"
|
96
96
|
})(["height:20px;width:", ";margin-right:", ";display:flex;justify-content:center;align-items:center;flex-shrink:0;"], get('space.3'), get('space.2'));
|
97
97
|
const ColoredVisualContainer = styled(BaseVisualContainer).withConfig({
|
98
98
|
displayName: "Item__ColoredVisualContainer",
|
99
|
-
componentId: "
|
99
|
+
componentId: "jqpvy8-5"
|
100
100
|
})(["svg{fill:", ";font-size:", ";}"], ({
|
101
101
|
variant,
|
102
102
|
disabled
|
103
103
|
}) => getItemVariant(variant, disabled).iconColor, get('fontSizes.0'));
|
104
104
|
const LeadingVisualContainer = styled(ColoredVisualContainer).withConfig({
|
105
105
|
displayName: "Item__LeadingVisualContainer",
|
106
|
-
componentId: "
|
106
|
+
componentId: "jqpvy8-6"
|
107
107
|
})(["display:flex;flex-direction:column;justify-content:center;"]);
|
108
108
|
const TrailingContent = styled(ColoredVisualContainer).withConfig({
|
109
109
|
displayName: "Item__TrailingContent",
|
110
|
-
componentId: "
|
110
|
+
componentId: "jqpvy8-7"
|
111
111
|
})(["color:", "};margin-left:", ";margin-right:0;width:auto;div:nth-child(2){margin-left:", ";}"], ({
|
112
112
|
variant,
|
113
113
|
disabled
|
114
114
|
}) => getItemVariant(variant, disabled).annotationColor, get('space.2'), get('space.2'));
|
115
115
|
const DescriptionContainer = styled.span.withConfig({
|
116
116
|
displayName: "Item__DescriptionContainer",
|
117
|
-
componentId: "
|
117
|
+
componentId: "jqpvy8-8"
|
118
118
|
})(["color:", ";font-size:", ";line-height:16px;margin-left:var(--description-container-margin-left);min-width:0;flex-grow:1;flex-basis:var(--description-container-flex-basis);"], get('colors.fg.muted'), get('fontSizes.0'));
|
119
119
|
const MultiSelectIcon = styled.svg.withConfig({
|
120
120
|
displayName: "Item__MultiSelectIcon",
|
121
|
-
componentId: "
|
121
|
+
componentId: "jqpvy8-9"
|
122
122
|
})(["rect{fill:", ";stroke:", ";shape-rendering:auto;}path{fill:", ";boxshadow:", ";opacity:", ";}"], ({
|
123
123
|
selected
|
124
124
|
}) => selected ? get('colors.accent.fg') : get('colors.canvas.default'), ({
|
@@ -22,7 +22,7 @@ function isGroupedListProps(props) {
|
|
22
22
|
|
23
23
|
const StyledList = styled.div.withConfig({
|
24
24
|
displayName: "List__StyledList",
|
25
|
-
componentId: "
|
25
|
+
componentId: "yr2k7d-0"
|
26
26
|
})(["font-size:", ";line-height:20px;&[", "],&:focus-within{--item-hover-bg-override:none;--item-hover-divider-border-color-override:", ";}"], get('fontSizes.1'), hasActiveDescendantAttribute, get('colors.border.muted'));
|
27
27
|
/**
|
28
28
|
* Returns `sx` prop values for `List` children matching the given `List` style variation.
|
@@ -1,6 +1,5 @@
|
|
1
|
-
|
2
|
-
import { SxProp } from '../sx';
|
1
|
+
/// <reference types="react" />
|
3
2
|
/**
|
4
3
|
* Visually separates `Item`s or `Group`s in an `ActionList`.
|
5
4
|
*/
|
6
|
-
export declare
|
5
|
+
export declare function Divider(): JSX.Element;
|
@@ -1,26 +1,23 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import Box from '../Box';
|
3
3
|
import { get } from '../constants';
|
4
|
-
|
4
|
+
|
5
5
|
/**
|
6
6
|
* Visually separates `Item`s or `Group`s in an `ActionList`.
|
7
7
|
*/
|
8
|
-
|
9
|
-
export const Divider = ({
|
10
|
-
sx = {}
|
11
|
-
}) => {
|
8
|
+
export function Divider() {
|
12
9
|
return /*#__PURE__*/React.createElement(Box, {
|
13
10
|
as: "li",
|
14
11
|
role: "separator",
|
15
|
-
sx:
|
12
|
+
sx: {
|
16
13
|
height: 1,
|
17
14
|
backgroundColor: 'actionListItem.inlineDivider',
|
18
15
|
marginTop: theme => `calc(${get('space.2')(theme)} - 1px)`,
|
19
16
|
marginBottom: 2,
|
20
17
|
listStyle: 'none' // hide the ::marker inserted by browser's stylesheet
|
21
18
|
|
22
|
-
},
|
19
|
+
},
|
23
20
|
"data-component": "ActionList.Divider"
|
24
21
|
});
|
25
|
-
}
|
22
|
+
}
|
26
23
|
Divider.displayName = "Divider";
|
@@ -8,7 +8,6 @@ import Box from '../Box';
|
|
8
8
|
import sx, { merge } from '../sx';
|
9
9
|
import createSlots from '../utils/create-slots';
|
10
10
|
import { ListContext } from './List';
|
11
|
-
import { MenuContext } from './MenuContext';
|
12
11
|
import { Selection } from './Selection';
|
13
12
|
export const getVariantStyles = (variant, disabled) => {
|
14
13
|
if (disabled) {
|
@@ -44,7 +43,7 @@ const {
|
|
44
43
|
export { Slot };
|
45
44
|
const LiBox = styled.li.withConfig({
|
46
45
|
displayName: "Item__LiBox",
|
47
|
-
componentId: "
|
46
|
+
componentId: "c3scat-0"
|
48
47
|
})(sx);
|
49
48
|
export const TEXT_ROW_HEIGHT = '20px'; // custom value off the scale
|
50
49
|
|
@@ -55,7 +54,6 @@ export const Item = /*#__PURE__*/React.forwardRef(({
|
|
55
54
|
onSelect,
|
56
55
|
sx: sxProp = {},
|
57
56
|
id,
|
58
|
-
role,
|
59
57
|
_PrivateItemWrapper,
|
60
58
|
...props
|
61
59
|
}, forwardedRef) => {
|
@@ -63,10 +61,6 @@ export const Item = /*#__PURE__*/React.forwardRef(({
|
|
63
61
|
variant: listVariant,
|
64
62
|
showDividers
|
65
63
|
} = React.useContext(ListContext);
|
66
|
-
const {
|
67
|
-
itemRole,
|
68
|
-
afterSelect
|
69
|
-
} = React.useContext(MenuContext);
|
70
64
|
const {
|
71
65
|
theme
|
72
66
|
} = useTheme();
|
@@ -141,23 +135,16 @@ export const Item = /*#__PURE__*/React.forwardRef(({
|
|
141
135
|
const clickHandler = React.useCallback(event => {
|
142
136
|
if (typeof onSelect !== 'function') return;
|
143
137
|
if (disabled) return;
|
144
|
-
|
145
|
-
|
146
|
-
onSelect(event); // if this Item is inside a Menu, close the Menu
|
147
|
-
|
148
|
-
if (typeof afterSelect === 'function') afterSelect();
|
149
|
-
}
|
150
|
-
}, [onSelect, disabled, afterSelect]);
|
138
|
+
if (!event.defaultPrevented) onSelect(event);
|
139
|
+
}, [onSelect, disabled]);
|
151
140
|
const keyPressHandler = React.useCallback(event => {
|
152
141
|
if (typeof onSelect !== 'function') return;
|
153
142
|
if (disabled) return;
|
154
143
|
|
155
144
|
if (!event.defaultPrevented && [' ', 'Enter'].includes(event.key)) {
|
156
|
-
onSelect(event);
|
157
|
-
|
158
|
-
if (typeof afterSelect === 'function') afterSelect();
|
145
|
+
onSelect(event);
|
159
146
|
}
|
160
|
-
}, [onSelect, disabled
|
147
|
+
}, [onSelect, disabled]); // use props.id if provided, otherwise generate one.
|
161
148
|
|
162
149
|
const labelId = useSSRSafeId(id);
|
163
150
|
const inlineDescriptionId = useSSRSafeId(id && `${id}--inline-description`);
|
@@ -179,8 +166,7 @@ export const Item = /*#__PURE__*/React.forwardRef(({
|
|
179
166
|
"aria-disabled": disabled ? true : undefined,
|
180
167
|
tabIndex: disabled || _PrivateItemWrapper ? undefined : 0,
|
181
168
|
"aria-labelledby": `${labelId} ${slots.InlineDescription ? inlineDescriptionId : ''}`,
|
182
|
-
"aria-describedby": slots.BlockDescription ? blockDescriptionId : undefined
|
183
|
-
role: role || itemRole
|
169
|
+
"aria-describedby": slots.BlockDescription ? blockDescriptionId : undefined
|
184
170
|
}, props), /*#__PURE__*/React.createElement(ItemWrapper, null, /*#__PURE__*/React.createElement(Selection, {
|
185
171
|
selected: selected
|
186
172
|
}), slots.LeadingVisual, /*#__PURE__*/React.createElement(Box, {
|
@@ -3,17 +3,15 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
3
3
|
import React from 'react';
|
4
4
|
import styled from 'styled-components';
|
5
5
|
import sx, { merge } from '../sx';
|
6
|
-
import { MenuContext } from './MenuContext';
|
7
6
|
export const ListContext = /*#__PURE__*/React.createContext({});
|
8
7
|
const ListBox = styled.ul.withConfig({
|
9
8
|
displayName: "List__ListBox",
|
10
|
-
componentId: "
|
9
|
+
componentId: "cvbq60-0"
|
11
10
|
})(sx);
|
12
11
|
export const List = /*#__PURE__*/React.forwardRef(({
|
13
12
|
variant = 'inset',
|
14
13
|
selectionVariant,
|
15
14
|
showDividers = false,
|
16
|
-
role,
|
17
15
|
sx: sxProp = {},
|
18
16
|
...props
|
19
17
|
}, forwardedRef) => {
|
@@ -23,14 +21,8 @@ export const List = /*#__PURE__*/React.forwardRef(({
|
|
23
21
|
// reset ul styles
|
24
22
|
paddingY: variant === 'inset' ? 2 : 0
|
25
23
|
};
|
26
|
-
/** if list is inside a Menu, it will get a role from the Menu */
|
27
|
-
|
28
|
-
const {
|
29
|
-
listRole
|
30
|
-
} = React.useContext(MenuContext);
|
31
24
|
return /*#__PURE__*/React.createElement(ListBox, _extends({
|
32
|
-
sx: merge(styles, sxProp)
|
33
|
-
role: role || listRole
|
25
|
+
sx: merge(styles, sxProp)
|
34
26
|
}, props, {
|
35
27
|
ref: forwardedRef
|
36
28
|
}), /*#__PURE__*/React.createElement(ListContext.Provider, {
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
2
2
|
import { CheckIcon } from '@primer/octicons-react';
|
3
3
|
import { ListContext } from './List';
|
4
4
|
import { GroupContext } from './Group';
|
5
|
-
import { MenuContext } from './MenuContext';
|
6
5
|
import { LeadingVisualContainer } from './Visuals';
|
7
6
|
export const Selection = ({
|
8
7
|
selected
|
@@ -13,9 +12,6 @@ export const Selection = ({
|
|
13
12
|
const {
|
14
13
|
selectionVariant: groupSelectionVariant
|
15
14
|
} = React.useContext(GroupContext);
|
16
|
-
const {
|
17
|
-
parent
|
18
|
-
} = React.useContext(MenuContext);
|
19
15
|
/** selectionVariant in Group can override the selectionVariant in List root */
|
20
16
|
|
21
17
|
const selectionVariant = typeof groupSelectionVariant !== 'undefined' ? groupSelectionVariant : listSelectionVariant; // if selectionVariant is not set on List, don't show selection
|
@@ -26,11 +22,6 @@ export const Selection = ({
|
|
26
22
|
return null;
|
27
23
|
}
|
28
24
|
|
29
|
-
if (parent === 'ActionMenu') {
|
30
|
-
throw new Error('ActionList cannot have a selectionVariant inside ActionMenu, please use DropdownMenu or SelectPanel instead. More information: https://primer.style/design/components/action-list#application');
|
31
|
-
return null;
|
32
|
-
}
|
33
|
-
|
34
25
|
if (selectionVariant === 'single') {
|
35
26
|
return /*#__PURE__*/React.createElement(LeadingVisualContainer, null, selected && /*#__PURE__*/React.createElement(CheckIcon, null));
|
36
27
|
}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
+
import { Divider } from './Divider';
|
2
3
|
export type { ListProps as ActionListProps } from './List';
|
3
4
|
export type { GroupProps } from './Group';
|
4
5
|
export type { ItemProps } from './Item';
|
@@ -25,7 +26,7 @@ export declare const ActionList: import("@radix-ui/react-polymorphic").ForwardRe
|
|
25
26
|
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
26
27
|
}>;
|
27
28
|
/** Visually separates `Item`s or `Group`s in an `ActionList`. */
|
28
|
-
Divider:
|
29
|
+
Divider: typeof Divider;
|
29
30
|
/** Secondary text which provides additional information about an `Item`. */
|
30
31
|
Description: import("react").FC<import("./Description").DescriptionProps>;
|
31
32
|
/** Icon (or similar) positioned before `Item` text. */
|
@@ -15,7 +15,6 @@ declare const _default: React.FC<{
|
|
15
15
|
Input: import("@radix-ui/react-polymorphic").ForwardRefComponent<React.ForwardRefExoticComponent<Pick<Omit<Pick<{
|
16
16
|
[x: string]: any;
|
17
17
|
[x: number]: any;
|
18
|
-
[x: symbol]: any;
|
19
18
|
} & {
|
20
19
|
theme?: any;
|
21
20
|
} & {
|
@@ -28,7 +27,6 @@ declare const _default: React.FC<{
|
|
28
27
|
}> | undefined;
|
29
28
|
} & Pick<{
|
30
29
|
color?: string | undefined;
|
31
|
-
property?: string | undefined;
|
32
30
|
maxWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
33
31
|
minWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
34
32
|
translate?: "yes" | "no" | undefined;
|
@@ -64,6 +62,7 @@ declare const _default: React.FC<{
|
|
64
62
|
datatype?: string | undefined;
|
65
63
|
inlist?: any;
|
66
64
|
prefix?: string | undefined;
|
65
|
+
property?: string | undefined;
|
67
66
|
resource?: string | undefined;
|
68
67
|
typeof?: string | undefined;
|
69
68
|
vocab?: string | undefined;
|
@@ -7,7 +7,6 @@ declare type InternalAutocompleteInputProps = {
|
|
7
7
|
declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRefExoticComponent<Pick<Omit<Pick<{
|
8
8
|
[x: string]: any;
|
9
9
|
[x: number]: any;
|
10
|
-
[x: symbol]: any;
|
11
10
|
} & {
|
12
11
|
theme?: any;
|
13
12
|
} & {
|
@@ -20,7 +19,6 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
20
19
|
}> | undefined;
|
21
20
|
} & Pick<{
|
22
21
|
color?: string | undefined;
|
23
|
-
property?: string | undefined;
|
24
22
|
maxWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
25
23
|
minWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
26
24
|
translate?: "yes" | "no" | undefined;
|
@@ -56,6 +54,7 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
56
54
|
datatype?: string | undefined;
|
57
55
|
inlist?: any;
|
58
56
|
prefix?: string | undefined;
|
57
|
+
property?: string | undefined;
|
59
58
|
resource?: string | undefined;
|
60
59
|
typeof?: string | undefined;
|
61
60
|
vocab?: string | undefined;
|
@@ -6,6 +6,7 @@ import { AutocompleteContext } from './AutocompleteContext';
|
|
6
6
|
import { PlusIcon } from '@primer/octicons-react';
|
7
7
|
import { uniqueId } from '../utils/uniqueId';
|
8
8
|
import { scrollIntoViewingArea } from '../behaviors/scrollIntoViewingArea';
|
9
|
+
import VisuallyHidden from '../_VisuallyHidden';
|
9
10
|
|
10
11
|
const getDefaultSortFn = isItemSelectedFn => (itemIdA, itemIdB) => isItemSelectedFn(itemIdA) === isItemSelectedFn(itemIdB) ? 0 : isItemSelectedFn(itemIdA) ? -1 : 1;
|
11
12
|
|
@@ -164,19 +165,8 @@ function AutocompleteMenu(props) {
|
|
164
165
|
setSelectedItemLength(selectedItemIds.length);
|
165
166
|
}
|
166
167
|
}, [selectedItemIds, setSelectedItemLength]);
|
167
|
-
return /*#__PURE__*/React.createElement(
|
168
|
-
|
169
|
-
// visually hides this label for sighted users
|
170
|
-
position: 'absolute',
|
171
|
-
width: '1px',
|
172
|
-
height: '1px',
|
173
|
-
padding: '0',
|
174
|
-
margin: '-1px',
|
175
|
-
overflow: 'hidden',
|
176
|
-
clip: 'rect(0, 0, 0, 0)',
|
177
|
-
whiteSpace: 'nowrap',
|
178
|
-
borderWidth: '0'
|
179
|
-
} : {}
|
168
|
+
return /*#__PURE__*/React.createElement(VisuallyHidden, {
|
169
|
+
isVisible: showMenu
|
180
170
|
}, loading ? /*#__PURE__*/React.createElement(Box, {
|
181
171
|
p: 3,
|
182
172
|
display: "flex",
|
package/lib-esm/Avatar.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { SystemCommonProps } from './constants';
|
1
2
|
import { SxProp } from './sx';
|
2
3
|
import { ComponentProps } from './utils/types';
|
3
4
|
declare const Avatar: import("styled-components").StyledComponent<"img", any, {
|
@@ -9,6 +10,6 @@ declare const Avatar: import("styled-components").StyledComponent<"img", any, {
|
|
9
10
|
src: string;
|
10
11
|
/** Provide alt text when the Avatar is used without the user's name next to it. */
|
11
12
|
alt?: string | undefined;
|
12
|
-
} & SxProp, never>;
|
13
|
+
} & SystemCommonProps & SxProp, never>;
|
13
14
|
export declare type AvatarProps = ComponentProps<typeof Avatar>;
|
14
15
|
export default Avatar;
|
package/lib-esm/Avatar.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import styled from 'styled-components';
|
2
|
-
import { get } from './constants';
|
2
|
+
import { COMMON, get } from './constants';
|
3
3
|
import sx from './sx';
|
4
4
|
|
5
5
|
function getBorderRadius({
|
@@ -19,7 +19,7 @@ const Avatar = styled.img.attrs(props => ({
|
|
19
19
|
})).withConfig({
|
20
20
|
displayName: "Avatar",
|
21
21
|
componentId: "sc-1waaaky-0"
|
22
|
-
})(["display:inline-block;overflow:hidden;line-height:", ";vertical-align:middle;border-radius:", ";", ""], get('lineHeights.condensedUltra'), props => getBorderRadius(props), sx);
|
22
|
+
})(["display:inline-block;overflow:hidden;line-height:", ";vertical-align:middle;border-radius:", ";", ";", ""], get('lineHeights.condensedUltra'), props => getBorderRadius(props), COMMON, sx);
|
23
23
|
Avatar.defaultProps = {
|
24
24
|
size: 20,
|
25
25
|
alt: '',
|
package/lib-esm/BaseStyles.js
CHANGED
@@ -3,10 +3,28 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
3
3
|
import React from 'react';
|
4
4
|
import styled, { createGlobalStyle } from 'styled-components';
|
5
5
|
import { COMMON, TYPOGRAPHY } from './constants';
|
6
|
-
const GlobalStyle = createGlobalStyle
|
6
|
+
const GlobalStyle = createGlobalStyle`
|
7
|
+
* { box-sizing: border-box; }
|
8
|
+
body { margin: 0; }
|
9
|
+
table { border-collapse: collapse; }
|
10
|
+
|
11
|
+
[role="button"]:focus:not(:focus-visible):not(.focus-visible),
|
12
|
+
[role="tabpanel"][tabindex="0"]:focus:not(:focus-visible):not(.focus-visible),
|
13
|
+
button:focus:not(:focus-visible):not(.focus-visible),
|
14
|
+
summary:focus:not(:focus-visible):not(.focus-visible),
|
15
|
+
a:focus:not(:focus-visible):not(.focus-visible) {
|
16
|
+
outline: none;
|
17
|
+
box-shadow: none;
|
18
|
+
}
|
19
|
+
|
20
|
+
[tabindex="0"]:focus:not(:focus-visible):not(.focus-visible),
|
21
|
+
details-dialog:focus:not(:focus-visible):not(.focus-visible) {
|
22
|
+
outline: none;
|
23
|
+
}
|
24
|
+
`;
|
7
25
|
const Base = styled.div.withConfig({
|
8
26
|
displayName: "BaseStyles__Base",
|
9
|
-
componentId: "
|
27
|
+
componentId: "qvuaww-0"
|
10
28
|
})(["", ";", ";"], TYPOGRAPHY, COMMON);
|
11
29
|
|
12
30
|
function BaseStyles(props) {
|
package/lib-esm/BorderBox.js
CHANGED
package/lib-esm/Box.js
CHANGED
@@ -3,6 +3,6 @@ import { background, border, color, flexbox, grid, layout, position, shadow, spa
|
|
3
3
|
import sx from './sx';
|
4
4
|
const Box = styled.div.withConfig({
|
5
5
|
displayName: "Box",
|
6
|
-
componentId: "
|
6
|
+
componentId: "nv15kw-0"
|
7
7
|
})(space, color, typography, layout, flexbox, grid, background, border, position, shadow, sx);
|
8
8
|
export default Box;
|
package/lib-esm/BranchName.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
+
import { SystemCommonProps } from './constants';
|
1
2
|
import { SxProp } from './sx';
|
2
3
|
import { ComponentProps } from './utils/types';
|
3
|
-
declare const BranchName: import("styled-components").StyledComponent<"a", any, SxProp, never>;
|
4
|
+
declare const BranchName: import("styled-components").StyledComponent<"a", any, SystemCommonProps & SxProp, never>;
|
4
5
|
export declare type BranchNameProps = ComponentProps<typeof BranchName>;
|
5
6
|
export default BranchName;
|
package/lib-esm/BranchName.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import styled from 'styled-components';
|
2
|
-
import { get } from './constants';
|
2
|
+
import { COMMON, get } from './constants';
|
3
3
|
import sx from './sx';
|
4
4
|
const BranchName = styled.a.withConfig({
|
5
5
|
displayName: "BranchName",
|
6
6
|
componentId: "sc-167ouzm-0"
|
7
|
-
})(["display:inline-block;padding:2px 6px;font-size:", ";font-family:", ";color:", ";background-color:", ";border-radius:", ";", ";"], get('fontSizes.0'), get('fonts.mono'), get('colors.fg.muted'), get('colors.accent.subtle'), get('radii.2'), sx);
|
7
|
+
})(["display:inline-block;padding:2px 6px;font-size:", ";font-family:", ";color:", ";background-color:", ";border-radius:", ";", ";", ";"], get('fontSizes.0'), get('fonts.mono'), get('colors.fg.muted'), get('colors.accent.subtle'), get('radii.2'), COMMON, sx);
|
8
8
|
export default BranchName;
|
package/lib-esm/Breadcrumbs.js
CHANGED
@@ -8,11 +8,11 @@ import sx from './sx';
|
|
8
8
|
const SELECTED_CLASS = 'selected';
|
9
9
|
const Wrapper = styled.li.withConfig({
|
10
10
|
displayName: "Breadcrumbs__Wrapper",
|
11
|
-
componentId: "
|
11
|
+
componentId: "hwwoo0-0"
|
12
12
|
})(["display:inline-block;white-space:nowrap;list-style:none;&::after{padding-right:0.5em;padding-left:0.5em;color:", ";font-size:", ";content:'/';}&:first-child{margin-left:0;}&:last-child{&::after{content:none;}}"], get('colors.fg.muted'), get('fontSizes.1'));
|
13
13
|
const BreadcrumbsBase = styled.nav.withConfig({
|
14
14
|
displayName: "Breadcrumbs__BreadcrumbsBase",
|
15
|
-
componentId: "
|
15
|
+
componentId: "hwwoo0-1"
|
16
16
|
})(["display:flex;justify-content:space-between;", ";"], sx);
|
17
17
|
|
18
18
|
function Breadcrumbs({
|
@@ -39,7 +39,7 @@ const BreadcrumbsItem = styled.a.attrs(props => ({
|
|
39
39
|
'aria-current': props.selected ? 'page' : null
|
40
40
|
})).withConfig({
|
41
41
|
displayName: "Breadcrumbs__BreadcrumbsItem",
|
42
|
-
componentId: "
|
42
|
+
componentId: "hwwoo0-2"
|
43
43
|
})(["color:", ";display:inline-block;font-size:", ";text-decoration:none;&:hover{text-decoration:underline;}&.selected{color:", ";pointer-events:none;}", ";"], get('colors.accent.fg'), get('fontSizes.1'), get('colors.fg.default'), sx);
|
44
44
|
Breadcrumbs.displayName = 'Breadcrumbs';
|
45
45
|
BreadcrumbsItem.displayName = 'Breadcrumbs.Item';
|
@@ -6,7 +6,6 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
6
6
|
variant?: "small" | "medium" | "large" | undefined;
|
7
7
|
} & {
|
8
8
|
color?: string | undefined;
|
9
|
-
property?: string | undefined;
|
10
9
|
translate?: "yes" | "no" | undefined;
|
11
10
|
hidden?: boolean | undefined;
|
12
11
|
children?: import("react").ReactNode;
|
@@ -41,6 +40,7 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
41
40
|
datatype?: string | undefined;
|
42
41
|
inlist?: any;
|
43
42
|
prefix?: string | undefined;
|
43
|
+
property?: string | undefined;
|
44
44
|
resource?: string | undefined;
|
45
45
|
typeof?: string | undefined;
|
46
46
|
vocab?: string | undefined;
|
@@ -269,8 +269,8 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
269
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
270
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
271
271
|
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
272
|
-
disabled?: boolean | undefined;
|
273
272
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
273
|
+
disabled?: boolean | undefined;
|
274
274
|
autoFocus?: boolean | undefined;
|
275
275
|
formAction?: string | undefined;
|
276
276
|
formEncType?: string | undefined;
|
package/lib-esm/Button/Button.js
CHANGED
@@ -4,6 +4,6 @@ import sx from '../sx';
|
|
4
4
|
import ButtonBase from './ButtonBase';
|
5
5
|
const Button = styled(ButtonBase).withConfig({
|
6
6
|
displayName: "Button",
|
7
|
-
componentId: "
|
7
|
+
componentId: "xjtz72-0"
|
8
8
|
})(["color:", ";background-color:", ";border:1px solid ", ";box-shadow:", ",", "};&:hover{background-color:", ";border-color:", ";}&:focus{border-color:", ";box-shadow:", ";}&:active{background-color:", ";box-shadow:", ";}&:disabled{color:", ";background-color:", ";border-color:", ";}", ";"], get('colors.btn.text'), get('colors.btn.bg'), get('colors.btn.border'), get('shadows.btn.shadow'), get('shadows.btn.insetShadow'), get('colors.btn.hoverBg'), get('colors.btn.hoverBorder'), get('colors.btn.focusBorder'), get('shadows.btn.focusShadow'), get('colors.btn.selectedBg'), get('shadows.btn.shadowActive'), get('colors.primer.fg.disabled'), get('colors.btn.bg'), get('colors.btn.border'), sx);
|
9
9
|
export default Button;
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
2
2
|
import { ComponentProps } from '../utils/types';
|
3
3
|
declare const ButtonClose: React.ForwardRefExoticComponent<Pick<{
|
4
4
|
color?: string | undefined;
|
5
|
-
property?: string | undefined;
|
6
5
|
translate?: "yes" | "no" | undefined;
|
7
6
|
hidden?: boolean | undefined;
|
8
7
|
children?: React.ReactNode;
|
@@ -37,6 +36,7 @@ declare const ButtonClose: React.ForwardRefExoticComponent<Pick<{
|
|
37
36
|
datatype?: string | undefined;
|
38
37
|
inlist?: any;
|
39
38
|
prefix?: string | undefined;
|
39
|
+
property?: string | undefined;
|
40
40
|
resource?: string | undefined;
|
41
41
|
typeof?: string | undefined;
|
42
42
|
vocab?: string | undefined;
|
@@ -274,6 +274,6 @@ declare const ButtonClose: React.ForwardRefExoticComponent<Pick<{
|
|
274
274
|
formTarget?: string | undefined;
|
275
275
|
} & {
|
276
276
|
theme?: any;
|
277
|
-
}, "theme" | "sx" | "key" |
|
277
|
+
}, "color" | "translate" | "hidden" | "children" | "theme" | "value" | "form" | "slot" | "style" | "title" | "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" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & React.RefAttributes<HTMLButtonElement>>;
|
278
278
|
export declare type ButtonCloseProps = ComponentProps<typeof ButtonClose>;
|
279
279
|
export default ButtonClose;
|
@@ -6,7 +6,6 @@ declare const ButtonDanger: import("styled-components").StyledComponent<"button"
|
|
6
6
|
variant?: "small" | "medium" | "large" | undefined;
|
7
7
|
} & {
|
8
8
|
color?: string | undefined;
|
9
|
-
property?: string | undefined;
|
10
9
|
translate?: "yes" | "no" | undefined;
|
11
10
|
hidden?: boolean | undefined;
|
12
11
|
children?: import("react").ReactNode;
|
@@ -41,6 +40,7 @@ declare const ButtonDanger: import("styled-components").StyledComponent<"button"
|
|
41
40
|
datatype?: string | undefined;
|
42
41
|
inlist?: any;
|
43
42
|
prefix?: string | undefined;
|
43
|
+
property?: string | undefined;
|
44
44
|
resource?: string | undefined;
|
45
45
|
typeof?: string | undefined;
|
46
46
|
vocab?: string | undefined;
|
@@ -269,8 +269,8 @@ declare const ButtonDanger: import("styled-components").StyledComponent<"button"
|
|
269
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
270
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
271
271
|
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
272
|
-
disabled?: boolean | undefined;
|
273
272
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
273
|
+
disabled?: boolean | undefined;
|
274
274
|
autoFocus?: boolean | undefined;
|
275
275
|
formAction?: string | undefined;
|
276
276
|
formEncType?: string | undefined;
|
@@ -4,7 +4,7 @@ import { get } from '../constants';
|
|
4
4
|
import sx from '../sx';
|
5
5
|
const ButtonGroup = styled(Box).withConfig({
|
6
6
|
displayName: "ButtonGroup",
|
7
|
-
componentId: "
|
7
|
+
componentId: "peei04-0"
|
8
8
|
})(["vertical-align:middle;&& > *{position:relative;border-right-width:0;border-radius:0;:first-child{border-top-left-radius:", ";border-bottom-left-radius:", ";margin-right:0;}:not(:first-child){margin-left:0;margin-right:0;}:last-child{border-right-width:1px;border-top-right-radius:", ";border-bottom-right-radius:", ";}:focus,:active,:hover{border-right-width:1px;+ *{border-left-width:0;}}:focus,:active{z-index:1;}}", ";"], get('radii.2'), get('radii.2'), get('radii.2'), get('radii.2'), sx);
|
9
9
|
ButtonGroup.defaultProps = {
|
10
10
|
display: 'inline-block'
|
@@ -6,7 +6,6 @@ declare const ButtonInvisible: import("styled-components").StyledComponent<"butt
|
|
6
6
|
variant?: "small" | "medium" | "large" | undefined;
|
7
7
|
} & {
|
8
8
|
color?: string | undefined;
|
9
|
-
property?: string | undefined;
|
10
9
|
translate?: "yes" | "no" | undefined;
|
11
10
|
hidden?: boolean | undefined;
|
12
11
|
children?: import("react").ReactNode;
|
@@ -41,6 +40,7 @@ declare const ButtonInvisible: import("styled-components").StyledComponent<"butt
|
|
41
40
|
datatype?: string | undefined;
|
42
41
|
inlist?: any;
|
43
42
|
prefix?: string | undefined;
|
43
|
+
property?: string | undefined;
|
44
44
|
resource?: string | undefined;
|
45
45
|
typeof?: string | undefined;
|
46
46
|
vocab?: string | undefined;
|
@@ -269,8 +269,8 @@ declare const ButtonInvisible: import("styled-components").StyledComponent<"butt
|
|
269
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
270
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
271
271
|
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
272
|
-
disabled?: boolean | undefined;
|
273
272
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
273
|
+
disabled?: boolean | undefined;
|
274
274
|
autoFocus?: boolean | undefined;
|
275
275
|
formAction?: string | undefined;
|
276
276
|
formEncType?: string | undefined;
|