@oxide/design-system 1.2.9 → 1.2.10
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 +177 -94
- package/components/dist/index.js +44630 -43371
- package/icons/index.ts +153 -149
- package/icons/react/Copy12Icon.tsx +33 -0
- package/icons/react/Filter16Icon.tsx +37 -0
- package/icons/react/Info12Icon.tsx +33 -0
- package/icons/react/Metrics24Icon.tsx +24 -5
- package/icons/react/OpenLink12Icon.tsx +1 -1
- package/icons/react/Sort16Icon.tsx +33 -0
- package/icons/react/index.ts +152 -148
- package/icons/sprite.svg +1 -1
- package/icons/svg/copy-12.svg +1 -0
- package/icons/svg/filter-16.svg +1 -0
- package/icons/svg/info-12.svg +1 -0
- package/icons/svg/open-link-12.svg +1 -1
- package/icons/svg/sort-16.svg +1 -0
- package/package.json +1 -1
|
@@ -1,120 +1,203 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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'
|
|
7
12
|
|
|
8
13
|
declare const AsciiDocBlocks: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
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
|
+
}
|
|
22
35
|
|
|
23
|
-
type BadgeColor = 'default' | 'destructive' | 'notice' | 'neutral' | 'purple' | 'blue'
|
|
24
|
-
type BadgeVariant = 'default' | 'solid'
|
|
36
|
+
type BadgeColor = 'default' | 'destructive' | 'notice' | 'neutral' | 'purple' | 'blue'
|
|
37
|
+
type BadgeVariant = 'default' | 'solid'
|
|
25
38
|
interface BadgeProps {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
39
|
+
color?: BadgeColor
|
|
40
|
+
className?: string
|
|
41
|
+
children: React.ReactNode
|
|
42
|
+
variant?: BadgeVariant
|
|
30
43
|
}
|
|
31
|
-
declare const badgeColors: Record<BadgeVariant, Record<BadgeColor, string
|
|
32
|
-
declare const Badge: ({
|
|
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
|
|
33
51
|
|
|
34
|
-
declare const buttonSizes: readonly [
|
|
35
|
-
declare const variants: readonly [
|
|
36
|
-
type ButtonSize = typeof buttonSizes[number]
|
|
37
|
-
type Variant = typeof variants[number]
|
|
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]
|
|
38
56
|
type ButtonStyleProps = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
declare const buttonStyle: ({ size, variant
|
|
57
|
+
size?: ButtonSize
|
|
58
|
+
variant?: Variant
|
|
59
|
+
}
|
|
60
|
+
declare const buttonStyle: ({ size, variant }?: ButtonStyleProps) => string
|
|
43
61
|
interface ButtonProps extends React.ComponentPropsWithRef<'button'>, ButtonStyleProps {
|
|
44
|
-
|
|
45
|
-
|
|
62
|
+
innerClassName?: string
|
|
63
|
+
loading?: boolean
|
|
46
64
|
}
|
|
47
|
-
declare const Button: react.ForwardRefExoticComponent<
|
|
65
|
+
declare const Button: react.ForwardRefExoticComponent<
|
|
66
|
+
Omit<ButtonProps, 'ref'> & react.RefAttributes<HTMLButtonElement>
|
|
67
|
+
>
|
|
48
68
|
|
|
49
|
-
declare const spinnerSizes: readonly [
|
|
50
|
-
declare const spinnerVariants: readonly [
|
|
51
|
-
type SpinnerSize = typeof spinnerSizes[number]
|
|
52
|
-
type SpinnerVariant = typeof spinnerVariants[number]
|
|
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]
|
|
53
73
|
interface SpinnerProps {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
74
|
+
className?: string
|
|
75
|
+
size?: SpinnerSize
|
|
76
|
+
variant?: SpinnerVariant
|
|
57
77
|
}
|
|
58
|
-
declare const Spinner: ({
|
|
78
|
+
declare const Spinner: ({
|
|
79
|
+
className,
|
|
80
|
+
size,
|
|
81
|
+
variant,
|
|
82
|
+
}: SpinnerProps) => react_jsx_runtime.JSX.Element
|
|
59
83
|
type Props$1 = {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
84
|
+
isLoading: boolean
|
|
85
|
+
children?: ReactNode
|
|
86
|
+
minTime?: number
|
|
87
|
+
}
|
|
64
88
|
/** Loading spinner that shows for a minimum of `minTime` */
|
|
65
|
-
declare const SpinnerLoader: ({
|
|
89
|
+
declare const SpinnerLoader: ({
|
|
90
|
+
isLoading,
|
|
91
|
+
children,
|
|
92
|
+
minTime,
|
|
93
|
+
}: Props$1) => react_jsx_runtime.JSX.Element
|
|
66
94
|
|
|
67
|
-
type TabsRootProps = SetRequired<TabsProps, 'defaultValue'
|
|
95
|
+
type TabsRootProps = SetRequired<TabsProps, 'defaultValue'>
|
|
68
96
|
declare const Tabs: {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
+
}
|
|
74
106
|
|
|
75
107
|
type CheckboxProps = {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
} & Omit<React.ComponentProps<'input'>, 'type'
|
|
108
|
+
indeterminate?: boolean
|
|
109
|
+
children?: React.ReactNode
|
|
110
|
+
className?: string
|
|
111
|
+
} & Omit<React.ComponentProps<'input'>, 'type'>
|
|
80
112
|
/** Checkbox component that handles label, styling, and indeterminate state */
|
|
81
|
-
declare const Checkbox: ({
|
|
113
|
+
declare const Checkbox: ({
|
|
114
|
+
indeterminate,
|
|
115
|
+
children,
|
|
116
|
+
className,
|
|
117
|
+
...inputProps
|
|
118
|
+
}: CheckboxProps) => react_jsx_runtime.JSX.Element
|
|
82
119
|
|
|
83
120
|
type Props = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
} & (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
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
|
|
97
138
|
|
|
98
139
|
type ListboxItem<Value extends string = string> = {
|
|
99
|
-
|
|
100
|
-
} & (
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
140
|
+
value: Value
|
|
141
|
+
} & (
|
|
142
|
+
| {
|
|
143
|
+
label: string
|
|
144
|
+
labelString?: never
|
|
145
|
+
}
|
|
146
|
+
| {
|
|
147
|
+
label: ReactNode
|
|
148
|
+
labelString: string
|
|
149
|
+
}
|
|
150
|
+
)
|
|
107
151
|
interface ListboxProps<Value extends string = string> {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
|
117
161
|
}
|
|
118
|
-
declare const Listbox: <Value extends string = string>({
|
|
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
|
|
119
174
|
|
|
120
|
-
export {
|
|
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
|
+
}
|