@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,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;
|
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
-
import {
|
|
5
|
+
import { get } from '../constants';
|
|
6
6
|
import sx from '../sx';
|
|
7
7
|
// SelectMenu.Header is intentionally not exported, it's an internal component used in
|
|
8
8
|
// SelectMenu.Modal
|
|
@@ -13,7 +13,7 @@ const SelectMenuTitle = styled.h3.withConfig({
|
|
|
13
13
|
const StyledHeader = styled.header.withConfig({
|
|
14
14
|
displayName: "SelectMenuHeader__StyledHeader",
|
|
15
15
|
componentId: "sc-1pwppzc-1"
|
|
16
|
-
})(["display:flex;flex:none;padding:", ";border-bottom:", " solid ", "
|
|
16
|
+
})(["display:flex;flex:none;padding:", ";border-bottom:", " solid ", ";@media (min-width:", "){padding-top:", ";padding-bottom:", ";}", ";"], get('space.3'), get('borderWidths'), get('colors.border.muted'), get('breakpoints.0'), get('space.2'), get('space.2'), sx);
|
|
17
17
|
|
|
18
18
|
const SelectMenuHeader = ({
|
|
19
19
|
children,
|
|
@@ -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;
|
|
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
import { CheckIcon } from '@primer/octicons-react';
|
|
4
4
|
import React, { forwardRef, useContext, useRef } from 'react';
|
|
5
5
|
import styled, { css } from 'styled-components';
|
|
6
|
-
import {
|
|
6
|
+
import { get } from '../constants';
|
|
7
7
|
import StyledOcticon from '../StyledOcticon';
|
|
8
8
|
import sx from '../sx';
|
|
9
9
|
import { MenuContext } from './SelectMenuContext';
|
|
@@ -13,7 +13,7 @@ const StyledItem = styled.a.attrs(() => ({
|
|
|
13
13
|
})).withConfig({
|
|
14
14
|
displayName: "SelectMenuItem__StyledItem",
|
|
15
15
|
componentId: "gjymba-0"
|
|
16
|
-
})(["", " ", "
|
|
16
|
+
})(["", " ", ";"], listItemStyles, sx);
|
|
17
17
|
const SelectMenuItem = /*#__PURE__*/forwardRef(({
|
|
18
18
|
children,
|
|
19
19
|
selected,
|
|
@@ -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;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import {
|
|
2
|
+
import { get } from '../constants';
|
|
3
3
|
import sx from '../sx';
|
|
4
4
|
const listStyles = css(["position:relative;padding:0;margin:0;flex:auto;overflow-x:hidden;overflow-y:auto;background-color:", ";-webkit-overflow-scrolling:touch;@media (hover:hover){.SelectMenuTab:focus{background-color:", ";}.SelectMenuTab:not([aria-checked='true']):hover{color:", ";background-color:", ";}.SelectMenuTab:not([aria-checked='true']):active{color:", ";background-color:", ";}}"], get('colors.canvas.overlay'), get('colors.selectMenu.tapFocusBg'), get('colors.fg.default'), get('colors.canvas.subtle'), get('colors.fg.default'), get('colors.canvas.subtle'));
|
|
5
5
|
const SelectMenuList = styled.div.withConfig({
|
|
6
6
|
displayName: "SelectMenuList",
|
|
7
7
|
componentId: "sc-1opbpf6-0"
|
|
8
|
-
})(["", " ", "
|
|
8
|
+
})(["", " ", ";"], listStyles, sx);
|
|
9
9
|
SelectMenuList.displayName = 'SelectMenu.List';
|
|
10
10
|
export 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;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import {
|
|
3
|
+
import { get } from '../constants';
|
|
4
4
|
import Spinner from '../Spinner';
|
|
5
|
+
import sx from '../sx';
|
|
5
6
|
const Animation = styled.div.withConfig({
|
|
6
7
|
displayName: "SelectMenuLoadingAnimation__Animation",
|
|
7
8
|
componentId: "sc-17k54td-0"
|
|
8
|
-
})(["padding:", " ", ";text-align:center;background-color:", ";", ""], get('space.6'), get('space.4'), get('colors.canvas.overlay'),
|
|
9
|
+
})(["padding:", " ", ";text-align:center;background-color:", ";", ""], get('space.6'), get('space.4'), get('colors.canvas.overlay'), sx);
|
|
9
10
|
|
|
10
11
|
const SelectMenuLoadingAnimation = props => {
|
|
11
12
|
return /*#__PURE__*/React.createElement(Animation, props, /*#__PURE__*/React.createElement(Spinner, null));
|
|
@@ -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;
|
|
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import styled, { css, keyframes } from 'styled-components';
|
|
5
5
|
import { width } from 'styled-system';
|
|
6
|
-
import {
|
|
6
|
+
import { get } from '../constants';
|
|
7
7
|
import sx from '../sx';
|
|
8
8
|
const animateModal = keyframes(["0%{opacity:0;transform:scale(0.9);}"]);
|
|
9
9
|
const modalStyles = css(["position:relative;z-index:99;display:flex;", ";max-height:", ";margin:auto 0;", ";overflow:hidden;pointer-events:auto;flex-direction:column;background-color:", ";border-radius:", ";box-shadow:", ";animation:", " 0.12s cubic-bezier(0,0.1,0.1,1) backwards;@media (min-width:", "){height:auto;max-height:350px;margin:", " 0 ", " 0;font-size:", ";border:", " solid ", ";border-radius:", ";box-shadow:", ";}"], props => props.filter ? 'height: 80%' : '', props => props.filter ? 'none' : '66%', props => props.filter ? 'margin-top: 0' : '', get('colors.canvas.overlay'), get('radii.2'), get('shadows.shadow.small'), animateModal, get('breakpoints.0'), get('space.1'), get('space.3'), get('fontSizes.0'), get('borderWidths.1'), get('colors.border.default'), get('radii.2'), get('shadows.shadow.small'));
|
|
@@ -15,7 +15,7 @@ const Modal = styled.div.withConfig({
|
|
|
15
15
|
const ModalWrapper = styled.div.withConfig({
|
|
16
16
|
displayName: "SelectMenuModal__ModalWrapper",
|
|
17
17
|
componentId: "sc-1m5qo55-1"
|
|
18
|
-
})(["", " ", "
|
|
18
|
+
})(["", " ", ";"], modalWrapperStyles, sx);
|
|
19
19
|
const SelectMenuModal = /*#__PURE__*/React.forwardRef(({
|
|
20
20
|
children,
|
|
21
21
|
theme,
|
|
@@ -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;
|
|
@@ -3,14 +3,14 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import React, { useContext, useEffect } from 'react';
|
|
5
5
|
import styled, { css } from 'styled-components';
|
|
6
|
-
import {
|
|
6
|
+
import { get } from '../constants';
|
|
7
7
|
import sx from '../sx';
|
|
8
8
|
import { MenuContext } from './SelectMenuContext';
|
|
9
9
|
const tabStyles = css(["flex:1;padding:", " ", ";font-size:", ";font-weight:500;color:", ";text-align:center;background-color:transparent;border:0;box-shadow:inset 0 -1px 0 ", ";@media (min-width:", "){flex:none;padding:", " ", ";border:", " solid transparent;border-bottom-width:0;border-top-left-radius:", ";border-top-right-radius:", ";}&[aria-selected='true']{z-index:1;color:", ";background-color:", ";box-shadow:0 0 0 1px ", ";@media (min-width:", "){border-color:", ";box-shadow:none;}}&:focus{background-color:", ";}"], get('space.2'), get('space.3'), get('fontSizes.0'), get('colors.fg.muted'), get('colors.border.muted'), get('breakpoints.0'), get('space.1'), get('space.3'), get('borderWidths.1'), get('radii.2'), get('radii.2'), get('colors.text-primary'), get('colors.canvas.overlay'), get('colors.border.muted'), get('breakpoints.0'), get('colors.border.muted'), get('colors.neutral.subtle'));
|
|
10
10
|
const StyledTab = styled.button.withConfig({
|
|
11
11
|
displayName: "SelectMenuTab__StyledTab",
|
|
12
12
|
componentId: "ga32sz-0"
|
|
13
|
-
})(["", " ", "
|
|
13
|
+
})(["", " ", ";"], tabStyles, sx);
|
|
14
14
|
|
|
15
15
|
const SelectMenuTab = ({
|
|
16
16
|
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>;
|
|
@@ -2,14 +2,14 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
import React, { useContext } from 'react';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
-
import {
|
|
5
|
+
import { get } from '../constants';
|
|
6
6
|
import sx from '../sx';
|
|
7
7
|
import { MenuContext } from './SelectMenuContext';
|
|
8
8
|
import SelectMenuList from './SelectMenuList';
|
|
9
9
|
const TabPanelBase = styled.div.withConfig({
|
|
10
10
|
displayName: "SelectMenuTabPanel__TabPanelBase",
|
|
11
11
|
componentId: "ck0ipe-0"
|
|
12
|
-
})(["border-top:", " solid ", ";", "
|
|
12
|
+
})(["border-top:", " solid ", ";", ";"], get('borderWidths.1'), get('colors.border.muted'), sx);
|
|
13
13
|
|
|
14
14
|
const TabPanel = ({
|
|
15
15
|
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 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;
|
|
@@ -2,13 +2,13 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
|
-
import {
|
|
5
|
+
import { get } from '../constants';
|
|
6
6
|
import sx from '../sx';
|
|
7
7
|
const tabWrapperStyles = css(["display:flex;flex-shrink:0;margin-bottom:-1px;-webkit-overflow-scrolling:touch;overflow-x:auto;overflow-y:hidden;&::-webkit-scrollbar{display:none;}@media (min-width:", "){padding:0 ", ";margin-top:", ";}"], get('breakpoints.0'), get('space.2'), get('space.3'));
|
|
8
8
|
const SelectMenuTabsBase = styled.div.withConfig({
|
|
9
9
|
displayName: "SelectMenuTabs__SelectMenuTabsBase",
|
|
10
10
|
componentId: "kgg21o-0"
|
|
11
|
-
})(["", " ", "
|
|
11
|
+
})(["", " ", ";"], tabWrapperStyles, sx);
|
|
12
12
|
|
|
13
13
|
const SelectMenuTabs = ({
|
|
14
14
|
children,
|
package/lib-esm/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-esm/SideNav.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
// eslint-disable-next-line import/no-namespace
|
|
4
|
-
import {
|
|
2
|
+
import { get } from './constants';
|
|
5
3
|
import styled, { css } from 'styled-components';
|
|
6
4
|
import Box from './Box';
|
|
7
5
|
import Link from './Link';
|
|
@@ -14,32 +12,26 @@ function SideNavBase({
|
|
|
14
12
|
className,
|
|
15
13
|
bordered,
|
|
16
14
|
children,
|
|
17
|
-
|
|
15
|
+
'aria-label': ariaLabel
|
|
18
16
|
}) {
|
|
19
17
|
const variantClassName = variant === 'lightweight' ? 'lightweight' : 'normal';
|
|
20
18
|
const newClassName = classnames(className, `variant-${variantClassName}`);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
props = { ...props,
|
|
24
|
-
borderWidth: 0
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
29
|
-
borderWidth: "1px",
|
|
19
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
20
|
+
borderWidth: bordered ? '1px' : 0,
|
|
30
21
|
borderStyle: "solid",
|
|
31
22
|
borderColor: "border.default",
|
|
32
23
|
borderRadius: 2,
|
|
33
24
|
as: "nav",
|
|
34
|
-
className: newClassName
|
|
35
|
-
|
|
25
|
+
className: newClassName,
|
|
26
|
+
"aria-label": ariaLabel
|
|
27
|
+
}, children);
|
|
36
28
|
}
|
|
37
29
|
|
|
38
30
|
SideNavBase.displayName = "SideNavBase";
|
|
39
31
|
const SideNav = styled(SideNavBase).withConfig({
|
|
40
32
|
displayName: "SideNav",
|
|
41
33
|
componentId: "sc-15k667c-0"
|
|
42
|
-
})(["background-color:", ";", " ", ";"
|
|
34
|
+
})(["background-color:", ";", " ", ";"], get('colors.canvas.subtle'), props => props.bordered && css(["& > &{border-left:0;border-right:0;border-bottom:0;}"]), sx);
|
|
43
35
|
// used for variant normal hover, focus pseudo selectors
|
|
44
36
|
const CommonAccessibilityVariantNormalStyles = css(["background-color:", ";outline:none;text-decoration:none;"], get('colors.neutral.subtle')); // used for light weight hover, focus pseudo selectors
|
|
45
37
|
|
package/lib-esm/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-esm/StateLabel.js
CHANGED
|
@@ -4,7 +4,7 @@ import { GitMergeIcon, GitPullRequestIcon, IssueClosedIcon, IssueDraftIcon, Issu
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import { variant } from 'styled-system';
|
|
7
|
-
import {
|
|
7
|
+
import { get } from './constants';
|
|
8
8
|
import StyledOcticon from './StyledOcticon';
|
|
9
9
|
import sx from './sx';
|
|
10
10
|
const octiconMap = {
|
|
@@ -67,7 +67,7 @@ const sizeVariants = variant({
|
|
|
67
67
|
const StateLabelBase = styled.span.withConfig({
|
|
68
68
|
displayName: "StateLabel__StateLabelBase",
|
|
69
69
|
componentId: "k4pd9e-0"
|
|
70
|
-
})(["display:inline-flex;align-items:center;font-weight:", ";line-height:16px;color:", ";text-align:center;border-radius:", ";", ";", ";", ";"
|
|
70
|
+
})(["display:inline-flex;align-items:center;font-weight:", ";line-height:16px;color:", ";text-align:center;border-radius:", ";", ";", ";", ";"], get('fontWeights.bold'), get('colors.canvas.default'), get('radii.3'), colorVariants, sizeVariants, sx);
|
|
71
71
|
|
|
72
72
|
function StateLabel({
|
|
73
73
|
children,
|
|
@@ -81,10 +81,11 @@ function StateLabel({
|
|
|
81
81
|
return /*#__PURE__*/React.createElement(StateLabelBase, _extends({}, rest, {
|
|
82
82
|
variant: variantProp,
|
|
83
83
|
status: status
|
|
84
|
-
}), status && /*#__PURE__*/React.createElement(StyledOcticon, _extends({
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
}), status && /*#__PURE__*/React.createElement(StyledOcticon, _extends({}, octiconProps, {
|
|
85
|
+
icon: octiconMap[status] || QuestionIcon,
|
|
86
|
+
sx: {
|
|
87
|
+
mr: 1
|
|
88
|
+
}
|
|
88
89
|
})), children);
|
|
89
90
|
}
|
|
90
91
|
|
|
@@ -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-esm/StyledOcticon.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { COMMON } from './constants';
|
|
4
3
|
import sx from './sx';
|
|
5
4
|
|
|
6
5
|
function Octicon({
|
|
@@ -14,7 +13,7 @@ Octicon.displayName = "Octicon";
|
|
|
14
13
|
const StyledOcticon = styled(Octicon).withConfig({
|
|
15
14
|
displayName: "StyledOcticon",
|
|
16
15
|
componentId: "uhnt7w-0"
|
|
17
|
-
})(["", "
|
|
16
|
+
})(["", ""], sx);
|
|
18
17
|
StyledOcticon.defaultProps = {
|
|
19
18
|
size: 16
|
|
20
19
|
};
|
package/lib-esm/SubNav.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as History from 'history';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { SystemBorderProps, SystemCommonProps, SystemFlexProps } from './constants';
|
|
4
|
-
import { BoxProps } from './Box';
|
|
5
3
|
import { SxProp } from './sx';
|
|
6
4
|
import { ComponentProps } from './utils/types';
|
|
7
|
-
declare const SubNavBase: import("styled-components").StyledComponent<"nav", any,
|
|
5
|
+
declare const SubNavBase: import("styled-components").StyledComponent<"nav", any, SxProp, never>;
|
|
8
6
|
export declare type SubNavProps = {
|
|
9
7
|
actions?: React.ReactNode;
|
|
10
8
|
align?: 'right';
|
|
@@ -12,21 +10,17 @@ export declare type SubNavProps = {
|
|
|
12
10
|
label?: string;
|
|
13
11
|
} & ComponentProps<typeof SubNavBase>;
|
|
14
12
|
declare function SubNav({ actions, className, children, label, ...rest }: SubNavProps): JSX.Element;
|
|
15
|
-
export declare type SubNavLinksProps =
|
|
16
|
-
declare function SubNavLinks(props: SubNavLinksProps): JSX.Element;
|
|
17
|
-
declare namespace SubNavLinks {
|
|
18
|
-
var displayName: string;
|
|
19
|
-
}
|
|
13
|
+
export declare type SubNavLinksProps = SxProp;
|
|
20
14
|
declare const SubNavLink: import("styled-components").StyledComponent<"a", any, {
|
|
21
15
|
to?: History.LocationDescriptor<unknown> | undefined;
|
|
22
16
|
selected?: boolean | undefined;
|
|
23
|
-
} &
|
|
17
|
+
} & SxProp, never>;
|
|
24
18
|
export declare type SubNavLinkProps = ComponentProps<typeof SubNavLink>;
|
|
25
19
|
declare const _default: typeof SubNav & {
|
|
26
20
|
Link: import("styled-components").StyledComponent<"a", any, {
|
|
27
21
|
to?: History.LocationDescriptor<unknown> | undefined;
|
|
28
22
|
selected?: boolean | undefined;
|
|
29
|
-
} &
|
|
30
|
-
Links:
|
|
23
|
+
} & SxProp, never>;
|
|
24
|
+
Links: import("styled-components").StyledComponent<"div", any, SxProp, never>;
|
|
31
25
|
};
|
|
32
26
|
export default _default;
|
package/lib-esm/SubNav.js
CHANGED
|
@@ -4,15 +4,14 @@ import classnames from 'classnames'; // eslint-disable-next-line import/no-names
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
|
-
import {
|
|
8
|
-
import Box from './Box';
|
|
7
|
+
import { get } from './constants';
|
|
9
8
|
import sx from './sx';
|
|
10
9
|
const ITEM_CLASS = 'SubNav-item';
|
|
11
10
|
const SELECTED_CLASS = 'selected';
|
|
12
11
|
const SubNavBase = styled.nav.withConfig({
|
|
13
12
|
displayName: "SubNav__SubNavBase",
|
|
14
13
|
componentId: "f7w0xa-0"
|
|
15
|
-
})(["display:flex;justify-content:space-between;.SubNav-body{display:flex;margin-bottom:-1px;> *{margin-left:", ";}> *:first-child{margin-left:0;}}.SubNav-actions{align-self:center;}", ";"
|
|
14
|
+
})(["display:flex;justify-content:space-between;.SubNav-body{display:flex;margin-bottom:-1px;> *{margin-left:", ";}> *:first-child{margin-left:0;}}.SubNav-actions{align-self:center;}", ";"], get('space.2'), sx);
|
|
16
15
|
|
|
17
16
|
function SubNav({
|
|
18
17
|
actions,
|
|
@@ -33,21 +32,17 @@ function SubNav({
|
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
SubNav.displayName = "SubNav";
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}, props));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
SubNavLinks.displayName = "SubNavLinks";
|
|
35
|
+
const SubNavLinks = styled.div.withConfig({
|
|
36
|
+
displayName: "SubNav__SubNavLinks",
|
|
37
|
+
componentId: "f7w0xa-1"
|
|
38
|
+
})(["display:flex;", ";"], sx);
|
|
44
39
|
const SubNavLink = styled.a.attrs(props => ({
|
|
45
40
|
activeClassName: typeof props.to === 'string' ? 'selected' : '',
|
|
46
41
|
className: classnames(ITEM_CLASS, props.selected && SELECTED_CLASS, props.className)
|
|
47
42
|
})).withConfig({
|
|
48
43
|
displayName: "SubNav__SubNavLink",
|
|
49
|
-
componentId: "f7w0xa-
|
|
50
|
-
})(["padding-left:", ";padding-right:", ";font-weight:", ";font-size:", ";line-height:20px;min-height:34px;color:", ";text-align:center;text-decoration:none;border-top:1px solid ", ";border-bottom:1px solid ", ";border-right:1px solid ", ";display:flex;align-items:center;&:first-of-type{border-top-left-radius:", ";border-bottom-left-radius:", ";border-left:1px solid ", ";}&:last-of-type{border-top-right-radius:", ";border-bottom-right-radius:", ";}&:hover,&:focus{text-decoration:none;background-color:", ";transition:0.2s ease;.SubNav-octicon{color:", ";}}&.selected{color:", ";background-color:", ";border-color:", ";.SubNav-octicon{color:", ";}}", ";"
|
|
44
|
+
componentId: "f7w0xa-2"
|
|
45
|
+
})(["padding-left:", ";padding-right:", ";font-weight:", ";font-size:", ";line-height:20px;min-height:34px;color:", ";text-align:center;text-decoration:none;border-top:1px solid ", ";border-bottom:1px solid ", ";border-right:1px solid ", ";display:flex;align-items:center;&:first-of-type{border-top-left-radius:", ";border-bottom-left-radius:", ";border-left:1px solid ", ";}&:last-of-type{border-top-right-radius:", ";border-bottom-right-radius:", ";}&:hover,&:focus{text-decoration:none;background-color:", ";transition:0.2s ease;.SubNav-octicon{color:", ";}}&.selected{color:", ";background-color:", ";border-color:", ";.SubNav-octicon{color:", ";}}", ";"], get('space.3'), get('space.3'), get('fontWeights.semibold'), get('fontSizes.1'), get('colors.fg.default'), get('colors.border.default'), get('colors.border.default'), get('colors.border.default'), get('radii.2'), get('radii.2'), get('colors.border.default'), get('radii.2'), get('radii.2'), get('colors.canvas.subtle'), get('colors.fg.muted'), get('colors.fg.onEmphasis'), get('colors.accent.emphasis'), get('colors.accent.emphasis'), get('colors.fg.onEmphasis'), sx);
|
|
51
46
|
SubNavLink.displayName = 'SubNav.Link';
|
|
52
47
|
SubNavLinks.displayName = 'SubNav.Links';
|
|
53
48
|
export default Object.assign(SubNav, {
|
package/lib-esm/TabNav.d.ts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import * as History from 'history';
|
|
3
|
-
import { SystemCommonProps, SystemTypographyProps } from './constants';
|
|
4
3
|
import { SxProp } from './sx';
|
|
5
4
|
import { ComponentProps } from './utils/types';
|
|
6
|
-
declare const TabNavBase: import("styled-components").StyledComponent<"div", any,
|
|
5
|
+
declare const TabNavBase: import("styled-components").StyledComponent<"div", any, SxProp, never>;
|
|
7
6
|
export declare type TabNavProps = ComponentProps<typeof TabNavBase>;
|
|
8
7
|
declare function TabNav({ children, 'aria-label': ariaLabel, ...rest }: TabNavProps): JSX.Element;
|
|
9
8
|
declare const TabNavLink: import("styled-components").StyledComponent<"a", any, {
|
|
10
9
|
to?: History.LocationDescriptor<unknown> | undefined;
|
|
11
10
|
selected?: boolean | undefined;
|
|
12
|
-
} &
|
|
11
|
+
} & SxProp, never>;
|
|
13
12
|
export declare type TabNavLinkProps = ComponentProps<typeof TabNavLink>;
|
|
14
13
|
declare const _default: typeof TabNav & {
|
|
15
14
|
Link: import("styled-components").StyledComponent<"a", any, {
|
|
16
15
|
to?: History.LocationDescriptor<unknown> | undefined;
|
|
17
16
|
selected?: boolean | undefined;
|
|
18
|
-
} &
|
|
17
|
+
} & SxProp, never>;
|
|
19
18
|
};
|
|
20
19
|
export default _default;
|