@primer/components 0.0.0-20211030175556 → 0.0.0-20211030182910
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 +34 -2
- package/dist/browser.esm.js +186 -183
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +190 -187
- package/dist/browser.umd.js.map +1 -1
- package/lib/ActionList/Item.js +3 -3
- package/lib/ActionList/index.js +23 -12
- package/lib/ActionList2/Item.js +3 -1
- package/lib/ActionList2/List.js +1 -2
- package/lib/ActionList2/Selection.js +3 -1
- package/lib/ActionList2/index.js +41 -23
- package/lib/AnchoredOverlay/index.js +12 -4
- package/lib/Autocomplete/Autocomplete.d.ts +1 -0
- package/lib/Autocomplete/AutocompleteInput.d.ts +1 -0
- package/lib/Autocomplete/index.js +14 -7
- package/lib/Avatar.d.ts +1 -2
- package/lib/Avatar.js +1 -1
- package/lib/BranchName.d.ts +1 -2
- package/lib/BranchName.js +1 -1
- package/lib/Button/Button.d.ts +1 -0
- package/lib/Button/ButtonClose.d.ts +2 -1
- package/lib/Button/ButtonDanger.d.ts +1 -0
- package/lib/Button/ButtonInvisible.d.ts +1 -0
- package/lib/Button/ButtonOutline.d.ts +1 -0
- package/lib/Button/ButtonPrimary.d.ts +1 -0
- package/lib/Button/index.js +70 -21
- package/lib/Checkbox.d.ts +29 -0
- package/lib/Checkbox.js +64 -0
- package/lib/CircleOcticon.d.ts +1 -0
- package/lib/Details.d.ts +1 -2
- package/lib/Details.js +1 -3
- package/lib/Dialog.d.ts +3 -2
- package/lib/Dropdown.d.ts +6 -66
- package/lib/DropdownMenu/DropdownButton.d.ts +2 -1
- package/lib/DropdownMenu/index.js +20 -6
- package/lib/DropdownStyles.js +26 -18
- package/lib/FilterList.d.ts +1 -0
- package/lib/FilteredActionList/index.js +12 -4
- package/lib/Heading.d.ts +1 -2
- package/lib/Heading.js +1 -6
- package/lib/NewButton/index.js +12 -5
- package/lib/NewButton/types.js +1 -2
- package/lib/Overlay.d.ts +5 -3
- package/lib/Pagination/index.js +12 -6
- package/lib/Portal/index.js +16 -5
- package/lib/Position.d.ts +4 -4
- package/lib/ProgressBar.d.ts +16 -11
- package/lib/ProgressBar.js +6 -10
- package/lib/SelectMenu/SelectMenu.d.ts +10 -4
- package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib/SelectMenu/hooks/useKeyboardNav.js +96 -80
- package/lib/SelectMenu/index.js +14 -7
- package/lib/SelectPanel/index.js +12 -4
- package/lib/Spinner.d.ts +1 -2
- package/lib/Spinner.js +1 -3
- package/lib/TextInputWithTokens.d.ts +1 -0
- package/lib/Token/AvatarToken.d.ts +1 -1
- package/lib/Token/IssueLabelToken.d.ts +1 -1
- package/lib/Token/Token.d.ts +1 -1
- package/lib/Token/index.js +30 -11
- package/lib/behaviors/anchoredPosition.js +234 -205
- package/lib/behaviors/focusTrap.js +157 -121
- package/lib/behaviors/focusZone.js +509 -434
- package/lib/behaviors/scrollIntoViewingArea.js +35 -18
- package/lib/constants.js +43 -39
- package/lib/drafts.js +30 -20
- package/lib/hooks/index.js +60 -16
- package/lib/hooks/useAnchoredPosition.js +40 -32
- package/lib/hooks/useCombinedRefs.js +36 -32
- package/lib/hooks/useDialog.js +96 -72
- package/lib/hooks/useFocusTrap.js +60 -43
- package/lib/hooks/useFocusZone.js +50 -54
- package/lib/hooks/useOnEscapePress.js +36 -25
- package/lib/hooks/useOpenAndCloseFocus.js +34 -22
- package/lib/hooks/useProvidedRefOrCreate.js +14 -10
- package/lib/hooks/useProvidedStateOrCreate.js +16 -13
- package/lib/hooks/useRenderForcingRef.js +17 -13
- package/lib/hooks/useResizeObserver.js +18 -15
- package/lib/hooks/useSafeTimeout.js +30 -22
- package/lib/hooks/useScrollFlash.js +23 -16
- package/lib/index.d.ts +2 -0
- package/lib/index.js +652 -163
- package/lib/polyfills/eventListenerSignal.js +45 -37
- package/lib/sx.js +22 -10
- package/lib/theme-preval.js +3169 -64
- package/lib/theme.js +12 -3
- package/lib/utils/iterateFocusableElements.js +85 -63
- package/lib/utils/testing.d.ts +2 -1
- package/lib/utils/testing.js +29 -0
- package/lib/utils/theme.js +47 -33
- package/lib/utils/types/AriaRole.js +1 -2
- package/lib/utils/types/ComponentProps.js +1 -2
- package/lib/utils/types/Flatten.js +1 -2
- package/lib/utils/types/KeyPaths.js +1 -2
- package/lib/utils/types/MandateProps.js +1 -16
- package/lib/utils/types/Merge.js +1 -2
- package/lib/utils/types/index.js +69 -16
- package/lib/utils/uniqueId.js +8 -5
- package/lib/utils/use-force-update.js +14 -8
- package/lib/utils/useIsomorphicLayoutEffect.js +11 -8
- package/lib/utils/userAgent.js +12 -8
- package/lib-esm/ActionList/Item.js +3 -3
- package/lib-esm/ActionList2/Item.js +3 -1
- package/lib-esm/ActionList2/List.js +1 -2
- package/lib-esm/ActionList2/Selection.js +3 -1
- package/lib-esm/Autocomplete/Autocomplete.d.ts +1 -0
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +1 -0
- package/lib-esm/Avatar.d.ts +1 -2
- package/lib-esm/Avatar.js +2 -2
- package/lib-esm/BranchName.d.ts +1 -2
- package/lib-esm/BranchName.js +2 -2
- package/lib-esm/Button/Button.d.ts +1 -0
- package/lib-esm/Button/ButtonClose.d.ts +2 -1
- package/lib-esm/Button/ButtonDanger.d.ts +1 -0
- package/lib-esm/Button/ButtonInvisible.d.ts +1 -0
- package/lib-esm/Button/ButtonOutline.d.ts +1 -0
- package/lib-esm/Button/ButtonPrimary.d.ts +1 -0
- package/lib-esm/Checkbox.d.ts +29 -0
- package/lib-esm/Checkbox.js +44 -0
- package/lib-esm/CircleOcticon.d.ts +1 -0
- package/lib-esm/Details.d.ts +1 -2
- package/lib-esm/Details.js +1 -2
- package/lib-esm/Dialog.d.ts +3 -2
- package/lib-esm/Dropdown.d.ts +6 -66
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +2 -1
- package/lib-esm/FilterList.d.ts +1 -0
- package/lib-esm/Heading.d.ts +1 -2
- package/lib-esm/Heading.js +2 -6
- package/lib-esm/Overlay.d.ts +5 -3
- package/lib-esm/Position.d.ts +4 -4
- package/lib-esm/ProgressBar.d.ts +16 -11
- package/lib-esm/ProgressBar.js +7 -11
- package/lib-esm/SelectMenu/SelectMenu.d.ts +10 -4
- package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib-esm/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib-esm/Spinner.d.ts +1 -2
- package/lib-esm/Spinner.js +1 -2
- package/lib-esm/TextInputWithTokens.d.ts +1 -0
- package/lib-esm/Token/AvatarToken.d.ts +1 -1
- package/lib-esm/Token/IssueLabelToken.d.ts +1 -1
- package/lib-esm/Token/Token.d.ts +1 -1
- package/lib-esm/index.d.ts +2 -0
- package/lib-esm/index.js +1 -0
- package/lib-esm/theme-preval.js +446 -0
- package/lib-esm/utils/testing.d.ts +2 -1
- package/lib-esm/utils/testing.js +24 -0
- package/package.json +4 -5
- package/lib/ActionList/Divider.jsx +0 -29
- package/lib/ActionList/Group.jsx +0 -23
- package/lib/ActionList/Header.jsx +0 -66
- package/lib/ActionList/Item.jsx +0 -288
- package/lib/ActionList/List.jsx +0 -138
- package/lib/ActionList2/Description.jsx +0 -29
- package/lib/ActionList2/Divider.jsx +0 -22
- package/lib/ActionList2/Group.jsx +0 -54
- package/lib/ActionList2/Header.d.ts +0 -26
- package/lib/ActionList2/Header.js +0 -55
- package/lib/ActionList2/Header.jsx +0 -36
- package/lib/ActionList2/Item.jsx +0 -174
- package/lib/ActionList2/LinkItem.jsx +0 -28
- package/lib/ActionList2/List.jsx +0 -41
- package/lib/ActionList2/Selection.jsx +0 -50
- package/lib/ActionList2/Visuals.jsx +0 -48
- package/lib/ActionMenu.jsx +0 -73
- package/lib/AnchoredOverlay/AnchoredOverlay.jsx +0 -100
- package/lib/Autocomplete/Autocomplete.jsx +0 -100
- package/lib/Autocomplete/AutocompleteContext.jsx +0 -5
- package/lib/Autocomplete/AutocompleteInput.jsx +0 -113
- package/lib/Autocomplete/AutocompleteMenu.jsx +0 -190
- package/lib/Autocomplete/AutocompleteOverlay.jsx +0 -55
- package/lib/Avatar.jsx +0 -34
- package/lib/AvatarPair.jsx +0 -29
- package/lib/AvatarStack.jsx +0 -151
- package/lib/BaseStyles.jsx +0 -65
- package/lib/BorderBox.jsx +0 -18
- package/lib/Box.jsx +0 -10
- package/lib/BranchName.jsx +0 -20
- package/lib/Breadcrumbs.jsx +0 -71
- package/lib/Button/Button.jsx +0 -40
- package/lib/Button/ButtonBase.jsx +0 -33
- package/lib/Button/ButtonClose.jsx +0 -53
- package/lib/Button/ButtonDanger.jsx +0 -43
- package/lib/Button/ButtonGroup.jsx +0 -55
- package/lib/Button/ButtonInvisible.jsx +0 -32
- package/lib/Button/ButtonOutline.jsx +0 -43
- package/lib/Button/ButtonPrimary.jsx +0 -42
- package/lib/Button/ButtonStyles.jsx +0 -37
- package/lib/Button/ButtonTableList.jsx +0 -46
- package/lib/Caret.jsx +0 -93
- package/lib/CircleBadge.jsx +0 -42
- package/lib/CircleOcticon.jsx +0 -21
- package/lib/CounterLabel.jsx +0 -43
- package/lib/Details.jsx +0 -21
- package/lib/Dialog/ConfirmationDialog.jsx +0 -146
- package/lib/Dialog/Dialog.jsx +0 -279
- package/lib/Dialog.jsx +0 -129
- package/lib/Dropdown.jsx +0 -131
- package/lib/DropdownMenu/DropdownButton.jsx +0 -14
- package/lib/DropdownMenu/DropdownMenu.jsx +0 -70
- package/lib/FilterList.jsx +0 -59
- package/lib/FilteredActionList/FilteredActionList.jsx +0 -100
- package/lib/FilteredSearch.jsx +0 -28
- package/lib/Flash.jsx +0 -69
- package/lib/Flex.jsx +0 -15
- package/lib/FormGroup.jsx +0 -22
- package/lib/Grid.jsx +0 -15
- package/lib/Header.jsx +0 -83
- package/lib/Heading.jsx +0 -21
- package/lib/Label.jsx +0 -82
- package/lib/LabelGroup.jsx +0 -18
- package/lib/Link.jsx +0 -36
- package/lib/NewButton/button-counter.jsx +0 -14
- package/lib/NewButton/button.jsx +0 -279
- package/lib/Overlay.jsx +0 -154
- package/lib/Pagehead.jsx +0 -17
- package/lib/Pagination/Pagination.jsx +0 -161
- package/lib/Pagination/model.jsx +0 -174
- package/lib/PointerBox.jsx +0 -25
- package/lib/Popover.jsx +0 -202
- package/lib/Portal/Portal.jsx +0 -79
- package/lib/Position.jsx +0 -46
- package/lib/ProgressBar.jsx +0 -39
- package/lib/SelectMenu/SelectMenu.jsx +0 -112
- package/lib/SelectMenu/SelectMenuContext.jsx +0 -5
- package/lib/SelectMenu/SelectMenuDivider.jsx +0 -42
- package/lib/SelectMenu/SelectMenuFilter.jsx +0 -58
- package/lib/SelectMenu/SelectMenuFooter.jsx +0 -45
- package/lib/SelectMenu/SelectMenuHeader.jsx +0 -42
- package/lib/SelectMenu/SelectMenuItem.jsx +0 -142
- package/lib/SelectMenu/SelectMenuList.jsx +0 -59
- package/lib/SelectMenu/SelectMenuLoadingAnimation.jsx +0 -22
- package/lib/SelectMenu/SelectMenuModal.jsx +0 -118
- package/lib/SelectMenu/SelectMenuTab.jsx +0 -92
- package/lib/SelectMenu/SelectMenuTabPanel.jsx +0 -42
- package/lib/SelectMenu/SelectMenuTabs.jsx +0 -57
- package/lib/SelectPanel/SelectPanel.jsx +0 -105
- package/lib/SideNav.jsx +0 -173
- package/lib/Spinner.jsx +0 -35
- package/lib/StateLabel.jsx +0 -93
- package/lib/StyledOcticon.jsx +0 -18
- package/lib/SubNav.jsx +0 -101
- package/lib/TabNav.jsx +0 -58
- package/lib/Text.jsx +0 -14
- package/lib/TextInput.jsx +0 -23
- package/lib/TextInputWithTokens.jsx +0 -218
- package/lib/ThemeProvider.jsx +0 -130
- package/lib/Timeline.jsx +0 -123
- package/lib/Token/AvatarToken.jsx +0 -54
- package/lib/Token/IssueLabelToken.jsx +0 -125
- package/lib/Token/Token.jsx +0 -103
- package/lib/Token/TokenBase.jsx +0 -88
- package/lib/Token/_RemoveTokenButton.jsx +0 -108
- package/lib/Token/_TokenTextContainer.jsx +0 -49
- package/lib/Tooltip.jsx +0 -246
- package/lib/Truncate.jsx +0 -24
- package/lib/UnderlineNav.jsx +0 -88
- package/lib/_TextInputWrapper.jsx +0 -120
- package/lib/_UnstyledTextInput.jsx +0 -22
- package/lib/hooks/useDetails.jsx +0 -39
- package/lib/hooks/useOnOutsideClick.jsx +0 -61
- package/lib/hooks/useOverlay.jsx +0 -15
- package/lib/utils/create-slots.jsx +0 -65
- package/lib/utils/deprecate.jsx +0 -59
- package/lib/utils/isNumeric.jsx +0 -7
- package/lib/utils/ssr.jsx +0 -6
- package/lib/utils/test-deprecations.jsx +0 -20
- package/lib/utils/test-helpers.jsx +0 -8
- package/lib/utils/test-matchers.jsx +0 -100
- package/lib/utils/testing.jsx +0 -206
- package/lib-esm/ActionList2/Header.d.ts +0 -26
- package/lib-esm/ActionList2/Header.js +0 -44
package/lib/ActionList/Item.js
CHANGED
@@ -122,7 +122,7 @@ exports.TextContainer = TextContainer;
|
|
122
122
|
const BaseVisualContainer = _styledComponents.default.div.withConfig({
|
123
123
|
displayName: "Item__BaseVisualContainer",
|
124
124
|
componentId: "jqpvy8-4"
|
125
|
-
})(["height:20px;width:", ";margin-right:", ";display:flex;justify-content:center;align-items:center;"], (0, _constants.get)('space.3'), (0, _constants.get)('space.2'));
|
125
|
+
})(["height:20px;width:", ";margin-right:", ";display:flex;justify-content:center;align-items:center;flex-shrink:0;"], (0, _constants.get)('space.3'), (0, _constants.get)('space.2'));
|
126
126
|
|
127
127
|
const ColoredVisualContainer = (0, _styledComponents.default)(BaseVisualContainer).withConfig({
|
128
128
|
displayName: "Item__ColoredVisualContainer",
|
@@ -134,7 +134,7 @@ const ColoredVisualContainer = (0, _styledComponents.default)(BaseVisualContaine
|
|
134
134
|
const LeadingVisualContainer = (0, _styledComponents.default)(ColoredVisualContainer).withConfig({
|
135
135
|
displayName: "Item__LeadingVisualContainer",
|
136
136
|
componentId: "jqpvy8-6"
|
137
|
-
})(["
|
137
|
+
})(["display:flex;flex-direction:column;justify-content:center;"]);
|
138
138
|
const TrailingContent = (0, _styledComponents.default)(ColoredVisualContainer).withConfig({
|
139
139
|
displayName: "Item__TrailingContent",
|
140
140
|
componentId: "jqpvy8-7"
|
@@ -151,7 +151,7 @@ const DescriptionContainer = _styledComponents.default.span.withConfig({
|
|
151
151
|
const MultiSelectIcon = _styledComponents.default.svg.withConfig({
|
152
152
|
displayName: "Item__MultiSelectIcon",
|
153
153
|
componentId: "jqpvy8-9"
|
154
|
-
})(["rect{fill:", ";stroke:", ";}path{fill:", ";boxshadow:", ";opacity:", ";}"], ({
|
154
|
+
})(["rect{fill:", ";stroke:", ";shape-rendering:auto;}path{fill:", ";boxshadow:", ";opacity:", ";}"], ({
|
155
155
|
selected
|
156
156
|
}) => selected ? (0, _constants.get)('colors.accent.fg') : (0, _constants.get)('colors.canvas.default'), ({
|
157
157
|
selected
|
package/lib/ActionList/index.js
CHANGED
@@ -1,18 +1,29 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
3
6
|
exports.ActionList = void 0;
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
7
|
+
|
8
|
+
var _List = require("./List");
|
9
|
+
|
10
|
+
var _Group = require("./Group");
|
11
|
+
|
12
|
+
var _Item = require("./Item");
|
13
|
+
|
14
|
+
var _Divider = require("./Divider");
|
15
|
+
|
8
16
|
/**
|
9
17
|
* Collection of list-related components.
|
10
18
|
*/
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
19
|
+
const ActionList = Object.assign(_List.List, {
|
20
|
+
/** Collects related `Items` in an `ActionList`. */
|
21
|
+
Group: _Group.Group,
|
22
|
+
|
23
|
+
/** An actionable or selectable `Item` with an optional icon and description. */
|
24
|
+
Item: _Item.Item,
|
25
|
+
|
26
|
+
/** Visually separates `Item`s or `Group`s in an `ActionList`. */
|
27
|
+
Divider: _Divider.Divider
|
18
28
|
});
|
29
|
+
exports.ActionList = ActionList;
|
package/lib/ActionList2/Item.js
CHANGED
@@ -79,7 +79,7 @@ const Item = /*#__PURE__*/_react.default.forwardRef(({
|
|
79
79
|
variant = 'default',
|
80
80
|
disabled = false,
|
81
81
|
selected = undefined,
|
82
|
-
onSelect
|
82
|
+
onSelect,
|
83
83
|
sx: sxProp = {},
|
84
84
|
id,
|
85
85
|
_PrivateItemWrapper,
|
@@ -163,11 +163,13 @@ const Item = /*#__PURE__*/_react.default.forwardRef(({
|
|
163
163
|
};
|
164
164
|
|
165
165
|
const clickHandler = _react.default.useCallback(event => {
|
166
|
+
if (typeof onSelect !== 'function') return;
|
166
167
|
if (disabled) return;
|
167
168
|
if (!event.defaultPrevented) onSelect(event);
|
168
169
|
}, [onSelect, disabled]);
|
169
170
|
|
170
171
|
const keyPressHandler = _react.default.useCallback(event => {
|
172
|
+
if (typeof onSelect !== 'function') return;
|
171
173
|
if (disabled) return;
|
172
174
|
|
173
175
|
if (!event.defaultPrevented && [' ', 'Enter'].includes(event.key)) {
|
package/lib/ActionList2/List.js
CHANGED
@@ -42,8 +42,7 @@ const List = /*#__PURE__*/_react.default.forwardRef(({
|
|
42
42
|
paddingY: variant === 'inset' ? 2 : 0
|
43
43
|
};
|
44
44
|
return /*#__PURE__*/_react.default.createElement(ListBox, _extends({
|
45
|
-
sx: (0, _sx.merge)(styles, sxProp)
|
46
|
-
"aria-multiselectable": selectionVariant === 'multiple' ? true : undefined
|
45
|
+
sx: (0, _sx.merge)(styles, sxProp)
|
47
46
|
}, props, {
|
48
47
|
ref: forwardedRef
|
49
48
|
}), /*#__PURE__*/_react.default.createElement(ListContext.Provider, {
|
@@ -53,7 +53,9 @@ const Selection = ({
|
|
53
53
|
sx: {
|
54
54
|
rect: {
|
55
55
|
fill: selected ? 'accent.fg' : 'canvas.default',
|
56
|
-
stroke: selected ? 'accent.fg' : 'border.default'
|
56
|
+
stroke: selected ? 'accent.fg' : 'border.default',
|
57
|
+
shapeRendering: 'auto' // this is a workaround to override global style in github/github, see primer/react#1666
|
58
|
+
|
57
59
|
},
|
58
60
|
path: {
|
59
61
|
fill: 'fg.onEmphasis',
|
package/lib/ActionList2/index.js
CHANGED
@@ -1,29 +1,47 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
3
6
|
exports.ActionList = void 0;
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
|
8
|
+
var _List = require("./List");
|
9
|
+
|
10
|
+
var _Group = require("./Group");
|
11
|
+
|
12
|
+
var _Item = require("./Item");
|
13
|
+
|
14
|
+
var _LinkItem = require("./LinkItem");
|
15
|
+
|
16
|
+
var _Divider = require("./Divider");
|
17
|
+
|
18
|
+
var _Description = require("./Description");
|
19
|
+
|
20
|
+
var _Visuals = require("./Visuals");
|
21
|
+
|
11
22
|
/**
|
12
23
|
* Collection of list-related components.
|
13
24
|
*/
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
const ActionList = Object.assign(_List.List, {
|
26
|
+
/** Collects related `Items` in an `ActionList`. */
|
27
|
+
Group: _Group.Group,
|
28
|
+
|
29
|
+
/** An actionable or selectable `Item` */
|
30
|
+
Item: _Item.Item,
|
31
|
+
|
32
|
+
/** A `Item` that renders a full-size anchor inside ListItem */
|
33
|
+
LinkItem: _LinkItem.LinkItem,
|
34
|
+
|
35
|
+
/** Visually separates `Item`s or `Group`s in an `ActionList`. */
|
36
|
+
Divider: _Divider.Divider,
|
37
|
+
|
38
|
+
/** Secondary text which provides additional information about an `Item`. */
|
39
|
+
Description: _Description.Description,
|
40
|
+
|
41
|
+
/** Icon (or similar) positioned before `Item` text. */
|
42
|
+
LeadingVisual: _Visuals.LeadingVisual,
|
43
|
+
|
44
|
+
/** Icon (or similar) positioned after `Item` text. */
|
45
|
+
TrailingVisual: _Visuals.TrailingVisual
|
29
46
|
});
|
47
|
+
exports.ActionList = ActionList;
|
@@ -1,5 +1,13 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
|
-
exports
|
4
|
-
|
5
|
-
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
Object.defineProperty(exports, "AnchoredOverlay", {
|
7
|
+
enumerable: true,
|
8
|
+
get: function () {
|
9
|
+
return _AnchoredOverlay.AnchoredOverlay;
|
10
|
+
}
|
11
|
+
});
|
12
|
+
|
13
|
+
var _AnchoredOverlay = require("./AnchoredOverlay");
|
@@ -290,6 +290,7 @@ declare const _default: React.FC<{
|
|
290
290
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLSpanElement> | undefined;
|
291
291
|
onTransitionEnd?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
292
292
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
293
|
+
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
293
294
|
disabled?: boolean | undefined;
|
294
295
|
hasIcon?: boolean | undefined;
|
295
296
|
contrast?: boolean | undefined;
|
@@ -282,6 +282,7 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
282
282
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLSpanElement> | undefined;
|
283
283
|
onTransitionEnd?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
284
284
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
285
|
+
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
285
286
|
disabled?: boolean | undefined;
|
286
287
|
hasIcon?: boolean | undefined;
|
287
288
|
contrast?: boolean | undefined;
|
@@ -1,8 +1,15 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
exports
|
7
|
-
|
8
|
-
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
Object.defineProperty(exports, "default", {
|
7
|
+
enumerable: true,
|
8
|
+
get: function () {
|
9
|
+
return _Autocomplete.default;
|
10
|
+
}
|
11
|
+
});
|
12
|
+
|
13
|
+
var _Autocomplete = _interopRequireDefault(require("./Autocomplete"));
|
14
|
+
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/lib/Avatar.d.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import { SystemCommonProps } from './constants';
|
2
1
|
import { SxProp } from './sx';
|
3
2
|
import { ComponentProps } from './utils/types';
|
4
3
|
declare const Avatar: import("styled-components").StyledComponent<"img", any, {
|
@@ -10,6 +9,6 @@ declare const Avatar: import("styled-components").StyledComponent<"img", any, {
|
|
10
9
|
src: string;
|
11
10
|
/** Provide alt text when the Avatar is used without the user's name next to it. */
|
12
11
|
alt?: string | undefined;
|
13
|
-
} &
|
12
|
+
} & SxProp, never>;
|
14
13
|
export declare type AvatarProps = ComponentProps<typeof Avatar>;
|
15
14
|
export default Avatar;
|
package/lib/Avatar.js
CHANGED
@@ -30,7 +30,7 @@ const Avatar = _styledComponents.default.img.attrs(props => ({
|
|
30
30
|
})).withConfig({
|
31
31
|
displayName: "Avatar",
|
32
32
|
componentId: "sc-1waaaky-0"
|
33
|
-
})(["display:inline-block;overflow:hidden;line-height:", ";vertical-align:middle;border-radius:", ";", "
|
33
|
+
})(["display:inline-block;overflow:hidden;line-height:", ";vertical-align:middle;border-radius:", ";", ""], (0, _constants.get)('lineHeights.condensedUltra'), props => getBorderRadius(props), _sx.default);
|
34
34
|
|
35
35
|
Avatar.defaultProps = {
|
36
36
|
size: 20,
|
package/lib/BranchName.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
import { SystemCommonProps } from './constants';
|
2
1
|
import { SxProp } from './sx';
|
3
2
|
import { ComponentProps } from './utils/types';
|
4
|
-
declare const BranchName: import("styled-components").StyledComponent<"a", any,
|
3
|
+
declare const BranchName: import("styled-components").StyledComponent<"a", any, SxProp, never>;
|
5
4
|
export declare type BranchNameProps = ComponentProps<typeof BranchName>;
|
6
5
|
export default BranchName;
|
package/lib/BranchName.js
CHANGED
@@ -16,7 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
16
16
|
const BranchName = _styledComponents.default.a.withConfig({
|
17
17
|
displayName: "BranchName",
|
18
18
|
componentId: "sc-167ouzm-0"
|
19
|
-
})(["display:inline-block;padding:2px 6px;font-size:", ";font-family:", ";color:", ";background-color:", ";border-radius:", ";", ";"
|
19
|
+
})(["display:inline-block;padding:2px 6px;font-size:", ";font-family:", ";color:", ";background-color:", ";border-radius:", ";", ";"], (0, _constants.get)('fontSizes.0'), (0, _constants.get)('fonts.mono'), (0, _constants.get)('colors.fg.muted'), (0, _constants.get)('colors.accent.subtle'), (0, _constants.get)('radii.2'), _sx.default);
|
20
20
|
|
21
21
|
var _default = BranchName;
|
22
22
|
exports.default = _default;
|
package/lib/Button/Button.d.ts
CHANGED
@@ -268,6 +268,7 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
268
268
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
269
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
270
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
271
|
+
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
271
272
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
272
273
|
disabled?: boolean | undefined;
|
273
274
|
autoFocus?: boolean | undefined;
|
@@ -264,6 +264,7 @@ declare const ButtonClose: React.ForwardRefExoticComponent<Pick<{
|
|
264
264
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement> | undefined;
|
265
265
|
onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
266
266
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
267
|
+
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
267
268
|
disabled?: boolean | undefined;
|
268
269
|
autoFocus?: boolean | undefined;
|
269
270
|
formAction?: string | undefined;
|
@@ -273,6 +274,6 @@ declare const ButtonClose: React.ForwardRefExoticComponent<Pick<{
|
|
273
274
|
formTarget?: string | undefined;
|
274
275
|
} & {
|
275
276
|
theme?: any;
|
276
|
-
}, "color" | "translate" | "hidden" | "children" | "theme" | "value" | "form" | "slot" | "style" | "title" | "role" | "sx" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & React.RefAttributes<HTMLButtonElement>>;
|
277
|
+
}, "color" | "translate" | "hidden" | "children" | "theme" | "value" | "form" | "slot" | "style" | "title" | "role" | "sx" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & React.RefAttributes<HTMLButtonElement>>;
|
277
278
|
export declare type ButtonCloseProps = ComponentProps<typeof ButtonClose>;
|
278
279
|
export default ButtonClose;
|
@@ -268,6 +268,7 @@ declare const ButtonDanger: import("styled-components").StyledComponent<"button"
|
|
268
268
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
269
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
270
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
271
|
+
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
271
272
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
272
273
|
disabled?: boolean | undefined;
|
273
274
|
autoFocus?: boolean | undefined;
|
@@ -268,6 +268,7 @@ declare const ButtonInvisible: import("styled-components").StyledComponent<"butt
|
|
268
268
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
269
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
270
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
271
|
+
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
271
272
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
272
273
|
disabled?: boolean | undefined;
|
273
274
|
autoFocus?: boolean | undefined;
|
@@ -268,6 +268,7 @@ declare const ButtonOutline: import("styled-components").StyledComponent<"button
|
|
268
268
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
269
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
270
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
271
|
+
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
271
272
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
272
273
|
disabled?: boolean | undefined;
|
273
274
|
autoFocus?: boolean | undefined;
|
@@ -268,6 +268,7 @@ export declare const ButtonPrimary: import("styled-components").StyledComponent<
|
|
268
268
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
269
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
270
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
271
|
+
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
271
272
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
272
273
|
disabled?: boolean | undefined;
|
273
274
|
autoFocus?: boolean | undefined;
|
package/lib/Button/index.js
CHANGED
@@ -1,22 +1,71 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
Object.defineProperty(exports, "
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
Object.defineProperty(exports, "
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
Object.defineProperty(exports, "default", {
|
7
|
+
enumerable: true,
|
8
|
+
get: function () {
|
9
|
+
return _Button.default;
|
10
|
+
}
|
11
|
+
});
|
12
|
+
Object.defineProperty(exports, "ButtonDanger", {
|
13
|
+
enumerable: true,
|
14
|
+
get: function () {
|
15
|
+
return _ButtonDanger.default;
|
16
|
+
}
|
17
|
+
});
|
18
|
+
Object.defineProperty(exports, "ButtonGroup", {
|
19
|
+
enumerable: true,
|
20
|
+
get: function () {
|
21
|
+
return _ButtonGroup.default;
|
22
|
+
}
|
23
|
+
});
|
24
|
+
Object.defineProperty(exports, "ButtonOutline", {
|
25
|
+
enumerable: true,
|
26
|
+
get: function () {
|
27
|
+
return _ButtonOutline.default;
|
28
|
+
}
|
29
|
+
});
|
30
|
+
Object.defineProperty(exports, "ButtonPrimary", {
|
31
|
+
enumerable: true,
|
32
|
+
get: function () {
|
33
|
+
return _ButtonPrimary.default;
|
34
|
+
}
|
35
|
+
});
|
36
|
+
Object.defineProperty(exports, "ButtonInvisible", {
|
37
|
+
enumerable: true,
|
38
|
+
get: function () {
|
39
|
+
return _ButtonInvisible.default;
|
40
|
+
}
|
41
|
+
});
|
42
|
+
Object.defineProperty(exports, "ButtonTableList", {
|
43
|
+
enumerable: true,
|
44
|
+
get: function () {
|
45
|
+
return _ButtonTableList.default;
|
46
|
+
}
|
47
|
+
});
|
48
|
+
Object.defineProperty(exports, "ButtonClose", {
|
49
|
+
enumerable: true,
|
50
|
+
get: function () {
|
51
|
+
return _ButtonClose.default;
|
52
|
+
}
|
53
|
+
});
|
54
|
+
|
55
|
+
var _Button = _interopRequireDefault(require("./Button"));
|
56
|
+
|
57
|
+
var _ButtonDanger = _interopRequireDefault(require("./ButtonDanger"));
|
58
|
+
|
59
|
+
var _ButtonGroup = _interopRequireDefault(require("./ButtonGroup"));
|
60
|
+
|
61
|
+
var _ButtonOutline = _interopRequireDefault(require("./ButtonOutline"));
|
62
|
+
|
63
|
+
var _ButtonPrimary = _interopRequireDefault(require("./ButtonPrimary"));
|
64
|
+
|
65
|
+
var _ButtonInvisible = _interopRequireDefault(require("./ButtonInvisible"));
|
66
|
+
|
67
|
+
var _ButtonTableList = _interopRequireDefault(require("./ButtonTableList"));
|
68
|
+
|
69
|
+
var _ButtonClose = _interopRequireDefault(require("./ButtonClose"));
|
70
|
+
|
71
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import React, { InputHTMLAttributes } from 'react';
|
2
|
+
import { SxProp } from './sx';
|
3
|
+
export declare type CheckboxProps = {
|
4
|
+
/**
|
5
|
+
* Apply indeterminate visual appearance to the checkbox
|
6
|
+
*/
|
7
|
+
indeterminate?: boolean;
|
8
|
+
/**
|
9
|
+
* Apply inactive visual appearance to the checkbox
|
10
|
+
*/
|
11
|
+
disabled?: boolean;
|
12
|
+
/**
|
13
|
+
* Forward a ref to the underlying input element
|
14
|
+
*/
|
15
|
+
ref?: React.RefObject<HTMLInputElement>;
|
16
|
+
/**
|
17
|
+
* Indicates whether the checkbox must be checked
|
18
|
+
*/
|
19
|
+
required?: boolean;
|
20
|
+
/**
|
21
|
+
* Indicates whether the checkbox validation state
|
22
|
+
*/
|
23
|
+
validationStatus?: 'error' | 'success';
|
24
|
+
} & InputHTMLAttributes<HTMLInputElement> & SxProp;
|
25
|
+
/**
|
26
|
+
* An accessible, native checkbox component
|
27
|
+
*/
|
28
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Pick<CheckboxProps, "sx" | keyof React.InputHTMLAttributes<HTMLInputElement> | "indeterminate" | "validationStatus"> & React.RefAttributes<HTMLInputElement>>;
|
29
|
+
export default Checkbox;
|
package/lib/Checkbox.js
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = void 0;
|
7
|
+
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
9
|
+
|
10
|
+
var _hooks = require("./hooks");
|
11
|
+
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
13
|
+
|
14
|
+
var _sx = _interopRequireDefault(require("./sx"));
|
15
|
+
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
17
|
+
|
18
|
+
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; }
|
19
|
+
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21
|
+
|
22
|
+
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); }
|
23
|
+
|
24
|
+
const StyledCheckbox = _styledComponents.default.input.withConfig({
|
25
|
+
displayName: "Checkbox__StyledCheckbox",
|
26
|
+
componentId: "i51804-0"
|
27
|
+
})(["cursor:pointer;", " ", ""], props => props.disabled && `cursor: not-allowed;`, _sx.default);
|
28
|
+
/**
|
29
|
+
* An accessible, native checkbox component
|
30
|
+
*/
|
31
|
+
|
32
|
+
|
33
|
+
const Checkbox = /*#__PURE__*/_react.default.forwardRef(({
|
34
|
+
checked,
|
35
|
+
indeterminate,
|
36
|
+
disabled,
|
37
|
+
sx: sxProp,
|
38
|
+
required,
|
39
|
+
validationStatus,
|
40
|
+
...rest
|
41
|
+
}, ref) => {
|
42
|
+
const checkboxRef = (0, _hooks.useProvidedRefOrCreate)(ref);
|
43
|
+
(0, _react.useLayoutEffect)(() => {
|
44
|
+
if (checkboxRef.current) {
|
45
|
+
checkboxRef.current.indeterminate = indeterminate || false;
|
46
|
+
}
|
47
|
+
}, [indeterminate, checked, checkboxRef]);
|
48
|
+
return /*#__PURE__*/_react.default.createElement(StyledCheckbox, _extends({
|
49
|
+
type: "checkbox",
|
50
|
+
disabled: disabled,
|
51
|
+
"aria-disabled": disabled ? 'true' : 'false',
|
52
|
+
ref: ref || checkboxRef,
|
53
|
+
checked: indeterminate ? false : checked,
|
54
|
+
"aria-checked": indeterminate ? 'mixed' : checked ? 'true' : 'false',
|
55
|
+
sx: sxProp,
|
56
|
+
required: required,
|
57
|
+
"aria-required": required ? 'true' : 'false',
|
58
|
+
"aria-invalid": validationStatus === 'error' ? 'true' : 'false'
|
59
|
+
}, rest));
|
60
|
+
});
|
61
|
+
|
62
|
+
Checkbox.displayName = 'Checkbox';
|
63
|
+
var _default = Checkbox;
|
64
|
+
exports.default = _default;
|
package/lib/CircleOcticon.d.ts
CHANGED
@@ -383,6 +383,7 @@ declare namespace CircleOcticon {
|
|
383
383
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLDivElement> | undefined;
|
384
384
|
onTransitionEnd?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
385
385
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
386
|
+
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
386
387
|
borderX?: import("styled-system").ResponsiveValue<import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
387
388
|
borderY?: import("styled-system").ResponsiveValue<import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
388
389
|
theme?: any;
|
package/lib/Details.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
import { SystemCommonProps } from './constants';
|
2
1
|
import { SxProp } from './sx';
|
3
2
|
import { ComponentProps } from './utils/types';
|
4
|
-
declare const Details: import("styled-components").StyledComponent<"details", any,
|
3
|
+
declare const Details: import("styled-components").StyledComponent<"details", any, SxProp, never>;
|
5
4
|
export declare type DetailsProps = ComponentProps<typeof Details>;
|
6
5
|
export default Details;
|
package/lib/Details.js
CHANGED
@@ -7,8 +7,6 @@ exports.default = void 0;
|
|
7
7
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
9
9
|
|
10
|
-
var _constants = require("./constants");
|
11
|
-
|
12
10
|
var _sx = _interopRequireDefault(require("./sx"));
|
13
11
|
|
14
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
@@ -16,7 +14,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
16
14
|
const Details = _styledComponents.default.details.withConfig({
|
17
15
|
displayName: "Details",
|
18
16
|
componentId: "ssy9qz-0"
|
19
|
-
})(["& > summary{list-style:none;}& > summary::-webkit-details-marker{display:none;}", "
|
17
|
+
})(["& > summary{list-style:none;}& > summary::-webkit-details-marker{display:none;}", ";"], _sx.default);
|
20
18
|
|
21
19
|
Details.displayName = 'Details';
|
22
20
|
var _default = Details;
|