@primer/styled-react 0.0.0-20251003001401 → 0.0.0-20251003002527
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.
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import { FormControl as PrimerFormControl, type FormControlProps as PrimerFormControlProps, type SxProp } from '@primer/react';
|
|
1
|
+
import { FormControl as PrimerFormControl, type FormControlProps as PrimerFormControlProps, type FormControlCaptionProps as PrimerFormControlCaptionProps, type FormControlValidationProps as PrimerFormControlValidationProps, type SxProp } from '@primer/react';
|
|
2
2
|
import { type PropsWithChildren } from 'react';
|
|
3
3
|
type FormControlProps = PropsWithChildren<PrimerFormControlProps> & SxProp;
|
|
4
4
|
declare const FormControlImpl: import("react").ForwardRefExoticComponent<PrimerFormControlProps & {
|
|
5
5
|
children?: import("react").ReactNode | undefined;
|
|
6
6
|
} & SxProp & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
type FormControlCaptionProps = PropsWithChildren<PrimerFormControlCaptionProps> & SxProp;
|
|
8
|
+
declare const FormControlCaption: (props: FormControlCaptionProps) => import("react").JSX.Element;
|
|
9
|
+
type FormControlValidationProps = PropsWithChildren<PrimerFormControlValidationProps> & SxProp;
|
|
10
|
+
declare const FormControlValidation: (props: FormControlValidationProps) => import("react").JSX.Element;
|
|
11
|
+
declare const FormControlLeadingVisual: (props: PropsWithChildren<SxProp>) => import("react").JSX.Element;
|
|
7
12
|
declare const FormControl: typeof FormControlImpl & {
|
|
8
|
-
Caption: typeof
|
|
9
|
-
LeadingVisual: typeof
|
|
10
|
-
Validation: typeof
|
|
13
|
+
Caption: typeof FormControlCaption;
|
|
14
|
+
LeadingVisual: typeof FormControlLeadingVisual;
|
|
15
|
+
Validation: typeof FormControlValidation;
|
|
11
16
|
Label: typeof PrimerFormControl.Label;
|
|
12
17
|
};
|
|
13
18
|
export { FormControl, type FormControlProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormControl.d.ts","sourceRoot":"","sources":["../../src/components/FormControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,IAAI,iBAAiB,EAChC,KAAK,gBAAgB,IAAI,sBAAsB,EAC/C,KAAK,MAAM,EACZ,MAAM,eAAe,CAAA;AACtB,OAAO,EAAa,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAExD,KAAK,gBAAgB,GAAG,iBAAiB,CAAC,sBAAsB,CAAC,GAAG,MAAM,CAAA;AAE1E,QAAA,MAAM,eAAe;;2DAEnB,CAAA;AAEF,QAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"FormControl.d.ts","sourceRoot":"","sources":["../../src/components/FormControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,IAAI,iBAAiB,EAChC,KAAK,gBAAgB,IAAI,sBAAsB,EAC/C,KAAK,uBAAuB,IAAI,6BAA6B,EAC7D,KAAK,0BAA0B,IAAI,gCAAgC,EACnE,KAAK,MAAM,EACZ,MAAM,eAAe,CAAA;AACtB,OAAO,EAAa,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAExD,KAAK,gBAAgB,GAAG,iBAAiB,CAAC,sBAAsB,CAAC,GAAG,MAAM,CAAA;AAE1E,QAAA,MAAM,eAAe;;2DAEnB,CAAA;AAEF,KAAK,uBAAuB,GAAG,iBAAiB,CAAC,6BAA6B,CAAC,GAAG,MAAM,CAAA;AACxF,QAAA,MAAM,kBAAkB,GAAI,OAAO,uBAAuB,gCAEzD,CAAA;AAED,KAAK,0BAA0B,GAAG,iBAAiB,CAAC,gCAAgC,CAAC,GAAG,MAAM,CAAA;AAE9F,QAAA,MAAM,qBAAqB,GAAI,OAAO,0BAA0B,gCAE/D,CAAA;AAED,QAAA,MAAM,wBAAwB,GAAI,OAAO,iBAAiB,CAAC,MAAM,CAAC,gCAEjE,CAAA;AAED,QAAA,MAAM,WAAW,EAKX,OAAO,eAAe,GAAG;IAC7B,OAAO,EAAE,OAAO,kBAAkB,CAAA;IAClC,aAAa,EAAE,OAAO,wBAAwB,CAAA;IAC9C,UAAU,EAAE,OAAO,qBAAqB,CAAA;IACxC,KAAK,EAAE,OAAO,iBAAiB,CAAC,KAAK,CAAA;CACtC,CAAA;AAED,OAAO,EAAC,WAAW,EAAE,KAAK,gBAAgB,EAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
import type { PageLayoutProps as PrimerPageLayoutProps, PageLayoutContentProps as PrimerPageLayoutContentProps } from '@primer/react';
|
|
2
|
+
import type { PageLayoutProps as PrimerPageLayoutProps, PageLayoutContentProps as PrimerPageLayoutContentProps, PageLayoutHeaderProps as PrimerPageLayoutHeaderProps, PageLayoutPaneProps as PrimerPageLayoutPaneProps, PageLayoutFooterProps as PrimerPageLayoutFooterProps } from '@primer/react';
|
|
3
3
|
import { type SxProp } from '../sx';
|
|
4
4
|
type PageLayoutProps = PropsWithChildren<PrimerPageLayoutProps> & SxProp;
|
|
5
5
|
declare const PageLayout: React.ForwardRefExoticComponent<PrimerPageLayoutProps & {
|
|
@@ -8,11 +8,15 @@ declare const PageLayout: React.ForwardRefExoticComponent<PrimerPageLayoutProps
|
|
|
8
8
|
Content: React.ForwardRefExoticComponent<PrimerPageLayoutContentProps & {
|
|
9
9
|
children?: React.ReactNode | undefined;
|
|
10
10
|
} & SxProp & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
Header: React.
|
|
12
|
-
Pane: React.ForwardRefExoticComponent<import("@primer/react").PageLayoutPaneProps & {
|
|
11
|
+
Header: React.ForwardRefExoticComponent<PrimerPageLayoutHeaderProps & {
|
|
13
12
|
children?: React.ReactNode | undefined;
|
|
14
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
-
|
|
13
|
+
} & SxProp & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Pane: React.ForwardRefExoticComponent<PrimerPageLayoutPaneProps & {
|
|
15
|
+
children?: React.ReactNode | undefined;
|
|
16
|
+
} & SxProp & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
Footer: React.ForwardRefExoticComponent<PrimerPageLayoutFooterProps & {
|
|
18
|
+
children?: React.ReactNode | undefined;
|
|
19
|
+
} & SxProp & React.RefAttributes<HTMLDivElement>>;
|
|
16
20
|
};
|
|
17
21
|
export { PageLayout, type PageLayoutProps };
|
|
18
22
|
//# sourceMappingURL=PageLayout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageLayout.d.ts","sourceRoot":"","sources":["../../src/components/PageLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAEnD,OAAO,KAAK,EACV,eAAe,IAAI,qBAAqB,EACxC,sBAAsB,IAAI,4BAA4B,
|
|
1
|
+
{"version":3,"file":"PageLayout.d.ts","sourceRoot":"","sources":["../../src/components/PageLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAEnD,OAAO,KAAK,EACV,eAAe,IAAI,qBAAqB,EACxC,sBAAsB,IAAI,4BAA4B,EACtD,qBAAqB,IAAI,2BAA2B,EACpD,mBAAmB,IAAI,yBAAyB,EAChD,qBAAqB,IAAI,2BAA2B,EACrD,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAMrC,KAAK,eAAe,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,GAAG,MAAM,CAAA;AAiCxE,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;CAKd,CAAA;AAEF,OAAO,EAAC,UAAU,EAAE,KAAK,eAAe,EAAC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -144,10 +144,28 @@ const FormControlImpl = /*#__PURE__*/forwardRef(function FormControl(props, ref)
|
|
|
144
144
|
...props
|
|
145
145
|
});
|
|
146
146
|
});
|
|
147
|
+
const FormControlCaption = props => {
|
|
148
|
+
return /*#__PURE__*/jsx(Box, {
|
|
149
|
+
as: FormControl$1.Caption,
|
|
150
|
+
...props
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
const FormControlValidation = props => {
|
|
154
|
+
return /*#__PURE__*/jsx(Box, {
|
|
155
|
+
as: FormControl$1.Validation,
|
|
156
|
+
...props
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
const FormControlLeadingVisual = props => {
|
|
160
|
+
return /*#__PURE__*/jsx(Box, {
|
|
161
|
+
as: FormControl$1.LeadingVisual,
|
|
162
|
+
...props
|
|
163
|
+
});
|
|
164
|
+
};
|
|
147
165
|
const FormControl = Object.assign(FormControlImpl, {
|
|
148
|
-
Caption:
|
|
149
|
-
LeadingVisual:
|
|
150
|
-
Validation:
|
|
166
|
+
Caption: FormControlCaption,
|
|
167
|
+
LeadingVisual: FormControlLeadingVisual,
|
|
168
|
+
Validation: FormControlValidation,
|
|
151
169
|
Label: FormControl$1.Label
|
|
152
170
|
});
|
|
153
171
|
|
|
@@ -314,11 +332,34 @@ const PageLayoutContent = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
314
332
|
...props
|
|
315
333
|
});
|
|
316
334
|
});
|
|
335
|
+
const PageLayoutHeader = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
336
|
+
// @ts-expect-error - PrimerPageLayout.Header is not recognized as a valid component type
|
|
337
|
+
return /*#__PURE__*/jsx(Wrapper, {
|
|
338
|
+
as: PageLayout$1.Header,
|
|
339
|
+
ref: ref,
|
|
340
|
+
...props
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
const PageLayoutPane = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
344
|
+
return /*#__PURE__*/jsx(Wrapper, {
|
|
345
|
+
as: PageLayout$1.Pane,
|
|
346
|
+
ref: ref,
|
|
347
|
+
...props
|
|
348
|
+
});
|
|
349
|
+
});
|
|
350
|
+
const PageLayoutFooter = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
351
|
+
// @ts-expect-error - PrimerPageLayout.Footer is not recognized as a valid component type
|
|
352
|
+
return /*#__PURE__*/jsx(Wrapper, {
|
|
353
|
+
as: PageLayout$1.Footer,
|
|
354
|
+
ref: ref,
|
|
355
|
+
...props
|
|
356
|
+
});
|
|
357
|
+
});
|
|
317
358
|
const PageLayout = Object.assign(PageLayoutImpl, {
|
|
318
359
|
Content: PageLayoutContent,
|
|
319
|
-
Header:
|
|
320
|
-
Pane:
|
|
321
|
-
Footer:
|
|
360
|
+
Header: PageLayoutHeader,
|
|
361
|
+
Pane: PageLayoutPane,
|
|
362
|
+
Footer: PageLayoutFooter
|
|
322
363
|
});
|
|
323
364
|
|
|
324
365
|
const RadioGroupImpl = props => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/styled-react",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-20251003002527",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/preset-react": "^7.27.1",
|
|
32
32
|
"@babel/preset-typescript": "^7.27.1",
|
|
33
|
-
"@primer/react": "0.0.0-
|
|
33
|
+
"@primer/react": "0.0.0-20251003002527",
|
|
34
34
|
"@rollup/plugin-babel": "^6.0.4",
|
|
35
35
|
"@types/react": "18.3.11",
|
|
36
36
|
"@types/react-dom": "18.3.1",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"typescript": "^5.9.2"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@primer/react": "0.0.0-
|
|
49
|
+
"@primer/react": "0.0.0-20251003002527",
|
|
50
50
|
"@types/react": "18.x || 19.x",
|
|
51
51
|
"@types/react-dom": "18.x || 19.x",
|
|
52
52
|
"@types/react-is": "18.x || 19.x",
|