@primer/styled-react 1.0.0-rc.7 → 1.0.0-rc.9
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/ActionList.d.ts +21 -13
- package/dist/components/ActionList.d.ts.map +1 -1
- package/dist/components/ActionList.js +162 -0
- package/dist/components/ActionMenu.d.ts +2 -2
- package/dist/components/ActionMenu.d.ts.map +1 -1
- package/dist/components/ActionMenu.js +18 -0
- package/dist/components/Autocomplete.d.ts +5 -3
- package/dist/components/Autocomplete.d.ts.map +1 -1
- package/dist/components/Autocomplete.js +24 -0
- package/dist/components/Avatar.js +14 -0
- package/dist/components/BaseStyles.d.ts +17 -0
- package/dist/components/BaseStyles.d.ts.map +1 -0
- package/dist/components/BaseStyles.js +51 -0
- package/dist/components/Box.d.ts +18 -1
- package/dist/components/Box.d.ts.map +1 -1
- package/dist/components/Box.js +15 -0
- package/dist/components/Breadcrumbs.js +37 -0
- package/dist/components/Button.d.ts +13 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/Button.js +111 -0
- package/dist/components/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox.js +15 -0
- package/dist/components/CheckboxGroup.d.ts +16 -4
- package/dist/components/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/CheckboxGroup.js +43 -0
- package/dist/components/CircleBadge.js +11 -0
- package/dist/components/CounterLabel.js +14 -0
- package/dist/components/DataTable.js +32 -0
- package/dist/components/Dialog.js +43 -0
- package/dist/components/FeatureFlaggedTheming.d.ts +9 -0
- package/dist/components/FeatureFlaggedTheming.d.ts.map +1 -0
- package/dist/components/FeatureFlaggedTheming.js +54 -0
- package/dist/components/Flash.js +11 -0
- package/dist/components/FormControl.d.ts +12 -0
- package/dist/components/FormControl.d.ts.map +1 -0
- package/dist/components/FormControl.js +18 -0
- package/dist/components/Header.js +52 -0
- package/dist/components/Heading.js +11 -0
- package/dist/components/IconButton.d.ts +9 -0
- package/dist/components/IconButton.d.ts.map +1 -0
- package/dist/components/IconButton.js +39 -0
- package/dist/components/Label.js +25 -0
- package/dist/components/Link.js +25 -0
- package/dist/components/LinkButton.js +11 -0
- package/dist/components/NavList.d.ts +25 -20
- package/dist/components/NavList.d.ts.map +1 -1
- package/dist/components/NavList.js +73 -0
- package/dist/components/Overlay.js +11 -0
- package/dist/components/PageHeader.d.ts.map +1 -1
- package/dist/{PageHeader-DCDIR2C1.js → components/PageHeader.js} +5 -41
- package/dist/components/PageLayout.d.ts +15 -10
- package/dist/components/PageLayout.d.ts.map +1 -1
- package/dist/components/PageLayout.js +42 -0
- package/dist/components/RadioGroup.d.ts +16 -4
- package/dist/components/RadioGroup.d.ts.map +1 -1
- package/dist/components/RadioGroup.js +43 -0
- package/dist/components/RelativeTime.d.ts.map +1 -1
- package/dist/components/RelativeTime.js +14 -0
- package/dist/components/SegmentedControl.d.ts +9 -2
- package/dist/components/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl.js +31 -0
- package/dist/components/Select.d.ts +8 -0
- package/dist/components/Select.d.ts.map +1 -0
- package/dist/components/Select.js +23 -0
- package/dist/components/Spinner.js +11 -0
- package/dist/components/StateLabel.js +14 -0
- package/dist/components/SubNav.d.ts +1 -0
- package/dist/components/SubNav.d.ts.map +1 -1
- package/dist/components/SubNav.js +26 -0
- package/dist/components/Text.d.ts +11 -3
- package/dist/components/Text.d.ts.map +1 -1
- package/dist/components/Text.js +25 -0
- package/dist/components/TextInput.d.ts +15 -0
- package/dist/components/TextInput.d.ts.map +1 -0
- package/dist/components/TextInput.js +37 -0
- package/dist/components/Textarea.d.ts +9 -0
- package/dist/components/Textarea.d.ts.map +1 -0
- package/dist/components/Textarea.js +25 -0
- package/dist/components/ThemeProvider.d.ts +30 -0
- package/dist/components/ThemeProvider.d.ts.map +1 -0
- package/dist/components/ThemeProvider.js +202 -0
- package/dist/components/Timeline.js +47 -0
- package/dist/components/ToggleSwitch.js +14 -0
- package/dist/components/Token.js +25 -0
- package/dist/components/Tooltip.d.ts +2 -6
- package/dist/components/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip.js +15 -0
- package/dist/components/Truncate.js +11 -0
- package/dist/components/UnderlineNav.js +44 -0
- package/dist/components/UnderlinePanels.d.ts +7 -5
- package/dist/components/UnderlinePanels.d.ts.map +1 -1
- package/dist/components/UnderlinePanels.js +28 -0
- package/dist/components/deprecated/ActionList.js +49 -0
- package/dist/components/deprecated/DialogV1.js +44 -0
- package/dist/components/deprecated/Octicon.js +39 -0
- package/dist/components/deprecated/TabNav.js +44 -0
- package/dist/components/deprecated/Tooltip.d.ts.map +1 -1
- package/dist/components/deprecated/Tooltip.js +32 -0
- package/dist/components.json +29 -0
- package/dist/deprecated.d.ts +5 -4
- package/dist/deprecated.d.ts.map +1 -1
- package/dist/deprecated.js +5 -84
- package/dist/experimental.d.ts +1 -1
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +5 -32
- package/dist/index.d.ts +9 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +43 -511
- package/dist/sx.d.ts +3 -0
- package/dist/sx.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/Tooltip-DIHgr01r.js +0 -152
- package/dist/Tooltip-YuSlJ5b_.js +0 -20
- package/dist/components/DialogV1.d.ts +0 -11
- package/dist/components/DialogV1.d.ts.map +0 -1
- package/dist/components/TabNav.d.ts +0 -9
- package/dist/components/TabNav.d.ts.map +0 -1
package/dist/Tooltip-DIHgr01r.js
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
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';
|
|
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
|
-
});
|
|
42
|
-
|
|
43
|
-
const StyledPageHeader = styled(PageHeader$1).withConfig({
|
|
44
|
-
shouldForwardProp: prop => prop !== 'sx'
|
|
45
|
-
}).withConfig({
|
|
46
|
-
displayName: "PageHeader__StyledPageHeader",
|
|
47
|
-
componentId: "sc-1g9symn-0"
|
|
48
|
-
})(["", ""], sx);
|
|
49
|
-
const PageHeaderImpl = /*#__PURE__*/React.forwardRef(({
|
|
50
|
-
as,
|
|
51
|
-
...props
|
|
52
|
-
}, ref) => /*#__PURE__*/jsx(StyledPageHeader, {
|
|
53
|
-
...props,
|
|
54
|
-
...(as ? {
|
|
55
|
-
forwardedAs: as
|
|
56
|
-
} : {}),
|
|
57
|
-
ref: ref
|
|
58
|
-
}));
|
|
59
|
-
function PageHeaderActions({
|
|
60
|
-
sx,
|
|
61
|
-
...rest
|
|
62
|
-
}) {
|
|
63
|
-
const style = {};
|
|
64
|
-
if (sx) {
|
|
65
|
-
// @ts-ignore sx has height attribute
|
|
66
|
-
const {
|
|
67
|
-
height
|
|
68
|
-
} = sx;
|
|
69
|
-
if (height) {
|
|
70
|
-
style['--custom-height'] = height;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// @ts-expect-error type mismatch between Box usage here and PrimerPageHeader.Actions
|
|
75
|
-
return /*#__PURE__*/jsx(Box, {
|
|
76
|
-
...rest,
|
|
77
|
-
as: PageHeader$1.Actions,
|
|
78
|
-
style: style,
|
|
79
|
-
sx: sx
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
function StyledPageHeaderTitle({
|
|
83
|
-
sx,
|
|
84
|
-
...rest
|
|
85
|
-
}) {
|
|
86
|
-
const style = {};
|
|
87
|
-
if (sx) {
|
|
88
|
-
// @ts-ignore sx can have color attribute
|
|
89
|
-
const {
|
|
90
|
-
fontSize,
|
|
91
|
-
lineHeight,
|
|
92
|
-
fontWeight
|
|
93
|
-
} = sx;
|
|
94
|
-
if (fontSize) {
|
|
95
|
-
style['--custom-font-size'] = fontSize;
|
|
96
|
-
}
|
|
97
|
-
if (lineHeight) {
|
|
98
|
-
style['--custom-line-height'] = lineHeight;
|
|
99
|
-
}
|
|
100
|
-
if (fontWeight) {
|
|
101
|
-
style['--custom-font-weight'] = fontWeight;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// @ts-expect-error type mismatch between Box usage here and PrimerPageHeader.Title
|
|
106
|
-
return /*#__PURE__*/jsx(Box, {
|
|
107
|
-
...rest,
|
|
108
|
-
as: PageHeader$1.Title,
|
|
109
|
-
style: style,
|
|
110
|
-
sx: sx
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
const PageHeaderTitle = ({
|
|
114
|
-
as,
|
|
115
|
-
...props
|
|
116
|
-
}) => /*#__PURE__*/jsx(StyledPageHeaderTitle, {
|
|
117
|
-
...props,
|
|
118
|
-
...(as ? {
|
|
119
|
-
forwardedAs: as
|
|
120
|
-
} : {})
|
|
121
|
-
});
|
|
122
|
-
const PageHeaderTitleArea = styled(PageHeader$1.TitleArea).withConfig({
|
|
123
|
-
shouldForwardProp: prop => prop !== 'sx'
|
|
124
|
-
}).withConfig({
|
|
125
|
-
displayName: "PageHeader__PageHeaderTitleArea",
|
|
126
|
-
componentId: "sc-1g9symn-1"
|
|
127
|
-
})(["", ""], sx);
|
|
128
|
-
const PageHeader = Object.assign(PageHeaderImpl, {
|
|
129
|
-
Actions: PageHeaderActions,
|
|
130
|
-
ContextArea: PageHeader$1.ContextArea,
|
|
131
|
-
ParentLink: PageHeader$1.ParentLink,
|
|
132
|
-
ContextBar: PageHeader$1.ContextBar,
|
|
133
|
-
TitleArea: PageHeaderTitleArea,
|
|
134
|
-
ContextAreaActions: PageHeader$1.ContextAreaActions,
|
|
135
|
-
LeadingAction: PageHeader$1.LeadingAction,
|
|
136
|
-
Breadcrumbs: PageHeader$1.Breadcrumbs,
|
|
137
|
-
LeadingVisual: PageHeader$1.LeadingVisual,
|
|
138
|
-
Title: PageHeaderTitle,
|
|
139
|
-
TrailingVisual: PageHeader$1.TrailingVisual,
|
|
140
|
-
Description: PageHeader$1.Description,
|
|
141
|
-
TrailingAction: PageHeader$1.TrailingAction
|
|
142
|
-
});
|
|
143
|
-
|
|
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 };
|
package/dist/Tooltip-YuSlJ5b_.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Box, Tooltip as Tooltip$1 } from '@primer/react';
|
|
2
|
-
import { Tooltip as Tooltip$2 } from '@primer/react/deprecated';
|
|
3
|
-
import { forwardRef } from 'react';
|
|
4
|
-
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
const Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, ref) {
|
|
7
|
-
return /*#__PURE__*/jsx(Box, {
|
|
8
|
-
as: Tooltip$1,
|
|
9
|
-
ref: ref,
|
|
10
|
-
...props
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
function DeprecatedTooltip(props) {
|
|
14
|
-
return /*#__PURE__*/jsx(Box, {
|
|
15
|
-
as: Tooltip$2,
|
|
16
|
-
...props
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { DeprecatedTooltip as D, Tooltip as T };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { DialogProps as PrimerDialogProps, DialogHeaderProps as PrimerDialogHeaderProps } from '@primer/react/deprecated';
|
|
2
|
-
import type { SxProp } from '../sx';
|
|
3
|
-
import type { ForwardRefComponent } from '../polymorphic';
|
|
4
|
-
type DialogProps = PrimerDialogProps & SxProp;
|
|
5
|
-
type DialogHeaderProps = PrimerDialogHeaderProps & SxProp;
|
|
6
|
-
declare const Dialog: ForwardRefComponent<"div", DialogProps> & {
|
|
7
|
-
Header: ForwardRefComponent<"div", DialogHeaderProps>;
|
|
8
|
-
};
|
|
9
|
-
export { Dialog };
|
|
10
|
-
export type { DialogProps, DialogHeaderProps };
|
|
11
|
-
//# sourceMappingURL=DialogV1.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DialogV1.d.ts","sourceRoot":"","sources":["../../src/components/DialogV1.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,IAAI,iBAAiB,EAChC,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAEvD,KAAK,WAAW,GAAG,iBAAiB,GAAG,MAAM,CAAA;AAU7C,KAAK,iBAAiB,GAAG,uBAAuB,GAAG,MAAM,CAAA;AAUzD,QAAA,MAAM,MAAM;;CAEV,CAAA;AAEF,OAAO,EAAC,MAAM,EAAC,CAAA;AACf,YAAY,EAAC,WAAW,EAAE,iBAAiB,EAAC,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { TabNavProps as PrimerTabNavProps, TabNavLinkProps as PrimerTabNavLinkProps } from '@primer/react/deprecated';
|
|
2
|
-
import { type SxProp } from '../sx';
|
|
3
|
-
type TabNavProps = PrimerTabNavProps & SxProp;
|
|
4
|
-
type TabNavLinkProps = PrimerTabNavLinkProps & SxProp;
|
|
5
|
-
declare const TabNav: (({ as, ...props }: TabNavProps) => import("react").JSX.Element) & {
|
|
6
|
-
Link: import("react").ForwardRefExoticComponent<Omit<TabNavLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
7
|
-
};
|
|
8
|
-
export { TabNav, type TabNavProps, type TabNavLinkProps };
|
|
9
|
-
//# sourceMappingURL=TabNav.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TabNav.d.ts","sourceRoot":"","sources":["../../src/components/TabNav.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,WAAW,IAAI,iBAAiB,EAAE,eAAe,IAAI,qBAAqB,EAAC,MAAM,0BAA0B,CAAA;AACxH,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAIrC,KAAK,WAAW,GAAG,iBAAiB,GAAG,MAAM,CAAA;AAC7C,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,CAAA;AAsBrD,QAAA,MAAM,MAAM,sBAdwB,WAAW;;CAgB7C,CAAA;AAEF,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAC,CAAA"}
|