@theroutingcompany/components 0.0.99-alpha.9 → 0.0.100-alpha.0
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 +9284 -9735
- package/dist/trc-components.es.js.map +1 -1
- package/dist/trc-components.umd.js +410 -410
- package/dist/trc-components.umd.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -4
- package/types/components/Accordion/Accordion.d.ts +1 -1
- package/types/components/BoxPopover/BoxPopover.d.ts +0 -1
- package/types/components/ComboBox/ComboBox.d.ts +1 -0
- package/types/components/Drawer/Drawer.d.ts +2 -0
- package/types/components/Drawer/Footer.d.ts +8 -0
- package/types/components/FormControl/FormControl.d.ts +4 -6
- package/types/components/Input/DateInput/DateInput.d.ts +3 -1
- package/types/components/Input/InputBase.d.ts +4 -3
- package/types/components/Input/NumberInput/NumberInput.d.ts +4 -0
- package/types/components/Input/TextInput/TextInput.d.ts +2 -0
- package/types/components/Input/TimeInput/TimeInput.d.ts +2 -1
- package/types/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/types/components/Search/Search.d.ts +1 -1
- package/types/components/Skeleton/Skeleton.d.ts +7 -0
- package/types/components/Stack/Stack.d.ts +1 -4
- package/types/components/index.d.ts +1 -1
- package/types/hooks/useOutsideClick.d.ts +1 -1
- package/types/components/DateSegment/DateSegment.d.ts +0 -11
- package/types/components/GoogleInput/GoogleInput.d.ts +0 -29
- package/types/components/GoogleInput/index.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theroutingcompany/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.100-alpha.0",
|
|
4
4
|
"description": "The Routing Company Components",
|
|
5
5
|
"main": "./dist/trc-components.umd.js",
|
|
6
6
|
"module": "./dist/trc-components.es.js",
|
|
@@ -107,11 +107,10 @@
|
|
|
107
107
|
"@styled-system/prop-types": "^5.1.2",
|
|
108
108
|
"@styled-system/props": "^5.1.5",
|
|
109
109
|
"@tanstack/react-table": "^8.9.1",
|
|
110
|
-
"@theroutingcompany/design-tokens": "0.0.
|
|
110
|
+
"@theroutingcompany/design-tokens": "^0.0.9",
|
|
111
111
|
"@types/styled-system": "^5.1.16",
|
|
112
112
|
"csstype": "^3.1.2",
|
|
113
113
|
"react-focus-lock": "^2.9.4",
|
|
114
|
-
"react-google-autocomplete": "^2.7.3",
|
|
115
114
|
"react-scrolllock": "^5.0.1",
|
|
116
115
|
"react-transition-group": "^4.4.5",
|
|
117
116
|
"styled-components": "^5.3.9",
|
|
@@ -139,7 +138,6 @@
|
|
|
139
138
|
"@storybook/react-vite": "^7.0.3",
|
|
140
139
|
"@storybook/testing-library": "^0.1.0",
|
|
141
140
|
"@types/eslint": "^8.37.0",
|
|
142
|
-
"@types/google.maps": "^3.55.11",
|
|
143
141
|
"@types/prettier": "^2.7.2",
|
|
144
142
|
"@types/react": "^18.0.34",
|
|
145
143
|
"@types/react-dom": "^18.0.11",
|
|
@@ -11,7 +11,7 @@ export declare function SectionHeader({ children, icon, bold, ...rest }: Section
|
|
|
11
11
|
type SectionItemProps = {
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
includeBottomDivider?: boolean;
|
|
14
|
-
style
|
|
14
|
+
style?: CSSProperties;
|
|
15
15
|
} & AccordionItemProps;
|
|
16
16
|
export declare function SectionItem({ children, includeBottomDivider, style, ...rest }: SectionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export interface AccordionProps {
|
|
@@ -11,6 +11,5 @@ interface BoxPopoverProps extends Omit<AriaPopoverProps, 'popoverRef'> {
|
|
|
11
11
|
export declare function BoxPopover(props: Omit<BoxPopoverProps, 'triggerRef'> & {
|
|
12
12
|
targetRef: React.RefObject<HTMLElement>;
|
|
13
13
|
disableFocusManagement?: boolean;
|
|
14
|
-
className?: string;
|
|
15
14
|
}): import("react/jsx-runtime").JSX.Element;
|
|
16
15
|
export {};
|
|
@@ -5,6 +5,7 @@ export declare const ChevronDown: import("styled-components").StyledComponent<im
|
|
|
5
5
|
declare function ComboBox<T extends object>(props: ComboBoxProps<T> & {
|
|
6
6
|
tooltipContent?: React.ReactNode;
|
|
7
7
|
errorMessage?: string;
|
|
8
|
+
boldLabel?: boolean;
|
|
8
9
|
}): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
declare namespace ComboBox {
|
|
10
11
|
var Item: <T>(props: import("@react-types/shared").ItemProps<T>) => React.JSX.Element;
|
|
@@ -2,6 +2,7 @@ import { type ForwardRefExoticComponent, type ReactNode } from 'react';
|
|
|
2
2
|
import { type PortalProps } from '../Portal';
|
|
3
3
|
import Content from './Content';
|
|
4
4
|
import Header from './Header';
|
|
5
|
+
import Footer from './Footer';
|
|
5
6
|
declare const Close: ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
6
7
|
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
7
8
|
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -24,6 +25,7 @@ declare const Drawer: ForwardRefExoticComponent<DrawerProps> & {
|
|
|
24
25
|
Close: typeof Close;
|
|
25
26
|
Content: typeof Content;
|
|
26
27
|
Header: typeof Header;
|
|
28
|
+
Footer: typeof Footer;
|
|
27
29
|
};
|
|
28
30
|
export default Drawer;
|
|
29
31
|
type UseDrawerProps = {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
type HeaderProps = {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
skeleton?: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
declare const Footer: import("react").ForwardRefExoticComponent<HeaderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export default Footer;
|
|
@@ -8,7 +8,7 @@ type FormControlProps<FieldProps = AriaFieldProps> = PropsWithChildren<{
|
|
|
8
8
|
tooltipIcon?: ReactNode;
|
|
9
9
|
} & FieldProps>;
|
|
10
10
|
export declare function useFieldProps(): FieldAria['fieldProps'];
|
|
11
|
-
export declare function FormControl({ children, label, errorMessage,
|
|
11
|
+
export declare function FormControl({ children, label, errorMessage, tooltipContent, tooltipIcon, validationState, id, ...props }: FormControlProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export declare const TextFormControl: import("react").ForwardRefExoticComponent<{
|
|
13
13
|
errorMessage?: ReactNode;
|
|
14
14
|
tooltipContent?: string | undefined;
|
|
@@ -60,15 +60,11 @@ export declare const TextAreaFormControl: import("react").ForwardRefExoticCompon
|
|
|
60
60
|
maxLength?: number | undefined;
|
|
61
61
|
minLength?: number | undefined;
|
|
62
62
|
readOnly?: boolean | undefined;
|
|
63
|
-
required?:
|
|
63
|
+
required?: unknown;
|
|
64
64
|
description?: ReactNode;
|
|
65
65
|
onFocusChange?: ((isFocused: boolean) => void) | undefined;
|
|
66
66
|
excludeFromTabOrder?: boolean | undefined;
|
|
67
|
-
validationState?: import("@react-types/shared").ValidationState | undefined;
|
|
68
|
-
isInvalid?: boolean | undefined;
|
|
69
67
|
errorMessage?: ReactNode | ((v: import("@react-types/shared").ValidationResult) => ReactNode);
|
|
70
|
-
validationBehavior?: "aria" | "native" | undefined;
|
|
71
|
-
validate?: ((value: unknown) => true | import("@react-types/shared").ValidationError | null | undefined) | undefined;
|
|
72
68
|
} & import("components/Input/InputBase").InputBaseProps & {
|
|
73
69
|
rows?: number | undefined;
|
|
74
70
|
errorMessage?: ReactNode;
|
|
@@ -91,5 +87,7 @@ export declare const NumberFormControl: import("react").ForwardRefExoticComponen
|
|
|
91
87
|
locale?: string | undefined;
|
|
92
88
|
errorMessage?: ReactNode;
|
|
93
89
|
required?: boolean | undefined;
|
|
90
|
+
isInvalid?: boolean | undefined;
|
|
91
|
+
boldLabel?: boolean | undefined;
|
|
94
92
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
95
93
|
export {};
|
|
@@ -16,6 +16,8 @@ interface DateInputProps {
|
|
|
16
16
|
isInvalid?: boolean;
|
|
17
17
|
isDisabled?: boolean;
|
|
18
18
|
hideIcon?: boolean;
|
|
19
|
+
errorMessage?: string;
|
|
20
|
+
placeholder?: string;
|
|
19
21
|
}
|
|
20
|
-
export declare function DateInput({ label, labelId, inputId, timeZone, hideLabel, boldLabel, onChange, isInvalid, isDisabled, ...props }: DateInputProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function DateInput({ label, labelId, inputId, timeZone, hideLabel, boldLabel, onChange, isInvalid, isDisabled, placeholder, ...props }: DateInputProps): import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
export {};
|
|
@@ -30,6 +30,7 @@ export declare function defaultFormInput({ paddingSize, }: {
|
|
|
30
30
|
}): FlattenSimpleInterpolation;
|
|
31
31
|
export declare const InputBase: import("styled-components").StyledComponent<"input", any, InputBaseProps, never>;
|
|
32
32
|
export declare const InputWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
33
|
-
export declare const
|
|
34
|
-
export declare const
|
|
35
|
-
|
|
33
|
+
export declare const InputErrorMessageWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
34
|
+
export declare const InputErrorMessage: ({ children }: {
|
|
35
|
+
children: any;
|
|
36
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,6 +12,8 @@ export type NumberInputProps = ReactAriaNumberInputProps & InputBaseProps & Stan
|
|
|
12
12
|
locale?: NumberFieldStateOptions['locale'];
|
|
13
13
|
errorMessage?: ReactNode;
|
|
14
14
|
required?: boolean;
|
|
15
|
+
isInvalid?: boolean;
|
|
16
|
+
boldLabel?: boolean;
|
|
15
17
|
};
|
|
16
18
|
/**
|
|
17
19
|
* Use cases
|
|
@@ -41,6 +43,8 @@ export declare const NumberInput: import("react").ForwardRefExoticComponent<Omit
|
|
|
41
43
|
locale?: string | undefined;
|
|
42
44
|
errorMessage?: ReactNode;
|
|
43
45
|
required?: boolean | undefined;
|
|
46
|
+
isInvalid?: boolean | undefined;
|
|
47
|
+
boldLabel?: boolean | undefined;
|
|
44
48
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
45
49
|
export declare const handleFormWithNumbers: (form: HTMLFormElement) => {
|
|
46
50
|
[k: string]: FormDataEntryValue;
|
|
@@ -19,6 +19,7 @@ export type TextInputProps = ReactAriaInputProps & InputBaseProps & CustomTextIn
|
|
|
19
19
|
errorMessage?: ReactNode;
|
|
20
20
|
required?: boolean;
|
|
21
21
|
tooltipContent?: string;
|
|
22
|
+
boldLabel?: boolean;
|
|
22
23
|
};
|
|
23
24
|
export declare const TextInput: import("react").ForwardRefExoticComponent<ReactAriaInputProps & InputBaseProps & CustomTextInputProps & {
|
|
24
25
|
isInvalid?: boolean | undefined;
|
|
@@ -26,5 +27,6 @@ export declare const TextInput: import("react").ForwardRefExoticComponent<ReactA
|
|
|
26
27
|
errorMessage?: ReactNode;
|
|
27
28
|
required?: boolean | undefined;
|
|
28
29
|
tooltipContent?: string | undefined;
|
|
30
|
+
boldLabel?: boolean | undefined;
|
|
29
31
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
30
32
|
export {};
|
|
@@ -19,5 +19,6 @@ interface TimeInputProps {
|
|
|
19
19
|
isInvalid?: boolean;
|
|
20
20
|
isDisabled?: boolean;
|
|
21
21
|
hideIcon?: boolean;
|
|
22
|
+
placeholder?: string;
|
|
22
23
|
}
|
|
23
|
-
export declare function TimeInput({ label, labelId, inputId, hideLabel, boldLabel, interval, hourCycle, defaultValue, onChange, isInvalid, isDisabled, ...props }: TimeInputProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function TimeInput({ label, labelId, inputId, hideLabel, boldLabel, interval, hourCycle, defaultValue, onChange, isInvalid, isDisabled, placeholder, ...props }: TimeInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CollectionChildren } from '@react-types/shared';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useMultiSelectState } from './useMultiSelectState';
|
|
4
|
-
export { Item as MultiSelectItem, Section as MultiSelectSection } from '@react-stately/collections';
|
|
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;
|
|
@@ -9,6 +9,6 @@ export declare const Search: import("react").ForwardRefExoticComponent<{
|
|
|
9
9
|
height?: string | undefined;
|
|
10
10
|
} & Omit<AriaSearchFieldProps, "isDisabled" | "isRequired" | "isReadOnly"> & {
|
|
11
11
|
disabled?: boolean | undefined;
|
|
12
|
-
required?:
|
|
12
|
+
required?: unknown;
|
|
13
13
|
readOnly?: boolean | undefined;
|
|
14
14
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -7,6 +7,12 @@ export type SkeletonHeaderProps = {
|
|
|
7
7
|
width?: string;
|
|
8
8
|
};
|
|
9
9
|
export declare const SkeletonHeader: React.ForwardRefExoticComponent<SkeletonHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export type SkeletonFooterProps = {
|
|
11
|
+
'data-id'?: string;
|
|
12
|
+
looksLike?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
13
|
+
width?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const SkeletonFooter: React.ForwardRefExoticComponent<SkeletonHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
16
|
export type SkeletonBodyProps = {
|
|
11
17
|
'data-id'?: string;
|
|
12
18
|
lines?: number;
|
|
@@ -26,5 +32,6 @@ declare namespace Skeleton {
|
|
|
26
32
|
'data-id'?: string | undefined;
|
|
27
33
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
28
34
|
var Body: React.ForwardRefExoticComponent<SkeletonBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
var Footer: React.ForwardRefExoticComponent<SkeletonHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
36
|
}
|
|
30
37
|
export default Skeleton;
|
|
@@ -9,8 +9,5 @@ export interface StackProps extends BoxProps {
|
|
|
9
9
|
space?: ResponsiveValue<SpacingTokenValues>;
|
|
10
10
|
'data-id'?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare
|
|
13
|
-
export declare namespace Stack {
|
|
14
|
-
var displayName: string;
|
|
15
|
-
}
|
|
12
|
+
export declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
13
|
export default Stack;
|
|
@@ -18,9 +18,9 @@ export * from './DropdownMenu/DropdownMenu';
|
|
|
18
18
|
export * from './Fieldset/Fieldset';
|
|
19
19
|
export * from './FileUpload/FileUpload';
|
|
20
20
|
export * from './Flex/Flex';
|
|
21
|
-
export * from './GoogleInput';
|
|
22
21
|
export * from './FormControl/FormControl';
|
|
23
22
|
export * from './IconButton/IconButton';
|
|
23
|
+
export * from './Input/InputBase';
|
|
24
24
|
export * from './Input/InlineEdit/InlineEdit';
|
|
25
25
|
export * from './Input/NumberInput/NumberInput';
|
|
26
26
|
export * from './Input/TextInput/TextInput';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useOutsideClick: (ref: React.RefObject<HTMLElement>, onOutsideClick: (
|
|
1
|
+
export declare const useOutsideClick: (ref: React.RefObject<HTMLElement>, onOutsideClick: () => void) => void;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type DateFieldState, type DateSegment } from '@react-stately/datepicker';
|
|
2
|
-
export { Time } from '@internationalized/date';
|
|
3
|
-
export declare const SegmentDiv: import("styled-components").StyledComponent<"div", any, {
|
|
4
|
-
literal: boolean;
|
|
5
|
-
}, never>;
|
|
6
|
-
export type DateSegmentProps = {
|
|
7
|
-
segment: DateSegment;
|
|
8
|
-
state: DateFieldState;
|
|
9
|
-
};
|
|
10
|
-
declare function DateSegment({ segment, state }: DateSegmentProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default DateSegment;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/// <reference types="google.maps" />
|
|
2
|
-
import { type ReactNode } from 'react';
|
|
3
|
-
declare const PlaceResult: import("styled-components").StyledComponent<import("components/Text/Text").PolymorphicText, any, {}, never>;
|
|
4
|
-
export declare const getSelectedName: (selected: google.maps.places.PlaceResult) => string | undefined;
|
|
5
|
-
export type GoogleInputProps = {
|
|
6
|
-
googleApiKey: string;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
options?: google.maps.places.AutocompleteOptions;
|
|
9
|
-
libraries?: string[];
|
|
10
|
-
googleMapsScriptBaseUrl?: string;
|
|
11
|
-
debounce?: number;
|
|
12
|
-
defaultValue?: string;
|
|
13
|
-
value?: string;
|
|
14
|
-
onChange?: (value: google.maps.places.PlaceResult) => void;
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
isInvalid?: boolean;
|
|
17
|
-
id?: string;
|
|
18
|
-
'data-id'?: string;
|
|
19
|
-
label?: ReactNode;
|
|
20
|
-
boldLabel?: boolean;
|
|
21
|
-
hideLabel?: boolean;
|
|
22
|
-
labelId?: string;
|
|
23
|
-
inputId?: string;
|
|
24
|
-
tooltipContent?: React.ReactNode;
|
|
25
|
-
autoFocus?: boolean;
|
|
26
|
-
};
|
|
27
|
-
declare const GoogleInput: ({ googleApiKey, placeholder, options, libraries, googleMapsScriptBaseUrl, debounce, defaultValue, value, onChange, disabled, isInvalid, label, labelId, inputId, hideLabel, boldLabel, autoFocus, ...props }: GoogleInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
export default GoogleInput;
|
|
29
|
-
export { GoogleInput };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './GoogleInput';
|