@theroutingcompany/components 0.0.20-alpha.2 → 0.0.21
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 +2314 -2314
- package/dist/trc-components.es.js.map +1 -1
- package/dist/trc-components.umd.js +313 -313
- package/dist/trc-components.umd.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/types/components/AlertDialog/AlertDialog.d.ts +7 -8
- package/types/components/Box/Box.d.ts +1 -1
- package/types/components/Dialog/Dialog.d.ts +1 -1
- package/types/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/types/components/MultiSelect/MultiSelectPopover.d.ts +3 -2
- package/types/components/MultiSelect/useMultiSelect.d.ts +2 -2
- package/types/components/MultiSelect/useMultiSelectState.d.ts +2 -2
- package/types/components/ReactAriaButton/ReactAriaButton.d.ts +1 -1
- package/types/components/SegmentControl/SegmentControl.d.ts +3 -3
- package/types/components/Select/Select.d.ts +15 -15
- package/types/components/Text/Text.d.ts +1 -1
- package/types/helpers/tokenUtils.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
1
|
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
4
3
|
import { dialogWidths } from '../../components/Dialog/Dialog';
|
|
5
4
|
type DialogWidth = keyof typeof dialogWidths;
|
|
6
5
|
type StyledContentProps = {
|
|
@@ -8,13 +7,13 @@ type StyledContentProps = {
|
|
|
8
7
|
};
|
|
9
8
|
export type AlertDialogContentProps = StyledContentProps & AlertDialogPrimitive.DialogContentProps & ComponentPropsWithRef<'div'>;
|
|
10
9
|
export declare function AlertDialogContent({ children, size, ...props }: AlertDialogContentProps): JSX.Element;
|
|
11
|
-
export declare const AlertDialogTitle: import("styled-components").StyledComponent<
|
|
12
|
-
export declare const AlertDialogDescription: import("styled-components").StyledComponent<
|
|
10
|
+
export declare const AlertDialogTitle: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>, any, {}, never>;
|
|
11
|
+
export declare const AlertDialogDescription: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>, any, {}, never>;
|
|
13
12
|
export declare const AlertDialogFooter: import("styled-components").StyledComponent<"footer", any, {}, never>;
|
|
14
|
-
export declare const AlertDialog:
|
|
15
|
-
export declare const AlertDialogTrigger:
|
|
16
|
-
export declare const AlertDialogAction:
|
|
17
|
-
export declare const AlertDialogCancel:
|
|
13
|
+
export declare const AlertDialog: import("react").FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
14
|
+
export declare const AlertDialogTrigger: import("react").ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
export declare const AlertDialogAction: import("react").ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogActionProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
export declare const AlertDialogCancel: import("react").ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogCancelProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
18
17
|
/** AlertDialog Cancel Button positioned in top right with × */
|
|
19
18
|
export declare const AlertDialogCancelButton: ({ children, ...buttonProps }: AlertDialogPrimitive.AlertDialogCancelProps) => JSX.Element;
|
|
20
19
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Property } from 'csstype';
|
|
2
1
|
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import type { Property } from 'csstype';
|
|
3
3
|
import type { BorderRadiusToken, ElevationToken, RemoveVendorProperties, SizingToken, SpacingToken } from '../../helpers/tokenUtils';
|
|
4
4
|
export type BoxProps = PropsWithChildren<{
|
|
5
5
|
display?: 'block' | 'inline-block' | 'contents' | 'none' | 'inline';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
1
|
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
3
|
export declare const overlayStyles: import("styled-components").FlattenSimpleInterpolation;
|
|
4
4
|
export declare const dialogWidths: {
|
|
5
5
|
readonly small: "360px";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CollectionChildren } from '@react-types/shared';
|
|
2
1
|
import React from 'react';
|
|
2
|
+
import type { CollectionChildren } from '@react-types/shared';
|
|
3
3
|
import { useMultiSelectState } from './useMultiSelectState';
|
|
4
4
|
export { Item as MultiSelectItem, Section as MultiSelectSection, } from '@react-stately/collections';
|
|
5
5
|
export type OptionItem = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
type PopoverProps = {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
className?: string;
|
|
@@ -6,5 +6,6 @@ type PopoverProps = {
|
|
|
6
6
|
onClose: () => void;
|
|
7
7
|
triggerRef: React.RefObject<HTMLButtonElement>;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
/** Do we really need two different popovers */
|
|
10
|
+
export declare function Popover({ isOpen, onClose, children, className, triggerRef, }: PopoverProps): JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { HTMLAttributes, RefObject } from "react";
|
|
2
|
+
import type { AriaListBoxOptions } from "@react-aria/listbox";
|
|
3
3
|
import type { AriaButtonProps } from "@react-types/button";
|
|
4
4
|
import type { AriaSelectProps } from "@react-types/select";
|
|
5
5
|
import type { MultiSelectProps as MultiSelectStateProps, MultiSelectState } from "./useMultiSelectState";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MenuTriggerState } from "@react-stately/menu";
|
|
2
|
-
import { MultiSelectListState } from "./useMultiSelectListState";
|
|
1
|
+
import type { MenuTriggerState } from "@react-stately/menu";
|
|
3
2
|
import type { OverlayTriggerProps } from "@react-types/overlays";
|
|
4
3
|
import type { AsyncLoadable, CollectionBase, FocusableProps, InputBase, LabelableProps, MultipleSelection, TextInputBase, Validation } from "@react-types/shared";
|
|
4
|
+
import type { MultiSelectListState } from "./useMultiSelectListState";
|
|
5
5
|
export interface MultiSelectProps<T> extends CollectionBase<T>, AsyncLoadable, Omit<InputBase, "isReadOnly">, Validation, LabelableProps, TextInputBase, MultipleSelection, FocusableProps, OverlayTriggerProps {
|
|
6
6
|
/**
|
|
7
7
|
* Whether the menu should automatically flip direction when space is limited.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type AriaButtonProps } from '@react-aria/button';
|
|
2
1
|
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { type AriaButtonProps } from '@react-aria/button';
|
|
3
3
|
export type ReactAriaButtonProps = AriaButtonProps & ComponentPropsWithoutRef<'button'>;
|
|
4
4
|
/** For internal use only! */
|
|
5
5
|
export declare function ReactAriaButton(props: ReactAriaButtonProps): JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import * as ToggleGroup from '@radix-ui/react-toggle-group';
|
|
3
|
-
export declare const StyledSegmentControlRoot: import("styled-components").StyledComponent<
|
|
3
|
+
export declare const StyledSegmentControlRoot: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<(ToggleGroup.ToggleGroupSingleProps | ToggleGroup.ToggleGroupMultipleProps) & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
4
4
|
export type SegmentControlRootProps = Omit<ToggleGroup.ToggleGroupSingleProps, 'type' | 'style' | 'className'> & {
|
|
5
5
|
size?: 'small' | 'large';
|
|
6
6
|
};
|
|
7
7
|
export declare const SegmentControlRoot: ({ children, size, ...props }: SegmentControlRootProps) => JSX.Element;
|
|
8
|
-
export declare const SegmentControlItem: import("styled-components").StyledComponent<
|
|
8
|
+
export declare const SegmentControlItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<ToggleGroup.ToggleGroupItemProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
3
|
-
export declare const StyledTrigger: import("styled-components").StyledComponent<
|
|
3
|
+
export declare const StyledTrigger: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<SelectPrimitive.SelectTriggerProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
4
4
|
export declare function SelectContent({ children, ...props }: SelectPrimitive.SelectContentProps): JSX.Element;
|
|
5
|
-
export declare const Select:
|
|
6
|
-
export declare const SelectTrigger: import("styled-components").StyledComponent<
|
|
7
|
-
export declare const SelectValue:
|
|
8
|
-
export declare const SelectIcon: import("styled-components").StyledComponent<
|
|
9
|
-
export declare const SelectViewport: import("styled-components").StyledComponent<
|
|
10
|
-
export declare const SelectGroup:
|
|
11
|
-
export declare const SelectItem: import("styled-components").StyledComponent<
|
|
12
|
-
export declare const SelectItemText:
|
|
13
|
-
export declare const SelectItemIndicator: import("styled-components").StyledComponent<
|
|
14
|
-
export declare const SelectGroupLabel: import("styled-components").StyledComponent<
|
|
15
|
-
export declare const SelectSeparator: import("styled-components").StyledComponent<
|
|
16
|
-
export declare const SelectScrollUpButton: import("styled-components").StyledComponent<
|
|
17
|
-
export declare const SelectScrollDownButton: import("styled-components").StyledComponent<
|
|
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
18
|
type SingleSelectProps = {
|
|
19
19
|
items: string[];
|
|
20
20
|
} & SelectPrimitive.SelectProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type * as Polymorphic from '@radix-ui/react-polymorphic';
|
|
2
1
|
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type * as Polymorphic from '@radix-ui/react-polymorphic';
|
|
3
3
|
type TextElements = 'p' | 'div' | 'span' | 'legend' | 'caption' | 'figcaption' | 'strong' | 'em' | 'strong' | 'abbr' | 'mark' | 'q' | 'small' | 'time';
|
|
4
4
|
interface BodyTextProps extends ComponentPropsWithoutRef<'p'> {
|
|
5
5
|
type: 'body';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import nestedTokens from '@theroutingcompany/design-tokens/dist/json/tokens.json';
|
|
2
1
|
import type { CSSProperties } from 'react';
|
|
2
|
+
import nestedTokens from '@theroutingcompany/design-tokens/dist/json/tokens.json';
|
|
3
3
|
export declare function filterDefined(obj: Record<PropertyKey, unknown> | CSSProperties | undefined): {
|
|
4
4
|
[k: string]: any;
|
|
5
5
|
} | undefined;
|