@theroutingcompany/components 0.0.18 → 0.0.19

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.
Files changed (33) hide show
  1. package/README.md +32 -4
  2. package/dist/trc-components.es.js +12134 -8963
  3. package/dist/trc-components.es.js.map +1 -1
  4. package/dist/trc-components.umd.js +1009 -856
  5. package/dist/trc-components.umd.js.map +1 -1
  6. package/dist/tsconfig.tsbuildinfo +1 -1
  7. package/package.json +25 -20
  8. package/types/components/AlertDialog/AlertDialog.d.ts +3 -1
  9. package/types/components/Box/Box.d.ts +133 -0
  10. package/types/components/Breadcrumbs/Breadcrumbs.d.ts +3 -3
  11. package/types/components/Button/Button.d.ts +4 -4
  12. package/types/components/Checkbox/Checkbox.d.ts +3 -1
  13. package/types/components/Dialog/Dialog.d.ts +7 -3
  14. package/types/components/DropdownMenu/DropdownMenu.d.ts +19 -0
  15. package/types/components/Fieldset/Fieldset.d.ts +1 -1
  16. package/types/components/FileUpload/FileUpload.d.ts +2 -2
  17. package/types/components/Flex/Flex.d.ts +73 -0
  18. package/types/components/FormControl/FormControl.d.ts +2 -2
  19. package/types/components/IconButton/IconButton.d.ts +1 -1
  20. package/types/components/Input/NumberInput/NumberInput.d.ts +1 -1
  21. package/types/components/Input/TextArea/TextArea.d.ts +1 -1
  22. package/types/components/Input/TextInput/TextInput.d.ts +1 -1
  23. package/types/components/Label/Label.d.ts +1 -1
  24. package/types/components/MultiSelect/MultiSelect.d.ts +10 -10
  25. package/types/components/NavigationMenu/NavigationMenu.d.ts +6 -3
  26. package/types/components/Page/Page.d.ts +15 -1
  27. package/types/components/Paginator/Paginator.d.ts +1 -1
  28. package/types/components/Popover/Popover.d.ts +1 -1
  29. package/types/components/ReactAriaButton/ReactAriaButton.d.ts +1 -1
  30. package/types/components/index.d.ts +4 -0
  31. package/types/helpers/interactionStates.d.ts +7 -0
  32. package/types/helpers/tokenUtils.d.ts +19 -0
  33. package/types/helpers/typeHelpers.d.ts +4 -0
@@ -1,5 +1,19 @@
1
- /** 12 column grid */
1
+ /** 12 column grid with 2rem gapp
2
+ *
3
+ * | Description | CSS Variable | Default |
4
+ * |-------------------------|---------------------|---------|
5
+ * | Min width for columns | `--min-col-width` | 0 |
6
+ */
2
7
  export declare const PageGrid: import("styled-components").StyledComponent<"div", any, {}, never>;
8
+ /** CSS for limiting page width
9
+ *
10
+ * | Description | CSS Variable | Default |
11
+ * |-------------|---------------------|---------|
12
+ * | Min. width | `--page-min-width` | 750px |
13
+ * | Ideal width | `--page-ideal-width`| 85% |
14
+ * | Max width | `--page-max-width` | 1600px |
15
+ */
16
+ export declare const pageMinMaxWidth: import("styled-components").FlattenSimpleInterpolation;
3
17
  /** Centered page container
4
18
  *
5
19
  * | Description | CSS Variable | Default |
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { type ButtonProps } from 'components';
2
+ import { type ButtonProps } from '../../components';
3
3
  type PaginatorButtonProps = ButtonProps & {
4
4
  label: string;
5
5
  direction: 'left' | 'right';
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import * as PopoverPrimitive from '@radix-ui/react-popover';
3
3
  export type { PopoverCloseProps, PopoverContentProps, } from '@radix-ui/react-popover';
4
- export declare function PopoverContent({ children, ...props }: PopoverPrimitive.PopoverContentProps): JSX.Element;
4
+ export declare function PopoverContent({ children, forceMount, ...props }: PopoverPrimitive.PopoverContentProps): JSX.Element;
5
5
  export declare const PopoverClose: import("react").ForwardRefExoticComponent<PopoverPrimitive.PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
6
6
  export declare const PopoverCloseCross: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<PopoverPrimitive.PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
7
7
  export declare const Popover: import("react").FC<PopoverPrimitive.PopoverProps>;
@@ -1,5 +1,5 @@
1
1
  import { type AriaButtonProps } from '@react-aria/button';
2
2
  import { type ComponentPropsWithoutRef } from 'react';
3
3
  export type ReactAriaButtonProps = AriaButtonProps & ComponentPropsWithoutRef<'button'>;
4
- /** Fo internal use only! */
4
+ /** For internal use only! */
5
5
  export declare function ReactAriaButton(props: ReactAriaButtonProps): JSX.Element;
@@ -1,9 +1,13 @@
1
1
  export * from './AlertDialog/AlertDialog';
2
2
  export * from './AccessibleIcon/AccessibleIcon';
3
+ export * from './Box/Box';
3
4
  export * from './Breadcrumbs/Breadcrumbs';
4
5
  export * from './Button/Button';
6
+ export * from './Button/ButtonBase';
5
7
  export * from './Checkbox/Checkbox';
8
+ export * from './DropdownMenu/DropdownMenu';
6
9
  export * from './Dialog/Dialog';
10
+ export * from './Flex/Flex';
7
11
  export * from './Fieldset/Fieldset';
8
12
  export * from './FileUpload/FileUpload';
9
13
  export * from './FormControl/FormControl';
@@ -0,0 +1,7 @@
1
+ type DataStates = {
2
+ isFocusVisible: boolean;
3
+ isPressed: boolean;
4
+ };
5
+ /** Utility for turning component state boolean into string for use in `data-state` attribute */
6
+ export declare function getDataState({ isFocusVisible, isPressed }: DataStates): string;
7
+ export {};
@@ -0,0 +1,19 @@
1
+ import nestedTokens from '@theroutingcompany/design-tokens/dist/json/tokens.json';
2
+ import type { CSSProperties } from 'react';
3
+ export declare function filterDefined(obj: Record<PropertyKey, unknown> | CSSProperties | undefined): {
4
+ [k: string]: any;
5
+ } | undefined;
6
+ export type RemoveVendorProperties<P extends string | number> = P extends `-moz-${string}` | `-webkit-${string}` ? never : P;
7
+ type Spacing = (typeof nestedTokens)['spacing'];
8
+ export type SpacingToken = keyof Spacing;
9
+ export declare const getSpacingValue: (token: string) => string;
10
+ type Elevation = (typeof nestedTokens)['elevation'];
11
+ export type ElevationToken = `interactive_${keyof Elevation['interactive']}` | `static_${keyof Elevation['static']}`;
12
+ export declare const allElevations: (readonly [`interactive_${string}`, string] | readonly [`static_${string}`, string])[];
13
+ export declare const getElevation: (token: string) => string;
14
+ type BorderRadius = (typeof nestedTokens)['border-radius'];
15
+ export type BorderRadiusToken = keyof BorderRadius;
16
+ export declare const getBorderRadius: (token: string) => string;
17
+ export type SizingToken = keyof (typeof nestedTokens)['sizing'];
18
+ export declare const getSizingValue: (token: string) => string;
19
+ export {};
@@ -4,6 +4,10 @@ declare module 'csstype' {
4
4
  [index: `--${string}`]: string | number | undefined;
5
5
  }
6
6
  }
7
+ /** Utility type to get pretty readout of all of the members of an intersection. TS Quirk */
8
+ export type Prettify<T> = {
9
+ [K in keyof T]: T[K];
10
+ } & {};
7
11
  export type ComponentPropsWithoutStyles<E extends ElementType> = Omit<ComponentPropsWithoutRef<E>, 'style'>;
8
12
  type RemovePrefix<S extends string, Prefix extends string = 'is'> = S extends `${Prefix}${infer R}` ? Uncapitalize<R> : never;
9
13
  export type RenameMisprefixedProps<InputProps extends Record<PropertyKey, any>, Prefix extends string, MisnamedKeys extends `${Prefix}${string}`> = Omit<InputProps, MisnamedKeys> & {