@nice2dev/ui-mobile 1.2.0 → 1.2.2
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.cjs +22 -22
- package/dist/index.d.ts +38 -18
- package/dist/index.mjs +5389 -5793
- package/dist/ui-mobile.css +1 -1
- package/package.json +5 -1
package/dist/index.d.ts
CHANGED
|
@@ -403,7 +403,7 @@ export declare type InfiniteScrollStatus = 'idle' | 'loading' | 'success' | 'err
|
|
|
403
403
|
/**
|
|
404
404
|
* iOS-style navigation bar with large title
|
|
405
405
|
*/
|
|
406
|
-
export declare const IOSHeader: default_2.ForwardRefExoticComponent<Omit<NiceMobileHeaderProps, "
|
|
406
|
+
export declare const IOSHeader: default_2.ForwardRefExoticComponent<Omit<NiceMobileHeaderProps, "mode" | "variant"> & default_2.RefAttributes<HTMLElement>>;
|
|
407
407
|
|
|
408
408
|
/** iOS-style activity indicator */
|
|
409
409
|
export declare const IOSIndicator: default_2.FC<PullToRefreshIndicatorProps>;
|
|
@@ -479,7 +479,7 @@ export declare interface LongPressEvent {
|
|
|
479
479
|
/**
|
|
480
480
|
* Material Design app bar
|
|
481
481
|
*/
|
|
482
|
-
export declare const MaterialHeader: default_2.ForwardRefExoticComponent<Omit<NiceMobileHeaderProps, "
|
|
482
|
+
export declare const MaterialHeader: default_2.ForwardRefExoticComponent<Omit<NiceMobileHeaderProps, "mode" | "variant"> & default_2.RefAttributes<HTMLElement>>;
|
|
483
483
|
|
|
484
484
|
/** Material Design circular progress */
|
|
485
485
|
export declare const MaterialIndicator: default_2.FC<PullToRefreshIndicatorProps>;
|
|
@@ -560,7 +560,9 @@ export declare interface MobileTabsContextValue {
|
|
|
560
560
|
*/
|
|
561
561
|
export declare type ModalSnapPoint = number | 'content' | 'full';
|
|
562
562
|
|
|
563
|
-
export declare const NiceBottomSheet: default_2.ForwardRefExoticComponent<NiceBottomSheetProps & default_2.RefAttributes<NiceBottomSheetRef
|
|
563
|
+
export declare const NiceBottomSheet: default_2.ForwardRefExoticComponent<NiceBottomSheetProps & default_2.RefAttributes<NiceBottomSheetRef>> & {
|
|
564
|
+
displayName: string;
|
|
565
|
+
};
|
|
564
566
|
|
|
565
567
|
export declare interface NiceBottomSheetProps {
|
|
566
568
|
/** Sheet content */
|
|
@@ -853,11 +855,13 @@ export declare function NiceHide({ on, above, below, device, orientation, childr
|
|
|
853
855
|
*/
|
|
854
856
|
export declare type NiceHideProps = Omit<NiceShowProps, 'fallback'>;
|
|
855
857
|
|
|
856
|
-
export declare const NiceImageGallery: default_2.ForwardRefExoticComponent<NiceImageGalleryProps & default_2.RefAttributes<NiceImageGalleryRef
|
|
858
|
+
export declare const NiceImageGallery: default_2.ForwardRefExoticComponent<NiceImageGalleryProps & default_2.RefAttributes<NiceImageGalleryRef>> & {
|
|
859
|
+
displayName: string;
|
|
860
|
+
};
|
|
857
861
|
|
|
858
862
|
export declare interface NiceImageGalleryProps {
|
|
859
863
|
/** Gallery images */
|
|
860
|
-
items
|
|
864
|
+
items?: ImageGalleryItem[];
|
|
861
865
|
/** Currently selected image index */
|
|
862
866
|
selectedIndex?: number;
|
|
863
867
|
/** Called when image changes */
|
|
@@ -918,7 +922,7 @@ export declare const NiceInfiniteScroll: <T>(props: NiceInfiniteScrollProps<T> &
|
|
|
918
922
|
|
|
919
923
|
export declare interface NiceInfiniteScrollProps<T = unknown> {
|
|
920
924
|
/** Items to display */
|
|
921
|
-
items
|
|
925
|
+
items?: T[];
|
|
922
926
|
/** Render function for each item */
|
|
923
927
|
renderItem: (item: T, index: number) => ReactNode;
|
|
924
928
|
/** Function to fetch more items */
|
|
@@ -972,7 +976,7 @@ export declare interface NiceInfiniteScrollProps<T = unknown> {
|
|
|
972
976
|
export declare const NiceMobileActionSheet: default_2.ForwardRefExoticComponent<NiceMobileActionSheetProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
973
977
|
|
|
974
978
|
export declare interface NiceMobileActionSheetProps extends Omit<NiceMobileModalProps, 'children'> {
|
|
975
|
-
actions
|
|
979
|
+
actions?: ActionSheetAction[];
|
|
976
980
|
cancelLabel?: string;
|
|
977
981
|
}
|
|
978
982
|
|
|
@@ -1083,7 +1087,9 @@ export declare interface NiceMobileDatePickerProps extends Omit<NiceMobilePicker
|
|
|
1083
1087
|
*/
|
|
1084
1088
|
export declare const NiceMobileDraggable: default_2.ForwardRefExoticComponent<Omit<NiceGesturesProps, "enablePan" | "applyTransform"> & default_2.RefAttributes<HTMLDivElement>>;
|
|
1085
1089
|
|
|
1086
|
-
export declare const NiceMobileDrawer: default_2.ForwardRefExoticComponent<NiceMobileDrawerProps & default_2.RefAttributes<HTMLDivElement
|
|
1090
|
+
export declare const NiceMobileDrawer: default_2.ForwardRefExoticComponent<NiceMobileDrawerProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
1091
|
+
displayName: string;
|
|
1092
|
+
};
|
|
1087
1093
|
|
|
1088
1094
|
export declare interface NiceMobileDrawerProps {
|
|
1089
1095
|
/** Whether drawer is open */
|
|
@@ -1354,7 +1360,7 @@ export declare const NiceMobilePicker: default_2.ForwardRefExoticComponent<NiceM
|
|
|
1354
1360
|
*/
|
|
1355
1361
|
export declare interface NiceMobilePickerProps<T = Record<string, unknown>> extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
1356
1362
|
/** Columns configuration */
|
|
1357
|
-
columns
|
|
1363
|
+
columns?: PickerColumn[];
|
|
1358
1364
|
/** Current values (keyed by column id) */
|
|
1359
1365
|
value?: T;
|
|
1360
1366
|
/** Default values */
|
|
@@ -1421,7 +1427,7 @@ export declare const NiceMobileTabs: default_2.ForwardRefExoticComponent<NiceMob
|
|
|
1421
1427
|
*/
|
|
1422
1428
|
export declare interface NiceMobileTabsProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
1423
1429
|
/** Tab items */
|
|
1424
|
-
tabs
|
|
1430
|
+
tabs?: TabItem[];
|
|
1425
1431
|
/** Active tab ID */
|
|
1426
1432
|
activeTab?: string;
|
|
1427
1433
|
/** Default active tab (uncontrolled) */
|
|
@@ -1502,7 +1508,7 @@ export declare const NicePickerColumn: <T = string>(props: NicePickerColumnProps
|
|
|
1502
1508
|
* Single column props
|
|
1503
1509
|
*/
|
|
1504
1510
|
export declare interface NicePickerColumnProps<T = unknown> extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
1505
|
-
items
|
|
1511
|
+
items?: PickerItem<T>[];
|
|
1506
1512
|
value?: T;
|
|
1507
1513
|
defaultValue?: T;
|
|
1508
1514
|
onChange?: (value: T, item: PickerItem<T>) => void;
|
|
@@ -1519,7 +1525,9 @@ export declare const NicePinchZoom: default_2.ForwardRefExoticComponent<Omit<Nic
|
|
|
1519
1525
|
|
|
1520
1526
|
export declare const NicePINKeyboard: default_2.ForwardRefExoticComponent<Omit<NiceTouchKeyboardProps, "layout" | "masked"> & default_2.RefAttributes<HTMLDivElement>>;
|
|
1521
1527
|
|
|
1522
|
-
declare const NicePullToRefresh: default_2.ForwardRefExoticComponent<NicePullToRefreshProps & default_2.RefAttributes<HTMLDivElement
|
|
1528
|
+
declare const NicePullToRefresh: default_2.ForwardRefExoticComponent<NicePullToRefreshProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
1529
|
+
displayName: string;
|
|
1530
|
+
};
|
|
1523
1531
|
export { NicePullToRefresh as NiceMobilePullToRefresh }
|
|
1524
1532
|
export { NicePullToRefresh }
|
|
1525
1533
|
|
|
@@ -1674,7 +1682,9 @@ export { NiceSignaturePadProps as NiceTouchSignaturePadProps }
|
|
|
1674
1682
|
*/
|
|
1675
1683
|
export declare const NiceSwipeable: default_2.ForwardRefExoticComponent<Omit<NiceGesturesProps, "enableSwipe"> & default_2.RefAttributes<HTMLDivElement>>;
|
|
1676
1684
|
|
|
1677
|
-
export declare const NiceSwipeActions: default_2.ForwardRefExoticComponent<NiceSwipeActionsProps & default_2.RefAttributes<HTMLDivElement
|
|
1685
|
+
export declare const NiceSwipeActions: default_2.ForwardRefExoticComponent<NiceSwipeActionsProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
1686
|
+
displayName: string;
|
|
1687
|
+
};
|
|
1678
1688
|
|
|
1679
1689
|
export declare interface NiceSwipeActionsProps {
|
|
1680
1690
|
/** Content to wrap */
|
|
@@ -1742,7 +1752,7 @@ export declare const NiceTouchActionSheet: default_2.ForwardRefExoticComponent<N
|
|
|
1742
1752
|
*/
|
|
1743
1753
|
export declare interface NiceTouchActionSheetProps extends HTMLAttributes<HTMLDivElement> {
|
|
1744
1754
|
/** Sheet items */
|
|
1745
|
-
items
|
|
1755
|
+
items?: TouchMenuItem[];
|
|
1746
1756
|
/** Open state */
|
|
1747
1757
|
open: boolean;
|
|
1748
1758
|
/** Close handler */
|
|
@@ -2113,7 +2123,7 @@ export declare const NiceTouchMenuPopover: default_2.ForwardRefExoticComponent<N
|
|
|
2113
2123
|
*/
|
|
2114
2124
|
export declare interface NiceTouchMenuPopoverProps extends HTMLAttributes<HTMLDivElement> {
|
|
2115
2125
|
/** Menu items */
|
|
2116
|
-
items
|
|
2126
|
+
items?: TouchMenuItem[];
|
|
2117
2127
|
/** Open state */
|
|
2118
2128
|
open: boolean;
|
|
2119
2129
|
/** Position */
|
|
@@ -2129,7 +2139,7 @@ export declare interface NiceTouchMenuPopoverProps extends HTMLAttributes<HTMLDi
|
|
|
2129
2139
|
*/
|
|
2130
2140
|
export declare interface NiceTouchMenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'contextMenu' | 'onClick'> {
|
|
2131
2141
|
/** Menu items */
|
|
2132
|
-
items
|
|
2142
|
+
items?: TouchMenuItem[];
|
|
2133
2143
|
/** Trigger element */
|
|
2134
2144
|
trigger: ReactNode;
|
|
2135
2145
|
/** Trigger on long press */
|
|
@@ -2310,9 +2320,9 @@ export declare const NiceTouchTable: <T>(props: NiceTouchTableProps<T> & {
|
|
|
2310
2320
|
*/
|
|
2311
2321
|
export declare interface NiceTouchTableProps<T = any> extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
2312
2322
|
/** Table data */
|
|
2313
|
-
data
|
|
2323
|
+
data?: T[];
|
|
2314
2324
|
/** Column definitions */
|
|
2315
|
-
columns
|
|
2325
|
+
columns?: TouchTableColumn<T>[];
|
|
2316
2326
|
/** Row key accessor */
|
|
2317
2327
|
rowKey: keyof T | ((row: T) => string | number);
|
|
2318
2328
|
/** Left swipe actions */
|
|
@@ -2568,6 +2578,11 @@ export declare const SwipeActionPresets: {
|
|
|
2568
2578
|
export declare interface SwipeActionsAction {
|
|
2569
2579
|
id: string;
|
|
2570
2580
|
label: string;
|
|
2581
|
+
/**
|
|
2582
|
+
* Translation key for `label`: the button shows `t(labelKey, label)`, so `label` is the
|
|
2583
|
+
* English default. The presets set it (`swipeActions.<id>`).
|
|
2584
|
+
*/
|
|
2585
|
+
labelKey?: string;
|
|
2571
2586
|
icon?: ReactNode;
|
|
2572
2587
|
color?: string;
|
|
2573
2588
|
background?: string;
|
|
@@ -2627,6 +2642,11 @@ export declare interface TabItem {
|
|
|
2627
2642
|
id: string;
|
|
2628
2643
|
/** Tab label */
|
|
2629
2644
|
label: string;
|
|
2645
|
+
/**
|
|
2646
|
+
* Translation key for `label`: the tab shows `t(labelKey, label)`, so `label` is the English
|
|
2647
|
+
* default. The presets set it (`mobileTabs.preset.<id>`).
|
|
2648
|
+
*/
|
|
2649
|
+
labelKey?: string;
|
|
2630
2650
|
/** Tab icon (active state uses same if no activeIcon) */
|
|
2631
2651
|
icon: ReactNode;
|
|
2632
2652
|
/** Icon when tab is active (optional) */
|