@primer/styled-react 0.0.0-20251007212126 → 0.0.0-20251007214543
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/Autocomplete.d.ts +4 -2
- package/dist/components/Autocomplete.d.ts.map +1 -1
- package/dist/components/Select.d.ts +8 -0
- package/dist/components/Select.d.ts.map +1 -0
- package/dist/components/TextInput.d.ts +20 -0
- package/dist/components/TextInput.d.ts.map +1 -0
- package/dist/components/Textarea.d.ts +9 -0
- package/dist/components/Textarea.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 +740 -37
- 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 };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { Autocomplete as PrimerAutocomplete, type AutocompleteOverlayProps as PrimerAutocompleteOverlayProps } from '@primer/react';
|
|
1
|
+
import { Autocomplete as PrimerAutocomplete, type AutocompleteOverlayProps as PrimerAutocompleteOverlayProps, type AutocompleteInputProps as PrimerAutocompleteInputProps } from '@primer/react';
|
|
2
2
|
import { type SxProp } from '../sx';
|
|
3
3
|
import type { ComponentProps } from 'react';
|
|
4
4
|
export type AutocompleteOverlayProps = PrimerAutocompleteOverlayProps & SxProp;
|
|
5
5
|
declare const AutocompleteOverlay: React.ComponentType<AutocompleteOverlayProps>;
|
|
6
|
+
export type AutocompleteInputProps = PrimerAutocompleteInputProps & SxProp;
|
|
7
|
+
declare const AutocompleteInput: React.ComponentType<AutocompleteInputProps>;
|
|
6
8
|
interface AutocompleteExport {
|
|
7
9
|
(props: ComponentProps<typeof PrimerAutocomplete>): React.ReactNode;
|
|
8
10
|
Context: typeof PrimerAutocomplete.Context;
|
|
9
|
-
Input: typeof
|
|
11
|
+
Input: typeof AutocompleteInput;
|
|
10
12
|
Menu: typeof PrimerAutocomplete.Menu;
|
|
11
13
|
Overlay: typeof AutocompleteOverlay;
|
|
12
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../src/components/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,IAAI,kBAAkB,EAClC,KAAK,wBAAwB,IAAI,8BAA8B,
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../src/components/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,IAAI,kBAAkB,EAClC,KAAK,wBAAwB,IAAI,8BAA8B,EAC/D,KAAK,sBAAsB,IAAI,4BAA4B,EAC5D,MAAM,eAAe,CAAA;AACtB,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAA;AAEzC,MAAM,MAAM,wBAAwB,GAAG,8BAA8B,GAAG,MAAM,CAAA;AAE9E,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,aAAa,CAAC,wBAAwB,CAMtE,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,GAAG,MAAM,CAAA;AAE1E,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,aAAa,CAAC,sBAAsB,CAIlE,CAAA;AAED,UAAU,kBAAkB;IAC1B,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,GAAG,KAAK,CAAC,SAAS,CAAA;IACnE,OAAO,EAAE,OAAO,kBAAkB,CAAC,OAAO,CAAA;IAC1C,KAAK,EAAE,OAAO,iBAAiB,CAAA;IAC/B,IAAI,EAAE,OAAO,kBAAkB,CAAC,IAAI,CAAA;IACpC,OAAO,EAAE,OAAO,mBAAmB,CAAA;CACpC;AAED,QAAA,MAAM,YAAY,EAAE,kBAKlB,CAAA;AAEF,OAAO,EAAC,YAAY,EAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type SelectProps as PrimerSelectProps } from '@primer/react';
|
|
2
|
+
import { type SxProp } from '../sx';
|
|
3
|
+
type SelectProps = PrimerSelectProps & SxProp & {
|
|
4
|
+
as?: React.ElementType;
|
|
5
|
+
};
|
|
6
|
+
declare const Select: ({ as, ...props }: SelectProps) => import("react").JSX.Element;
|
|
7
|
+
export { Select, type SelectProps };
|
|
8
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/components/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,WAAW,IAAI,iBAAiB,EAAC,MAAM,eAAe,CAAA;AAC3F,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAIrC,KAAK,WAAW,GAAG,iBAAiB,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAC,CAAA;AAOxE,QAAA,MAAM,MAAM,GAAI,kBAAgB,WAAW,gCAE1C,CAAA;AAED,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,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,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AACrC,OAAO,KAAK,EAAC,yBAAyB,EAAE,aAAa,EAAC,MAAM,OAAO,CAAA;AAInE,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;AAYtE,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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type TextareaProps as PrimerTextareaProps } from '@primer/react';
|
|
2
|
+
import { type SxProp } from '../sx';
|
|
3
|
+
import type { ForwardRefComponent } from '../polymorphic';
|
|
4
|
+
type TextareaProps = PrimerTextareaProps & SxProp & {
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
};
|
|
7
|
+
declare const Textarea: ForwardRefComponent<"textarea", TextareaProps>;
|
|
8
|
+
export { Textarea, type TextareaProps };
|
|
9
|
+
//# sourceMappingURL=Textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../src/components/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,aAAa,IAAI,mBAAmB,EAAC,MAAM,eAAe,CAAA;AAEnG,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AACrC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAGvD,KAAK,aAAa,GAAG,mBAAmB,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAC,CAAA;AAQ5E,QAAA,MAAM,QAAQ,EAER,mBAAmB,CAAC,UAAU,EAAE,aAAa,CAAC,CAAA;AAEpD,OAAO,EAAC,QAAQ,EAAE,KAAK,aAAa,EAAC,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",
|
|
@@ -86,6 +85,7 @@
|
|
|
86
85
|
"SegmentedControlButtonProps",
|
|
87
86
|
"SegmentedControlIconButtonProps",
|
|
88
87
|
"SegmentedControlProps",
|
|
88
|
+
"SelectProps",
|
|
89
89
|
"SpinnerProps",
|
|
90
90
|
"StateLabelProps",
|
|
91
91
|
"SubNavLinkProps",
|
|
@@ -102,6 +102,8 @@
|
|
|
102
102
|
"TableTitleProps",
|
|
103
103
|
"TabNavLinkProps",
|
|
104
104
|
"TabNavProps",
|
|
105
|
+
"TextareaProps",
|
|
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
|
@@ -4,12 +4,7 @@ export { Details } from '@primer/react';
|
|
|
4
4
|
export { FormControl } from '@primer/react';
|
|
5
5
|
export { IconButton } from '@primer/react';
|
|
6
6
|
export { ProgressBar } from '@primer/react';
|
|
7
|
-
export {
|
|
8
|
-
export { Textarea } from '@primer/react';
|
|
9
|
-
export { TextInput } from '@primer/react';
|
|
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';
|
|
@@ -38,10 +33,13 @@ export { PageHeader, type PageHeaderProps, type PageHeaderActionsProps, type Pag
|
|
|
38
33
|
export { RadioGroup, type RadioGroupProps } from './components/RadioGroup';
|
|
39
34
|
export { RelativeTime, type RelativeTimeProps } from './components/RelativeTime';
|
|
40
35
|
export { SegmentedControl, type SegmentedControlProps, type SegmentedControlButtonProps, type SegmentedControlIconButtonProps, } from './components/SegmentedControl';
|
|
36
|
+
export { Select, type SelectProps } from './components/Select';
|
|
41
37
|
export { Spinner, type SpinnerProps } from './components/Spinner';
|
|
42
38
|
export { StateLabel, type StateLabelProps } from './components/StateLabel';
|
|
43
39
|
export { SubNav, type SubNavProps, type SubNavLinkProps } from './components/SubNav';
|
|
44
40
|
export { Text, type TextProps } from './components/Text';
|
|
41
|
+
export { Textarea, type TextareaProps } from './components/Textarea';
|
|
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,MAAM,EAAC,MAAM,eAAe,CAAA;AACpC,OAAO,EAAC,OAAO,EAA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