@betterinternship/components 1.0.1 → 1.3.2
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/components/Button.d.ts +12 -0
- package/dist/config.d.ts +6 -0
- package/dist/hooks/ClientProcess.d.ts +21 -0
- package/dist/index.d.ts +4 -34
- package/dist/index.esm.js +4249 -1310
- package/dist/index.esm.js.map +1 -1
- package/dist/utils.d.ts +2 -0
- package/package.json +121 -82
- package/dist/index.js +0 -1580
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "outline" | "ghost" | "link" | null | undefined;
|
|
5
|
+
scheme?: "default" | "primary" | "supportive" | "destructive" | "secondary" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "lg" | "md" | "icon" | "xs" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
export { Button, buttonVariants };
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type ProcessStatus = "pending" | "handled" | "failed";
|
|
2
|
+
interface UseAsyncProcessOptions {
|
|
3
|
+
processId: string;
|
|
4
|
+
baseInterval?: number;
|
|
5
|
+
maxInterval?: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Hook for handling async processes on client.
|
|
9
|
+
*
|
|
10
|
+
* @hook
|
|
11
|
+
* @param UseAsyncProcessOptions
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export declare function useAsyncProcess<T>({ processId, baseInterval, maxInterval, }: UseAsyncProcessOptions): {
|
|
15
|
+
status: ProcessStatus;
|
|
16
|
+
attempts: number;
|
|
17
|
+
result: unknown;
|
|
18
|
+
error: string | undefined;
|
|
19
|
+
isFetching: boolean;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,34 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export *
|
|
3
|
-
export *
|
|
4
|
-
export *
|
|
5
|
-
export * as Checkbox from '@radix-ui/react-checkbox';
|
|
6
|
-
export * as Collapsible from '@radix-ui/react-collapsible';
|
|
7
|
-
export * as ContextMenu from '@radix-ui/react-context-menu';
|
|
8
|
-
export * as Dialog from '@radix-ui/react-dialog';
|
|
9
|
-
export * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
10
|
-
export * as Form from '@radix-ui/react-form';
|
|
11
|
-
export * as HoverCard from '@radix-ui/react-hover-card';
|
|
12
|
-
export * as Label from '@radix-ui/react-label';
|
|
13
|
-
export * as Menubar from '@radix-ui/react-menubar';
|
|
14
|
-
export * as NavigationMenu from '@radix-ui/react-navigation-menu';
|
|
15
|
-
export * as Popover from '@radix-ui/react-popover';
|
|
16
|
-
export * as Progress from '@radix-ui/react-progress';
|
|
17
|
-
export * as RadioGroup from '@radix-ui/react-radio-group';
|
|
18
|
-
export * as ScrollArea from '@radix-ui/react-scroll-area';
|
|
19
|
-
export * as Select from '@radix-ui/react-select';
|
|
20
|
-
export * as Separator from '@radix-ui/react-separator';
|
|
21
|
-
export * as Slider from '@radix-ui/react-slider';
|
|
22
|
-
export * as Switch from '@radix-ui/react-switch';
|
|
23
|
-
export * as Tabs from '@radix-ui/react-tabs';
|
|
24
|
-
export * as Toast from '@radix-ui/react-toast';
|
|
25
|
-
export * as Toggle from '@radix-ui/react-toggle';
|
|
26
|
-
export * as ToggleGroup from '@radix-ui/react-toggle-group';
|
|
27
|
-
export * as Toolbar from '@radix-ui/react-toolbar';
|
|
28
|
-
export * as Tooltip from '@radix-ui/react-tooltip';
|
|
29
|
-
export * as Slot from '@radix-ui/react-slot';
|
|
30
|
-
export * as Portal from '@radix-ui/react-portal';
|
|
31
|
-
export * as VisuallyHidden from '@radix-ui/react-visually-hidden';
|
|
32
|
-
export * as Direction from '@radix-ui/react-direction';
|
|
33
|
-
export * as AccessibleIcon from '@radix-ui/react-accessible-icon';
|
|
34
|
-
export { Theme, ThemePanel, Box, Flex, Grid, Container, Section, Text, Heading, Code, Em, Strong, Link, Blockquote, Kbd, Quote, Card, Button, IconButton, TextField, TextArea, Table, Callout, Inset, } from '@radix-ui/themes';
|
|
1
|
+
import "./index.css";
|
|
2
|
+
export * from '@/config';
|
|
3
|
+
export * from "@/components/Button";
|
|
4
|
+
export * from "@/hooks/ClientProcess";
|