@zvoove/unity-ui 2.26.3 → 2.28.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/bin/cli.mjs +148 -154
- package/dist/bin/generate-skills.mjs +2 -2
- package/dist/unity-ui.cjs.js +1 -1
- package/dist/unity-ui.css +1 -1
- package/dist/unity-ui.d.ts +88 -11
- package/dist/unity-ui.es.js +124 -123
- package/package.json +2 -2
package/dist/unity-ui.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChangeEventHandler } from 'react';
|
|
2
|
+
import { ComponentRef } from 'react';
|
|
2
3
|
import { CSSProperties } from 'react';
|
|
3
4
|
import { default as default_2 } from 'react';
|
|
4
5
|
import { Dispatch } from 'react';
|
|
@@ -292,9 +293,14 @@ export declare type ButtonsTranslations = {
|
|
|
292
293
|
ok?: string;
|
|
293
294
|
};
|
|
294
295
|
|
|
295
|
-
export declare const Card:
|
|
296
|
+
export declare const Card: {
|
|
297
|
+
<T extends React.ElementType = "div">({ children, header, headerBgColor, footer, footerBgColor, hideHeaderBorder, borderRadius, elevation, variant, padding, margin, className, overflow, bgColor, height, width, minHeight, maxHeight, minWidth, maxWidth, interactive, as, linkComponent, ...restProps }: CardProps<T> & {
|
|
298
|
+
ref?: ForwardedRef<ComponentRef<T>>;
|
|
299
|
+
}): JSX.Element;
|
|
300
|
+
displayName: string;
|
|
301
|
+
};
|
|
296
302
|
|
|
297
|
-
export declare
|
|
303
|
+
export declare type CardProps<T extends React.ElementType = 'div'> = UnionAs_2 & {
|
|
298
304
|
/**
|
|
299
305
|
* The content of the card.
|
|
300
306
|
*/
|
|
@@ -386,7 +392,27 @@ export declare interface CardProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
386
392
|
* The background color of the card.
|
|
387
393
|
*/
|
|
388
394
|
bgColor?: BackgroundColors;
|
|
389
|
-
|
|
395
|
+
/**
|
|
396
|
+
* When `true`, the card shows a hover background color at 80% opacity and
|
|
397
|
+
* a pointer cursor. Automatically enabled when `onClick`, `linkComponent`,
|
|
398
|
+
* or `as="a"` is set. Pass `false` to opt out.
|
|
399
|
+
*/
|
|
400
|
+
interactive?: boolean;
|
|
401
|
+
/**
|
|
402
|
+
* Handle click events on the card.
|
|
403
|
+
*/
|
|
404
|
+
onClick?: (event: MouseEvent_2<HTMLElement>) => void;
|
|
405
|
+
/**
|
|
406
|
+
* A custom component to render the card root as. Useful for router link
|
|
407
|
+
* components (e.g. Next.js `Link` or React Router `Link`).
|
|
408
|
+
* When provided, the `as` prop is ignored.
|
|
409
|
+
*/
|
|
410
|
+
linkComponent?: T;
|
|
411
|
+
/**
|
|
412
|
+
* Ref forwarded to the root element.
|
|
413
|
+
*/
|
|
414
|
+
ref?: ForwardedRef<ComponentRef<T>>;
|
|
415
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, 'children' | 'className'>;
|
|
390
416
|
|
|
391
417
|
/**
|
|
392
418
|
* Event emitted when files are changed (added, removed, replaced, or cleared).
|
|
@@ -662,6 +688,7 @@ export declare const commonIconsMap: {
|
|
|
662
688
|
readonly 'chat-slash': Icon_2;
|
|
663
689
|
readonly chats: Icon_2;
|
|
664
690
|
readonly check: Icon_2;
|
|
691
|
+
readonly circle: Icon_2;
|
|
665
692
|
readonly 'check-circle': Icon_2;
|
|
666
693
|
readonly checkbox: Icon_2;
|
|
667
694
|
readonly 'checkbox-empty': Icon_2;
|
|
@@ -1302,11 +1329,11 @@ export declare type FlexResponsiveStylesKeys<Attr extends string> = GenerateSimp
|
|
|
1302
1329
|
export declare type FlexWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
1303
1330
|
|
|
1304
1331
|
export declare const FloatSearch: {
|
|
1305
|
-
({ open, onClose, items, onSearch, onSelect, value, placeholder, translations: translationsProp, zIndex, loading, }: FloatSearchProps): ReactPortal | null;
|
|
1332
|
+
<T extends React.ElementType = "button">({ open, onClose, items, onSearch, onSelect, value, placeholder, translations: translationsProp, zIndex, loading, linkComponent: ItemComponent, }: FloatSearchProps<T>): ReactPortal | null;
|
|
1306
1333
|
displayName: string;
|
|
1307
1334
|
};
|
|
1308
1335
|
|
|
1309
|
-
export declare
|
|
1336
|
+
export declare type FloatSearchItem<T extends React.ElementType = 'button'> = {
|
|
1310
1337
|
/**
|
|
1311
1338
|
* Unique identifier for the item.
|
|
1312
1339
|
*/
|
|
@@ -1323,9 +1350,9 @@ export declare interface FloatSearchItem {
|
|
|
1323
1350
|
* Secondary metadata shown right-aligned (e.g. "Heute", "24 Chats").
|
|
1324
1351
|
*/
|
|
1325
1352
|
meta?: string;
|
|
1326
|
-
}
|
|
1353
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, 'children' | 'id' | 'type'>;
|
|
1327
1354
|
|
|
1328
|
-
export declare
|
|
1355
|
+
export declare type FloatSearchProps<T extends React.ElementType = 'button'> = {
|
|
1329
1356
|
/**
|
|
1330
1357
|
* Controls whether the search overlay is visible.
|
|
1331
1358
|
*/
|
|
@@ -1337,7 +1364,7 @@ export declare interface FloatSearchProps {
|
|
|
1337
1364
|
/**
|
|
1338
1365
|
* Items to display in the result list.
|
|
1339
1366
|
*/
|
|
1340
|
-
items?: FloatSearchItem[];
|
|
1367
|
+
items?: FloatSearchItem<T>[];
|
|
1341
1368
|
/**
|
|
1342
1369
|
* Called whenever the search query changes.
|
|
1343
1370
|
*/
|
|
@@ -1345,7 +1372,7 @@ export declare interface FloatSearchProps {
|
|
|
1345
1372
|
/**
|
|
1346
1373
|
* Called when the user confirms a result (Enter key or click).
|
|
1347
1374
|
*/
|
|
1348
|
-
onSelect?: (item: FloatSearchItem) => void;
|
|
1375
|
+
onSelect?: (item: FloatSearchItem<T>) => void;
|
|
1349
1376
|
/**
|
|
1350
1377
|
* Controlled search query value. When provided, the input becomes controlled.
|
|
1351
1378
|
*/
|
|
@@ -1371,7 +1398,13 @@ export declare interface FloatSearchProps {
|
|
|
1371
1398
|
* @default false
|
|
1372
1399
|
*/
|
|
1373
1400
|
loading?: boolean;
|
|
1374
|
-
|
|
1401
|
+
/**
|
|
1402
|
+
* The component to render each result item as. <br />
|
|
1403
|
+
* This is useful if you want to use a different component like a `Link` component from **Next.js** or **React Router**.
|
|
1404
|
+
* @default 'button'
|
|
1405
|
+
*/
|
|
1406
|
+
linkComponent?: T | 'button';
|
|
1407
|
+
};
|
|
1375
1408
|
|
|
1376
1409
|
export declare interface FloatSearchTranslations {
|
|
1377
1410
|
/**
|
|
@@ -1597,6 +1630,7 @@ declare const iconMap: {
|
|
|
1597
1630
|
readonly 'chat-slash': Icon_2;
|
|
1598
1631
|
readonly chats: Icon_2;
|
|
1599
1632
|
readonly check: Icon_2;
|
|
1633
|
+
readonly circle: Icon_2;
|
|
1600
1634
|
readonly 'check-circle': Icon_2;
|
|
1601
1635
|
readonly checkbox: Icon_2;
|
|
1602
1636
|
readonly 'checkbox-empty': Icon_2;
|
|
@@ -1984,6 +2018,22 @@ declare type LabelStates = {
|
|
|
1984
2018
|
off: string;
|
|
1985
2019
|
};
|
|
1986
2020
|
|
|
2021
|
+
export declare const List: {
|
|
2022
|
+
<T extends default_2.ElementType = "div">({ items, showDividers, linkComponent: LinkComponent, }: ListProps<T>): JSX.Element;
|
|
2023
|
+
displayName: string;
|
|
2024
|
+
};
|
|
2025
|
+
|
|
2026
|
+
export declare type ListItem<T extends default_2.ElementType = 'div'> = {
|
|
2027
|
+
/**
|
|
2028
|
+
* The content of the list item.
|
|
2029
|
+
*/
|
|
2030
|
+
content: ReactNode;
|
|
2031
|
+
/**
|
|
2032
|
+
* The id of the list item. This will be use as the key for the list item.
|
|
2033
|
+
*/
|
|
2034
|
+
id: string;
|
|
2035
|
+
} & Omit<default_2.ComponentPropsWithoutRef<T>, 'children' | 'className' | 'content' | 'id'>;
|
|
2036
|
+
|
|
1987
2037
|
export declare const ListMenu: {
|
|
1988
2038
|
<T extends default_2.ElementType = "a">({ items, activeItem, open, variant, linkComponent: LinkComponent, onItemClick, }: ListMenuProps<T>): JSX.Element;
|
|
1989
2039
|
displayName: string;
|
|
@@ -2066,6 +2116,23 @@ export declare type ListMenuSection<T extends React.ElementType = 'a'> = {
|
|
|
2066
2116
|
|
|
2067
2117
|
export declare type ListMenuVariant = 'default' | 'compact';
|
|
2068
2118
|
|
|
2119
|
+
export declare interface ListProps<T extends default_2.ElementType = 'div'> {
|
|
2120
|
+
/**
|
|
2121
|
+
* The items of the List.
|
|
2122
|
+
*/
|
|
2123
|
+
items: ListItem<T>[];
|
|
2124
|
+
/**
|
|
2125
|
+
* Whether to show dividers between items.
|
|
2126
|
+
* @default true
|
|
2127
|
+
*/
|
|
2128
|
+
showDividers?: boolean;
|
|
2129
|
+
/**
|
|
2130
|
+
* The component to render for each list item.
|
|
2131
|
+
* @default 'div'
|
|
2132
|
+
*/
|
|
2133
|
+
linkComponent?: T | 'div';
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2069
2136
|
export declare type Margin = SpacingKeys | {
|
|
2070
2137
|
top?: SpacingKeys;
|
|
2071
2138
|
right?: SpacingKeys;
|
|
@@ -2284,7 +2351,7 @@ declare type Panel = {
|
|
|
2284
2351
|
|
|
2285
2352
|
export declare const PopUpMenu: ({ children, placement, disabled, trigger, density, closeOnItemClick, items, onItemClick, selectedItem, selectable, open, onClose, closeOnClickOutside, closeOnEscape, toggleOnClick, queryHighlight, showSearch, searchPlaceholder, allowClearAll, allowSelectAll, selectAllLabel, clearAllLabel, noResultsFoundMessage, onClearAllOrSelectAllClick, searchMode, onSearchChange, isLoading, wrapperWidth, onScrollEnd, isLoadingMore, height, minHeight, maxHeight, ...props }: PopUpMenuProps) => JSX.Element;
|
|
2286
2353
|
|
|
2287
|
-
export declare type PopUpMenuItem<T extends React.ElementType = 'button'> =
|
|
2354
|
+
export declare type PopUpMenuItem<T extends React.ElementType = 'button'> = UnionAs_3 & {
|
|
2288
2355
|
/**
|
|
2289
2356
|
* The id of the item
|
|
2290
2357
|
* @required
|
|
@@ -3813,6 +3880,16 @@ declare type UnionAs = ({
|
|
|
3813
3880
|
} & Omit<React.ComponentProps<'span'>, 'className'>);
|
|
3814
3881
|
|
|
3815
3882
|
declare type UnionAs_2 = ({
|
|
3883
|
+
/**
|
|
3884
|
+
* Render the card root as a specific HTML element.
|
|
3885
|
+
* @default 'div'
|
|
3886
|
+
*/
|
|
3887
|
+
as?: 'a';
|
|
3888
|
+
} & Omit<React.ComponentProps<'a'>, 'className'>) | ({
|
|
3889
|
+
as?: 'div';
|
|
3890
|
+
} & Omit<React.ComponentProps<'div'>, 'className'>);
|
|
3891
|
+
|
|
3892
|
+
declare type UnionAs_3 = ({
|
|
3816
3893
|
/**
|
|
3817
3894
|
* The component to render the button as.
|
|
3818
3895
|
* @default button
|