@primer/styled-react 1.0.5 → 1.0.6-rc.872d71d82
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/ActionMenu.d.ts +1 -0
- package/dist/components/ActionMenu.d.ts.map +1 -1
- package/dist/components/ActionMenu.js +12 -2
- package/dist/components/DataTable.d.ts +1 -1
- package/dist/components/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable.js +11 -1
- package/dist/components.json +0 -4
- package/dist/experimental.d.ts +0 -21
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +0 -1
- package/dist/index.d.ts +0 -21
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/package.json +2 -2
- package/dist/components/PageHeader.d.ts +0 -31
- package/dist/components/PageHeader.d.ts.map +0 -1
- package/dist/components/PageHeader.js +0 -109
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ActionMenu as PrimerActionMenu, type SlotMarker } from '@primer/react';
|
|
2
2
|
import { type SxProp } from '../sx';
|
|
3
3
|
import type { ComponentProps } from 'react';
|
|
4
|
+
import type React from 'react';
|
|
4
5
|
type ActionMenuOverlayProps = ComponentProps<typeof PrimerActionMenu.Overlay> & SxProp;
|
|
5
6
|
declare const ActionMenuOverlay: React.ComponentType<ActionMenuOverlayProps> & SlotMarker;
|
|
6
7
|
export declare const ActionMenu: typeof PrimerActionMenu & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionMenu.d.ts","sourceRoot":"","sources":["../../src/components/ActionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,IAAI,gBAAgB,EAAE,KAAK,UAAU,EAAC,MAAM,eAAe,CAAA;AAC7E,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ActionMenu.d.ts","sourceRoot":"","sources":["../../src/components/ActionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,IAAI,gBAAgB,EAAE,KAAK,UAAU,EAAC,MAAM,eAAe,CAAA;AAC7E,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,KAAK,sBAAsB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,GAAG,MAAM,CAAA;AAEtF,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,aAAa,CAAC,sBAAsB,CAAC,GAAG,UAMtE,CAAA;AAUD,eAAO,MAAM,UAAU,EAAE,OAAO,gBAAgB,GAAG;IACjD,MAAM,EAAE,OAAO,gBAAgB,CAAC,MAAM,CAAA;IACtC,MAAM,EAAE,OAAO,gBAAgB,CAAC,MAAM,CAAA;IACtC,OAAO,EAAE,OAAO,iBAAiB,CAAA;IACjC,OAAO,EAAE,OAAO,gBAAgB,CAAC,OAAO,CAAA;CAMxC,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ActionMenu as ActionMenu$1 } from '@primer/react';
|
|
2
2
|
import { sx } from '../sx.js';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
5
|
|
|
5
6
|
const ActionMenuOverlay = styled(ActionMenu$1.Overlay).withConfig({
|
|
6
7
|
shouldForwardProp: prop => prop !== 'sx'
|
|
@@ -8,12 +9,21 @@ const ActionMenuOverlay = styled(ActionMenu$1.Overlay).withConfig({
|
|
|
8
9
|
displayName: "ActionMenu__ActionMenuOverlay",
|
|
9
10
|
componentId: "sc-w5s60e-0"
|
|
10
11
|
})(["", ""], sx);
|
|
11
|
-
|
|
12
|
+
ActionMenuOverlay.__SLOT__ = ActionMenu$1.Overlay.__SLOT__;
|
|
13
|
+
|
|
14
|
+
// Create a wrapper component to avoid mutating the original PrimerActionMenu
|
|
15
|
+
function ActionMenuRoot(props) {
|
|
16
|
+
return /*#__PURE__*/jsx(ActionMenu$1, {
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
ActionMenuRoot.displayName = 'ActionMenu';
|
|
21
|
+
ActionMenuRoot.__SLOT__ = ActionMenu$1.__SLOT__;
|
|
22
|
+
const ActionMenu = Object.assign(ActionMenuRoot, {
|
|
12
23
|
Button: ActionMenu$1.Button,
|
|
13
24
|
Anchor: ActionMenu$1.Anchor,
|
|
14
25
|
Overlay: ActionMenuOverlay,
|
|
15
26
|
Divider: ActionMenu$1.Divider
|
|
16
27
|
});
|
|
17
|
-
ActionMenuOverlay.__SLOT__ = ActionMenu$1.Overlay.__SLOT__;
|
|
18
28
|
|
|
19
29
|
export { ActionMenu };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Table as PrimerDataTable, type TableContainerProps } from '@primer/react/experimental';
|
|
2
2
|
import { type SxProp } from '../sx';
|
|
3
|
-
import
|
|
3
|
+
import React from 'react';
|
|
4
4
|
type DataTableContainerProps<As extends React.ElementType = 'div'> = TableContainerProps<As> & SxProp;
|
|
5
5
|
declare function DataTableContainer<As extends React.ElementType = 'div'>({ as, ...rest }: DataTableContainerProps<As>): React.JSX.Element;
|
|
6
6
|
declare const Table: typeof PrimerDataTable & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../src/components/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,IAAI,eAAe,EAAE,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../src/components/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,IAAI,eAAe,EAAE,KAAK,mBAAmB,EAAkB,MAAM,4BAA4B,CAAA;AAC9G,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,KAAK,uBAAuB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,IAAI,mBAAmB,CAAC,EAAE,CAAC,GAAG,MAAM,CAAA;AAYrG,iBAAS,kBAAkB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,EAAE,EAAC,EAAE,EAAE,GAAG,IAAI,EAAC,EAAE,uBAAuB,CAAC,EAAE,CAAC,qBAE3G;AAUD,QAAA,MAAM,KAAK,EAAE,OAAO,eAAe,GAAG;IACpC,SAAS,EAAE,OAAO,kBAAkB,CAAA;CAIpC,CAAA;AAEF,YAAY,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAC,KAAK,EAAE,KAAK,uBAAuB,EAAC,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Table as Table$1 } from '@primer/react/experimental';
|
|
2
2
|
import { sx } from '../sx.js';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
+
import React from 'react';
|
|
4
5
|
import { jsx } from 'react/jsx-runtime';
|
|
5
6
|
|
|
6
7
|
const {
|
|
@@ -24,7 +25,16 @@ function DataTableContainer({
|
|
|
24
25
|
} : {})
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
+
|
|
29
|
+
// Create a wrapper component to avoid mutating the original PrimerDataTable
|
|
30
|
+
const TableRoot = /*#__PURE__*/React.forwardRef(function TableRoot(props, ref) {
|
|
31
|
+
return /*#__PURE__*/jsx(Table$1, {
|
|
32
|
+
...props,
|
|
33
|
+
ref: ref
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
TableRoot.__SLOT__ = Table$1.__SLOT__;
|
|
37
|
+
const Table = Object.assign(TableRoot, {
|
|
28
38
|
Container: DataTableContainer,
|
|
29
39
|
...rest
|
|
30
40
|
});
|
package/dist/components.json
CHANGED
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"LinkButton",
|
|
20
20
|
"Octicon",
|
|
21
21
|
"Overlay",
|
|
22
|
-
"PageHeader",
|
|
23
22
|
"SegmentedControl",
|
|
24
23
|
"Spinner",
|
|
25
24
|
"Table",
|
|
@@ -60,9 +59,6 @@
|
|
|
60
59
|
"LinkButtonProps",
|
|
61
60
|
"LinkProps",
|
|
62
61
|
"OcticonProps",
|
|
63
|
-
"PageHeaderActionsProps",
|
|
64
|
-
"PageHeaderProps",
|
|
65
|
-
"PageHeaderTitleProps",
|
|
66
62
|
"SegmentedControlButtonProps",
|
|
67
63
|
"SegmentedControlIconButtonProps",
|
|
68
64
|
"SegmentedControlProps",
|
package/dist/experimental.d.ts
CHANGED
|
@@ -10,27 +10,6 @@ Dialog,
|
|
|
10
10
|
*/
|
|
11
11
|
type DialogProps, } from './components/Dialog';
|
|
12
12
|
export {
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
15
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
16
|
-
*/
|
|
17
|
-
PageHeader,
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
20
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
21
|
-
*/
|
|
22
|
-
type PageHeaderProps,
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
25
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
26
|
-
*/
|
|
27
|
-
type PageHeaderActionsProps,
|
|
28
|
-
/**
|
|
29
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
30
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
31
|
-
*/
|
|
32
|
-
type PageHeaderTitleProps, } from './components/PageHeader';
|
|
33
|
-
export {
|
|
34
13
|
/**
|
|
35
14
|
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
36
15
|
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experimental.d.ts","sourceRoot":"","sources":["../src/experimental.tsx"],"names":[],"mappings":"AAAA,OAAO;AACL;;;GAGG;AACH,MAAM;AAEN;;;GAGG;AACH,KAAK,WAAW,GACjB,MAAM,qBAAqB,CAAA;AAE5B,OAAO;AACL;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"experimental.d.ts","sourceRoot":"","sources":["../src/experimental.tsx"],"names":[],"mappings":"AAAA,OAAO;AACL;;;GAGG;AACH,MAAM;AAEN;;;GAGG;AACH,KAAK,WAAW,GACjB,MAAM,qBAAqB,CAAA;AAE5B,OAAO;AACL;;;GAGG;AACH,OAAO;AAEP;;;GAGG;AACH,KAAK,YAAY,GAClB,MAAM,sBAAsB,CAAA;AAE7B,OAAO;AACL;;;GAGG;AACH,KAAK;AAEL;;;GAGG;AACH,KAAK,uBAAuB;AAE5B;;;GAGG;AACH,KAAK,UAAU;AAEf;;;GAGG;AACH,KAAK,cAAc;AAEnB;;;GAGG;AACH,KAAK,cAAc;AAEnB;;;GAGG;AACH,KAAK,aAAa;AAElB;;;GAGG;AACH,KAAK,gBAAgB;AAErB;;;GAGG;AACH,KAAK,cAAc;AAEnB;;;GAGG;AACH,KAAK,eAAe;AAEpB;;;GAGG;AACH,KAAK,kBAAkB;AAEvB;;;GAGG;AACH,KAAK,iBAAiB,GACvB,MAAM,wBAAwB,CAAA"}
|
package/dist/experimental.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -244,27 +244,6 @@ export {
|
|
|
244
244
|
*/
|
|
245
245
|
Overlay, } from './components/Overlay';
|
|
246
246
|
export {
|
|
247
|
-
/**
|
|
248
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
249
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
250
|
-
*/
|
|
251
|
-
PageHeader,
|
|
252
|
-
/**
|
|
253
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
254
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
255
|
-
*/
|
|
256
|
-
type PageHeaderProps,
|
|
257
|
-
/**
|
|
258
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
259
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
260
|
-
*/
|
|
261
|
-
type PageHeaderActionsProps,
|
|
262
|
-
/**
|
|
263
|
-
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
264
|
-
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
|
265
|
-
*/
|
|
266
|
-
type PageHeaderTitleProps, } from './components/PageHeader';
|
|
267
|
-
export {
|
|
268
247
|
/**
|
|
269
248
|
* @deprecated Usage of the `sx` prop with this component is no longer
|
|
270
249
|
* supported. Use the component from `@primer/react` with CSS Modules instead.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO;AACL;;;GAGG;AACH,GAAG;AAEH;;;GAGG;AACH,KAAK,QAAQ,GACd,MAAM,kBAAkB,CAAA;AAGzB,OAAO;AACL;;;GAGG;AACH,aAAa;AAEb;;;GAGG;AACH,QAAQ;AAER;;;GAGG;AACH,iBAAiB;AAEjB;;;GAGG;AACH,KAAK,kBAAkB,GACxB,MAAM,4BAA4B,CAAA;AAEnC,OAAO;AACL;;;GAGG;AACH,UAAU;AAEV;;;GAGG;AACH,KAAK,eAAe,GACrB,MAAM,yBAAyB,CAAA;AAEhC,OAAO;AACL;;;GAGG;AACH,KAAK,GACN,MAAM,eAAe,CAAA;AAEtB,OAAO;AACL;;;GAGG;AACH,GAAG,IAAI,QAAQ,GAChB,MAAM,aAAa,CAAA;AA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B,MAAM,uBAAuB,CAAA;AAE9B,OAAO;AACL;;;GAGG;AACH,YAAY;AAEZ;;;GAGG;AACH,KAAK,iBAAiB;AAEtB;;;GAGG;AACH,KAAK,qBAAqB,GAC3B,MAAM,2BAA2B,CAAA;AAElC,OAAO;AACL;;;GAGG;AACH,KAAK;AAEL;;;GAGG;AACH,EAAE;AAEF;;;GAGG;AACH,KAAK,MAAM,GACZ,MAAM,MAAM,CAAA;AAEb,OAAO;AACL;;;GAGG;AACH,KAAK,uBAAuB,GAC7B,MAAM,MAAM,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,6 @@ export { Label } from './components/Label.js';
|
|
|
19
19
|
export { Link } from './components/Link.js';
|
|
20
20
|
export { LinkButton } from './components/LinkButton.js';
|
|
21
21
|
export { Overlay } from './components/Overlay.js';
|
|
22
|
-
export { PageHeader } from './components/PageHeader.js';
|
|
23
22
|
export { SegmentedControl } from './components/SegmentedControl.js';
|
|
24
23
|
export { Spinner } from './components/Spinner.js';
|
|
25
24
|
export { Text } from './components/Text.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/styled-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6-rc.872d71d82",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@babel/preset-react": "^7.28.5",
|
|
50
50
|
"@babel/preset-typescript": "^7.28.5",
|
|
51
51
|
"@primer/primitives": "10.x || 11.x",
|
|
52
|
-
"@primer/react": "^38.19.
|
|
52
|
+
"@primer/react": "^38.19.1",
|
|
53
53
|
"@rollup/plugin-babel": "^6.1.0",
|
|
54
54
|
"@storybook/react-vite": "^10.3.3",
|
|
55
55
|
"@types/react": "18.3.11",
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { PageHeader as PrimerPageHeader, type PageHeaderProps as PrimerPageHeaderProps, type PageHeaderTitleProps as PrimerPageHeaderTitleProps, type PageHeaderActionsProps as PrimerPageHeaderActionsProps, type PageHeaderTitleAreaProps as PrimerPageHeaderTitleAreaProps } from '@primer/react';
|
|
2
|
-
import { type SxProp } from '../sx';
|
|
3
|
-
import type { ForwardRefComponent } from '../polymorphic';
|
|
4
|
-
import type { PropsWithChildren } from 'react';
|
|
5
|
-
import React from 'react';
|
|
6
|
-
type PageHeaderProps = PrimerPageHeaderProps & SxProp;
|
|
7
|
-
type PageHeaderActionsProps = PrimerPageHeaderActionsProps & SxProp;
|
|
8
|
-
declare function PageHeaderActions({ sx, ...rest }: PageHeaderActionsProps): React.JSX.Element;
|
|
9
|
-
type PageHeaderTitleProps = PropsWithChildren<PrimerPageHeaderTitleProps> & SxProp;
|
|
10
|
-
declare const PageHeaderTitle: ({ as, ...props }: PageHeaderTitleProps) => React.JSX.Element;
|
|
11
|
-
type PageHeaderTitleAreaProps = PropsWithChildren<PrimerPageHeaderTitleAreaProps> & SxProp;
|
|
12
|
-
declare const PageHeaderTitleArea: ForwardRefComponent<'div', PageHeaderTitleAreaProps>;
|
|
13
|
-
type PageHeaderComponentType = ForwardRefComponent<'div', PageHeaderProps> & {
|
|
14
|
-
Actions: typeof PageHeaderActions;
|
|
15
|
-
ContextArea: typeof PrimerPageHeader.ContextArea;
|
|
16
|
-
ParentLink: typeof PrimerPageHeader.ParentLink;
|
|
17
|
-
ContextBar: typeof PrimerPageHeader.ContextBar;
|
|
18
|
-
TitleArea: typeof PageHeaderTitleArea;
|
|
19
|
-
ContextAreaActions: typeof PrimerPageHeader.ContextAreaActions;
|
|
20
|
-
LeadingAction: typeof PrimerPageHeader.LeadingAction;
|
|
21
|
-
Breadcrumbs: typeof PrimerPageHeader.Breadcrumbs;
|
|
22
|
-
LeadingVisual: typeof PrimerPageHeader.LeadingVisual;
|
|
23
|
-
Title: typeof PageHeaderTitle;
|
|
24
|
-
TrailingVisual: typeof PrimerPageHeader.TrailingVisual;
|
|
25
|
-
Description: typeof PrimerPageHeader.Description;
|
|
26
|
-
TrailingAction: typeof PrimerPageHeader.TrailingAction;
|
|
27
|
-
};
|
|
28
|
-
declare const PageHeader: PageHeaderComponentType;
|
|
29
|
-
export { PageHeader };
|
|
30
|
-
export type { PageHeaderProps, PageHeaderActionsProps, PageHeaderTitleProps };
|
|
31
|
-
//# sourceMappingURL=PageHeader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,EAA2B,MAAM,OAAO,CAAA;AAC/D,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAEvD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,CAAA;AAcrD,KAAK,sBAAsB,GAAG,4BAA4B,GAAG,MAAM,CAAA;AAEnE,iBAAS,iBAAiB,CAAC,EAAC,EAAE,EAAE,GAAG,IAAI,EAAC,EAAE,sBAAsB,qBAY/D;AAED,KAAK,oBAAoB,GAAG,iBAAiB,CAAC,0BAA0B,CAAC,GAAG,MAAM,CAAA;AAwBlF,QAAA,MAAM,eAAe,GAAI,kBAAgB,oBAAoB,sBAE5D,CAAA;AAED,KAAK,wBAAwB,GAAG,iBAAiB,CAAC,8BAA8B,CAAC,GAAG,MAAM,CAAA;AAE1F,QAAA,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,CAM7E,CAAA;AAED,KAAK,uBAAuB,GAAG,mBAAmB,CAAC,KAAK,EAAE,eAAe,CAAC,GAAG;IAC3E,OAAO,EAAE,OAAO,iBAAiB,CAAA;IACjC,WAAW,EAAE,OAAO,gBAAgB,CAAC,WAAW,CAAA;IAChD,UAAU,EAAE,OAAO,gBAAgB,CAAC,UAAU,CAAA;IAC9C,UAAU,EAAE,OAAO,gBAAgB,CAAC,UAAU,CAAA;IAC9C,SAAS,EAAE,OAAO,mBAAmB,CAAA;IACrC,kBAAkB,EAAE,OAAO,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"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { PageHeader as PageHeader$1 } from '@primer/react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { sx } from '../sx.js';
|
|
4
|
-
import { Box } from './Box.js';
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
const StyledPageHeader = styled(PageHeader$1).withConfig({
|
|
9
|
-
shouldForwardProp: prop => prop !== 'sx'
|
|
10
|
-
}).withConfig({
|
|
11
|
-
displayName: "PageHeader__StyledPageHeader",
|
|
12
|
-
componentId: "sc-1g9symn-0"
|
|
13
|
-
})(["", ""], sx);
|
|
14
|
-
const PageHeaderImpl = /*#__PURE__*/React.forwardRef(({
|
|
15
|
-
as,
|
|
16
|
-
...props
|
|
17
|
-
}, ref) => /*#__PURE__*/jsx(StyledPageHeader, {
|
|
18
|
-
...props,
|
|
19
|
-
...(as ? {
|
|
20
|
-
forwardedAs: as
|
|
21
|
-
} : {}),
|
|
22
|
-
ref: ref
|
|
23
|
-
}));
|
|
24
|
-
function PageHeaderActions({
|
|
25
|
-
sx,
|
|
26
|
-
...rest
|
|
27
|
-
}) {
|
|
28
|
-
const style = {};
|
|
29
|
-
if (sx) {
|
|
30
|
-
// @ts-ignore sx has height attribute
|
|
31
|
-
const {
|
|
32
|
-
height
|
|
33
|
-
} = sx;
|
|
34
|
-
if (height) {
|
|
35
|
-
style['--custom-height'] = height;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// @ts-expect-error type mismatch between Box usage here and PrimerPageHeader.Actions
|
|
40
|
-
return /*#__PURE__*/jsx(Box, {
|
|
41
|
-
...rest,
|
|
42
|
-
as: PageHeader$1.Actions,
|
|
43
|
-
style: style,
|
|
44
|
-
sx: sx
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
function StyledPageHeaderTitle({
|
|
48
|
-
sx,
|
|
49
|
-
...rest
|
|
50
|
-
}) {
|
|
51
|
-
const style = {};
|
|
52
|
-
if (sx) {
|
|
53
|
-
// @ts-ignore sx can have color attribute
|
|
54
|
-
const {
|
|
55
|
-
fontSize,
|
|
56
|
-
lineHeight,
|
|
57
|
-
fontWeight
|
|
58
|
-
} = sx;
|
|
59
|
-
if (fontSize) {
|
|
60
|
-
style['--custom-font-size'] = fontSize;
|
|
61
|
-
}
|
|
62
|
-
if (lineHeight) {
|
|
63
|
-
style['--custom-line-height'] = lineHeight;
|
|
64
|
-
}
|
|
65
|
-
if (fontWeight) {
|
|
66
|
-
style['--custom-font-weight'] = fontWeight;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// @ts-expect-error type mismatch between Box usage here and PrimerPageHeader.Title
|
|
71
|
-
return /*#__PURE__*/jsx(Box, {
|
|
72
|
-
...rest,
|
|
73
|
-
as: PageHeader$1.Title,
|
|
74
|
-
style: style,
|
|
75
|
-
sx: sx
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
const PageHeaderTitle = ({
|
|
79
|
-
as,
|
|
80
|
-
...props
|
|
81
|
-
}) => /*#__PURE__*/jsx(StyledPageHeaderTitle, {
|
|
82
|
-
...props,
|
|
83
|
-
...(as ? {
|
|
84
|
-
forwardedAs: as
|
|
85
|
-
} : {})
|
|
86
|
-
});
|
|
87
|
-
const PageHeaderTitleArea = styled(PageHeader$1.TitleArea).withConfig({
|
|
88
|
-
shouldForwardProp: prop => prop !== 'sx'
|
|
89
|
-
}).withConfig({
|
|
90
|
-
displayName: "PageHeader__PageHeaderTitleArea",
|
|
91
|
-
componentId: "sc-1g9symn-1"
|
|
92
|
-
})(["", ""], sx);
|
|
93
|
-
const PageHeader = Object.assign(PageHeaderImpl, {
|
|
94
|
-
Actions: PageHeaderActions,
|
|
95
|
-
ContextArea: PageHeader$1.ContextArea,
|
|
96
|
-
ParentLink: PageHeader$1.ParentLink,
|
|
97
|
-
ContextBar: PageHeader$1.ContextBar,
|
|
98
|
-
TitleArea: PageHeaderTitleArea,
|
|
99
|
-
ContextAreaActions: PageHeader$1.ContextAreaActions,
|
|
100
|
-
LeadingAction: PageHeader$1.LeadingAction,
|
|
101
|
-
Breadcrumbs: PageHeader$1.Breadcrumbs,
|
|
102
|
-
LeadingVisual: PageHeader$1.LeadingVisual,
|
|
103
|
-
Title: PageHeaderTitle,
|
|
104
|
-
TrailingVisual: PageHeader$1.TrailingVisual,
|
|
105
|
-
Description: PageHeader$1.Description,
|
|
106
|
-
TrailingAction: PageHeader$1.TrailingAction
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
export { PageHeader };
|