@primer/styled-react 0.0.0-20251007203417 → 0.0.0-20251007205211
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{components/PageHeader.js → Tooltip-DIHgr01r.js} +49 -4
- package/dist/components/Button.d.ts +13 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/IconButton.d.ts +9 -0
- package/dist/components/IconButton.d.ts.map +1 -0
- package/dist/components/PageHeader.d.ts.map +1 -1
- package/dist/components/TextInput.d.ts +20 -0
- package/dist/components/TextInput.d.ts.map +1 -0
- package/dist/components.json +3 -1
- package/dist/deprecated.js +179 -5
- package/dist/experimental.js +55 -5
- package/dist/index.d.ts +4 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +832 -37
- package/dist/sx.d.ts +3 -0
- package/dist/sx.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/components/ActionList.js +0 -104
- package/dist/components/ActionMenu.js +0 -17
- package/dist/components/Autocomplete.js +0 -17
- package/dist/components/Avatar.js +0 -13
- package/dist/components/BaseStyles.d.ts +0 -17
- package/dist/components/BaseStyles.d.ts.map +0 -1
- package/dist/components/BaseStyles.js +0 -51
- package/dist/components/Breadcrumbs.js +0 -37
- package/dist/components/Checkbox.js +0 -13
- package/dist/components/CheckboxGroup.js +0 -38
- package/dist/components/CircleBadge.js +0 -11
- package/dist/components/CounterLabel.js +0 -13
- package/dist/components/DataTable.js +0 -32
- package/dist/components/Dialog.js +0 -42
- package/dist/components/Flash.js +0 -11
- package/dist/components/Header.js +0 -51
- package/dist/components/Heading.js +0 -11
- package/dist/components/Label.js +0 -25
- package/dist/components/Link.js +0 -25
- package/dist/components/LinkButton.js +0 -11
- package/dist/components/NavList.js +0 -56
- package/dist/components/Overlay.js +0 -11
- package/dist/components/PageLayout.js +0 -39
- package/dist/components/RadioGroup.js +0 -38
- package/dist/components/RelativeTime.js +0 -13
- package/dist/components/SegmentedControl.js +0 -27
- package/dist/components/Spinner.js +0 -12
- package/dist/components/StateLabel.js +0 -13
- package/dist/components/SubNav.js +0 -23
- package/dist/components/Text.js +0 -26
- package/dist/components/ThemeProvider.d.ts +0 -30
- package/dist/components/ThemeProvider.d.ts.map +0 -1
- package/dist/components/ThemeProvider.js +0 -196
- package/dist/components/Timeline.js +0 -46
- package/dist/components/ToggleSwitch.js +0 -13
- package/dist/components/Token.js +0 -36
- package/dist/components/Tooltip.js +0 -13
- package/dist/components/Truncate.js +0 -11
- package/dist/components/UnderlineNav.js +0 -43
- package/dist/components/UnderlinePanels.js +0 -27
- package/dist/components/deprecated/ActionList.js +0 -48
- package/dist/components/deprecated/DialogV1.js +0 -44
- package/dist/components/deprecated/Octicon.js +0 -39
- package/dist/components/deprecated/TabNav.js +0 -44
- package/dist/components/deprecated/Tooltip.js +0 -31
|
@@ -1,7 +1,44 @@
|
|
|
1
|
-
import { PageHeader as PageHeader$1, sx,
|
|
2
|
-
import
|
|
3
|
-
import React from 'react';
|
|
1
|
+
import { Dialog as Dialog$1, Box, PageHeader as PageHeader$1, sx, Tooltip as Tooltip$1 } from '@primer/react';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
4
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
|
|
6
|
+
const DialogImpl = /*#__PURE__*/forwardRef(function Dialog(props, ref) {
|
|
7
|
+
// @ts-expect-error - PrimerDialog is not recognized as a valid component type
|
|
8
|
+
return /*#__PURE__*/jsx(Box, {
|
|
9
|
+
as: Dialog$1,
|
|
10
|
+
ref: ref,
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
const DialogHeader = /*#__PURE__*/forwardRef(function DialogHeader(props, ref) {
|
|
15
|
+
return /*#__PURE__*/jsx(Box, {
|
|
16
|
+
as: Dialog$1.Header,
|
|
17
|
+
ref: ref,
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
const DialogBody = /*#__PURE__*/forwardRef(function DialogBody(props, ref) {
|
|
22
|
+
// @ts-expect-error - PrimerDialog.Body is not recognized as a valid component type
|
|
23
|
+
return /*#__PURE__*/jsx(Box, {
|
|
24
|
+
as: Dialog$1.Body,
|
|
25
|
+
ref: ref,
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
const DialogFooter = /*#__PURE__*/forwardRef(function DialogFooter(props, ref) {
|
|
30
|
+
return /*#__PURE__*/jsx(Box, {
|
|
31
|
+
as: Dialog$1.Footer,
|
|
32
|
+
ref: ref,
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
const Dialog = Object.assign(DialogImpl, {
|
|
37
|
+
Buttons: Dialog$1.Buttons,
|
|
38
|
+
Header: DialogHeader,
|
|
39
|
+
Body: DialogBody,
|
|
40
|
+
Footer: DialogFooter
|
|
41
|
+
});
|
|
5
42
|
|
|
6
43
|
const StyledPageHeader = styled(PageHeader$1).withConfig({
|
|
7
44
|
shouldForwardProp: prop => prop !== 'sx'
|
|
@@ -104,4 +141,12 @@ const PageHeader = Object.assign(PageHeaderImpl, {
|
|
|
104
141
|
TrailingAction: PageHeader$1.TrailingAction
|
|
105
142
|
});
|
|
106
143
|
|
|
107
|
-
|
|
144
|
+
const Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, ref) {
|
|
145
|
+
return /*#__PURE__*/jsx(Box, {
|
|
146
|
+
as: Tooltip$1,
|
|
147
|
+
ref: ref,
|
|
148
|
+
...props
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
export { Dialog as D, PageHeader as P, Tooltip as T };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ButtonProps as PrimerButtonProps } from '@primer/react';
|
|
2
|
+
import type { SxProp } from '../sx';
|
|
3
|
+
import type { BetterSystemStyleObject } from '../styled-props';
|
|
4
|
+
import type { ForwardRefComponent } from '../polymorphic';
|
|
5
|
+
type ButtonComponentProps = PrimerButtonProps & SxProp & {
|
|
6
|
+
as?: React.ElementType;
|
|
7
|
+
};
|
|
8
|
+
declare const ButtonComponent: ForwardRefComponent<"button", ButtonComponentProps>;
|
|
9
|
+
export declare function generateCustomSxProp(props: Partial<Pick<PrimerButtonProps, 'size' | 'block' | 'leadingVisual' | 'trailingVisual' | 'trailingAction'>>, providedSx: BetterSystemStyleObject): {
|
|
10
|
+
[key: string]: BetterSystemStyleObject;
|
|
11
|
+
};
|
|
12
|
+
export { ButtonComponent, type ButtonComponentProps };
|
|
13
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,WAAW,IAAI,iBAAiB,EAAC,MAAM,eAAe,CAAA;AAC3F,OAAO,KAAK,EAAC,MAAM,EAAsB,MAAM,OAAO,CAAA;AACtD,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,iBAAiB,CAAA;AAG5D,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAEvD,KAAK,oBAAoB,GAAG,iBAAiB,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAC,CAAA;AAoBjF,QAAA,MAAM,eAAe,EAEf,mBAAmB,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAA;AA0CzD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,GAAG,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,CAAC,CAAC,EACjH,UAAU,EAAE,uBAAuB;;EAmBpC;AAID,OAAO,EAAC,eAAe,EAAE,KAAK,oBAAoB,EAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type IconButtonProps as PrimerIconButtonProps, type SxProp } from '@primer/react';
|
|
2
|
+
import { type ForwardRefComponent } from '../polymorphic';
|
|
3
|
+
type IconButtonProps = PrimerIconButtonProps & SxProp & {
|
|
4
|
+
as?: React.ElementType;
|
|
5
|
+
};
|
|
6
|
+
declare const IconButton: ForwardRefComponent<"a" | "button", IconButtonProps>;
|
|
7
|
+
export { IconButton };
|
|
8
|
+
export type { IconButtonProps };
|
|
9
|
+
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/components/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,eAAe,IAAI,qBAAqB,EAAE,KAAK,MAAM,EAAC,MAAM,eAAe,CAAA;AACxH,OAAO,EAAC,KAAK,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAKvD,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAC,CAAA;AAahF,QAAA,MAAM,UAAU,EAEV,mBAAmB,CAAC,GAAG,GAAG,QAAQ,EAAE,eAAe,CAAC,CAAA;AAE1D,OAAO,EAAC,UAAU,EAAC,CAAA;AACnB,YAAY,EAAC,eAAe,EAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../src/components/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,IAAI,gBAAgB,EAC9B,KAAK,eAAe,IAAI,qBAAqB,EAC7C,KAAK,oBAAoB,IAAI,0BAA0B,EACvD,KAAK,sBAAsB,IAAI,4BAA4B,EAC3D,KAAK,wBAAwB,IAAI,8BAA8B,EAChE,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../src/components/PageHeader.tsx"],"names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AAO,gBAAgB,CAAC,kBAAkB,CAAA;IAC9D,aAAa,EAAE,OAAO,gBAAgB,CAAC,aAAa,CAAA;IACpD,WAAW,EAAE,OAAO,gBAAgB,CAAC,WAAW,CAAA;IAChD,aAAa,EAAE,OAAO,gBAAgB,CAAC,aAAa,CAAA;IACpD,KAAK,EAAE,OAAO,eAAe,CAAA;IAC7B,cAAc,EAAE,OAAO,gBAAgB,CAAC,cAAc,CAAA;IACtD,WAAW,EAAE,OAAO,gBAAgB,CAAC,WAAW,CAAA;IAChD,cAAc,EAAE,OAAO,gBAAgB,CAAC,cAAc,CAAA;CACvD,CAAA;AAED,QAAA,MAAM,UAAU,EAAE,uBAchB,CAAA;AAEF,OAAO,EAAC,UAAU,EAAC,CAAA;AACnB,YAAY,EAAC,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,EAAC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type TextInputProps as PrimerTextInputProps, type TextInputActionProps as PrimerTextInputActionProps } from '@primer/react';
|
|
2
|
+
import type { SxProp } from '../sx';
|
|
3
|
+
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
export type TextInputProps = PrimerTextInputProps & SxProp & {
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
};
|
|
7
|
+
export type TextInputActionProps = PrimerTextInputActionProps & SxProp;
|
|
8
|
+
declare const TextInputAction: ForwardRefExoticComponent<Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "size" | "aria-label" | "tooltipDirection"> & {
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
"aria-label"?: string;
|
|
11
|
+
tooltipDirection?: "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw";
|
|
12
|
+
icon?: React.FunctionComponent<React.PropsWithChildren<import("@primer/octicons-react").IconProps>>;
|
|
13
|
+
variant?: import("@primer/react").ButtonProps["variant"];
|
|
14
|
+
} & SxProp & RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
type TextInputComposite = ForwardRefExoticComponent<TextInputProps & RefAttributes<HTMLInputElement>> & {
|
|
16
|
+
Action: typeof TextInputAction;
|
|
17
|
+
};
|
|
18
|
+
export declare const TextInput: TextInputComposite;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../src/components/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,IAAI,oBAAoB,EAC3C,KAAK,oBAAoB,IAAI,0BAA0B,EACxD,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AACjC,OAAO,KAAK,EAAC,yBAAyB,EAAE,aAAa,EAAC,MAAM,OAAO,CAAA;AAEnE,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAC,CAAA;AACrF,MAAM,MAAM,oBAAoB,GAAG,0BAA0B,GAAG,MAAM,CAAA;AAUtE,QAAA,MAAM,eAAe;;;;;;8CAEnB,CAAA;AAEF,KAAK,kBAAkB,GAAG,yBAAyB,CAAC,cAAc,GAAG,aAAa,CAAC,gBAAgB,CAAC,CAAC,GAAG;IACtG,MAAM,EAAE,OAAO,eAAe,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,kBAEtB,CAAA"}
|
package/dist/components.json
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
"ActionMenu",
|
|
5
5
|
"Autocomplete",
|
|
6
6
|
"Avatar",
|
|
7
|
-
"BaseStyles",
|
|
8
7
|
"Box",
|
|
9
8
|
"Breadcrumb",
|
|
10
9
|
"Breadcrumbs",
|
|
@@ -65,6 +64,7 @@
|
|
|
65
64
|
"BoxProps",
|
|
66
65
|
"BreadcrumbsItemProps",
|
|
67
66
|
"BreadcrumbsProps",
|
|
67
|
+
"ButtonProps",
|
|
68
68
|
"CheckboxGroupProps",
|
|
69
69
|
"CheckboxProps",
|
|
70
70
|
"CounterLabelProps",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"DialogHeaderProps",
|
|
73
73
|
"DialogProps",
|
|
74
74
|
"HeaderProps",
|
|
75
|
+
"IconButtonProps",
|
|
75
76
|
"LabelProps",
|
|
76
77
|
"LinkButtonProps",
|
|
77
78
|
"LinkProps",
|
|
@@ -102,6 +103,7 @@
|
|
|
102
103
|
"TableTitleProps",
|
|
103
104
|
"TabNavLinkProps",
|
|
104
105
|
"TabNavProps",
|
|
106
|
+
"TextInputActionProps",
|
|
105
107
|
"TextInputProps",
|
|
106
108
|
"TextProps",
|
|
107
109
|
"TimelineBadgeProps",
|
package/dist/deprecated.js
CHANGED
|
@@ -1,5 +1,179 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { TabNav as TabNav$1, Dialog as Dialog$1, Octicon as Octicon$1, Tooltip as Tooltip$1, ActionList as ActionList$1 } from '@primer/react/deprecated';
|
|
2
|
+
import { sx, Box } from '@primer/react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
const StyledTabNav = styled(TabNav$1).withConfig({
|
|
8
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
9
|
+
}).withConfig({
|
|
10
|
+
displayName: "TabNav__StyledTabNav",
|
|
11
|
+
componentId: "sc-13kad3t-0"
|
|
12
|
+
})(["", ""], sx);
|
|
13
|
+
const TabNavImpl = ({
|
|
14
|
+
as,
|
|
15
|
+
...props
|
|
16
|
+
}) => {
|
|
17
|
+
return /*#__PURE__*/jsx(StyledTabNav, {
|
|
18
|
+
...props,
|
|
19
|
+
...(as ? {
|
|
20
|
+
forwardedAs: as
|
|
21
|
+
} : {})
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const StyledTabNavLink = styled(TabNav$1.Link).withConfig({
|
|
25
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
26
|
+
}).withConfig({
|
|
27
|
+
displayName: "TabNav__StyledTabNavLink",
|
|
28
|
+
componentId: "sc-13kad3t-1"
|
|
29
|
+
})(["", ""], sx);
|
|
30
|
+
const TabNavLink = /*#__PURE__*/forwardRef(({
|
|
31
|
+
as,
|
|
32
|
+
...props
|
|
33
|
+
}, ref) => /*#__PURE__*/jsx(StyledTabNavLink, {
|
|
34
|
+
...props,
|
|
35
|
+
...(as ? {
|
|
36
|
+
forwardedAs: as
|
|
37
|
+
} : {}),
|
|
38
|
+
ref: ref
|
|
39
|
+
}));
|
|
40
|
+
const TabNav = Object.assign(TabNavImpl, {
|
|
41
|
+
Link: TabNavLink
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const StyledDialog = /*#__PURE__*/forwardRef(function Dialog(props, ref) {
|
|
45
|
+
return /*#__PURE__*/jsx(Box, {
|
|
46
|
+
as: Dialog$1,
|
|
47
|
+
ref: ref,
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
const DialogImpl = /*#__PURE__*/forwardRef(({
|
|
52
|
+
as,
|
|
53
|
+
...props
|
|
54
|
+
}, ref) => /*#__PURE__*/jsx(StyledDialog, {
|
|
55
|
+
...props,
|
|
56
|
+
...(as ? {
|
|
57
|
+
forwardedAs: as
|
|
58
|
+
} : {}),
|
|
59
|
+
ref: ref
|
|
60
|
+
}));
|
|
61
|
+
const StyledDialogHeader = /*#__PURE__*/forwardRef(function DialogHeader(props, ref) {
|
|
62
|
+
return /*#__PURE__*/jsx(Box, {
|
|
63
|
+
as: Dialog$1.Header,
|
|
64
|
+
ref: ref,
|
|
65
|
+
...props
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
const DialogHeader = /*#__PURE__*/forwardRef(({
|
|
69
|
+
as,
|
|
70
|
+
...props
|
|
71
|
+
}, ref) => /*#__PURE__*/jsx(StyledDialogHeader, {
|
|
72
|
+
...props,
|
|
73
|
+
...(as ? {
|
|
74
|
+
forwardedAs: as
|
|
75
|
+
} : {}),
|
|
76
|
+
ref: ref
|
|
77
|
+
}));
|
|
78
|
+
const Dialog = Object.assign(DialogImpl, {
|
|
79
|
+
Header: DialogHeader
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Use the icon component directly from `@primer/octicons-react` instead
|
|
84
|
+
*/
|
|
85
|
+
const StyledOcticon = styled(Octicon$1).withConfig({
|
|
86
|
+
shouldForwardProp(prop) {
|
|
87
|
+
return prop !== 'sx';
|
|
88
|
+
}
|
|
89
|
+
}).withConfig({
|
|
90
|
+
displayName: "Octicon__StyledOcticon",
|
|
91
|
+
componentId: "sc-jtj3m8-0"
|
|
92
|
+
})(["", ""], ({
|
|
93
|
+
color,
|
|
94
|
+
sx: sxProp
|
|
95
|
+
}) => sx({
|
|
96
|
+
sx: {
|
|
97
|
+
color,
|
|
98
|
+
...sxProp
|
|
99
|
+
}
|
|
100
|
+
}));
|
|
101
|
+
const Octicon = /*#__PURE__*/forwardRef(({
|
|
102
|
+
as,
|
|
103
|
+
...props
|
|
104
|
+
}, ref) => {
|
|
105
|
+
return /*#__PURE__*/jsx(StyledOcticon, {
|
|
106
|
+
...props,
|
|
107
|
+
...(as ? {
|
|
108
|
+
forwardedAs: as
|
|
109
|
+
} : {}),
|
|
110
|
+
ref: ref
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const StyledTooltip = styled(Tooltip$1).withConfig({
|
|
115
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
116
|
+
}).withConfig({
|
|
117
|
+
displayName: "Tooltip__StyledTooltip",
|
|
118
|
+
componentId: "sc-145jcib-0"
|
|
119
|
+
})(["", ""], sx);
|
|
120
|
+
const TooltipImpl = /*#__PURE__*/forwardRef(function Tooltip({
|
|
121
|
+
as,
|
|
122
|
+
...props
|
|
123
|
+
}, ref) {
|
|
124
|
+
return /*#__PURE__*/jsx(StyledTooltip, {
|
|
125
|
+
...props,
|
|
126
|
+
...(as ? {
|
|
127
|
+
forwardedAs: as
|
|
128
|
+
} : {}),
|
|
129
|
+
ref: ref
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
const Tooltip = TooltipImpl;
|
|
133
|
+
|
|
134
|
+
// Preserve static properties from the original component
|
|
135
|
+
Tooltip.alignments = Tooltip$1.alignments;
|
|
136
|
+
Tooltip.directions = Tooltip$1.directions;
|
|
137
|
+
|
|
138
|
+
const ActionListImpl = /*#__PURE__*/forwardRef(function ActionList(props, ref) {
|
|
139
|
+
return /*#__PURE__*/jsx(Box, {
|
|
140
|
+
as: ActionList$1,
|
|
141
|
+
ref: ref,
|
|
142
|
+
...props
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
const StyledActionListItem = styled(ActionList$1.Item).withConfig({
|
|
146
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
147
|
+
}).withConfig({
|
|
148
|
+
displayName: "ActionList__StyledActionListItem",
|
|
149
|
+
componentId: "sc-1ugfmds-0"
|
|
150
|
+
})(["", ""], sx);
|
|
151
|
+
const ActionListItem = /*#__PURE__*/forwardRef(({
|
|
152
|
+
as,
|
|
153
|
+
...props
|
|
154
|
+
}, ref) => /*#__PURE__*/jsx(StyledActionListItem, {
|
|
155
|
+
...props,
|
|
156
|
+
...(as ? {
|
|
157
|
+
forwardedAs: as
|
|
158
|
+
} : {}),
|
|
159
|
+
ref: ref
|
|
160
|
+
}));
|
|
161
|
+
function ActionListGroup(props) {
|
|
162
|
+
return /*#__PURE__*/jsx(Box, {
|
|
163
|
+
as: ActionList$1.Group,
|
|
164
|
+
...props
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
function ActionListDivider(props) {
|
|
168
|
+
return /*#__PURE__*/jsx(Box, {
|
|
169
|
+
as: ActionList$1.Divider,
|
|
170
|
+
...props
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
const ActionList = Object.assign(ActionListImpl, {
|
|
174
|
+
Item: ActionListItem,
|
|
175
|
+
Group: ActionListGroup,
|
|
176
|
+
Divider: ActionListDivider
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
export { ActionList, Dialog, Octicon, TabNav, Tooltip };
|
package/dist/experimental.js
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
|
-
export { Dialog } from './
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export { D as Dialog, P as PageHeader, T as Tooltip } from './Tooltip-DIHgr01r.js';
|
|
2
|
+
import { UnderlinePanels as UnderlinePanels$1, Table as Table$1 } from '@primer/react/experimental';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { sx } from '@primer/react';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
import 'react';
|
|
7
|
+
|
|
8
|
+
const StyledUnderlinePanels = styled(UnderlinePanels$1).withConfig({
|
|
9
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
10
|
+
}).withConfig({
|
|
11
|
+
displayName: "UnderlinePanels__StyledUnderlinePanels",
|
|
12
|
+
componentId: "sc-1w35i85-0"
|
|
13
|
+
})(["", ""], sx);
|
|
14
|
+
|
|
15
|
+
// @ts-ignore forwardedAs is valid here but I don't know how to fix the typescript error
|
|
16
|
+
const UnderlinePanelsImpl = ({
|
|
17
|
+
as,
|
|
18
|
+
...props
|
|
19
|
+
}) => /*#__PURE__*/jsx(StyledUnderlinePanels, {
|
|
20
|
+
forwardedAs: as,
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
UnderlinePanelsImpl.displayName = 'UnderlinePanels';
|
|
24
|
+
const UnderlinePanels = Object.assign(UnderlinePanelsImpl, {
|
|
25
|
+
Tab: UnderlinePanels$1.Tab,
|
|
26
|
+
Panel: UnderlinePanels$1.Panel
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const {
|
|
30
|
+
Container: PrimerDataTableContainer,
|
|
31
|
+
...rest
|
|
32
|
+
} = Table$1;
|
|
33
|
+
const StyleDataTableContainer = styled(PrimerDataTableContainer).withConfig({
|
|
34
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
35
|
+
}).withConfig({
|
|
36
|
+
displayName: "DataTable__StyleDataTableContainer",
|
|
37
|
+
componentId: "sc-qy1ey2-0"
|
|
38
|
+
})(["", ""], sx);
|
|
39
|
+
function DataTableContainer({
|
|
40
|
+
as,
|
|
41
|
+
...rest
|
|
42
|
+
}) {
|
|
43
|
+
return /*#__PURE__*/jsx(StyleDataTableContainer, {
|
|
44
|
+
...rest,
|
|
45
|
+
...(as ? {
|
|
46
|
+
forwardedAs: as
|
|
47
|
+
} : {})
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
const Table = Object.assign(Table$1, {
|
|
51
|
+
Container: DataTableContainer,
|
|
52
|
+
...rest
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export { Table, UnderlinePanels };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
export { Box, type BoxProps } from './components/Box';
|
|
2
|
-
export { Button } from '@primer/react';
|
|
3
2
|
export { Details } from '@primer/react';
|
|
4
3
|
export { FormControl } from '@primer/react';
|
|
5
|
-
export { IconButton } from '@primer/react';
|
|
6
4
|
export { ProgressBar } from '@primer/react';
|
|
7
5
|
export { Select } from '@primer/react';
|
|
8
6
|
export { Textarea } from '@primer/react';
|
|
9
|
-
export {
|
|
10
|
-
export { type TextInputProps } from '@primer/react';
|
|
11
|
-
export { ThemeProvider } from './components/ThemeProvider';
|
|
12
|
-
export { BaseStyles } from './components/BaseStyles';
|
|
7
|
+
export { ThemeProvider } from '@primer/react';
|
|
13
8
|
export { merge } from '@primer/react';
|
|
14
9
|
export { theme } from '@primer/react';
|
|
15
10
|
export { themeGet } from '@primer/react';
|
|
@@ -20,6 +15,7 @@ export { ActionMenu } from './components/ActionMenu';
|
|
|
20
15
|
export { Autocomplete, type AutocompleteOverlayProps } from './components/Autocomplete';
|
|
21
16
|
export { Avatar, type AvatarProps } from './components/Avatar';
|
|
22
17
|
export { Breadcrumbs, Breadcrumb, type BreadcrumbsProps, type BreadcrumbsItemProps } from './components/Breadcrumbs';
|
|
18
|
+
export { ButtonComponent as Button, type ButtonComponentProps as ButtonProps } from './components/Button';
|
|
23
19
|
export { Checkbox, type CheckboxProps } from './components/Checkbox';
|
|
24
20
|
export { CheckboxGroup, type CheckboxGroupProps } from './components/CheckboxGroup';
|
|
25
21
|
export { CircleBadge } from './components/CircleBadge';
|
|
@@ -28,6 +24,7 @@ export { Dialog, type DialogProps } from './components/Dialog';
|
|
|
28
24
|
export { Flash } from './components/Flash';
|
|
29
25
|
export { Header, type HeaderProps } from './components/Header';
|
|
30
26
|
export { Heading } from './components/Heading';
|
|
27
|
+
export { IconButton, type IconButtonProps } from './components/IconButton';
|
|
31
28
|
export { Label, type LabelProps } from './components/Label';
|
|
32
29
|
export { Link, type LinkProps } from './components/Link';
|
|
33
30
|
export { LinkButton, type LinkButtonProps } from './components/LinkButton';
|
|
@@ -42,6 +39,7 @@ export { Spinner, type SpinnerProps } from './components/Spinner';
|
|
|
42
39
|
export { StateLabel, type StateLabelProps } from './components/StateLabel';
|
|
43
40
|
export { SubNav, type SubNavProps, type SubNavLinkProps } from './components/SubNav';
|
|
44
41
|
export { Text, type TextProps } from './components/Text';
|
|
42
|
+
export { TextInput, type TextInputProps, type TextInputActionProps } from './components/TextInput';
|
|
45
43
|
export { Timeline, type TimelineProps, type TimelineItemProps, type TimelineBadgeProps, type TimelineBodyProps, type TimelineBreakProps, } from './components/Timeline';
|
|
46
44
|
export { ToggleSwitch, type ToggleSwitchProps } from './components/ToggleSwitch';
|
|
47
45
|
export { Tooltip, type TooltipProps } from './components/Tooltip';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,KAAK,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAA;AACrC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AACzC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AACzC,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAA;AACpC,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAA;AAGtC,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAA;AACnC,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAA;AACnC,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAA;AACtC,OAAO,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAA;AAEtC,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,GACnC,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAC,UAAU,EAAC,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAC,YAAY,EAAE,KAAK,wBAAwB,EAAC,MAAM,2BAA2B,CAAA;AACrF,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAC,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAC,WAAW,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,KAAK,oB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