@theroutingcompany/components 0.0.13 → 0.0.14-3713.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theroutingcompany/components",
3
- "version": "0.0.13",
3
+ "version": "0.0.14-3713.1",
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",
@@ -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;
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;
53
+ }) => React.ReactPortal;
54
+ Item: typeof Item;
55
+ Separator: typeof Separator;
56
+ };
57
+ declare const NavigationMenuPortal: () => JSX.Element;
58
+ export { NavigationMenu, NavigationMenuPortal };
@@ -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';