@theroutingcompany/components 0.0.30-alpha.0 → 0.0.30-alpha.10
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/README.md +3 -3
- package/dist/trc-components.es.js +22563 -21406
- package/dist/trc-components.es.js.map +1 -1
- package/dist/trc-components.umd.js +1275 -1218
- package/dist/trc-components.umd.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/types/components/ComboBox/ComboBox.d.ts +10 -4
- package/types/components/ComboBox/index.d.ts +2 -0
- package/types/components/Connect/Connect.d.ts +2 -2
- package/types/components/Dialog/Dialog.d.ts +1 -1
- package/types/components/Drawer/Drawer.d.ts +2 -1
- package/types/components/Drawer/styles.d.ts +1 -0
- package/types/components/IconButton/IconButton.d.ts +1 -1
- package/types/components/Input/InlineEdit/InlineEdit.d.ts +3 -1
- package/types/components/Label/Label.d.ts +7 -3
- package/types/components/LabeledText/LabeledText.d.ts +7 -0
- package/types/components/LabeledText/index.d.ts +2 -0
- package/types/components/MultiSelect/MultiSelect.d.ts +2 -2
- package/types/components/Text/Text.d.ts +7 -15
- package/types/components/Title/Title.d.ts +7 -2
- package/types/components/index.d.ts +2 -0
- package/types/components/Select/Select.d.ts +0 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theroutingcompany/components",
|
|
3
|
-
"version": "0.0.30-alpha.
|
|
3
|
+
"version": "0.0.30-alpha.10",
|
|
4
4
|
"description": "The Routing Company Components",
|
|
5
5
|
"main": "./dist/trc-components.umd.js",
|
|
6
6
|
"module": "./dist/trc-components.es.js",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@styled-system/prop-types": "^5.1.2",
|
|
104
104
|
"@styled-system/props": "^5.1.5",
|
|
105
105
|
"@tanstack/react-table": "^8.9.1",
|
|
106
|
-
"@theroutingcompany/design-tokens": "
|
|
106
|
+
"@theroutingcompany/design-tokens": "^0.0.7",
|
|
107
107
|
"@types/styled-system": "^5.1.16",
|
|
108
108
|
"csstype": "^3.1.2",
|
|
109
109
|
"react-focus-lock": "^2.9.4",
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import type { ComboBoxProps } from
|
|
2
|
-
|
|
1
|
+
import type { ComboBoxProps } from '@react-types/combobox';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
declare function ComboBox<T extends object>(props: ComboBoxProps<T> & {
|
|
5
|
+
tooltipContent?: React.ReactNode;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare namespace ComboBox {
|
|
8
|
+
var Item: <T>(props: import("@react-types/shared").ItemProps<T>) => JSX.Element;
|
|
9
|
+
var Section: <T>(props: import("@react-types/shared").SectionProps<T>) => JSX.Element;
|
|
10
|
+
}
|
|
11
|
+
export default ComboBox;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
export type ConnectProps = {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
left?: React.ReactNode;
|
|
5
5
|
right?: React.ReactNode;
|
|
6
|
-
fullWidth?: boolean;
|
|
7
6
|
tabIndex?: number;
|
|
7
|
+
height?: string;
|
|
8
8
|
};
|
|
9
9
|
declare const Connect: React.ForwardRefExoticComponent<ConnectProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
export default Connect;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentPropsWithRef } from 'react';
|
|
2
1
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
+
import type { ComponentPropsWithRef } from 'react';
|
|
3
3
|
export declare const overlayStyles: import("styled-components").FlattenSimpleInterpolation;
|
|
4
4
|
export declare const dialogWidths: {
|
|
5
5
|
readonly small: "360px";
|
|
@@ -28,9 +28,10 @@ export default Drawer;
|
|
|
28
28
|
*/
|
|
29
29
|
type UseDrawerProps = {
|
|
30
30
|
initialOpen?: boolean;
|
|
31
|
+
triggerToggle?: boolean;
|
|
31
32
|
id?: string;
|
|
32
33
|
};
|
|
33
|
-
export declare function useDrawer({ initialOpen, id, }?: UseDrawerProps): {
|
|
34
|
+
export declare function useDrawer({ initialOpen, triggerToggle, id, }?: UseDrawerProps): {
|
|
34
35
|
isOpen: boolean;
|
|
35
36
|
toggleDrawer: () => void;
|
|
36
37
|
openDrawer: () => void;
|
|
@@ -2,6 +2,7 @@ import { type BoxProps } from '../Box';
|
|
|
2
2
|
interface ContainerProps extends BoxProps {
|
|
3
3
|
$state?: string;
|
|
4
4
|
$viewportPosition?: string;
|
|
5
|
+
name?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare const Container: import("styled-components").StyledComponent<import("../..").ForwardRefComponent<"div", BoxProps>, any, ContainerProps, never>;
|
|
7
8
|
export {};
|
|
@@ -18,8 +18,10 @@ export interface InlineEditProps extends ButtonPropsV2 {
|
|
|
18
18
|
onCancel?: () => void;
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
valid?: boolean;
|
|
21
|
+
label?: string | ReactNode;
|
|
22
|
+
labelId?: string;
|
|
21
23
|
}
|
|
22
24
|
export declare const InlineEdit: {
|
|
23
|
-
({ children, placeholder, value, editValue, hideIcon, p, onChange, onToggle, onCancel, disabled, valid, ...rest }: InlineEditProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
({ children, placeholder, value, editValue, hideIcon, p, onChange, onToggle, onCancel, disabled, valid, label, labelId, ...rest }: InlineEditProps): import("react/jsx-runtime").JSX.Element;
|
|
24
26
|
displayName: string;
|
|
25
27
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type BoxProps } from 'components/Box';
|
|
1
2
|
import type { ReactNode } from 'react';
|
|
2
3
|
import type { ComponentPropsWithoutStyles } from '../../helpers/typeHelpers';
|
|
3
|
-
export interface LabelProps extends ComponentPropsWithoutStyles<'label'> {
|
|
4
|
-
size?: 'small' | 'medium' | 'large';
|
|
4
|
+
export interface LabelProps extends ComponentPropsWithoutStyles<'label'>, Omit<BoxProps, 'color'> {
|
|
5
|
+
size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
5
6
|
bold?: boolean;
|
|
6
7
|
/** Screen Reader Only */
|
|
7
8
|
srOnly?: boolean;
|
|
@@ -9,5 +10,8 @@ export interface LabelProps extends ComponentPropsWithoutStyles<'label'> {
|
|
|
9
10
|
children: ReactNode;
|
|
10
11
|
as?: 'legend' | 'span' | undefined;
|
|
11
12
|
style?: Record<string, any>;
|
|
13
|
+
color?: string;
|
|
14
|
+
pointer?: boolean;
|
|
12
15
|
}
|
|
13
|
-
export declare function Label({ children, bold, size, display, srOnly, style, ...remainingProps }: LabelProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function Label({ children, bold, size, display, pointer, srOnly, style, color, ...remainingProps }: LabelProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export default Label;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { CollectionChildren } from '@react-types/shared';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { useMultiSelectState } from './useMultiSelectState';
|
|
4
|
-
export { Item as MultiSelectItem, Section as MultiSelectSection
|
|
4
|
+
export { Item as MultiSelectItem, Section as MultiSelectSection } from '@react-stately/collections';
|
|
5
5
|
export type OptionItem = {
|
|
6
6
|
children?: never;
|
|
7
7
|
id: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
1
|
import type * as Polymorphic from '@radix-ui/react-polymorphic';
|
|
2
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import { type SpaceProps } from 'styled-system';
|
|
3
4
|
type TextElements = 'p' | 'div' | 'span' | 'legend' | 'caption' | 'figcaption' | 'strong' | 'em' | 'strong' | 'abbr' | 'mark' | 'q' | 'small' | 'time';
|
|
4
5
|
interface BodyTextProps extends ComponentPropsWithoutRef<'p'> {
|
|
5
6
|
type: 'body';
|
|
@@ -17,22 +18,13 @@ interface CaptionTextProps extends ComponentPropsWithoutRef<'p'> {
|
|
|
17
18
|
type: 'caption';
|
|
18
19
|
as?: TextElements;
|
|
19
20
|
}
|
|
20
|
-
type
|
|
21
|
-
|
|
22
|
-
type NormalTextColorProps = {
|
|
23
|
-
textType?: 'normal';
|
|
24
|
-
variant?: NormalVariant;
|
|
25
|
-
};
|
|
26
|
-
type SentimentTextColorProps = {
|
|
27
|
-
textType?: 'sentiment';
|
|
28
|
-
variant?: SentimentVariant;
|
|
29
|
-
};
|
|
30
|
-
type TextColorProps = NormalTextColorProps | SentimentTextColorProps;
|
|
31
|
-
export type TextProps = TextColorProps & Partial<NumberTextProps | CaptionTextProps | BodyTextProps> & {
|
|
21
|
+
export type TextProps = Partial<NumberTextProps | CaptionTextProps | BodyTextProps> & {
|
|
22
|
+
weak?: boolean;
|
|
32
23
|
bold?: boolean;
|
|
33
24
|
italic?: boolean;
|
|
34
25
|
as?: TextElements;
|
|
35
|
-
|
|
26
|
+
color?: string;
|
|
27
|
+
} & SpaceProps;
|
|
36
28
|
type PolymorphicText = Polymorphic.ForwardRefComponent<TextElements, TextProps>;
|
|
37
29
|
export declare const Text: PolymorphicText;
|
|
38
|
-
export
|
|
30
|
+
export default Text;
|
|
@@ -3,11 +3,16 @@ import { type BoxProps } from 'components/Box';
|
|
|
3
3
|
interface TitleBaseProps extends BoxProps {
|
|
4
4
|
weight?: 'light' | 'normal' | 'regular' | 'medium' | 'bold';
|
|
5
5
|
}
|
|
6
|
-
export declare const TitleBase: import("styled-components").StyledComponent<import("helpers").ForwardRefComponent<"div", BoxProps>, any,
|
|
7
|
-
|
|
6
|
+
export declare const TitleBase: import("styled-components").StyledComponent<import("helpers").ForwardRefComponent<"div", BoxProps>, any, {
|
|
7
|
+
color?: string | undefined;
|
|
8
|
+
} & Omit<TitleBaseProps, "color">, never>;
|
|
9
|
+
export interface TitleProps {
|
|
8
10
|
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'legend' | 'figcaption';
|
|
9
11
|
size?: 'small' | 'medium' | 'large' | 'xsmall';
|
|
10
12
|
weight?: 'light' | 'normal' | 'regular' | 'medium' | 'bold';
|
|
13
|
+
height?: string;
|
|
14
|
+
color?: string;
|
|
15
|
+
weak?: boolean;
|
|
11
16
|
}
|
|
12
17
|
export type PolymorphicTitle = Polymorphic.ForwardRefComponent<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6', TitleProps>;
|
|
13
18
|
export declare const Title: PolymorphicTitle;
|
|
@@ -2,6 +2,7 @@ export * from './AccessibleIcon/AccessibleIcon';
|
|
|
2
2
|
export * from './AlertDialog/AlertDialog';
|
|
3
3
|
export * from './Accordion';
|
|
4
4
|
export * from './Badge/Badge';
|
|
5
|
+
export * from './ComboBox';
|
|
5
6
|
export * from './Box';
|
|
6
7
|
export * from './Stack/Stack';
|
|
7
8
|
export * from './Breadcrumbs/Breadcrumbs';
|
|
@@ -22,6 +23,7 @@ export * from './Input/TextInput/TextInput';
|
|
|
22
23
|
export * from './Input/InlineEdit/InlineEdit';
|
|
23
24
|
export * from './Input/TimeInput/TimeInput';
|
|
24
25
|
export * from './Label/Label';
|
|
26
|
+
export * from './LabeledText';
|
|
25
27
|
export * from './MultiSelect/MultiSelect';
|
|
26
28
|
export * from './NavigationMenu/NavigationMenu';
|
|
27
29
|
export * from './Page/Page';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
3
|
-
export declare const StyledTrigger: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<SelectPrimitive.SelectTriggerProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
4
|
-
export declare function SelectContent({ children, ...props }: SelectPrimitive.SelectContentProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare const Select: import("react").FC<SelectPrimitive.SelectProps>;
|
|
6
|
-
export declare const SelectTrigger: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<SelectPrimitive.SelectTriggerProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
7
|
-
export declare const SelectValue: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
8
|
-
export declare const SelectIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<SelectPrimitive.SelectIconProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
9
|
-
export declare const SelectViewport: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<SelectPrimitive.SelectViewportProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
10
|
-
export declare const SelectGroup: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
-
export declare const SelectItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<SelectPrimitive.SelectItemProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
12
|
-
export declare const SelectItemText: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectItemTextProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
13
|
-
export declare const SelectItemIndicator: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<SelectPrimitive.SelectItemIndicatorProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
14
|
-
export declare const SelectGroupLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<SelectPrimitive.SelectLabelProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
15
|
-
export declare const SelectSeparator: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<SelectPrimitive.SelectSeparatorProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
16
|
-
export declare const SelectScrollUpButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<SelectPrimitive.SelectScrollUpButtonProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
17
|
-
export declare const SelectScrollDownButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<SelectPrimitive.SelectScrollDownButtonProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
18
|
-
type SingleSelectProps = {
|
|
19
|
-
items: string[];
|
|
20
|
-
} & SelectPrimitive.SelectProps;
|
|
21
|
-
export declare function SingleSelect({ items, ...selectProps }: SingleSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export {};
|