@zvoove/unity-ui 2.38.0 → 2.39.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/llms.txt +18 -4
- package/dist/unity-ui.cjs.js +1 -1
- package/dist/unity-ui.css +1 -1
- package/dist/unity-ui.d.ts +55 -3
- package/dist/unity-ui.es.js +172 -171
- package/package.json +8 -8
package/dist/unity-ui.d.ts
CHANGED
|
@@ -11,13 +11,14 @@ import { IconWeight } from '@phosphor-icons/react';
|
|
|
11
11
|
import { JSX } from 'react/jsx-runtime';
|
|
12
12
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
13
13
|
import { PropsWithChildren } from 'react';
|
|
14
|
+
import { ReactElement } from 'react';
|
|
14
15
|
import { ReactNode } from 'react';
|
|
15
16
|
import { RefAttributes } from 'react';
|
|
16
17
|
import { RefObject } from 'react';
|
|
17
18
|
import { SetStateAction } from 'react';
|
|
18
19
|
|
|
19
20
|
export declare const Accordion: {
|
|
20
|
-
<T extends readonly AccordionItem[]>({ items, onToggle, openItems, allowMultipleOpenItems, }: AccordionProps<T>): JSX.Element;
|
|
21
|
+
<T extends readonly AccordionItem[]>({ items, onToggle, openItems, allowMultipleOpenItems, highlightOpenItems, }: AccordionProps<T>): JSX.Element;
|
|
21
22
|
displayName: string;
|
|
22
23
|
};
|
|
23
24
|
|
|
@@ -26,6 +27,13 @@ export declare interface AccordionItem {
|
|
|
26
27
|
title: string;
|
|
27
28
|
supportingText?: string;
|
|
28
29
|
children: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* An optional Tag rendered in the header, before the chevron.
|
|
32
|
+
*
|
|
33
|
+
* Only a Tag element is rendered; invalid values are ignored and warn in
|
|
34
|
+
* non-production builds.
|
|
35
|
+
*/
|
|
36
|
+
tag?: ReactElement<TagProps>;
|
|
29
37
|
isOpen?: boolean;
|
|
30
38
|
disabled?: boolean;
|
|
31
39
|
}
|
|
@@ -54,6 +62,11 @@ export declare interface AccordionProps<T extends readonly AccordionItem[] = rea
|
|
|
54
62
|
* @default false
|
|
55
63
|
*/
|
|
56
64
|
allowMultipleOpenItems?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Whether open item headers use the primary highlight background.
|
|
67
|
+
* @default true
|
|
68
|
+
*/
|
|
69
|
+
highlightOpenItems?: boolean;
|
|
57
70
|
}
|
|
58
71
|
|
|
59
72
|
export declare const ActionCard: {
|
|
@@ -2229,16 +2242,40 @@ export declare interface ImageVisualizerProps {
|
|
|
2229
2242
|
}
|
|
2230
2243
|
|
|
2231
2244
|
export declare const InfoBox: {
|
|
2232
|
-
({ message, variant, icon, elevated, borderRadius, }: InfoBoxProps): JSX.Element;
|
|
2245
|
+
({ message, title, variant, icon, elevated, borderRadius, actions, showCloseButton, onClose, }: InfoBoxProps): JSX.Element;
|
|
2233
2246
|
displayName: string;
|
|
2234
2247
|
};
|
|
2235
2248
|
|
|
2249
|
+
export declare interface InfoBoxAction {
|
|
2250
|
+
/**
|
|
2251
|
+
* The label shown in the action button.
|
|
2252
|
+
*/
|
|
2253
|
+
label: string;
|
|
2254
|
+
/**
|
|
2255
|
+
* The callback fired when the action button is clicked.
|
|
2256
|
+
*/
|
|
2257
|
+
onClick?: () => void;
|
|
2258
|
+
/**
|
|
2259
|
+
* The Button visual variant.
|
|
2260
|
+
* @default 'text' for all actions except the last, which defaults to 'filled'
|
|
2261
|
+
*/
|
|
2262
|
+
variant?: InfoBoxActionVariant;
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2265
|
+
export declare type InfoBoxActionVariant = NonNullable<ButtonProps['variant']>;
|
|
2266
|
+
|
|
2236
2267
|
export declare interface InfoBoxProps {
|
|
2237
2268
|
/**
|
|
2238
2269
|
* The content to display in the InfoBox. Accepts a plain string or any
|
|
2239
|
-
* React node
|
|
2270
|
+
* React node.
|
|
2240
2271
|
*/
|
|
2241
2272
|
message: ReactNode;
|
|
2273
|
+
/**
|
|
2274
|
+
* Optional title displayed above the message. When present, the InfoBox uses
|
|
2275
|
+
* a stacked title/message structure; actions still sit beside the message
|
|
2276
|
+
* when there is enough width.
|
|
2277
|
+
*/
|
|
2278
|
+
title?: ReactNode;
|
|
2242
2279
|
/**
|
|
2243
2280
|
* The semantic variant of the InfoBox
|
|
2244
2281
|
* @default 'default'
|
|
@@ -2258,6 +2295,21 @@ export declare interface InfoBoxProps {
|
|
|
2258
2295
|
* @default 'sm'
|
|
2259
2296
|
*/
|
|
2260
2297
|
borderRadius?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2298
|
+
/**
|
|
2299
|
+
* Optional action buttons displayed alongside the message or below it when
|
|
2300
|
+
* the InfoBox is too narrow for the inline layout.
|
|
2301
|
+
*/
|
|
2302
|
+
actions?: InfoBoxAction[];
|
|
2303
|
+
/**
|
|
2304
|
+
* Whether to display a close button.
|
|
2305
|
+
* @default false
|
|
2306
|
+
*/
|
|
2307
|
+
showCloseButton?: boolean;
|
|
2308
|
+
/**
|
|
2309
|
+
* Callback fired when the close button is clicked. The InfoBox remains
|
|
2310
|
+
* mounted; the consumer controls whether it should be removed.
|
|
2311
|
+
*/
|
|
2312
|
+
onClose?: () => void;
|
|
2261
2313
|
}
|
|
2262
2314
|
|
|
2263
2315
|
export declare type InfoBoxVariant = 'default' | 'positive' | 'warning' | 'error' | 'subtle' | 'neutral' | 'outlined';
|