@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-esm/StyledOcticon.js
CHANGED
@@ -12,7 +12,7 @@ function Octicon({
|
|
12
12
|
Octicon.displayName = "Octicon";
|
13
13
|
const StyledOcticon = styled(Octicon).withConfig({
|
14
14
|
displayName: "StyledOcticon",
|
15
|
-
componentId: "
|
15
|
+
componentId: "uhnt7w-0"
|
16
16
|
})(["", ""], sx);
|
17
17
|
StyledOcticon.defaultProps = {
|
18
18
|
size: 16
|
package/lib-esm/SubNav.js
CHANGED
@@ -10,7 +10,7 @@ const ITEM_CLASS = 'SubNav-item';
|
|
10
10
|
const SELECTED_CLASS = 'selected';
|
11
11
|
const SubNavBase = styled.nav.withConfig({
|
12
12
|
displayName: "SubNav__SubNavBase",
|
13
|
-
componentId: "
|
13
|
+
componentId: "f7w0xa-0"
|
14
14
|
})(["display:flex;justify-content:space-between;.SubNav-body{display:flex;margin-bottom:-1px;> *{margin-left:", ";}> *:first-child{margin-left:0;}}.SubNav-actions{align-self:center;}", ";"], get('space.2'), sx);
|
15
15
|
|
16
16
|
function SubNav({
|
@@ -34,14 +34,14 @@ function SubNav({
|
|
34
34
|
SubNav.displayName = "SubNav";
|
35
35
|
const SubNavLinks = styled.div.withConfig({
|
36
36
|
displayName: "SubNav__SubNavLinks",
|
37
|
-
componentId: "
|
37
|
+
componentId: "f7w0xa-1"
|
38
38
|
})(["display:flex;", ";"], sx);
|
39
39
|
const SubNavLink = styled.a.attrs(props => ({
|
40
40
|
activeClassName: typeof props.to === 'string' ? 'selected' : '',
|
41
41
|
className: classnames(ITEM_CLASS, props.selected && SELECTED_CLASS, props.className)
|
42
42
|
})).withConfig({
|
43
43
|
displayName: "SubNav__SubNavLink",
|
44
|
-
componentId: "
|
44
|
+
componentId: "f7w0xa-2"
|
45
45
|
})(["padding-left:", ";padding-right:", ";font-weight:", ";font-size:", ";line-height:20px;min-height:34px;color:", ";text-align:center;text-decoration:none;border-top:1px solid ", ";border-bottom:1px solid ", ";border-right:1px solid ", ";display:flex;align-items:center;&:first-of-type{border-top-left-radius:", ";border-bottom-left-radius:", ";border-left:1px solid ", ";}&:last-of-type{border-top-right-radius:", ";border-bottom-right-radius:", ";}&:hover,&:focus{text-decoration:none;background-color:", ";transition:0.2s ease;.SubNav-octicon{color:", ";}}&.selected{color:", ";background-color:", ";border-color:", ";.SubNav-octicon{color:", ";}}", ";"], get('space.3'), get('space.3'), get('fontWeights.semibold'), get('fontSizes.1'), get('colors.fg.default'), get('colors.border.default'), get('colors.border.default'), get('colors.border.default'), get('radii.2'), get('radii.2'), get('colors.border.default'), get('radii.2'), get('radii.2'), get('colors.canvas.subtle'), get('colors.fg.muted'), get('colors.fg.onEmphasis'), get('colors.accent.emphasis'), get('colors.accent.emphasis'), get('colors.fg.onEmphasis'), sx);
|
46
46
|
SubNavLink.displayName = 'SubNav.Link';
|
47
47
|
SubNavLinks.displayName = 'SubNav.Links';
|
@@ -39,7 +39,6 @@ declare const TextInputWithTokens: React.ForwardRefExoticComponent<Pick<{
|
|
39
39
|
} & Pick<Omit<Pick<{
|
40
40
|
[x: string]: any;
|
41
41
|
[x: number]: any;
|
42
|
-
[x: symbol]: any;
|
43
42
|
} & {
|
44
43
|
theme?: any;
|
45
44
|
} & {
|
@@ -52,7 +51,6 @@ declare const TextInputWithTokens: React.ForwardRefExoticComponent<Pick<{
|
|
52
51
|
}> | undefined;
|
53
52
|
} & Pick<{
|
54
53
|
color?: string | undefined;
|
55
|
-
property?: string | undefined;
|
56
54
|
maxWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
57
55
|
minWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
58
56
|
translate?: "yes" | "no" | undefined;
|
@@ -88,6 +86,7 @@ declare const TextInputWithTokens: React.ForwardRefExoticComponent<Pick<{
|
|
88
86
|
datatype?: string | undefined;
|
89
87
|
inlist?: any;
|
90
88
|
prefix?: string | undefined;
|
89
|
+
property?: string | undefined;
|
91
90
|
resource?: string | undefined;
|
92
91
|
typeof?: string | undefined;
|
93
92
|
vocab?: string | undefined;
|
@@ -16,7 +16,6 @@ export declare function useTheme(): {
|
|
16
16
|
colorScheme?: string | undefined;
|
17
17
|
colorMode?: ColorModeWithAuto | undefined;
|
18
18
|
resolvedColorMode?: ColorMode | undefined;
|
19
|
-
resolvedColorScheme?: string | undefined;
|
20
19
|
dayScheme?: string | undefined;
|
21
20
|
nightScheme?: string | undefined;
|
22
21
|
setColorMode: React.Dispatch<React.SetStateAction<ColorModeWithAuto>>;
|
package/lib-esm/ThemeProvider.js
CHANGED
@@ -32,10 +32,7 @@ export const ThemeProvider = ({
|
|
32
32
|
const systemColorMode = useSystemColorMode();
|
33
33
|
const resolvedColorMode = resolveColorMode(colorMode, systemColorMode);
|
34
34
|
const colorScheme = chooseColorScheme(resolvedColorMode, dayScheme, nightScheme);
|
35
|
-
const
|
36
|
-
resolvedTheme,
|
37
|
-
resolvedColorScheme
|
38
|
-
} = React.useMemo(() => applyColorScheme(theme, colorScheme), [theme, colorScheme]); // Update state if props change
|
35
|
+
const resolvedTheme = React.useMemo(() => applyColorScheme(theme, colorScheme), [theme, colorScheme]); // Update state if props change
|
39
36
|
|
40
37
|
React.useEffect(() => {
|
41
38
|
var _ref5, _props$colorMode2;
|
@@ -58,7 +55,6 @@ export const ThemeProvider = ({
|
|
58
55
|
colorScheme,
|
59
56
|
colorMode,
|
60
57
|
resolvedColorMode,
|
61
|
-
resolvedColorScheme,
|
62
58
|
dayScheme,
|
63
59
|
nightScheme,
|
64
60
|
setColorMode,
|
@@ -148,10 +144,7 @@ function chooseColorScheme(colorMode, dayScheme, nightScheme) {
|
|
148
144
|
|
149
145
|
function applyColorScheme(theme, colorScheme) {
|
150
146
|
if (!theme.colorSchemes) {
|
151
|
-
return
|
152
|
-
resolvedTheme: theme,
|
153
|
-
resolvedColorScheme: undefined
|
154
|
-
};
|
147
|
+
return theme;
|
155
148
|
}
|
156
149
|
|
157
150
|
if (!theme.colorSchemes[colorScheme]) {
|
@@ -159,16 +152,10 @@ function applyColorScheme(theme, colorScheme) {
|
|
159
152
|
console.error(`\`${colorScheme}\` scheme not defined in \`theme.colorSchemes\``); // Apply the first defined color scheme
|
160
153
|
|
161
154
|
const defaultColorScheme = Object.keys(theme.colorSchemes)[0];
|
162
|
-
return
|
163
|
-
resolvedTheme: deepmerge(theme, theme.colorSchemes[defaultColorScheme]),
|
164
|
-
resolvedColorScheme: defaultColorScheme
|
165
|
-
};
|
155
|
+
return deepmerge(theme, theme.colorSchemes[defaultColorScheme]);
|
166
156
|
}
|
167
157
|
|
168
|
-
return
|
169
|
-
resolvedTheme: deepmerge(theme, theme.colorSchemes[colorScheme]),
|
170
|
-
resolvedColorScheme: colorScheme
|
171
|
-
};
|
158
|
+
return deepmerge(theme, theme.colorSchemes[colorScheme]);
|
172
159
|
}
|
173
160
|
|
174
161
|
export default ThemeProvider;
|
package/lib-esm/Timeline.js
CHANGED
@@ -6,13 +6,13 @@ import { get } from './constants';
|
|
6
6
|
import sx from './sx';
|
7
7
|
const Timeline = styled.div.withConfig({
|
8
8
|
displayName: "Timeline",
|
9
|
-
componentId: "
|
9
|
+
componentId: "c4dq2e-0"
|
10
10
|
})(["display:flex;flex-direction:column;", " ", ";"], props => props.clipSidebar && css([".Timeline-Item:first-child{padding-top:0;}.Timeline-Item:last-child{padding-bottom:0;}"]), sx);
|
11
11
|
const TimelineItem = styled.div.attrs(props => ({
|
12
12
|
className: classnames('Timeline-Item', props.className)
|
13
13
|
})).withConfig({
|
14
14
|
displayName: "Timeline__TimelineItem",
|
15
|
-
componentId: "
|
15
|
+
componentId: "c4dq2e-1"
|
16
16
|
})(["display:flex;position:relative;padding:", " 0;margin-left:", ";&::before{position:absolute;top:0;bottom:0;left:0;display:block;width:2px;content:'';background-color:", ";}", " ", ";"], get('space.3'), get('space.3'), get('colors.border.muted'), props => props.condensed && css(["padding-top:", ";padding-bottom:0;&:last-child{padding-bottom:", ";}.TimelineItem-Badge{height:16px;margin-top:", ";margin-bottom:", ";color:", ";background-color:", ";border:0;}"], get('space.1'), get('space.3'), get('space.2'), get('space.2'), get('colors.fg.muted'), get('colors.canvas.default')), sx);
|
17
17
|
|
18
18
|
const TimelineBadge = props => {
|
@@ -43,11 +43,11 @@ const TimelineBadge = props => {
|
|
43
43
|
TimelineBadge.displayName = "TimelineBadge";
|
44
44
|
const TimelineBody = styled.div.withConfig({
|
45
45
|
displayName: "Timeline__TimelineBody",
|
46
|
-
componentId: "
|
46
|
+
componentId: "c4dq2e-2"
|
47
47
|
})(["min-width:0;max-width:100%;margin-top:", ";color:", ";flex:auto;font-size:", ";", ";"], get('space.1'), get('colors.fg.muted'), get('fontSizes.1'), sx);
|
48
48
|
const TimelineBreak = styled.div.withConfig({
|
49
49
|
displayName: "Timeline__TimelineBreak",
|
50
|
-
componentId: "
|
50
|
+
componentId: "c4dq2e-3"
|
51
51
|
})(["position:relative z-index:1;height:24px;margin:0;margin-bottom:-", ";margin-left:0;background-color:", ";border:0;border-top:", " solid ", ";", ";"], get('space.3'), get('colors.canvas.default'), get('space.1'), get('colors.border.default'), sx);
|
52
52
|
TimelineItem.displayName = 'Timeline.Item';
|
53
53
|
TimelineBadge.displayName = 'Timeline.Badge';
|
@@ -3,5 +3,5 @@ import { TokenBaseProps } from './TokenBase';
|
|
3
3
|
export interface AvatarTokenProps extends TokenBaseProps {
|
4
4
|
avatarSrc: string;
|
5
5
|
}
|
6
|
-
declare const AvatarToken: React.ForwardRefExoticComponent<Pick<AvatarTokenProps, "default" | "muted" | "sizes" | "color" | "
|
6
|
+
declare const AvatarToken: React.ForwardRefExoticComponent<Pick<AvatarTokenProps, "default" | "muted" | "sizes" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "children" | "value" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "text" | "start" | "size" | "wrap" | "open" | "list" | "multiple" | "role" | "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" | "step" | "disabled" | "selected" | "download" | "href" | "hrefLang" | "media" | "rel" | "target" | "max" | "method" | "min" | "crossOrigin" | "classID" | "useMap" | "wmode" | "integrity" | "charSet" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "rows" | "kind" | "srcLang" | "poster" | "onRemove" | "isSelected" | "avatarSrc"> & React.RefAttributes<HTMLElement>>;
|
7
7
|
export default AvatarToken;
|
@@ -8,7 +8,7 @@ import Token from './Token';
|
|
8
8
|
import { Avatar } from '..';
|
9
9
|
const AvatarContainer = styled.span.withConfig({
|
10
10
|
displayName: "AvatarToken__AvatarContainer",
|
11
|
-
componentId: "
|
11
|
+
componentId: "ubyudc-0"
|
12
12
|
})(["--spacing:calc(", " * 2);display:block;height:", ";width:", ";"], get('space.1'), props => `calc(${tokenSizes[props.avatarSize]} - var(--spacing))`, props => `calc(${tokenSizes[props.avatarSize]} - var(--spacing))`);
|
13
13
|
const AvatarToken = /*#__PURE__*/forwardRef(({
|
14
14
|
avatarSrc,
|
@@ -10,5 +10,5 @@ export interface IssueLabelTokenProps extends TokenBaseProps {
|
|
10
10
|
*/
|
11
11
|
hideRemoveButton?: boolean;
|
12
12
|
}
|
13
|
-
declare const IssueLabelToken: React.ForwardRefExoticComponent<Pick<IssueLabelTokenProps, "default" | "muted" | "sizes" | "color" | "
|
13
|
+
declare const IssueLabelToken: React.ForwardRefExoticComponent<Pick<IssueLabelTokenProps, "default" | "muted" | "sizes" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "children" | "value" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "text" | "start" | "size" | "wrap" | "open" | "list" | "multiple" | "role" | "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" | "step" | "disabled" | "selected" | "download" | "href" | "hrefLang" | "media" | "rel" | "target" | "max" | "method" | "min" | "crossOrigin" | "classID" | "useMap" | "wmode" | "integrity" | "charSet" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "rows" | "kind" | "srcLang" | "poster" | "onRemove" | "isSelected" | "hideRemoveButton" | "fillColor"> & React.RefAttributes<HTMLElement>>;
|
14
14
|
export default IssueLabelToken;
|
package/lib-esm/Token/Token.d.ts
CHANGED
@@ -11,5 +11,5 @@ export interface TokenProps extends TokenBaseProps {
|
|
11
11
|
*/
|
12
12
|
hideRemoveButton?: boolean;
|
13
13
|
}
|
14
|
-
declare const Token: React.ForwardRefExoticComponent<Pick<TokenProps & SxProp, "default" | "muted" | "sizes" | "color" | "
|
14
|
+
declare const Token: React.ForwardRefExoticComponent<Pick<TokenProps & SxProp, "default" | "muted" | "sizes" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "children" | "value" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "text" | "start" | "size" | "wrap" | "open" | "list" | "multiple" | "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" | "step" | "disabled" | "selected" | "download" | "href" | "hrefLang" | "media" | "rel" | "target" | "max" | "method" | "min" | "crossOrigin" | "classID" | "useMap" | "wmode" | "integrity" | "charSet" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "rows" | "kind" | "srcLang" | "poster" | "leadingVisual" | "onRemove" | "isSelected" | "hideRemoveButton"> & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement | HTMLSpanElement>>;
|
15
15
|
export default Token;
|
@@ -74,7 +74,7 @@ const TokenBase = styled.span.attrs(({
|
|
74
74
|
'aria-label': onRemove ? `${text}, press backspace or delete to remove` : undefined
|
75
75
|
})).withConfig({
|
76
76
|
displayName: "TokenBase",
|
77
|
-
componentId: "
|
77
|
+
componentId: "opajvp-0"
|
78
78
|
})(["align-items:center;border-radius:999px;cursor:", ";display:inline-flex;font-weight:", ";font-family:inherit;text-decoration:none;white-space:nowrap;", " ", ""], props => isTokenInteractive(props) ? 'pointer' : 'auto', get('fontWeights.bold'), variants, sx);
|
79
79
|
TokenBase.defaultProps = {
|
80
80
|
as: 'span',
|
package/lib-esm/Tooltip.js
CHANGED
@@ -7,7 +7,7 @@ import { get } from './constants';
|
|
7
7
|
import sx from './sx';
|
8
8
|
const TooltipBase = styled.span.withConfig({
|
9
9
|
displayName: "Tooltip__TooltipBase",
|
10
|
-
componentId: "
|
10
|
+
componentId: "kp39nc-0"
|
11
11
|
})(["position:relative;&::before{position:absolute;z-index:1000001;display:none;width:0px;height:0px;color:", ";pointer-events:none;content:'';border:6px solid transparent;opacity:0;}&::after{position:absolute;z-index:1000000;display:none;padding:0.5em 0.75em;font:normal normal 11px/1.5 ", ";-webkit-font-smoothing:subpixel-antialiased;color:", ";text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:", ";border-radius:", ";opacity:0;}@keyframes tooltip-appear{from{opacity:0;}to{opacity:1;}}&:hover,&:active,&:focus{&::before,&::after{display:inline-block;text-decoration:none;animation-name:tooltip-appear;animation-duration:0.1s;animation-fill-mode:forwards;animation-timing-function:ease-in;animation-delay:0.4s;}}&.tooltipped-no-delay:hover,&.tooltipped-no-delay:active,&.tooltipped-no-delay:focus{&::before,&::after{animation-delay:0s;}}&.tooltipped-multiline:hover,&.tooltipped-multiline:active,&.tooltipped-multiline:focus{&::after{display:table-cell;}}&.tooltipped-s,&.tooltipped-se,&.tooltipped-sw{&::after{top:100%;right:50%;margin-top:6px;}&::before{top:auto;right:50%;bottom:-7px;margin-right:-6px;border-bottom-color:", ";}}&.tooltipped-se{&::after{right:auto;left:50%;margin-left:-", ";}}&.tooltipped-sw::after{margin-right:-", ";}&.tooltipped-n,&.tooltipped-ne,&.tooltipped-nw{&::after{right:50%;bottom:100%;margin-bottom:6px;}&::before{top:-7px;right:50%;bottom:auto;margin-right:-6px;border-top-color:", ";}}&.tooltipped-ne{&::after{right:auto;left:50%;margin-left:-", ";}}&.tooltipped-nw::after{margin-right:-", ";}&.tooltipped-s::after,&.tooltipped-n::after{transform:translateX(50%);}&.tooltipped-w{&::after{right:100%;bottom:50%;margin-right:6px;transform:translateY(50%);}&::before{top:50%;bottom:50%;left:-7px;margin-top:-6px;border-left-color:", ";}}&.tooltipped-e{&::after{bottom:50%;left:100%;margin-left:6px;transform:translateY(50%);}&::before{top:50%;right:-7px;bottom:50%;margin-top:-6px;border-right-color:", ";}}&.tooltipped-multiline{&::after{width:max-content;max-width:250px;word-wrap:break-word;white-space:pre-line;border-collapse:separate;}&.tooltipped-s::after,&.tooltipped-n::after{right:auto;left:50%;transform:translateX(-50%);}&.tooltipped-w::after,&.tooltipped-e::after{right:100%;}}&.tooltipped-align-right-2::after{right:0;margin-right:0;}&.tooltipped-align-right-2::before{right:15px;}&.tooltipped-align-left-2::after{left:0;margin-left:0;}&.tooltipped-align-left-2::before{left:10px;}", ";"], get('colors.neutral.emphasisPlus'), get('fonts.normal'), get('colors.fg.onEmphasis'), get('colors.neutral.emphasisPlus'), get('radii.1'), get('colors.neutral.emphasisPlus'), get('space.3'), get('space.3'), get('colors.neutral.emphasisPlus'), get('space.3'), get('space.3'), get('colors.neutral.emphasisPlus'), get('colors.neutral.emphasisPlus'), sx);
|
12
12
|
|
13
13
|
function Tooltip({
|
package/lib-esm/UnderlineNav.js
CHANGED
@@ -10,7 +10,7 @@ const ITEM_CLASS = 'UnderlineNav-item';
|
|
10
10
|
const SELECTED_CLASS = 'selected';
|
11
11
|
const UnderlineNavBase = styled.nav.withConfig({
|
12
12
|
displayName: "UnderlineNav__UnderlineNavBase",
|
13
|
-
componentId: "
|
13
|
+
componentId: "zrnxqt-0"
|
14
14
|
})(["display:flex;justify-content:space-between;border-bottom:1px solid ", ";&.UnderlineNav--right{justify-content:flex-end;.UnderlineNav-item{margin-right:0;margin-left:", ";}.UnderlineNav-actions{flex:1 1 auto;}}&.UnderlineNav--full{display:block;}.UnderlineNav-body{display:flex;margin-bottom:-1px;}.UnderlineNav-actions{align-self:center;}", ";"], get('colors.border.muted'), get('space.3'), sx);
|
15
15
|
|
16
16
|
function UnderlineNav({
|
@@ -41,7 +41,7 @@ const UnderlineNavLink = styled.a.attrs(props => ({
|
|
41
41
|
className: classnames(ITEM_CLASS, props.selected && SELECTED_CLASS, props.className)
|
42
42
|
})).withConfig({
|
43
43
|
displayName: "UnderlineNav__UnderlineNavLink",
|
44
|
-
componentId: "
|
44
|
+
componentId: "zrnxqt-1"
|
45
45
|
})(["padding:", " ", ";margin-right:", ";font-size:", ";line-height:", ";color:", ";text-align:center;border-bottom:2px solid transparent;text-decoration:none;&:hover,&:focus{color:", ";text-decoration:none;border-bottom-color:", ";transition:0.2s ease;.UnderlineNav-octicon{color:", ";}}&.selected{color:", ";border-bottom-color:", ";.UnderlineNav-octicon{color:", ";}}", ";"], get('space.3'), get('space.2'), get('space.3'), get('fontSizes.1'), get('lineHeights.default'), get('colors.fg.default'), get('colors.fg.default'), get('colors.neutral.muted'), get('colors.fg.muted'), get('colors.fg.default'), get('colors.primer.border.active'), get('colors.fg.default'), sx);
|
46
46
|
UnderlineNavLink.displayName = 'UnderlineNav.Link';
|
47
47
|
export default Object.assign(UnderlineNav, {
|
package/lib-esm/hooks/index.d.ts
CHANGED
@@ -9,4 +9,3 @@ export { useAnchoredPosition } from './useAnchoredPosition';
|
|
9
9
|
export { useOverlay } from './useOverlay';
|
10
10
|
export type { UseOverlaySettings } from './useOverlay';
|
11
11
|
export { useRenderForcingRef } from './useRenderForcingRef';
|
12
|
-
export { useProvidedStateOrCreate } from './useProvidedStateOrCreate';
|
package/lib-esm/hooks/index.js
CHANGED
@@ -4,5 +4,4 @@ export { useOnEscapePress } from './useOnEscapePress';
|
|
4
4
|
export { useOpenAndCloseFocus } from './useOpenAndCloseFocus';
|
5
5
|
export { useAnchoredPosition } from './useAnchoredPosition';
|
6
6
|
export { useOverlay } from './useOverlay';
|
7
|
-
export { useRenderForcingRef } from './useRenderForcingRef';
|
8
|
-
export { useProvidedStateOrCreate } from './useProvidedStateOrCreate';
|
7
|
+
export { useRenderForcingRef } from './useRenderForcingRef';
|
package/lib-esm/index.d.ts
CHANGED
@@ -21,8 +21,6 @@ export { useOpenAndCloseFocus } from './hooks/useOpenAndCloseFocus';
|
|
21
21
|
export { useOnEscapePress } from './hooks/useOnEscapePress';
|
22
22
|
export { useOverlay } from './hooks/useOverlay';
|
23
23
|
export { useConfirm } from './Dialog/ConfirmationDialog';
|
24
|
-
export { default as Radio } from './Radio';
|
25
|
-
export type { RadioProps } from './Radio';
|
26
24
|
export { ActionList } from './ActionList';
|
27
25
|
export { ActionMenu } from './ActionMenu';
|
28
26
|
export type { ActionMenuProps } from './ActionMenu';
|
package/lib-esm/index.js
CHANGED
@@ -17,7 +17,6 @@ export { useOnEscapePress } from './hooks/useOnEscapePress';
|
|
17
17
|
export { useOverlay } from './hooks/useOverlay';
|
18
18
|
export { useConfirm } from './Dialog/ConfirmationDialog'; // Components
|
19
19
|
|
20
|
-
export { default as Radio } from './Radio';
|
21
20
|
export { ActionList } from './ActionList';
|
22
21
|
export { ActionMenu } from './ActionMenu';
|
23
22
|
export { default as Autocomplete } from './Autocomplete';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@primer/components",
|
3
|
-
"version": "0.0.0-
|
3
|
+
"version": "0.0.0-20211115171641",
|
4
4
|
"description": "Primer react components",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"module": "lib-esm/index.js",
|
@@ -65,7 +65,7 @@
|
|
65
65
|
"@babel/cli": "7.14.5",
|
66
66
|
"@babel/core": "7.14.8",
|
67
67
|
"@babel/eslint-parser": "7.15.7",
|
68
|
-
"@babel/plugin-proposal-nullish-coalescing-operator": "7.
|
68
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "7.14.5",
|
69
69
|
"@babel/plugin-proposal-optional-chaining": "7.14.5",
|
70
70
|
"@babel/plugin-transform-modules-commonjs": "7.14.5",
|
71
71
|
"@babel/preset-react": "7.14.5",
|
@@ -75,7 +75,7 @@
|
|
75
75
|
"@github/prettier-config": "0.0.4",
|
76
76
|
"@rollup/plugin-commonjs": "19.0.2",
|
77
77
|
"@rollup/plugin-node-resolve": "13.0.5",
|
78
|
-
"@size-limit/preset-big-lib": "
|
78
|
+
"@size-limit/preset-big-lib": "5.0.2",
|
79
79
|
"@storybook/addon-a11y": "6.3.12",
|
80
80
|
"@storybook/addon-actions": "^6.3.12",
|
81
81
|
"@storybook/addon-essentials": "6.3.12",
|
@@ -91,7 +91,6 @@
|
|
91
91
|
"@types/jest-axe": "3.5.3",
|
92
92
|
"@types/lodash.isempty": "4.4.6",
|
93
93
|
"@types/lodash.isobject": "3.0.6",
|
94
|
-
"@types/node": "16.11.11",
|
95
94
|
"@typescript-eslint/eslint-plugin": "4.31.2",
|
96
95
|
"@typescript-eslint/parser": "4.26.1",
|
97
96
|
"@wojtekmaj/enzyme-adapter-react-17": "0.6.3",
|
@@ -100,7 +99,7 @@
|
|
100
99
|
"babel-plugin-add-react-displayname": "0.0.5",
|
101
100
|
"babel-plugin-macros": "3.1.0",
|
102
101
|
"babel-plugin-preval": "5.0.0",
|
103
|
-
"babel-plugin-styled-components": "
|
102
|
+
"babel-plugin-styled-components": "1.12.0",
|
104
103
|
"babel-plugin-transform-replace-expressions": "0.2.0",
|
105
104
|
"babel-polyfill": "6.26.0",
|
106
105
|
"chroma-js": "2.1.2",
|
@@ -117,7 +116,6 @@
|
|
117
116
|
"eslint-plugin-primer-react": "0.7.0",
|
118
117
|
"eslint-plugin-react": "7.24.0",
|
119
118
|
"eslint-plugin-react-hooks": "4.2.0",
|
120
|
-
"front-matter": "4.0.2",
|
121
119
|
"jest": "27.0.4",
|
122
120
|
"jest-axe": "5.0.1",
|
123
121
|
"jest-styled-components": "6.3.4",
|
@@ -130,16 +128,16 @@
|
|
130
128
|
"react-dnd-html5-backend": "14.0.2",
|
131
129
|
"react-dom": "17.0.2",
|
132
130
|
"react-test-renderer": "17.0.2",
|
133
|
-
"rollup": "2.
|
131
|
+
"rollup": "2.56.3",
|
134
132
|
"rollup-plugin-babel": "4.4.0",
|
135
133
|
"rollup-plugin-terser": "7.0.2",
|
136
134
|
"rollup-plugin-visualizer": "5.5.0",
|
137
135
|
"semver": "7.3.5",
|
138
|
-
"size-limit": "
|
136
|
+
"size-limit": "5.0.2",
|
139
137
|
"storybook-addon-performance": "0.16.1",
|
140
138
|
"styled-components": "4.4.1",
|
141
139
|
"ts-toolbelt": "9.6.0",
|
142
|
-
"typescript": "4.
|
140
|
+
"typescript": "4.2.2"
|
143
141
|
},
|
144
142
|
"peerDependencies": {
|
145
143
|
"react": "^17.0.0",
|
@@ -158,9 +156,5 @@
|
|
158
156
|
"webpack": false,
|
159
157
|
"running": false
|
160
158
|
}
|
161
|
-
]
|
162
|
-
"engines": {
|
163
|
-
"node": ">=16",
|
164
|
-
"npm": ">=8"
|
165
|
-
}
|
159
|
+
]
|
166
160
|
}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { ComponentPropsWithRef } from 'react';
|
2
|
-
import { ForwardRefComponent as PolymorphicForwardRefComponent } from '@radix-ui/react-polymorphic';
|
3
|
-
import { ButtonProps } from './types';
|
4
|
-
declare const ButtonBase: PolymorphicForwardRefComponent<"a" | "button", ButtonProps>;
|
5
|
-
export declare type ButtonBaseProps = ComponentPropsWithRef<typeof ButtonBase>;
|
6
|
-
export default ButtonBase;
|
@@ -1,69 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
9
|
-
|
10
|
-
var _Box = _interopRequireDefault(require("../Box"));
|
11
|
-
|
12
|
-
var _sx = require("../sx");
|
13
|
-
|
14
|
-
var _ThemeProvider = require("../ThemeProvider");
|
15
|
-
|
16
|
-
var _types = require("./types");
|
17
|
-
|
18
|
-
var _styles = require("./styles");
|
19
|
-
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21
|
-
|
22
|
-
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); }
|
23
|
-
|
24
|
-
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; }
|
25
|
-
|
26
|
-
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); }
|
27
|
-
|
28
|
-
const ButtonBase = /*#__PURE__*/(0, _react.forwardRef)(({
|
29
|
-
children,
|
30
|
-
as: Component = 'button',
|
31
|
-
sx: sxProp = {},
|
32
|
-
...props
|
33
|
-
}, forwardedRef) => {
|
34
|
-
const {
|
35
|
-
leadingIcon: LeadingIcon,
|
36
|
-
trailingIcon: TrailingIcon,
|
37
|
-
variant = 'default',
|
38
|
-
size = 'medium'
|
39
|
-
} = props;
|
40
|
-
const {
|
41
|
-
theme
|
42
|
-
} = (0, _ThemeProvider.useTheme)();
|
43
|
-
const iconWrapStyles = {
|
44
|
-
display: 'inline-block'
|
45
|
-
};
|
46
|
-
|
47
|
-
const sxStyles = _sx.merge.all([(0, _styles.getButtonStyles)(theme), (0, _styles.getSizeStyles)(size, variant, false), (0, _styles.getVariantStyles)(variant, theme), sxProp]);
|
48
|
-
|
49
|
-
return /*#__PURE__*/_react.default.createElement(_types.StyledButton, _extends({
|
50
|
-
as: Component,
|
51
|
-
sx: sxStyles
|
52
|
-
}, props, {
|
53
|
-
ref: forwardedRef
|
54
|
-
}), LeadingIcon && /*#__PURE__*/_react.default.createElement(_Box.default, {
|
55
|
-
as: "span",
|
56
|
-
"data-component": "leadingIcon",
|
57
|
-
sx: iconWrapStyles
|
58
|
-
}, /*#__PURE__*/_react.default.createElement(LeadingIcon, null)), /*#__PURE__*/_react.default.createElement("span", {
|
59
|
-
"data-component": "text"
|
60
|
-
}, children), TrailingIcon && /*#__PURE__*/_react.default.createElement(_Box.default, {
|
61
|
-
as: "span",
|
62
|
-
"data-component": "trailingIcon",
|
63
|
-
sx: { ...iconWrapStyles,
|
64
|
-
ml: 2
|
65
|
-
}
|
66
|
-
}, /*#__PURE__*/_react.default.createElement(TrailingIcon, null)));
|
67
|
-
});
|
68
|
-
var _default = ButtonBase;
|
69
|
-
exports.default = _default;
|
@@ -1,27 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ForwardRefComponent as PolymorphicForwardRefComponent } from '@radix-ui/react-polymorphic';
|
3
|
-
declare const LinkButton: PolymorphicForwardRefComponent<"a", Omit<(Pick<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof React.AnchorHTMLAttributes<HTMLAnchorElement>> & {
|
4
|
-
ref?: ((instance: HTMLAnchorElement | null) => void) | React.RefObject<HTMLAnchorElement> | null | undefined;
|
5
|
-
}) | (Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof React.ButtonHTMLAttributes<HTMLButtonElement>> & {
|
6
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
|
7
|
-
}), string | number | symbol> & {
|
8
|
-
leadingIcon?: React.FunctionComponent<import("@primer/octicons-react/dist/icons").IconProps> | undefined;
|
9
|
-
trailingIcon?: React.FunctionComponent<import("@primer/octicons-react/dist/icons").IconProps> | undefined;
|
10
|
-
children: React.ReactNode;
|
11
|
-
} & {
|
12
|
-
variant?: import("./types").VariantType | undefined;
|
13
|
-
size?: import("./types").Size | undefined;
|
14
|
-
disabled?: boolean | undefined;
|
15
|
-
} & import("../sx").SxProp & React.HTMLAttributes<HTMLButtonElement> & {
|
16
|
-
[x: string]: any;
|
17
|
-
[x: number]: any;
|
18
|
-
[x: symbol]: any;
|
19
|
-
} & {
|
20
|
-
theme?: any;
|
21
|
-
} & {
|
22
|
-
as?: string | React.ComponentType<any> | undefined;
|
23
|
-
forwardedAs?: string | React.ComponentType<any> | undefined;
|
24
|
-
} & {
|
25
|
-
as?: "a" | "button" | undefined;
|
26
|
-
}>;
|
27
|
-
export default LinkButton;
|
@@ -1,31 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
9
|
-
|
10
|
-
var _buttonBase = _interopRequireDefault(require("./button-base"));
|
11
|
-
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
|
-
|
14
|
-
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); }
|
15
|
-
|
16
|
-
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; }
|
17
|
-
|
18
|
-
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); }
|
19
|
-
|
20
|
-
const LinkButton = /*#__PURE__*/(0, _react.forwardRef)(({
|
21
|
-
children,
|
22
|
-
as: Component = 'a',
|
23
|
-
...props
|
24
|
-
}, forwardedRef) => {
|
25
|
-
return /*#__PURE__*/_react.default.createElement(_buttonBase.default, _extends({
|
26
|
-
as: Component,
|
27
|
-
ref: forwardedRef
|
28
|
-
}, props), children);
|
29
|
-
});
|
30
|
-
var _default = LinkButton;
|
31
|
-
exports.default = _default;
|