@bigstack-oss/cube-ui 0.0.2 → 0.2.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/dist/index.css +950 -0
- package/dist/index.d.cts +505 -11
- package/dist/index.d.ts +505 -11
- package/dist/index.js +3495 -185
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3489 -192
- package/dist/index.mjs.map +1 -1
- package/dist/theme.d.cts +405 -405
- package/dist/theme.d.ts +405 -405
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ForwardRefExoticComponent, SVGProps, RefAttributes, ReactElement, JSX, ButtonHTMLAttributes, InputHTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
+
import { ForwardRefExoticComponent, SVGProps, RefAttributes, ReactElement, JSX, ButtonHTMLAttributes, InputHTMLAttributes, RefObject, PropsWithChildren, ReactNode, AnchorHTMLAttributes, MouseEvent, Ref, DetailedHTMLProps, TextareaHTMLAttributes, FocusEvent } from 'react';
|
|
3
|
+
import { BorderColorClass } from './theme.cjs';
|
|
4
|
+
export { BackgroundColorClass, CubeThemeName, CubeThemeProvider, CubeThemeProviderProps, FillColorClass, StrokeColorClass, TextColorClass, Typography, TypographyClassName, cubePreset, cubeTheme, getTypography } from './theme.cjs';
|
|
3
5
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
export { BackgroundColorClass, BorderColorClass, CubeThemeName, CubeThemeProvider, CubeThemeProviderProps, FillColorClass, StrokeColorClass, TextColorClass, Typography, TypographyClassName, cubePreset, cubeTheme, getTypography } from './theme.cjs';
|
|
5
6
|
import 'tailwindcss/types/config';
|
|
6
7
|
|
|
7
8
|
declare const cubeIconSizes: readonly ["xs", "sm", "md-sm", "md", "lg", "xl"];
|
|
@@ -60,8 +61,6 @@ type CubeButtonProps = Omit<JSX.IntrinsicElements['button'], 'type' | 'children'
|
|
|
60
61
|
Icon: SvgComponent;
|
|
61
62
|
});
|
|
62
63
|
|
|
63
|
-
declare const CubeButton: (props: CubeButtonProps) => react.JSX.Element;
|
|
64
|
-
|
|
65
64
|
type CubeButtonSkeletonProps = {
|
|
66
65
|
/**
|
|
67
66
|
* @default 'md
|
|
@@ -72,10 +71,184 @@ type CubeButtonSkeletonProps = {
|
|
|
72
71
|
*/
|
|
73
72
|
usage?: CubeButtonUsage;
|
|
74
73
|
};
|
|
75
|
-
|
|
74
|
+
|
|
75
|
+
declare const CubeButton: {
|
|
76
|
+
(props: CubeButtonProps): react.JSX.Element;
|
|
77
|
+
Skeleton: (props: CubeButtonSkeletonProps) => react.JSX.Element;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
declare const cubeCheckboxColors: readonly ["primary", "primary-dark", "secondary", "secondary-dark"];
|
|
81
|
+
declare const cubeCheckboxLabelSizes: readonly ["md", "sm", "xs"];
|
|
82
|
+
declare const cubeCheckboxGridDirections: readonly ["vertical", "wrap"];
|
|
83
|
+
type CubeCheckboxColor = (typeof cubeCheckboxColors)[number];
|
|
84
|
+
type CubeCheckboxLabelSize = (typeof cubeCheckboxLabelSizes)[number];
|
|
85
|
+
type CubeCheckboxGridDirection = (typeof cubeCheckboxGridDirections)[number];
|
|
86
|
+
type CubeCheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'checked' | 'defaultChecked'> & {
|
|
87
|
+
containerClassName?: string;
|
|
88
|
+
/**
|
|
89
|
+
* @default "primary"
|
|
90
|
+
*/
|
|
91
|
+
color?: CubeCheckboxColor;
|
|
92
|
+
label?: string;
|
|
93
|
+
/**
|
|
94
|
+
* @default "md"
|
|
95
|
+
*/
|
|
96
|
+
labelSize?: CubeCheckboxLabelSize;
|
|
97
|
+
labelClassName?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Use `null` for indeterminate state.
|
|
100
|
+
*/
|
|
101
|
+
checked?: boolean | null;
|
|
102
|
+
/**
|
|
103
|
+
* Use `null` for indeterminate state.
|
|
104
|
+
*/
|
|
105
|
+
defaultChecked?: boolean | null;
|
|
106
|
+
/**
|
|
107
|
+
* @default false
|
|
108
|
+
*/
|
|
109
|
+
isLoading?: boolean;
|
|
110
|
+
ref?: RefObject<HTMLInputElement | null>;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
type CubeCheckboxGridProps = PropsWithChildren<{
|
|
114
|
+
className?: string;
|
|
115
|
+
direction: CubeCheckboxGridDirection;
|
|
116
|
+
}>;
|
|
117
|
+
|
|
118
|
+
declare const CubeCheckbox: {
|
|
119
|
+
(props: CubeCheckboxProps): react.JSX.Element;
|
|
120
|
+
Skeleton: () => react.JSX.Element;
|
|
121
|
+
Grid: (props: CubeCheckboxGridProps) => react.JSX.Element;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
declare const cubeDropdownSizes: readonly ["sm", "md"];
|
|
125
|
+
declare const cubeDropdownTypes: readonly ["radio", "checkbox"];
|
|
126
|
+
declare const cubeDropdownVariants: readonly ["regular", "withFilter"];
|
|
127
|
+
type CubeDropdownSize = (typeof cubeDropdownSizes)[number];
|
|
128
|
+
type CubeDropdownType = (typeof cubeDropdownTypes)[number];
|
|
129
|
+
type CubeDropdownVariant = (typeof cubeDropdownVariants)[number];
|
|
130
|
+
type OnAllCheckChange = (checked: boolean) => void;
|
|
131
|
+
type OnClearSelection = () => void;
|
|
132
|
+
type CubeDropdownBaseProps<Item> = {
|
|
133
|
+
/**
|
|
134
|
+
* @default 'md'
|
|
135
|
+
*/
|
|
136
|
+
size?: CubeDropdownSize;
|
|
137
|
+
type: CubeDropdownType;
|
|
138
|
+
/**
|
|
139
|
+
* @default "regular"
|
|
140
|
+
*/
|
|
141
|
+
variant?: CubeDropdownVariant;
|
|
142
|
+
selectedItems: Item[];
|
|
143
|
+
/**
|
|
144
|
+
* @default false
|
|
145
|
+
*/
|
|
146
|
+
isLoading?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* @default false
|
|
149
|
+
*/
|
|
150
|
+
disabled?: boolean;
|
|
151
|
+
label?: string;
|
|
152
|
+
skeletonClassName?: string;
|
|
153
|
+
children: ReactNode;
|
|
154
|
+
};
|
|
155
|
+
type CheckboxPropsWithFilter<Item> = CubeDropdownBaseProps<Item> & {
|
|
156
|
+
type: 'checkbox';
|
|
157
|
+
variant: 'withFilter';
|
|
158
|
+
onAllCheckChange: OnAllCheckChange;
|
|
159
|
+
onClearSelection: OnClearSelection;
|
|
160
|
+
};
|
|
161
|
+
type CheckboxPropsRegular<Item> = CubeDropdownBaseProps<Item> & {
|
|
162
|
+
type: 'checkbox';
|
|
163
|
+
variant?: Exclude<CubeDropdownVariant, 'withFilter'>;
|
|
164
|
+
onAllCheckChange: OnAllCheckChange;
|
|
165
|
+
onClearSelection?: never;
|
|
166
|
+
};
|
|
167
|
+
type RadioProps<Item> = CubeDropdownBaseProps<Item> & {
|
|
168
|
+
type: 'radio';
|
|
169
|
+
variant?: CubeDropdownVariant;
|
|
170
|
+
onAllCheckChange?: never;
|
|
171
|
+
onClearSelection?: never;
|
|
172
|
+
};
|
|
173
|
+
type CubeDropdownProps<Item> = CheckboxPropsWithFilter<Item> | CheckboxPropsRegular<Item> | RadioProps<Item>;
|
|
174
|
+
|
|
175
|
+
type CubeDropdownItemProps<Item> = {
|
|
176
|
+
children: string;
|
|
177
|
+
item: Item;
|
|
178
|
+
/**
|
|
179
|
+
* @default false
|
|
180
|
+
*/
|
|
181
|
+
disabled?: boolean;
|
|
182
|
+
onClick: () => void;
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
type CubeDropdownMenuProps = {
|
|
186
|
+
children: ReactNode;
|
|
187
|
+
className?: string;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
type CubeDropdownTriggerProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'disabled'> & {
|
|
191
|
+
children?: string;
|
|
192
|
+
placeholder?: string;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
declare const CubeDropdown: {
|
|
196
|
+
<Item>(props: CubeDropdownProps<Item>): react.JSX.Element;
|
|
197
|
+
Trigger: (props: CubeDropdownTriggerProps) => react.JSX.Element;
|
|
198
|
+
Menu: (props: CubeDropdownMenuProps) => react.ReactPortal;
|
|
199
|
+
Item: <Item>(props: CubeDropdownItemProps<Item>) => react.JSX.Element;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
type PropsWithClassName = {
|
|
203
|
+
className?: string | undefined;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
declare const cubeHyperlinkColors: readonly ["primary", "secondary"];
|
|
207
|
+
declare const cubeHyperlinkVariants: readonly ["text-only", "text-inline", "icon-left", "icon-right"];
|
|
208
|
+
declare const cubeHyperlinkSizes: readonly ["sm", "md"];
|
|
209
|
+
type CubeHyperlinkColor = (typeof cubeHyperlinkColors)[number];
|
|
210
|
+
type CubeHyperlinkVariant = (typeof cubeHyperlinkVariants)[number];
|
|
211
|
+
type CubeHyperlinkSize = (typeof cubeHyperlinkSizes)[number];
|
|
212
|
+
type BaseHyperlinkProps = {
|
|
213
|
+
/**
|
|
214
|
+
* @default "primary"
|
|
215
|
+
*/
|
|
216
|
+
color?: CubeHyperlinkColor;
|
|
217
|
+
/**
|
|
218
|
+
* @default "md"
|
|
219
|
+
*/
|
|
220
|
+
size?: CubeHyperlinkSize;
|
|
221
|
+
/**
|
|
222
|
+
* @default false
|
|
223
|
+
*/
|
|
224
|
+
disabled?: boolean;
|
|
225
|
+
children: string;
|
|
226
|
+
href?: string;
|
|
227
|
+
target?: AnchorHTMLAttributes<HTMLAnchorElement>['target'];
|
|
228
|
+
onClick?: (e: MouseEvent<HTMLElement>) => void;
|
|
229
|
+
};
|
|
230
|
+
type CubeHyperlinkProps = PropsWithClassName & BaseHyperlinkProps & ({
|
|
231
|
+
variant: Extract<CubeHyperlinkVariant, 'icon-left' | 'icon-right'>;
|
|
232
|
+
Icon: SvgComponent;
|
|
233
|
+
} | {
|
|
234
|
+
variant: Extract<CubeHyperlinkVariant, 'text-only' | 'text-inline'>;
|
|
235
|
+
Icon?: never;
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
declare const CubeHyperlink: (props: CubeHyperlinkProps) => react.DetailedReactHTMLElement<{
|
|
239
|
+
className: string;
|
|
240
|
+
href: string | undefined;
|
|
241
|
+
target: react.HTMLAttributeAnchorTarget | undefined;
|
|
242
|
+
onClick: (e: MouseEvent<HTMLElement>) => void;
|
|
243
|
+
}, HTMLElement>;
|
|
76
244
|
|
|
77
245
|
declare const CubeIconFrame: (props: CubeIconFrameProps) => react.JSX.Element;
|
|
78
246
|
|
|
247
|
+
type InputSkeletonType = 'input' | 'label' | 'footer';
|
|
248
|
+
type CubeInputSkeletonProps = {
|
|
249
|
+
type: InputSkeletonType;
|
|
250
|
+
};
|
|
251
|
+
|
|
79
252
|
type CubeInputProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
80
253
|
/**
|
|
81
254
|
* @default false
|
|
@@ -97,10 +270,8 @@ declare const CubeInput: react.ForwardRefExoticComponent<InputHTMLAttributes<HTM
|
|
|
97
270
|
helpMessage?: string;
|
|
98
271
|
errorMessage?: string | boolean;
|
|
99
272
|
trailingIcon?: SvgElement;
|
|
100
|
-
} & react.RefAttributes<HTMLInputElement
|
|
101
|
-
|
|
102
|
-
type PropsWithClassName = {
|
|
103
|
-
className?: string | undefined;
|
|
273
|
+
} & react.RefAttributes<HTMLInputElement>> & {
|
|
274
|
+
Skeleton: (props: CubeInputSkeletonProps) => react.JSX.Element;
|
|
104
275
|
};
|
|
105
276
|
|
|
106
277
|
declare const cubeLoadingSpinnerVariants: readonly ["dot45", "dot120", "cube"];
|
|
@@ -111,6 +282,97 @@ type CubeLoadingSpinnerProps = PropsWithClassName & {
|
|
|
111
282
|
|
|
112
283
|
declare const CubeLoadingSpinner: (props: CubeLoadingSpinnerProps) => react.JSX.Element;
|
|
113
284
|
|
|
285
|
+
type CubeToggleProps = PropsWithClassName & {
|
|
286
|
+
/**
|
|
287
|
+
* Whether the toggle is on. Always controlled by the caller —
|
|
288
|
+
* pair with `onCheckedChange` to update this value when the user toggles.
|
|
289
|
+
*/
|
|
290
|
+
checked: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* Called with the next on/off value when the user toggles. Required so the
|
|
293
|
+
* caller can update `checked`.
|
|
294
|
+
*/
|
|
295
|
+
onCheckedChange: (checked: boolean) => void;
|
|
296
|
+
/**
|
|
297
|
+
* Visible text shown next to the toggle. Also provides the accessible name
|
|
298
|
+
* via `aria-labelledby` / `<label htmlFor>`.
|
|
299
|
+
*/
|
|
300
|
+
label?: string;
|
|
301
|
+
/**
|
|
302
|
+
* Accessible name when no visible `label` is rendered. Prefer `label` when
|
|
303
|
+
* the name should also appear on screen.
|
|
304
|
+
*/
|
|
305
|
+
'aria-label'?: string;
|
|
306
|
+
/**
|
|
307
|
+
* When true, the toggle cannot be interacted with.
|
|
308
|
+
* @default false
|
|
309
|
+
*/
|
|
310
|
+
disabled?: boolean;
|
|
311
|
+
};
|
|
312
|
+
declare const CubeToggle: (props: CubeToggleProps) => react.JSX.Element;
|
|
313
|
+
|
|
314
|
+
declare const cubeOverflowMenuItemTypes: readonly ["plain", "menu-icon", "check-mark", "toggle", "trailing-icon", "custom-leading-element"];
|
|
315
|
+
type CubeOverflowMenuItemType = (typeof cubeOverflowMenuItemTypes)[number];
|
|
316
|
+
type CubeOverflowMenuTriggerProps = {
|
|
317
|
+
ref?: Ref<HTMLElement>;
|
|
318
|
+
onClick?: (e: MouseEvent<HTMLElement>) => void;
|
|
319
|
+
};
|
|
320
|
+
type CubeOverflowMenuProps = {
|
|
321
|
+
/**
|
|
322
|
+
* The element that toggles the menu. It receives a `ref` and an `onClick`;
|
|
323
|
+
* its own `ref` and `onClick` are still called.
|
|
324
|
+
*/
|
|
325
|
+
triggerElement: ReactElement<CubeOverflowMenuTriggerProps>;
|
|
326
|
+
children: ReactNode;
|
|
327
|
+
};
|
|
328
|
+
type ClickableItemProps = {
|
|
329
|
+
/**
|
|
330
|
+
* @default false
|
|
331
|
+
*/
|
|
332
|
+
disabled?: boolean;
|
|
333
|
+
onClick?: () => void;
|
|
334
|
+
};
|
|
335
|
+
type PlainItem = {
|
|
336
|
+
type: 'plain';
|
|
337
|
+
} & ClickableItemProps;
|
|
338
|
+
type ItemWithMenuIcon = {
|
|
339
|
+
type: 'menu-icon';
|
|
340
|
+
MenuIcon: SvgComponent;
|
|
341
|
+
} & ClickableItemProps;
|
|
342
|
+
type ItemWithCheckMark = {
|
|
343
|
+
type: 'check-mark';
|
|
344
|
+
isChecked: boolean;
|
|
345
|
+
} & ClickableItemProps;
|
|
346
|
+
type ItemWithToggle = {
|
|
347
|
+
type: 'toggle';
|
|
348
|
+
} & Pick<CubeToggleProps, 'checked'> & Partial<Pick<CubeToggleProps, 'onCheckedChange'>> & ClickableItemProps;
|
|
349
|
+
type ItemWithTrailingIcon = {
|
|
350
|
+
type: 'trailing-icon';
|
|
351
|
+
TrailingIcon: SvgComponent;
|
|
352
|
+
} & ClickableItemProps;
|
|
353
|
+
type ItemWithCustomLeadingElement = {
|
|
354
|
+
type: 'custom-leading-element';
|
|
355
|
+
element: ReactNode;
|
|
356
|
+
} & ClickableItemProps;
|
|
357
|
+
type CubeOverflowMenuItemProps = {
|
|
358
|
+
title: string;
|
|
359
|
+
/**
|
|
360
|
+
* @default false
|
|
361
|
+
*/
|
|
362
|
+
boldTitle?: boolean;
|
|
363
|
+
subText?: string;
|
|
364
|
+
} & (PlainItem | ItemWithMenuIcon | ItemWithCheckMark | ItemWithToggle | ItemWithTrailingIcon | ItemWithCustomLeadingElement);
|
|
365
|
+
type CubeOverflowMenuTitleProps = {
|
|
366
|
+
children: string;
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
declare const CubeOverflowMenu: {
|
|
370
|
+
(props: CubeOverflowMenuProps): react.JSX.Element;
|
|
371
|
+
Item: (props: CubeOverflowMenuItemProps) => react.JSX.Element;
|
|
372
|
+
Divider: () => react.JSX.Element;
|
|
373
|
+
Title: (props: CubeOverflowMenuTitleProps) => react.JSX.Element;
|
|
374
|
+
};
|
|
375
|
+
|
|
114
376
|
type CubePasswordInputProps = Omit<CubeInputProps, 'trailingIcon' | 'type'> & {
|
|
115
377
|
/**
|
|
116
378
|
* @default false
|
|
@@ -119,14 +381,246 @@ type CubePasswordInputProps = Omit<CubeInputProps, 'trailingIcon' | 'type'> & {
|
|
|
119
381
|
};
|
|
120
382
|
declare const CubePasswordInput: (props: CubePasswordInputProps) => react.JSX.Element;
|
|
121
383
|
|
|
384
|
+
type CubeRadioButtonGridDirection = 'vertical' | 'wrap';
|
|
385
|
+
type CubeRadioButtonGridProps = PropsWithChildren<{
|
|
386
|
+
className?: string;
|
|
387
|
+
direction: CubeRadioButtonGridDirection;
|
|
388
|
+
}>;
|
|
389
|
+
|
|
390
|
+
type CubeRadioButtonProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
391
|
+
label: string;
|
|
392
|
+
/**
|
|
393
|
+
* @default false
|
|
394
|
+
*/
|
|
395
|
+
isLoading?: boolean;
|
|
396
|
+
ref?: RefObject<HTMLInputElement | null>;
|
|
397
|
+
};
|
|
398
|
+
declare const CubeRadioButton: {
|
|
399
|
+
(props: CubeRadioButtonProps): react.JSX.Element;
|
|
400
|
+
Skeleton: () => react.JSX.Element;
|
|
401
|
+
Grid: (props: CubeRadioButtonGridProps) => react.JSX.Element;
|
|
402
|
+
};
|
|
403
|
+
|
|
122
404
|
type CubeSkeletonProps = PropsWithClassName & {
|
|
123
405
|
style?: React.CSSProperties;
|
|
124
406
|
};
|
|
125
407
|
declare const CubeSkeleton: (props: CubeSkeletonProps) => react.JSX.Element;
|
|
126
408
|
|
|
409
|
+
declare const cubeStatusKnownValues: readonly ["neutral", "in-use", "finished", "ok", "success", "active", "available", "powering on", "warning", "error", "fail", "failed", "stopped", "powering off"];
|
|
410
|
+
declare const cubeStatusTypes: readonly ["neutral", "success", "warning", "others"];
|
|
411
|
+
type CubeStatusKnownValue = (typeof cubeStatusKnownValues)[number];
|
|
412
|
+
type CubeStatusValue = (string & {}) | CubeStatusKnownValue;
|
|
413
|
+
type CubeStatusType = (typeof cubeStatusTypes)[number];
|
|
414
|
+
type CubeStatusProps = {
|
|
415
|
+
status: CubeStatusValue;
|
|
416
|
+
/**
|
|
417
|
+
* Custom display text for the status text.
|
|
418
|
+
* If not specified, the text will be automatically generated
|
|
419
|
+
* based on the built-in logic and i18n translations.
|
|
420
|
+
*/
|
|
421
|
+
message?: string;
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
declare const CubeStatus: {
|
|
425
|
+
(props: CubeStatusProps): react.JSX.Element;
|
|
426
|
+
Skeleton: () => react.JSX.Element;
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
declare const cubeStatusReactionStatuses: readonly ["neutral", "success", "available", "done", "error", "duplicate", "failed"];
|
|
430
|
+
declare const cubeStatusReactionTypes: readonly ["neutral", "success", "warning"];
|
|
431
|
+
type CubeStatusReactionStatus = (typeof cubeStatusReactionStatuses)[number];
|
|
432
|
+
type CubeStatusReactionType = (typeof cubeStatusReactionTypes)[number];
|
|
433
|
+
type CubeStatusReactionProps = {
|
|
434
|
+
status: CubeStatusReactionStatus;
|
|
435
|
+
message?: string;
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
declare const CubeStatusReaction: {
|
|
439
|
+
(props: CubeStatusReactionProps): react.JSX.Element;
|
|
440
|
+
Skeleton: () => react.JSX.Element;
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
declare const CubeStepProcessItem: (props: CubeStepProcessItemProps) => react.JSX.Element;
|
|
444
|
+
|
|
445
|
+
type CubeStepProcessProps = PropsWithClassName & {
|
|
446
|
+
isLoading?: boolean;
|
|
447
|
+
children?: ReactElement<typeof CubeStepProcessItem>[] | ReactElement<typeof CubeStepProcessItem>;
|
|
448
|
+
};
|
|
449
|
+
type CubeStepProcessItemProps = {
|
|
450
|
+
/**
|
|
451
|
+
* The step serial number (1-based) that represents this step in the process.
|
|
452
|
+
*/
|
|
453
|
+
stepNumber: number;
|
|
454
|
+
label: string;
|
|
455
|
+
isActive: boolean;
|
|
456
|
+
};
|
|
457
|
+
|
|
458
|
+
type CubeStepProcessSkeletonProps = {
|
|
459
|
+
/**
|
|
460
|
+
* @default 5
|
|
461
|
+
*/
|
|
462
|
+
length?: number;
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
declare const CubeStepProcess: {
|
|
466
|
+
(props: CubeStepProcessProps): react.JSX.Element;
|
|
467
|
+
Item: (props: CubeStepProcessItemProps) => react.JSX.Element;
|
|
468
|
+
Skeleton: (props: CubeStepProcessSkeletonProps) => react.JSX.Element;
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
declare const cubeStrokeTypes: readonly ["regular", "dot"];
|
|
472
|
+
type CubeStrokeType = (typeof cubeStrokeTypes)[number];
|
|
473
|
+
type CubeStrokeProps = PropsWithClassName & {
|
|
474
|
+
/**
|
|
475
|
+
* @default 'regular'
|
|
476
|
+
*/
|
|
477
|
+
type?: CubeStrokeType;
|
|
478
|
+
color?: BorderColorClass;
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
declare const CubeStroke: (props: CubeStrokeProps) => react.JSX.Element;
|
|
482
|
+
|
|
483
|
+
type CubeTabsProps = {
|
|
484
|
+
children: ReactNode;
|
|
485
|
+
};
|
|
486
|
+
type CubeTabProps = {
|
|
487
|
+
children: string;
|
|
488
|
+
href?: string;
|
|
489
|
+
isActive: boolean;
|
|
490
|
+
disabled?: boolean;
|
|
491
|
+
onClick?: (e: MouseEvent<HTMLElement>) => void;
|
|
492
|
+
} & ({
|
|
493
|
+
number: number;
|
|
494
|
+
dot?: never;
|
|
495
|
+
} | {
|
|
496
|
+
number?: never;
|
|
497
|
+
dot: true;
|
|
498
|
+
} | {
|
|
499
|
+
number?: never;
|
|
500
|
+
dot?: never;
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
declare const CubeTabs: {
|
|
504
|
+
(props: CubeTabsProps): react.JSX.Element;
|
|
505
|
+
Tab: (props: CubeTabProps) => react.DetailedReactHTMLElement<{
|
|
506
|
+
className: string;
|
|
507
|
+
href: string | undefined;
|
|
508
|
+
onClick: (e: react.MouseEvent<HTMLElement>) => void;
|
|
509
|
+
}, HTMLElement>;
|
|
510
|
+
Skeleton: () => react.JSX.Element;
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
declare const cubeTagColors: readonly ["default", "primary-blue", "blue", "cyan", "dark"];
|
|
514
|
+
declare const cubeTagVariants: readonly ["filled", "stroke"];
|
|
515
|
+
type CubeTagColor = (typeof cubeTagColors)[number];
|
|
516
|
+
type CubeTagVariant = (typeof cubeTagVariants)[number];
|
|
517
|
+
type CubeTagProps = PropsWithClassName & {
|
|
518
|
+
children?: string;
|
|
519
|
+
/**
|
|
520
|
+
* @default "default"
|
|
521
|
+
*/
|
|
522
|
+
color?: CubeTagColor;
|
|
523
|
+
variant: CubeTagVariant;
|
|
524
|
+
/**
|
|
525
|
+
* @default false
|
|
526
|
+
*/
|
|
527
|
+
disabled?: boolean;
|
|
528
|
+
/**
|
|
529
|
+
* @default false
|
|
530
|
+
*/
|
|
531
|
+
isLoading?: boolean;
|
|
532
|
+
} & (// The props for the close button and icon are both optional.
|
|
533
|
+
NonNullable<unknown> | {
|
|
534
|
+
showCloseButton: boolean;
|
|
535
|
+
onClose?: () => void;
|
|
536
|
+
} | {
|
|
537
|
+
Icon: SvgComponent;
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
type CubeTagSkeletonProps = {
|
|
541
|
+
hasIcon: boolean;
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
declare const CubeTag: {
|
|
545
|
+
(props: CubeTagProps): react.JSX.Element;
|
|
546
|
+
Skeleton: (props: CubeTagSkeletonProps) => react.JSX.Element;
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
type CubeTextareaProps = DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> & {
|
|
550
|
+
label: string;
|
|
551
|
+
maxLength: number;
|
|
552
|
+
/**
|
|
553
|
+
* @default false
|
|
554
|
+
*/
|
|
555
|
+
isLoading?: boolean;
|
|
556
|
+
errorMessage?: string;
|
|
557
|
+
};
|
|
558
|
+
declare const CubeTextarea: {
|
|
559
|
+
(props: CubeTextareaProps): react.JSX.Element;
|
|
560
|
+
Skeleton: () => react.JSX.Element;
|
|
561
|
+
};
|
|
562
|
+
|
|
563
|
+
declare const cubeTooltipPlacements: readonly ["top-left", "top-center", "top-right", "top-follow-cursor", "bottom-left", "bottom-center", "bottom-right", "bottom-follow-cursor"];
|
|
564
|
+
type CubeTooltipPlacement = (typeof cubeTooltipPlacements)[number];
|
|
565
|
+
type CubeTooltipInteractiveElementProps = {
|
|
566
|
+
ref?: Ref<HTMLElement>;
|
|
567
|
+
onMouseEnter?: (e: MouseEvent<HTMLElement>) => void;
|
|
568
|
+
onMouseMove?: (e: MouseEvent<HTMLElement>) => void;
|
|
569
|
+
onMouseLeave?: (e: MouseEvent<HTMLElement>) => void;
|
|
570
|
+
onClick?: (e: MouseEvent<HTMLElement>) => void;
|
|
571
|
+
onFocus?: (e: FocusEvent<HTMLElement>) => void;
|
|
572
|
+
onBlur?: (e: FocusEvent<HTMLElement>) => void;
|
|
573
|
+
'aria-describedby'?: string;
|
|
574
|
+
};
|
|
575
|
+
type CubeTooltipInformation = {
|
|
576
|
+
title?: string;
|
|
577
|
+
subtext?: string;
|
|
578
|
+
message: string;
|
|
579
|
+
};
|
|
580
|
+
type CubeTooltipProps = {
|
|
581
|
+
/**
|
|
582
|
+
* @default 'top-center'
|
|
583
|
+
*/
|
|
584
|
+
placement?: CubeTooltipPlacement;
|
|
585
|
+
hoverContent?: CubeTooltipInformation;
|
|
586
|
+
clickContent?: CubeTooltipInformation;
|
|
587
|
+
/**
|
|
588
|
+
* The toggle (anchor) element. Hover content is also shown while it has
|
|
589
|
+
* keyboard focus, so pass a focusable element (e.g. a `<button>`) to make
|
|
590
|
+
* the tooltip reachable by keyboard.
|
|
591
|
+
*/
|
|
592
|
+
children: ReactElement<CubeTooltipInteractiveElementProps>;
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
declare const CubeTooltip: (props: CubeTooltipProps) => react.JSX.Element;
|
|
596
|
+
|
|
127
597
|
var enUS = {
|
|
128
598
|
"component.common.loading": "Loading",
|
|
129
|
-
"component.common.noData": "No Data"
|
|
599
|
+
"component.common.noData": "No Data",
|
|
600
|
+
"component.dropdown.choose": "Choose",
|
|
601
|
+
"component.dropdown.all": "All",
|
|
602
|
+
"component.dropdown.search": "Search",
|
|
603
|
+
"component.status.host.neutral": "Neutral",
|
|
604
|
+
"component.status.host.inUse": "In-Use",
|
|
605
|
+
"component.status.host.finished": "Finished",
|
|
606
|
+
"component.status.host.ok": "Ok",
|
|
607
|
+
"component.status.host.success": "Success",
|
|
608
|
+
"component.status.host.active": "Active",
|
|
609
|
+
"component.status.host.available": "Available",
|
|
610
|
+
"component.status.host.poweringOn": "Powering-On",
|
|
611
|
+
"component.status.host.warning": "Warning",
|
|
612
|
+
"component.status.host.error": "Error",
|
|
613
|
+
"component.status.host.fail": "Fail",
|
|
614
|
+
"component.status.host.failed": "Failed",
|
|
615
|
+
"component.status.host.stopped": "Stopped",
|
|
616
|
+
"component.status.host.poweringOff": "Powering-Off",
|
|
617
|
+
"component.status.reaction.neutral": "Neutral",
|
|
618
|
+
"component.status.reaction.success": "Success",
|
|
619
|
+
"component.status.reaction.available": "Available",
|
|
620
|
+
"component.status.reaction.done": "Done",
|
|
621
|
+
"component.status.reaction.error": "Error",
|
|
622
|
+
"component.status.reaction.duplicate": "Duplicate",
|
|
623
|
+
"component.status.reaction.failed": "Failed"
|
|
130
624
|
};
|
|
131
625
|
|
|
132
626
|
/**
|
|
@@ -178,4 +672,4 @@ declare const CubeUiLocaleProvider: (props: CubeUiLocaleProviderProps) => react.
|
|
|
178
672
|
*/
|
|
179
673
|
declare const useCubeUiTranslation: typeof useTranslation;
|
|
180
674
|
|
|
181
|
-
export { CubeButton, type CubeButtonProps, type CubeButtonSize,
|
|
675
|
+
export { BorderColorClass, CubeButton, type CubeButtonProps, type CubeButtonSize, type CubeButtonSkeletonProps, type CubeButtonType, type CubeButtonUsage, CubeCheckbox, type CubeCheckboxColor, type CubeCheckboxGridDirection, type CubeCheckboxGridProps, type CubeCheckboxLabelSize, type CubeCheckboxProps, CubeDropdown, type CubeDropdownItemProps, type CubeDropdownMenuProps, type CubeDropdownProps, type CubeDropdownSize, type CubeDropdownTriggerProps, type CubeDropdownType, type CubeDropdownVariant, CubeHyperlink, type CubeHyperlinkColor, type CubeHyperlinkProps, type CubeHyperlinkSize, type CubeHyperlinkVariant, CubeIconFrame, type CubeIconFrameProps, type CubeIconSize, CubeInput, type CubeInputProps, type CubeInputSkeletonProps, CubeLoadingSpinner, type CubeLoadingSpinnerProps, type CubeLoadingSpinnerVariant, CubeOverflowMenu, type CubeOverflowMenuItemProps, type CubeOverflowMenuItemType, type CubeOverflowMenuProps, type CubeOverflowMenuTitleProps, type CubeOverflowMenuTriggerProps, CubePasswordInput, type CubePasswordInputProps, CubeRadioButton, type CubeRadioButtonGridDirection, type CubeRadioButtonGridProps, type CubeRadioButtonProps, CubeSkeleton, type CubeSkeletonProps, CubeStatus, type CubeStatusKnownValue, type CubeStatusProps, CubeStatusReaction, type CubeStatusReactionProps, type CubeStatusReactionStatus, type CubeStatusReactionType, type CubeStatusType, type CubeStatusValue, CubeStepProcess, type CubeStepProcessItemProps, type CubeStepProcessProps, type CubeStepProcessSkeletonProps, CubeStroke, type CubeStrokeProps, type CubeStrokeType, type CubeTabProps, CubeTabs, type CubeTabsProps, CubeTag, type CubeTagColor, type CubeTagProps, type CubeTagSkeletonProps, type CubeTagVariant, CubeTextarea, type CubeTextareaProps, CubeToggle, type CubeToggleProps, CubeTooltip, type CubeTooltipInformation, type CubeTooltipInteractiveElementProps, type CubeTooltipPlacement, type CubeTooltipProps, type CubeUiLocale, CubeUiLocaleProvider, type CubeUiLocaleProviderProps, type CubeUiTranslationResource, type OnAllCheckChange, type OnClearSelection, type SvgComponent, type SvgElement, addCubeUiTranslations, useCubeUiTranslation };
|