@oxide/design-system 1.2.13--canary.68.68a5167.0 → 1.3.0--canary.69.dd49cc3.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.mts +120 -0
- package/components/dist/index.d.ts +94 -177
- package/components/dist/index.js +43374 -44621
- package/components/dist/index.js.map +1 -1
- package/components/dist/index.mjs +57595 -0
- package/components/dist/index.mjs.map +1 -0
- package/package.json +15 -3
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as _asciidoctor_core_types from '@asciidoctor/core/types';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { ReactNode, ReactElement } 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: _asciidoctor_core_types.Block;
|
|
11
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
12
|
+
Listing: ({ node }: {
|
|
13
|
+
node: _asciidoctor_core_types.Block;
|
|
14
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
15
|
+
Table: ({ node }: {
|
|
16
|
+
node: _asciidoctor_core_types.Table;
|
|
17
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
18
|
+
Section: ({ node }: {
|
|
19
|
+
node: _asciidoctor_core_types.Section;
|
|
20
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type BadgeColor = 'default' | 'destructive' | 'notice' | 'neutral' | 'purple' | 'blue';
|
|
24
|
+
type BadgeVariant = 'default' | 'solid';
|
|
25
|
+
interface BadgeProps {
|
|
26
|
+
color?: BadgeColor;
|
|
27
|
+
className?: string;
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
variant?: BadgeVariant;
|
|
30
|
+
}
|
|
31
|
+
declare const badgeColors: Record<BadgeVariant, Record<BadgeColor, string>>;
|
|
32
|
+
declare const Badge: ({ className, children, color, variant, }: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
declare const buttonSizes: readonly ["sm", "icon", "base"];
|
|
35
|
+
declare const variants: readonly ["primary", "secondary", "ghost", "danger"];
|
|
36
|
+
type ButtonSize = typeof buttonSizes[number];
|
|
37
|
+
type Variant = typeof variants[number];
|
|
38
|
+
type ButtonStyleProps = {
|
|
39
|
+
size?: ButtonSize;
|
|
40
|
+
variant?: Variant;
|
|
41
|
+
};
|
|
42
|
+
declare const buttonStyle: ({ size, variant, }?: ButtonStyleProps) => string;
|
|
43
|
+
interface ButtonProps extends React.ComponentPropsWithRef<'button'>, ButtonStyleProps {
|
|
44
|
+
innerClassName?: string;
|
|
45
|
+
loading?: boolean;
|
|
46
|
+
}
|
|
47
|
+
declare const Button: react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
48
|
+
|
|
49
|
+
declare const spinnerSizes: readonly ["base", "lg"];
|
|
50
|
+
declare const spinnerVariants: readonly ["primary", "secondary", "ghost", "danger"];
|
|
51
|
+
type SpinnerSize = typeof spinnerSizes[number];
|
|
52
|
+
type SpinnerVariant = typeof spinnerVariants[number];
|
|
53
|
+
interface SpinnerProps {
|
|
54
|
+
className?: string;
|
|
55
|
+
size?: SpinnerSize;
|
|
56
|
+
variant?: SpinnerVariant;
|
|
57
|
+
}
|
|
58
|
+
declare const Spinner: ({ className, size, variant, }: SpinnerProps) => react_jsx_runtime.JSX.Element;
|
|
59
|
+
type Props$1 = {
|
|
60
|
+
isLoading: boolean;
|
|
61
|
+
children?: ReactNode;
|
|
62
|
+
minTime?: number;
|
|
63
|
+
};
|
|
64
|
+
/** Loading spinner that shows for a minimum of `minTime` */
|
|
65
|
+
declare const SpinnerLoader: ({ isLoading, children, minTime }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
66
|
+
|
|
67
|
+
type TabsRootProps = SetRequired<TabsProps, 'defaultValue'>;
|
|
68
|
+
declare const Tabs: {
|
|
69
|
+
Root: ({ className, ...props }: TabsRootProps) => react_jsx_runtime.JSX.Element;
|
|
70
|
+
Trigger: ({ children, className, ...props }: TabsTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
71
|
+
List: ({ className, ...props }: TabsListProps) => react_jsx_runtime.JSX.Element;
|
|
72
|
+
Content: ({ className, ...props }: TabsContentProps) => react_jsx_runtime.JSX.Element;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
type CheckboxProps = {
|
|
76
|
+
indeterminate?: boolean;
|
|
77
|
+
children?: React.ReactNode;
|
|
78
|
+
className?: string;
|
|
79
|
+
} & Omit<React.ComponentProps<'input'>, 'type'>;
|
|
80
|
+
/** Checkbox component that handles label, styling, and indeterminate state */
|
|
81
|
+
declare const Checkbox: ({ indeterminate, children, className, ...inputProps }: CheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
82
|
+
|
|
83
|
+
type Props = {
|
|
84
|
+
icon?: ReactElement;
|
|
85
|
+
title: string;
|
|
86
|
+
body?: string;
|
|
87
|
+
} & ({
|
|
88
|
+
buttonText: string;
|
|
89
|
+
buttonTo: string;
|
|
90
|
+
} | {
|
|
91
|
+
buttonText: string;
|
|
92
|
+
onClick: () => void;
|
|
93
|
+
} | {
|
|
94
|
+
buttonText?: never;
|
|
95
|
+
});
|
|
96
|
+
declare function EmptyMessage(props: Props): react_jsx_runtime.JSX.Element;
|
|
97
|
+
|
|
98
|
+
type ListboxItem<Value extends string = string> = {
|
|
99
|
+
value: Value;
|
|
100
|
+
} & ({
|
|
101
|
+
label: string;
|
|
102
|
+
labelString?: never;
|
|
103
|
+
} | {
|
|
104
|
+
label: ReactNode;
|
|
105
|
+
labelString: string;
|
|
106
|
+
});
|
|
107
|
+
interface ListboxProps<Value extends string = string> {
|
|
108
|
+
selected: Value | null;
|
|
109
|
+
onChange: (value: Value) => void;
|
|
110
|
+
items: ListboxItem<Value>[];
|
|
111
|
+
placeholder?: string;
|
|
112
|
+
className?: string;
|
|
113
|
+
disabled?: boolean;
|
|
114
|
+
hasError?: boolean;
|
|
115
|
+
name?: string;
|
|
116
|
+
isLoading?: boolean;
|
|
117
|
+
}
|
|
118
|
+
declare const Listbox: <Value extends string = string>({ name, selected, items, placeholder, className, onChange, hasError, disabled, isLoading, ...props }: ListboxProps<Value>) => react_jsx_runtime.JSX.Element;
|
|
119
|
+
|
|
120
|
+
export { AsciiDocBlocks, Badge, BadgeColor, BadgeProps, BadgeVariant, Button, ButtonProps, ButtonSize, Checkbox, CheckboxProps, EmptyMessage, Listbox, ListboxItem, ListboxProps, Spinner, SpinnerLoader, SpinnerSize, SpinnerVariant, Tabs, TabsRootProps, Variant, badgeColors, buttonSizes, buttonStyle, spinnerSizes, spinnerVariants, variants };
|
|
@@ -1,203 +1,120 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from '@radix-ui/react-tabs'
|
|
8
|
-
import * as react from 'react'
|
|
9
|
-
import { ReactElement, ReactNode } from 'react'
|
|
10
|
-
import * as react_jsx_runtime from 'react/jsx-runtime'
|
|
11
|
-
import { SetRequired } from 'type-fest'
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as _asciidoctor_core_types from '@asciidoctor/core/types';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { ReactNode, ReactElement } from 'react';
|
|
5
|
+
import { TabsProps, TabsTriggerProps, TabsListProps, TabsContentProps } from '@radix-ui/react-tabs';
|
|
6
|
+
import { SetRequired } from 'type-fest';
|
|
12
7
|
|
|
13
8
|
declare const AsciiDocBlocks: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
node:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
node
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
node: _asciidoctor_core_types.Table
|
|
28
|
-
}) => react_jsx_runtime.JSX.Element
|
|
29
|
-
Section: ({
|
|
30
|
-
node,
|
|
31
|
-
}: {
|
|
32
|
-
node: _asciidoctor_core_types.Section
|
|
33
|
-
}) => react_jsx_runtime.JSX.Element
|
|
34
|
-
}
|
|
9
|
+
Admonition: ({ node }: {
|
|
10
|
+
node: _asciidoctor_core_types.Block;
|
|
11
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
12
|
+
Listing: ({ node }: {
|
|
13
|
+
node: _asciidoctor_core_types.Block;
|
|
14
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
15
|
+
Table: ({ node }: {
|
|
16
|
+
node: _asciidoctor_core_types.Table;
|
|
17
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
18
|
+
Section: ({ node }: {
|
|
19
|
+
node: _asciidoctor_core_types.Section;
|
|
20
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
21
|
+
};
|
|
35
22
|
|
|
36
|
-
type BadgeColor = 'default' | 'destructive' | 'notice' | 'neutral' | 'purple' | 'blue'
|
|
37
|
-
type BadgeVariant = 'default' | 'solid'
|
|
23
|
+
type BadgeColor = 'default' | 'destructive' | 'notice' | 'neutral' | 'purple' | 'blue';
|
|
24
|
+
type BadgeVariant = 'default' | 'solid';
|
|
38
25
|
interface BadgeProps {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
26
|
+
color?: BadgeColor;
|
|
27
|
+
className?: string;
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
variant?: BadgeVariant;
|
|
43
30
|
}
|
|
44
|
-
declare const badgeColors: Record<BadgeVariant, Record<BadgeColor, string
|
|
45
|
-
declare const Badge: ({
|
|
46
|
-
className,
|
|
47
|
-
children,
|
|
48
|
-
color,
|
|
49
|
-
variant,
|
|
50
|
-
}: BadgeProps) => react_jsx_runtime.JSX.Element
|
|
31
|
+
declare const badgeColors: Record<BadgeVariant, Record<BadgeColor, string>>;
|
|
32
|
+
declare const Badge: ({ className, children, color, variant, }: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
51
33
|
|
|
52
|
-
declare const buttonSizes: readonly [
|
|
53
|
-
declare const variants: readonly [
|
|
54
|
-
type ButtonSize = typeof buttonSizes[number]
|
|
55
|
-
type Variant = typeof variants[number]
|
|
34
|
+
declare const buttonSizes: readonly ["sm", "icon", "base"];
|
|
35
|
+
declare const variants: readonly ["primary", "secondary", "ghost", "danger"];
|
|
36
|
+
type ButtonSize = typeof buttonSizes[number];
|
|
37
|
+
type Variant = typeof variants[number];
|
|
56
38
|
type ButtonStyleProps = {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
declare const buttonStyle: ({ size, variant }?: ButtonStyleProps) => string
|
|
39
|
+
size?: ButtonSize;
|
|
40
|
+
variant?: Variant;
|
|
41
|
+
};
|
|
42
|
+
declare const buttonStyle: ({ size, variant, }?: ButtonStyleProps) => string;
|
|
61
43
|
interface ButtonProps extends React.ComponentPropsWithRef<'button'>, ButtonStyleProps {
|
|
62
|
-
|
|
63
|
-
|
|
44
|
+
innerClassName?: string;
|
|
45
|
+
loading?: boolean;
|
|
64
46
|
}
|
|
65
|
-
declare const Button: react.ForwardRefExoticComponent<
|
|
66
|
-
Omit<ButtonProps, 'ref'> & react.RefAttributes<HTMLButtonElement>
|
|
67
|
-
>
|
|
47
|
+
declare const Button: react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
68
48
|
|
|
69
|
-
declare const spinnerSizes: readonly [
|
|
70
|
-
declare const spinnerVariants: readonly [
|
|
71
|
-
type SpinnerSize = typeof spinnerSizes[number]
|
|
72
|
-
type SpinnerVariant = typeof spinnerVariants[number]
|
|
49
|
+
declare const spinnerSizes: readonly ["base", "lg"];
|
|
50
|
+
declare const spinnerVariants: readonly ["primary", "secondary", "ghost", "danger"];
|
|
51
|
+
type SpinnerSize = typeof spinnerSizes[number];
|
|
52
|
+
type SpinnerVariant = typeof spinnerVariants[number];
|
|
73
53
|
interface SpinnerProps {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
54
|
+
className?: string;
|
|
55
|
+
size?: SpinnerSize;
|
|
56
|
+
variant?: SpinnerVariant;
|
|
77
57
|
}
|
|
78
|
-
declare const Spinner: ({
|
|
79
|
-
className,
|
|
80
|
-
size,
|
|
81
|
-
variant,
|
|
82
|
-
}: SpinnerProps) => react_jsx_runtime.JSX.Element
|
|
58
|
+
declare const Spinner: ({ className, size, variant, }: SpinnerProps) => react_jsx_runtime.JSX.Element;
|
|
83
59
|
type Props$1 = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
60
|
+
isLoading: boolean;
|
|
61
|
+
children?: ReactNode;
|
|
62
|
+
minTime?: number;
|
|
63
|
+
};
|
|
88
64
|
/** Loading spinner that shows for a minimum of `minTime` */
|
|
89
|
-
declare const SpinnerLoader: ({
|
|
90
|
-
isLoading,
|
|
91
|
-
children,
|
|
92
|
-
minTime,
|
|
93
|
-
}: Props$1) => react_jsx_runtime.JSX.Element
|
|
65
|
+
declare const SpinnerLoader: ({ isLoading, children, minTime }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
94
66
|
|
|
95
|
-
type TabsRootProps = SetRequired<TabsProps, 'defaultValue'
|
|
67
|
+
type TabsRootProps = SetRequired<TabsProps, 'defaultValue'>;
|
|
96
68
|
declare const Tabs: {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
className,
|
|
101
|
-
|
|
102
|
-
}: TabsTriggerProps) => react_jsx_runtime.JSX.Element
|
|
103
|
-
List: ({ className, ...props }: TabsListProps) => react_jsx_runtime.JSX.Element
|
|
104
|
-
Content: ({ className, ...props }: TabsContentProps) => react_jsx_runtime.JSX.Element
|
|
105
|
-
}
|
|
69
|
+
Root: ({ className, ...props }: TabsRootProps) => react_jsx_runtime.JSX.Element;
|
|
70
|
+
Trigger: ({ children, className, ...props }: TabsTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
71
|
+
List: ({ className, ...props }: TabsListProps) => react_jsx_runtime.JSX.Element;
|
|
72
|
+
Content: ({ className, ...props }: TabsContentProps) => react_jsx_runtime.JSX.Element;
|
|
73
|
+
};
|
|
106
74
|
|
|
107
75
|
type CheckboxProps = {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
} & Omit<React.ComponentProps<'input'>, 'type'
|
|
76
|
+
indeterminate?: boolean;
|
|
77
|
+
children?: React.ReactNode;
|
|
78
|
+
className?: string;
|
|
79
|
+
} & Omit<React.ComponentProps<'input'>, 'type'>;
|
|
112
80
|
/** Checkbox component that handles label, styling, and indeterminate state */
|
|
113
|
-
declare const Checkbox: ({
|
|
114
|
-
indeterminate,
|
|
115
|
-
children,
|
|
116
|
-
className,
|
|
117
|
-
...inputProps
|
|
118
|
-
}: CheckboxProps) => react_jsx_runtime.JSX.Element
|
|
81
|
+
declare const Checkbox: ({ indeterminate, children, className, ...inputProps }: CheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
119
82
|
|
|
120
83
|
type Props = {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
} & (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
buttonText?: never
|
|
135
|
-
}
|
|
136
|
-
)
|
|
137
|
-
declare function EmptyMessage(props: Props): react_jsx_runtime.JSX.Element
|
|
84
|
+
icon?: ReactElement;
|
|
85
|
+
title: string;
|
|
86
|
+
body?: string;
|
|
87
|
+
} & ({
|
|
88
|
+
buttonText: string;
|
|
89
|
+
buttonTo: string;
|
|
90
|
+
} | {
|
|
91
|
+
buttonText: string;
|
|
92
|
+
onClick: () => void;
|
|
93
|
+
} | {
|
|
94
|
+
buttonText?: never;
|
|
95
|
+
});
|
|
96
|
+
declare function EmptyMessage(props: Props): react_jsx_runtime.JSX.Element;
|
|
138
97
|
|
|
139
98
|
type ListboxItem<Value extends string = string> = {
|
|
140
|
-
|
|
141
|
-
} & (
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
labelString: string
|
|
149
|
-
}
|
|
150
|
-
)
|
|
99
|
+
value: Value;
|
|
100
|
+
} & ({
|
|
101
|
+
label: string;
|
|
102
|
+
labelString?: never;
|
|
103
|
+
} | {
|
|
104
|
+
label: ReactNode;
|
|
105
|
+
labelString: string;
|
|
106
|
+
});
|
|
151
107
|
interface ListboxProps<Value extends string = string> {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
108
|
+
selected: Value | null;
|
|
109
|
+
onChange: (value: Value) => void;
|
|
110
|
+
items: ListboxItem<Value>[];
|
|
111
|
+
placeholder?: string;
|
|
112
|
+
className?: string;
|
|
113
|
+
disabled?: boolean;
|
|
114
|
+
hasError?: boolean;
|
|
115
|
+
name?: string;
|
|
116
|
+
isLoading?: boolean;
|
|
161
117
|
}
|
|
162
|
-
declare const Listbox: <Value extends string = string>({
|
|
163
|
-
name,
|
|
164
|
-
selected,
|
|
165
|
-
items,
|
|
166
|
-
placeholder,
|
|
167
|
-
className,
|
|
168
|
-
onChange,
|
|
169
|
-
hasError,
|
|
170
|
-
disabled,
|
|
171
|
-
isLoading,
|
|
172
|
-
...props
|
|
173
|
-
}: ListboxProps<Value>) => react_jsx_runtime.JSX.Element
|
|
118
|
+
declare const Listbox: <Value extends string = string>({ name, selected, items, placeholder, className, onChange, hasError, disabled, isLoading, ...props }: ListboxProps<Value>) => react_jsx_runtime.JSX.Element;
|
|
174
119
|
|
|
175
|
-
export {
|
|
176
|
-
AsciiDocBlocks,
|
|
177
|
-
Badge,
|
|
178
|
-
BadgeColor,
|
|
179
|
-
BadgeProps,
|
|
180
|
-
BadgeVariant,
|
|
181
|
-
Button,
|
|
182
|
-
ButtonProps,
|
|
183
|
-
ButtonSize,
|
|
184
|
-
Checkbox,
|
|
185
|
-
CheckboxProps,
|
|
186
|
-
EmptyMessage,
|
|
187
|
-
Listbox,
|
|
188
|
-
ListboxItem,
|
|
189
|
-
ListboxProps,
|
|
190
|
-
Spinner,
|
|
191
|
-
SpinnerLoader,
|
|
192
|
-
SpinnerSize,
|
|
193
|
-
SpinnerVariant,
|
|
194
|
-
Tabs,
|
|
195
|
-
TabsRootProps,
|
|
196
|
-
Variant,
|
|
197
|
-
badgeColors,
|
|
198
|
-
buttonSizes,
|
|
199
|
-
buttonStyle,
|
|
200
|
-
spinnerSizes,
|
|
201
|
-
spinnerVariants,
|
|
202
|
-
variants,
|
|
203
|
-
}
|
|
120
|
+
export { AsciiDocBlocks, Badge, BadgeColor, BadgeProps, BadgeVariant, Button, ButtonProps, ButtonSize, Checkbox, CheckboxProps, EmptyMessage, Listbox, ListboxItem, ListboxProps, Spinner, SpinnerLoader, SpinnerSize, SpinnerVariant, Tabs, TabsRootProps, Variant, badgeColors, buttonSizes, buttonStyle, spinnerSizes, spinnerVariants, variants };
|