@oxide/design-system 1.5.2--canary.58364f4.0 → 1.5.2--canary.4d97c22.0
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/components/dist/index.d.ts +99 -0
- package/package.json +1 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as _oxide_react_asciidoc from '@oxide/react-asciidoc';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import { TabsProps, TabsTriggerProps, TabsListProps, TabsContentProps } from '@radix-ui/react-tabs';
|
|
6
|
+
import { SetRequired } from 'type-fest';
|
|
7
|
+
|
|
8
|
+
declare const AsciiDocBlocks: {
|
|
9
|
+
Admonition: ({ node }: {
|
|
10
|
+
node: _oxide_react_asciidoc.AdmonitionBlock;
|
|
11
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
12
|
+
Table: ({ node }: {
|
|
13
|
+
node: _oxide_react_asciidoc.TableBlock;
|
|
14
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
type BadgeColor = 'default' | 'destructive' | 'notice' | 'neutral' | 'purple' | 'blue';
|
|
18
|
+
type BadgeVariant = 'default' | 'solid';
|
|
19
|
+
interface BadgeProps {
|
|
20
|
+
color?: BadgeColor;
|
|
21
|
+
className?: string;
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
variant?: BadgeVariant;
|
|
24
|
+
}
|
|
25
|
+
declare const badgeColors: Record<BadgeVariant, Record<BadgeColor, string>>;
|
|
26
|
+
declare const Badge: ({ className, children, color, variant, }: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
declare const buttonSizes: readonly ["sm", "icon", "base"];
|
|
29
|
+
declare const variants: readonly ["primary", "secondary", "ghost", "danger"];
|
|
30
|
+
type ButtonSize = typeof buttonSizes[number];
|
|
31
|
+
type Variant = typeof variants[number];
|
|
32
|
+
type ButtonStyleProps = {
|
|
33
|
+
size?: ButtonSize;
|
|
34
|
+
variant?: Variant;
|
|
35
|
+
};
|
|
36
|
+
declare const buttonStyle: ({ size, variant, }?: ButtonStyleProps) => string;
|
|
37
|
+
interface ButtonProps extends React.ComponentPropsWithRef<'button'>, ButtonStyleProps {
|
|
38
|
+
innerClassName?: string;
|
|
39
|
+
loading?: boolean;
|
|
40
|
+
}
|
|
41
|
+
declare const Button: react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
42
|
+
|
|
43
|
+
declare const spinnerSizes: readonly ["base", "lg"];
|
|
44
|
+
declare const spinnerVariants: readonly ["primary", "secondary", "ghost", "danger"];
|
|
45
|
+
type SpinnerSize = typeof spinnerSizes[number];
|
|
46
|
+
type SpinnerVariant = typeof spinnerVariants[number];
|
|
47
|
+
interface SpinnerProps {
|
|
48
|
+
className?: string;
|
|
49
|
+
size?: SpinnerSize;
|
|
50
|
+
variant?: SpinnerVariant;
|
|
51
|
+
}
|
|
52
|
+
declare const Spinner: ({ className, size, variant, }: SpinnerProps) => react_jsx_runtime.JSX.Element;
|
|
53
|
+
type Props = {
|
|
54
|
+
isLoading: boolean;
|
|
55
|
+
children?: ReactNode;
|
|
56
|
+
minTime?: number;
|
|
57
|
+
};
|
|
58
|
+
/** Loading spinner that shows for a minimum of `minTime` */
|
|
59
|
+
declare const SpinnerLoader: ({ isLoading, children, minTime }: Props) => react_jsx_runtime.JSX.Element;
|
|
60
|
+
|
|
61
|
+
type TabsRootProps = SetRequired<TabsProps, 'defaultValue'>;
|
|
62
|
+
declare const Tabs: {
|
|
63
|
+
Root: ({ className, ...props }: TabsRootProps) => react_jsx_runtime.JSX.Element;
|
|
64
|
+
Trigger: ({ children, className, ...props }: TabsTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
65
|
+
List: ({ className, ...props }: TabsListProps) => react_jsx_runtime.JSX.Element;
|
|
66
|
+
Content: ({ className, ...props }: TabsContentProps) => react_jsx_runtime.JSX.Element;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
type CheckboxProps = {
|
|
70
|
+
indeterminate?: boolean;
|
|
71
|
+
children?: React.ReactNode;
|
|
72
|
+
className?: string;
|
|
73
|
+
} & Omit<React.ComponentProps<'input'>, 'type'>;
|
|
74
|
+
/** Checkbox component that handles label, styling, and indeterminate state */
|
|
75
|
+
declare const Checkbox: ({ indeterminate, children, className, ...inputProps }: CheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
76
|
+
|
|
77
|
+
type ListboxItem<Value extends string = string> = {
|
|
78
|
+
value: Value;
|
|
79
|
+
} & ({
|
|
80
|
+
label: string;
|
|
81
|
+
labelString?: never;
|
|
82
|
+
} | {
|
|
83
|
+
label: ReactNode;
|
|
84
|
+
labelString: string;
|
|
85
|
+
});
|
|
86
|
+
interface ListboxProps<Value extends string = string> {
|
|
87
|
+
selected: Value | null;
|
|
88
|
+
onChange: (value: Value) => void;
|
|
89
|
+
items: ListboxItem<Value>[];
|
|
90
|
+
placeholder?: string;
|
|
91
|
+
className?: string;
|
|
92
|
+
disabled?: boolean;
|
|
93
|
+
hasError?: boolean;
|
|
94
|
+
name?: string;
|
|
95
|
+
isLoading?: boolean;
|
|
96
|
+
}
|
|
97
|
+
declare const Listbox: <Value extends string = string>({ name, selected, items, placeholder, className, onChange, hasError, disabled, isLoading, ...props }: ListboxProps<Value>) => react_jsx_runtime.JSX.Element;
|
|
98
|
+
|
|
99
|
+
export { AsciiDocBlocks, Badge, BadgeColor, BadgeProps, BadgeVariant, Button, ButtonProps, ButtonSize, Checkbox, CheckboxProps, Listbox, ListboxItem, ListboxProps, Spinner, SpinnerLoader, SpinnerSize, SpinnerVariant, Tabs, TabsRootProps, Variant, badgeColors, buttonSizes, buttonStyle, spinnerSizes, spinnerVariants, variants };
|
package/package.json
CHANGED