@primer/components 0.0.0-202110229331 → 0.0.0-2021102321921
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 +68 -6
- package/dist/browser.esm.js +690 -759
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +294 -363
- package/dist/browser.umd.js.map +1 -1
- package/lib/ActionList2/Group.d.ts +28 -2
- package/lib/ActionList2/Group.js +55 -6
- package/lib/ActionList2/Group.jsx +33 -4
- package/lib/ActionList2/List.d.ts +1 -1
- package/lib/Autocomplete/Autocomplete.d.ts +3 -3
- package/lib/Autocomplete/AutocompleteInput.d.ts +3 -3
- package/lib/Breadcrumbs.d.ts +8 -7
- package/lib/Breadcrumbs.js +7 -12
- package/lib/Breadcrumbs.jsx +3 -6
- package/lib/Button/Button.d.ts +2 -3
- package/lib/Button/Button.js +2 -6
- package/lib/Button/Button.jsx +1 -21
- package/lib/Button/ButtonBase.d.ts +5 -8
- package/lib/Button/ButtonBase.js +1 -5
- package/lib/Button/ButtonBase.jsx +0 -3
- package/lib/Button/ButtonClose.d.ts +3 -46
- package/lib/Button/ButtonClose.js +1 -1
- package/lib/Button/ButtonClose.jsx +0 -2
- package/lib/Button/ButtonDanger.d.ts +2 -3
- package/lib/Button/ButtonDanger.js +2 -6
- package/lib/Button/ButtonDanger.jsx +1 -21
- package/lib/Button/ButtonInvisible.d.ts +2 -3
- package/lib/Button/ButtonInvisible.js +2 -6
- package/lib/Button/ButtonInvisible.jsx +1 -21
- package/lib/Button/ButtonOutline.d.ts +2 -3
- package/lib/Button/ButtonOutline.js +2 -6
- package/lib/Button/ButtonOutline.jsx +1 -21
- package/lib/Button/ButtonPrimary.d.ts +2 -3
- package/lib/Button/ButtonPrimary.js +2 -6
- package/lib/Button/ButtonPrimary.jsx +1 -21
- package/lib/Button/ButtonTableList.d.ts +1 -2
- package/lib/Button/ButtonTableList.js +1 -1
- package/lib/Button/ButtonTableList.jsx +0 -3
- package/lib/CircleBadge.d.ts +4 -5
- package/lib/CircleBadge.js +1 -1
- package/lib/CircleBadge.jsx +0 -1
- package/lib/CircleOcticon.d.ts +1 -1
- package/lib/CounterLabel.d.ts +1 -2
- package/lib/CounterLabel.js +1 -1
- package/lib/CounterLabel.jsx +0 -1
- package/lib/Dialog/Dialog.d.ts +5 -9
- package/lib/Dialog/Dialog.js +17 -11
- package/lib/Dialog/Dialog.jsx +13 -7
- package/lib/Dialog.d.ts +4 -5
- package/lib/Dialog.js +1 -1
- package/lib/Dialog.jsx +0 -2
- package/lib/Dropdown.d.ts +10 -99
- package/lib/Dropdown.js +3 -3
- package/lib/Dropdown.jsx +0 -3
- package/lib/DropdownMenu/DropdownButton.d.ts +3 -47
- package/lib/DropdownMenu/DropdownButton.js +3 -1
- package/lib/DropdownMenu/DropdownButton.jsx +1 -1
- package/lib/FilterList.d.ts +264 -303
- package/lib/FilterList.js +2 -6
- package/lib/FilterList.jsx +2 -6
- package/lib/FilteredSearch.d.ts +1 -2
- package/lib/FilteredSearch.js +1 -1
- package/lib/FilteredSearch.jsx +0 -1
- package/lib/Flash.d.ts +1 -2
- package/lib/Flash.js +1 -1
- package/lib/Flash.jsx +0 -1
- package/lib/FormGroup.d.ts +4 -5
- package/lib/FormGroup.js +2 -2
- package/lib/FormGroup.jsx +0 -3
- package/lib/Header.d.ts +6 -7
- package/lib/Header.js +4 -4
- package/lib/Header.jsx +0 -7
- package/lib/Label.d.ts +1 -2
- package/lib/Label.js +2 -3
- package/lib/Label.jsx +1 -3
- package/lib/LabelGroup.d.ts +1 -2
- package/lib/LabelGroup.js +1 -1
- package/lib/LabelGroup.jsx +0 -1
- package/lib/Link.d.ts +1 -2
- package/lib/Link.js +1 -1
- package/lib/Link.jsx +0 -2
- package/lib/NewButton/button.js +1 -12
- package/lib/NewButton/button.jsx +3 -7
- package/lib/Overlay.d.ts +11 -10
- package/lib/Overlay.js +3 -4
- package/lib/Overlay.jsx +1 -3
- package/lib/Pagehead.d.ts +1 -2
- package/lib/Pagehead.js +1 -1
- package/lib/Pagehead.jsx +0 -1
- package/lib/Pagination/Pagination.js +1 -1
- package/lib/Pagination/Pagination.jsx +0 -2
- package/lib/Popover.d.ts +4 -5
- package/lib/Popover.js +4 -5
- package/lib/Popover.jsx +1 -9
- package/lib/Position.d.ts +4 -4
- package/lib/SelectMenu/SelectMenu.d.ts +21 -189
- package/lib/SelectMenu/SelectMenu.js +1 -3
- package/lib/SelectMenu/SelectMenu.jsx +0 -2
- package/lib/SelectMenu/SelectMenuDivider.d.ts +1 -2
- package/lib/SelectMenu/SelectMenuDivider.js +1 -1
- package/lib/SelectMenu/SelectMenuDivider.jsx +0 -1
- package/lib/SelectMenu/SelectMenuFilter.js +1 -1
- package/lib/SelectMenu/SelectMenuFilter.jsx +0 -1
- package/lib/SelectMenu/SelectMenuFooter.d.ts +1 -2
- package/lib/SelectMenu/SelectMenuFooter.js +1 -1
- package/lib/SelectMenu/SelectMenuFooter.jsx +0 -1
- package/lib/SelectMenu/SelectMenuHeader.d.ts +1 -2
- package/lib/SelectMenu/SelectMenuHeader.js +1 -1
- package/lib/SelectMenu/SelectMenuHeader.jsx +0 -2
- package/lib/SelectMenu/SelectMenuItem.d.ts +2 -3
- package/lib/SelectMenu/SelectMenuItem.js +1 -1
- package/lib/SelectMenu/SelectMenuItem.jsx +0 -1
- package/lib/SelectMenu/SelectMenuList.d.ts +1 -2
- package/lib/SelectMenu/SelectMenuList.js +1 -1
- package/lib/SelectMenu/SelectMenuList.jsx +0 -1
- package/lib/SelectMenu/SelectMenuLoadingAnimation.d.ts +2 -2
- package/lib/SelectMenu/SelectMenuLoadingAnimation.js +3 -1
- package/lib/SelectMenu/SelectMenuLoadingAnimation.jsx +2 -1
- package/lib/SelectMenu/SelectMenuModal.d.ts +2 -3
- package/lib/SelectMenu/SelectMenuModal.js +1 -1
- package/lib/SelectMenu/SelectMenuModal.jsx +0 -1
- package/lib/SelectMenu/SelectMenuTab.d.ts +1 -2
- package/lib/SelectMenu/SelectMenuTab.js +1 -1
- package/lib/SelectMenu/SelectMenuTab.jsx +0 -1
- package/lib/SelectMenu/SelectMenuTabPanel.d.ts +1 -2
- package/lib/SelectMenu/SelectMenuTabPanel.js +1 -1
- package/lib/SelectMenu/SelectMenuTabPanel.jsx +0 -1
- package/lib/SelectMenu/SelectMenuTabs.d.ts +1 -2
- package/lib/SelectMenu/SelectMenuTabs.js +1 -1
- package/lib/SelectMenu/SelectMenuTabs.jsx +0 -1
- package/lib/SideNav.d.ts +11 -8
- package/lib/SideNav.js +8 -15
- package/lib/SideNav.jsx +2 -6
- package/lib/StateLabel.d.ts +1 -2
- package/lib/StateLabel.js +6 -5
- package/lib/StateLabel.jsx +1 -2
- package/lib/StyledOcticon.d.ts +1 -2
- package/lib/StyledOcticon.js +1 -3
- package/lib/StyledOcticon.jsx +0 -2
- package/lib/SubNav.d.ts +5 -11
- package/lib/SubNav.js +7 -12
- package/lib/SubNav.jsx +4 -7
- package/lib/TabNav.d.ts +3 -4
- package/lib/TabNav.js +2 -2
- package/lib/TabNav.jsx +0 -2
- package/lib/TextInputWithTokens.d.ts +3 -3
- package/lib/Timeline.d.ts +19 -393
- package/lib/Timeline.js +16 -13
- package/lib/Timeline.jsx +9 -10
- package/lib/Token/Token.d.ts +1 -1
- package/lib/Tooltip.d.ts +1 -2
- package/lib/Tooltip.js +1 -1
- package/lib/Tooltip.jsx +1 -1
- package/lib/Truncate.d.ts +1 -2
- package/lib/Truncate.js +1 -3
- package/lib/Truncate.jsx +0 -3
- package/lib/UnderlineNav.d.ts +2 -3
- package/lib/UnderlineNav.js +2 -2
- package/lib/UnderlineNav.jsx +0 -2
- package/lib/index.d.ts +0 -2
- package/lib/index.js +1 -3
- package/lib-esm/ActionList2/Group.d.ts +28 -2
- package/lib-esm/ActionList2/Group.js +52 -5
- package/lib-esm/ActionList2/List.d.ts +1 -1
- package/lib-esm/Autocomplete/Autocomplete.d.ts +3 -3
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +3 -3
- package/lib-esm/Breadcrumbs.d.ts +8 -7
- package/lib-esm/Breadcrumbs.js +8 -13
- package/lib-esm/Button/Button.d.ts +2 -3
- package/lib-esm/Button/Button.js +2 -2
- package/lib-esm/Button/ButtonBase.d.ts +5 -8
- package/lib-esm/Button/ButtonBase.js +1 -3
- package/lib-esm/Button/ButtonClose.d.ts +3 -46
- package/lib-esm/Button/ButtonClose.js +2 -2
- package/lib-esm/Button/ButtonDanger.d.ts +2 -3
- package/lib-esm/Button/ButtonDanger.js +2 -2
- package/lib-esm/Button/ButtonInvisible.d.ts +2 -3
- package/lib-esm/Button/ButtonInvisible.js +2 -2
- package/lib-esm/Button/ButtonOutline.d.ts +2 -3
- package/lib-esm/Button/ButtonOutline.js +2 -2
- package/lib-esm/Button/ButtonPrimary.d.ts +2 -3
- package/lib-esm/Button/ButtonPrimary.js +2 -2
- package/lib-esm/Button/ButtonTableList.d.ts +1 -2
- package/lib-esm/Button/ButtonTableList.js +2 -2
- package/lib-esm/CircleBadge.d.ts +4 -5
- package/lib-esm/CircleBadge.js +2 -2
- package/lib-esm/CircleOcticon.d.ts +1 -1
- package/lib-esm/CounterLabel.d.ts +1 -2
- package/lib-esm/CounterLabel.js +2 -2
- package/lib-esm/Dialog/Dialog.d.ts +5 -9
- package/lib-esm/Dialog/Dialog.js +12 -12
- package/lib-esm/Dialog.d.ts +4 -5
- package/lib-esm/Dialog.js +2 -2
- package/lib-esm/Dropdown.d.ts +10 -99
- package/lib-esm/Dropdown.js +4 -4
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +3 -47
- package/lib-esm/DropdownMenu/DropdownButton.js +3 -1
- package/lib-esm/FilterList.d.ts +264 -303
- package/lib-esm/FilterList.js +3 -7
- package/lib-esm/FilteredSearch.d.ts +1 -2
- package/lib-esm/FilteredSearch.js +2 -2
- package/lib-esm/Flash.d.ts +1 -2
- package/lib-esm/Flash.js +2 -2
- package/lib-esm/FormGroup.d.ts +4 -5
- package/lib-esm/FormGroup.js +3 -3
- package/lib-esm/Header.d.ts +6 -7
- package/lib-esm/Header.js +5 -5
- package/lib-esm/Label.d.ts +1 -2
- package/lib-esm/Label.js +3 -4
- package/lib-esm/LabelGroup.d.ts +1 -2
- package/lib-esm/LabelGroup.js +2 -2
- package/lib-esm/Link.d.ts +1 -2
- package/lib-esm/Link.js +2 -2
- package/lib-esm/NewButton/button.js +0 -11
- package/lib-esm/Overlay.d.ts +11 -10
- package/lib-esm/Overlay.js +2 -3
- package/lib-esm/Pagehead.d.ts +1 -2
- package/lib-esm/Pagehead.js +2 -2
- package/lib-esm/Pagination/Pagination.js +2 -2
- package/lib-esm/Popover.d.ts +4 -5
- package/lib-esm/Popover.js +4 -5
- package/lib-esm/Position.d.ts +4 -4
- package/lib-esm/SelectMenu/SelectMenu.d.ts +21 -189
- package/lib-esm/SelectMenu/SelectMenu.js +1 -2
- package/lib-esm/SelectMenu/SelectMenuDivider.d.ts +1 -2
- package/lib-esm/SelectMenu/SelectMenuDivider.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuFilter.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuFooter.d.ts +1 -2
- package/lib-esm/SelectMenu/SelectMenuFooter.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuHeader.d.ts +1 -2
- package/lib-esm/SelectMenu/SelectMenuHeader.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuItem.d.ts +2 -3
- package/lib-esm/SelectMenu/SelectMenuItem.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuList.d.ts +1 -2
- package/lib-esm/SelectMenu/SelectMenuList.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuLoadingAnimation.d.ts +2 -2
- package/lib-esm/SelectMenu/SelectMenuLoadingAnimation.js +3 -2
- package/lib-esm/SelectMenu/SelectMenuModal.d.ts +2 -3
- package/lib-esm/SelectMenu/SelectMenuModal.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuTab.d.ts +1 -2
- package/lib-esm/SelectMenu/SelectMenuTab.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuTabPanel.d.ts +1 -2
- package/lib-esm/SelectMenu/SelectMenuTabPanel.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuTabs.d.ts +1 -2
- package/lib-esm/SelectMenu/SelectMenuTabs.js +2 -2
- package/lib-esm/SideNav.d.ts +11 -8
- package/lib-esm/SideNav.js +8 -16
- package/lib-esm/StateLabel.d.ts +1 -2
- package/lib-esm/StateLabel.js +7 -6
- package/lib-esm/StyledOcticon.d.ts +1 -2
- package/lib-esm/StyledOcticon.js +1 -2
- package/lib-esm/SubNav.d.ts +5 -11
- package/lib-esm/SubNav.js +8 -13
- package/lib-esm/TabNav.d.ts +3 -4
- package/lib-esm/TabNav.js +3 -3
- package/lib-esm/TextInputWithTokens.d.ts +3 -3
- package/lib-esm/Timeline.d.ts +19 -393
- package/lib-esm/Timeline.js +12 -13
- package/lib-esm/Token/Token.d.ts +1 -1
- package/lib-esm/Tooltip.d.ts +1 -2
- package/lib-esm/Tooltip.js +2 -2
- package/lib-esm/Truncate.d.ts +1 -2
- package/lib-esm/Truncate.js +1 -2
- package/lib-esm/UnderlineNav.d.ts +2 -3
- package/lib-esm/UnderlineNav.js +3 -3
- package/lib-esm/index.d.ts +0 -2
- package/lib-esm/index.js +0 -1
- package/package.json +2 -2
- package/lib/Checkbox.d.ts +0 -29
- package/lib/Checkbox.js +0 -65
- package/lib/Checkbox.jsx +0 -50
- package/lib-esm/Checkbox.d.ts +0 -29
- package/lib-esm/Checkbox.js +0 -45
package/lib/FilterList.js
CHANGED
|
@@ -18,7 +18,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
18
18
|
const FilterListBase = _styledComponents.default.ul.withConfig({
|
|
19
19
|
displayName: "FilterList__FilterListBase",
|
|
20
20
|
componentId: "sc-1l4pxmz-0"
|
|
21
|
-
})(["list-style-type:none;
|
|
21
|
+
})(["list-style-type:none;margin:0;padding:0;", ";"], _sx.default);
|
|
22
22
|
|
|
23
23
|
const FilterList = ({
|
|
24
24
|
children,
|
|
@@ -36,7 +36,7 @@ FilterList.displayName = "FilterList";
|
|
|
36
36
|
const FilterListItemBase = _styledComponents.default.a.withConfig({
|
|
37
37
|
displayName: "FilterList__FilterListItemBase",
|
|
38
38
|
componentId: "sc-1l4pxmz-1"
|
|
39
|
-
})(["position:relative;display:block;padding:", ";margin:", ";overflow:hidden;font-size:", ";color:", ";background-color:", "!important;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;border-radius:", ";&:hover{text-decoration:none;background-color:", ";}&:active{color:", ";background-color:", ";}.count{float:right;font-weight:", ";}", ";"
|
|
39
|
+
})(["position:relative;display:block;padding:", ";margin:", ";overflow:hidden;font-size:", ";color:", ";background-color:", "!important;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;border-radius:", ";&:hover{text-decoration:none;background-color:", ";}&:active{color:", ";background-color:", ";}.count{float:right;font-weight:", ";}", ";"], props => props.small ? `${(0, _constants.get)('space.1')(props)} 10px` : `${(0, _constants.get)('space.2')(props)} 11px`, props => props.small ? '0 0 2px' : '0 0 5px 0', (0, _constants.get)('fontSizes.1'), props => props.selected ? (0, _constants.get)('colors.fg.onEmphasis') : (0, _constants.get)('colors.fg.muted'), props => props.selected ? (0, _constants.get)('colors.accent.emphasis') : '', (0, _constants.get)('radii.1'), (0, _constants.get)('colors.canvas.subtle'), (0, _constants.get)('colors.fg.onEmphasis'), (0, _constants.get)('colors.accent.emphasis'), (0, _constants.get)('fontWeights.bold'), _sx.default);
|
|
40
40
|
|
|
41
41
|
function FilterListItem({
|
|
42
42
|
children,
|
|
@@ -50,10 +50,6 @@ function FilterListItem({
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
FilterListItem.displayName = "FilterListItem";
|
|
53
|
-
FilterList.defaultProps = {
|
|
54
|
-
m: 0,
|
|
55
|
-
p: 0
|
|
56
|
-
};
|
|
57
53
|
FilterListItem.displayName = 'FilterList.Item';
|
|
58
54
|
|
|
59
55
|
var _default = Object.assign(FilterList, {
|
package/lib/FilterList.jsx
CHANGED
|
@@ -9,7 +9,8 @@ const constants_1 = require("./constants");
|
|
|
9
9
|
const sx_1 = __importDefault(require("./sx"));
|
|
10
10
|
const FilterListBase = styled_components_1.default.ul `
|
|
11
11
|
list-style-type: none;
|
|
12
|
-
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: 0;
|
|
13
14
|
${sx_1.default};
|
|
14
15
|
`;
|
|
15
16
|
const FilterList = ({ children, ...rest }) => {
|
|
@@ -44,7 +45,6 @@ const FilterListItemBase = styled_components_1.default.a `
|
|
|
44
45
|
float: right;
|
|
45
46
|
font-weight: ${constants_1.get('fontWeights.bold')};
|
|
46
47
|
}
|
|
47
|
-
${constants_1.COMMON};
|
|
48
48
|
${sx_1.default};
|
|
49
49
|
`;
|
|
50
50
|
function FilterListItem({ children, count, ...rest }) {
|
|
@@ -55,9 +55,5 @@ function FilterListItem({ children, count, ...rest }) {
|
|
|
55
55
|
{children}
|
|
56
56
|
</FilterListItemBase>);
|
|
57
57
|
}
|
|
58
|
-
FilterList.defaultProps = {
|
|
59
|
-
m: 0,
|
|
60
|
-
p: 0
|
|
61
|
-
};
|
|
62
58
|
FilterListItem.displayName = 'FilterList.Item';
|
|
63
59
|
exports.default = Object.assign(FilterList, { Item: FilterListItem });
|
package/lib/FilteredSearch.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { SystemCommonProps } from './constants';
|
|
2
1
|
import { SxProp } from './sx';
|
|
3
2
|
import { ComponentProps } from './utils/types';
|
|
4
|
-
declare const FilteredSearch: import("styled-components").StyledComponent<"div", any,
|
|
3
|
+
declare const FilteredSearch: import("styled-components").StyledComponent<"div", any, SxProp, never>;
|
|
5
4
|
export declare type FilteredSearchProps = ComponentProps<typeof FilteredSearch>;
|
|
6
5
|
export default FilteredSearch;
|
package/lib/FilteredSearch.js
CHANGED
|
@@ -16,7 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
16
16
|
const FilteredSearch = _styledComponents.default.div.withConfig({
|
|
17
17
|
displayName: "FilteredSearch",
|
|
18
18
|
componentId: "sc-15qfedq-0"
|
|
19
|
-
})(["
|
|
19
|
+
})(["display:flex;align-items:stretch;summary{border-radius:0;border-top-left-radius:", ";border-bottom-left-radius:", ";border-right:0;}.TextInput-wrapper{border-radius:0;border-top-right-radius:", ";border-bottom-right-radius:", ";z-index:1;}", ""], (0, _constants.get)('radii.2'), (0, _constants.get)('radii.2'), (0, _constants.get)('radii.2'), (0, _constants.get)('radii.2'), _sx.default);
|
|
20
20
|
|
|
21
21
|
var _default = FilteredSearch;
|
|
22
22
|
exports.default = _default;
|
package/lib/FilteredSearch.jsx
CHANGED
|
@@ -7,7 +7,6 @@ const styled_components_1 = __importDefault(require("styled-components"));
|
|
|
7
7
|
const constants_1 = require("./constants");
|
|
8
8
|
const sx_1 = __importDefault(require("./sx"));
|
|
9
9
|
const FilteredSearch = styled_components_1.default.div `
|
|
10
|
-
${constants_1.COMMON};
|
|
11
10
|
display: flex;
|
|
12
11
|
align-items: stretch;
|
|
13
12
|
|
package/lib/Flash.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { SystemCommonProps } from './constants';
|
|
2
1
|
import { SxProp } from './sx';
|
|
3
2
|
import { ComponentProps } from './utils/types';
|
|
4
3
|
declare const Flash: import("styled-components").StyledComponent<"div", any, {
|
|
5
4
|
variant?: "success" | "danger" | "default" | "warning" | undefined;
|
|
6
5
|
full?: boolean | undefined;
|
|
7
|
-
} &
|
|
6
|
+
} & SxProp, never>;
|
|
8
7
|
export declare type FlashProps = ComponentProps<typeof Flash>;
|
|
9
8
|
export default Flash;
|
package/lib/Flash.js
CHANGED
|
@@ -55,7 +55,7 @@ const variants = (0, _styledSystem.variant)({
|
|
|
55
55
|
const Flash = _styledComponents.default.div.withConfig({
|
|
56
56
|
displayName: "Flash",
|
|
57
57
|
componentId: "sc-4y90bn-0"
|
|
58
|
-
})(["position:relative;color:", ";padding:", ";border-style:solid;border-width:", ";border-radius:", ";margin-top:", ";p:last-child{margin-bottom:0;}svg{margin-right:", ";}", ";", ";"
|
|
58
|
+
})(["position:relative;color:", ";padding:", ";border-style:solid;border-width:", ";border-radius:", ";margin-top:", ";p:last-child{margin-bottom:0;}svg{margin-right:", ";}", ";", ";"], (0, _constants.get)('colors.fg.default'), (0, _constants.get)('space.3'), props => props.full ? '1px 0px' : '1px', props => props.full ? '0' : (0, _constants.get)('radii.2'), props => props.full ? '-1px' : '0', (0, _constants.get)('space.2'), variants, _sx.default);
|
|
59
59
|
|
|
60
60
|
Flash.defaultProps = {
|
|
61
61
|
variant: 'default'
|
package/lib/Flash.jsx
CHANGED
package/lib/FormGroup.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/// <reference types="hoist-non-react-statics" />
|
|
2
|
-
import { SystemCommonProps, SystemTypographyProps } from './constants';
|
|
3
2
|
import { SxProp } from './sx';
|
|
4
3
|
import { ComponentProps } from './utils/types';
|
|
5
|
-
declare const FormGroup: import("styled-components").StyledComponent<"div", any,
|
|
6
|
-
declare const FormGroupLabel: import("styled-components").StyledComponent<"label", any,
|
|
4
|
+
declare const FormGroup: import("styled-components").StyledComponent<"div", any, SxProp, never>;
|
|
5
|
+
declare const FormGroupLabel: import("styled-components").StyledComponent<"label", any, SxProp, never>;
|
|
7
6
|
export declare type FormGroupProps = ComponentProps<typeof FormGroup>;
|
|
8
7
|
export declare type FormGroupLabelProps = ComponentProps<typeof FormGroupLabel>;
|
|
9
|
-
declare const _default: string & import("styled-components").StyledComponentBase<"div", any,
|
|
10
|
-
Label: import("styled-components").StyledComponent<"label", any,
|
|
8
|
+
declare const _default: string & import("styled-components").StyledComponentBase<"div", any, SxProp, never> & import("hoist-non-react-statics").NonReactStatics<never, {}> & {
|
|
9
|
+
Label: import("styled-components").StyledComponent<"label", any, SxProp, never>;
|
|
11
10
|
};
|
|
12
11
|
export default _default;
|
package/lib/FormGroup.js
CHANGED
|
@@ -16,12 +16,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
16
16
|
const FormGroup = _styledComponents.default.div.withConfig({
|
|
17
17
|
displayName: "FormGroup",
|
|
18
18
|
componentId: "sc-14z6yax-0"
|
|
19
|
-
})(["margin:", " 0;font-weight:", ";", ";"
|
|
19
|
+
})(["margin:", " 0;font-weight:", ";", ";"], (0, _constants.get)('space.3'), (0, _constants.get)('fontWeights.normal'), _sx.default);
|
|
20
20
|
|
|
21
21
|
const FormGroupLabel = _styledComponents.default.label.withConfig({
|
|
22
22
|
displayName: "FormGroup__FormGroupLabel",
|
|
23
23
|
componentId: "sc-14z6yax-1"
|
|
24
|
-
})(["display:block;margin:0 0 ", ";font-size:", ";font-weight:", ";", ";"
|
|
24
|
+
})(["display:block;margin:0 0 ", ";font-size:", ";font-weight:", ";", ";"], (0, _constants.get)('space.2'), (0, _constants.get)('fontSizes.1'), (0, _constants.get)('fontWeights.bold'), _sx.default);
|
|
25
25
|
|
|
26
26
|
FormGroupLabel.displayName = 'FormGroup.Label';
|
|
27
27
|
|
package/lib/FormGroup.jsx
CHANGED
|
@@ -9,7 +9,6 @@ const sx_1 = __importDefault(require("./sx"));
|
|
|
9
9
|
const FormGroup = styled_components_1.default.div `
|
|
10
10
|
margin: ${constants_1.get('space.3')} 0;
|
|
11
11
|
font-weight: ${constants_1.get('fontWeights.normal')};
|
|
12
|
-
${constants_1.COMMON};
|
|
13
12
|
${sx_1.default};
|
|
14
13
|
`;
|
|
15
14
|
const FormGroupLabel = styled_components_1.default.label `
|
|
@@ -17,8 +16,6 @@ const FormGroupLabel = styled_components_1.default.label `
|
|
|
17
16
|
margin: 0 0 ${constants_1.get('space.2')};
|
|
18
17
|
font-size: ${constants_1.get('fontSizes.1')};
|
|
19
18
|
font-weight: ${constants_1.get('fontWeights.bold')};
|
|
20
|
-
${constants_1.TYPOGRAPHY};
|
|
21
|
-
${constants_1.COMMON};
|
|
22
19
|
${sx_1.default};
|
|
23
20
|
`;
|
|
24
21
|
FormGroupLabel.displayName = 'FormGroup.Label';
|
package/lib/Header.d.ts
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
/// <reference types="hoist-non-react-statics" />
|
|
2
2
|
import * as History from 'history';
|
|
3
|
-
import { SystemBorderProps, SystemCommonProps, SystemTypographyProps } from './constants';
|
|
4
3
|
import { SxProp } from './sx';
|
|
5
4
|
import { ComponentProps } from './utils/types';
|
|
6
|
-
declare const Header: import("styled-components").StyledComponent<"div", any,
|
|
5
|
+
declare const Header: import("styled-components").StyledComponent<"div", any, SxProp, never>;
|
|
7
6
|
declare const HeaderItem: import("styled-components").StyledComponent<"div", any, {
|
|
8
7
|
full?: boolean | undefined;
|
|
9
|
-
} &
|
|
8
|
+
} & SxProp, never>;
|
|
10
9
|
declare const HeaderLink: import("styled-components").StyledComponent<"a", any, {
|
|
11
10
|
to?: History.LocationDescriptor<unknown> | undefined;
|
|
12
|
-
} &
|
|
11
|
+
} & SxProp, never>;
|
|
13
12
|
export declare type HeaderProps = ComponentProps<typeof Header>;
|
|
14
13
|
export declare type HeaderLinkProps = ComponentProps<typeof HeaderLink>;
|
|
15
14
|
export declare type HeaderItemProps = ComponentProps<typeof HeaderItem>;
|
|
16
|
-
declare const _default: string & import("styled-components").StyledComponentBase<"div", any,
|
|
15
|
+
declare const _default: string & import("styled-components").StyledComponentBase<"div", any, SxProp, never> & import("hoist-non-react-statics").NonReactStatics<never, {}> & {
|
|
17
16
|
Link: import("styled-components").StyledComponent<"a", any, {
|
|
18
17
|
to?: History.LocationDescriptor<unknown> | undefined;
|
|
19
|
-
} &
|
|
18
|
+
} & SxProp, never>;
|
|
20
19
|
Item: import("styled-components").StyledComponent<"div", any, {
|
|
21
20
|
full?: boolean | undefined;
|
|
22
|
-
} &
|
|
21
|
+
} & SxProp, never>;
|
|
23
22
|
};
|
|
24
23
|
export default _default;
|
package/lib/Header.js
CHANGED
|
@@ -21,14 +21,14 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
21
21
|
const Header = _styledComponents.default.div.withConfig({
|
|
22
22
|
displayName: "Header",
|
|
23
23
|
componentId: "sc-217i47-0"
|
|
24
|
-
})(["z-index:32;display:flex;padding:", ";font-size:", ";line-height:", ";color:", ";background-color:", ";align-items:center;flex-wrap:nowrap;", "
|
|
24
|
+
})(["z-index:32;display:flex;padding:", ";font-size:", ";line-height:", ";color:", ";background-color:", ";align-items:center;flex-wrap:nowrap;", ";"], (0, _constants.get)('space.3'), (0, _constants.get)('fontSizes.1'), (0, _constants.get)('lineHeights.default'), (0, _constants.get)('colors.header.text'), (0, _constants.get)('colors.header.bg'), _sx.default);
|
|
25
25
|
|
|
26
26
|
const HeaderItem = _styledComponents.default.div.withConfig({
|
|
27
27
|
displayName: "Header__HeaderItem",
|
|
28
28
|
componentId: "sc-217i47-1"
|
|
29
|
-
})(["display:flex;margin-right:", ";align-self:stretch;align-items:center;flex-wrap:nowrap;", ";", ";"
|
|
29
|
+
})(["display:flex;margin-right:", ";align-self:stretch;align-items:center;flex-wrap:nowrap;", ";", ";"], (0, _constants.get)('space.3'), ({
|
|
30
30
|
full
|
|
31
|
-
}) => full && (0, _styledComponents.css)(["flex:auto;"]),
|
|
31
|
+
}) => full && (0, _styledComponents.css)(["flex:auto;"]), _sx.default);
|
|
32
32
|
|
|
33
33
|
HeaderItem.displayName = 'Header.Item';
|
|
34
34
|
|
|
@@ -49,7 +49,7 @@ const HeaderLink = _styledComponents.default.a.attrs(({
|
|
|
49
49
|
}).withConfig({
|
|
50
50
|
displayName: "Header__HeaderLink",
|
|
51
51
|
componentId: "sc-217i47-2"
|
|
52
|
-
})(["font-weight:", ";color:", ";white-space:nowrap;cursor:pointer;text-decoration:none;display:flex;align-items:center;&:hover,&:focus{color:", ";}", ";"
|
|
52
|
+
})(["font-weight:", ";color:", ";white-space:nowrap;cursor:pointer;text-decoration:none;display:flex;align-items:center;&:hover,&:focus{color:", ";}", ";"], (0, _constants.get)('fontWeights.bold'), (0, _constants.get)('colors.header.logo'), (0, _constants.get)('colors.header.text'), _sx.default);
|
|
53
53
|
|
|
54
54
|
HeaderLink.displayName = 'Header.Link';
|
|
55
55
|
|
package/lib/Header.jsx
CHANGED
|
@@ -36,8 +36,6 @@ const Header = styled_components_1.default.div `
|
|
|
36
36
|
align-items: center;
|
|
37
37
|
flex-wrap: nowrap;
|
|
38
38
|
|
|
39
|
-
${constants_1.COMMON}
|
|
40
|
-
${constants_1.BORDER}
|
|
41
39
|
${sx_1.default};
|
|
42
40
|
`;
|
|
43
41
|
const HeaderItem = styled_components_1.default.div `
|
|
@@ -52,8 +50,6 @@ const HeaderItem = styled_components_1.default.div `
|
|
|
52
50
|
flex: auto;
|
|
53
51
|
`};
|
|
54
52
|
|
|
55
|
-
${constants_1.COMMON};
|
|
56
|
-
${constants_1.BORDER};
|
|
57
53
|
${sx_1.default};
|
|
58
54
|
`;
|
|
59
55
|
HeaderItem.displayName = 'Header.Item';
|
|
@@ -81,9 +77,6 @@ const HeaderLink = styled_components_1.default.a.attrs(({ to }) => {
|
|
|
81
77
|
color: ${constants_1.get('colors.header.text')};
|
|
82
78
|
}
|
|
83
79
|
|
|
84
|
-
${constants_1.COMMON};
|
|
85
|
-
${constants_1.BORDER};
|
|
86
|
-
${constants_1.TYPOGRAPHY};
|
|
87
80
|
${sx_1.default};
|
|
88
81
|
`;
|
|
89
82
|
HeaderLink.displayName = 'Header.Link';
|
package/lib/Label.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { BorderColorProps } from 'styled-system';
|
|
2
|
-
import { SystemCommonProps } from './constants';
|
|
3
2
|
import { SxProp } from './sx';
|
|
4
3
|
import { ComponentProps } from './utils/types';
|
|
5
4
|
declare const Label: import("styled-components").StyledComponent<"span", any, {
|
|
6
5
|
variant?: "small" | "medium" | "large" | "xl" | undefined;
|
|
7
6
|
dropshadow?: boolean | undefined;
|
|
8
7
|
outline?: boolean | undefined;
|
|
9
|
-
} & BorderColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> &
|
|
8
|
+
} & BorderColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & SxProp, never>;
|
|
10
9
|
export declare type LabelProps = ComponentProps<typeof Label>;
|
|
11
10
|
export default Label;
|
package/lib/Label.js
CHANGED
|
@@ -19,7 +19,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
-
const outlineStyles = (0, _styledComponents.css)(["margin-top:-1px;margin-bottom:-1px;color:", ";border:", " solid ", ";box-shadow:none;", ";
|
|
22
|
+
const outlineStyles = (0, _styledComponents.css)(["margin-top:-1px;margin-bottom:-1px;color:", ";border:", " solid ", ";box-shadow:none;", ";background-color:transparent;"], (0, _constants.get)('colors.fg.muted'), (0, _constants.get)('borderWidths.1'), (0, _constants.get)('colors.border.default'), _styledSystem.borderColor);
|
|
23
23
|
const sizeVariant = (0, _styledSystem.variant)({
|
|
24
24
|
variants: {
|
|
25
25
|
small: {
|
|
@@ -49,10 +49,9 @@ const sizeVariant = (0, _styledSystem.variant)({
|
|
|
49
49
|
const Label = _styledComponents.default.span.withConfig({
|
|
50
50
|
displayName: "Label",
|
|
51
51
|
componentId: "sc-1t3ykp0-0"
|
|
52
|
-
})(["display:inline-block;font-weight:", ";color:", ";border-radius:", ";&:hover{text-decoration:none;}", " ", " ", "
|
|
52
|
+
})(["display:inline-block;font-weight:", ";color:", ";border-radius:", ";background-color:", ";&:hover{text-decoration:none;}", " ", " ", " ", ""], (0, _constants.get)('fontWeights.semibold'), (0, _constants.get)('colors.fg.onEmphasis'), (0, _constants.get)('radii.3'), (0, _constants.get)('colors.neutral.emphasis'), sizeVariant, props => props.dropshadow ? 'box-shadow: inset 0 -1px 0 rgba(27, 31, 35, 0.12)' : '', props => props.outline ? outlineStyles : '', _sx.default);
|
|
53
53
|
|
|
54
54
|
Label.defaultProps = {
|
|
55
|
-
bg: 'neutral.emphasis',
|
|
56
55
|
variant: 'medium'
|
|
57
56
|
};
|
|
58
57
|
var _default = Label;
|
package/lib/Label.jsx
CHANGED
|
@@ -33,7 +33,6 @@ const outlineStyles = styled_components_1.css `
|
|
|
33
33
|
border: ${constants_1.get('borderWidths.1')} solid ${constants_1.get('colors.border.default')};
|
|
34
34
|
box-shadow: none;
|
|
35
35
|
${styled_system_1.borderColor};
|
|
36
|
-
${constants_1.COMMON};
|
|
37
36
|
background-color: transparent;
|
|
38
37
|
`;
|
|
39
38
|
const sizeVariant = styled_system_1.variant({
|
|
@@ -66,19 +65,18 @@ const Label = styled_components_1.default.span `
|
|
|
66
65
|
font-weight: ${constants_1.get('fontWeights.semibold')};
|
|
67
66
|
color: ${constants_1.get('colors.fg.onEmphasis')};
|
|
68
67
|
border-radius: ${constants_1.get('radii.3')};
|
|
68
|
+
background-color: ${constants_1.get('colors.neutral.emphasis')};
|
|
69
69
|
|
|
70
70
|
&:hover {
|
|
71
71
|
text-decoration: none;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
${sizeVariant}
|
|
75
|
-
${constants_1.COMMON}
|
|
76
75
|
${props => (props.dropshadow ? 'box-shadow: inset 0 -1px 0 rgba(27, 31, 35, 0.12)' : '')}
|
|
77
76
|
${props => (props.outline ? outlineStyles : '')} // must be last to override other values
|
|
78
77
|
${sx_1.default}
|
|
79
78
|
`;
|
|
80
79
|
Label.defaultProps = {
|
|
81
|
-
bg: 'neutral.emphasis',
|
|
82
80
|
variant: 'medium'
|
|
83
81
|
};
|
|
84
82
|
exports.default = Label;
|
package/lib/LabelGroup.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { SystemCommonProps } from './constants';
|
|
2
1
|
import { SxProp } from './sx';
|
|
3
2
|
import { ComponentProps } from './utils/types';
|
|
4
|
-
declare const LabelGroup: import("styled-components").StyledComponent<"span", any,
|
|
3
|
+
declare const LabelGroup: import("styled-components").StyledComponent<"span", any, SxProp, never>;
|
|
5
4
|
export declare type LabelGroupProps = ComponentProps<typeof LabelGroup>;
|
|
6
5
|
export default LabelGroup;
|
package/lib/LabelGroup.js
CHANGED
|
@@ -16,7 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
16
16
|
const LabelGroup = _styledComponents.default.span.withConfig({
|
|
17
17
|
displayName: "LabelGroup",
|
|
18
18
|
componentId: "k6k3qa-0"
|
|
19
|
-
})(["
|
|
19
|
+
})(["& *{margin-right:", ";}& *:last-child{margin-right:0;}", ";"], (0, _constants.get)('space.1'), _sx.default);
|
|
20
20
|
|
|
21
21
|
var _default = LabelGroup;
|
|
22
22
|
exports.default = _default;
|
package/lib/LabelGroup.jsx
CHANGED
|
@@ -7,7 +7,6 @@ const styled_components_1 = __importDefault(require("styled-components"));
|
|
|
7
7
|
const constants_1 = require("./constants");
|
|
8
8
|
const sx_1 = __importDefault(require("./sx"));
|
|
9
9
|
const LabelGroup = styled_components_1.default.span `
|
|
10
|
-
${constants_1.COMMON}
|
|
11
10
|
& * {
|
|
12
11
|
margin-right: ${constants_1.get('space.1')};
|
|
13
12
|
}
|
package/lib/Link.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { SystemCommonProps, SystemTypographyProps } from './constants';
|
|
2
1
|
import { SxProp } from './sx';
|
|
3
2
|
import { ComponentProps } from './utils/types';
|
|
4
3
|
declare const Link: import("styled-components").StyledComponent<"a", any, {
|
|
5
4
|
hoverColor?: string | undefined;
|
|
6
5
|
muted?: boolean | undefined;
|
|
7
6
|
underline?: boolean | undefined;
|
|
8
|
-
} &
|
|
7
|
+
} & SxProp, never>;
|
|
9
8
|
export declare type LinkProps = ComponentProps<typeof Link>;
|
|
10
9
|
export default Link;
|
package/lib/Link.js
CHANGED
|
@@ -25,7 +25,7 @@ const hoverColor = (0, _styledSystem.system)({
|
|
|
25
25
|
const Link = _styledComponents.default.a.withConfig({
|
|
26
26
|
displayName: "Link",
|
|
27
27
|
componentId: "sc-1brdqhf-0"
|
|
28
|
-
})(["color:", ";text-decoration:", ";&:hover{text-decoration:", ";", ";}&:is(button){display:inline-block;padding:0;font-size:inherit;white-space:nowrap;cursor:pointer;user-select:none;background-color:transparent;border:0;appearance:none;}", ";"
|
|
28
|
+
})(["color:", ";text-decoration:", ";&:hover{text-decoration:", ";", ";}&:is(button){display:inline-block;padding:0;font-size:inherit;white-space:nowrap;cursor:pointer;user-select:none;background-color:transparent;border:0;appearance:none;}", ";"], props => props.muted ? (0, _constants.get)('colors.fg.muted')(props) : (0, _constants.get)('colors.accent.fg')(props), props => props.underline ? 'underline' : 'none', props => props.muted ? 'none' : 'underline', props => props.hoverColor ? hoverColor : props.muted ? `color: ${(0, _constants.get)('colors.accent.fg')(props)}` : '', _sx.default);
|
|
29
29
|
|
|
30
30
|
var _default = Link;
|
|
31
31
|
exports.default = _default;
|
package/lib/Link.jsx
CHANGED
package/lib/NewButton/button.js
CHANGED
|
@@ -270,9 +270,6 @@ const Button = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
270
270
|
gridArea: 'trailingIcon'
|
|
271
271
|
}
|
|
272
272
|
};
|
|
273
|
-
const iconWrapStyles = {
|
|
274
|
-
display: 'inline-block'
|
|
275
|
-
};
|
|
276
273
|
|
|
277
274
|
const sxStyles = _sx.merge.all([styles, getSizeStyles(size, variant, iconOnly), getVariantStyles(variant, theme), sxProp]);
|
|
278
275
|
|
|
@@ -282,7 +279,6 @@ const Button = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
282
279
|
}, props), LeadingIcon && /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
283
280
|
as: "span",
|
|
284
281
|
"data-component": "leadingIcon",
|
|
285
|
-
sx: iconWrapStyles,
|
|
286
282
|
"aria-hidden": !iconOnly
|
|
287
283
|
}, /*#__PURE__*/_react.default.createElement(LeadingIcon, null)), /*#__PURE__*/_react.default.createElement("span", {
|
|
288
284
|
"data-component": "text",
|
|
@@ -290,19 +286,12 @@ const Button = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
290
286
|
}, children), Icon && /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
291
287
|
"data-component": "icon-only",
|
|
292
288
|
as: "span",
|
|
293
|
-
sx: {
|
|
294
|
-
display: 'inline-block'
|
|
295
|
-
},
|
|
296
289
|
"aria-hidden": !iconOnly
|
|
297
290
|
}, /*#__PURE__*/_react.default.createElement(Icon, null)), TrailingIcon && /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
298
291
|
as: "span",
|
|
299
292
|
"data-component": "trailingIcon",
|
|
300
|
-
sx: { ...iconWrapStyles,
|
|
301
|
-
ml: 2
|
|
302
|
-
},
|
|
303
293
|
"aria-hidden": !iconOnly
|
|
304
294
|
}, /*#__PURE__*/_react.default.createElement(TrailingIcon, null)));
|
|
305
295
|
});
|
|
306
296
|
exports.Button = Button;
|
|
307
|
-
Button.displayName = 'Button';
|
|
308
|
-
Object.assign(Button, {});
|
|
297
|
+
Button.displayName = 'Button';
|
package/lib/NewButton/button.jsx
CHANGED
|
@@ -250,9 +250,6 @@ const Button = react_1.forwardRef(({ children, sx: sxProp = {}, ...props }, forw
|
|
|
250
250
|
gridArea: 'trailingIcon'
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
|
-
const iconWrapStyles = {
|
|
254
|
-
display: 'inline-block'
|
|
255
|
-
};
|
|
256
253
|
const sxStyles = sx_1.merge.all([
|
|
257
254
|
styles,
|
|
258
255
|
getSizeStyles(size, variant, iconOnly),
|
|
@@ -260,20 +257,19 @@ const Button = react_1.forwardRef(({ children, sx: sxProp = {}, ...props }, forw
|
|
|
260
257
|
sxProp
|
|
261
258
|
]);
|
|
262
259
|
return (<ButtonBase sx={sxStyles} ref={forwardedRef} {...props}>
|
|
263
|
-
{LeadingIcon && (<Box_1.default as="span" data-component="leadingIcon"
|
|
260
|
+
{LeadingIcon && (<Box_1.default as="span" data-component="leadingIcon" aria-hidden={!iconOnly}>
|
|
264
261
|
<LeadingIcon />
|
|
265
262
|
</Box_1.default>)}
|
|
266
263
|
<span data-component="text" hidden={Icon ? true : false}>
|
|
267
264
|
{children}
|
|
268
265
|
</span>
|
|
269
|
-
{Icon && (<Box_1.default data-component="icon-only" as="span"
|
|
266
|
+
{Icon && (<Box_1.default data-component="icon-only" as="span" aria-hidden={!iconOnly}>
|
|
270
267
|
<Icon />
|
|
271
268
|
</Box_1.default>)}
|
|
272
|
-
{TrailingIcon && (<Box_1.default as="span" data-component="trailingIcon"
|
|
269
|
+
{TrailingIcon && (<Box_1.default as="span" data-component="trailingIcon" aria-hidden={!iconOnly}>
|
|
273
270
|
<TrailingIcon />
|
|
274
271
|
</Box_1.default>)}
|
|
275
272
|
</ButtonBase>);
|
|
276
273
|
});
|
|
277
274
|
exports.Button = Button;
|
|
278
275
|
Button.displayName = 'Button';
|
|
279
|
-
Object.assign(Button, {});
|
package/lib/Overlay.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { ComponentProps } from './utils/types';
|
|
2
|
+
import { AriaRole, Merge } from './utils/types';
|
|
4
3
|
import { TouchOrMouseEvent } from './hooks';
|
|
5
4
|
import { SxProp } from './sx';
|
|
6
5
|
import { AnchorSide } from './behaviors/anchoredPosition';
|
|
@@ -10,7 +9,7 @@ declare type StyledOverlayProps = {
|
|
|
10
9
|
maxHeight?: keyof Omit<typeof heightMap, 'auto' | 'initial'>;
|
|
11
10
|
visibility?: 'visible' | 'hidden';
|
|
12
11
|
anchorSide?: AnchorSide;
|
|
13
|
-
};
|
|
12
|
+
} & SxProp;
|
|
14
13
|
declare const heightMap: {
|
|
15
14
|
xsmall: string;
|
|
16
15
|
small: string;
|
|
@@ -28,20 +27,22 @@ declare const widthMap: {
|
|
|
28
27
|
xxlarge: string;
|
|
29
28
|
auto: string;
|
|
30
29
|
};
|
|
31
|
-
declare
|
|
32
|
-
export declare type OverlayProps = {
|
|
30
|
+
declare type BaseOverlayProps = {
|
|
33
31
|
ignoreClickRefs?: React.RefObject<HTMLElement>[];
|
|
34
32
|
initialFocusRef?: React.RefObject<HTMLElement>;
|
|
35
33
|
returnFocusRef: React.RefObject<HTMLElement>;
|
|
36
34
|
onClickOutside: (e: TouchOrMouseEvent) => void;
|
|
37
35
|
onEscape: (e: KeyboardEvent) => void;
|
|
38
36
|
visibility?: 'visible' | 'hidden';
|
|
39
|
-
|
|
40
|
-
top
|
|
41
|
-
left
|
|
37
|
+
'data-test-id'?: unknown;
|
|
38
|
+
top?: number;
|
|
39
|
+
left?: number;
|
|
42
40
|
portalContainerName?: string;
|
|
43
41
|
preventFocusOnOpen?: boolean;
|
|
44
|
-
|
|
42
|
+
role?: AriaRole;
|
|
43
|
+
children?: React.ReactNode;
|
|
44
|
+
};
|
|
45
|
+
export declare type OverlayProps = Merge<StyledOverlayProps, BaseOverlayProps>;
|
|
45
46
|
/**
|
|
46
47
|
* An `Overlay` is a flexible floating surface, used to display transient content such as menus,
|
|
47
48
|
* selection options, dialogs, and more. Overlays use shadows to express elevation. The `Overlay`
|
|
@@ -59,5 +60,5 @@ export declare type OverlayProps = {
|
|
|
59
60
|
* @param left Optional. Horizontal position of the overlay, relative to its closest positioned ancestor (often its `Portal`).
|
|
60
61
|
* @param portalContainerName Optional. The name of the portal container to render the Overlay into.
|
|
61
62
|
*/
|
|
62
|
-
declare const Overlay: React.ForwardRefExoticComponent<
|
|
63
|
+
declare const Overlay: React.ForwardRefExoticComponent<Omit<StyledOverlayProps, keyof BaseOverlayProps> & BaseOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
|
63
64
|
export default Overlay;
|
package/lib/Overlay.js
CHANGED
|
@@ -9,10 +9,10 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _constants = require("./constants");
|
|
13
|
-
|
|
14
12
|
var _useIsomorphicLayoutEffect = _interopRequireDefault(require("./utils/useIsomorphicLayoutEffect"));
|
|
15
13
|
|
|
14
|
+
var _constants = require("./constants");
|
|
15
|
+
|
|
16
16
|
var _hooks = require("./hooks");
|
|
17
17
|
|
|
18
18
|
var _Portal = _interopRequireDefault(require("./Portal"));
|
|
@@ -83,7 +83,7 @@ function getSlideAnimationStartingVector(anchorSide) {
|
|
|
83
83
|
const StyledOverlay = _styledComponents.default.div.withConfig({
|
|
84
84
|
displayName: "Overlay__StyledOverlay",
|
|
85
85
|
componentId: "jhwkzw-0"
|
|
86
|
-
})(["background-color:", ";box-shadow:", ";position:absolute;min-width:192px;max-width:640px;height:", ";max-height:", ";width:", ";border-radius:12px;overflow:hidden;animation:overlay-appear ", "ms ", ";@keyframes overlay-appear{0%{opacity:0;}100%{opacity:1;}}visibility:var(--styled-overlay-visibility);:focus{outline:none;}", ";"
|
|
86
|
+
})(["background-color:", ";box-shadow:", ";position:absolute;min-width:192px;max-width:640px;height:", ";max-height:", ";width:", ";border-radius:12px;overflow:hidden;animation:overlay-appear ", "ms ", ";@keyframes overlay-appear{0%{opacity:0;}100%{opacity:1;}}visibility:var(--styled-overlay-visibility);:focus{outline:none;}", ";"], (0, _constants.get)('colors.canvas.overlay'), (0, _constants.get)('shadows.overlay.shadow'), props => heightMap[props.height || 'auto'], props => props.maxHeight && heightMap[props.maxHeight], props => widthMap[props.width || 'auto'], animationDuration, (0, _constants.get)('animation.easeOutCubic'), _sx.default);
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* An `Overlay` is a flexible floating surface, used to display transient content such as menus,
|
|
@@ -171,7 +171,6 @@ const Overlay = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
171
171
|
style: {
|
|
172
172
|
top: `${top || 0}px`,
|
|
173
173
|
left: `${left || 0}px`,
|
|
174
|
-
...rest.style,
|
|
175
174
|
'--styled-overlay-visibility': visibility
|
|
176
175
|
}
|
|
177
176
|
})));
|
package/lib/Overlay.jsx
CHANGED
|
@@ -24,8 +24,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
26
26
|
const react_1 = __importStar(require("react"));
|
|
27
|
-
const constants_1 = require("./constants");
|
|
28
27
|
const useIsomorphicLayoutEffect_1 = __importDefault(require("./utils/useIsomorphicLayoutEffect"));
|
|
28
|
+
const constants_1 = require("./constants");
|
|
29
29
|
const hooks_1 = require("./hooks");
|
|
30
30
|
const Portal_1 = __importDefault(require("./Portal"));
|
|
31
31
|
const sx_1 = __importDefault(require("./sx"));
|
|
@@ -89,7 +89,6 @@ const StyledOverlay = styled_components_1.default.div `
|
|
|
89
89
|
:focus {
|
|
90
90
|
outline: none;
|
|
91
91
|
}
|
|
92
|
-
${constants_1.COMMON};
|
|
93
92
|
${sx_1.default};
|
|
94
93
|
`;
|
|
95
94
|
/**
|
|
@@ -144,7 +143,6 @@ const Overlay = react_1.default.forwardRef(({ onClickOutside, role = 'none', ini
|
|
|
144
143
|
<StyledOverlay height={height} role={role} {...rest} ref={combinedRef} style={{
|
|
145
144
|
top: `${top || 0}px`,
|
|
146
145
|
left: `${left || 0}px`,
|
|
147
|
-
...rest.style,
|
|
148
146
|
'--styled-overlay-visibility': visibility
|
|
149
147
|
}}/>
|
|
150
148
|
</Portal_1.default>);
|
package/lib/Pagehead.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { SystemCommonProps } from './constants';
|
|
2
1
|
import { SxProp } from './sx';
|
|
3
2
|
import { ComponentProps } from './utils/types';
|
|
4
|
-
declare const Pagehead: import("styled-components").StyledComponent<"div", any,
|
|
3
|
+
declare const Pagehead: import("styled-components").StyledComponent<"div", any, SxProp, never>;
|
|
5
4
|
export declare type PageheadProps = ComponentProps<typeof Pagehead>;
|
|
6
5
|
export default Pagehead;
|
package/lib/Pagehead.js
CHANGED
|
@@ -16,7 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
16
16
|
const Pagehead = _styledComponents.default.div.withConfig({
|
|
17
17
|
displayName: "Pagehead",
|
|
18
18
|
componentId: "sc-1ntn78e-0"
|
|
19
|
-
})(["position:relative;padding-top:", ";padding-bottom:", ";margin-bottom:", ";border-bottom:1px solid ", ";", ";"
|
|
19
|
+
})(["position:relative;padding-top:", ";padding-bottom:", ";margin-bottom:", ";border-bottom:1px solid ", ";", ";"], (0, _constants.get)('space.4'), (0, _constants.get)('space.4'), (0, _constants.get)('space.4'), (0, _constants.get)('colors.border.default'), _sx.default);
|
|
20
20
|
|
|
21
21
|
var _default = Pagehead;
|
|
22
22
|
exports.default = _default;
|
package/lib/Pagehead.jsx
CHANGED
|
@@ -12,7 +12,6 @@ const Pagehead = styled_components_1.default.div `
|
|
|
12
12
|
padding-bottom: ${constants_1.get('space.4')};
|
|
13
13
|
margin-bottom: ${constants_1.get('space.4')};
|
|
14
14
|
border-bottom: 1px solid ${constants_1.get('colors.border.default')};
|
|
15
|
-
${constants_1.COMMON};
|
|
16
15
|
${sx_1.default};
|
|
17
16
|
`;
|
|
18
17
|
exports.default = Pagehead;
|