@primer/styled-react 0.0.0-20251003033101 → 0.0.0-20251003055239
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 +40 -0
- package/dist/components/ActionList.d.ts.map +1 -0
- package/dist/components/Autocomplete.d.ts +4 -2
- package/dist/components/Autocomplete.d.ts.map +1 -1
- package/dist/components/Button.d.ts +13 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/DataTable.d.ts +11 -0
- package/dist/components/DataTable.d.ts.map +1 -0
- package/dist/components/FormControl.d.ts +4 -9
- package/dist/components/FormControl.d.ts.map +1 -1
- package/dist/components/IconButton.d.ts +9 -0
- package/dist/components/IconButton.d.ts.map +1 -0
- package/dist/components/NavList.d.ts +27 -19
- package/dist/components/NavList.d.ts.map +1 -1
- package/dist/components/PageHeader.d.ts.map +1 -1
- package/dist/components/PageLayout.d.ts +3 -7
- package/dist/components/PageLayout.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/Textarea.d.ts +9 -0
- package/dist/components/Textarea.d.ts.map +1 -0
- package/dist/components.json +22 -0
- package/dist/experimental.d.ts +1 -1
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +28 -3
- package/dist/index.d.ts +5 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +324 -49
- package/dist/sx.d.ts +3 -0
- package/dist/sx.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ActionList as PrimerActionList, type ActionListProps as PrimerActionListProps, type ActionListItemProps as PrimerActionListItemProps, type ActionListLinkItemProps as PrimerActionListLinkItemProps, type ActionListGroupProps as PrimerActionListGroupProps, type ActionListDividerProps as PrimerActionListDividerProps, type ActionListLeadingVisualProps as PrimerActionListLeadingVisualProps, type ActionListTrailingVisualProps as PrimerActionListTrailingVisualProps } from '@primer/react';
|
|
3
|
+
import { type SxProp } from '../sx';
|
|
4
|
+
import type { ForwardRefComponent } from '../polymorphic';
|
|
5
|
+
type PrimerActionListTrailingActionProps = React.ComponentProps<typeof PrimerActionList.TrailingAction>;
|
|
6
|
+
export type ActionListProps<As extends React.ElementType = 'ul'> = PrimerActionListProps<As> & SxProp;
|
|
7
|
+
export type ActionListItemProps = React.PropsWithChildren<PrimerActionListItemProps & SxProp>;
|
|
8
|
+
export type ActionListLinkItemProps = PrimerActionListLinkItemProps & SxProp & {
|
|
9
|
+
as?: React.ElementType;
|
|
10
|
+
};
|
|
11
|
+
export type ActionListGroupProps = React.PropsWithChildren<PrimerActionListGroupProps & SxProp>;
|
|
12
|
+
export type ActionListDividerProps = React.PropsWithChildren<PrimerActionListDividerProps & SxProp>;
|
|
13
|
+
export type ActionListLeadingVisualProps = React.PropsWithChildren<PrimerActionListLeadingVisualProps & SxProp>;
|
|
14
|
+
export type ActionListTrailingVisualProps = React.PropsWithChildren<PrimerActionListTrailingVisualProps & SxProp>;
|
|
15
|
+
export type ActionListTrailingActionProps = PrimerActionListTrailingActionProps & SxProp & {
|
|
16
|
+
as?: React.ElementType;
|
|
17
|
+
};
|
|
18
|
+
declare const ActionListImpl: React.ForwardRefExoticComponent<Omit<ActionListProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>, "ref"> & React.RefAttributes<unknown>>;
|
|
19
|
+
declare const ActionListLinkItem: ForwardRefComponent<"a", ActionListLinkItemProps>;
|
|
20
|
+
type TrailingActionElements = 'button' | 'a';
|
|
21
|
+
declare const ActionListTrailingAction: ForwardRefComponent<TrailingActionElements, ActionListTrailingActionProps>;
|
|
22
|
+
declare const ActionListItem: ForwardRefComponent<"li", ActionListItemProps>;
|
|
23
|
+
declare const ActionListGroup: React.ComponentType<ActionListGroupProps>;
|
|
24
|
+
declare const ActionListDivider: React.ComponentType<ActionListDividerProps>;
|
|
25
|
+
declare const ActionListLeadingVisual: React.ComponentType<ActionListLeadingVisualProps>;
|
|
26
|
+
declare const ActionListTrailingVisual: React.ComponentType<ActionListTrailingVisualProps>;
|
|
27
|
+
export declare const ActionList: typeof ActionListImpl & {
|
|
28
|
+
Item: typeof ActionListItem;
|
|
29
|
+
LinkItem: typeof ActionListLinkItem;
|
|
30
|
+
Group: typeof ActionListGroup;
|
|
31
|
+
GroupHeading: typeof PrimerActionList.GroupHeading;
|
|
32
|
+
Divider: typeof ActionListDivider;
|
|
33
|
+
Description: typeof PrimerActionList.Description;
|
|
34
|
+
LeadingVisual: typeof ActionListLeadingVisual;
|
|
35
|
+
TrailingVisual: typeof ActionListTrailingVisual;
|
|
36
|
+
Heading: typeof PrimerActionList.Heading;
|
|
37
|
+
TrailingAction: typeof ActionListTrailingAction;
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=ActionList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionList.d.ts","sourceRoot":"","sources":["../../src/components/ActionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EACL,UAAU,IAAI,gBAAgB,EAC9B,KAAK,eAAe,IAAI,qBAAqB,EAC7C,KAAK,mBAAmB,IAAI,yBAAyB,EACrD,KAAK,uBAAuB,IAAI,6BAA6B,EAC7D,KAAK,oBAAoB,IAAI,0BAA0B,EACvD,KAAK,sBAAsB,IAAI,4BAA4B,EAC3D,KAAK,4BAA4B,IAAI,kCAAkC,EACvE,KAAK,6BAA6B,IAAI,mCAAmC,EAC1E,MAAM,eAAe,CAAA;AACtB,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AACrC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAEvD,KAAK,mCAAmC,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,cAAc,CAAC,CAAA;AAEvG,MAAM,MAAM,eAAe,CAAC,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AK,CAAC,aAAa,CAAC,sBAAsB,CAMlE,CAAA;AAED,QAAA,MAAM,uBAAuB,EAAE,KAAK,CAAC,aAAa,CAAC,4BAA4B,CAM9E,CAAA;AAED,QAAA,MAAM,wBAAwB,EAAE,KAAK,CAAC,aAAa,CAAC,6BAA6B,CAMhF,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,OAAO,cAAc,GAAG;IAC/C,IAAI,EAAE,OAAO,cAAc,CAAA;IAC3B,QAAQ,EAAE,OAAO,kBAAkB,CAAA;IACnC,KAAK,EAAE,OAAO,eAAe,CAAA;IAC7B,YAAY,EAAE,OAAO,gBAAgB,CAAC,YAAY,CAAA;IAClD,OAAO,EAAE,OAAO,iBAAiB,CAAA;IACjC,WAAW,EAAE,OAAO,gBAAgB,CAAC,WAAW,CAAA;IAChD,aAAa,EAAE,OAAO,uBAAuB,CAAA;IAC7C,cAAc,EAAE,OAAO,wBAAwB,CAAA;IAC/C,OAAO,EAAE,OAAO,gBAAgB,CAAC,OAAO,CAAA;IACxC,cAAc,EAAE,OAAO,wBAAwB,CAAA;CAY/C,CAAA"}
|
|
@@ -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,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,11 @@
|
|
|
1
|
+
import { Table as PrimerDataTable, type TableContainerProps } from '@primer/react/experimental';
|
|
2
|
+
import { type SxProp } from '../sx';
|
|
3
|
+
import type React from 'react';
|
|
4
|
+
type DataTableContainerProps<As extends React.ElementType = 'div'> = TableContainerProps<As> & SxProp;
|
|
5
|
+
declare function DataTableContainer<As extends React.ElementType = 'div'>({ as, ...rest }: DataTableContainerProps<As>): React.JSX.Element;
|
|
6
|
+
declare const Table: typeof PrimerDataTable & {
|
|
7
|
+
Container: typeof DataTableContainer;
|
|
8
|
+
};
|
|
9
|
+
export type { TableProps, TableHeadProps, TableBodyProps, TableRowProps, TableHeaderProps, TableCellProps, TableTitleProps, TableSubtitleProps, TableActionsProps, } from '@primer/react/experimental';
|
|
10
|
+
export { Table, type DataTableContainerProps };
|
|
11
|
+
//# sourceMappingURL=DataTable.d.ts.map
|
|
@@ -0,0 +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,EAAC,MAAM,4BAA4B,CAAA;AAC7F,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,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;AAED,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,18 +1,13 @@
|
|
|
1
|
-
import { FormControl as PrimerFormControl, type FormControlProps as PrimerFormControlProps, type
|
|
1
|
+
import { FormControl as PrimerFormControl, type FormControlProps as PrimerFormControlProps, 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;
|
|
12
7
|
declare const FormControl: typeof FormControlImpl & {
|
|
13
|
-
Caption: typeof
|
|
14
|
-
LeadingVisual: typeof
|
|
15
|
-
Validation: typeof
|
|
8
|
+
Caption: typeof PrimerFormControl.Caption;
|
|
9
|
+
LeadingVisual: typeof PrimerFormControl.LeadingVisual;
|
|
10
|
+
Validation: typeof PrimerFormControl.Validation;
|
|
16
11
|
Label: typeof PrimerFormControl.Label;
|
|
17
12
|
};
|
|
18
13
|
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,
|
|
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,WAAW,EAKX,OAAO,eAAe,GAAG;IAC7B,OAAO,EAAE,OAAO,iBAAiB,CAAC,OAAO,CAAA;IACzC,aAAa,EAAE,OAAO,iBAAiB,CAAC,aAAa,CAAA;IACrD,UAAU,EAAE,OAAO,iBAAiB,CAAC,UAAU,CAAA;IAC/C,KAAK,EAAE,OAAO,iBAAiB,CAAC,KAAK,CAAA;CACtC,CAAA;AAED,OAAO,EAAC,WAAW,EAAE,KAAK,gBAAgB,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,25 +1,33 @@
|
|
|
1
1
|
import { NavList as PrimerNavList } from '@primer/react';
|
|
2
|
-
import type { NavListProps as PrimerNavListProps, NavListItemProps as PrimerNavListItemProps } from '@primer/react';
|
|
3
|
-
import { type
|
|
2
|
+
import type { NavListProps as PrimerNavListProps, NavListItemProps as PrimerNavListItemProps, NavListGroupHeadingProps as PrimerNavListGroupHeadingProps, NavListLeadingVisualProps as PrimerNavListLeadingVisualProps } from '@primer/react';
|
|
3
|
+
import { type PropsWithChildren } from 'react';
|
|
4
4
|
import { type SxProp } from '../sx';
|
|
5
|
+
type RefComponent<E extends HTMLElement, P> = React.ForwardRefExoticComponent<P & React.RefAttributes<E>>;
|
|
5
6
|
type NavListProps = PropsWithChildren<PrimerNavListProps> & SxProp;
|
|
6
|
-
declare const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
declare const NavListItem: import("react").ForwardRefExoticComponent<PrimerNavListItemProps & {
|
|
8
|
+
children?: import("react").ReactNode | undefined;
|
|
9
|
+
} & SxProp & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
10
|
+
declare const NavListGroup: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLLIElement> & {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
title?: string;
|
|
13
|
+
} & {
|
|
14
|
+
children?: import("react").ReactNode | undefined;
|
|
15
|
+
} & SxProp & import("react").RefAttributes<HTMLLIElement>>;
|
|
16
|
+
type NavListGroupHeadingProps = PropsWithChildren<PrimerNavListGroupHeadingProps> & SxProp;
|
|
17
|
+
declare const NavListGroupHeading: RefComponent<HTMLElement, NavListGroupHeadingProps>;
|
|
18
|
+
type NavListLeadingVisualProps = PropsWithChildren<PrimerNavListLeadingVisualProps> & SxProp;
|
|
19
|
+
declare const NavListLeadingVisual: RefComponent<HTMLSpanElement, NavListLeadingVisualProps>;
|
|
20
|
+
type NavListCompound = React.ForwardRefExoticComponent<NavListProps & React.RefAttributes<HTMLElement>> & {
|
|
21
|
+
Item: typeof NavListItem;
|
|
22
|
+
Group: typeof NavListGroup;
|
|
23
|
+
GroupHeading: typeof NavListGroupHeading;
|
|
24
|
+
LeadingVisual: typeof NavListLeadingVisual;
|
|
25
|
+
SubNav: typeof PrimerNavList.SubNav;
|
|
26
|
+
Divider: typeof PrimerNavList.Divider;
|
|
27
|
+
TrailingVisual: typeof PrimerNavList.TrailingVisual;
|
|
28
|
+
TrailingAction: typeof PrimerNavList.TrailingAction;
|
|
29
|
+
GroupExpand: typeof PrimerNavList.GroupExpand;
|
|
23
30
|
};
|
|
31
|
+
declare const NavList: NavListCompound;
|
|
24
32
|
export { NavList, type NavListProps };
|
|
25
33
|
//# sourceMappingURL=NavList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavList.d.ts","sourceRoot":"","sources":["../../src/components/NavList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,aAAa,EAAM,MAAM,eAAe,CAAA;AAC3D,OAAO,KAAK,EACV,YAAY,IAAI,kBAAkB,EAClC,gBAAgB,IAAI,sBAAsB,
|
|
1
|
+
{"version":3,"file":"NavList.d.ts","sourceRoot":"","sources":["../../src/components/NavList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,aAAa,EAAM,MAAM,eAAe,CAAA;AAC3D,OAAO,KAAK,EACV,YAAY,IAAI,kBAAkB,EAClC,gBAAgB,IAAI,sBAAsB,EAE1C,wBAAwB,IAAI,8BAA8B,EAC1D,yBAAyB,IAAI,+BAA+B,EAC7D,MAAM,eAAe,CAAA;AACtB,OAAO,EAAa,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AACxD,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,KAAK,YAAY,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;AAEzG,KAAK,YAAY,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,GAAG,MAAM,CAAA;AAQlE,QAAA,MAAM,WAAW;;8DAGf,CAAA;AAIF,QAAA,MAAM,YAAY;;;;;0DAGhB,CAAA;AAEF,KAAK,wBAAwB,GAAG,iBAAiB,CAAC,8BAA8B,CAAC,GAAG,MAAM,CAAA;AAE1F,QAAA,MAAM,mBAAmB,EAGnB,YAAY,CAAC,WAAW,EAAE,wBAAwB,CAAC,CAAA;AAEzD,KAAK,yBAAyB,GAAG,iBAAiB,CAAC,+BAA+B,CAAC,GAAG,MAAM,CAAA;AAE5F,QAAA,MAAM,oBAAoB,EAKrB,YAAY,CAAC,eAAe,EAAE,yBAAyB,CAAC,CAAA;AAE7D,KAAK,eAAe,GAAG,KAAK,CAAC,yBAAyB,CAAC,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,GAAG;IACxG,IAAI,EAAE,OAAO,WAAW,CAAA;IACxB,KAAK,EAAE,OAAO,YAAY,CAAA;IAC1B,YAAY,EAAE,OAAO,mBAAmB,CAAA;IACxC,aAAa,EAAE,OAAO,oBAAoB,CAAA;IAC1C,MAAM,EAAE,OAAO,aAAa,CAAC,MAAM,CAAA;IACnC,OAAO,EAAE,OAAO,aAAa,CAAC,OAAO,CAAA;IACrC,cAAc,EAAE,OAAO,aAAa,CAAC,cAAc,CAAA;IACnD,cAAc,EAAE,OAAO,aAAa,CAAC,cAAc,CAAA;IACnD,WAAW,EAAE,OAAO,aAAa,CAAC,WAAW,CAAA;CAC9C,CAAA;AAED,QAAA,MAAM,OAAO,EAAE,eAUb,CAAA;AAEF,OAAO,EAAC,OAAO,EAAE,KAAK,YAAY,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":[],"mappings":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gB,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,5 +1,5 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
import type { PageLayoutProps as PrimerPageLayoutProps, PageLayoutContentProps as PrimerPageLayoutContentProps,
|
|
2
|
+
import type { PageLayoutProps as PrimerPageLayoutProps, PageLayoutContentProps as PrimerPageLayoutContentProps, PageLayoutPaneProps as PrimerPageLayoutPaneProps } 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,15 +8,11 @@ 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
|
-
children?: React.ReactNode | undefined;
|
|
13
|
-
} & SxProp & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
Header: React.FC<React.PropsWithChildren<import("@primer/react").PageLayoutHeaderProps>>;
|
|
14
12
|
Pane: React.ForwardRefExoticComponent<PrimerPageLayoutPaneProps & {
|
|
15
13
|
children?: React.ReactNode | undefined;
|
|
16
14
|
} & SxProp & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
-
Footer: React.
|
|
18
|
-
children?: React.ReactNode | undefined;
|
|
19
|
-
} & SxProp & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Footer: React.FC<React.PropsWithChildren<import("@primer/react").PageLayoutFooterProps>>;
|
|
20
16
|
};
|
|
21
17
|
export { PageLayout, type PageLayoutProps };
|
|
22
18
|
//# 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,EACtD,
|
|
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,mBAAmB,IAAI,yBAAyB,EACjD,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAMrC,KAAK,eAAe,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,GAAG,MAAM,CAAA;AAmBxE,QAAA,MAAM,UAAU;;;;;;;;;;;CAKd,CAAA;AAEF,OAAO,EAAC,UAAU,EAAE,KAAK,eAAe,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"}
|
|
@@ -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
|
@@ -50,19 +50,30 @@
|
|
|
50
50
|
"UnderlinePanels"
|
|
51
51
|
],
|
|
52
52
|
"types": [
|
|
53
|
+
"ActionListDividerProps",
|
|
54
|
+
"ActionListGroupProps",
|
|
55
|
+
"ActionListItemProps",
|
|
56
|
+
"ActionListLeadingVisualProps",
|
|
57
|
+
"ActionListLinkItemProps",
|
|
58
|
+
"ActionListProps",
|
|
59
|
+
"ActionListTrailingActionProps",
|
|
60
|
+
"ActionListTrailingVisualProps",
|
|
53
61
|
"AutocompleteOverlayProps",
|
|
54
62
|
"AvatarProps",
|
|
55
63
|
"BetterSystemStyleObject",
|
|
56
64
|
"BoxProps",
|
|
57
65
|
"BreadcrumbsItemProps",
|
|
58
66
|
"BreadcrumbsProps",
|
|
67
|
+
"ButtonProps",
|
|
59
68
|
"CheckboxGroupProps",
|
|
60
69
|
"CheckboxProps",
|
|
61
70
|
"CounterLabelProps",
|
|
71
|
+
"DataTableContainerProps",
|
|
62
72
|
"DialogHeaderProps",
|
|
63
73
|
"DialogProps",
|
|
64
74
|
"FormControlProps",
|
|
65
75
|
"HeaderProps",
|
|
76
|
+
"IconButtonProps",
|
|
66
77
|
"LabelProps",
|
|
67
78
|
"LinkButtonProps",
|
|
68
79
|
"LinkProps",
|
|
@@ -81,8 +92,19 @@
|
|
|
81
92
|
"SubNavLinkProps",
|
|
82
93
|
"SubNavProps",
|
|
83
94
|
"SxProp",
|
|
95
|
+
"TableActionsProps",
|
|
96
|
+
"TableBodyProps",
|
|
97
|
+
"TableCellProps",
|
|
98
|
+
"TableHeaderProps",
|
|
99
|
+
"TableHeadProps",
|
|
100
|
+
"TableProps",
|
|
101
|
+
"TableRowProps",
|
|
102
|
+
"TableSubtitleProps",
|
|
103
|
+
"TableTitleProps",
|
|
84
104
|
"TabNavLinkProps",
|
|
85
105
|
"TabNavProps",
|
|
106
|
+
"TextareaProps",
|
|
107
|
+
"TextInputActionProps",
|
|
86
108
|
"TextInputProps",
|
|
87
109
|
"TextProps",
|
|
88
110
|
"TimelineBadgeProps",
|
package/dist/experimental.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ export { Dialog, type DialogProps } from './components/Dialog';
|
|
|
2
2
|
export { PageHeader, type PageHeaderProps, type PageHeaderActionsProps, type PageHeaderTitleProps, } from './components/PageHeader';
|
|
3
3
|
export { Tooltip, type TooltipProps } from './components/Tooltip';
|
|
4
4
|
export { UnderlinePanels, type UnderlinePanelsProps, type UnderlinePanelsTabProps, type UnderlinePanelsPanelProps, } from './components/UnderlinePanels';
|
|
5
|
-
export { Table } from '
|
|
5
|
+
export { Table, type DataTableContainerProps, type TableProps, type TableHeadProps, type TableBodyProps, type TableRowProps, type TableHeaderProps, type TableCellProps, type TableTitleProps, type TableSubtitleProps, type TableActionsProps, } from './components/DataTable';
|
|
6
6
|
//# sourceMappingURL=experimental.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experimental.d.ts","sourceRoot":"","sources":["../src/experimental.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAC,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,GAC1B,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAC,OAAO,EAAE,KAAK,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAE/D,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,GAC/B,MAAM,8BAA8B,CAAA;AAErC,OAAO,
|
|
1
|
+
{"version":3,"file":"experimental.d.ts","sourceRoot":"","sources":["../src/experimental.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAC,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,GAC1B,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAC,OAAO,EAAE,KAAK,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAE/D,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,GAC/B,MAAM,8BAA8B,CAAA;AAErC,OAAO,EACL,KAAK,EACL,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,GACvB,MAAM,wBAAwB,CAAA"}
|
package/dist/experimental.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { D as Dialog, P as PageHeader } from './PageHeader-DCDIR2C1.js';
|
|
2
2
|
export { T as Tooltip } from './Tooltip-YuSlJ5b_.js';
|
|
3
|
-
import { UnderlinePanels as UnderlinePanels$1 } from '@primer/react/experimental';
|
|
4
|
-
export { Table } from '@primer/react/experimental';
|
|
3
|
+
import { UnderlinePanels as UnderlinePanels$1, Table as Table$1 } from '@primer/react/experimental';
|
|
5
4
|
import styled from 'styled-components';
|
|
6
5
|
import { sx } from '@primer/react';
|
|
7
6
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -29,4 +28,30 @@ const UnderlinePanels = Object.assign(UnderlinePanelsImpl, {
|
|
|
29
28
|
Panel: UnderlinePanels$1.Panel
|
|
30
29
|
});
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
const {
|
|
32
|
+
Container: PrimerDataTableContainer,
|
|
33
|
+
...rest
|
|
34
|
+
} = Table$1;
|
|
35
|
+
const StyleDataTableContainer = styled(PrimerDataTableContainer).withConfig({
|
|
36
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
37
|
+
}).withConfig({
|
|
38
|
+
displayName: "DataTable__StyleDataTableContainer",
|
|
39
|
+
componentId: "sc-qy1ey2-0"
|
|
40
|
+
})(["", ""], sx);
|
|
41
|
+
function DataTableContainer({
|
|
42
|
+
as,
|
|
43
|
+
...rest
|
|
44
|
+
}) {
|
|
45
|
+
return /*#__PURE__*/jsx(StyleDataTableContainer, {
|
|
46
|
+
...rest,
|
|
47
|
+
...(as ? {
|
|
48
|
+
forwardedAs: as
|
|
49
|
+
} : {})
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
const Table = Object.assign(Table$1, {
|
|
53
|
+
Container: DataTableContainer,
|
|
54
|
+
...rest
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export { Table, UnderlinePanels };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
export { ActionList } from '@primer/react';
|
|
2
1
|
export { Box, type BoxProps } from './components/Box';
|
|
3
|
-
export { Button } from '@primer/react';
|
|
4
2
|
export { Details } from '@primer/react';
|
|
5
|
-
export { IconButton } from '@primer/react';
|
|
6
3
|
export { ProgressBar } from '@primer/react';
|
|
7
4
|
export { Select } from '@primer/react';
|
|
8
|
-
export { Textarea } from '@primer/react';
|
|
9
|
-
export { TextInput } from '@primer/react';
|
|
10
|
-
export { type TextInputProps } from '@primer/react';
|
|
11
5
|
export { ThemeProvider } from '@primer/react';
|
|
12
6
|
export { merge } from '@primer/react';
|
|
13
7
|
export { theme } from '@primer/react';
|
|
14
8
|
export { themeGet } from '@primer/react';
|
|
15
9
|
export { useColorSchemeVar } from '@primer/react';
|
|
16
10
|
export { useTheme } from '@primer/react';
|
|
11
|
+
export { ActionList, type ActionListProps, type ActionListItemProps, type ActionListLinkItemProps, type ActionListGroupProps, type ActionListDividerProps, type ActionListLeadingVisualProps, type ActionListTrailingVisualProps, type ActionListTrailingActionProps, } from './components/ActionList';
|
|
17
12
|
export { ActionMenu } from './components/ActionMenu';
|
|
18
13
|
export { Autocomplete, type AutocompleteOverlayProps } from './components/Autocomplete';
|
|
19
14
|
export { Avatar, type AvatarProps } from './components/Avatar';
|
|
20
15
|
export { Breadcrumbs, Breadcrumb, type BreadcrumbsProps, type BreadcrumbsItemProps } from './components/Breadcrumbs';
|
|
16
|
+
export { ButtonComponent as Button, type ButtonComponentProps as ButtonProps } from './components/Button';
|
|
21
17
|
export { Checkbox, type CheckboxProps } from './components/Checkbox';
|
|
22
18
|
export { CheckboxGroup, type CheckboxGroupProps } from './components/CheckboxGroup';
|
|
23
19
|
export { CircleBadge } from './components/CircleBadge';
|
|
@@ -27,6 +23,7 @@ export { Flash } from './components/Flash';
|
|
|
27
23
|
export { FormControl, type FormControlProps } from './components/FormControl';
|
|
28
24
|
export { Header, type HeaderProps } from './components/Header';
|
|
29
25
|
export { Heading } from './components/Heading';
|
|
26
|
+
export { IconButton, type IconButtonProps } from './components/IconButton';
|
|
30
27
|
export { Label, type LabelProps } from './components/Label';
|
|
31
28
|
export { Link, type LinkProps } from './components/Link';
|
|
32
29
|
export { LinkButton, type LinkButtonProps } from './components/LinkButton';
|
|
@@ -41,6 +38,8 @@ export { Spinner, type SpinnerProps } from './components/Spinner';
|
|
|
41
38
|
export { StateLabel, type StateLabelProps } from './components/StateLabel';
|
|
42
39
|
export { SubNav, type SubNavProps, type SubNavLinkProps } from './components/SubNav';
|
|
43
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';
|
|
44
43
|
export { Timeline, type TimelineProps, type TimelineItemProps, type TimelineBadgeProps, type TimelineBodyProps, type TimelineBreakProps, } from './components/Timeline';
|
|
45
44
|
export { ToggleSwitch, type ToggleSwitchProps } from './components/ToggleSwitch';
|
|
46
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":"AAAA,OAAO,EAAC,
|
|
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,MAAM,EAAC,MAAM,eAAe,CAAA;AAGpC,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,oBAAoB,EAAC,MAAM,0BAA0B,CAAA;AAClH,OAAO,EAAC,eAAe,IAAI,MAAM,EAAE,KAAK,oBAAoB,IAAI,WAA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,MAAM,CAAA;AAEpC,YAAY,EAAC,uBAAuB,EAAC,MAAM,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,118 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import styled from 'styled-components';
|
|
1
|
+
import { ActionList as ActionList$1, sx, ActionMenu as ActionMenu$1, Autocomplete as Autocomplete$1, Box, Avatar as Avatar$1, Breadcrumbs as Breadcrumbs$1, Button, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CircleBadge as CircleBadge$1, CounterLabel as CounterLabel$1, Flash as Flash$1, FormControl as FormControl$1, Header as Header$1, Heading as Heading$1, IconButton as IconButton$1, Label as Label$1, Link as Link$1, LinkButton as LinkButton$1, NavList as NavList$1, Overlay as Overlay$1, PageLayout as PageLayout$1, RadioGroup as RadioGroup$1, RelativeTime as RelativeTime$1, SegmentedControl as SegmentedControl$1, Spinner as Spinner$1, StateLabel as StateLabel$1, SubNav as SubNav$1, Text as Text$1, Textarea as Textarea$1, TextInput as TextInput$1, Timeline as Timeline$1, ToggleSwitch as ToggleSwitch$1, useTheme, theme, Token as Token$1, Truncate as Truncate$1, UnderlineNav as UnderlineNav$1 } from '@primer/react';
|
|
2
|
+
export { Box, Details, ProgressBar, Select, ThemeProvider, merge, sx, theme, themeGet, useColorSchemeVar, useTheme } from '@primer/react';
|
|
4
3
|
import React, { forwardRef } from 'react';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
export { D as Dialog, P as PageHeader } from './PageHeader-DCDIR2C1.js';
|
|
7
7
|
export { T as Tooltip } from './Tooltip-YuSlJ5b_.js';
|
|
8
8
|
import css from '@styled-system/css';
|
|
9
9
|
import '@primer/react/deprecated';
|
|
10
10
|
|
|
11
|
+
const StyledActionList = styled(ActionList$1).withConfig({
|
|
12
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
13
|
+
}).withConfig({
|
|
14
|
+
displayName: "ActionList__StyledActionList",
|
|
15
|
+
componentId: "sc-hw2362-0"
|
|
16
|
+
})(["", ""], sx);
|
|
17
|
+
const ActionListImpl = /*#__PURE__*/React.forwardRef(function ActionListImpl({
|
|
18
|
+
as,
|
|
19
|
+
...rest
|
|
20
|
+
}, ref) {
|
|
21
|
+
return /*#__PURE__*/jsx(StyledActionList, {
|
|
22
|
+
ref: ref,
|
|
23
|
+
...rest,
|
|
24
|
+
...(as ? {
|
|
25
|
+
forwardedAs: as
|
|
26
|
+
} : {})
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
const StyledActionListLinkItem = styled(ActionList$1.LinkItem).withConfig({
|
|
30
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
31
|
+
}).withConfig({
|
|
32
|
+
displayName: "ActionList__StyledActionListLinkItem",
|
|
33
|
+
componentId: "sc-hw2362-1"
|
|
34
|
+
})(["", ""], sx);
|
|
35
|
+
const ActionListLinkItem = /*#__PURE__*/React.forwardRef(({
|
|
36
|
+
as,
|
|
37
|
+
...props
|
|
38
|
+
}, ref) => /*#__PURE__*/jsx(StyledActionListLinkItem, {
|
|
39
|
+
...props,
|
|
40
|
+
...(as ? {
|
|
41
|
+
forwardedAs: as
|
|
42
|
+
} : {}),
|
|
43
|
+
ref: ref
|
|
44
|
+
}));
|
|
45
|
+
const StyledActionListTrailingAction = styled(ActionList$1.TrailingAction).withConfig({
|
|
46
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
47
|
+
}).withConfig({
|
|
48
|
+
displayName: "ActionList__StyledActionListTrailingAction",
|
|
49
|
+
componentId: "sc-hw2362-2"
|
|
50
|
+
})(["", ""], sx);
|
|
51
|
+
const ActionListTrailingAction = /*#__PURE__*/React.forwardRef(({
|
|
52
|
+
as,
|
|
53
|
+
...props
|
|
54
|
+
}, ref) => /*#__PURE__*/jsx(StyledActionListTrailingAction, {
|
|
55
|
+
...props,
|
|
56
|
+
...(as ? {
|
|
57
|
+
forwardedAs: as
|
|
58
|
+
} : {}),
|
|
59
|
+
ref: ref
|
|
60
|
+
}));
|
|
61
|
+
const StyledActionListItem = styled(ActionList$1.Item).withConfig({
|
|
62
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
63
|
+
}).withConfig({
|
|
64
|
+
displayName: "ActionList__StyledActionListItem",
|
|
65
|
+
componentId: "sc-hw2362-3"
|
|
66
|
+
})(["", ""], sx);
|
|
67
|
+
const ActionListItem = /*#__PURE__*/React.forwardRef(({
|
|
68
|
+
children,
|
|
69
|
+
as,
|
|
70
|
+
...props
|
|
71
|
+
}, ref) => /*#__PURE__*/jsx(StyledActionListItem, {
|
|
72
|
+
ref: ref,
|
|
73
|
+
...props,
|
|
74
|
+
...(as ? {
|
|
75
|
+
forwardedAs: as
|
|
76
|
+
} : {}),
|
|
77
|
+
children: children
|
|
78
|
+
}));
|
|
79
|
+
const ActionListGroup = styled(ActionList$1.Group).withConfig({
|
|
80
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
81
|
+
}).withConfig({
|
|
82
|
+
displayName: "ActionList__ActionListGroup",
|
|
83
|
+
componentId: "sc-hw2362-4"
|
|
84
|
+
})(["", ""], sx);
|
|
85
|
+
const ActionListDivider = styled(ActionList$1.Divider).withConfig({
|
|
86
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
87
|
+
}).withConfig({
|
|
88
|
+
displayName: "ActionList__ActionListDivider",
|
|
89
|
+
componentId: "sc-hw2362-5"
|
|
90
|
+
})(["", ""], sx);
|
|
91
|
+
const ActionListLeadingVisual = styled(ActionList$1.LeadingVisual).withConfig({
|
|
92
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
93
|
+
}).withConfig({
|
|
94
|
+
displayName: "ActionList__ActionListLeadingVisual",
|
|
95
|
+
componentId: "sc-hw2362-6"
|
|
96
|
+
})(["", ""], sx);
|
|
97
|
+
const ActionListTrailingVisual = styled(ActionList$1.TrailingVisual).withConfig({
|
|
98
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
99
|
+
}).withConfig({
|
|
100
|
+
displayName: "ActionList__ActionListTrailingVisual",
|
|
101
|
+
componentId: "sc-hw2362-7"
|
|
102
|
+
})(["", ""], sx);
|
|
103
|
+
const ActionList = Object.assign(ActionListImpl, {
|
|
104
|
+
Item: ActionListItem,
|
|
105
|
+
LinkItem: ActionListLinkItem,
|
|
106
|
+
Group: ActionListGroup,
|
|
107
|
+
GroupHeading: ActionList$1.GroupHeading,
|
|
108
|
+
Divider: ActionListDivider,
|
|
109
|
+
Description: ActionList$1.Description,
|
|
110
|
+
LeadingVisual: ActionListLeadingVisual,
|
|
111
|
+
TrailingVisual: ActionListTrailingVisual,
|
|
112
|
+
Heading: ActionList$1.Heading,
|
|
113
|
+
TrailingAction: ActionListTrailingAction
|
|
114
|
+
});
|
|
115
|
+
|
|
11
116
|
const ActionMenuOverlay = styled(ActionMenu$1.Overlay).withConfig({
|
|
12
117
|
shouldForwardProp: prop => prop !== 'sx'
|
|
13
118
|
}).withConfig({
|
|
@@ -27,9 +132,15 @@ const AutocompleteOverlay = styled(Autocomplete$1.Overlay).withConfig({
|
|
|
27
132
|
displayName: "Autocomplete__AutocompleteOverlay",
|
|
28
133
|
componentId: "sc-j8ax2e-0"
|
|
29
134
|
})(["", ""], sx);
|
|
135
|
+
const AutocompleteInput = styled(Autocomplete$1.Input).withConfig({
|
|
136
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
137
|
+
}).withConfig({
|
|
138
|
+
displayName: "Autocomplete__AutocompleteInput",
|
|
139
|
+
componentId: "sc-j8ax2e-1"
|
|
140
|
+
})(["", ""], sx);
|
|
30
141
|
const Autocomplete = Object.assign(Autocomplete$1, {
|
|
31
142
|
Context: Autocomplete$1.Context,
|
|
32
|
-
Input:
|
|
143
|
+
Input: AutocompleteInput,
|
|
33
144
|
Menu: Autocomplete$1.Menu,
|
|
34
145
|
Overlay: AutocompleteOverlay
|
|
35
146
|
});
|
|
@@ -74,6 +185,108 @@ const Breadcrumbs = Object.assign(BreadcrumbsImpl, {
|
|
|
74
185
|
*/
|
|
75
186
|
const Breadcrumb = Breadcrumbs;
|
|
76
187
|
|
|
188
|
+
const StyledButtonComponent = /*#__PURE__*/forwardRef(({
|
|
189
|
+
sx,
|
|
190
|
+
...rest
|
|
191
|
+
}, ref) => {
|
|
192
|
+
const {
|
|
193
|
+
block,
|
|
194
|
+
size = 'medium',
|
|
195
|
+
leadingVisual,
|
|
196
|
+
trailingVisual,
|
|
197
|
+
trailingAction
|
|
198
|
+
} = rest;
|
|
199
|
+
let sxStyles = {};
|
|
200
|
+
const style = {};
|
|
201
|
+
if (sx !== null && Object.keys(sx || {}).length > 0) {
|
|
202
|
+
sxStyles = generateCustomSxProp({
|
|
203
|
+
block,
|
|
204
|
+
size,
|
|
205
|
+
leadingVisual,
|
|
206
|
+
trailingVisual,
|
|
207
|
+
trailingAction
|
|
208
|
+
}, sx);
|
|
209
|
+
const {
|
|
210
|
+
color
|
|
211
|
+
} = sx;
|
|
212
|
+
if (color) style['--button-color'] = color;
|
|
213
|
+
}
|
|
214
|
+
return /*#__PURE__*/jsx(Box, {
|
|
215
|
+
as: Button,
|
|
216
|
+
style: style,
|
|
217
|
+
sx: sxStyles,
|
|
218
|
+
ref: ref,
|
|
219
|
+
...rest
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
const ButtonComponent = /*#__PURE__*/forwardRef(({
|
|
223
|
+
as,
|
|
224
|
+
...props
|
|
225
|
+
}, ref) => /*#__PURE__*/jsx(StyledButtonComponent, {
|
|
226
|
+
ref: ref,
|
|
227
|
+
...props,
|
|
228
|
+
...(as ? {
|
|
229
|
+
forwardedAs: as
|
|
230
|
+
} : {})
|
|
231
|
+
}));
|
|
232
|
+
|
|
233
|
+
// This function is used to generate a custom cssSelector for the sxProp
|
|
234
|
+
|
|
235
|
+
// The usual sx prop can like this:
|
|
236
|
+
// sx={{
|
|
237
|
+
// [`@media (max-width: 768px)`]: {
|
|
238
|
+
// '& > ul': {
|
|
239
|
+
// backgroundColor: 'deeppink',
|
|
240
|
+
// },
|
|
241
|
+
// '&:hover': {
|
|
242
|
+
// backgroundColor: 'yellow',
|
|
243
|
+
// },
|
|
244
|
+
// },
|
|
245
|
+
// '&:hover': {
|
|
246
|
+
// backgroundColor: 'yellow',
|
|
247
|
+
// },
|
|
248
|
+
// '&': {
|
|
249
|
+
// width : 320px
|
|
250
|
+
// }
|
|
251
|
+
// }}
|
|
252
|
+
//*
|
|
253
|
+
/* What we want for Button styles is this:
|
|
254
|
+
sx={{
|
|
255
|
+
// [`@media (max-width: 768px)`]: {
|
|
256
|
+
// '&[data-attribute="something"] > ul': {
|
|
257
|
+
// backgroundColor: 'deeppink',
|
|
258
|
+
// },
|
|
259
|
+
// '&[data-attribute="something"]:hover': {
|
|
260
|
+
// backgroundColor: 'yellow',
|
|
261
|
+
// },
|
|
262
|
+
// },
|
|
263
|
+
// '&[data-attribute="something"]:hover': {
|
|
264
|
+
// backgroundColor: 'yellow',
|
|
265
|
+
// },
|
|
266
|
+
// '&[data-attribute="something"]': {
|
|
267
|
+
// width : 320px
|
|
268
|
+
// }
|
|
269
|
+
// }}
|
|
270
|
+
|
|
271
|
+
// We need to make sure we append the customCSSSelector to the original class selector. i.e & - > &[data-attribute="Icon"][data-size="small"]
|
|
272
|
+
*/
|
|
273
|
+
function generateCustomSxProp(props, providedSx) {
|
|
274
|
+
// Possible data attributes: data-size, data-block, data-no-visuals
|
|
275
|
+
const size = `[data-size="${props.size}"]`;
|
|
276
|
+
const block = props.block ? `[data-block="block"]` : '';
|
|
277
|
+
const noVisuals = props.leadingVisual || props.trailingVisual || props.trailingAction ? '' : '[data-no-visuals]';
|
|
278
|
+
|
|
279
|
+
// this is a custom selector. We need to make sure we add the data attributes to the base css class (& -> &[data-attributename="value"]])
|
|
280
|
+
const cssSelector = `&${size}${block}${noVisuals}`; // &[data-size="small"][data-block="block"][data-no-visuals]
|
|
281
|
+
|
|
282
|
+
const customSxProp = {};
|
|
283
|
+
if (!providedSx) return customSxProp;else {
|
|
284
|
+
customSxProp[cssSelector] = providedSx;
|
|
285
|
+
return customSxProp;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
ButtonComponent.displayName = 'Button';
|
|
289
|
+
|
|
77
290
|
const Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, ref) {
|
|
78
291
|
return /*#__PURE__*/jsx(Box, {
|
|
79
292
|
as: Checkbox$1,
|
|
@@ -144,28 +357,10 @@ const FormControlImpl = /*#__PURE__*/forwardRef(function FormControl(props, ref)
|
|
|
144
357
|
...props
|
|
145
358
|
});
|
|
146
359
|
});
|
|
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
|
-
};
|
|
165
360
|
const FormControl = Object.assign(FormControlImpl, {
|
|
166
|
-
Caption:
|
|
167
|
-
LeadingVisual:
|
|
168
|
-
Validation:
|
|
361
|
+
Caption: FormControl$1.Caption,
|
|
362
|
+
LeadingVisual: FormControl$1.LeadingVisual,
|
|
363
|
+
Validation: FormControl$1.Validation,
|
|
169
364
|
Label: FormControl$1.Label
|
|
170
365
|
});
|
|
171
366
|
|
|
@@ -222,6 +417,38 @@ const Heading = styled(Heading$1).withConfig({
|
|
|
222
417
|
componentId: "sc-1vc165i-0"
|
|
223
418
|
})(["", ""], sx);
|
|
224
419
|
|
|
420
|
+
const StyledIconButton = /*#__PURE__*/forwardRef(({
|
|
421
|
+
sx,
|
|
422
|
+
...rest
|
|
423
|
+
}, ref) => {
|
|
424
|
+
let sxStyles = sx;
|
|
425
|
+
// grap the button props that have associated data attributes in the styles
|
|
426
|
+
const {
|
|
427
|
+
size = 'medium'
|
|
428
|
+
} = rest;
|
|
429
|
+
if (sx !== null && sx !== undefined && Object.keys(sx).length > 0) {
|
|
430
|
+
sxStyles = generateCustomSxProp({
|
|
431
|
+
size
|
|
432
|
+
}, sx);
|
|
433
|
+
}
|
|
434
|
+
return /*#__PURE__*/jsx(Box, {
|
|
435
|
+
sx: sxStyles,
|
|
436
|
+
as: IconButton$1,
|
|
437
|
+
ref: ref,
|
|
438
|
+
...rest
|
|
439
|
+
});
|
|
440
|
+
});
|
|
441
|
+
const IconButton = /*#__PURE__*/forwardRef(({
|
|
442
|
+
as,
|
|
443
|
+
...props
|
|
444
|
+
}, ref) => /*#__PURE__*/jsx(StyledIconButton, {
|
|
445
|
+
...props,
|
|
446
|
+
...(as ? {
|
|
447
|
+
forwardedAs: as
|
|
448
|
+
} : {}),
|
|
449
|
+
ref: ref
|
|
450
|
+
}));
|
|
451
|
+
|
|
225
452
|
const StyledLabel = /*#__PURE__*/forwardRef(function Label(props, ref) {
|
|
226
453
|
return /*#__PURE__*/jsx(Box, {
|
|
227
454
|
as: Label$1,
|
|
@@ -291,18 +518,31 @@ const NavListGroup = /*#__PURE__*/forwardRef(function NavListGroup(props, ref) {
|
|
|
291
518
|
...props
|
|
292
519
|
});
|
|
293
520
|
});
|
|
521
|
+
const NavListGroupHeading = /*#__PURE__*/forwardRef(function NavListGroupHeading(props, ref) {
|
|
522
|
+
// @ts-expect-error - PrimerNavList.GroupHeading is not recognized as a valid component type
|
|
523
|
+
return /*#__PURE__*/jsx(Box, {
|
|
524
|
+
as: NavList$1.GroupHeading,
|
|
525
|
+
ref: ref,
|
|
526
|
+
...props
|
|
527
|
+
});
|
|
528
|
+
});
|
|
529
|
+
const NavListLeadingVisual = /*#__PURE__*/forwardRef(function NavListLeadingVisual(props, ref) {
|
|
530
|
+
// @ts-expect-error - PrimerNavList.LeadingVisual is not recognized as a valid component type
|
|
531
|
+
return /*#__PURE__*/jsx(Box, {
|
|
532
|
+
as: NavList$1.LeadingVisual,
|
|
533
|
+
ref: ref,
|
|
534
|
+
...props
|
|
535
|
+
});
|
|
536
|
+
});
|
|
294
537
|
const NavList = Object.assign(NavListImpl, {
|
|
295
|
-
// Wrapped components that need sx support added back in
|
|
296
538
|
Item: NavListItem,
|
|
297
539
|
Group: NavListGroup,
|
|
298
|
-
|
|
299
|
-
|
|
540
|
+
GroupHeading: NavListGroupHeading,
|
|
541
|
+
LeadingVisual: NavListLeadingVisual,
|
|
300
542
|
SubNav: NavList$1.SubNav,
|
|
301
543
|
Divider: NavList$1.Divider,
|
|
302
|
-
LeadingVisual: NavList$1.LeadingVisual,
|
|
303
544
|
TrailingVisual: NavList$1.TrailingVisual,
|
|
304
545
|
TrailingAction: NavList$1.TrailingAction,
|
|
305
|
-
GroupHeading: NavList$1.GroupHeading,
|
|
306
546
|
GroupExpand: NavList$1.GroupExpand
|
|
307
547
|
});
|
|
308
548
|
|
|
@@ -332,14 +572,6 @@ const PageLayoutContent = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
332
572
|
...props
|
|
333
573
|
});
|
|
334
574
|
});
|
|
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
575
|
const PageLayoutPane = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
344
576
|
return /*#__PURE__*/jsx(Wrapper, {
|
|
345
577
|
as: PageLayout$1.Pane,
|
|
@@ -347,19 +579,11 @@ const PageLayoutPane = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
347
579
|
...props
|
|
348
580
|
});
|
|
349
581
|
});
|
|
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
|
-
});
|
|
358
582
|
const PageLayout = Object.assign(PageLayoutImpl, {
|
|
359
583
|
Content: PageLayoutContent,
|
|
360
|
-
Header:
|
|
584
|
+
Header: PageLayout$1.Header,
|
|
361
585
|
Pane: PageLayoutPane,
|
|
362
|
-
Footer:
|
|
586
|
+
Footer: PageLayout$1.Footer
|
|
363
587
|
});
|
|
364
588
|
|
|
365
589
|
const RadioGroupImpl = props => {
|
|
@@ -479,6 +703,57 @@ const Text = /*#__PURE__*/forwardRef(({
|
|
|
479
703
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
480
704
|
});
|
|
481
705
|
|
|
706
|
+
const StyledTextarea = styled(Textarea$1).withConfig({
|
|
707
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
708
|
+
}).withConfig({
|
|
709
|
+
displayName: "Textarea__StyledTextarea",
|
|
710
|
+
componentId: "sc-40d1gp-0"
|
|
711
|
+
})(["", ""], sx);
|
|
712
|
+
const Textarea = /*#__PURE__*/forwardRef(({
|
|
713
|
+
as,
|
|
714
|
+
...props
|
|
715
|
+
}, ref) => {
|
|
716
|
+
return /*#__PURE__*/jsx(StyledTextarea, {
|
|
717
|
+
...props,
|
|
718
|
+
...(as ? {
|
|
719
|
+
forwardedAs: as
|
|
720
|
+
} : {}),
|
|
721
|
+
ref: ref
|
|
722
|
+
});
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
const StyledTextInput = /*#__PURE__*/forwardRef((props, ref) => {
|
|
726
|
+
return /*#__PURE__*/jsx(Box, {
|
|
727
|
+
as: TextInput$1,
|
|
728
|
+
ref: ref,
|
|
729
|
+
...props
|
|
730
|
+
});
|
|
731
|
+
});
|
|
732
|
+
const TextInputImpl = /*#__PURE__*/forwardRef(({
|
|
733
|
+
as,
|
|
734
|
+
...props
|
|
735
|
+
}, ref) => {
|
|
736
|
+
return /*#__PURE__*/jsx(StyledTextInput, {
|
|
737
|
+
ref: ref,
|
|
738
|
+
...props,
|
|
739
|
+
...(as ? {
|
|
740
|
+
forwardedAs: as
|
|
741
|
+
} : {})
|
|
742
|
+
});
|
|
743
|
+
});
|
|
744
|
+
const TextInputAction = /*#__PURE__*/forwardRef((props, ref) => {
|
|
745
|
+
return /*#__PURE__*/jsx(Box, {
|
|
746
|
+
as: TextInput$1.Action,
|
|
747
|
+
ref: ref,
|
|
748
|
+
...props
|
|
749
|
+
});
|
|
750
|
+
});
|
|
751
|
+
const TextInput = Object.assign(TextInputImpl, {
|
|
752
|
+
Action: TextInputAction
|
|
753
|
+
});
|
|
754
|
+
TextInputAction.displayName = 'TextInputAction';
|
|
755
|
+
TextInputImpl.displayName = 'TextInput';
|
|
756
|
+
|
|
482
757
|
const TimelineImpl = /*#__PURE__*/forwardRef(function Timeline(props, ref) {
|
|
483
758
|
return /*#__PURE__*/jsx(Box, {
|
|
484
759
|
as: Timeline$1,
|
|
@@ -602,4 +877,4 @@ const UnderlineNav = Object.assign(UnderlineNavImpl, {
|
|
|
602
877
|
Item: UnderlineNavItem
|
|
603
878
|
});
|
|
604
879
|
|
|
605
|
-
export { ActionMenu, Autocomplete, Avatar, Breadcrumb, Breadcrumbs, Checkbox, CheckboxGroup, CircleBadge, CounterLabel, Flash, FormControl, Header, Heading, Label, Link, LinkButton, NavList, Overlay, PageLayout, RadioGroup, RelativeTime, SegmentedControl, Spinner, StateLabel, SubNav, Text, Timeline, ToggleSwitch, Token, Truncate, UnderlineNav };
|
|
880
|
+
export { ActionList, ActionMenu, Autocomplete, Avatar, Breadcrumb, Breadcrumbs, ButtonComponent as Button, Checkbox, CheckboxGroup, CircleBadge, CounterLabel, Flash, FormControl, Header, Heading, IconButton, Label, Link, LinkButton, NavList, Overlay, PageLayout, RadioGroup, RelativeTime, SegmentedControl, Spinner, StateLabel, SubNav, Text, TextInput, Textarea, Timeline, ToggleSwitch, Token, Truncate, UnderlineNav };
|
package/dist/sx.d.ts
CHANGED
package/dist/sx.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sx.d.ts","sourceRoot":"","sources":["../src/sx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAE,KAAK,MAAM,EAAC,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"sx.d.ts","sourceRoot":"","sources":["../src/sx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAE,KAAK,MAAM,EAAC,MAAM,eAAe,CAAA;AAC7C,MAAM,MAAM,mBAAmB,GAAG;IAChC,CAAC,GAAG,EAAE,KAAK,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,CAAA;CACtC,CAAA"}
|
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-20251003055239",
|
|
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-20251003055239",
|
|
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-20251003055239",
|
|
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",
|