@theroutingcompany/components 0.0.14 → 0.0.15
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 +90 -84
- package/dist/trc-components.es.js +6147 -5620
- package/dist/trc-components.es.js.map +1 -1
- package/dist/trc-components.umd.js +319 -211
- package/dist/trc-components.umd.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -21
- package/types/components/Button/Button.d.ts +1 -1
- package/types/components/Button/ButtonBase.d.ts +4 -0
- package/types/components/IconButton/IconButton.d.ts +1 -1
- package/types/components/NavigationMenu/NavigationMenu.d.ts +58 -0
- package/types/components/Page/Page.d.ts +2 -1
- package/types/components/index.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theroutingcompany/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "The Routing Company Components",
|
|
5
5
|
"main": "./dist/trc-components.umd.js",
|
|
6
6
|
"module": "./dist/trc-components.es.js",
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"types"
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
|
-
"postpublish": "npm run chromatic",
|
|
25
24
|
"prepublish": "npm run build",
|
|
26
25
|
"format": "prettier ./dist/**/*.{js,css,scss} --write --no-config",
|
|
27
26
|
"clean": "rimraf ./dist ./types",
|
|
@@ -29,11 +28,11 @@
|
|
|
29
28
|
"build-storybook": "storybook build",
|
|
30
29
|
"lint": "eslint --cache src",
|
|
31
30
|
"lint:css": "stylelint src/components/**/*.{tsx,ts}",
|
|
32
|
-
"prepublishOnly": "npm run build",
|
|
33
31
|
"build:types": "tsc --incremental",
|
|
34
32
|
"build:components": "vite build",
|
|
35
33
|
"build": "npm run clean && npm run build:components && npm run build:types",
|
|
36
|
-
"chromatic": "npx chromatic --project-token=df154c51409f"
|
|
34
|
+
"chromatic": "npx chromatic --project-token=df154c51409f",
|
|
35
|
+
"deploy": "npm run chromatic"
|
|
37
36
|
},
|
|
38
37
|
"sideEffects": false,
|
|
39
38
|
"license": "ISC",
|
|
@@ -45,15 +44,15 @@
|
|
|
45
44
|
"@radix-ui/react-collapsible": "^1.0.1",
|
|
46
45
|
"@radix-ui/react-dialog": "^1.0.2",
|
|
47
46
|
"@radix-ui/react-polymorphic": "^0.0.14",
|
|
48
|
-
"@radix-ui/react-popover": "^1.0.
|
|
49
|
-
"@radix-ui/react-radio-group": "^1.1.
|
|
50
|
-
"@radix-ui/react-select": "^1.
|
|
47
|
+
"@radix-ui/react-popover": "^1.0.3",
|
|
48
|
+
"@radix-ui/react-radio-group": "^1.1.1",
|
|
49
|
+
"@radix-ui/react-select": "^1.2.0",
|
|
51
50
|
"@radix-ui/react-separator": "^1.0.1",
|
|
52
51
|
"@radix-ui/react-switch": "^1.0.1",
|
|
53
|
-
"@radix-ui/react-tabs": "^1.0.
|
|
52
|
+
"@radix-ui/react-tabs": "^1.0.2",
|
|
54
53
|
"@radix-ui/react-toast": "^1.1.2",
|
|
55
|
-
"@radix-ui/react-toggle-group": "^1.0.
|
|
56
|
-
"@radix-ui/react-tooltip": "^1.0.
|
|
54
|
+
"@radix-ui/react-toggle-group": "^1.0.2",
|
|
55
|
+
"@radix-ui/react-tooltip": "^1.0.3",
|
|
57
56
|
"@react-aria/breadcrumbs": "^3.4.1",
|
|
58
57
|
"@react-aria/button": "^3.6.4",
|
|
59
58
|
"@react-aria/dnd": "^3.0.1",
|
|
@@ -69,15 +68,15 @@
|
|
|
69
68
|
"@react-stately/numberfield": "^3.3.1",
|
|
70
69
|
"@react-stately/radio": "^3.6.2",
|
|
71
70
|
"@react-stately/searchfield": "^3.3.4",
|
|
72
|
-
"@tanstack/react-table": "^8.7.
|
|
71
|
+
"@tanstack/react-table": "^8.7.8",
|
|
73
72
|
"@theroutingcompany/design-tokens": "^0.0.3",
|
|
74
73
|
"styled-components": "^5.3.6"
|
|
75
74
|
},
|
|
76
75
|
"peerDependencies": {
|
|
77
76
|
"@material-ui/icons": "^4.11.3",
|
|
78
|
-
"react": "^
|
|
79
|
-
"react-dom": "
|
|
80
|
-
"react-is": "
|
|
77
|
+
"react": "^18.0.0",
|
|
78
|
+
"react-dom": " ^18.0.0",
|
|
79
|
+
"react-is": " ^18.0.0",
|
|
81
80
|
"styled-components": "^5.3.6"
|
|
82
81
|
},
|
|
83
82
|
"devDependencies": {
|
|
@@ -94,11 +93,10 @@
|
|
|
94
93
|
"@storybook/react-vite": "^7.0.0-alpha.25",
|
|
95
94
|
"@storybook/testing-library": "^0.0.14-next.0",
|
|
96
95
|
"@types/eslint": "^8.4.10",
|
|
97
|
-
"@types/mime-types": "^2.1.1",
|
|
98
96
|
"@types/prettier": "^2.7.2",
|
|
99
|
-
"@types/react": "^
|
|
100
|
-
"@types/react-dom": "^
|
|
101
|
-
"@types/react-is": "^17.0.0
|
|
97
|
+
"@types/react": "^18.0.0",
|
|
98
|
+
"@types/react-dom": "^18.0.0",
|
|
99
|
+
"@types/react-is": "^17.0.0",
|
|
102
100
|
"@types/styled-components": "^5.1.26",
|
|
103
101
|
"@typescript-eslint/eslint-plugin": "^5.48.1",
|
|
104
102
|
"@typescript-eslint/parser": "^5.48.1",
|
|
@@ -112,9 +110,9 @@
|
|
|
112
110
|
"eslint-plugin-storybook": "^0.6.10",
|
|
113
111
|
"postcss-styled-syntax": "^0.3.1",
|
|
114
112
|
"prettier": "^2.8.3",
|
|
115
|
-
"react": "^
|
|
116
|
-
"react-dom": "^
|
|
117
|
-
"react-is": "^
|
|
113
|
+
"react": "^18.0.0",
|
|
114
|
+
"react-dom": "^18.0.0",
|
|
115
|
+
"react-is": "^18.0.0",
|
|
118
116
|
"rimraf": "^3.0.2",
|
|
119
117
|
"storybook": "^7.0.0-beta.21",
|
|
120
118
|
"stylelint": "^14.16.1",
|
|
@@ -21,7 +21,7 @@ export type ButtonBaseProps = {
|
|
|
21
21
|
};
|
|
22
22
|
type ReactAriaProps = RenameMisprefixedProps<AriaButtonProps, 'is', 'isDisabled'>;
|
|
23
23
|
export type ButtonProps = PropsWithChildren<ButtonDesignProps> & ReactAriaProps & {
|
|
24
|
-
onClick?: ReactAriaProps[
|
|
24
|
+
onClick?: ReactAriaProps['onPress'];
|
|
25
25
|
};
|
|
26
26
|
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
27
27
|
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import type { ButtonBaseProps } from './Button';
|
|
2
|
+
export declare const buttonPadding: {
|
|
3
|
+
readonly small: "0.5rem 0.75rem";
|
|
4
|
+
readonly large: "0.75rem 1rem";
|
|
5
|
+
};
|
|
2
6
|
export declare const ButtonBase: import("styled-components").StyledComponent<"button", any, ButtonBaseProps, never>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React, { type PropsWithChildren, type ReactNode } from 'react';
|
|
2
|
+
export declare enum Direction {
|
|
3
|
+
Up = "Up",
|
|
4
|
+
Down = "Down"
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Menu
|
|
8
|
+
*/
|
|
9
|
+
interface NavigationMenuProps {
|
|
10
|
+
direction?: Direction.Up | Direction.Down;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export interface CompoundedComponent extends React.ForwardRefExoticComponent<NavigationMenuProps & React.RefAttributes<HTMLDivElement>> {
|
|
14
|
+
Trigger: typeof Trigger;
|
|
15
|
+
List: typeof List;
|
|
16
|
+
Item: typeof Item;
|
|
17
|
+
Separator: typeof Separator;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Trigger
|
|
21
|
+
*/
|
|
22
|
+
export type TriggerProps = PropsWithChildren<{
|
|
23
|
+
open?: boolean;
|
|
24
|
+
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
25
|
+
}>;
|
|
26
|
+
declare const Trigger: ({ children }: TriggerProps) => JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* List
|
|
29
|
+
*/
|
|
30
|
+
export type ListProps = PropsWithChildren<{
|
|
31
|
+
width?: number;
|
|
32
|
+
top?: number;
|
|
33
|
+
left?: number;
|
|
34
|
+
open?: boolean;
|
|
35
|
+
onItemSelect?: () => void;
|
|
36
|
+
portalIdOverride?: undefined | string;
|
|
37
|
+
}>;
|
|
38
|
+
declare const List: ({ children, portalIdOverride, }: {
|
|
39
|
+
children: React.ReactNode[];
|
|
40
|
+
portalIdOverride?: string | undefined;
|
|
41
|
+
}) => React.ReactPortal;
|
|
42
|
+
interface ItemProps<T extends React.ElementType> {
|
|
43
|
+
as?: T;
|
|
44
|
+
children?: React.ReactNode;
|
|
45
|
+
}
|
|
46
|
+
export declare function Item<T extends React.ElementType = "div">({ as, ...props }: ItemProps<T> & Omit<React.ComponentPropsWithoutRef<T>, keyof ItemProps<T>>): JSX.Element;
|
|
47
|
+
declare function Separator(): JSX.Element;
|
|
48
|
+
declare const NavigationMenu: CompoundedComponent & {
|
|
49
|
+
Trigger: ({ children }: TriggerProps) => JSX.Element;
|
|
50
|
+
List: ({ children, portalIdOverride, }: {
|
|
51
|
+
children: React.ReactNode[];
|
|
52
|
+
portalIdOverride?: string | undefined;
|
|
53
|
+
}) => React.ReactPortal;
|
|
54
|
+
Item: typeof Item;
|
|
55
|
+
Separator: typeof Separator;
|
|
56
|
+
};
|
|
57
|
+
declare const NavigationMenuPortal: () => JSX.Element;
|
|
58
|
+
export { NavigationMenu, NavigationMenuPortal };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
export declare const PageGrid: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const PageContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
export declare function Page({ children }: {
|
|
4
|
+
export declare function Page({ children, className, }: {
|
|
5
5
|
children: ReactNode;
|
|
6
|
+
className?: string | undefined;
|
|
6
7
|
}): JSX.Element;
|
|
@@ -8,6 +8,7 @@ export * from './Fieldset/Fieldset';
|
|
|
8
8
|
export * from './FileUpload/FileUpload';
|
|
9
9
|
export * from './FormControl/FormControl';
|
|
10
10
|
export * from './Heading/Heading';
|
|
11
|
+
export * from './NavigationMenu/NavigationMenu';
|
|
11
12
|
export * from './IconButton/IconButton';
|
|
12
13
|
export * from './Input/NumberInput/NumberInput';
|
|
13
14
|
export * from './Input/TextInput/TextInput';
|