@zvoove/unity-ui 2.46.0 → 2.48.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/theme.css +45 -0
- package/dist/unity-ui.cjs.js +1 -1
- package/dist/unity-ui.css +1 -1
- package/dist/unity-ui.d.ts +146 -11
- package/dist/unity-ui.es.js +183 -180
- package/package.json +25 -25
package/dist/unity-ui.d.ts
CHANGED
|
@@ -206,17 +206,18 @@ declare type AxisVariant = 'X' | 'Y';
|
|
|
206
206
|
|
|
207
207
|
export declare type BackgroundColors = 'background' | 'outline' | 'outline-variant' | 'outline-low' | 'primary' | 'primary-hover' | 'primary-active' | 'secondary' | 'tertiary' | 'primary-container' | 'secondary-container' | 'tertiary-container' | 'tertiary-container-hover' | 'tertiary-container-active' | 'primary-fixed' | 'primary-fixed-dim' | 'secondary-fixed' | 'secondary-fixed-dim' | 'tertiary-fixed' | 'tertiary-fixed-dim' | 'surface' | 'surface-bright' | 'surface-dim' | 'surface-variant' | 'surface-container-lowest' | 'surface-container-low' | 'surface-container' | 'surface-container-high' | 'surface-container-highest' | 'error' | 'error-container' | 'warning' | 'dark-warning' | 'warning-container' | 'inverse-surface' | 'inverse-on-surface' | 'inverse-primary' | 'scrim' | 'yellow' | 'dark-yellow' | 'yellow-container' | 'green' | 'dark-green' | 'green-container' | 'pink' | 'dark-pink' | 'pink-container' | 'steel-blue' | 'dark-steel-blue' | 'steel-blue-container' | 'container-neutral' | 'container-neutral-hover' | 'code-surface' | 'code-surface-variant';
|
|
208
208
|
|
|
209
|
-
export declare const Badge: ({ children, variant, content, dot, }: BadgeProps) => JSX.Element;
|
|
209
|
+
export declare const Badge: ({ children, variant, content, dot, inline, visible, }: BadgeProps) => JSX.Element;
|
|
210
210
|
|
|
211
211
|
export declare interface BadgeProps {
|
|
212
212
|
/**
|
|
213
|
-
* The
|
|
213
|
+
* The element the badge is attached to. Not required when `inline` is
|
|
214
|
+
* true, since the badge can then render entirely on its own.
|
|
214
215
|
*/
|
|
215
|
-
children
|
|
216
|
+
children?: ReactNode;
|
|
216
217
|
/**
|
|
217
218
|
* The variant of the component
|
|
218
219
|
*/
|
|
219
|
-
variant?: 'primary' | 'secondary';
|
|
220
|
+
variant?: 'primary' | 'secondary' | 'negative';
|
|
220
221
|
/**
|
|
221
222
|
* The content of the badge. If undefined, the badge will be hidden.
|
|
222
223
|
*/
|
|
@@ -225,6 +226,21 @@ export declare interface BadgeProps {
|
|
|
225
226
|
* The dot prop changes a badge into a small dot
|
|
226
227
|
*/
|
|
227
228
|
dot?: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Render the badge in normal document flow next to `children`, instead of
|
|
231
|
+
* absolutely positioned over its top-right corner. Use this for a
|
|
232
|
+
* standalone count that isn't attached to an icon or avatar — for example,
|
|
233
|
+
* as trailing content next to a navigation item's label.
|
|
234
|
+
* @default false
|
|
235
|
+
*/
|
|
236
|
+
inline?: boolean;
|
|
237
|
+
/**
|
|
238
|
+
* Whether the badge pill is shown. Unlike omitting `content`, the pill
|
|
239
|
+
* stays mounted and fades out via opacity instead of disappearing
|
|
240
|
+
* instantly — use this when toggling visibility should animate.
|
|
241
|
+
* @default true
|
|
242
|
+
*/
|
|
243
|
+
visible?: boolean;
|
|
228
244
|
}
|
|
229
245
|
|
|
230
246
|
export declare const Breadcrumbs: <T extends default_2.ElementType = "a">({ items, linkComponent: LinkComponent, homeIcon, }: BreadcrumbsProps<T>) => JSX.Element;
|
|
@@ -1300,6 +1316,65 @@ export declare interface DividerProps {
|
|
|
1300
1316
|
color?: BackgroundColors;
|
|
1301
1317
|
}
|
|
1302
1318
|
|
|
1319
|
+
export declare const EmptyState: {
|
|
1320
|
+
({ type, title, supportingText, icon, actions, }: EmptyStateProps): JSX.Element;
|
|
1321
|
+
displayName: string;
|
|
1322
|
+
};
|
|
1323
|
+
|
|
1324
|
+
export declare interface EmptyStateAction {
|
|
1325
|
+
/**
|
|
1326
|
+
* The label shown in the action button.
|
|
1327
|
+
*/
|
|
1328
|
+
label: string;
|
|
1329
|
+
/**
|
|
1330
|
+
* The callback fired when the action button is clicked.
|
|
1331
|
+
*/
|
|
1332
|
+
onClick?: () => void;
|
|
1333
|
+
/**
|
|
1334
|
+
* The Button visual variant.
|
|
1335
|
+
* @default 'outlined' for all actions except the last, which defaults to 'filled'
|
|
1336
|
+
*/
|
|
1337
|
+
variant?: EmptyStateActionVariant;
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
export declare type EmptyStateActionVariant = NonNullable<ButtonProps['variant']>;
|
|
1341
|
+
|
|
1342
|
+
export declare interface EmptyStateProps {
|
|
1343
|
+
/**
|
|
1344
|
+
* The content preset to display.
|
|
1345
|
+
*/
|
|
1346
|
+
type: EmptyStateType;
|
|
1347
|
+
/**
|
|
1348
|
+
* The heading. Pass `false` to hide it, or a custom string/node to
|
|
1349
|
+
* override the preset's default text.
|
|
1350
|
+
* @default true (shows the preset's default title)
|
|
1351
|
+
*/
|
|
1352
|
+
title?: ReactNode;
|
|
1353
|
+
/**
|
|
1354
|
+
* The supporting text. Pass `false` to hide it, or a custom string/node to
|
|
1355
|
+
* override the preset's default text.
|
|
1356
|
+
* @default true (shows the preset's default supporting text)
|
|
1357
|
+
*/
|
|
1358
|
+
supportingText?: ReactNode;
|
|
1359
|
+
/**
|
|
1360
|
+
* The featured icon. Pass `false` to hide it, a semantic icon name to swap
|
|
1361
|
+
* the glyph while keeping the preset's default color and size, or a
|
|
1362
|
+
* partial `IconProps` object to override any combination of name, color,
|
|
1363
|
+
* size, weight, or featured — any field left out falls back to the
|
|
1364
|
+
* preset's default.
|
|
1365
|
+
* @default true (shows the preset's default icon)
|
|
1366
|
+
*/
|
|
1367
|
+
icon?: boolean | CommonIconNames | Partial<IconProps>;
|
|
1368
|
+
/**
|
|
1369
|
+
* The action buttons. Pass `false` to hide them, or an array of actions to
|
|
1370
|
+
* fully replace the preset's default buttons, including click handlers.
|
|
1371
|
+
* @default true (shows the preset's default actions)
|
|
1372
|
+
*/
|
|
1373
|
+
actions?: boolean | EmptyStateAction[];
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
export declare type EmptyStateType = 'noResults' | 'noDataYet' | 'error' | 'noSelection' | 'locked';
|
|
1377
|
+
|
|
1303
1378
|
export declare const Expandable: {
|
|
1304
1379
|
<T extends React.ElementType = "div">({ children, isOpen, as: Component, ...props }: ExpandableProps<T>): JSX.Element;
|
|
1305
1380
|
displayName: string;
|
|
@@ -2407,6 +2482,28 @@ export declare type ListMenuItem<T extends React.ElementType = 'a'> = {
|
|
|
2407
2482
|
* @default 'always'
|
|
2408
2483
|
*/
|
|
2409
2484
|
endContentVisibility?: 'always' | 'hover';
|
|
2485
|
+
/**
|
|
2486
|
+
* A count (or other short content) shown as a badge attached to this item.
|
|
2487
|
+
* Renders inline next to the label when the menu is open, and relocates to
|
|
2488
|
+
* overlay the item's icon when the menu is closed (icon-only rail). Has no
|
|
2489
|
+
* effect if the item has no `icon` and the menu is closed.
|
|
2490
|
+
*/
|
|
2491
|
+
badge?: React.ReactNode;
|
|
2492
|
+
/**
|
|
2493
|
+
* Background/foreground color of `badge`.
|
|
2494
|
+
* @default 'negative'
|
|
2495
|
+
*/
|
|
2496
|
+
badgeVariant?: BadgeProps['variant'];
|
|
2497
|
+
/**
|
|
2498
|
+
* Shows a small release/status tag next to this item's label (e.g.
|
|
2499
|
+
* "Beta", "Alpha", "v1.2", "dev") — freely set its text and color via
|
|
2500
|
+
* `label`/`color`/`variant`, the same options `Tag` itself accepts. When
|
|
2501
|
+
* the menu is closed (icon-only rail), the same tag renders as a small
|
|
2502
|
+
* overlay on the item's icon so its text stays visible instead of
|
|
2503
|
+
* disappearing. If `badge` is also set, `badge` takes the icon-corner
|
|
2504
|
+
* slot and the tag overlay is skipped — its label still shows when open.
|
|
2505
|
+
*/
|
|
2506
|
+
tag?: ListMenuItemTag;
|
|
2410
2507
|
/**
|
|
2411
2508
|
* Renders a spacer instead of a menu item.
|
|
2412
2509
|
* @default false
|
|
@@ -2414,6 +2511,12 @@ export declare type ListMenuItem<T extends React.ElementType = 'a'> = {
|
|
|
2414
2511
|
isSpacer?: boolean;
|
|
2415
2512
|
} & Omit<React.ComponentPropsWithoutRef<T>, 'children'>;
|
|
2416
2513
|
|
|
2514
|
+
/**
|
|
2515
|
+
* Freely label and color a release/status tag on an item — same options as
|
|
2516
|
+
* `Tag` itself (e.g. `{ label: 'v1.2', color: 'steel-blue' }`).
|
|
2517
|
+
*/
|
|
2518
|
+
declare type ListMenuItemTag = Pick<TagProps, 'label' | 'color' | 'variant'>;
|
|
2519
|
+
|
|
2417
2520
|
export declare type ListMenuProps<T extends React.ElementType = 'a'> = {
|
|
2418
2521
|
/**
|
|
2419
2522
|
* Either a flat list of menu items (default) **or** an array of sections
|
|
@@ -3248,12 +3351,18 @@ export declare interface ScrollableAreaProps {
|
|
|
3248
3351
|
children: ReactNode;
|
|
3249
3352
|
/**
|
|
3250
3353
|
* Height of the scrollable area. When omitted, the area fills its parent
|
|
3251
|
-
* (`size-full`, or `h-full` if only `width` is set).
|
|
3354
|
+
* (`size-full`, or `h-full` if only `width` is set). If the parent has no
|
|
3355
|
+
* definite height for that percentage to resolve against (e.g. inside a
|
|
3356
|
+
* flex/grid layout), the rendered parent height is measured and applied
|
|
3357
|
+
* directly instead.
|
|
3252
3358
|
*/
|
|
3253
3359
|
height?: ResponsiveType<number | string>;
|
|
3254
3360
|
/**
|
|
3255
3361
|
* Width of the scrollable area. When omitted, the area fills its parent
|
|
3256
|
-
* (`size-full`, or `w-full` if only `height` is set).
|
|
3362
|
+
* (`size-full`, or `w-full` if only `height` is set). If the parent has no
|
|
3363
|
+
* definite width for that percentage to resolve against (e.g. inside a
|
|
3364
|
+
* flex/grid layout), the rendered parent width is measured and applied
|
|
3365
|
+
* directly instead.
|
|
3257
3366
|
*/
|
|
3258
3367
|
width?: ResponsiveType<number | string>;
|
|
3259
3368
|
/**
|
|
@@ -4134,8 +4243,9 @@ export declare interface TableProps<T extends readonly TableColumnProps[] = read
|
|
|
4134
4243
|
*/
|
|
4135
4244
|
footer?: React.ReactNode;
|
|
4136
4245
|
/**
|
|
4137
|
-
* The background color of the table header
|
|
4138
|
-
*
|
|
4246
|
+
* The background color of the table header, matching the background used
|
|
4247
|
+
* by section rows.
|
|
4248
|
+
* @default true
|
|
4139
4249
|
*/
|
|
4140
4250
|
headerBackgroundColor?: boolean;
|
|
4141
4251
|
/**
|
|
@@ -4290,7 +4400,14 @@ export declare type TabStepperItem<T extends React.ElementType = 'button'> = {
|
|
|
4290
4400
|
* @default The item's position in the list
|
|
4291
4401
|
*/
|
|
4292
4402
|
stepNumber?: number;
|
|
4293
|
-
|
|
4403
|
+
/**
|
|
4404
|
+
* Whether the step is disabled. A disabled step can't be selected by click
|
|
4405
|
+
* or keyboard and is skipped by arrow-key navigation. Use this to block
|
|
4406
|
+
* upcoming steps until earlier ones are complete.
|
|
4407
|
+
* @default false
|
|
4408
|
+
*/
|
|
4409
|
+
disabled?: boolean;
|
|
4410
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, 'children' | 'id' | 'onClick' | 'title' | 'disabled'>;
|
|
4294
4411
|
|
|
4295
4412
|
export declare type TabStepperItemsAlignment = 'left' | 'center' | 'right' | 'spread';
|
|
4296
4413
|
|
|
@@ -4438,6 +4555,13 @@ export declare interface TextareaProps extends Omit<React.TextareaHTMLAttributes
|
|
|
4438
4555
|
* The actions to display below the textarea.
|
|
4439
4556
|
*/
|
|
4440
4557
|
actions?: React.ReactNode;
|
|
4558
|
+
/**
|
|
4559
|
+
* Shows a moving multi-color gradient border instead of the plain one, as
|
|
4560
|
+
* an "AI is working" affordance (e.g. while a response is streaming into
|
|
4561
|
+
* the field). Has no effect while `error` is true.
|
|
4562
|
+
* @default false
|
|
4563
|
+
*/
|
|
4564
|
+
aiActive?: boolean;
|
|
4441
4565
|
}
|
|
4442
4566
|
|
|
4443
4567
|
export declare const TextField: ForwardRefExoticComponent<TextFieldProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -4519,7 +4643,7 @@ export declare interface TextFieldProps extends React.InputHTMLAttributes<HTMLIn
|
|
|
4519
4643
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
4520
4644
|
}
|
|
4521
4645
|
|
|
4522
|
-
export declare const Tooltip: ({ children, content, placement, disabled, }: TooltipProps) => JSX.Element;
|
|
4646
|
+
export declare const Tooltip: ({ children, content, placement, disabled, fitToContent, isOpen: isOpenProp, }: TooltipProps) => JSX.Element;
|
|
4523
4647
|
|
|
4524
4648
|
export declare interface TooltipProps {
|
|
4525
4649
|
/**
|
|
@@ -4534,12 +4658,23 @@ export declare interface TooltipProps {
|
|
|
4534
4658
|
* The position of the tooltip relative to its trigger
|
|
4535
4659
|
*/
|
|
4536
4660
|
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
4661
|
+
/**
|
|
4662
|
+
* Shrink the trigger wrapper to fit the trigger's own content, instead of
|
|
4663
|
+
* stretching to fill its container's width. Enable this when the default
|
|
4664
|
+
* full-width wrapper doesn't fit the surrounding layout (for example, a
|
|
4665
|
+
* flex row where it shouldn't claim the whole row).
|
|
4666
|
+
* @default false
|
|
4667
|
+
*/
|
|
4668
|
+
fitToContent?: ResponsiveType<boolean>;
|
|
4537
4669
|
/**
|
|
4538
4670
|
* Whether the tooltip should be disabled
|
|
4539
4671
|
*/
|
|
4540
4672
|
disabled?: boolean;
|
|
4541
4673
|
/**
|
|
4542
|
-
*
|
|
4674
|
+
* Controls the tooltip's visibility externally instead of the default
|
|
4675
|
+
* hover behavior. When set (even to `false`), hover/mouse-leave no longer
|
|
4676
|
+
* toggle the tooltip — the caller is fully responsible for its visibility.
|
|
4677
|
+
* `disabled` still takes precedence and forces the tooltip closed.
|
|
4543
4678
|
*/
|
|
4544
4679
|
isOpen?: boolean;
|
|
4545
4680
|
}
|