@theroutingcompany/components 0.0.1
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 +68 -0
- package/dist/trc-components.es.js +10519 -0
- package/dist/trc-components.es.js.map +1 -0
- package/dist/trc-components.umd.js +1430 -0
- package/dist/trc-components.umd.js.map +1 -0
- package/package.json +109 -0
- package/types/components/AccessibleIcon/AccessibleIcon.d.ts +3 -0
- package/types/components/AlertDialog/AlertDialog.d.ts +18 -0
- package/types/components/Box/Box.d.ts +12 -0
- package/types/components/Breadcrumbs/Breadcrumbs.d.ts +16 -0
- package/types/components/Button/Button.d.ts +55 -0
- package/types/components/Button/ButtonBase.d.ts +1 -0
- package/types/components/Button/HighEmphasisButton/HighEmphasisButton.d.ts +6 -0
- package/types/components/Button/LowEmphasisButton/LowEmphasisButton.d.ts +5 -0
- package/types/components/Button/MediumEmphasisButton/MediumEmphasisButton.d.ts +5 -0
- package/types/components/Checkbox/Checkbox.d.ts +7 -0
- package/types/components/Dialog/Dialog.d.ts +24 -0
- package/types/components/Fieldset/Fieldset.d.ts +9 -0
- package/types/components/FormControl/FormControl.d.ts +19 -0
- package/types/components/FormControl/useFormInput.d.ts +9 -0
- package/types/components/Grid/Grid.d.ts +0 -0
- package/types/components/Heading/Heading.d.ts +10 -0
- package/types/components/IconButton/IconButton.d.ts +21 -0
- package/types/components/Input/CreditCardInput/CreditCardInput.d.ts +1 -0
- package/types/components/Input/InputBase.d.ts +9 -0
- package/types/components/Input/NumberInput/NumberInput.d.ts +32 -0
- package/types/components/Input/PasswordInput/PasswordInput.d.ts +0 -0
- package/types/components/Input/PhoneInput/PhoneInput.d.ts +0 -0
- package/types/components/Input/TextArea/TextArea.d.ts +8 -0
- package/types/components/Input/TextInput/TextInput.d.ts +27 -0
- package/types/components/Input/URLInput/URLInput.d.ts +0 -0
- package/types/components/Label/Label.d.ts +9 -0
- package/types/components/Page/Page.d.ts +4 -0
- package/types/components/Popover/Popover.d.ts +8 -0
- package/types/components/RadioGroup/RadioGroup.d.ts +6 -0
- package/types/components/SegmentControl/SegmentControl.d.ts +8 -0
- package/types/components/Select/Select.d.ts +23 -0
- package/types/components/Stack/Stack.d.ts +0 -0
- package/types/components/Switch/Switch.d.ts +4 -0
- package/types/components/Text/Text.d.ts +39 -0
- package/types/components/Title/Title.d.ts +9 -0
- package/types/components/Toast/Toast.d.ts +16 -0
- package/types/components/Tooltip/IconTooltip.d.ts +8 -0
- package/types/components/Tooltip/Tooltip.d.ts +8 -0
- package/types/components/index.d.ts +21 -0
- package/types/helpers/index.d.ts +1 -0
- package/types/helpers/typeHelpers.d.ts +24 -0
- package/types/index.d.ts +2 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
|
+
export type { TooltipContentProps, TooltipProps, } from '@radix-ui/react-tooltip';
|
|
4
|
+
declare function Content({ children, ...props }: TooltipPrimitive.TooltipContentProps): JSX.Element;
|
|
5
|
+
export declare const TooltipTrigger: any;
|
|
6
|
+
export declare const TooltipProvider: import("react").FC<TooltipPrimitive.TooltipProviderProps>;
|
|
7
|
+
export declare const Tooltip: import("react").FC<TooltipPrimitive.TooltipProps>;
|
|
8
|
+
export declare const TooltipContent: typeof Content;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * from './AlertDialog/AlertDialog';
|
|
2
|
+
export * from './AccessibleIcon/AccessibleIcon';
|
|
3
|
+
export * from './Breadcrumbs/Breadcrumbs';
|
|
4
|
+
export * from './Button/Button';
|
|
5
|
+
export * from './Checkbox/Checkbox';
|
|
6
|
+
export * from './Dialog/Dialog';
|
|
7
|
+
export * from './Fieldset/Fieldset';
|
|
8
|
+
export * from './FormControl/FormControl';
|
|
9
|
+
export * from './Heading/Heading';
|
|
10
|
+
export * from './IconButton/IconButton';
|
|
11
|
+
export * from './Input/NumberInput/NumberInput';
|
|
12
|
+
export * from './Input/TextInput/TextInput';
|
|
13
|
+
export * from './Label/Label';
|
|
14
|
+
export * from './Toast/Toast';
|
|
15
|
+
export * from './Popover/Popover';
|
|
16
|
+
export * from './RadioGroup/RadioGroup';
|
|
17
|
+
export * from './Select/Select';
|
|
18
|
+
export * from './Switch/Switch';
|
|
19
|
+
export * from './Text/Text';
|
|
20
|
+
export * from './Title/Title';
|
|
21
|
+
export * from './Tooltip/Tooltip';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './typeHelpers';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type AriaNumberFieldProps } from '@react-aria/numberfield';
|
|
2
|
+
import type { ComponentPropsWithoutRef, ElementType } from 'react';
|
|
3
|
+
export type ComponentPropsWithoutStyles<E extends ElementType> = Omit<ComponentPropsWithoutRef<E>, 'style' | 'className'>;
|
|
4
|
+
type RemovePrefix<S extends string, Prefix extends string = 'is'> = S extends `${Prefix}${infer R}` ? Uncapitalize<R> : never;
|
|
5
|
+
export type RenameMisprefixedProps<InputProps extends Record<PropertyKey, any>, Prefix extends string, MisnamedKeys extends `${Prefix}${string}`> = Omit<InputProps, MisnamedKeys> & {
|
|
6
|
+
[S in MisnamedKeys as RemovePrefix<S, Prefix>]?: InputProps[S];
|
|
7
|
+
};
|
|
8
|
+
type RemoveSuffix<S extends string, Suffix extends string = 'Value'> = S extends `${infer R}${Suffix}` ? Uncapitalize<R> : never;
|
|
9
|
+
export type RenameMissuffixedProps<InputProps extends Record<PropertyKey, any>, Suffix extends string, MisnamedKeys extends `${string}${Suffix}`> = Omit<InputProps, MisnamedKeys> & {
|
|
10
|
+
[S in MisnamedKeys as RemoveSuffix<S, Suffix>]?: InputProps[S];
|
|
11
|
+
};
|
|
12
|
+
type ReactAriaInputProps = RenameMisprefixedProps<AriaNumberFieldProps, 'is', 'isDisabled' | 'isRequired' | 'isReadOnly'>;
|
|
13
|
+
/** Get a type warning when an `errorMessage` is passed without a `validationState` prop. */
|
|
14
|
+
export type InputValidationProps = {
|
|
15
|
+
validationState: ReactAriaInputProps['validationState'];
|
|
16
|
+
errorMessage?: ReactAriaInputProps['errorMessage'];
|
|
17
|
+
} | {
|
|
18
|
+
validationState?: never;
|
|
19
|
+
errorMessage?: never;
|
|
20
|
+
};
|
|
21
|
+
type MisprefixedBooleanProps = 'isDisabled' | 'isRequired' | 'isReadOnly';
|
|
22
|
+
/** renames `isdisabled`, `isrequired,` and `isreadonly` to `disabled`, `required,` and `readOnly` in an object type */
|
|
23
|
+
export type RenameBooleanProps<InputProps extends Record<PropertyKey, any>> = RenameMisprefixedProps<InputProps, 'is', MisprefixedBooleanProps>;
|
|
24
|
+
export {};
|
package/types/index.d.ts
ADDED