@theroutingcompany/components 0.0.44-alpha.1 → 0.0.44-alpha.2
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/trc-components.es.js +23937 -24413
- package/dist/trc-components.es.js.map +1 -1
- package/dist/trc-components.umd.js +1690 -1868
- package/dist/trc-components.umd.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/types/components/Accordion/Accordion.d.ts +7 -8
- package/types/components/AlertDialog/AlertDialog.d.ts +2 -5
- package/types/components/Banner/Banner.d.ts +2 -2
- package/types/components/Banner/styles.d.ts +2 -2
- package/types/components/Box/Box.d.ts +1 -0
- package/types/components/Button/Button.d.ts +1 -1
- package/types/components/ButtonV2/ButtonV2.d.ts +2 -4
- package/types/components/ButtonV2/styles.d.ts +2 -2
- package/types/components/Dialog/Dialog.d.ts +5 -4
- package/types/components/FormControl/FormControl.d.ts +8 -8
- package/types/components/Inline/Inline.d.ts +0 -0
- package/types/components/Input/InlineEdit/InlineEdit.d.ts +1 -2
- package/types/components/LabeledText/LabeledText.d.ts +2 -1
- package/types/components/ListBox/ListBox.d.ts +2 -2
- package/types/components/Page/PageHeader.d.ts +1 -1
- package/types/components/SingleSelect/SingleSelect.d.ts +1 -1
- package/types/components/Tabs/Tabs.d.ts +8 -18
- package/types/components/Text/Text.d.ts +4 -3
- package/types/components/Toast/Toast.d.ts +6 -7
- package/types/components/index.d.ts +7 -11
- package/types/helpers/keyEvents.d.ts +1 -1
- package/types/hooks/useWindowEvent.d.ts +1 -1
- package/types/utils/index.d.ts +1 -1
- package/types/components/Modal/Content.d.ts +0 -11
- package/types/components/Modal/Footer.d.ts +0 -6
- package/types/components/Modal/Header.d.ts +0 -7
- package/types/components/Modal/Modal.d.ts +0 -29
- package/types/components/Modal/context.d.ts +0 -11
- package/types/components/Modal/index.d.ts +0 -5
- package/types/components/Modal/styles.d.ts +0 -6
- package/types/components/Panel/Panel.d.ts +0 -8
- package/types/components/TabList/TabList.d.ts +0 -18
- package/types/hooks/useModal.d.ts +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theroutingcompany/components",
|
|
3
|
-
"version": "0.0.44-alpha.
|
|
3
|
+
"version": "0.0.44-alpha.2",
|
|
4
4
|
"description": "The Routing Company Components",
|
|
5
5
|
"main": "./dist/trc-components.umd.js",
|
|
6
6
|
"module": "./dist/trc-components.es.js",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"types"
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
|
+
"link:tokens": "./scripts/link-tokens.sh",
|
|
24
25
|
"debug:reset:modules": "rm -f -- package-lock.json && rm -rf node_modules && npm i",
|
|
25
26
|
"break:cache": "rm -rf node_modules && npm i --package-lock && npm run start --force",
|
|
26
27
|
"ready:prerelease": "npm run build && ./scripts/prerelease.sh",
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
export declare const SectionTitle: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
4
|
-
export
|
|
4
|
+
export type SectionHeaderProps = {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
icon?: ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export declare function SectionHeader({ children, icon
|
|
9
|
-
export interface AccordionProps {
|
|
10
|
-
children: ReactNode;
|
|
11
|
-
type: 'multiple' | 'single';
|
|
12
|
-
}
|
|
7
|
+
};
|
|
8
|
+
export declare function SectionHeader({ children, icon }: SectionHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
13
9
|
declare const Accordion: {
|
|
14
|
-
({ children, type, ...rest }:
|
|
10
|
+
({ children, type, ...rest }: {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
type: 'multiple' | 'single';
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
displayName: string;
|
|
16
15
|
Item: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<AccordionPrimitive.AccordionItemProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
17
16
|
Header: typeof SectionHeader;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
2
|
-
import { dialogWidths } from 'components/Modal';
|
|
3
1
|
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
|
+
import { dialogWidths } from '../../components/Dialog/Dialog';
|
|
4
4
|
type DialogWidth = keyof typeof dialogWidths;
|
|
5
5
|
type StyledContentProps = {
|
|
6
6
|
size?: DialogWidth;
|
|
@@ -10,9 +10,6 @@ export declare function AlertDialogContent({ children, size, ...props }: AlertDi
|
|
|
10
10
|
export declare const AlertDialogTitle: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>, any, {}, never>;
|
|
11
11
|
export declare const AlertDialogDescription: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>, any, {}, never>;
|
|
12
12
|
export declare const AlertDialogFooter: import("styled-components").StyledComponent<"footer", any, {}, never>;
|
|
13
|
-
/** @deprecated
|
|
14
|
-
* radix-ui/react-dialog dialogs are not compatible with react-aria Overlays (popovers/modals). Use <Modal instead
|
|
15
|
-
*/
|
|
16
13
|
export declare const AlertDialog: import("react").FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
17
14
|
export declare const AlertDialogTrigger: import("react").ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
18
15
|
export declare const AlertDialogAction: import("react").ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogActionProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -5,11 +5,11 @@ declare const INFO_VARIANT = "info";
|
|
|
5
5
|
declare const SUCCESS_VARIANT = "success";
|
|
6
6
|
declare const WARNING_VARIANT = "warning";
|
|
7
7
|
declare const ERROR_VARIANT = "danger";
|
|
8
|
-
export type
|
|
8
|
+
export type Variant = typeof DEFAULT_VARIANT | typeof INFO_VARIANT | typeof SUCCESS_VARIANT | typeof WARNING_VARIANT | typeof ERROR_VARIANT;
|
|
9
9
|
interface BannerProps extends React.ComponentPropsWithRef<'div'> {
|
|
10
10
|
'data-id'?: string;
|
|
11
11
|
title?: string;
|
|
12
|
-
variant?:
|
|
12
|
+
variant?: Variant;
|
|
13
13
|
layout?: 'default' | 'inline';
|
|
14
14
|
onDismiss?: (any: any) => void;
|
|
15
15
|
}
|
|
@@ -13,5 +13,6 @@ ShadowProps, CustomSpaceProps, TypographyProps {
|
|
|
13
13
|
}
|
|
14
14
|
type PolymorphicBox = Polymorphic.ForwardRefComponent<'div', BoxProps>;
|
|
15
15
|
export declare const boxSystem: import("styled-system").styleFn;
|
|
16
|
+
export declare const getTruncate: () => string;
|
|
16
17
|
export declare const Box: PolymorphicBox;
|
|
17
18
|
export default Box;
|
|
@@ -24,7 +24,7 @@ export type ButtonProps = Prettify<PropsWithChildren<ButtonDesignProps & ReactAr
|
|
|
24
24
|
onClick?: ReactAriaProps['onPress'];
|
|
25
25
|
} & Pick<ComponentPropsWithoutRef<'button'>, 'form'>>>;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Deprecated. Use ButtonV2 instead.
|
|
28
28
|
*/
|
|
29
29
|
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
30
30
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type BoxProps } from 'components/Box/Box';
|
|
3
3
|
import { type ClickHandler, type FocusHandler, type ForwardRefComponent } from 'helpers';
|
|
4
|
-
export type
|
|
4
|
+
export type Variant = 'primary' | 'secondary' | 'tertiary' | 'danger';
|
|
5
5
|
export type Size = 'small' | 'large';
|
|
6
6
|
export declare const buttonV2System: import("styled-system").styleFn;
|
|
7
7
|
export declare const StyledButtonBox: import("styled-components").StyledComponent<ForwardRefComponent<"div", BoxProps>, any, any, never>;
|
|
@@ -10,13 +10,11 @@ export interface ButtonPropsV2 extends BoxProps {
|
|
|
10
10
|
as?: React.ElementType;
|
|
11
11
|
to?: string;
|
|
12
12
|
toTitle?: string;
|
|
13
|
-
|
|
14
|
-
variant?: ButtonVariant;
|
|
13
|
+
variant?: Variant;
|
|
15
14
|
inverse?: boolean;
|
|
16
15
|
disabled?: boolean;
|
|
17
16
|
size?: Size;
|
|
18
17
|
submit?: boolean;
|
|
19
|
-
type?: 'button' | 'submit' | 'reset';
|
|
20
18
|
children?: React.ReactNode;
|
|
21
19
|
className?: string;
|
|
22
20
|
onClick?: ClickHandler;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Size,
|
|
1
|
+
import type { Size, Variant } from './ButtonV2';
|
|
2
2
|
export declare const reset: () => string;
|
|
3
3
|
export declare const base: () => string;
|
|
4
4
|
export type LoadingProp = {
|
|
@@ -17,7 +17,7 @@ export declare const tertiary: import("styled-components").FlattenSimpleInterpol
|
|
|
17
17
|
export declare const inverse_tertiary: import("styled-components").FlattenSimpleInterpolation;
|
|
18
18
|
export declare const danger: import("styled-components").FlattenSimpleInterpolation;
|
|
19
19
|
export declare const inverse_danger: import("styled-components").FlattenSimpleInterpolation;
|
|
20
|
-
export declare const getVariantStyles: (variant:
|
|
20
|
+
export declare const getVariantStyles: (variant: Variant, inverse: boolean) => import("styled-components").FlattenSimpleInterpolation | undefined;
|
|
21
21
|
export declare const small: import("styled-components").FlattenSimpleInterpolation;
|
|
22
22
|
export declare const large: import("styled-components").FlattenSimpleInterpolation;
|
|
23
23
|
export declare const getDefaultSize: (size: Size) => import("styled-components").FlattenSimpleInterpolation | undefined;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
-
import { dialogWidths } from 'components/Modal';
|
|
3
2
|
import type { ComponentPropsWithRef } from 'react';
|
|
4
3
|
export declare const overlayStyles: import("styled-components").FlattenSimpleInterpolation;
|
|
4
|
+
export declare const dialogWidths: {
|
|
5
|
+
readonly small: "360px";
|
|
6
|
+
readonly medium: "540px";
|
|
7
|
+
readonly large: "960px";
|
|
8
|
+
};
|
|
5
9
|
type DialogWidth = keyof typeof dialogWidths;
|
|
6
10
|
type StyledContentProps = {
|
|
7
11
|
size?: DialogWidth;
|
|
@@ -17,9 +21,6 @@ export declare const DialogFooter: import("styled-components").StyledComponent<"
|
|
|
17
21
|
export declare const dialogCloseButtonStyles: import("styled-components").FlattenSimpleInterpolation;
|
|
18
22
|
/** Dialog Close Button positioned in top right with × */
|
|
19
23
|
export declare const DialogCloseButton: ({ children, ...buttonProps }: DialogPrimitive.DialogCloseProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
/** @deprecated
|
|
21
|
-
* radix-ui/react-dialog dialogs are not compatible with react-aria Overlays (popovers/modals). Use <Modal instead
|
|
22
|
-
*/
|
|
23
24
|
export declare const Dialog: import("react").FC<DialogPrimitive.DialogProps>;
|
|
24
25
|
export declare const DialogTrigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
25
26
|
export declare const DialogClose: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -14,7 +14,7 @@ export declare const TextFormControl: import("react").ForwardRefExoticComponent<
|
|
|
14
14
|
tooltipIcon?: ReactNode;
|
|
15
15
|
} & AriaTextFieldProps & {
|
|
16
16
|
children?: ReactNode;
|
|
17
|
-
} &
|
|
17
|
+
} & ComponentPropsWithoutStyles<"input"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
18
18
|
export declare const TextAreaFormControl: import("react").ForwardRefExoticComponent<{
|
|
19
19
|
tooltipContent?: string | undefined;
|
|
20
20
|
tooltipIcon?: ReactNode;
|
|
@@ -23,15 +23,19 @@ export declare const TextAreaFormControl: import("react").ForwardRefExoticCompon
|
|
|
23
23
|
} & ComponentPropsWithoutStyles<"textarea"> & {
|
|
24
24
|
label?: ReactNode;
|
|
25
25
|
pattern?: string | undefined;
|
|
26
|
-
id?: string | undefined;
|
|
27
|
-
name?: string | undefined;
|
|
28
26
|
type?: "search" | "text" | (string & {}) | "tel" | "url" | "email" | "password" | undefined;
|
|
27
|
+
name?: string | undefined;
|
|
28
|
+
defaultValue?: string | undefined;
|
|
29
|
+
autoFocus?: boolean | undefined;
|
|
30
|
+
id?: string | undefined;
|
|
31
|
+
placeholder?: string | undefined;
|
|
32
|
+
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
29
33
|
'aria-activedescendant'?: string | undefined;
|
|
30
34
|
'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
|
|
31
35
|
'aria-describedby'?: string | undefined;
|
|
32
36
|
'aria-details'?: string | undefined;
|
|
33
37
|
'aria-errormessage'?: string | undefined;
|
|
34
|
-
'aria-haspopup'?: boolean | "dialog" | "menu" | "
|
|
38
|
+
'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
|
|
35
39
|
'aria-label'?: string | undefined;
|
|
36
40
|
'aria-labelledby'?: string | undefined;
|
|
37
41
|
onCopy?: import("react").ClipboardEventHandler<HTMLInputElement> | undefined;
|
|
@@ -48,10 +52,6 @@ export declare const TextAreaFormControl: import("react").ForwardRefExoticCompon
|
|
|
48
52
|
onKeyDown?: ((e: import("@react-types/shared").KeyboardEvent) => void) | undefined;
|
|
49
53
|
onKeyUp?: ((e: import("@react-types/shared").KeyboardEvent) => void) | undefined;
|
|
50
54
|
onSelect?: import("react").ReactEventHandler<HTMLInputElement> | undefined;
|
|
51
|
-
defaultValue?: string | undefined;
|
|
52
|
-
autoFocus?: boolean | undefined;
|
|
53
|
-
placeholder?: string | undefined;
|
|
54
|
-
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
55
55
|
disabled?: boolean | undefined;
|
|
56
56
|
value?: string | undefined;
|
|
57
57
|
autoComplete?: string | undefined;
|
|
File without changes
|
|
@@ -20,9 +20,8 @@ export interface InlineEditProps extends ButtonPropsV2 {
|
|
|
20
20
|
valid?: boolean;
|
|
21
21
|
label?: string | ReactNode;
|
|
22
22
|
labelId?: string;
|
|
23
|
-
allowedOutsideClickContainers?: string[];
|
|
24
23
|
}
|
|
25
24
|
export declare const InlineEdit: {
|
|
26
|
-
({ children, placeholder, value, editValue, hideIcon, p, onChange, onToggle, onCancel, disabled, valid, label, labelId,
|
|
25
|
+
({ children, placeholder, value, editValue, hideIcon, p, onChange, onToggle, onCancel, disabled, valid, label, labelId, ...rest }: InlineEditProps): import("react/jsx-runtime").JSX.Element;
|
|
27
26
|
displayName: string;
|
|
28
27
|
};
|
|
@@ -2,6 +2,7 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
export interface LabeledTextProps {
|
|
3
3
|
label: string;
|
|
4
4
|
value: string | ReactNode;
|
|
5
|
+
truncate?: boolean;
|
|
5
6
|
}
|
|
6
|
-
declare const LabeledText: ({ label, value }: LabeledTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const LabeledText: ({ label, value, truncate }: LabeledTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export default LabeledText;
|
|
@@ -20,10 +20,10 @@ export declare function OptionLabel({ children }: {
|
|
|
20
20
|
export declare function OptionDescription({ children }: {
|
|
21
21
|
children: React.ReactNode;
|
|
22
22
|
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
interface
|
|
23
|
+
interface PopoverProps extends Omit<AriaPopoverProps, 'popoverRef'> {
|
|
24
24
|
children: React.ReactNode;
|
|
25
25
|
state: OverlayTriggerState;
|
|
26
26
|
popoverRef?: React.RefObject<HTMLDivElement>;
|
|
27
27
|
}
|
|
28
|
-
export declare function
|
|
28
|
+
export declare function Popover(props: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AriaSelectProps } from '@react-types/select';
|
|
2
|
-
export { Item as SingleSelectItem, Section as SingleSelectSection } from '@react-stately/collections';
|
|
2
|
+
export { Item as SingleSelectItem, Section as SingleSelectSection, } from '@react-stately/collections';
|
|
3
3
|
type SingleSelectProps<T> = AriaSelectProps<T> & {
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
tooltipIcon?: string;
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
interface TabsTriggerProps {
|
|
10
|
-
}
|
|
11
|
-
interface TabsContentProps {
|
|
12
|
-
}
|
|
13
|
-
type TabsComponent = StyledComponent<ForwardRefExoticComponent<TabsProps & RefAttributes<HTMLDivElement>, any> & {
|
|
14
|
-
List: ForwardRefExoticComponent<TabsListProps & RefAttributes<HTMLDivElement>, any>;
|
|
15
|
-
Trigger: ForwardRefExoticComponent<TabsTriggerProps & RefAttributes<HTMLDivElement>, any>;
|
|
16
|
-
Content: ForwardRefExoticComponent<TabsContentProps & RefAttributes<HTMLDivElement>, any>;
|
|
17
|
-
}, any, object, never>;
|
|
18
|
-
export declare const Tabs: TabsComponent;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as Tabs from '@radix-ui/react-tabs';
|
|
3
|
+
export type { TabsContentProps, TabsTriggerProps, TabsProps, } from '@radix-ui/react-tabs';
|
|
4
|
+
export declare const TabsRoot: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Tabs.TabsProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
5
|
+
export declare const TabsList: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Tabs.TabsListProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
6
|
+
export declare const TabsTrigger: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Tabs.TabsTriggerProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
7
|
+
export declare const TabTriggerWithIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Tabs.TabsTriggerProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
8
|
+
export declare const TabsContent: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Tabs.TabsContentProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type * as Polymorphic from '@radix-ui/react-polymorphic';
|
|
2
2
|
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
|
-
import { type
|
|
3
|
+
import { type LayoutProps, type SizeProps, type SpaceProps } from 'styled-system';
|
|
4
4
|
type FontStyle = 'normal' | 'italic';
|
|
5
5
|
export type TextElements = 'p' | 'div' | 'span' | 'legend' | 'caption' | 'figcaption' | 'strong' | 'em' | 'strong' | 'abbr' | 'mark' | 'q' | 'small' | 'time';
|
|
6
6
|
interface BodyTextProps extends ComponentPropsWithoutRef<'p'> {
|
|
7
7
|
type: 'body';
|
|
8
|
-
size?: '
|
|
8
|
+
size?: 'small' | 'medium' | 'large';
|
|
9
9
|
bold?: boolean;
|
|
10
10
|
as?: TextElements;
|
|
11
11
|
}
|
|
12
12
|
interface NumberTextProps extends ComponentPropsWithoutRef<'p'> {
|
|
13
|
-
size?: '
|
|
13
|
+
size?: 'small' | 'medium' | 'large';
|
|
14
14
|
type: 'number';
|
|
15
15
|
as?: TextElements;
|
|
16
16
|
}
|
|
@@ -22,6 +22,7 @@ export type TextProps = Partial<NumberTextProps | BodyTextProps> & {
|
|
|
22
22
|
as?: TextElements;
|
|
23
23
|
color?: string;
|
|
24
24
|
fontStyle?: FontStyle;
|
|
25
|
+
truncate?: boolean;
|
|
25
26
|
} & SpaceProps & SizeProps & LayoutProps;
|
|
26
27
|
export type PolymorphicText = Polymorphic.ForwardRefComponent<TextElements, TextProps>;
|
|
27
28
|
export declare const Text: PolymorphicText;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
2
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
3
3
|
import * as ToastPrimitive from '@radix-ui/react-toast';
|
|
4
|
+
export declare const ToastAction: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<ToastPrimitive.ToastActionProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
5
|
+
export declare const ToastClose: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<ToastPrimitive.ToastCloseProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
4
6
|
export declare const ToastSeparator: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<SeparatorPrimitive.SeparatorProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
5
|
-
|
|
7
|
+
type Sentiment = 'inverse' | 'negative' | 'info';
|
|
6
8
|
export declare const ToastViewport: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<ToastPrimitive.ToastViewportProps & import("react").RefAttributes<HTMLOListElement>>, any, {}, never>;
|
|
7
9
|
export declare function ToastProvider({ children, ...props }: ToastPrimitive.ToastProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
8
10
|
export type ToastProps = PropsWithChildren<{
|
|
9
|
-
|
|
11
|
+
sentiment: Sentiment;
|
|
10
12
|
title: string;
|
|
11
13
|
onDismiss?: () => void;
|
|
12
14
|
}> & ToastPrimitive.ToastProps;
|
|
13
15
|
export type ToastActionProps = ToastPrimitive.ToastActionProps;
|
|
14
|
-
export declare function Toast({ title, children,
|
|
15
|
-
export
|
|
16
|
-
var Action: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<ToastPrimitive.ToastActionProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
17
|
-
var Close: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<ToastPrimitive.ToastCloseProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
18
|
-
}
|
|
16
|
+
export declare function Toast({ title, children, sentiment, onDismiss, ...toastRootProps }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -1,44 +1,40 @@
|
|
|
1
1
|
export * from './AccessibleIcon/AccessibleIcon';
|
|
2
|
-
export * from './Accordion';
|
|
3
2
|
export * from './AlertDialog/AlertDialog';
|
|
3
|
+
export * from './Accordion';
|
|
4
4
|
export * from './Badge/Badge';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './ComboBox';
|
|
6
6
|
export * from './Box';
|
|
7
|
+
export * from './Stack/Stack';
|
|
7
8
|
export * from './Breadcrumbs/Breadcrumbs';
|
|
8
|
-
export * from './Button/Button';
|
|
9
9
|
export * from './Button/ButtonBase';
|
|
10
|
+
export * from './Button/Button';
|
|
10
11
|
export * from './ButtonV2/ButtonV2';
|
|
11
12
|
export * from './Calendar';
|
|
13
|
+
export * from './Drawer';
|
|
12
14
|
export * from './Checkbox/Checkbox';
|
|
13
|
-
export * from './ComboBox';
|
|
14
15
|
export * from './Dialog/Dialog';
|
|
15
|
-
export * from './Drawer';
|
|
16
16
|
export * from './DropdownMenu/DropdownMenu';
|
|
17
17
|
export * from './Fieldset/Fieldset';
|
|
18
18
|
export * from './FileUpload/FileUpload';
|
|
19
19
|
export * from './Flex/Flex';
|
|
20
20
|
export * from './FormControl/FormControl';
|
|
21
|
-
export * from './IconButton/IconButton';
|
|
22
|
-
export * from './Input/InlineEdit/InlineEdit';
|
|
23
21
|
export * from './Input/NumberInput/NumberInput';
|
|
24
22
|
export * from './Input/TextInput/TextInput';
|
|
23
|
+
export * from './Input/InlineEdit/InlineEdit';
|
|
25
24
|
export * from './Input/TimeInput/TimeInput';
|
|
26
25
|
export * from './Label/Label';
|
|
27
|
-
export * from './Modal';
|
|
28
26
|
export * from './LabeledText';
|
|
29
27
|
export * from './MultiSelect/MultiSelect';
|
|
30
28
|
export * from './NavigationMenu/NavigationMenu';
|
|
31
29
|
export * from './Page/Page';
|
|
32
30
|
export * from './Page/PageHeader';
|
|
33
31
|
export * from './Paginator/Paginator';
|
|
34
|
-
export * from './Panel/Panel';
|
|
35
32
|
export * from './Popover/Popover';
|
|
36
33
|
export * from './RadioGroup/RadioGroup';
|
|
37
34
|
export * from './Search/Search';
|
|
38
35
|
export * from './SingleSelect/SingleSelect';
|
|
39
|
-
export * from './Stack/Stack';
|
|
40
36
|
export * from './Switch/Switch';
|
|
41
|
-
export * from './
|
|
37
|
+
export * from './IconButton/IconButton';
|
|
42
38
|
export * from './Tabs/Tabs';
|
|
43
39
|
export * from './Text/Text';
|
|
44
40
|
export * from './Title/Title';
|
package/types/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const handleOutsideClick: (event: MouseEvent, ref: React.RefObject<HTMLDivElement>, close: () => void
|
|
1
|
+
export declare const handleOutsideClick: (event: MouseEvent, ref: React.RefObject<HTMLDivElement>, close: () => void) => void;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type PaddingProps } from 'styled-system';
|
|
3
|
-
export type ModalContentProps = {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
restrictHeight?: boolean;
|
|
6
|
-
} & PaddingProps;
|
|
7
|
-
declare const Content: React.ForwardRefExoticComponent<{
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
restrictHeight?: boolean | undefined;
|
|
10
|
-
} & PaddingProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
export default Content;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type MaxWidthProps } from 'styled-system';
|
|
3
|
-
import { type PortalProps } from '../Portal';
|
|
4
|
-
import Content from './Content';
|
|
5
|
-
import Footer from './Footer';
|
|
6
|
-
import Header from './Header';
|
|
7
|
-
export declare const dialogWidths: {
|
|
8
|
-
readonly small: "360px";
|
|
9
|
-
readonly medium: "540px";
|
|
10
|
-
readonly large: "960px";
|
|
11
|
-
};
|
|
12
|
-
export type DialogWidth = keyof typeof dialogWidths;
|
|
13
|
-
export type ModalProps = {
|
|
14
|
-
children?: React.ReactNode;
|
|
15
|
-
className?: string;
|
|
16
|
-
closeOnEscape?: boolean;
|
|
17
|
-
closeOnOutsideClick?: boolean;
|
|
18
|
-
onClose?: () => void;
|
|
19
|
-
open: boolean;
|
|
20
|
-
portalId?: PortalProps['containerId'];
|
|
21
|
-
size?: 'small' | 'medium' | 'large';
|
|
22
|
-
maxWidth?: string;
|
|
23
|
-
} & MaxWidthProps;
|
|
24
|
-
declare const Modal: React.ForwardRefExoticComponent<ModalProps> & {
|
|
25
|
-
Header: typeof Header;
|
|
26
|
-
Content: typeof Content;
|
|
27
|
-
Footer: typeof Footer;
|
|
28
|
-
};
|
|
29
|
-
export default Modal;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React, { type SetStateAction, type Dispatch } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Context is created here to pass modal onClose and open state to composed Modal components
|
|
4
|
-
*/
|
|
5
|
-
type ContextProps = {
|
|
6
|
-
setModalTitle?: Dispatch<SetStateAction<string>>;
|
|
7
|
-
onClose?: () => void;
|
|
8
|
-
open?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare const ModalContext: React.Context<ContextProps>;
|
|
11
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const base: (props: any) => string;
|
|
2
|
-
export declare const wrapper: () => string;
|
|
3
|
-
export declare const focusLock: (props: any) => string;
|
|
4
|
-
export declare const content: () => string;
|
|
5
|
-
export declare const contentAnimation: (props: any) => string | undefined;
|
|
6
|
-
export declare const closeButton: () => string;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type BoxProps } from 'components/Box/Box';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export type PanelBoxProps = Omit<BoxProps, 'as'> & {
|
|
4
|
-
'data-id'?: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const Panel: React.ForwardRefExoticComponent<Omit<BoxProps, "as"> & {
|
|
7
|
-
'data-id'?: string | undefined;
|
|
8
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as RadixTabs from '@radix-ui/react-tabs';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export type { TabsContentProps, TabsProps, TabsTriggerProps, } from '@radix-ui/react-tabs';
|
|
4
|
-
export declare const TabList: {
|
|
5
|
-
({ children, variant, ...rest }: {
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
children: any;
|
|
8
|
-
variant?: string | undefined;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
displayName: string;
|
|
11
|
-
List: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<RadixTabs.TabsListProps & React.RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
12
|
-
Trigger: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<RadixTabs.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>, any, TriggerProps, never>;
|
|
13
|
-
Action: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("components/ButtonV2/ButtonV2").ButtonPropsV2 & React.RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
14
|
-
Content: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<RadixTabs.TabsContentProps & React.RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
15
|
-
};
|
|
16
|
-
interface TriggerProps extends RadixTabs.TabsTriggerProps {
|
|
17
|
-
variant?: 'primary' | 'secondary';
|
|
18
|
-
}
|