@theroutingcompany/components 0.0.18-alpha.3 → 0.0.18-alpha.5

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.18-alpha.3",
3
+ "version": "0.0.18-alpha.5",
4
4
  "description": "The Routing Company Components",
5
5
  "main": "./dist/trc-components.umd.js",
6
6
  "module": "./dist/trc-components.es.js",
@@ -44,6 +44,7 @@
44
44
  "@radix-ui/react-checkbox": "^1.0.3",
45
45
  "@radix-ui/react-collapsible": "^1.0.2",
46
46
  "@radix-ui/react-dialog": "^1.0.3",
47
+ "@radix-ui/react-dropdown-menu": "^2.0.4",
47
48
  "@radix-ui/react-polymorphic": "^0.0.14",
48
49
  "@radix-ui/react-popover": "^1.0.5",
49
50
  "@radix-ui/react-radio-group": "^1.1.2",
@@ -90,12 +91,15 @@
90
91
  "@react-types/select": "3.7.0",
91
92
  "@tanstack/react-table": "^8.7.9",
92
93
  "@theroutingcompany/design-tokens": "^0.0.3",
94
+ "@types/react": "^18.0.0",
95
+ "csstype": "^3.1.1",
93
96
  "styled-components": "^5.3.8"
94
97
  },
95
98
  "peerDependencies": {
96
99
  "@material-ui/icons": "^4.11.3",
97
100
  "@types/react": "^18.0.0",
98
101
  "@types/react-dom": "^18.0.0",
102
+ "csstype": "^3.1.1",
99
103
  "react": "^18.2.0",
100
104
  "react-dom": "^18.2.0",
101
105
  "react-is": "^18.2.0"
@@ -115,7 +119,6 @@
115
119
  "@storybook/testing-library": "^0.0.14-next.0",
116
120
  "@types/eslint": "^8.21.1",
117
121
  "@types/prettier": "^2.7.2",
118
- "@types/react": "^18.0.28",
119
122
  "@types/react-dom": "^18.0.11",
120
123
  "@types/react-is": "^17.0.3",
121
124
  "@types/styled-components": "^5.1.26",
@@ -123,7 +126,6 @@
123
126
  "@typescript-eslint/parser": "^5.54.0",
124
127
  "@vitejs/plugin-react": "^3.1.0",
125
128
  "chromatic": "^6.17.1",
126
- "csstype": "^3.1.1",
127
129
  "eslint": "^8.35.0",
128
130
  "eslint-config-prettier": "^8.6.0",
129
131
  "eslint-plugin-jsx-a11y": "^6.7.1",
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
+ export type { DropdownMenuCheckboxItemProps, DropdownMenuContentProps, DropdownMenuItemIndicatorProps, DropdownMenuLabelProps, MenuSubTriggerProps, MenuSubContentProps, MenuSeparatorProps, } from '@radix-ui/react-dropdown-menu';
4
+ export declare function DropdownMenuContent({ children, forceMount, ...props }: DropdownMenuPrimitive.DropdownMenuContentProps): JSX.Element;
5
+ export declare const DropdownMenu: import("react").FC<DropdownMenuPrimitive.DropdownMenuProps>;
6
+ export declare const DropdownMenuPortal: import("react").FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
7
+ export declare const DropdownMenuGroup: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & import("react").RefAttributes<HTMLDivElement>>;
8
+ export declare const DropdownMenuTrigger: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
9
+ export declare const DropdownMenuRadioGroup: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
10
+ export declare const DropdownMenuItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuItemProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
11
+ export declare const DropdownMenuRadioItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioItemProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
12
+ export declare const DropdownMenuCheckboxItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
13
+ export declare const DropdownMenuItemIndicator: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuItemIndicatorProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
14
+ export declare const DropdownMenuArrow: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuArrowProps & import("react").RefAttributes<SVGSVGElement>>, any, {}, never>;
15
+ export declare const DropdownMenuLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuLabelProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
16
+ export declare const DropdownMenuSeparator: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSeparatorProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
17
+ export declare const DropdownMenuSub: import("react").FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
18
+ export declare const DropdownMenuSubTrigger: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
19
+ export declare const DropdownMenuSubContent: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSubContentProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
@@ -4,10 +4,10 @@ export type FileDescription = {
4
4
  mime: `${string}/${string}`;
5
5
  };
6
6
  type DropTargetProps = {
7
- file: File | null;
7
+ file?: File | null | undefined;
8
8
  fileTypes: FileDescription[];
9
9
  onAddFile: (f: File) => void;
10
- onDeleteFile: () => void;
10
+ onDeleteFile?: (() => void) | undefined;
11
11
  };
12
12
  export declare const FileUpload: import("react").ForwardRefExoticComponent<DropTargetProps & import("react").RefAttributes<HTMLDivElement>>;
13
13
  export {};
@@ -12,7 +12,7 @@ export type StyledIconButtonProps = AriaButtonProps & {
12
12
  shape?: Shape;
13
13
  disabled?: boolean;
14
14
  };
15
- /** Be sure to add add a `label` prop.
15
+ /** Be sure to add add a `label` prop. Note `aria-label` is already taken care of by the `label` prop.
16
16
  * ```jsx
17
17
  * <IconButton label="Add new item">
18
18
  * <AddIcon/>
@@ -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>;
@@ -3,6 +3,7 @@ export * from './AccessibleIcon/AccessibleIcon';
3
3
  export * from './Box/Box';
4
4
  export * from './Breadcrumbs/Breadcrumbs';
5
5
  export * from './Button/Button';
6
+ export * from './Button/ButtonBase';
6
7
  export * from './Checkbox/Checkbox';
7
8
  export * from './Dialog/Dialog';
8
9
  export * from './Flex/Flex';
@@ -0,0 +1,6 @@
1
+ type DataStates = {
2
+ isFocusVisible: boolean;
3
+ isPressed: boolean;
4
+ };
5
+ export declare function getDataState({ isFocusVisible, isPressed }: DataStates): string;
6
+ export {};