@theroutingcompany/components 0.0.99-alpha.8 → 0.0.99

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theroutingcompany/components",
3
- "version": "0.0.99-alpha.8",
3
+ "version": "0.0.99",
4
4
  "description": "The Routing Company Components",
5
5
  "main": "./dist/trc-components.umd.js",
6
6
  "module": "./dist/trc-components.es.js",
@@ -77,7 +77,7 @@
77
77
  "@react-aria/listbox": "^3.9.1",
78
78
  "@react-aria/menu": "^3.9.1",
79
79
  "@react-aria/numberfield": "^3.5.1",
80
- "@react-aria/overlays": "^3.14.1",
80
+ "@react-aria/overlays": "^3.23.1",
81
81
  "@react-aria/progress": "^3.4.2",
82
82
  "@react-aria/radio": "^3.6.1",
83
83
  "@react-aria/searchfield": "^3.5.2",
@@ -107,7 +107,7 @@
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.14-alpha.0",
110
+ "@theroutingcompany/design-tokens": "0.0.14",
111
111
  "@types/styled-system": "^5.1.16",
112
112
  "csstype": "^3.1.2",
113
113
  "react-focus-lock": "^2.9.4",
@@ -115,7 +115,8 @@
115
115
  "react-scrolllock": "^5.0.1",
116
116
  "react-transition-group": "^4.4.5",
117
117
  "styled-components": "^5.3.9",
118
- "styled-system": "^5.1.5"
118
+ "styled-system": "^5.1.5",
119
+ "usehooks-ts": "^3.1.0"
119
120
  },
120
121
  "peerDependencies": {
121
122
  "@material-ui/icons": "^4.11.3",
@@ -1,6 +1,6 @@
1
1
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
- import { AccordionItemProps } from '@radix-ui/react-accordion';
3
- import { CSSProperties, type ReactNode } from 'react';
2
+ import { type AccordionItemProps } from '@radix-ui/react-accordion';
3
+ import { type CSSProperties, type ReactNode } from 'react';
4
4
  export declare const SectionTitle: import("styled-components").StyledComponent<"span", any, {}, never>;
5
5
  export interface SectionHeaderProps extends AccordionPrimitive.AccordionHeaderProps {
6
6
  children: ReactNode;
@@ -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: CSSProperties;
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 {
@@ -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, description, tooltipContent, tooltipIcon, validationState, id, ...props }: FormControlProps): import("react/jsx-runtime").JSX.Element;
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;
@@ -91,5 +91,8 @@ export declare const NumberFormControl: import("react").ForwardRefExoticComponen
91
91
  locale?: string | undefined;
92
92
  errorMessage?: ReactNode;
93
93
  required?: boolean | undefined;
94
+ isInvalid?: boolean | undefined;
95
+ boldLabel?: boolean | undefined;
96
+ tooltipContent?: string | undefined;
94
97
  } & import("react").RefAttributes<HTMLInputElement>>;
95
98
  export {};
@@ -5,7 +5,7 @@ export declare const getSelectedName: (selected: google.maps.places.PlaceResult)
5
5
  export type GoogleInputProps = {
6
6
  googleApiKey: string;
7
7
  placeholder?: string;
8
- options?: google.maps.places.AutocompleteOptions;
8
+ options?: Omit<google.maps.places.AutocompletionRequest, 'input'>;
9
9
  libraries?: string[];
10
10
  googleMapsScriptBaseUrl?: string;
11
11
  debounce?: number;
@@ -23,7 +23,14 @@ export type GoogleInputProps = {
23
23
  inputId?: string;
24
24
  tooltipContent?: React.ReactNode;
25
25
  autoFocus?: boolean;
26
+ errorMessage?: string;
27
+ extraMenuActions?: {
28
+ label: ReactNode;
29
+ id: string;
30
+ onClick: () => void;
31
+ }[];
32
+ showExtraActionsWithResults?: boolean;
26
33
  };
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;
34
+ declare const GoogleInput: ({ googleApiKey, placeholder, options, libraries, googleMapsScriptBaseUrl, debounce, defaultValue, value, onChange, disabled, isInvalid, label, labelId, inputId, hideLabel, boldLabel, autoFocus, extraMenuActions, showExtraActionsWithResults, ...props }: GoogleInputProps) => import("react/jsx-runtime").JSX.Element;
28
35
  export default GoogleInput;
29
36
  export { GoogleInput };
@@ -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 InputErrorMessage: import("styled-components").StyledComponent<"div", any, {}, never>;
34
- export declare const InputDescription: import("styled-components").StyledComponent<"div", any, {}, never>;
35
- export declare const EndIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
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,9 @@ 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;
17
+ tooltipContent?: string;
15
18
  };
16
19
  /**
17
20
  * Use cases
@@ -41,6 +44,9 @@ export declare const NumberInput: import("react").ForwardRefExoticComponent<Omit
41
44
  locale?: string | undefined;
42
45
  errorMessage?: ReactNode;
43
46
  required?: boolean | undefined;
47
+ isInvalid?: boolean | undefined;
48
+ boldLabel?: boolean | undefined;
49
+ tooltipContent?: string | undefined;
44
50
  } & import("react").RefAttributes<HTMLInputElement>>;
45
51
  export declare const handleFormWithNumbers: (form: HTMLFormElement) => {
46
52
  [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 {};
@@ -13,6 +13,7 @@ interface TimeInputProps {
13
13
  defaultValue?: Time | null;
14
14
  value?: Time | null;
15
15
  onChange?: (newValue: Time) => void;
16
+ placeholder?: string;
16
17
  hourCycle?: '12' | '24' | '';
17
18
  interval?: number;
18
19
  errorMessage?: string;
@@ -20,4 +21,4 @@ interface TimeInputProps {
20
21
  isDisabled?: boolean;
21
22
  hideIcon?: boolean;
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, placeholder, isInvalid, isDisabled, ...props }: TimeInputProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import type { AriaSelectProps } from '@react-types/select';
2
2
  import type { CollectionChildren } from '@react-types/shared';
3
3
  import * as React from 'react';
4
+ export { Item as SingleSelectItem, Section as SingleSelectSection } from '@react-stately/collections';
4
5
  export { CollectionChildren as SingleSelectChildren };
5
- export { Item as SingleSelectItem, Section as SingleSelectSection, } from '@react-stately/collections';
6
6
  type SingleSelectProps<T> = Omit<AriaSelectProps<T>, 'children'> & {
7
7
  placeholder?: string;
8
8
  tooltipIcon?: string;
@@ -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 function Stack(props: StackProps): JSX.Element;
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;
@@ -21,6 +21,7 @@ export * from './Flex/Flex';
21
21
  export * from './GoogleInput';
22
22
  export * from './FormControl/FormControl';
23
23
  export * from './IconButton/IconButton';
24
+ export * from './Input/InputBase';
24
25
  export * from './Input/InlineEdit/InlineEdit';
25
26
  export * from './Input/NumberInput/NumberInput';
26
27
  export * from './Input/TextInput/TextInput';
@@ -1,3 +1,3 @@
1
1
  export * from './useWindowEvent';
2
- export * from './useOutsideClick';
2
+ export * from './useOnEscapeKey';
3
3
  export * from './usePrevious';
@@ -0,0 +1,2 @@
1
+ declare const useOnEscapeKey: (handler: () => void) => void;
2
+ export default useOnEscapeKey;
@@ -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 +0,0 @@
1
- export declare const useOutsideClick: (ref: React.RefObject<HTMLElement>, onOutsideClick: (event: MouseEvent) => void) => void;