@theroutingcompany/components 0.0.18-alpha.6 → 0.0.18-alpha.8
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/dist/trc-components.es.js +7785 -8877
- package/dist/trc-components.es.js.map +1 -1
- package/dist/trc-components.umd.js +353 -396
- package/dist/trc-components.umd.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/types/components/AlertDialog/AlertDialog.d.ts +2 -0
- package/types/components/Dialog/Dialog.d.ts +3 -1
- package/types/components/MultiSelect/MultiSelect.d.ts +10 -10
- package/types/helpers/typeHelpers.d.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theroutingcompany/components",
|
|
3
|
-
"version": "0.0.18-alpha.
|
|
3
|
+
"version": "0.0.18-alpha.8",
|
|
4
4
|
"description": "The Routing Company Components",
|
|
5
5
|
"main": "./dist/trc-components.umd.js",
|
|
6
6
|
"module": "./dist/trc-components.es.js",
|
|
@@ -92,8 +92,7 @@
|
|
|
92
92
|
"@tanstack/react-table": "^8.7.9",
|
|
93
93
|
"@theroutingcompany/design-tokens": "^0.0.3",
|
|
94
94
|
"@types/react": "^18.0.0",
|
|
95
|
-
"csstype": "^3.1.1"
|
|
96
|
-
"styled-components": "^5.3.8"
|
|
95
|
+
"csstype": "^3.1.1"
|
|
97
96
|
},
|
|
98
97
|
"peerDependencies": {
|
|
99
98
|
"@material-ui/icons": "^4.11.3",
|
|
@@ -102,7 +101,8 @@
|
|
|
102
101
|
"csstype": "^3.1.1",
|
|
103
102
|
"react": "^18.2.0",
|
|
104
103
|
"react-dom": "^18.2.0",
|
|
105
|
-
"react-is": "^18.2.0"
|
|
104
|
+
"react-is": "^18.2.0",
|
|
105
|
+
"styled-components": "^5.3.9"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
108
|
"@babel/core": "^7.21.0",
|
|
@@ -138,6 +138,7 @@
|
|
|
138
138
|
"react-is": "^18.2.0",
|
|
139
139
|
"rimraf": "^4.1.2",
|
|
140
140
|
"storybook": "^7.0.0-beta.21",
|
|
141
|
+
"styled-components": "^5.3.9",
|
|
141
142
|
"stylelint": "^15.2.0",
|
|
142
143
|
"stylelint-config-prettier": "^9.0.5",
|
|
143
144
|
"stylelint-config-standard": "^30.0.1",
|
|
@@ -15,4 +15,6 @@ export declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps
|
|
|
15
15
|
export declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
16
16
|
export declare const AlertDialogAction: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
17
17
|
export declare const AlertDialogCancel: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
/** Dialog Cancel Button positioned in top right with × */
|
|
19
|
+
export declare const DialogCancelButton: ({ children, ...buttonProps }: AlertDialogPrimitive.AlertDialogCancelProps) => JSX.Element;
|
|
18
20
|
export {};
|
|
@@ -18,7 +18,9 @@ export declare const DialogTitle: import("styled-components").StyledComponent<im
|
|
|
18
18
|
export declare const dialogDescriptionStyles: import("styled-components").FlattenSimpleInterpolation;
|
|
19
19
|
export declare const DialogDescription: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<DialogPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>, any, {}, never>;
|
|
20
20
|
export declare const DialogFooter: import("styled-components").StyledComponent<"footer", any, {}, never>;
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const dialogCloseButtonStyles: import("styled-components").FlattenSimpleInterpolation;
|
|
22
|
+
/** Dialog Close Button positioned in top right with × */
|
|
23
|
+
export declare const DialogCloseButton: ({ children, ...buttonProps }: DialogPrimitive.DialogCloseProps) => JSX.Element;
|
|
22
24
|
export declare const Dialog: import("react").FC<DialogPrimitive.DialogProps>;
|
|
23
25
|
export declare const DialogTrigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
24
26
|
export declare const DialogClose: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CollectionChildren } from
|
|
2
|
-
import React from
|
|
3
|
-
import { useMultiSelectState } from
|
|
4
|
-
export { Item as MultiSelectItem, Section as MultiSelectSection } from
|
|
1
|
+
import type { CollectionChildren } from '@react-types/shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useMultiSelectState } from './useMultiSelectState';
|
|
4
|
+
export { Item as MultiSelectItem, Section as MultiSelectSection, } from '@react-stately/collections';
|
|
5
5
|
export type OptionItem = {
|
|
6
6
|
children?: never;
|
|
7
7
|
id: string;
|
|
@@ -25,9 +25,9 @@ type MultiSelectProps = {
|
|
|
25
25
|
/** Sets the default open state of the field (uncontrolled). */
|
|
26
26
|
defaultOpen?: boolean;
|
|
27
27
|
/** The initial selected keys in the collection (uncontrolled). */
|
|
28
|
-
defaultSelectedKeys?: Parameters<typeof useMultiSelectState>[
|
|
28
|
+
defaultSelectedKeys?: Parameters<typeof useMultiSelectState>[number]['defaultSelectedKeys'];
|
|
29
29
|
/** The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with. */
|
|
30
|
-
disabledKeys?: Parameters<typeof useMultiSelectState>[
|
|
30
|
+
disabledKeys?: Parameters<typeof useMultiSelectState>[number]['disabledKeys'];
|
|
31
31
|
excludeFromTabOrder?: boolean;
|
|
32
32
|
items: Option[];
|
|
33
33
|
/** Whether the field can be emptied. */
|
|
@@ -43,13 +43,13 @@ type MultiSelectProps = {
|
|
|
43
43
|
/** The content to display as the placeholder. */
|
|
44
44
|
placeholder?: string;
|
|
45
45
|
/** Handler that is called when the select's open state changes. */
|
|
46
|
-
onOpenChange?: Parameters<typeof useMultiSelectState>[
|
|
46
|
+
onOpenChange?: Parameters<typeof useMultiSelectState>['0']['onOpenChange'];
|
|
47
47
|
/** Handler that is called when the selection changes. */
|
|
48
|
-
onSelectionChange?: Parameters<typeof useMultiSelectState>[
|
|
48
|
+
onSelectionChange?: Parameters<typeof useMultiSelectState>['0']['onSelectionChange'];
|
|
49
49
|
/** The currently selected keys in the collection (controlled). */
|
|
50
|
-
selectedKeys?: Parameters<typeof useMultiSelectState>[
|
|
50
|
+
selectedKeys?: Parameters<typeof useMultiSelectState>['0']['selectedKeys'];
|
|
51
51
|
/** The type of selection that is allowed in the collection. */
|
|
52
|
-
selectionMode:
|
|
52
|
+
selectionMode: 'single' | 'multiple';
|
|
53
53
|
tooltipContent?: string;
|
|
54
54
|
tooltipIcon?: string;
|
|
55
55
|
};
|
|
@@ -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> & {
|