@oxide/design-system 1.2.13 → 1.3.0--canary.69.ca2c871.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.
@@ -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 _asciidoctor_core_types from '@asciidoctor/core/types'
2
- import {
3
- TabsContentProps,
4
- TabsListProps,
5
- TabsProps,
6
- TabsTriggerProps,
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
- Admonition: ({
15
- node,
16
- }: {
17
- node: _asciidoctor_core_types.Block
18
- }) => react_jsx_runtime.JSX.Element
19
- Listing: ({
20
- node,
21
- }: {
22
- node: _asciidoctor_core_types.Block
23
- }) => react_jsx_runtime.JSX.Element
24
- Table: ({
25
- node,
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
- color?: BadgeColor
40
- className?: string
41
- children: React.ReactNode
42
- variant?: BadgeVariant
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 ['sm', 'icon', 'base']
53
- declare const variants: readonly ['primary', 'secondary', 'ghost', 'danger']
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
- size?: ButtonSize
58
- variant?: Variant
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
- innerClassName?: string
63
- loading?: boolean
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 ['base', 'lg']
70
- declare const spinnerVariants: readonly ['primary', 'secondary', 'ghost', 'danger']
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
- className?: string
75
- size?: SpinnerSize
76
- variant?: SpinnerVariant
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
- isLoading: boolean
85
- children?: ReactNode
86
- minTime?: number
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
- Root: ({ className, ...props }: TabsRootProps) => react_jsx_runtime.JSX.Element
98
- Trigger: ({
99
- children,
100
- className,
101
- ...props
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
- indeterminate?: boolean
109
- children?: React.ReactNode
110
- className?: string
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
- icon?: ReactElement
122
- title: string
123
- body?: string
124
- } & (
125
- | {
126
- buttonText: string
127
- buttonTo: string
128
- }
129
- | {
130
- buttonText: string
131
- onClick: () => void
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
- value: Value
141
- } & (
142
- | {
143
- label: string
144
- labelString?: never
145
- }
146
- | {
147
- label: ReactNode
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
- selected: Value | null
153
- onChange: (value: Value) => void
154
- items: ListboxItem<Value>[]
155
- placeholder?: string
156
- className?: string
157
- disabled?: boolean
158
- hasError?: boolean
159
- name?: string
160
- isLoading?: boolean
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 };