@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
|
@@ -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 SelectMenuFooter: import("styled-components").StyledComponent<"footer", any,
|
|
3
|
+
declare const SelectMenuFooter: import("styled-components").StyledComponent<"footer", any, SxProp, never>;
|
|
5
4
|
export declare type SelectMenuFooterProps = ComponentProps<typeof SelectMenuFooter>;
|
|
6
5
|
export default SelectMenuFooter;
|
|
@@ -22,7 +22,7 @@ const footerStyles = (0, _styledComponents.css)(["margin-top:-1px;padding:", " "
|
|
|
22
22
|
const SelectMenuFooter = _styledComponents.default.footer.withConfig({
|
|
23
23
|
displayName: "SelectMenuFooter",
|
|
24
24
|
componentId: "rkvco1-0"
|
|
25
|
-
})(["", " ", "
|
|
25
|
+
})(["", " ", ";"], footerStyles, _sx.default);
|
|
26
26
|
|
|
27
27
|
SelectMenuFooter.displayName = 'SelectMenu.Footer';
|
|
28
28
|
var _default = SelectMenuFooter;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SystemCommonProps, SystemTypographyProps } from '../constants';
|
|
3
2
|
import { SxProp } from '../sx';
|
|
4
3
|
import { ComponentProps } from '../utils/types';
|
|
5
|
-
declare const StyledHeader: import("styled-components").StyledComponent<"header", any,
|
|
4
|
+
declare const StyledHeader: import("styled-components").StyledComponent<"header", any, SxProp, never>;
|
|
6
5
|
export declare type SelectMenuHeaderProps = ComponentProps<typeof StyledHeader>;
|
|
7
6
|
declare const SelectMenuHeader: {
|
|
8
7
|
({ children, theme, ...rest }: SelectMenuHeaderProps): JSX.Element;
|
|
@@ -27,7 +27,7 @@ const SelectMenuTitle = _styledComponents.default.h3.withConfig({
|
|
|
27
27
|
const StyledHeader = _styledComponents.default.header.withConfig({
|
|
28
28
|
displayName: "SelectMenuHeader__StyledHeader",
|
|
29
29
|
componentId: "sc-1pwppzc-1"
|
|
30
|
-
})(["display:flex;flex:none;padding:", ";border-bottom:", " solid ", "
|
|
30
|
+
})(["display:flex;flex:none;padding:", ";border-bottom:", " solid ", ";@media (min-width:", "){padding-top:", ";padding-bottom:", ";}", ";"], (0, _constants.get)('space.3'), (0, _constants.get)('borderWidths'), (0, _constants.get)('colors.border.muted'), (0, _constants.get)('breakpoints.0'), (0, _constants.get)('space.2'), (0, _constants.get)('space.2'), _sx.default);
|
|
31
31
|
|
|
32
32
|
const SelectMenuHeader = ({
|
|
33
33
|
children,
|
|
@@ -25,8 +25,6 @@ const StyledHeader = styled_components_1.default.header `
|
|
|
25
25
|
flex: none; // fixes header from getting squeezed in Safari iOS
|
|
26
26
|
padding: ${constants_1.get('space.3')};
|
|
27
27
|
border-bottom: ${constants_1.get('borderWidths')} solid ${constants_1.get('colors.border.muted')};
|
|
28
|
-
${constants_1.COMMON}
|
|
29
|
-
${constants_1.TYPOGRAPHY}
|
|
30
28
|
|
|
31
29
|
@media (min-width: ${constants_1.get('breakpoints.0')}) {
|
|
32
30
|
padding-top: ${constants_1.get('space.2')};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SystemCommonProps } from '../constants';
|
|
3
2
|
import { SxProp } from '../sx';
|
|
4
3
|
import { ComponentProps } from '../utils/types';
|
|
5
4
|
export declare const listItemStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
6
5
|
declare const StyledItem: import("styled-components").StyledComponent<"a", any, {
|
|
7
6
|
role: "menuitemcheckbox";
|
|
8
|
-
} &
|
|
7
|
+
} & SxProp, "role">;
|
|
9
8
|
declare type SelectMenuItemInteralProps = {
|
|
10
9
|
as?: React.ElementType;
|
|
11
10
|
selected?: boolean;
|
|
12
11
|
} & ComponentProps<typeof StyledItem>;
|
|
13
|
-
declare const SelectMenuItem: React.ForwardRefExoticComponent<Pick<SelectMenuItemInteralProps, "translate" | "hidden" | "children" | "theme" | "slot" | "style" | "title" | "
|
|
12
|
+
declare const SelectMenuItem: React.ForwardRefExoticComponent<Pick<SelectMenuItemInteralProps, "color" | "translate" | "hidden" | "children" | "theme" | "slot" | "style" | "title" | "role" | "sx" | "type" | "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" | "as" | "selected" | "download" | "href" | "hrefLang" | "media" | "ping" | "rel" | "target" | "referrerPolicy"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
14
13
|
export declare type SelectMenuItemProps = ComponentProps<typeof SelectMenuItem>;
|
|
15
14
|
export default SelectMenuItem;
|
|
@@ -35,7 +35,7 @@ const StyledItem = _styledComponents.default.a.attrs(() => ({
|
|
|
35
35
|
})).withConfig({
|
|
36
36
|
displayName: "SelectMenuItem__StyledItem",
|
|
37
37
|
componentId: "gjymba-0"
|
|
38
|
-
})(["", " ", "
|
|
38
|
+
})(["", " ", ";"], listItemStyles, _sx.default);
|
|
39
39
|
|
|
40
40
|
const SelectMenuItem = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
41
41
|
children,
|
|
@@ -116,7 +116,6 @@ const StyledItem = styled_components_1.default.a.attrs(() => ({
|
|
|
116
116
|
role: 'menuitemcheckbox'
|
|
117
117
|
})) `
|
|
118
118
|
${exports.listItemStyles}
|
|
119
|
-
${constants_1.COMMON}
|
|
120
119
|
${sx_1.default};
|
|
121
120
|
`;
|
|
122
121
|
const SelectMenuItem = react_1.forwardRef(({ children, selected, theme, onClick, ...rest }, forwardedRef) => {
|
|
@@ -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 SelectMenuList: import("styled-components").StyledComponent<"div", any,
|
|
3
|
+
declare const SelectMenuList: import("styled-components").StyledComponent<"div", any, SxProp, never>;
|
|
5
4
|
export declare type SelectMenuListProps = ComponentProps<typeof SelectMenuList>;
|
|
6
5
|
export default SelectMenuList;
|
|
@@ -22,7 +22,7 @@ const listStyles = (0, _styledComponents.css)(["position:relative;padding:0;marg
|
|
|
22
22
|
const SelectMenuList = _styledComponents.default.div.withConfig({
|
|
23
23
|
displayName: "SelectMenuList",
|
|
24
24
|
componentId: "sc-1opbpf6-0"
|
|
25
|
-
})(["", " ", "
|
|
25
|
+
})(["", " ", ";"], listStyles, _sx.default);
|
|
26
26
|
|
|
27
27
|
SelectMenuList.displayName = 'SelectMenu.List';
|
|
28
28
|
var _default = SelectMenuList;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { SxProp } from '../sx';
|
|
3
3
|
import { ComponentProps } from '../utils/types';
|
|
4
|
-
declare const Animation: import("styled-components").StyledComponent<"div", any,
|
|
4
|
+
declare const Animation: import("styled-components").StyledComponent<"div", any, SxProp, never>;
|
|
5
5
|
export declare type SelectMenuLoadingAnimationProps = ComponentProps<typeof Animation>;
|
|
6
6
|
declare const SelectMenuLoadingAnimation: (props: SelectMenuLoadingAnimationProps) => JSX.Element;
|
|
7
7
|
export default SelectMenuLoadingAnimation;
|
|
@@ -13,12 +13,14 @@ var _constants = require("../constants");
|
|
|
13
13
|
|
|
14
14
|
var _Spinner = _interopRequireDefault(require("../Spinner"));
|
|
15
15
|
|
|
16
|
+
var _sx = _interopRequireDefault(require("../sx"));
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
20
|
const Animation = _styledComponents.default.div.withConfig({
|
|
19
21
|
displayName: "SelectMenuLoadingAnimation__Animation",
|
|
20
22
|
componentId: "sc-17k54td-0"
|
|
21
|
-
})(["padding:", " ", ";text-align:center;background-color:", ";", ""], (0, _constants.get)('space.6'), (0, _constants.get)('space.4'), (0, _constants.get)('colors.canvas.overlay'),
|
|
23
|
+
})(["padding:", " ", ";text-align:center;background-color:", ";", ""], (0, _constants.get)('space.6'), (0, _constants.get)('space.4'), (0, _constants.get)('colors.canvas.overlay'), _sx.default);
|
|
22
24
|
|
|
23
25
|
const SelectMenuLoadingAnimation = props => {
|
|
24
26
|
return /*#__PURE__*/_react.default.createElement(Animation, props, /*#__PURE__*/_react.default.createElement(_Spinner.default, null));
|
|
@@ -7,11 +7,12 @@ const react_1 = __importDefault(require("react"));
|
|
|
7
7
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
8
|
const constants_1 = require("../constants");
|
|
9
9
|
const Spinner_1 = __importDefault(require("../Spinner"));
|
|
10
|
+
const sx_1 = __importDefault(require("../sx"));
|
|
10
11
|
const Animation = styled_components_1.default.div `
|
|
11
12
|
padding: ${constants_1.get('space.6')} ${constants_1.get('space.4')};
|
|
12
13
|
text-align: center;
|
|
13
14
|
background-color: ${constants_1.get('colors.canvas.overlay')};
|
|
14
|
-
${
|
|
15
|
+
${sx_1.default}
|
|
15
16
|
`;
|
|
16
17
|
const SelectMenuLoadingAnimation = (props) => {
|
|
17
18
|
return (<Animation {...props}>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WidthProps } from 'styled-system';
|
|
3
|
-
import { SystemCommonProps } from '../constants';
|
|
4
3
|
import { SxProp } from '../sx';
|
|
5
4
|
import { ComponentProps } from '../utils/types';
|
|
6
5
|
declare type StyledModalProps = {
|
|
@@ -8,8 +7,8 @@ declare type StyledModalProps = {
|
|
|
8
7
|
} & WidthProps;
|
|
9
8
|
declare const ModalWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
10
9
|
align?: "left" | "right" | undefined;
|
|
11
|
-
} &
|
|
10
|
+
} & SxProp, never>;
|
|
12
11
|
declare type SelectMenuModalInternalProps = Pick<StyledModalProps, 'width'> & ComponentProps<typeof ModalWrapper>;
|
|
13
|
-
declare const SelectMenuModal: React.ForwardRefExoticComponent<Pick<SelectMenuModalInternalProps, "
|
|
12
|
+
declare const SelectMenuModal: React.ForwardRefExoticComponent<Pick<SelectMenuModalInternalProps, "color" | "translate" | "width" | "hidden" | "children" | "theme" | "slot" | "style" | "title" | "role" | "sx" | "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" | "align"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
13
|
export declare type SelectMenuModalProps = ComponentProps<typeof SelectMenuModal>;
|
|
15
14
|
export default SelectMenuModal;
|
|
@@ -35,7 +35,7 @@ const Modal = _styledComponents.default.div.withConfig({
|
|
|
35
35
|
const ModalWrapper = _styledComponents.default.div.withConfig({
|
|
36
36
|
displayName: "SelectMenuModal__ModalWrapper",
|
|
37
37
|
componentId: "sc-1m5qo55-1"
|
|
38
|
-
})(["", " ", "
|
|
38
|
+
})(["", " ", ";"], modalWrapperStyles, _sx.default);
|
|
39
39
|
|
|
40
40
|
const SelectMenuModal = /*#__PURE__*/_react.default.forwardRef(({
|
|
41
41
|
children,
|
|
@@ -101,7 +101,6 @@ const Modal = styled_components_1.default.div `
|
|
|
101
101
|
`;
|
|
102
102
|
const ModalWrapper = styled_components_1.default.div `
|
|
103
103
|
${modalWrapperStyles}
|
|
104
|
-
${constants_1.COMMON}
|
|
105
104
|
${sx_1.default};
|
|
106
105
|
`;
|
|
107
106
|
const SelectMenuModal = react_1.default.forwardRef(({ children, theme, width: widthProp, ...rest }, forwardedRef) => {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SystemCommonProps } from '../constants';
|
|
3
2
|
import { SxProp } from '../sx';
|
|
4
3
|
import { ComponentProps } from '../utils/types';
|
|
5
|
-
declare const StyledTab: import("styled-components").StyledComponent<"button", any,
|
|
4
|
+
declare const StyledTab: import("styled-components").StyledComponent<"button", any, SxProp, never>;
|
|
6
5
|
export declare type SelectMenuTabProps = {
|
|
7
6
|
tabName?: string;
|
|
8
7
|
index?: number;
|
|
@@ -30,7 +30,7 @@ const tabStyles = (0, _styledComponents.css)(["flex:1;padding:", " ", ";font-siz
|
|
|
30
30
|
const StyledTab = _styledComponents.default.button.withConfig({
|
|
31
31
|
displayName: "SelectMenuTab__StyledTab",
|
|
32
32
|
componentId: "ga32sz-0"
|
|
33
|
-
})(["", " ", "
|
|
33
|
+
})(["", " ", ";"], tabStyles, _sx.default);
|
|
34
34
|
|
|
35
35
|
const SelectMenuTab = ({
|
|
36
36
|
tabName = '',
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SystemCommonProps } from '../constants';
|
|
3
2
|
import { SxProp } from '../sx';
|
|
4
3
|
import { ComponentProps } from '../utils/types';
|
|
5
|
-
declare const TabPanelBase: import("styled-components").StyledComponent<"div", any,
|
|
4
|
+
declare const TabPanelBase: import("styled-components").StyledComponent<"div", any, SxProp, never>;
|
|
6
5
|
export declare type SelectMenuTabPanelProps = {
|
|
7
6
|
tabName?: string;
|
|
8
7
|
} & ComponentProps<typeof TabPanelBase>;
|
|
@@ -28,7 +28,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
28
28
|
const TabPanelBase = _styledComponents.default.div.withConfig({
|
|
29
29
|
displayName: "SelectMenuTabPanel__TabPanelBase",
|
|
30
30
|
componentId: "ck0ipe-0"
|
|
31
|
-
})(["border-top:", " solid ", ";", "
|
|
31
|
+
})(["border-top:", " solid ", ";", ";"], (0, _constants.get)('borderWidths.1'), (0, _constants.get)('colors.border.muted'), _sx.default);
|
|
32
32
|
|
|
33
33
|
const TabPanel = ({
|
|
34
34
|
tabName,
|
|
@@ -30,7 +30,6 @@ const SelectMenuContext_1 = require("./SelectMenuContext");
|
|
|
30
30
|
const SelectMenuList_1 = __importDefault(require("./SelectMenuList"));
|
|
31
31
|
const TabPanelBase = styled_components_1.default.div `
|
|
32
32
|
border-top: ${constants_1.get('borderWidths.1')} solid ${constants_1.get('colors.border.muted')};
|
|
33
|
-
${constants_1.COMMON}
|
|
34
33
|
${sx_1.default};
|
|
35
34
|
`;
|
|
36
35
|
const TabPanel = ({ tabName, className, children, ...rest }) => {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SystemCommonProps } from '../constants';
|
|
3
2
|
import { SxProp } from '../sx';
|
|
4
3
|
import { ComponentProps } from '../utils/types';
|
|
5
|
-
declare const SelectMenuTabsBase: import("styled-components").StyledComponent<"div", any,
|
|
4
|
+
declare const SelectMenuTabsBase: import("styled-components").StyledComponent<"div", any, SxProp, never>;
|
|
6
5
|
export declare type SelectMenuTabsProps = ComponentProps<typeof SelectMenuTabsBase>;
|
|
7
6
|
declare const SelectMenuTabs: {
|
|
8
7
|
({ children, ...rest }: SelectMenuTabsProps): JSX.Element;
|
|
@@ -26,7 +26,7 @@ const tabWrapperStyles = (0, _styledComponents.css)(["display:flex;flex-shrink:0
|
|
|
26
26
|
const SelectMenuTabsBase = _styledComponents.default.div.withConfig({
|
|
27
27
|
displayName: "SelectMenuTabs__SelectMenuTabsBase",
|
|
28
28
|
componentId: "kgg21o-0"
|
|
29
|
-
})(["", " ", "
|
|
29
|
+
})(["", " ", ";"], tabWrapperStyles, _sx.default);
|
|
30
30
|
|
|
31
31
|
const SelectMenuTabs = ({
|
|
32
32
|
children,
|
package/lib/SideNav.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
/// <reference types="hoist-non-react-statics" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
import * as History from 'history';
|
|
4
|
-
import Box from './Box';
|
|
5
3
|
import { ComponentProps } from './utils/types';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { SxProp } from './sx';
|
|
6
6
|
declare type SideNavBaseProps = {
|
|
7
7
|
variant?: 'lightweight' | 'normal';
|
|
8
8
|
bordered?: boolean;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
className?: string;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
'aria-label'?: string;
|
|
12
|
+
};
|
|
13
|
+
declare function SideNavBase({ variant, className, bordered, children, 'aria-label': ariaLabel }: SideNavBaseProps): JSX.Element;
|
|
14
|
+
declare const SideNav: import("styled-components").StyledComponent<typeof SideNavBase, any, SxProp, never>;
|
|
12
15
|
declare type StyledSideNavLinkProps = {
|
|
13
16
|
to?: History.LocationDescriptor;
|
|
14
17
|
selected?: boolean;
|
|
@@ -18,14 +21,14 @@ declare const SideNavLink: import("styled-components").StyledComponent<"a", any,
|
|
|
18
21
|
hoverColor?: string | undefined;
|
|
19
22
|
muted?: boolean | undefined;
|
|
20
23
|
underline?: boolean | undefined;
|
|
21
|
-
} &
|
|
24
|
+
} & SxProp & StyledSideNavLinkProps, never>;
|
|
22
25
|
export declare type SideNavProps = ComponentProps<typeof SideNav>;
|
|
23
26
|
export declare type SideNavLinkProps = ComponentProps<typeof SideNavLink>;
|
|
24
|
-
declare const _default: string & import("styled-components").StyledComponentBase<typeof SideNavBase, any,
|
|
27
|
+
declare const _default: string & import("styled-components").StyledComponentBase<typeof SideNavBase, any, SxProp, never> & import("hoist-non-react-statics").NonReactStatics<typeof SideNavBase, {}> & {
|
|
25
28
|
Link: import("styled-components").StyledComponent<"a", any, {
|
|
26
29
|
hoverColor?: string | undefined;
|
|
27
30
|
muted?: boolean | undefined;
|
|
28
31
|
underline?: boolean | undefined;
|
|
29
|
-
} &
|
|
32
|
+
} & SxProp & StyledSideNavLinkProps, never>;
|
|
30
33
|
};
|
|
31
34
|
export default _default;
|
package/lib/SideNav.js
CHANGED
|
@@ -25,39 +25,32 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
// eslint-disable-next-line import/no-namespace
|
|
30
29
|
function SideNavBase({
|
|
31
30
|
variant,
|
|
32
31
|
className,
|
|
33
32
|
bordered,
|
|
34
33
|
children,
|
|
35
|
-
|
|
34
|
+
'aria-label': ariaLabel
|
|
36
35
|
}) {
|
|
37
36
|
const variantClassName = variant === 'lightweight' ? 'lightweight' : 'normal';
|
|
38
37
|
const newClassName = (0, _classnames.default)(className, `variant-${variantClassName}`);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
props = { ...props,
|
|
42
|
-
borderWidth: 0
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return /*#__PURE__*/_react.default.createElement(_Box.default, _extends({
|
|
47
|
-
borderWidth: "1px",
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
39
|
+
borderWidth: bordered ? '1px' : 0,
|
|
48
40
|
borderStyle: "solid",
|
|
49
41
|
borderColor: "border.default",
|
|
50
42
|
borderRadius: 2,
|
|
51
43
|
as: "nav",
|
|
52
|
-
className: newClassName
|
|
53
|
-
|
|
44
|
+
className: newClassName,
|
|
45
|
+
"aria-label": ariaLabel
|
|
46
|
+
}, children);
|
|
54
47
|
}
|
|
55
48
|
|
|
56
49
|
SideNavBase.displayName = "SideNavBase";
|
|
57
50
|
const SideNav = (0, _styledComponents.default)(SideNavBase).withConfig({
|
|
58
51
|
displayName: "SideNav",
|
|
59
52
|
componentId: "sc-15k667c-0"
|
|
60
|
-
})(["background-color:", ";", " ", ";"
|
|
53
|
+
})(["background-color:", ";", " ", ";"], (0, _constants.get)('colors.canvas.subtle'), props => props.bordered && (0, _styledComponents.css)(["& > &{border-left:0;border-right:0;border-bottom:0;}"]), _sx.default);
|
|
61
54
|
// used for variant normal hover, focus pseudo selectors
|
|
62
55
|
const CommonAccessibilityVariantNormalStyles = (0, _styledComponents.css)(["background-color:", ";outline:none;text-decoration:none;"], (0, _constants.get)('colors.neutral.subtle')); // used for light weight hover, focus pseudo selectors
|
|
63
56
|
|
package/lib/SideNav.jsx
CHANGED
|
@@ -29,13 +29,10 @@ const Link_1 = __importDefault(require("./Link"));
|
|
|
29
29
|
const react_1 = __importDefault(require("react"));
|
|
30
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
const sx_1 = __importDefault(require("./sx"));
|
|
32
|
-
function SideNavBase({ variant, className, bordered, children,
|
|
32
|
+
function SideNavBase({ variant, className, bordered, children, 'aria-label': ariaLabel }) {
|
|
33
33
|
const variantClassName = variant === 'lightweight' ? 'lightweight' : 'normal';
|
|
34
34
|
const newClassName = classnames_1.default(className, `variant-${variantClassName}`);
|
|
35
|
-
|
|
36
|
-
props = { ...props, borderWidth: 0 };
|
|
37
|
-
}
|
|
38
|
-
return (<Box_1.default borderWidth="1px" borderStyle="solid" borderColor="border.default" borderRadius={2} as="nav" className={newClassName} {...props}>
|
|
35
|
+
return (<Box_1.default borderWidth={bordered ? '1px' : 0} borderStyle="solid" borderColor="border.default" borderRadius={2} as="nav" className={newClassName} aria-label={ariaLabel}>
|
|
39
36
|
{children}
|
|
40
37
|
</Box_1.default>);
|
|
41
38
|
}
|
|
@@ -52,7 +49,6 @@ const SideNav = styled_components_1.default(SideNavBase) `
|
|
|
52
49
|
}
|
|
53
50
|
`}
|
|
54
51
|
|
|
55
|
-
${constants_1.COMMON};
|
|
56
52
|
${sx_1.default};
|
|
57
53
|
`;
|
|
58
54
|
// used for variant normal hover, focus pseudo selectors
|
package/lib/StateLabel.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SystemCommonProps } from './constants';
|
|
3
2
|
import { SxProp } from './sx';
|
|
4
3
|
import { ComponentProps } from './utils/types';
|
|
5
4
|
declare const StateLabelBase: import("styled-components").StyledComponent<"span", any, {
|
|
6
5
|
variant?: "small" | "normal" | undefined;
|
|
7
6
|
status?: "issueClosed" | "pullClosed" | "pullMerged" | "issueOpened" | "pullOpened" | "draft" | "issueDraft" | undefined;
|
|
8
|
-
} &
|
|
7
|
+
} & SxProp, never>;
|
|
9
8
|
export declare type StateLabelProps = ComponentProps<typeof StateLabelBase>;
|
|
10
9
|
declare function StateLabel({ children, status, variant: variantProp, ...rest }: StateLabelProps): JSX.Element;
|
|
11
10
|
declare namespace StateLabel {
|
package/lib/StateLabel.js
CHANGED
|
@@ -84,7 +84,7 @@ const sizeVariants = (0, _styledSystem.variant)({
|
|
|
84
84
|
const StateLabelBase = _styledComponents.default.span.withConfig({
|
|
85
85
|
displayName: "StateLabel__StateLabelBase",
|
|
86
86
|
componentId: "k4pd9e-0"
|
|
87
|
-
})(["display:inline-flex;align-items:center;font-weight:", ";line-height:16px;color:", ";text-align:center;border-radius:", ";", ";", ";", ";"
|
|
87
|
+
})(["display:inline-flex;align-items:center;font-weight:", ";line-height:16px;color:", ";text-align:center;border-radius:", ";", ";", ";", ";"], (0, _constants.get)('fontWeights.bold'), (0, _constants.get)('colors.canvas.default'), (0, _constants.get)('radii.3'), colorVariants, sizeVariants, _sx.default);
|
|
88
88
|
|
|
89
89
|
function StateLabel({
|
|
90
90
|
children,
|
|
@@ -98,10 +98,11 @@ function StateLabel({
|
|
|
98
98
|
return /*#__PURE__*/_react.default.createElement(StateLabelBase, _extends({}, rest, {
|
|
99
99
|
variant: variantProp,
|
|
100
100
|
status: status
|
|
101
|
-
}), status && /*#__PURE__*/_react.default.createElement(_StyledOcticon.default, _extends({
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
}), status && /*#__PURE__*/_react.default.createElement(_StyledOcticon.default, _extends({}, octiconProps, {
|
|
102
|
+
icon: octiconMap[status] || _octiconsReact.QuestionIcon,
|
|
103
|
+
sx: {
|
|
104
|
+
mr: 1
|
|
105
|
+
}
|
|
105
106
|
})), children);
|
|
106
107
|
}
|
|
107
108
|
|
package/lib/StateLabel.jsx
CHANGED
|
@@ -77,14 +77,13 @@ const StateLabelBase = styled_components_1.default.span `
|
|
|
77
77
|
border-radius: ${constants_1.get('radii.3')};
|
|
78
78
|
${colorVariants};
|
|
79
79
|
${sizeVariants};
|
|
80
|
-
${constants_1.COMMON};
|
|
81
80
|
${sx_1.default};
|
|
82
81
|
`;
|
|
83
82
|
function StateLabel({ children, status, variant: variantProp, ...rest }) {
|
|
84
83
|
const octiconProps = variantProp === 'small' ? { width: '1em' } : {};
|
|
85
84
|
return (<StateLabelBase {...rest} variant={variantProp} status={status}>
|
|
86
85
|
{/* eslint-disable-next-line @typescript-eslint/no-unnecessary-condition */}
|
|
87
|
-
{status && <StyledOcticon_1.default
|
|
86
|
+
{status && <StyledOcticon_1.default {...octiconProps} icon={octiconMap[status] || octicons_react_1.QuestionIcon} sx={{ mr: 1 }}/>}
|
|
88
87
|
{children}
|
|
89
88
|
</StateLabelBase>);
|
|
90
89
|
}
|
package/lib/StyledOcticon.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { IconProps } from '@primer/octicons-react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { SystemCommonProps } from './constants';
|
|
4
3
|
import { SxProp } from './sx';
|
|
5
4
|
import { ComponentProps } from './utils/types';
|
|
6
5
|
declare type OcticonProps = {
|
|
7
6
|
icon: React.ElementType;
|
|
8
7
|
} & IconProps;
|
|
9
8
|
declare function Octicon({ icon: IconComponent, ...rest }: OcticonProps): JSX.Element;
|
|
10
|
-
declare const StyledOcticon: import("styled-components").StyledComponent<typeof Octicon, any,
|
|
9
|
+
declare const StyledOcticon: import("styled-components").StyledComponent<typeof Octicon, any, SxProp, never>;
|
|
11
10
|
export declare type StyledOcticonProps = ComponentProps<typeof StyledOcticon>;
|
|
12
11
|
export default StyledOcticon;
|
package/lib/StyledOcticon.js
CHANGED
|
@@ -9,8 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
11
|
|
|
12
|
-
var _constants = require("./constants");
|
|
13
|
-
|
|
14
12
|
var _sx = _interopRequireDefault(require("./sx"));
|
|
15
13
|
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -26,7 +24,7 @@ Octicon.displayName = "Octicon";
|
|
|
26
24
|
const StyledOcticon = (0, _styledComponents.default)(Octicon).withConfig({
|
|
27
25
|
displayName: "StyledOcticon",
|
|
28
26
|
componentId: "uhnt7w-0"
|
|
29
|
-
})(["", "
|
|
27
|
+
})(["", ""], _sx.default);
|
|
30
28
|
StyledOcticon.defaultProps = {
|
|
31
29
|
size: 16
|
|
32
30
|
};
|
package/lib/StyledOcticon.jsx
CHANGED
|
@@ -5,13 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
-
const constants_1 = require("./constants");
|
|
9
8
|
const sx_1 = __importDefault(require("./sx"));
|
|
10
9
|
function Octicon({ icon: IconComponent, ...rest }) {
|
|
11
10
|
return <IconComponent {...rest}/>;
|
|
12
11
|
}
|
|
13
12
|
const StyledOcticon = styled_components_1.default(Octicon) `
|
|
14
|
-
${constants_1.COMMON}
|
|
15
13
|
${sx_1.default}
|
|
16
14
|
`;
|
|
17
15
|
StyledOcticon.defaultProps = {
|