@theroutingcompany/components 0.0.138 → 0.0.139-alpha.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/dist/trc-components.es.js +6367 -6114
- package/dist/trc-components.es.js.map +1 -1
- package/dist/trc-components.umd.js +1016 -924
- package/dist/trc-components.umd.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -3
- package/types/{components → src/components}/Banner/Banner.d.ts +0 -1
- package/types/{components → src/components}/ButtonGroup/ButtonGroup.d.ts +0 -1
- package/types/{components → src/components}/ButtonMenu/ButtonMenu.d.ts +0 -1
- package/types/{components → src/components}/ButtonV2/ButtonV2.d.ts +0 -1
- package/types/{components → src/components}/Checkbox/Checkbox.d.ts +0 -1
- package/types/{components → src/components}/DropdownMenu/DropdownMenu.d.ts +0 -1
- package/types/{components → src/components}/FileUpload/FileUpload.d.ts +0 -1
- package/types/{components → src/components}/FormControl/FormControl.d.ts +3 -3
- package/types/{components → src/components}/GoogleInput/GoogleInput.d.ts +1 -1
- package/types/{components → src/components}/IconButton/IconButton.d.ts +0 -1
- package/types/{components → src/components}/Paginator/Paginator.d.ts +0 -1
- package/types/{components → src/components}/Popover/Popover.d.ts +0 -1
- package/types/{components → src/components}/Portal/Portal.d.ts +0 -1
- package/types/{components → src/components}/RadioGroup/RadioGroup.d.ts +0 -1
- package/types/{components → src/components}/Search/Search.d.ts +0 -1
- package/types/src/components/SearchableSelect/SearchableSelect.d.ts +21 -0
- package/types/src/components/SearchableSelect/SearchableSelect.test.d.ts +1 -0
- package/types/src/components/SearchableSelect/index.d.ts +1 -0
- package/types/{components → src/components}/Switch/Switch.d.ts +0 -1
- package/types/{components → src/components}/Tooltip/Tooltip.d.ts +0 -1
- package/types/{components → src/components}/index.d.ts +1 -0
- package/types/src/test/setup.d.ts +1 -0
- package/types/vitest.config.d.ts +2 -0
- /package/types/{components → src/components}/AccessibleIcon/AccessibleIcon.d.ts +0 -0
- /package/types/{components → src/components}/Accordion/Accordion.d.ts +0 -0
- /package/types/{components → src/components}/Accordion/index.d.ts +0 -0
- /package/types/{components → src/components}/AlertDialog/AlertDialog.d.ts +0 -0
- /package/types/{components → src/components}/Avatar/Avatar.d.ts +0 -0
- /package/types/{components → src/components}/Badge/Badge.d.ts +0 -0
- /package/types/{components → src/components}/Banner/Action.d.ts +0 -0
- /package/types/{components → src/components}/Banner/styles.d.ts +0 -0
- /package/types/{components → src/components}/Box/Box.d.ts +0 -0
- /package/types/{components → src/components}/Box/index.d.ts +0 -0
- /package/types/{components → src/components}/BoxPopover/BoxPopover.d.ts +0 -0
- /package/types/{components → src/components}/Button/Button.d.ts +0 -0
- /package/types/{components → src/components}/Button/ButtonBase.d.ts +0 -0
- /package/types/{components → src/components}/Button/HighEmphasisButton/HighEmphasisButton.d.ts +0 -0
- /package/types/{components → src/components}/Button/LowEmphasisButton/LowEmphasisButton.d.ts +0 -0
- /package/types/{components → src/components}/Button/MediumEmphasisButton/MediumEmphasisButton.d.ts +0 -0
- /package/types/{components → src/components}/ButtonV2/Icon.d.ts +0 -0
- /package/types/{components → src/components}/ButtonV2/styles.d.ts +0 -0
- /package/types/{components → src/components}/Calendar/Calendar.d.ts +0 -0
- /package/types/{components → src/components}/Calendar/CalendarCell.d.ts +0 -0
- /package/types/{components → src/components}/Calendar/CalendarGrid.d.ts +0 -0
- /package/types/{components → src/components}/Calendar/CalendarHeader.d.ts +0 -0
- /package/types/{components → src/components}/Calendar/RangeCalendar.d.ts +0 -0
- /package/types/{components → src/components}/Calendar/index.d.ts +0 -0
- /package/types/{components → src/components}/Checkbox/index.d.ts +0 -0
- /package/types/{components → src/components}/ComboBox/ComboBox.d.ts +0 -0
- /package/types/{components → src/components}/ComboBox/index.d.ts +0 -0
- /package/types/{components → src/components}/Connect/Connect.d.ts +0 -0
- /package/types/{components → src/components}/Dialog/Dialog.d.ts +0 -0
- /package/types/{components → src/components}/Divider/Divider.d.ts +0 -0
- /package/types/{components → src/components}/Drawer/Content.d.ts +0 -0
- /package/types/{components → src/components}/Drawer/Drawer.d.ts +0 -0
- /package/types/{components → src/components}/Drawer/Footer.d.ts +0 -0
- /package/types/{components → src/components}/Drawer/Header.d.ts +0 -0
- /package/types/{components → src/components}/Drawer/context.d.ts +0 -0
- /package/types/{components → src/components}/Drawer/index.d.ts +0 -0
- /package/types/{components → src/components}/Drawer/styles.d.ts +0 -0
- /package/types/{components → src/components}/Fieldset/Fieldset.d.ts +0 -0
- /package/types/{components → src/components}/Flex/Flex.d.ts +0 -0
- /package/types/{components → src/components}/Form/Form.d.ts +0 -0
- /package/types/{components → src/components}/FormControl/useFormInput.d.ts +0 -0
- /package/types/{components → src/components}/GoogleInput/index.d.ts +0 -0
- /package/types/{components → src/components}/Grid/Grid.d.ts +0 -0
- /package/types/{components → src/components}/Input/DateInput/DateInput.d.ts +0 -0
- /package/types/{components → src/components}/Input/InlineEdit/InlineEdit.d.ts +0 -0
- /package/types/{components → src/components}/Input/InputBase.d.ts +0 -0
- /package/types/{components → src/components}/Input/NumberInput/NumberInput.d.ts +0 -0
- /package/types/{components → src/components}/Input/TextArea/TextArea.d.ts +0 -0
- /package/types/{components → src/components}/Input/TextInput/TextInput.d.ts +0 -0
- /package/types/{components → src/components}/Input/TimeInput/TimeInput.d.ts +0 -0
- /package/types/{components → src/components}/Label/Label.d.ts +0 -0
- /package/types/{components → src/components}/LabeledText/LabeledText.d.ts +0 -0
- /package/types/{components → src/components}/LabeledText/index.d.ts +0 -0
- /package/types/{components → src/components}/ListBox/ListBox.d.ts +0 -0
- /package/types/{components → src/components}/ListBox/timezones.d.ts +0 -0
- /package/types/{components → src/components}/Modal/Content.d.ts +0 -0
- /package/types/{components → src/components}/Modal/Footer.d.ts +0 -0
- /package/types/{components → src/components}/Modal/Header.d.ts +0 -0
- /package/types/{components → src/components}/Modal/Modal.d.ts +0 -0
- /package/types/{components → src/components}/Modal/context.d.ts +0 -0
- /package/types/{components → src/components}/Modal/index.d.ts +0 -0
- /package/types/{components → src/components}/Modal/styles.d.ts +0 -0
- /package/types/{components → src/components}/MultiSelect/MultiSelect.d.ts +0 -0
- /package/types/{components → src/components}/MultiSelect/MultiSelectListBox.d.ts +0 -0
- /package/types/{components → src/components}/MultiSelect/MultiSelectPopover.d.ts +0 -0
- /package/types/{components → src/components}/MultiSelect/useMultiSelect.d.ts +0 -0
- /package/types/{components → src/components}/MultiSelect/useMultiSelectListState.d.ts +0 -0
- /package/types/{components → src/components}/MultiSelect/useMultiSelectState.d.ts +0 -0
- /package/types/{components → src/components}/NavigationMenu/NavigationMenu.d.ts +0 -0
- /package/types/{components → src/components}/Page/Page.d.ts +0 -0
- /package/types/{components → src/components}/Page/PageHeader.d.ts +0 -0
- /package/types/{components → src/components}/Panel/Panel.d.ts +0 -0
- /package/types/{components → src/components}/Panel/styles.d.ts +0 -0
- /package/types/{components → src/components}/Portal/index.d.ts +0 -0
- /package/types/{components → src/components}/ReactAriaButton/ReactAriaButton.d.ts +0 -0
- /package/types/{components → src/components}/SingleSelect/SingleSelect.d.ts +0 -0
- /package/types/{components → src/components}/Skeleton/Skeleton.d.ts +0 -0
- /package/types/{components → src/components}/Skeleton/index.d.ts +0 -0
- /package/types/{components → src/components}/Stack/Stack.d.ts +0 -0
- /package/types/{components → src/components}/TabList/TabList.d.ts +0 -0
- /package/types/{components → src/components}/Table/Table.d.ts +0 -0
- /package/types/{components → src/components}/Tabs/Tabs.d.ts +0 -0
- /package/types/{components → src/components}/Text/Text.d.ts +0 -0
- /package/types/{components → src/components}/Title/Title.d.ts +0 -0
- /package/types/{components → src/components}/Toast/Toast.d.ts +0 -0
- /package/types/{components → src/components}/Tooltip/IconTooltip.d.ts +0 -0
- /package/types/{components → src/components}/UnstyledLink/UnstyledLink.d.ts +0 -0
- /package/types/{helpers → src/helpers}/css.d.ts +0 -0
- /package/types/{helpers → src/helpers}/index.d.ts +0 -0
- /package/types/{helpers → src/helpers}/interactionStates.d.ts +0 -0
- /package/types/{helpers → src/helpers}/keyEvents.d.ts +0 -0
- /package/types/{helpers → src/helpers}/noop.d.ts +0 -0
- /package/types/{helpers → src/helpers}/props.d.ts +0 -0
- /package/types/{helpers → src/helpers}/string.d.ts +0 -0
- /package/types/{helpers → src/helpers}/tokenUtils.d.ts +0 -0
- /package/types/{helpers → src/helpers}/typeHelpers.d.ts +0 -0
- /package/types/{helpers → src/helpers}/window.d.ts +0 -0
- /package/types/{hooks → src/hooks}/index.d.ts +0 -0
- /package/types/{hooks → src/hooks}/useOnEscapeKey.d.ts +0 -0
- /package/types/{hooks → src/hooks}/usePrevious.d.ts +0 -0
- /package/types/{hooks → src/hooks}/useWindowEvent.d.ts +0 -0
- /package/types/{index.d.ts → src/index.d.ts} +0 -0
- /package/types/{styles → src/styles}/index.d.ts +0 -0
- /package/types/{utils → src/utils}/index.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theroutingcompany/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.139-alpha.1",
|
|
4
4
|
"description": "The Routing Company Components",
|
|
5
5
|
"main": "./dist/trc-components.umd.js",
|
|
6
6
|
"module": "./dist/trc-components.es.js",
|
|
@@ -40,7 +40,10 @@
|
|
|
40
40
|
"start": "vite build --watch",
|
|
41
41
|
"build:types": "tsc --incremental",
|
|
42
42
|
"build:components": "vite build",
|
|
43
|
-
"build": "npm run clean && npm run build:components && npm run build:types"
|
|
43
|
+
"build": "npm run clean && npm run build:components && npm run build:types",
|
|
44
|
+
"test": "vitest",
|
|
45
|
+
"test:ui": "vitest --ui",
|
|
46
|
+
"test:coverage": "vitest --coverage"
|
|
44
47
|
},
|
|
45
48
|
"sideEffects": false,
|
|
46
49
|
"license": "UNLICENSED",
|
|
@@ -132,6 +135,10 @@
|
|
|
132
135
|
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
133
136
|
"@rollup/plugin-typescript": "^11.1.0",
|
|
134
137
|
"@storybook/addon-a11y": "^7.0.3",
|
|
138
|
+
"@testing-library/jest-dom": "^6.1.5",
|
|
139
|
+
"@testing-library/react": "^14.1.2",
|
|
140
|
+
"@testing-library/user-event": "^14.5.1",
|
|
141
|
+
"@types/jest": "^29.5.11",
|
|
135
142
|
"@storybook/addon-actions": "^7.0.3",
|
|
136
143
|
"@storybook/addon-essentials": "^7.0.3",
|
|
137
144
|
"@storybook/addon-interactions": "^7.0.3",
|
|
@@ -171,6 +178,9 @@
|
|
|
171
178
|
"type-fest": "^3.6.1",
|
|
172
179
|
"typescript": "^5.0.4",
|
|
173
180
|
"vite": "^4.2.1",
|
|
174
|
-
"vite-tsconfig-paths": "^4.1.0"
|
|
181
|
+
"vite-tsconfig-paths": "^4.1.0",
|
|
182
|
+
"vitest": "^1.1.0",
|
|
183
|
+
"@vitest/ui": "^1.1.0",
|
|
184
|
+
"jsdom": "^23.0.1"
|
|
175
185
|
}
|
|
176
186
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import * as ToggleGroup from '@radix-ui/react-toggle-group';
|
|
3
2
|
export declare const StyledButtonGroup: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<(ToggleGroup.ToggleGroupSingleProps | ToggleGroup.ToggleGroupMultipleProps) & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
4
3
|
export type ButtonGroupProps = Omit<ToggleGroup.ToggleGroupSingleProps, 'type' | 'style' | 'className'> & {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
3
2
|
export type { DropdownMenuCheckboxItemProps, DropdownMenuContentProps, DropdownMenuItemIndicatorProps, DropdownMenuLabelProps, MenuSubTriggerProps, MenuSubContentProps, MenuSeparatorProps, } from '@radix-ui/react-dropdown-menu';
|
|
4
3
|
export declare const DropdownMenuContent: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -27,9 +27,9 @@ export declare const TextAreaFormControl: import("react").ForwardRefExoticCompon
|
|
|
27
27
|
pattern?: string | undefined;
|
|
28
28
|
id?: string | undefined;
|
|
29
29
|
name?: string | undefined;
|
|
30
|
-
type?: "
|
|
30
|
+
type?: "text" | (string & {}) | "search" | "tel" | "url" | "email" | "password" | undefined;
|
|
31
31
|
'aria-activedescendant'?: string | undefined;
|
|
32
|
-
'aria-autocomplete'?: "
|
|
32
|
+
'aria-autocomplete'?: "none" | "list" | "inline" | "both" | undefined;
|
|
33
33
|
'aria-describedby'?: string | undefined;
|
|
34
34
|
'aria-details'?: string | undefined;
|
|
35
35
|
'aria-errormessage'?: string | undefined;
|
|
@@ -53,7 +53,7 @@ export declare const TextAreaFormControl: import("react").ForwardRefExoticCompon
|
|
|
53
53
|
defaultValue?: string | undefined;
|
|
54
54
|
autoFocus?: boolean | undefined;
|
|
55
55
|
placeholder?: string | undefined;
|
|
56
|
-
inputMode?: "
|
|
56
|
+
inputMode?: "none" | "text" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
57
57
|
disabled?: boolean | undefined;
|
|
58
58
|
value?: string | undefined;
|
|
59
59
|
autoComplete?: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="google.maps" />
|
|
1
|
+
/// <reference types="@types/google.maps" />
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
declare const PlaceResult: import("styled-components").StyledComponent<import("components/Text/Text").PolymorphicText, any, {}, never>;
|
|
4
4
|
export declare const getSelectedName: (selected: google.maps.places.PlaceResult) => string | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
2
|
export type { PopoverCloseProps, PopoverContentProps, } from '@radix-ui/react-popover';
|
|
4
3
|
export declare function PopoverContent({ children, forceMount, ...props }: PopoverPrimitive.PopoverContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
3
2
|
export declare const RadioGroupRadio: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<RadioGroupPrimitive.RadioGroupItemProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
4
3
|
export declare const RadioGroupIndicator: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<RadioGroupPrimitive.RadioGroupIndicatorProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type AriaTextFieldProps } from '@react-types/textfield';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface SearchableSelectProps<T> extends Omit<AriaTextFieldProps, 'onChange' | 'value' | 'onSelect'> {
|
|
4
|
+
label?: string;
|
|
5
|
+
tooltipContent?: React.ReactNode;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
items: T[];
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
onSearch: (query: string) => void;
|
|
10
|
+
onSelect: (item: T | null) => void;
|
|
11
|
+
getItemKey: (item: T) => string | number;
|
|
12
|
+
getItemLabel: (item: T) => string;
|
|
13
|
+
selectedItem?: T | null;
|
|
14
|
+
errorMessage?: string;
|
|
15
|
+
boldLabel?: boolean;
|
|
16
|
+
inputValue?: string;
|
|
17
|
+
onInputChange?: (value: string) => void;
|
|
18
|
+
usePortal?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export default function SearchableSelect<T>(props: SearchableSelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SearchableSelect } from './SearchableSelect';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
3
2
|
export type { SwitchProps } from '@radix-ui/react-switch';
|
|
4
3
|
export declare const Switch: import("react").ForwardRefExoticComponent<SwitchPrimitive.SwitchProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
2
|
export type { TooltipContentProps, TooltipProps, } from '@radix-ui/react-tooltip';
|
|
4
3
|
declare function Content({ children, ...props }: TooltipPrimitive.TooltipContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -40,6 +40,7 @@ export * from './Panel/Panel';
|
|
|
40
40
|
export * from './Popover/Popover';
|
|
41
41
|
export * from './RadioGroup/RadioGroup';
|
|
42
42
|
export * from './Search/Search';
|
|
43
|
+
export * from './SearchableSelect';
|
|
43
44
|
export * from './SingleSelect/SingleSelect';
|
|
44
45
|
export * from './Skeleton';
|
|
45
46
|
export * from './Stack/Stack';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/types/{components → src/components}/Button/HighEmphasisButton/HighEmphasisButton.d.ts
RENAMED
|
File without changes
|
/package/types/{components → src/components}/Button/LowEmphasisButton/LowEmphasisButton.d.ts
RENAMED
|
File without changes
|
/package/types/{components → src/components}/Button/MediumEmphasisButton/MediumEmphasisButton.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|