@primer/components 0.0.0-202111136954 → 0.0.0-20211115171641
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 +996 -0
- package/dist/browser.esm.js +2209 -2
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +2209 -2
- 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/Item.js +7 -5
- package/lib/ActionList2/List.js +3 -3
- package/lib/ActionList2/{ActionListContainerContext.d.ts → MenuContext.d.ts} +3 -3
- package/lib/ActionList2/{ActionListContainerContext.js → MenuContext.js} +3 -3
- package/lib/ActionList2/Selection.js +4 -4
- package/lib/ActionMenu2.d.ts +12 -19
- package/lib/ActionMenu2.js +29 -63
- package/lib/Autocomplete/Autocomplete.d.ts +1 -2
- package/lib/Autocomplete/AutocompleteInput.d.ts +1 -2
- package/lib/BaseStyles.js +20 -2
- 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 +3 -6
- 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.d.ts +11 -2
- package/lib/NewButton/button.js +283 -6
- package/lib/NewButton/index.d.ts +11 -6
- package/lib/NewButton/index.js +0 -18
- package/lib/NewButton/types.d.ts +8 -28
- package/lib/NewButton/types.js +1 -19
- 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/SelectMenu/SelectMenu.d.ts +10 -11
- 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 +1 -2
- package/lib/ThemeProvider.d.ts +0 -1
- package/lib/ThemeProvider.js +4 -17
- 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 +0 -1
- package/lib/hooks/index.js +1 -9
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -8
- 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/Item.js +7 -5
- package/lib-esm/ActionList2/List.js +3 -3
- package/lib-esm/ActionList2/{ActionListContainerContext.d.ts → MenuContext.d.ts} +3 -3
- package/lib-esm/ActionList2/{ActionListContainerContext.js → MenuContext.js} +1 -1
- package/lib-esm/ActionList2/Selection.js +4 -4
- package/lib-esm/ActionMenu2.d.ts +12 -19
- package/lib-esm/ActionMenu2.js +27 -60
- package/lib-esm/Autocomplete/Autocomplete.d.ts +1 -2
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +1 -2
- package/lib-esm/BaseStyles.js +20 -2
- 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 +3 -6
- 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.d.ts +11 -2
- package/lib-esm/NewButton/button.js +275 -4
- package/lib-esm/NewButton/index.d.ts +11 -6
- package/lib-esm/NewButton/index.js +1 -4
- package/lib-esm/NewButton/types.d.ts +8 -28
- package/lib-esm/NewButton/types.js +1 -6
- 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/SelectMenu/SelectMenu.d.ts +10 -11
- 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 +1 -2
- package/lib-esm/ThemeProvider.d.ts +0 -1
- package/lib-esm/ThemeProvider.js +4 -17
- 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 +0 -1
- package/lib-esm/hooks/index.js +1 -2
- package/lib-esm/index.d.ts +0 -2
- package/lib-esm/index.js +0 -1
- package/package.json +8 -14
- package/lib/NewButton/button-base.d.ts +0 -6
- package/lib/NewButton/button-base.js +0 -69
- package/lib/NewButton/button-link.d.ts +0 -27
- package/lib/NewButton/button-link.js +0 -31
- package/lib/NewButton/icon-button.d.ts +0 -4
- package/lib/NewButton/icon-button.js +0 -62
- package/lib/NewButton/styles.d.ts +0 -202
- package/lib/NewButton/styles.js +0 -248
- package/lib/Radio.d.ts +0 -38
- package/lib/Radio.js +0 -55
- package/lib-esm/NewButton/button-base.d.ts +0 -6
- package/lib-esm/NewButton/button-base.js +0 -47
- package/lib-esm/NewButton/button-link.d.ts +0 -27
- package/lib-esm/NewButton/button-link.js +0 -15
- package/lib-esm/NewButton/icon-button.d.ts +0 -4
- package/lib-esm/NewButton/icon-button.js +0 -39
- package/lib-esm/NewButton/styles.d.ts +0 -202
- package/lib-esm/NewButton/styles.js +0 -229
- package/lib-esm/Radio.d.ts +0 -38
- package/lib-esm/Radio.js +0 -40
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: "
|
27
|
+
componentId: "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: "
|
74
|
+
componentId: "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: "
|
79
|
+
componentId: "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: "
|
84
|
+
componentId: "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: "
|
117
|
+
componentId: "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: "
|
124
|
+
componentId: "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: "
|
129
|
+
componentId: "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: "
|
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
|
-
componentId: "
|
140
|
+
componentId: "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: "
|
148
|
+
componentId: "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: "
|
153
|
+
componentId: "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: "
|
40
|
+
componentId: "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.
|
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 _MenuContext = require("./MenuContext");
|
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: "
|
73
|
+
componentId: "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(_MenuContext.MenuContext);
|
100
100
|
|
101
101
|
const {
|
102
102
|
theme
|
@@ -171,20 +171,22 @@ const Item = /*#__PURE__*/_react.default.forwardRef(({
|
|
171
171
|
};
|
172
172
|
|
173
173
|
const clickHandler = _react.default.useCallback(event => {
|
174
|
+
if (typeof onSelect !== 'function') return;
|
174
175
|
if (disabled) return;
|
175
176
|
|
176
177
|
if (!event.defaultPrevented) {
|
177
|
-
|
178
|
+
onSelect(event); // if this Item is inside a Menu, close the Menu
|
178
179
|
|
179
180
|
if (typeof afterSelect === 'function') afterSelect();
|
180
181
|
}
|
181
182
|
}, [onSelect, disabled, afterSelect]);
|
182
183
|
|
183
184
|
const keyPressHandler = _react.default.useCallback(event => {
|
185
|
+
if (typeof onSelect !== 'function') return;
|
184
186
|
if (disabled) return;
|
185
187
|
|
186
188
|
if (!event.defaultPrevented && [' ', 'Enter'].includes(event.key)) {
|
187
|
-
|
189
|
+
onSelect(event); // if this Item is inside a Menu, close the Menu
|
188
190
|
|
189
191
|
if (typeof afterSelect === 'function') afterSelect();
|
190
192
|
}
|
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 _MenuContext = require("./MenuContext");
|
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: "
|
30
|
+
componentId: "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(_MenuContext.MenuContext);
|
52
52
|
|
53
53
|
return /*#__PURE__*/_react.default.createElement(ListBox, _extends({
|
54
54
|
sx: (0, _sx.merge)(styles, sxProp),
|
@@ -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
|
+
parent?: string;
|
5
5
|
listRole?: string;
|
6
6
|
itemRole?: string;
|
7
|
-
afterSelect?:
|
7
|
+
afterSelect?: () => void;
|
8
8
|
};
|
9
|
-
export declare const
|
9
|
+
export declare const MenuContext: 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.MenuContext = 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 MenuContext = /*#__PURE__*/_react.default.createContext({});
|
14
14
|
|
15
|
-
exports.
|
15
|
+
exports.MenuContext = MenuContext;
|
@@ -13,7 +13,7 @@ var _List = require("./List");
|
|
13
13
|
|
14
14
|
var _Group = require("./Group");
|
15
15
|
|
16
|
-
var
|
16
|
+
var _MenuContext = require("./MenuContext");
|
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
|
+
parent
|
35
|
+
} = _react.default.useContext(_MenuContext.MenuContext);
|
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 (parent === '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,12 +1,10 @@
|
|
1
1
|
import { ButtonProps } from './Button';
|
2
2
|
import React from 'react';
|
3
|
-
import { AnchoredOverlayProps } from './AnchoredOverlay';
|
4
3
|
import { OverlayProps } from './Overlay';
|
5
|
-
|
6
|
-
|
7
|
-
export declare type ActionMenuProps = {
|
4
|
+
import { AnchoredOverlayWrapperAnchorProps } from './AnchoredOverlay/AnchoredOverlay';
|
5
|
+
declare type ActionMenuBaseProps = {
|
8
6
|
/**
|
9
|
-
* Recommended: `ActionMenu.Button` or `ActionMenu.Anchor` with `
|
7
|
+
* Recommended: `ActionMenu.Button` or `ActionMenu.Anchor` with ActionList`
|
10
8
|
*/
|
11
9
|
children: React.ReactElement[] | React.ReactElement;
|
12
10
|
/**
|
@@ -17,22 +15,20 @@ export declare type ActionMenuProps = {
|
|
17
15
|
* If defined, will control the open/closed state of the overlay. Must be used in conjuction with `open`.
|
18
16
|
*/
|
19
17
|
onOpenChange?: (s: boolean) => void;
|
20
|
-
|
18
|
+
/**
|
19
|
+
* Props to be spread on the internal `Overlay` component.
|
20
|
+
*/
|
21
|
+
overlayProps?: Partial<OverlayProps>;
|
22
|
+
};
|
23
|
+
export declare type ActionMenuProps = ActionMenuBaseProps & AnchoredOverlayWrapperAnchorProps;
|
21
24
|
export declare type MenuAnchorProps = {
|
22
25
|
children: React.ReactElement;
|
23
26
|
};
|
24
27
|
/** this component is syntactical sugar 🍭 */
|
25
28
|
export declare type MenuButtonProps = ButtonProps;
|
26
|
-
declare type MenuOverlayProps = Partial<OverlayProps> & {
|
27
|
-
/**
|
28
|
-
* Recommended: `ActionList`
|
29
|
-
*/
|
30
|
-
children: React.ReactElement[] | React.ReactElement;
|
31
|
-
};
|
32
29
|
export declare const ActionMenu: React.FC<ActionMenuProps> & {
|
33
30
|
Button: React.ForwardRefExoticComponent<Pick<{
|
34
31
|
color?: string | undefined;
|
35
|
-
property?: string | undefined;
|
36
32
|
translate?: "yes" | "no" | undefined;
|
37
33
|
hidden?: boolean | undefined;
|
38
34
|
children?: React.ReactNode;
|
@@ -68,6 +64,7 @@ export declare const ActionMenu: React.FC<ActionMenuProps> & {
|
|
68
64
|
datatype?: string | undefined;
|
69
65
|
inlist?: any;
|
70
66
|
prefix?: string | undefined;
|
67
|
+
property?: string | undefined;
|
71
68
|
resource?: string | undefined;
|
72
69
|
typeof?: string | undefined;
|
73
70
|
vocab?: string | undefined;
|
@@ -296,8 +293,8 @@ export declare const ActionMenu: React.FC<ActionMenuProps> & {
|
|
296
293
|
onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
297
294
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
298
295
|
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
299
|
-
disabled?: boolean | undefined;
|
300
296
|
as?: string | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined;
|
297
|
+
disabled?: boolean | undefined;
|
301
298
|
autoFocus?: boolean | undefined;
|
302
299
|
formAction?: string | undefined;
|
303
300
|
formEncType?: string | undefined;
|
@@ -306,12 +303,8 @@ export declare const ActionMenu: React.FC<ActionMenuProps> & {
|
|
306
303
|
formTarget?: string | undefined;
|
307
304
|
} & {
|
308
305
|
theme?: any;
|
309
|
-
}, "theme" | "sx" | "key" |
|
310
|
-
as?: string | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined;
|
311
|
-
variant?: "small" | "medium" | "large" | undefined;
|
312
|
-
}> & React.RefAttributes<React.RefObject<HTMLElement> | undefined>>;
|
306
|
+
}, "color" | "translate" | "hidden" | "children" | "theme" | "value" | "form" | "slot" | "style" | "title" | "variant" | "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" | "as" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & React.RefAttributes<React.RefObject<HTMLElement> | undefined>>;
|
313
307
|
Anchor: React.ForwardRefExoticComponent<MenuAnchorProps & React.RefAttributes<React.RefObject<HTMLElement> | undefined>>;
|
314
|
-
Overlay: React.FC<MenuOverlayProps>;
|
315
308
|
Divider: React.FC<import("./sx").SxProp>;
|
316
309
|
};
|
317
310
|
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 =
|
6
|
+
exports.ActionMenu = void 0;
|
7
7
|
|
8
8
|
var _Button = _interopRequireDefault(require("./Button"));
|
9
9
|
|
@@ -11,60 +11,59 @@ var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
12
12
|
var _AnchoredOverlay = require("./AnchoredOverlay");
|
13
13
|
|
14
|
+
var _useProvidedStateOrCreate = require("./hooks/useProvidedStateOrCreate");
|
15
|
+
|
14
16
|
var _hooks = require("./hooks");
|
15
17
|
|
16
18
|
var _Divider = require("./ActionList2/Divider");
|
17
19
|
|
18
|
-
var
|
20
|
+
var _MenuContext = require("./ActionList2/MenuContext");
|
19
21
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21
23
|
|
22
|
-
const
|
23
|
-
renderAnchor: null,
|
24
|
-
open: false
|
25
|
-
});
|
26
|
-
|
27
|
-
exports.MenuContext = MenuContext;
|
28
|
-
|
29
|
-
const Menu = ({
|
24
|
+
const ActionMenuBase = ({
|
30
25
|
anchorRef: externalAnchorRef,
|
31
26
|
open,
|
32
27
|
onOpenChange,
|
28
|
+
overlayProps,
|
33
29
|
children
|
34
30
|
}) => {
|
35
|
-
const [combinedOpenState, setCombinedOpenState] = (0,
|
31
|
+
const [combinedOpenState, setCombinedOpenState] = (0, _useProvidedStateOrCreate.useProvidedStateOrCreate)(open, onOpenChange, false);
|
32
|
+
const anchorRef = (0, _hooks.useProvidedRefOrCreate)(externalAnchorRef);
|
36
33
|
|
37
34
|
const onOpen = _react.default.useCallback(() => setCombinedOpenState(true), [setCombinedOpenState]);
|
38
35
|
|
39
36
|
const onClose = _react.default.useCallback(() => setCombinedOpenState(false), [setCombinedOpenState]);
|
40
37
|
|
41
|
-
|
42
|
-
|
43
|
-
// we strip out Anchor from children and pass it to AnchoredOverlay to render
|
44
|
-
// with additional props for accessibility
|
38
|
+
let renderAnchor = null;
|
39
|
+
const contents = [];
|
45
40
|
|
46
|
-
|
41
|
+
_react.default.Children.map(children, child => {
|
47
42
|
if (child.type === MenuButton || child.type === Anchor) {
|
48
43
|
renderAnchor = anchorProps => /*#__PURE__*/_react.default.cloneElement(child, anchorProps);
|
49
|
-
|
50
|
-
|
44
|
+
} else {
|
45
|
+
contents.push(child);
|
51
46
|
}
|
52
|
-
|
53
|
-
return child;
|
54
47
|
});
|
55
48
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement(
|
49
|
+
return /*#__PURE__*/_react.default.createElement(_AnchoredOverlay.AnchoredOverlay, {
|
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, {
|
57
57
|
value: {
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
onClose
|
58
|
+
parent: 'ActionMenu',
|
59
|
+
listRole: 'menu',
|
60
|
+
itemRole: 'menuitem',
|
61
|
+
afterSelect: onClose
|
63
62
|
}
|
64
|
-
}, contents);
|
63
|
+
}, contents));
|
65
64
|
};
|
66
65
|
|
67
|
-
|
66
|
+
ActionMenuBase.displayName = "ActionMenuBase";
|
68
67
|
|
69
68
|
const Anchor = /*#__PURE__*/_react.default.forwardRef(({
|
70
69
|
children,
|
@@ -83,43 +82,10 @@ const MenuButton = /*#__PURE__*/_react.default.forwardRef((props, anchorRef) =>
|
|
83
82
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, props));
|
84
83
|
});
|
85
84
|
|
86
|
-
|
87
|
-
|
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, {
|
85
|
+
ActionMenuBase.displayName = 'ActionMenu';
|
86
|
+
const ActionMenu = Object.assign(ActionMenuBase, {
|
120
87
|
Button: MenuButton,
|
121
88
|
Anchor,
|
122
|
-
Overlay,
|
123
89
|
Divider: _Divider.Divider
|
124
90
|
});
|
125
91
|
exports.ActionMenu = ActionMenu;
|
@@ -15,7 +15,6 @@ 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;
|
19
18
|
} & {
|
20
19
|
theme?: any;
|
21
20
|
} & {
|
@@ -28,7 +27,6 @@ declare const _default: React.FC<{
|
|
28
27
|
}> | undefined;
|
29
28
|
} & Pick<{
|
30
29
|
color?: string | undefined;
|
31
|
-
property?: string | undefined;
|
32
30
|
maxWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
33
31
|
minWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
34
32
|
translate?: "yes" | "no" | undefined;
|
@@ -64,6 +62,7 @@ declare const _default: React.FC<{
|
|
64
62
|
datatype?: string | undefined;
|
65
63
|
inlist?: any;
|
66
64
|
prefix?: string | undefined;
|
65
|
+
property?: string | undefined;
|
67
66
|
resource?: string | undefined;
|
68
67
|
typeof?: string | undefined;
|
69
68
|
vocab?: string | undefined;
|
@@ -7,7 +7,6 @@ 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;
|
11
10
|
} & {
|
12
11
|
theme?: any;
|
13
12
|
} & {
|
@@ -20,7 +19,6 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
20
19
|
}> | undefined;
|
21
20
|
} & Pick<{
|
22
21
|
color?: string | undefined;
|
23
|
-
property?: string | undefined;
|
24
22
|
maxWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
25
23
|
minWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
26
24
|
translate?: "yes" | "no" | undefined;
|
@@ -56,6 +54,7 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
56
54
|
datatype?: string | undefined;
|
57
55
|
inlist?: any;
|
58
56
|
prefix?: string | undefined;
|
57
|
+
property?: string | undefined;
|
59
58
|
resource?: string | undefined;
|
60
59
|
typeof?: string | undefined;
|
61
60
|
vocab?: string | undefined;
|
package/lib/BaseStyles.js
CHANGED
@@ -19,11 +19,29 @@ 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)
|
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
|
+
`;
|
23
41
|
|
24
42
|
const Base = _styledComponents.default.div.withConfig({
|
25
43
|
displayName: "BaseStyles__Base",
|
26
|
-
componentId: "
|
44
|
+
componentId: "qvuaww-0"
|
27
45
|
})(["", ";", ";"], _constants.TYPOGRAPHY, _constants.COMMON);
|
28
46
|
|
29
47
|
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: "
|
19
|
+
componentId: "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: "
|
18
|
+
componentId: "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:", ";
|
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/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: "
|
26
|
+
componentId: "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: "
|
31
|
+
componentId: "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: "
|
60
|
+
componentId: "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,7 +6,6 @@ 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;
|
10
9
|
translate?: "yes" | "no" | undefined;
|
11
10
|
hidden?: boolean | undefined;
|
12
11
|
children?: import("react").ReactNode;
|
@@ -41,6 +40,7 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
41
40
|
datatype?: string | undefined;
|
42
41
|
inlist?: any;
|
43
42
|
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
|
-
disabled?: boolean | undefined;
|
273
272
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
273
|
+
disabled?: boolean | 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: "
|
20
|
+
componentId: "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;
|