@ryanodd/design-system 0.0.0-dev3 → 0.0.0-dev5

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.
@@ -1,2 +1,189 @@
1
- export * from '../index'
2
- export {}
1
+ import { ButtonHTMLAttributes } from 'react';
2
+ import { ComponentPropsWithoutRef } from 'react';
3
+ import { ComponentType } from 'react';
4
+ import { DetailedHTMLProps } from 'react';
5
+ import { ForwardRefExoticComponent } from 'react';
6
+ import { HTMLAttributes } from 'react';
7
+ import { JSX } from 'react/jsx-runtime';
8
+ import * as RadixDialog from '@radix-ui/react-dialog';
9
+ import * as RadixMenuButton from '@radix-ui/react-dropdown-menu';
10
+ import * as RadixToast from '@radix-ui/react-toast';
11
+ import * as RadixTooltip from '@radix-ui/react-tooltip';
12
+ import { ReactNode } from 'react';
13
+ import { RefAttributes } from 'react';
14
+ import { SVGProps } from 'react';
15
+
16
+ export declare const ArrowLeft: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
17
+ size?: (typeof iconSizes)[number];
18
+ } & RefAttributes<SVGSVGElement>>;
19
+
20
+ export declare const ArrowRight: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
21
+ size?: (typeof iconSizes)[number];
22
+ } & RefAttributes<SVGSVGElement>>;
23
+
24
+ export declare const Button: ForwardRefExoticComponent<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & Props & RefAttributes<HTMLButtonElement>>;
25
+
26
+ export declare type ButtonProps = ComponentPropsWithoutRef<"button"> & Props;
27
+
28
+ export declare const Check: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
29
+ size?: (typeof iconSizes)[number];
30
+ } & RefAttributes<SVGSVGElement>>;
31
+
32
+ export declare const Checkbox: ({ id, labelContent, checked, onClick }: CheckboxProps) => JSX.Element;
33
+
34
+ export declare type CheckboxProps = {
35
+ id: string;
36
+ labelContent: ReactNode;
37
+ checked: boolean;
38
+ onClick: (checked: boolean) => void;
39
+ };
40
+
41
+ export declare const Circle: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
42
+ size?: (typeof iconSizes)[number];
43
+ } & RefAttributes<SVGSVGElement>>;
44
+
45
+ export declare const Close: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
46
+ size?: (typeof iconSizes)[number];
47
+ } & RefAttributes<SVGSVGElement>>;
48
+
49
+ export declare const createIcon: (SVG: ComponentType<HTMLAttributes<SVGSVGElement>>, label: string) => ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
50
+ size?: (typeof iconSizes)[number];
51
+ } & RefAttributes<SVGSVGElement>>;
52
+
53
+ export declare const Dialog: ({ trigger, content, title, ...props }: DialogProps) => JSX.Element;
54
+
55
+ export declare type DialogProps = RadixDialog.DialogProps & {
56
+ title: ReactNode;
57
+ trigger: ReactNode;
58
+ content: ReactNode;
59
+ };
60
+
61
+ export declare const ExternalLink: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
62
+ size?: (typeof iconSizes)[number];
63
+ } & RefAttributes<SVGSVGElement>>;
64
+
65
+ export declare const Gear: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
66
+ size?: (typeof iconSizes)[number];
67
+ } & RefAttributes<SVGSVGElement>>;
68
+
69
+ export declare const Hammer: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
70
+ size?: (typeof iconSizes)[number];
71
+ } & RefAttributes<SVGSVGElement>>;
72
+
73
+ export declare const Heart: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
74
+ size?: (typeof iconSizes)[number];
75
+ } & RefAttributes<SVGSVGElement>>;
76
+
77
+ export declare const IconMap: Record<string, ComponentType<IconProps> | null>;
78
+
79
+ export declare type IconProps = ComponentPropsWithoutRef<"svg"> & {
80
+ size?: typeof iconSizes[number];
81
+ };
82
+
83
+ export declare const iconSizes: readonly ["xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl"];
84
+
85
+ export declare const Kebab: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
86
+ size?: (typeof iconSizes)[number];
87
+ } & RefAttributes<SVGSVGElement>>;
88
+
89
+ export declare const Lightning: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
90
+ size?: (typeof iconSizes)[number];
91
+ } & RefAttributes<SVGSVGElement>>;
92
+
93
+ export declare const Mail: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
94
+ size?: (typeof iconSizes)[number];
95
+ } & RefAttributes<SVGSVGElement>>;
96
+
97
+ export declare const Menu: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
98
+ size?: (typeof iconSizes)[number];
99
+ } & RefAttributes<SVGSVGElement>>;
100
+
101
+ export declare const MenuButton: ({ children, ...props }: MenuButtonProps) => JSX.Element;
102
+
103
+ export declare const MenuButtonItem: ({ children, ...props }: MenuButtonItemProps) => JSX.Element;
104
+
105
+ export declare type MenuButtonItemProps = React.ComponentPropsWithoutRef<typeof RadixMenuButton.Item> & {
106
+ children: ReactNode;
107
+ };
108
+
109
+ export declare type MenuButtonProps = React.ComponentPropsWithoutRef<typeof RadixMenuButton.Root> & {
110
+ children: ReactNode;
111
+ };
112
+
113
+ export declare const NoMobile: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
114
+ size?: (typeof iconSizes)[number];
115
+ } & RefAttributes<SVGSVGElement>>;
116
+
117
+ export declare const Pencil: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & {
118
+ size?: (typeof iconSizes)[number];
119
+ } & RefAttributes<SVGSVGElement>>;
120
+
121
+ declare type Props = {
122
+ children?: ReactNode;
123
+ size?: "small" | "medium" | "large";
124
+ variant?: "primary" | "secondary" | "destructive" | "tertiary";
125
+ loading?: boolean;
126
+ iconOnly?: boolean;
127
+ notificationDotText?: string;
128
+ /**
129
+ * Optionally indicates which icon to use as a leading icon before the button text,
130
+ * or the icon for an icon-only button.
131
+ */
132
+ icon?: keyof typeof IconMap;
133
+ /**
134
+ * Optionally indicates which icon to use as a trailing icon after the button text.
135
+ */
136
+ trailingIcon?: keyof typeof IconMap;
137
+ };
138
+
139
+ export declare const Spinner: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
140
+ /**
141
+ * Indicates the diameter (height/width) of the `Spinner`'s container
142
+ */
143
+ size?: SpinnerSize;
144
+ } & RefAttributes<HTMLDivElement>>;
145
+
146
+ export declare type SpinnerProps = ComponentPropsWithoutRef<"div"> & {
147
+ /**
148
+ * Indicates the diameter (height/width) of the `Spinner`'s container
149
+ */
150
+ size?: SpinnerSize;
151
+ };
152
+
153
+ export declare type SpinnerSize = typeof iconSizes[number];
154
+
155
+ export declare const Toast: ForwardRefExoticComponent<RadixToast.ToastProps & {
156
+ toastTitle: ReactNode;
157
+ toastDescription?: ReactNode;
158
+ toastAction?: ReactNode;
159
+ } & RefAttributes<HTMLLIElement>>;
160
+
161
+ export declare type ToastProps = RadixToast.ToastProps & {
162
+ toastTitle: ReactNode;
163
+ toastDescription?: ReactNode;
164
+ toastAction?: ReactNode;
165
+ };
166
+
167
+ export declare const ToastProvider: ({ ...props }: ToastProviderProps) => JSX.Element;
168
+
169
+ export declare type ToastProviderProps = RadixToast.ToastProviderProps;
170
+
171
+ export declare const ToastViewport: ForwardRefExoticComponent<RadixToast.ToastViewportProps & RefAttributes<HTMLOListElement>>;
172
+
173
+ export declare type ToastViewportProps = RadixToast.ToastViewportProps;
174
+
175
+ export declare function Tooltip({ children, content, open, defaultOpen, onOpenChange, ...props }: TooltipProps): JSX.Element;
176
+
177
+ export declare type TooltipProps = Omit<RadixTooltip.TooltipContentProps, "content"> & {
178
+ children: ReactNode;
179
+ content: ReactNode;
180
+ open?: boolean;
181
+ defaultOpen?: boolean;
182
+ onOpenChange?: (open: boolean) => void;
183
+ };
184
+
185
+ export declare const TooltipProvider: ({ ...props }: TooltipProviderProps) => JSX.Element;
186
+
187
+ export declare type TooltipProviderProps = RadixTooltip.TooltipProviderProps;
188
+
189
+ export { }
package/package.json CHANGED
@@ -1,16 +1,24 @@
1
1
  {
2
2
  "name": "@ryanodd/design-system",
3
- "version": "0.0.0-dev3",
3
+ "version": "0.0.0-dev5",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/esm/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/esm/index.d.ts",
11
+ "import": "./dist/esm/index.js",
12
+ "require": "./dist/cjs/index.js"
13
+ },
14
+ "./dist/index.css": "./dist/index.css"
15
+ },
8
16
  "files": [
9
17
  "dist"
10
18
  ],
11
19
  "scripts": {
12
20
  "test": "echo \"Error: no test specified\" && exit 1",
13
- "build": "vite build",
21
+ "build": "vite build && mv dist/design-system.css dist/index.css 2>/dev/null || true",
14
22
  "storybook": "storybook dev -p 6006",
15
23
  "build-storybook": "storybook build"
16
24
  },
File without changes
File without changes