@primer/components 0.0.0-2021111225614 → 0.0.0-202111136954
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/dist/browser.esm.js +2 -2209
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +2 -2209
- package/dist/browser.umd.js.map +1 -1
- package/lib/ActionList/Header.js +1 -1
- package/lib/ActionList/Item.js +10 -10
- package/lib/ActionList/List.js +1 -1
- package/lib/ActionList2/{MenuContext.d.ts → ActionListContainerContext.d.ts} +3 -3
- package/lib/ActionList2/{MenuContext.js → ActionListContainerContext.js} +3 -3
- package/lib/ActionList2/Item.js +5 -7
- package/lib/ActionList2/List.js +3 -3
- package/lib/ActionList2/Selection.js +4 -4
- package/lib/ActionMenu2.d.ts +19 -12
- package/lib/ActionMenu2.js +63 -29
- package/lib/Autocomplete/Autocomplete.d.ts +2 -1
- package/lib/Autocomplete/AutocompleteInput.d.ts +2 -1
- package/lib/BaseStyles.js +2 -20
- package/lib/BorderBox.js +1 -1
- package/lib/Box.js +1 -1
- package/lib/BranchName.js +1 -1
- package/lib/Breadcrumbs.js +3 -3
- package/lib/Button/Button.d.ts +2 -2
- package/lib/Button/Button.js +1 -1
- package/lib/Button/ButtonClose.d.ts +2 -2
- package/lib/Button/ButtonDanger.d.ts +2 -2
- package/lib/Button/ButtonGroup.js +1 -1
- package/lib/Button/ButtonInvisible.d.ts +2 -2
- package/lib/Button/ButtonOutline.d.ts +2 -2
- package/lib/Button/ButtonPrimary.d.ts +2 -2
- package/lib/Checkbox.d.ts +1 -1
- package/lib/Checkbox.js +1 -1
- package/lib/CircleOcticon.d.ts +35 -35
- package/lib/Details.js +1 -1
- package/lib/Dialog.d.ts +37 -37
- package/lib/Dropdown.d.ts +6 -6
- package/lib/DropdownMenu/DropdownButton.d.ts +6 -3
- package/lib/FilterList.d.ts +1 -1
- package/lib/FilteredActionList/FilteredActionList.js +1 -1
- package/lib/Flex.js +1 -1
- package/lib/LabelGroup.js +1 -1
- package/lib/NewButton/button-base.d.ts +6 -0
- package/lib/NewButton/button-base.js +69 -0
- package/lib/NewButton/button-link.d.ts +27 -0
- package/lib/NewButton/button-link.js +31 -0
- package/lib/NewButton/button.d.ts +2 -11
- package/lib/NewButton/button.js +6 -283
- package/lib/NewButton/icon-button.d.ts +4 -0
- package/lib/NewButton/icon-button.js +62 -0
- package/lib/NewButton/index.d.ts +6 -11
- package/lib/NewButton/index.js +18 -0
- package/lib/NewButton/styles.d.ts +202 -0
- package/lib/NewButton/styles.js +248 -0
- package/lib/NewButton/types.d.ts +28 -8
- package/lib/NewButton/types.js +19 -1
- package/lib/Overlay.js +1 -1
- package/lib/Pagination/Pagination.js +2 -2
- package/lib/Position.d.ts +4 -4
- package/lib/Position.js +1 -1
- package/lib/Radio.d.ts +38 -0
- package/lib/Radio.js +55 -0
- package/lib/SelectMenu/SelectMenu.d.ts +11 -10
- package/lib/SelectMenu/SelectMenu.js +1 -1
- package/lib/SelectMenu/SelectMenuFilter.js +1 -1
- package/lib/SelectMenu/SelectMenuFooter.js +1 -1
- package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib/SelectMenu/SelectMenuItem.js +1 -1
- package/lib/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib/SelectMenu/SelectMenuTab.js +1 -1
- package/lib/SelectMenu/SelectMenuTabPanel.js +1 -1
- package/lib/SelectMenu/SelectMenuTabs.js +1 -1
- package/lib/StateLabel.js +1 -1
- package/lib/StyledOcticon.js +1 -1
- package/lib/SubNav.js +3 -3
- package/lib/TextInputWithTokens.d.ts +2 -1
- package/lib/ThemeProvider.d.ts +1 -0
- package/lib/ThemeProvider.js +17 -4
- package/lib/Timeline.js +4 -4
- package/lib/Token/AvatarToken.d.ts +1 -1
- package/lib/Token/AvatarToken.js +1 -1
- package/lib/Token/IssueLabelToken.d.ts +1 -1
- package/lib/Token/Token.d.ts +1 -1
- package/lib/Token/TokenBase.js +1 -1
- package/lib/Tooltip.js +1 -1
- package/lib/UnderlineNav.js +2 -2
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +9 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +8 -0
- package/lib-esm/ActionList/Header.js +1 -1
- package/lib-esm/ActionList/Item.js +10 -10
- package/lib-esm/ActionList/List.js +1 -1
- package/lib-esm/ActionList2/{MenuContext.d.ts → ActionListContainerContext.d.ts} +3 -3
- package/lib-esm/ActionList2/{MenuContext.js → ActionListContainerContext.js} +1 -1
- package/lib-esm/ActionList2/Item.js +5 -7
- package/lib-esm/ActionList2/List.js +3 -3
- package/lib-esm/ActionList2/Selection.js +4 -4
- package/lib-esm/ActionMenu2.d.ts +19 -12
- package/lib-esm/ActionMenu2.js +60 -27
- package/lib-esm/Autocomplete/Autocomplete.d.ts +2 -1
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +2 -1
- package/lib-esm/BaseStyles.js +2 -20
- package/lib-esm/BorderBox.js +1 -1
- package/lib-esm/Box.js +1 -1
- package/lib-esm/BranchName.js +1 -1
- package/lib-esm/Breadcrumbs.js +3 -3
- package/lib-esm/Button/Button.d.ts +2 -2
- package/lib-esm/Button/Button.js +1 -1
- package/lib-esm/Button/ButtonClose.d.ts +2 -2
- package/lib-esm/Button/ButtonDanger.d.ts +2 -2
- package/lib-esm/Button/ButtonGroup.js +1 -1
- package/lib-esm/Button/ButtonInvisible.d.ts +2 -2
- package/lib-esm/Button/ButtonOutline.d.ts +2 -2
- package/lib-esm/Button/ButtonPrimary.d.ts +2 -2
- package/lib-esm/Checkbox.d.ts +1 -1
- package/lib-esm/Checkbox.js +1 -1
- package/lib-esm/CircleOcticon.d.ts +35 -35
- package/lib-esm/Details.js +1 -1
- package/lib-esm/Dialog.d.ts +37 -37
- package/lib-esm/Dropdown.d.ts +6 -6
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +6 -3
- package/lib-esm/FilterList.d.ts +1 -1
- package/lib-esm/FilteredActionList/FilteredActionList.js +1 -1
- package/lib-esm/Flex.js +1 -1
- package/lib-esm/LabelGroup.js +1 -1
- package/lib-esm/NewButton/button-base.d.ts +6 -0
- package/lib-esm/NewButton/button-base.js +47 -0
- package/lib-esm/NewButton/button-link.d.ts +27 -0
- package/lib-esm/NewButton/button-link.js +15 -0
- package/lib-esm/NewButton/button.d.ts +2 -11
- package/lib-esm/NewButton/button.js +4 -275
- package/lib-esm/NewButton/icon-button.d.ts +4 -0
- package/lib-esm/NewButton/icon-button.js +39 -0
- package/lib-esm/NewButton/index.d.ts +6 -11
- package/lib-esm/NewButton/index.js +4 -1
- package/lib-esm/NewButton/styles.d.ts +202 -0
- package/lib-esm/NewButton/styles.js +229 -0
- package/lib-esm/NewButton/types.d.ts +28 -8
- package/lib-esm/NewButton/types.js +6 -1
- package/lib-esm/Overlay.js +1 -1
- package/lib-esm/Pagination/Pagination.js +2 -2
- package/lib-esm/Position.d.ts +4 -4
- package/lib-esm/Position.js +1 -1
- package/lib-esm/Radio.d.ts +38 -0
- package/lib-esm/Radio.js +40 -0
- package/lib-esm/SelectMenu/SelectMenu.d.ts +11 -10
- package/lib-esm/SelectMenu/SelectMenu.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuFilter.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuFooter.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib-esm/SelectMenu/SelectMenuItem.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib-esm/SelectMenu/SelectMenuTab.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuTabPanel.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuTabs.js +1 -1
- package/lib-esm/StateLabel.js +1 -1
- package/lib-esm/StyledOcticon.js +1 -1
- package/lib-esm/SubNav.js +3 -3
- package/lib-esm/TextInputWithTokens.d.ts +2 -1
- package/lib-esm/ThemeProvider.d.ts +1 -0
- package/lib-esm/ThemeProvider.js +17 -4
- package/lib-esm/Timeline.js +4 -4
- package/lib-esm/Token/AvatarToken.d.ts +1 -1
- package/lib-esm/Token/AvatarToken.js +1 -1
- package/lib-esm/Token/IssueLabelToken.d.ts +1 -1
- package/lib-esm/Token/Token.d.ts +1 -1
- package/lib-esm/Token/TokenBase.js +1 -1
- package/lib-esm/Tooltip.js +1 -1
- package/lib-esm/UnderlineNav.js +2 -2
- package/lib-esm/hooks/index.d.ts +1 -0
- package/lib-esm/hooks/index.js +2 -1
- package/lib-esm/index.d.ts +2 -0
- package/lib-esm/index.js +1 -0
- package/package.json +14 -8
- package/CHANGELOG.md +0 -996
package/lib/ActionList/Header.js
CHANGED
@@ -24,7 +24,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
24
24
|
|
25
25
|
const StyledHeader = _styledComponents.default.div.withConfig({
|
26
26
|
displayName: "Header__StyledHeader",
|
27
|
-
componentId: "qmofje-0"
|
27
|
+
componentId: "sc-qmofje-0"
|
28
28
|
})(["{}padding:6px ", ";font-size:", ";font-weight:", ";color:", ";", " ", ""], (0, _constants.get)('space.3'), (0, _constants.get)('fontSizes.0'), (0, _constants.get)('fontWeights.bold'), (0, _constants.get)('colors.fg.muted'), ({
|
29
29
|
variant
|
30
30
|
}) => variant === 'filled' && (0, _styledComponents.css)(["background:", ";margin:", " 0;border-top:1px solid ", ";border-bottom:1px solid ", ";&:first-child{margin-top:0;}"], (0, _constants.get)('colors.canvas.subtle'), (0, _constants.get)('space.2'), (0, _constants.get)('colors.neutral.muted'), (0, _constants.get)('colors.neutral.muted')), _sx.default);
|
package/lib/ActionList/Item.js
CHANGED
@@ -71,17 +71,17 @@ const getItemVariant = (variant = 'default', disabled) => {
|
|
71
71
|
|
72
72
|
const DividedContent = _styledComponents.default.div.withConfig({
|
73
73
|
displayName: "Item__DividedContent",
|
74
|
-
componentId: "jqpvy8-0"
|
74
|
+
componentId: "sc-jqpvy8-0"
|
75
75
|
})(["display:flex;min-width:0;position:relative;flex-grow:1;"]);
|
76
76
|
|
77
77
|
const MainContent = _styledComponents.default.div.withConfig({
|
78
78
|
displayName: "Item__MainContent",
|
79
|
-
componentId: "jqpvy8-1"
|
79
|
+
componentId: "sc-jqpvy8-1"
|
80
80
|
})(["align-items:baseline;display:flex;min-width:0;flex-direction:var(--main-content-flex-direction);flex-grow:1;"]);
|
81
81
|
|
82
82
|
const StyledItem = _styledComponents.default.div.withConfig({
|
83
83
|
displayName: "Item__StyledItem",
|
84
|
-
componentId: "jqpvy8-2"
|
84
|
+
componentId: "sc-jqpvy8-2"
|
85
85
|
})(["padding:6px ", ";display:flex;border-radius:", ";color:", ";transition:background 33.333ms linear;text-decoration:none;@media (hover:hover) and (pointer:fine){:hover{background:var( --item-hover-bg-override,", " );color:", ";cursor:", ";}}:not(:first-of-type):not(", " + &):not(", " + &){margin-top:", ";", "::before{content:' ';display:block;position:absolute;width:100%;top:-7px;border:0 solid ", ";border-top-width:", ";}}&:hover ", "::before,:hover + * ", "::before{border-color:var(--item-hover-divider-border-color-override,transparent) !important;}&:focus ", "::before,:focus + * ", "::before,&[", "] ", "::before,[", "] + & ", "::before{border-color:transparent !important;}&[", "='", "']{background:", ";}&[", "='", "']{background:", ";}&:focus{background:", ";outline:none;}&:active{background:", ";}", ""], (0, _constants.get)('space.2'), (0, _constants.get)('radii.2'), ({
|
86
86
|
variant,
|
87
87
|
item
|
@@ -114,30 +114,30 @@ const StyledItem = _styledComponents.default.div.withConfig({
|
|
114
114
|
|
115
115
|
const TextContainer = _styledComponents.default.span.withConfig({
|
116
116
|
displayName: "Item__TextContainer",
|
117
|
-
componentId: "jqpvy8-3"
|
117
|
+
componentId: "sc-jqpvy8-3"
|
118
118
|
})([""]);
|
119
119
|
|
120
120
|
exports.TextContainer = TextContainer;
|
121
121
|
|
122
122
|
const BaseVisualContainer = _styledComponents.default.div.withConfig({
|
123
123
|
displayName: "Item__BaseVisualContainer",
|
124
|
-
componentId: "jqpvy8-4"
|
124
|
+
componentId: "sc-jqpvy8-4"
|
125
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",
|
129
|
-
componentId: "jqpvy8-5"
|
129
|
+
componentId: "sc-jqpvy8-5"
|
130
130
|
})(["svg{fill:", ";font-size:", ";}"], ({
|
131
131
|
variant,
|
132
132
|
disabled
|
133
133
|
}) => getItemVariant(variant, disabled).iconColor, (0, _constants.get)('fontSizes.0'));
|
134
134
|
const LeadingVisualContainer = (0, _styledComponents.default)(ColoredVisualContainer).withConfig({
|
135
135
|
displayName: "Item__LeadingVisualContainer",
|
136
|
-
componentId: "jqpvy8-6"
|
136
|
+
componentId: "sc-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
|
-
componentId: "jqpvy8-7"
|
140
|
+
componentId: "sc-jqpvy8-7"
|
141
141
|
})(["color:", "};margin-left:", ";margin-right:0;width:auto;div:nth-child(2){margin-left:", ";}"], ({
|
142
142
|
variant,
|
143
143
|
disabled
|
@@ -145,12 +145,12 @@ const TrailingContent = (0, _styledComponents.default)(ColoredVisualContainer).w
|
|
145
145
|
|
146
146
|
const DescriptionContainer = _styledComponents.default.span.withConfig({
|
147
147
|
displayName: "Item__DescriptionContainer",
|
148
|
-
componentId: "jqpvy8-8"
|
148
|
+
componentId: "sc-jqpvy8-8"
|
149
149
|
})(["color:", ";font-size:", ";line-height:16px;margin-left:var(--description-container-margin-left);min-width:0;flex-grow:1;flex-basis:var(--description-container-flex-basis);"], (0, _constants.get)('colors.fg.muted'), (0, _constants.get)('fontSizes.0'));
|
150
150
|
|
151
151
|
const MultiSelectIcon = _styledComponents.default.svg.withConfig({
|
152
152
|
displayName: "Item__MultiSelectIcon",
|
153
|
-
componentId: "jqpvy8-9"
|
153
|
+
componentId: "sc-jqpvy8-9"
|
154
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'), ({
|
package/lib/ActionList/List.js
CHANGED
@@ -37,7 +37,7 @@ function isGroupedListProps(props) {
|
|
37
37
|
|
38
38
|
const StyledList = _styledComponents.default.div.withConfig({
|
39
39
|
displayName: "List__StyledList",
|
40
|
-
componentId: "yr2k7d-0"
|
40
|
+
componentId: "sc-yr2k7d-0"
|
41
41
|
})(["font-size:", ";line-height:20px;&[", "],&:focus-within{--item-hover-bg-override:none;--item-hover-divider-border-color-override:", ";}"], (0, _constants.get)('fontSizes.1'), _focusZone.hasActiveDescendantAttribute, (0, _constants.get)('colors.border.muted'));
|
42
42
|
/**
|
43
43
|
* Returns `sx` prop values for `List` children matching the given `List` style variation.
|
@@ -1,10 +1,10 @@
|
|
1
1
|
/** This context can be used by components that compose ActionList inside a Menu */
|
2
2
|
import React from 'react';
|
3
3
|
declare type ContextProps = {
|
4
|
-
|
4
|
+
container?: string;
|
5
5
|
listRole?: string;
|
6
6
|
itemRole?: string;
|
7
|
-
afterSelect?:
|
7
|
+
afterSelect?: Function;
|
8
8
|
};
|
9
|
-
export declare const
|
9
|
+
export declare const ActionListContainerContext: React.Context<ContextProps>;
|
10
10
|
export {};
|
@@ -3,13 +3,13 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.ActionListContainerContext = void 0;
|
7
7
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
9
9
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
11
|
|
12
12
|
/** This context can be used by components that compose ActionList inside a Menu */
|
13
|
-
const
|
13
|
+
const ActionListContainerContext = /*#__PURE__*/_react.default.createContext({});
|
14
14
|
|
15
|
-
exports.
|
15
|
+
exports.ActionListContainerContext = ActionListContainerContext;
|
package/lib/ActionList2/Item.js
CHANGED
@@ -21,7 +21,7 @@ var _createSlots = _interopRequireDefault(require("../utils/create-slots"));
|
|
21
21
|
|
22
22
|
var _List = require("./List");
|
23
23
|
|
24
|
-
var
|
24
|
+
var _ActionListContainerContext = require("./ActionListContainerContext");
|
25
25
|
|
26
26
|
var _Selection = require("./Selection");
|
27
27
|
|
@@ -70,7 +70,7 @@ exports.Slot = Slot;
|
|
70
70
|
|
71
71
|
const LiBox = _styledComponents.default.li.withConfig({
|
72
72
|
displayName: "Item__LiBox",
|
73
|
-
componentId: "c3scat-0"
|
73
|
+
componentId: "sc-c3scat-0"
|
74
74
|
})(_sx.default);
|
75
75
|
|
76
76
|
const TEXT_ROW_HEIGHT = '20px'; // custom value off the scale
|
@@ -96,7 +96,7 @@ const Item = /*#__PURE__*/_react.default.forwardRef(({
|
|
96
96
|
const {
|
97
97
|
itemRole,
|
98
98
|
afterSelect
|
99
|
-
} = _react.default.useContext(
|
99
|
+
} = _react.default.useContext(_ActionListContainerContext.ActionListContainerContext);
|
100
100
|
|
101
101
|
const {
|
102
102
|
theme
|
@@ -171,22 +171,20 @@ const Item = /*#__PURE__*/_react.default.forwardRef(({
|
|
171
171
|
};
|
172
172
|
|
173
173
|
const clickHandler = _react.default.useCallback(event => {
|
174
|
-
if (typeof onSelect !== 'function') return;
|
175
174
|
if (disabled) return;
|
176
175
|
|
177
176
|
if (!event.defaultPrevented) {
|
178
|
-
onSelect(event); // if this Item is inside a Menu, close the Menu
|
177
|
+
if (typeof onSelect === 'function') onSelect(event); // if this Item is inside a Menu, close the Menu
|
179
178
|
|
180
179
|
if (typeof afterSelect === 'function') afterSelect();
|
181
180
|
}
|
182
181
|
}, [onSelect, disabled, afterSelect]);
|
183
182
|
|
184
183
|
const keyPressHandler = _react.default.useCallback(event => {
|
185
|
-
if (typeof onSelect !== 'function') return;
|
186
184
|
if (disabled) return;
|
187
185
|
|
188
186
|
if (!event.defaultPrevented && [' ', 'Enter'].includes(event.key)) {
|
189
|
-
onSelect(event); // if this Item is inside a Menu, close the Menu
|
187
|
+
if (typeof onSelect === 'function') onSelect(event); // if this Item is inside a Menu, close the Menu
|
190
188
|
|
191
189
|
if (typeof afterSelect === 'function') afterSelect();
|
192
190
|
}
|
package/lib/ActionList2/List.js
CHANGED
@@ -11,7 +11,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
11
|
|
12
12
|
var _sx = _interopRequireWildcard(require("../sx"));
|
13
13
|
|
14
|
-
var
|
14
|
+
var _ActionListContainerContext = require("./ActionListContainerContext");
|
15
15
|
|
16
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
17
|
|
@@ -27,7 +27,7 @@ exports.ListContext = ListContext;
|
|
27
27
|
|
28
28
|
const ListBox = _styledComponents.default.ul.withConfig({
|
29
29
|
displayName: "List__ListBox",
|
30
|
-
componentId: "cvbq60-0"
|
30
|
+
componentId: "sc-cvbq60-0"
|
31
31
|
})(_sx.default);
|
32
32
|
|
33
33
|
const List = /*#__PURE__*/_react.default.forwardRef(({
|
@@ -48,7 +48,7 @@ const List = /*#__PURE__*/_react.default.forwardRef(({
|
|
48
48
|
|
49
49
|
const {
|
50
50
|
listRole
|
51
|
-
} = _react.default.useContext(
|
51
|
+
} = _react.default.useContext(_ActionListContainerContext.ActionListContainerContext);
|
52
52
|
|
53
53
|
return /*#__PURE__*/_react.default.createElement(ListBox, _extends({
|
54
54
|
sx: (0, _sx.merge)(styles, sxProp),
|
@@ -13,7 +13,7 @@ var _List = require("./List");
|
|
13
13
|
|
14
14
|
var _Group = require("./Group");
|
15
15
|
|
16
|
-
var
|
16
|
+
var _ActionListContainerContext = require("./ActionListContainerContext");
|
17
17
|
|
18
18
|
var _Visuals = require("./Visuals");
|
19
19
|
|
@@ -31,8 +31,8 @@ const Selection = ({
|
|
31
31
|
} = _react.default.useContext(_Group.GroupContext);
|
32
32
|
|
33
33
|
const {
|
34
|
-
|
35
|
-
} = _react.default.useContext(
|
34
|
+
container
|
35
|
+
} = _react.default.useContext(_ActionListContainerContext.ActionListContainerContext);
|
36
36
|
/** selectionVariant in Group can override the selectionVariant in List root */
|
37
37
|
|
38
38
|
|
@@ -44,7 +44,7 @@ const Selection = ({
|
|
44
44
|
return null;
|
45
45
|
}
|
46
46
|
|
47
|
-
if (
|
47
|
+
if (container === 'ActionMenu') {
|
48
48
|
throw new Error('ActionList cannot have a selectionVariant inside ActionMenu, please use DropdownMenu or SelectPanel instead. More information: https://primer.style/design/components/action-list#application');
|
49
49
|
return null;
|
50
50
|
}
|
package/lib/ActionMenu2.d.ts
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
import { ButtonProps } from './Button';
|
2
2
|
import React from 'react';
|
3
|
+
import { AnchoredOverlayProps } from './AnchoredOverlay';
|
3
4
|
import { OverlayProps } from './Overlay';
|
4
|
-
|
5
|
-
declare
|
5
|
+
declare type MenuContextProps = Pick<AnchoredOverlayProps, 'anchorRef' | 'renderAnchor' | 'open' | 'onOpen' | 'onClose'>;
|
6
|
+
export declare const MenuContext: React.Context<MenuContextProps>;
|
7
|
+
export declare type ActionMenuProps = {
|
6
8
|
/**
|
7
|
-
* Recommended: `ActionMenu.Button` or `ActionMenu.Anchor` with
|
9
|
+
* Recommended: `ActionMenu.Button` or `ActionMenu.Anchor` with `ActionMenu.Overlay`
|
8
10
|
*/
|
9
11
|
children: React.ReactElement[] | React.ReactElement;
|
10
12
|
/**
|
@@ -15,20 +17,22 @@ declare type ActionMenuBaseProps = {
|
|
15
17
|
* If defined, will control the open/closed state of the overlay. Must be used in conjuction with `open`.
|
16
18
|
*/
|
17
19
|
onOpenChange?: (s: boolean) => void;
|
18
|
-
|
19
|
-
* Props to be spread on the internal `Overlay` component.
|
20
|
-
*/
|
21
|
-
overlayProps?: Partial<OverlayProps>;
|
22
|
-
};
|
23
|
-
export declare type ActionMenuProps = ActionMenuBaseProps & AnchoredOverlayWrapperAnchorProps;
|
20
|
+
} & Pick<AnchoredOverlayProps, 'anchorRef'>;
|
24
21
|
export declare type MenuAnchorProps = {
|
25
22
|
children: React.ReactElement;
|
26
23
|
};
|
27
24
|
/** this component is syntactical sugar 🍭 */
|
28
25
|
export declare type MenuButtonProps = ButtonProps;
|
26
|
+
declare type MenuOverlayProps = Partial<OverlayProps> & {
|
27
|
+
/**
|
28
|
+
* Recommended: `ActionList`
|
29
|
+
*/
|
30
|
+
children: React.ReactElement[] | React.ReactElement;
|
31
|
+
};
|
29
32
|
export declare const ActionMenu: React.FC<ActionMenuProps> & {
|
30
33
|
Button: React.ForwardRefExoticComponent<Pick<{
|
31
34
|
color?: string | undefined;
|
35
|
+
property?: string | undefined;
|
32
36
|
translate?: "yes" | "no" | undefined;
|
33
37
|
hidden?: boolean | undefined;
|
34
38
|
children?: React.ReactNode;
|
@@ -64,7 +68,6 @@ export declare const ActionMenu: React.FC<ActionMenuProps> & {
|
|
64
68
|
datatype?: string | undefined;
|
65
69
|
inlist?: any;
|
66
70
|
prefix?: string | undefined;
|
67
|
-
property?: string | undefined;
|
68
71
|
resource?: string | undefined;
|
69
72
|
typeof?: string | undefined;
|
70
73
|
vocab?: string | undefined;
|
@@ -293,8 +296,8 @@ export declare const ActionMenu: React.FC<ActionMenuProps> & {
|
|
293
296
|
onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
294
297
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
295
298
|
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
296
|
-
as?: string | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined;
|
297
299
|
disabled?: boolean | undefined;
|
300
|
+
as?: string | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined;
|
298
301
|
autoFocus?: boolean | undefined;
|
299
302
|
formAction?: string | undefined;
|
300
303
|
formEncType?: string | undefined;
|
@@ -303,8 +306,12 @@ export declare const ActionMenu: React.FC<ActionMenuProps> & {
|
|
303
306
|
formTarget?: string | undefined;
|
304
307
|
} & {
|
305
308
|
theme?: any;
|
306
|
-
}, "
|
309
|
+
}, "theme" | "sx" | "key" | keyof React.ButtonHTMLAttributes<HTMLButtonElement> | keyof {
|
310
|
+
as?: string | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined;
|
311
|
+
variant?: "small" | "medium" | "large" | undefined;
|
312
|
+
}> & React.RefAttributes<React.RefObject<HTMLElement> | undefined>>;
|
307
313
|
Anchor: React.ForwardRefExoticComponent<MenuAnchorProps & React.RefAttributes<React.RefObject<HTMLElement> | undefined>>;
|
314
|
+
Overlay: React.FC<MenuOverlayProps>;
|
308
315
|
Divider: React.FC<import("./sx").SxProp>;
|
309
316
|
};
|
310
317
|
export {};
|
package/lib/ActionMenu2.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.ActionMenu = void 0;
|
6
|
+
exports.ActionMenu = exports.MenuContext = void 0;
|
7
7
|
|
8
8
|
var _Button = _interopRequireDefault(require("./Button"));
|
9
9
|
|
@@ -11,59 +11,60 @@ var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
12
12
|
var _AnchoredOverlay = require("./AnchoredOverlay");
|
13
13
|
|
14
|
-
var _useProvidedStateOrCreate = require("./hooks/useProvidedStateOrCreate");
|
15
|
-
|
16
14
|
var _hooks = require("./hooks");
|
17
15
|
|
18
16
|
var _Divider = require("./ActionList2/Divider");
|
19
17
|
|
20
|
-
var
|
18
|
+
var _ActionListContainerContext = require("./ActionList2/ActionListContainerContext");
|
21
19
|
|
22
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
23
21
|
|
24
|
-
const
|
22
|
+
const MenuContext = /*#__PURE__*/_react.default.createContext({
|
23
|
+
renderAnchor: null,
|
24
|
+
open: false
|
25
|
+
});
|
26
|
+
|
27
|
+
exports.MenuContext = MenuContext;
|
28
|
+
|
29
|
+
const Menu = ({
|
25
30
|
anchorRef: externalAnchorRef,
|
26
31
|
open,
|
27
32
|
onOpenChange,
|
28
|
-
overlayProps,
|
29
33
|
children
|
30
34
|
}) => {
|
31
|
-
const [combinedOpenState, setCombinedOpenState] = (0,
|
32
|
-
const anchorRef = (0, _hooks.useProvidedRefOrCreate)(externalAnchorRef);
|
35
|
+
const [combinedOpenState, setCombinedOpenState] = (0, _hooks.useProvidedStateOrCreate)(open, onOpenChange, false);
|
33
36
|
|
34
37
|
const onOpen = _react.default.useCallback(() => setCombinedOpenState(true), [setCombinedOpenState]);
|
35
38
|
|
36
39
|
const onClose = _react.default.useCallback(() => setCombinedOpenState(false), [setCombinedOpenState]);
|
37
40
|
|
38
|
-
|
39
|
-
|
41
|
+
const anchorRef = (0, _hooks.useProvidedRefOrCreate)(externalAnchorRef);
|
42
|
+
let renderAnchor = null; // 🚨 Hack for good API!
|
43
|
+
// we strip out Anchor from children and pass it to AnchoredOverlay to render
|
44
|
+
// with additional props for accessibility
|
40
45
|
|
41
|
-
_react.default.Children.map(children, child => {
|
46
|
+
const contents = _react.default.Children.map(children, child => {
|
42
47
|
if (child.type === MenuButton || child.type === Anchor) {
|
43
48
|
renderAnchor = anchorProps => /*#__PURE__*/_react.default.cloneElement(child, anchorProps);
|
44
|
-
|
45
|
-
|
49
|
+
|
50
|
+
return null;
|
46
51
|
}
|
52
|
+
|
53
|
+
return child;
|
47
54
|
});
|
48
55
|
|
49
|
-
return /*#__PURE__*/_react.default.createElement(
|
50
|
-
renderAnchor: renderAnchor,
|
51
|
-
anchorRef: anchorRef,
|
52
|
-
open: combinedOpenState,
|
53
|
-
onOpen: onOpen,
|
54
|
-
onClose: onClose,
|
55
|
-
overlayProps: overlayProps
|
56
|
-
}, /*#__PURE__*/_react.default.createElement(_MenuContext.MenuContext.Provider, {
|
56
|
+
return /*#__PURE__*/_react.default.createElement(MenuContext.Provider, {
|
57
57
|
value: {
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
58
|
+
anchorRef,
|
59
|
+
renderAnchor,
|
60
|
+
open: combinedOpenState,
|
61
|
+
onOpen,
|
62
|
+
onClose
|
62
63
|
}
|
63
|
-
}, contents)
|
64
|
+
}, contents);
|
64
65
|
};
|
65
66
|
|
66
|
-
|
67
|
+
Menu.displayName = "Menu";
|
67
68
|
|
68
69
|
const Anchor = /*#__PURE__*/_react.default.forwardRef(({
|
69
70
|
children,
|
@@ -82,10 +83,43 @@ const MenuButton = /*#__PURE__*/_react.default.forwardRef((props, anchorRef) =>
|
|
82
83
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, props));
|
83
84
|
});
|
84
85
|
|
85
|
-
|
86
|
-
|
86
|
+
const Overlay = ({
|
87
|
+
children,
|
88
|
+
...overlayProps
|
89
|
+
}) => {
|
90
|
+
// we typecast anchorRef as required instead of optional
|
91
|
+
// because we know that we're setting it in context in Menu
|
92
|
+
const {
|
93
|
+
anchorRef,
|
94
|
+
renderAnchor,
|
95
|
+
open,
|
96
|
+
onOpen,
|
97
|
+
onClose
|
98
|
+
} = _react.default.useContext(MenuContext);
|
99
|
+
|
100
|
+
return /*#__PURE__*/_react.default.createElement(_AnchoredOverlay.AnchoredOverlay, {
|
101
|
+
anchorRef: anchorRef,
|
102
|
+
renderAnchor: renderAnchor,
|
103
|
+
open: open,
|
104
|
+
onOpen: onOpen,
|
105
|
+
onClose: onClose,
|
106
|
+
overlayProps: overlayProps
|
107
|
+
}, /*#__PURE__*/_react.default.createElement(_ActionListContainerContext.ActionListContainerContext.Provider, {
|
108
|
+
value: {
|
109
|
+
container: 'ActionMenu',
|
110
|
+
listRole: 'menu',
|
111
|
+
itemRole: 'menuitem',
|
112
|
+
afterSelect: onClose
|
113
|
+
}
|
114
|
+
}, children));
|
115
|
+
};
|
116
|
+
|
117
|
+
Overlay.displayName = "Overlay";
|
118
|
+
Menu.displayName = 'ActionMenu';
|
119
|
+
const ActionMenu = Object.assign(Menu, {
|
87
120
|
Button: MenuButton,
|
88
121
|
Anchor,
|
122
|
+
Overlay,
|
89
123
|
Divider: _Divider.Divider
|
90
124
|
});
|
91
125
|
exports.ActionMenu = ActionMenu;
|
@@ -15,6 +15,7 @@ declare const _default: React.FC<{
|
|
15
15
|
Input: import("@radix-ui/react-polymorphic").ForwardRefComponent<React.ForwardRefExoticComponent<Pick<Omit<Pick<{
|
16
16
|
[x: string]: any;
|
17
17
|
[x: number]: any;
|
18
|
+
[x: symbol]: any;
|
18
19
|
} & {
|
19
20
|
theme?: any;
|
20
21
|
} & {
|
@@ -27,6 +28,7 @@ declare const _default: React.FC<{
|
|
27
28
|
}> | undefined;
|
28
29
|
} & Pick<{
|
29
30
|
color?: string | undefined;
|
31
|
+
property?: string | undefined;
|
30
32
|
maxWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
31
33
|
minWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
32
34
|
translate?: "yes" | "no" | undefined;
|
@@ -62,7 +64,6 @@ declare const _default: React.FC<{
|
|
62
64
|
datatype?: string | undefined;
|
63
65
|
inlist?: any;
|
64
66
|
prefix?: string | undefined;
|
65
|
-
property?: string | undefined;
|
66
67
|
resource?: string | undefined;
|
67
68
|
typeof?: string | undefined;
|
68
69
|
vocab?: string | undefined;
|
@@ -7,6 +7,7 @@ declare type InternalAutocompleteInputProps = {
|
|
7
7
|
declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRefExoticComponent<Pick<Omit<Pick<{
|
8
8
|
[x: string]: any;
|
9
9
|
[x: number]: any;
|
10
|
+
[x: symbol]: any;
|
10
11
|
} & {
|
11
12
|
theme?: any;
|
12
13
|
} & {
|
@@ -19,6 +20,7 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
19
20
|
}> | undefined;
|
20
21
|
} & Pick<{
|
21
22
|
color?: string | undefined;
|
23
|
+
property?: string | undefined;
|
22
24
|
maxWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
23
25
|
minWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
24
26
|
translate?: "yes" | "no" | undefined;
|
@@ -54,7 +56,6 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
54
56
|
datatype?: string | undefined;
|
55
57
|
inlist?: any;
|
56
58
|
prefix?: string | undefined;
|
57
|
-
property?: string | undefined;
|
58
59
|
resource?: string | undefined;
|
59
60
|
typeof?: string | undefined;
|
60
61
|
vocab?: string | undefined;
|
package/lib/BaseStyles.js
CHANGED
@@ -19,29 +19,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
19
19
|
|
20
20
|
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); }
|
21
21
|
|
22
|
-
const GlobalStyle = (0, _styledComponents.createGlobalStyle)
|
23
|
-
* { box-sizing: border-box; }
|
24
|
-
body { margin: 0; }
|
25
|
-
table { border-collapse: collapse; }
|
26
|
-
|
27
|
-
[role="button"]:focus:not(:focus-visible):not(.focus-visible),
|
28
|
-
[role="tabpanel"][tabindex="0"]:focus:not(:focus-visible):not(.focus-visible),
|
29
|
-
button:focus:not(:focus-visible):not(.focus-visible),
|
30
|
-
summary:focus:not(:focus-visible):not(.focus-visible),
|
31
|
-
a:focus:not(:focus-visible):not(.focus-visible) {
|
32
|
-
outline: none;
|
33
|
-
box-shadow: none;
|
34
|
-
}
|
35
|
-
|
36
|
-
[tabindex="0"]:focus:not(:focus-visible):not(.focus-visible),
|
37
|
-
details-dialog:focus:not(:focus-visible):not(.focus-visible) {
|
38
|
-
outline: none;
|
39
|
-
}
|
40
|
-
`;
|
22
|
+
const GlobalStyle = (0, _styledComponents.createGlobalStyle)(["*{box-sizing:border-box;}body{margin:0;}table{border-collapse:collapse;}[role=\"button\"]:focus:not(:focus-visible):not(.focus-visible),[role=\"tabpanel\"][tabindex=\"0\"]:focus:not(:focus-visible):not(.focus-visible),button:focus:not(:focus-visible):not(.focus-visible),summary:focus:not(:focus-visible):not(.focus-visible),a:focus:not(:focus-visible):not(.focus-visible){outline:none;box-shadow:none;}[tabindex=\"0\"]:focus:not(:focus-visible):not(.focus-visible),details-dialog:focus:not(:focus-visible):not(.focus-visible){outline:none;}"]);
|
41
23
|
|
42
24
|
const Base = _styledComponents.default.div.withConfig({
|
43
25
|
displayName: "BaseStyles__Base",
|
44
|
-
componentId: "qvuaww-0"
|
26
|
+
componentId: "sc-qvuaww-0"
|
45
27
|
})(["", ";", ";"], _constants.TYPOGRAPHY, _constants.COMMON);
|
46
28
|
|
47
29
|
function BaseStyles(props) {
|
package/lib/BorderBox.js
CHANGED
@@ -16,7 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
16
16
|
*/
|
17
17
|
const BorderBox = (0, _styledComponents.default)(_Box.default).withConfig({
|
18
18
|
displayName: "BorderBox",
|
19
|
-
componentId: "oreju5-0"
|
19
|
+
componentId: "sc-oreju5-0"
|
20
20
|
})([""]);
|
21
21
|
BorderBox.defaultProps = {
|
22
22
|
borderWidth: '1px',
|
package/lib/Box.js
CHANGED
@@ -15,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
15
15
|
|
16
16
|
const Box = _styledComponents.default.div.withConfig({
|
17
17
|
displayName: "Box",
|
18
|
-
componentId: "nv15kw-0"
|
18
|
+
componentId: "sc-nv15kw-0"
|
19
19
|
})(_styledSystem.space, _styledSystem.color, _styledSystem.typography, _styledSystem.layout, _styledSystem.flexbox, _styledSystem.grid, _styledSystem.background, _styledSystem.border, _styledSystem.position, _styledSystem.shadow, _sx.default);
|
20
20
|
|
21
21
|
var _default = Box;
|
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:", ";", ";"], (0, _constants.get)('fontSizes.0'), (0, _constants.get)('fonts.mono'), (0, _constants.get)('colors.fg
|
19
|
+
})(["display:inline-block;padding:2px 6px;font-size:", ";font-family:", ";color:", ";background-color:", ";border-radius:", ";text-decoration:none;", ";"], (0, _constants.get)('fontSizes.0'), (0, _constants.get)('fonts.mono'), (0, _constants.get)('colors.accent.fg'), (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/Breadcrumbs.js
CHANGED
@@ -23,12 +23,12 @@ const SELECTED_CLASS = 'selected';
|
|
23
23
|
|
24
24
|
const Wrapper = _styledComponents.default.li.withConfig({
|
25
25
|
displayName: "Breadcrumbs__Wrapper",
|
26
|
-
componentId: "hwwoo0-0"
|
26
|
+
componentId: "sc-hwwoo0-0"
|
27
27
|
})(["display:inline-block;white-space:nowrap;list-style:none;&::after{padding-right:0.5em;padding-left:0.5em;color:", ";font-size:", ";content:'/';}&:first-child{margin-left:0;}&:last-child{&::after{content:none;}}"], (0, _constants.get)('colors.fg.muted'), (0, _constants.get)('fontSizes.1'));
|
28
28
|
|
29
29
|
const BreadcrumbsBase = _styledComponents.default.nav.withConfig({
|
30
30
|
displayName: "Breadcrumbs__BreadcrumbsBase",
|
31
|
-
componentId: "hwwoo0-1"
|
31
|
+
componentId: "sc-hwwoo0-1"
|
32
32
|
})(["display:flex;justify-content:space-between;", ";"], _sx.default);
|
33
33
|
|
34
34
|
function Breadcrumbs({
|
@@ -57,7 +57,7 @@ const BreadcrumbsItem = _styledComponents.default.a.attrs(props => ({
|
|
57
57
|
'aria-current': props.selected ? 'page' : null
|
58
58
|
})).withConfig({
|
59
59
|
displayName: "Breadcrumbs__BreadcrumbsItem",
|
60
|
-
componentId: "hwwoo0-2"
|
60
|
+
componentId: "sc-hwwoo0-2"
|
61
61
|
})(["color:", ";display:inline-block;font-size:", ";text-decoration:none;&:hover{text-decoration:underline;}&.selected{color:", ";pointer-events:none;}", ";"], (0, _constants.get)('colors.accent.fg'), (0, _constants.get)('fontSizes.1'), (0, _constants.get)('colors.fg.default'), _sx.default);
|
62
62
|
|
63
63
|
Breadcrumbs.displayName = 'Breadcrumbs';
|
package/lib/Button/Button.d.ts
CHANGED
@@ -6,6 +6,7 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
6
6
|
variant?: "small" | "medium" | "large" | undefined;
|
7
7
|
} & {
|
8
8
|
color?: string | undefined;
|
9
|
+
property?: string | undefined;
|
9
10
|
translate?: "yes" | "no" | undefined;
|
10
11
|
hidden?: boolean | undefined;
|
11
12
|
children?: import("react").ReactNode;
|
@@ -40,7 +41,6 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
40
41
|
datatype?: string | undefined;
|
41
42
|
inlist?: any;
|
42
43
|
prefix?: string | undefined;
|
43
|
-
property?: string | undefined;
|
44
44
|
resource?: string | undefined;
|
45
45
|
typeof?: string | undefined;
|
46
46
|
vocab?: string | undefined;
|
@@ -269,8 +269,8 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
269
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
270
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
271
271
|
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
272
|
-
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
273
272
|
disabled?: boolean | undefined;
|
273
|
+
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
274
274
|
autoFocus?: boolean | undefined;
|
275
275
|
formAction?: string | undefined;
|
276
276
|
formEncType?: string | undefined;
|
package/lib/Button/Button.js
CHANGED
@@ -17,7 +17,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
17
17
|
|
18
18
|
const Button = (0, _styledComponents.default)(_ButtonBase.default).withConfig({
|
19
19
|
displayName: "Button",
|
20
|
-
componentId: "xjtz72-0"
|
20
|
+
componentId: "sc-xjtz72-0"
|
21
21
|
})(["color:", ";background-color:", ";border:1px solid ", ";box-shadow:", ",", "};&:hover{background-color:", ";border-color:", ";}&:focus{border-color:", ";box-shadow:", ";}&:active{background-color:", ";box-shadow:", ";}&:disabled{color:", ";background-color:", ";border-color:", ";}", ";"], (0, _constants.get)('colors.btn.text'), (0, _constants.get)('colors.btn.bg'), (0, _constants.get)('colors.btn.border'), (0, _constants.get)('shadows.btn.shadow'), (0, _constants.get)('shadows.btn.insetShadow'), (0, _constants.get)('colors.btn.hoverBg'), (0, _constants.get)('colors.btn.hoverBorder'), (0, _constants.get)('colors.btn.focusBorder'), (0, _constants.get)('shadows.btn.focusShadow'), (0, _constants.get)('colors.btn.selectedBg'), (0, _constants.get)('shadows.btn.shadowActive'), (0, _constants.get)('colors.primer.fg.disabled'), (0, _constants.get)('colors.btn.bg'), (0, _constants.get)('colors.btn.border'), _sx.default);
|
22
22
|
var _default = Button;
|
23
23
|
exports.default = _default;
|