@nice2dev/ui-mobile 1.2.1 → 1.3.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/index.cjs +14 -14
- package/dist/index.d.ts +18 -16
- package/dist/index.mjs +4139 -4410
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ import { ButtonHTMLAttributes } from 'react';
|
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
3
|
import { default as default_2 } from 'react';
|
|
4
4
|
import { HTMLAttributes } from 'react';
|
|
5
|
+
import { NiceKeyboardKey } from '@nice2dev/ui-core';
|
|
6
|
+
import { NiceKeyboardLanguage } from '@nice2dev/ui-core';
|
|
7
|
+
import { NiceKeyboardLanguageLayout } from '@nice2dev/ui-core';
|
|
8
|
+
import { NiceKeyboardMode } from '@nice2dev/ui-core';
|
|
5
9
|
import { PointerEvent as PointerEvent_2 } from 'react';
|
|
6
10
|
import { ReactNode } from 'react';
|
|
7
11
|
|
|
@@ -424,22 +428,18 @@ export declare function isTouch(): boolean;
|
|
|
424
428
|
export declare function isVibrationSupported(): boolean;
|
|
425
429
|
|
|
426
430
|
/** Supported language codes */
|
|
427
|
-
export declare type KeyboardLanguage =
|
|
431
|
+
export declare type KeyboardLanguage = NiceKeyboardLanguage;
|
|
428
432
|
|
|
429
433
|
export declare type KeyboardLayout = 'qwerty' | 'numeric' | 'numpad' | 'phone' | 'pin' | 'custom';
|
|
430
434
|
|
|
431
435
|
/** Display mode — from minimal (numbers-only) to full (QWERTY + number row + symbols + fn row) */
|
|
432
|
-
export declare type KeyboardMode =
|
|
436
|
+
export declare type KeyboardMode = NiceKeyboardMode;
|
|
433
437
|
|
|
434
438
|
declare type KeyboardRow = KeyDefinition[];
|
|
435
439
|
|
|
436
440
|
export declare type KeyboardTheme = 'light' | 'dark' | 'system';
|
|
437
441
|
|
|
438
|
-
export declare interface KeyDefinition {
|
|
439
|
-
value: string;
|
|
440
|
-
label?: string;
|
|
441
|
-
width?: number;
|
|
442
|
-
type?: 'char' | 'space' | 'backspace' | 'enter' | 'shift' | 'special' | 'fn' | 'tab' | 'caps' | 'lang';
|
|
442
|
+
export declare interface KeyDefinition extends NiceKeyboardKey {
|
|
443
443
|
icon?: default_2.ReactNode;
|
|
444
444
|
}
|
|
445
445
|
|
|
@@ -449,15 +449,7 @@ export declare interface KeyDefinition {
|
|
|
449
449
|
declare type LabelDisplay = 'auto' | 'on' | 'off';
|
|
450
450
|
|
|
451
451
|
/** Language layout definition */
|
|
452
|
-
export declare
|
|
453
|
-
code: KeyboardLanguage;
|
|
454
|
-
name: string;
|
|
455
|
-
nativeName: string;
|
|
456
|
-
/** Main letter rows (3 rows for QWERTY-like) */
|
|
457
|
-
rows: [string[], string[], string[]];
|
|
458
|
-
/** Extra chars available via long-press or special layer */
|
|
459
|
-
accents?: Record<string, string[]>;
|
|
460
|
-
}
|
|
452
|
+
export declare type LanguageLayout = NiceKeyboardLanguageLayout;
|
|
461
453
|
|
|
462
454
|
/**
|
|
463
455
|
* Line cap style
|
|
@@ -2578,6 +2570,11 @@ export declare const SwipeActionPresets: {
|
|
|
2578
2570
|
export declare interface SwipeActionsAction {
|
|
2579
2571
|
id: string;
|
|
2580
2572
|
label: string;
|
|
2573
|
+
/**
|
|
2574
|
+
* Translation key for `label`: the button shows `t(labelKey, label)`, so `label` is the
|
|
2575
|
+
* English default. The presets set it (`swipeActions.<id>`).
|
|
2576
|
+
*/
|
|
2577
|
+
labelKey?: string;
|
|
2581
2578
|
icon?: ReactNode;
|
|
2582
2579
|
color?: string;
|
|
2583
2580
|
background?: string;
|
|
@@ -2637,6 +2634,11 @@ export declare interface TabItem {
|
|
|
2637
2634
|
id: string;
|
|
2638
2635
|
/** Tab label */
|
|
2639
2636
|
label: string;
|
|
2637
|
+
/**
|
|
2638
|
+
* Translation key for `label`: the tab shows `t(labelKey, label)`, so `label` is the English
|
|
2639
|
+
* default. The presets set it (`mobileTabs.preset.<id>`).
|
|
2640
|
+
*/
|
|
2641
|
+
labelKey?: string;
|
|
2640
2642
|
/** Tab icon (active state uses same if no activeIcon) */
|
|
2641
2643
|
icon: ReactNode;
|
|
2642
2644
|
/** Icon when tab is active (optional) */
|