@zvoove/unity-ui 2.48.0 → 2.49.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 +29 -12
- package/dist/unity-ui.cjs.js +1 -1
- package/dist/unity-ui.css +1 -1
- package/dist/unity-ui.d.ts +93 -13
- package/dist/unity-ui.es.js +140 -136
- package/package.json +1 -1
package/dist/unity-ui.d.ts
CHANGED
|
@@ -2853,7 +2853,7 @@ declare type Panel = {
|
|
|
2853
2853
|
children: React.ReactNode;
|
|
2854
2854
|
};
|
|
2855
2855
|
|
|
2856
|
-
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, autoFocusFirstItem, ...props }: PopUpMenuProps) => JSX.Element;
|
|
2856
|
+
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, autoFocusFirstItem, allowDeselect, ...props }: PopUpMenuProps) => JSX.Element;
|
|
2857
2857
|
|
|
2858
2858
|
export declare type PopUpMenuItem<T extends React.ElementType = 'button'> = UnionAs_3 & {
|
|
2859
2859
|
/**
|
|
@@ -2977,6 +2977,12 @@ export declare interface PopUpMenuProps extends Omit<React.HTMLAttributes<HTMLDi
|
|
|
2977
2977
|
* @default none
|
|
2978
2978
|
*/
|
|
2979
2979
|
selectable?: 'single' | 'multiple' | 'none';
|
|
2980
|
+
/**
|
|
2981
|
+
* Whether clicking an already-selected item deselects it.
|
|
2982
|
+
* Only applies when `selectable` is `'single'`.
|
|
2983
|
+
* @default true
|
|
2984
|
+
*/
|
|
2985
|
+
allowDeselect?: boolean;
|
|
2980
2986
|
/**
|
|
2981
2987
|
* Whether the context menu should be disabled
|
|
2982
2988
|
* @default false
|
|
@@ -3475,7 +3481,7 @@ export declare interface SegmentGroupProps<T extends React.ElementType = 'button
|
|
|
3475
3481
|
|
|
3476
3482
|
export declare type SegmentValue<T = string> = T | T[];
|
|
3477
3483
|
|
|
3478
|
-
export declare const Select: ({ value, multiple, options, onChange, error, errorMessage, disabled, label, hideLabel, name, id, searchable, allowClearAll, allowSelectAll, selectAllLabel, clearAllLabel, noResultsFoundMessage, onScrollEnd, isLoadingMore, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, density, ...props }: SelectProps) => JSX.Element;
|
|
3484
|
+
export declare const Select: ({ value, multiple, options, onChange, error, errorMessage, disabled, label, hideLabel, placeholder, required, name, id, searchable, allowClearAll, allowSelectAll, selectAllLabel, clearAllLabel, noResultsFoundMessage, onScrollEnd, isLoadingMore, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, density, ...props }: SelectProps) => JSX.Element;
|
|
3479
3485
|
|
|
3480
3486
|
export declare type SelectOption = Omit<PopUpMenuItem, 'id' | 'onClick' | 'disabled' | 'linkComponent' | 'as'> & {
|
|
3481
3487
|
/**
|
|
@@ -3518,6 +3524,17 @@ export declare type SelectProps = Union & {
|
|
|
3518
3524
|
* Whether to hide the label.
|
|
3519
3525
|
*/
|
|
3520
3526
|
hideLabel?: boolean;
|
|
3527
|
+
/**
|
|
3528
|
+
* Placeholder text shown when no option is selected.
|
|
3529
|
+
* Useful with `hideLabel` to provide a prompt like "Select an option".
|
|
3530
|
+
*/
|
|
3531
|
+
placeholder?: string;
|
|
3532
|
+
/**
|
|
3533
|
+
* Whether a selection is required. When `true`, the user cannot deselect
|
|
3534
|
+
* an already-selected option in single-select mode.
|
|
3535
|
+
* @default false
|
|
3536
|
+
*/
|
|
3537
|
+
required?: boolean;
|
|
3521
3538
|
/**
|
|
3522
3539
|
* The name of the select.
|
|
3523
3540
|
*/
|
|
@@ -3822,6 +3839,25 @@ export declare interface SkeletonProps extends React.HTMLAttributes<HTMLDivEleme
|
|
|
3822
3839
|
*/
|
|
3823
3840
|
export declare const Snackbar: default_2.FC<SnackbarProps>;
|
|
3824
3841
|
|
|
3842
|
+
export declare interface SnackbarAction {
|
|
3843
|
+
/**
|
|
3844
|
+
* The label shown in the action button.
|
|
3845
|
+
*/
|
|
3846
|
+
label: string;
|
|
3847
|
+
/**
|
|
3848
|
+
* Callback fired when the action button is clicked. Receives the snackbar
|
|
3849
|
+
* ID so you can programmatically dismiss or reference it.
|
|
3850
|
+
*/
|
|
3851
|
+
onClick?: (id: string) => void;
|
|
3852
|
+
/**
|
|
3853
|
+
* The Button visual variant.
|
|
3854
|
+
* @default 'text' for all actions except the last, which defaults to 'filled'
|
|
3855
|
+
*/
|
|
3856
|
+
variant?: SnackbarActionVariant;
|
|
3857
|
+
}
|
|
3858
|
+
|
|
3859
|
+
export declare type SnackbarActionVariant = NonNullable<ButtonProps['variant']>;
|
|
3860
|
+
|
|
3825
3861
|
export declare interface SnackbarItem {
|
|
3826
3862
|
/**
|
|
3827
3863
|
* Unique identifier for the snackbar
|
|
@@ -3851,12 +3887,22 @@ export declare interface SnackbarItem {
|
|
|
3851
3887
|
* Icon to display in the snackbar
|
|
3852
3888
|
*/
|
|
3853
3889
|
icon?: CommonIconNames | Omit<IconProps, 'size' | 'color'>;
|
|
3890
|
+
/**
|
|
3891
|
+
* Whether the icon is hidden.
|
|
3892
|
+
*/
|
|
3893
|
+
hideIcon: boolean;
|
|
3894
|
+
/**
|
|
3895
|
+
* Action buttons displayed in the snackbar.
|
|
3896
|
+
*/
|
|
3897
|
+
actions?: SnackbarAction[];
|
|
3854
3898
|
/**
|
|
3855
3899
|
* Label for the action button
|
|
3900
|
+
* @deprecated Use `actions` instead for flexible button styling.
|
|
3856
3901
|
*/
|
|
3857
3902
|
actionLabel?: string;
|
|
3858
3903
|
/**
|
|
3859
3904
|
* Action to perform when the action button is clicked
|
|
3905
|
+
* @deprecated Use `actions` instead for flexible button styling.
|
|
3860
3906
|
*/
|
|
3861
3907
|
onAction?: (id: string) => void;
|
|
3862
3908
|
/**
|
|
@@ -3891,12 +3937,26 @@ export declare interface SnackbarOptions {
|
|
|
3891
3937
|
* Icon to display in the Snackbar
|
|
3892
3938
|
*/
|
|
3893
3939
|
icon?: CommonIconNames | Omit<IconProps, 'size' | 'color'>;
|
|
3940
|
+
/**
|
|
3941
|
+
* Hide the icon entirely. Useful for compact snackbars like selection bars
|
|
3942
|
+
* where only a message and action buttons are needed.
|
|
3943
|
+
* @default false
|
|
3944
|
+
*/
|
|
3945
|
+
hideIcon?: boolean;
|
|
3946
|
+
/**
|
|
3947
|
+
* Action buttons displayed in the snackbar. Each action renders as a real
|
|
3948
|
+
* `<Button>` component with automatic variant defaults per snackbar variant.
|
|
3949
|
+
* Takes priority over `actionLabel`/`onAction` when both are provided.
|
|
3950
|
+
*/
|
|
3951
|
+
actions?: SnackbarAction[];
|
|
3894
3952
|
/**
|
|
3895
3953
|
* Label for the action button
|
|
3954
|
+
* @deprecated Use `actions` instead for flexible button styling.
|
|
3896
3955
|
*/
|
|
3897
3956
|
actionLabel?: string;
|
|
3898
3957
|
/**
|
|
3899
3958
|
* Action to perform when the action button is clicked
|
|
3959
|
+
* @deprecated Use `actions` instead for flexible button styling.
|
|
3900
3960
|
*/
|
|
3901
3961
|
onAction?: (id: string) => void;
|
|
3902
3962
|
/**
|
|
@@ -4092,6 +4152,8 @@ export declare type SubMenuLayer = {
|
|
|
4092
4152
|
|
|
4093
4153
|
export declare const Switch: default_2.ForwardRefExoticComponent<SwitchProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
4094
4154
|
|
|
4155
|
+
declare type SwitchLabelPlacement = 'left' | 'right';
|
|
4156
|
+
|
|
4095
4157
|
export declare interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
4096
4158
|
/**
|
|
4097
4159
|
* Whether the switch is checked.
|
|
@@ -4115,13 +4177,16 @@ export declare interface SwitchProps extends Omit<React.InputHTMLAttributes<HTML
|
|
|
4115
4177
|
label?: string | LabelStates;
|
|
4116
4178
|
/**
|
|
4117
4179
|
* The placement of the label.
|
|
4180
|
+
* Accepts a single value or a breakpoint object.
|
|
4118
4181
|
* @default 'left'
|
|
4119
4182
|
*/
|
|
4120
|
-
labelPlacement?:
|
|
4183
|
+
labelPlacement?: ResponsiveType<SwitchLabelPlacement>;
|
|
4121
4184
|
/**
|
|
4122
4185
|
* How the switch and label are aligned horizontally.
|
|
4186
|
+
* Accepts a single value or a breakpoint object.
|
|
4187
|
+
* @default 'flex-start'
|
|
4123
4188
|
*/
|
|
4124
|
-
justify?: JustifyContent
|
|
4189
|
+
justify?: ResponsiveType<JustifyContent>;
|
|
4125
4190
|
/**
|
|
4126
4191
|
* The value of the switch.
|
|
4127
4192
|
*/
|
|
@@ -4166,16 +4231,20 @@ export declare interface TableColumnProps extends React.HTMLAttributes<HTMLTable
|
|
|
4166
4231
|
id: string;
|
|
4167
4232
|
/**
|
|
4168
4233
|
* The alignment of the Table column.
|
|
4234
|
+
* Accepts a single value or a breakpoint object.
|
|
4235
|
+
* @default 'left'
|
|
4169
4236
|
*/
|
|
4170
|
-
align?: ColumnAlign
|
|
4237
|
+
align?: ResponsiveType<ColumnAlign>;
|
|
4171
4238
|
/**
|
|
4172
4239
|
* The width of the Table column.
|
|
4240
|
+
* Accepts a single value or a breakpoint object.
|
|
4173
4241
|
*/
|
|
4174
|
-
width?: string
|
|
4242
|
+
width?: ResponsiveType<string>;
|
|
4175
4243
|
/**
|
|
4176
4244
|
* The minimum width of the Table column.
|
|
4245
|
+
* Accepts a single value or a breakpoint object.
|
|
4177
4246
|
*/
|
|
4178
|
-
minWidth?: string
|
|
4247
|
+
minWidth?: ResponsiveType<string>;
|
|
4179
4248
|
/**
|
|
4180
4249
|
* If true, the column is orderable.
|
|
4181
4250
|
*/
|
|
@@ -4740,8 +4809,10 @@ export declare type TypographyProps<T extends TypographyElements = 'p'> = Omit<R
|
|
|
4740
4809
|
as?: 'p' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
4741
4810
|
/**
|
|
4742
4811
|
* The text alignment of the typography.
|
|
4812
|
+
* Accepts a single value or a breakpoint object.
|
|
4813
|
+
* @default 'left'
|
|
4743
4814
|
*/
|
|
4744
|
-
textAlign?: 'left' | 'center' | 'right'
|
|
4815
|
+
textAlign?: ResponsiveType<'left' | 'center' | 'right'>;
|
|
4745
4816
|
/**
|
|
4746
4817
|
* CSS text-transform property
|
|
4747
4818
|
*/
|
|
@@ -4752,25 +4823,30 @@ export declare type TypographyProps<T extends TypographyElements = 'p'> = Omit<R
|
|
|
4752
4823
|
color?: ForegroundColors;
|
|
4753
4824
|
/**
|
|
4754
4825
|
* If true, the text will be hyphenated based on the `lang` attribute of the parent element.
|
|
4826
|
+
* Accepts a single value or a breakpoint object.
|
|
4755
4827
|
* @default true
|
|
4756
4828
|
*/
|
|
4757
|
-
hyphenate?: boolean
|
|
4829
|
+
hyphenate?: ResponsiveType<boolean>;
|
|
4758
4830
|
/**
|
|
4759
4831
|
* Sets a specific amount of lines to show based on it's container.
|
|
4760
|
-
* The text that doesn't fit the container will be hidden and replaced by ellipsis
|
|
4832
|
+
* The text that doesn't fit the container will be hidden and replaced by ellipsis.
|
|
4833
|
+
* Accepts a single value or a breakpoint object.
|
|
4761
4834
|
*/
|
|
4762
|
-
truncate?: number
|
|
4835
|
+
truncate?: ResponsiveType<number>;
|
|
4763
4836
|
/**
|
|
4764
4837
|
* Controls whether text wraps at word boundaries or individual letters.
|
|
4765
4838
|
* Can be used with or without `truncate`. The `letter` value applies
|
|
4766
4839
|
* `word-break: break-all`.
|
|
4840
|
+
* Accepts a single value or a breakpoint object.
|
|
4767
4841
|
* @default 'word'
|
|
4768
4842
|
*/
|
|
4769
|
-
truncatedBy?: 'word' | 'letter'
|
|
4843
|
+
truncatedBy?: ResponsiveType<'word' | 'letter'>;
|
|
4770
4844
|
/**
|
|
4771
4845
|
* If true, the text will be wrapped.
|
|
4846
|
+
* Accepts a single value or a breakpoint object.
|
|
4847
|
+
* @default true
|
|
4772
4848
|
*/
|
|
4773
|
-
wrap?: boolean
|
|
4849
|
+
wrap?: ResponsiveType<boolean>;
|
|
4774
4850
|
};
|
|
4775
4851
|
|
|
4776
4852
|
export declare type TypographySize = 'sm' | 'md' | 'lg';
|
|
@@ -5576,6 +5652,10 @@ export declare interface UseSnackbarReturn {
|
|
|
5576
5652
|
* Show a snackbar message
|
|
5577
5653
|
*/
|
|
5578
5654
|
snackbar: (message: SnackbarItem['children'], options?: SnackbarOptions) => SnackbarItem['id'];
|
|
5655
|
+
/**
|
|
5656
|
+
* Update an existing snackbar's content and/or options in-place.
|
|
5657
|
+
*/
|
|
5658
|
+
update: (id: string, message: SnackbarItem['children'], options?: Partial<SnackbarOptions>) => void;
|
|
5579
5659
|
/**
|
|
5580
5660
|
* Dismiss a specific snackbar by ID
|
|
5581
5661
|
*/
|