@nice2dev/ui 1.0.8 → 1.0.10
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/NiceErrorBoundary-B5nF-OVn.cjs +1 -0
- package/dist/NiceErrorBoundary-D75yr_WE.js +762 -0
- package/dist/NiceForm-CKoJA6NG.js +5131 -0
- package/dist/NiceForm-D7xnpnRJ.cjs +382 -0
- package/dist/NiceForm.css +1 -0
- package/dist/NiceModal-1QX7NhyH.js +95 -0
- package/dist/NiceModal-CAwsKVQ2.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-C9xMSjOF.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-CMrPbSw9.js +5249 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -0
- package/dist/NicePagination-DbE-uOkl.js +171 -0
- package/dist/NicePagination-DlealakT.cjs +1 -0
- package/dist/NicePinCodeInput-B8cI8zu8.js +11830 -0
- package/dist/NicePinCodeInput-SGQaHvpE.cjs +419 -0
- package/dist/NicePinCodeInput.css +1 -1
- package/dist/NiceSavedQueryPanel-CZ5bYOe_.js +6449 -0
- package/dist/NiceSavedQueryPanel-Ce2s060j.cjs +596 -0
- package/dist/NiceTabs-DvOmxKyQ.cjs +1 -0
- package/dist/NiceTabs-DzLHzwuA.js +1636 -0
- package/dist/NiceWindow-CVgkxcCz.cjs +1 -0
- package/dist/NiceWindow-DeC83yfE.js +1409 -0
- package/dist/charts-BAS21jkC.js +4621 -0
- package/dist/charts-DShUbWrP.cjs +759 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.d.ts +42 -45
- package/dist/charts.mjs +1 -1
- package/dist/core-C2ZmWe_u.cjs +96 -0
- package/dist/core-Da43q-pO.js +22094 -0
- package/dist/data-branching-CJlrg8qf.cjs +1 -0
- package/dist/data-branching-DCUwI53s.js +6121 -0
- package/dist/data-branching.cjs +1 -1
- package/dist/data-branching.d.ts +1 -38
- package/dist/data-branching.mjs +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +206 -192
- package/dist/data.mjs +1 -1
- package/dist/devops-CXynFG3X.cjs +17 -0
- package/dist/devops-D0TfzV5B.js +7660 -0
- package/dist/devops.cjs +1 -1
- package/dist/devops.d.ts +1 -38
- package/dist/devops.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.d.ts +311 -393
- package/dist/editors.mjs +61 -64
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.d.ts +3 -44
- package/dist/feedback.mjs +11 -10
- package/dist/index-B8wxZ8Ps.cjs +5192 -0
- package/dist/index-pAuGTbuB.js +57319 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2248 -11140
- package/dist/index.mjs +880 -1018
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.d.ts +7 -39
- package/dist/lazy.mjs +24 -24
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +151 -216
- package/dist/navigation.mjs +46 -40
- package/dist/no-code-B5bzduNP.cjs +332 -0
- package/dist/no-code-D8RJ7lx0.js +7064 -0
- package/dist/no-code.cjs +1 -1
- package/dist/no-code.d.ts +1 -38
- package/dist/no-code.mjs +1 -1
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.d.ts +13 -45
- package/dist/overlays.mjs +260 -250
- package/package.json +4 -2
package/dist/editors.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { default as default_2 } from 'react';
|
|
2
2
|
import { ForwardRefExoticComponent } from 'react';
|
|
3
|
+
import { NiceBaseProps } from '@nice2dev/ui-core';
|
|
4
|
+
import { NiceDataSource } from '@nice2dev/ui-core';
|
|
5
|
+
import { NiceEditorSize } from '@nice2dev/ui-core';
|
|
6
|
+
import { NiceFormFieldProps } from '@nice2dev/ui-core';
|
|
7
|
+
import { NiceOption } from '@nice2dev/ui-core';
|
|
8
|
+
import { NiceSize } from '@nice2dev/ui-core';
|
|
3
9
|
import { RefAttributes } from 'react';
|
|
10
|
+
import { TracelessMode } from '@nice2dev/ui-core';
|
|
4
11
|
|
|
5
12
|
/** An accounting account entry. */
|
|
6
13
|
declare interface AccountEntry {
|
|
@@ -209,16 +216,10 @@ declare interface LineAnnotation extends AnnotationBase {
|
|
|
209
216
|
endY: number;
|
|
210
217
|
}
|
|
211
218
|
|
|
212
|
-
declare
|
|
219
|
+
export declare const MASK_PRESETS: Record<NiceMaskPreset, string>;
|
|
213
220
|
|
|
214
|
-
/**
|
|
215
|
-
|
|
216
|
-
* - `'full'` — fully interactive (default)
|
|
217
|
-
* - `'readOnly'` — renders but cannot be edited
|
|
218
|
-
* - `'disabled'` — renders greyed-out
|
|
219
|
-
* - `'hidden'` — not rendered at all
|
|
220
|
-
*/
|
|
221
|
-
declare type NiceAccessMode = 'full' | 'readOnly' | 'disabled' | 'hidden';
|
|
221
|
+
/** All built-in style preset keys (export for convenience when populating the `presets` prop). */
|
|
222
|
+
export declare const NICE_COLOR_PRESET_KEYS: NiceColorPreset[];
|
|
222
223
|
|
|
223
224
|
/**
|
|
224
225
|
* {@link NiceAccountPicker} — Accounting account selector with search,
|
|
@@ -298,28 +299,6 @@ export declare interface NiceAutocompleteProps extends NiceFormFieldProps {
|
|
|
298
299
|
suggestions?: (string | NiceOption)[];
|
|
299
300
|
}
|
|
300
301
|
|
|
301
|
-
/** Base props inherited by every NiceToDev component. */
|
|
302
|
-
declare interface NiceBaseProps {
|
|
303
|
-
/** Additional CSS class name(s). */
|
|
304
|
-
className?: string;
|
|
305
|
-
/** Inline style object. */
|
|
306
|
-
style?: React.CSSProperties;
|
|
307
|
-
/** HTML `id` attribute. When omitted a stable auto-generated id is used. */
|
|
308
|
-
id?: string;
|
|
309
|
-
/** Tooltip text shown on hover. */
|
|
310
|
-
title?: string;
|
|
311
|
-
/** Test identifier for integration / e2e test selectors. */
|
|
312
|
-
'data-testid'?: string;
|
|
313
|
-
/** Controls component visibility and interaction — see {@link NiceAccessMode}. */
|
|
314
|
-
accessMode?: NiceAccessMode;
|
|
315
|
-
/**
|
|
316
|
-
* Visual presentation style override.
|
|
317
|
-
* When set, overrides the global `displayStyle` from `NiceThemeProvider`.
|
|
318
|
-
* @see NiceDisplayStyle
|
|
319
|
-
*/
|
|
320
|
-
displayStyle?: NiceDisplayStyle;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
302
|
export declare const NiceCalendar: default_2.FC<NiceCalendarProps>;
|
|
324
303
|
|
|
325
304
|
/** Props for the {@link NiceCalendar} component — an inline month calendar with day/month/year views and multi-select support. */
|
|
@@ -345,31 +324,12 @@ export declare interface NiceCalendarProps extends NiceBaseProps, TracelessStora
|
|
|
345
324
|
showKeyboardHints?: boolean;
|
|
346
325
|
/** Persist view preferences (requires Traceless storage props) */
|
|
347
326
|
persistPreferences?: boolean;
|
|
327
|
+
/** When true, the calendar fills the available horizontal space of its container. Default false (sized to content). */
|
|
328
|
+
fullWidth?: boolean;
|
|
348
329
|
}
|
|
349
330
|
|
|
350
331
|
export declare type NiceCalendarView = 'days' | 'months' | 'years' | 'decade';
|
|
351
332
|
|
|
352
|
-
/** A cascading option node with optional children for {@link NiceCascadeSelect}. */
|
|
353
|
-
export declare interface NiceCascadeOption {
|
|
354
|
-
label: string;
|
|
355
|
-
value: string;
|
|
356
|
-
children?: NiceCascadeOption[];
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
export declare const NiceCascadeSelect: default_2.ForwardRefExoticComponent<NiceCascadeSelectProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
360
|
-
|
|
361
|
-
/** Props for the {@link NiceCascadeSelect} component — a hierarchical dropdown (province → city → district). */
|
|
362
|
-
export declare interface NiceCascadeSelectProps extends NiceBaseProps {
|
|
363
|
-
options: NiceCascadeOption[];
|
|
364
|
-
value?: string[];
|
|
365
|
-
onChange?: (path: string[]) => void;
|
|
366
|
-
placeholder?: string;
|
|
367
|
-
disabled?: boolean;
|
|
368
|
-
size?: NiceSize;
|
|
369
|
-
optionLabel?: string;
|
|
370
|
-
optionValue?: string;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
333
|
export declare const NiceCheckbox: default_2.ForwardRefExoticComponent<NiceCheckboxProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
374
334
|
|
|
375
335
|
/** Props for the {@link NiceCheckbox} component. */
|
|
@@ -390,8 +350,24 @@ export declare interface NiceCheckboxProps extends NiceBaseProps {
|
|
|
390
350
|
name?: string;
|
|
391
351
|
/** Validation error message. */
|
|
392
352
|
error?: string;
|
|
353
|
+
/** Assistive text shown below the field. */
|
|
354
|
+
helperText?: string;
|
|
355
|
+
/** Marks the field as required. */
|
|
356
|
+
required?: boolean;
|
|
357
|
+
/** Read-only mode. */
|
|
358
|
+
readOnly?: boolean;
|
|
359
|
+
/** Shows a loading spinner inside the control and disables interaction. */
|
|
360
|
+
loading?: boolean;
|
|
393
361
|
/** Show keyboard shortcuts hint. */
|
|
394
362
|
showKeyboardHints?: boolean;
|
|
363
|
+
/** Label position: 'right' (default — to the right of the box) or 'left'. */
|
|
364
|
+
labelPlacement?: 'right' | 'left';
|
|
365
|
+
/** Error/validation position: 'bottom' (default) or 'right'. */
|
|
366
|
+
errorPlacement?: 'bottom' | 'right';
|
|
367
|
+
/** Explicit width for the label column when labelPlacement is 'left'. */
|
|
368
|
+
labelWidth?: string | number;
|
|
369
|
+
/** Explicit width for the control column. */
|
|
370
|
+
controlWidth?: string | number;
|
|
395
371
|
}
|
|
396
372
|
|
|
397
373
|
declare interface NiceCodeCompletionItem {
|
|
@@ -644,7 +620,7 @@ declare interface NiceCodeMarker {
|
|
|
644
620
|
severity: 1 | 2 | 4 | 8;
|
|
645
621
|
}
|
|
646
622
|
|
|
647
|
-
declare type NiceCodeTheme = 'vs' | 'vs-dark' | 'hc-black' | 'hc-light';
|
|
623
|
+
declare type NiceCodeTheme = 'vs' | 'vs-dark' | 'hc-black' | 'hc-light' | 'auto';
|
|
648
624
|
|
|
649
625
|
export declare const NiceColorPalette: default_2.ForwardRefExoticComponent<NiceColorPaletteProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
650
626
|
|
|
@@ -677,6 +653,8 @@ export declare interface NiceColorPaletteProps extends NiceBaseProps {
|
|
|
677
653
|
showInfo?: boolean;
|
|
678
654
|
/** Show preset gallery */
|
|
679
655
|
showPresets?: boolean;
|
|
656
|
+
/** List of preset keys to display in the gallery. Defaults to an empty array (no preset cards shown). */
|
|
657
|
+
presets?: NiceColorPreset[];
|
|
680
658
|
/** Show variations (tints/shades) */
|
|
681
659
|
showVariations?: boolean;
|
|
682
660
|
/** Show random palette button */
|
|
@@ -697,6 +675,9 @@ export declare interface NiceColorPickerProps extends NiceFormFieldProps {
|
|
|
697
675
|
presets?: string[];
|
|
698
676
|
showInput?: boolean;
|
|
699
677
|
showRandom?: boolean;
|
|
678
|
+
/** When true, the popup includes an alpha (transparency) slider and the
|
|
679
|
+
* emitted value uses 8-character hex `#RRGGBBAA`. Default: `false`. */
|
|
680
|
+
withAlpha?: boolean;
|
|
700
681
|
}
|
|
701
682
|
|
|
702
683
|
declare type NiceColorPreset = 'lightest-pastel' | 'bright-pastel' | 'shiny' | 'pastel' | 'full' | 'dark' | 'deep' | 'muted' | 'earth';
|
|
@@ -729,9 +710,22 @@ export declare interface NiceContactPickerProps extends NiceFormFieldProps {
|
|
|
729
710
|
maxSelections?: number;
|
|
730
711
|
}
|
|
731
712
|
|
|
713
|
+
/** Built-in countdown format presets. */
|
|
714
|
+
declare type NiceCountdownFormat =
|
|
715
|
+
/** `1d 02:34:15` / `02:34:15` — leading day count + clock */
|
|
716
|
+
'verbose'
|
|
717
|
+
/** `1d 2h 34m 15s` — abbreviated units */
|
|
718
|
+
| 'compact'
|
|
719
|
+
/** `2:34:15` / `34:15` — pure clock */
|
|
720
|
+
| 'short'
|
|
721
|
+
/** `in 2h` / `in 5m` / `in 30s` — single coarsest unit */
|
|
722
|
+
| 'minimal'
|
|
723
|
+
/** `1 day, 2 hours, 34 minutes` — verbose words */
|
|
724
|
+
| 'words';
|
|
725
|
+
|
|
732
726
|
export declare const NiceCountryPicker: default_2.FC<NiceCountryPickerProps>;
|
|
733
727
|
|
|
734
|
-
export declare interface NiceCountryPickerProps {
|
|
728
|
+
export declare interface NiceCountryPickerProps extends NiceFormFieldProps {
|
|
735
729
|
/** Selected country code */
|
|
736
730
|
value?: string;
|
|
737
731
|
/** Default country code (uncontrolled) */
|
|
@@ -748,8 +742,6 @@ export declare interface NiceCountryPickerProps {
|
|
|
748
742
|
showDialCode?: boolean;
|
|
749
743
|
/** Show flag */
|
|
750
744
|
showFlag?: boolean;
|
|
751
|
-
/** Disabled state */
|
|
752
|
-
disabled?: boolean;
|
|
753
745
|
/** Filter to only show certain countries */
|
|
754
746
|
countries?: string[];
|
|
755
747
|
/** Priority countries shown at top */
|
|
@@ -758,10 +750,6 @@ export declare interface NiceCountryPickerProps {
|
|
|
758
750
|
allowClear?: boolean;
|
|
759
751
|
/** Size variant */
|
|
760
752
|
size?: NiceSize;
|
|
761
|
-
/** Extra class name */
|
|
762
|
-
className?: string;
|
|
763
|
-
/** Inline styles */
|
|
764
|
-
style?: default_2.CSSProperties;
|
|
765
753
|
/** Test ID */
|
|
766
754
|
'data-testid'?: string;
|
|
767
755
|
}
|
|
@@ -799,6 +787,12 @@ export declare interface NiceCropEditorProps {
|
|
|
799
787
|
showGrid?: boolean;
|
|
800
788
|
/** Crop overlay color */
|
|
801
789
|
overlayColor?: string;
|
|
790
|
+
/** Position of the controls toolbar relative to the image. Default: 'bottom'. */
|
|
791
|
+
toolbarPosition?: 'top' | 'bottom' | 'left' | 'right';
|
|
792
|
+
/** When true, the toolbar can be collapsed via a toggle button. Default: false. */
|
|
793
|
+
toolbarCollapsible?: boolean;
|
|
794
|
+
/** Initial collapsed state when `toolbarCollapsible` is true. Default: false. */
|
|
795
|
+
defaultToolbarCollapsed?: boolean;
|
|
802
796
|
/** Callback when crop changes */
|
|
803
797
|
onChange?: (result: CropResult) => void;
|
|
804
798
|
/** Extra class name */
|
|
@@ -842,53 +836,46 @@ export declare interface NiceCurrencyInputProps extends NiceFormFieldProps {
|
|
|
842
836
|
onBlur?: (e: default_2.FocusEvent<HTMLInputElement>) => void;
|
|
843
837
|
}
|
|
844
838
|
|
|
845
|
-
/**
|
|
846
|
-
|
|
847
|
-
* All data-bound components (NiceDataGrid, NiceList, NiceForm, etc.) accept a `NiceDataSource`.
|
|
848
|
-
* Create one via `createArrayDataSource`, `createRestDataSource`, `createODataDataSource`,
|
|
849
|
-
* `createGraphQLDataSource`, or `createCustomDataSource`.
|
|
850
|
-
*/
|
|
851
|
-
declare interface NiceDataSource<T = any> {
|
|
852
|
-
/** Field name used as unique row key. */
|
|
853
|
-
readonly keyField: string;
|
|
854
|
-
/** True when insert/update/remove are available. */
|
|
855
|
-
readonly writable: boolean;
|
|
856
|
-
load(options?: NiceLoadOptions): Promise<NiceLoadResult<T>>;
|
|
857
|
-
byKey(key: unknown): Promise<T | undefined>;
|
|
858
|
-
insert?(item: Partial<T>): Promise<T>;
|
|
859
|
-
update?(key: unknown, changes: Partial<T>): Promise<T>;
|
|
860
|
-
remove?(key: unknown): Promise<void>;
|
|
861
|
-
on<K extends keyof NiceDataSourceEventMap>(event: K, handler: Listener<NiceDataSourceEventMap[K]>): () => void;
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
/** Events emitted by all NiceDataSource implementations. */
|
|
865
|
-
declare type NiceDataSourceEventMap = {
|
|
866
|
-
changed: [];
|
|
867
|
-
loading: [boolean];
|
|
868
|
-
error: [Error | null];
|
|
869
|
-
loaded: [NiceLoadResult<unknown>];
|
|
870
|
-
};
|
|
839
|
+
/** Predefined date-format presets. */
|
|
840
|
+
export declare type NiceDateFormatPreset = 'date-local' | 'date-utc' | 'datetime-local' | 'datetime-utc' | 'month-local' | 'month-utc' | 'week' | 'time';
|
|
871
841
|
|
|
872
842
|
export declare const NiceDatePicker: default_2.ForwardRefExoticComponent<NiceDatePickerProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
873
843
|
|
|
874
|
-
/** Props for the {@link NiceDatePicker} component — a
|
|
844
|
+
/** Props for the {@link NiceDatePicker} component — a masked, locale-aware date/time input. */
|
|
875
845
|
export declare interface NiceDatePickerProps extends NiceFormFieldProps {
|
|
876
|
-
/** ISO
|
|
846
|
+
/** ISO value (e.g. `'2024-06-15'`). Always ISO regardless of display locale. */
|
|
877
847
|
value?: string;
|
|
878
|
-
/** Fires with the new ISO
|
|
848
|
+
/** Fires with the new ISO value. Empty string while the input is incomplete. */
|
|
879
849
|
onChange?: (value: string) => void;
|
|
880
850
|
/** Native blur handler. */
|
|
881
851
|
onBlur?: (e: default_2.FocusEvent<HTMLInputElement>) => void;
|
|
882
852
|
/** Native keydown handler. */
|
|
883
853
|
onKeyDown?: (e: default_2.KeyboardEvent<HTMLInputElement>) => void;
|
|
884
|
-
/** Minimum selectable date. */
|
|
854
|
+
/** Minimum selectable date (passed to the hidden native picker). */
|
|
885
855
|
min?: string;
|
|
886
|
-
/** Maximum selectable date. */
|
|
856
|
+
/** Maximum selectable date (passed to the hidden native picker). */
|
|
887
857
|
max?: string;
|
|
888
|
-
/**
|
|
858
|
+
/**
|
|
859
|
+
* @deprecated Use `dateFormatPreset` instead.
|
|
860
|
+
* Input type — `'date'`, `'datetime-local'`, `'time'`, `'month'`, or `'week'`.
|
|
861
|
+
*/
|
|
889
862
|
type?: 'date' | 'datetime-local' | 'time' | 'month' | 'week';
|
|
890
|
-
/**
|
|
863
|
+
/** Date format preset. Takes precedence over `type`. */
|
|
864
|
+
dateFormatPreset?: NiceDateFormatPreset;
|
|
865
|
+
/** Placeholder text. Defaults to a derived placeholder (e.g. `dd.MM.yyyy`). */
|
|
891
866
|
placeholder?: string;
|
|
867
|
+
/** Show clear `×` button (default: `false`). Opt-in for nullable values. */
|
|
868
|
+
clearable?: boolean;
|
|
869
|
+
/**
|
|
870
|
+
* Show a calendar / clock icon button that opens the browser's native
|
|
871
|
+
* picker dialog (uses `HTMLInputElement.showPicker`). Default: `true`.
|
|
872
|
+
*/
|
|
873
|
+
showPickerButton?: boolean;
|
|
874
|
+
/**
|
|
875
|
+
* BCP 47 locale used for the displayed mask of `*-local` presets. Defaults
|
|
876
|
+
* to the browser locale (`navigator.language`).
|
|
877
|
+
*/
|
|
878
|
+
displayLocale?: string;
|
|
892
879
|
}
|
|
893
880
|
|
|
894
881
|
export declare const NiceDateRangeBox: default_2.FC<NiceDateRangeBoxProps>;
|
|
@@ -909,12 +896,22 @@ export declare interface NiceDateRangeBoxProps extends NiceFormFieldProps {
|
|
|
909
896
|
max?: string;
|
|
910
897
|
/** Show a clear button. */
|
|
911
898
|
clearable?: boolean;
|
|
912
|
-
/** Placeholder text (when both fields are empty). */
|
|
913
|
-
placeholder?: string;
|
|
914
899
|
/** Placeholder for the start input. */
|
|
915
900
|
startPlaceholder?: string;
|
|
916
901
|
/** Placeholder for the end input. */
|
|
917
902
|
endPlaceholder?: string;
|
|
903
|
+
/** Label shown above (or before) the start picker. */
|
|
904
|
+
startLabel?: string;
|
|
905
|
+
/** Label shown above (or before) the end picker. */
|
|
906
|
+
endLabel?: string;
|
|
907
|
+
/** Layout direction for the two pickers (default `horizontal`). */
|
|
908
|
+
layout?: 'horizontal' | 'vertical';
|
|
909
|
+
/** Custom separator rendered between pickers in horizontal layout (default `–`). Pass `''` to hide. */
|
|
910
|
+
separator?: default_2.ReactNode;
|
|
911
|
+
/** Gap in pixels between the two pickers (default 12). */
|
|
912
|
+
gap?: number;
|
|
913
|
+
/** Stretch each picker to fill available width. */
|
|
914
|
+
fullWidth?: boolean;
|
|
918
915
|
}
|
|
919
916
|
|
|
920
917
|
export declare const NiceDateTimePicker: default_2.ForwardRefExoticComponent<NiceDateTimePickerProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -941,13 +938,6 @@ export declare interface NiceDateTimePickerProps extends NiceFormFieldProps {
|
|
|
941
938
|
clearable?: boolean;
|
|
942
939
|
}
|
|
943
940
|
|
|
944
|
-
/**
|
|
945
|
-
* Cross-component visual presentation style.
|
|
946
|
-
* Each style maps 1:1 to a ThemeVariantConfig preset controlling
|
|
947
|
-
* buttons, inputs, cards, badges, tabs, toggles, tooltips, tables, etc.
|
|
948
|
-
*/
|
|
949
|
-
declare type NiceDisplayStyle = 'default' | 'minimal' | 'rounded' | 'sharp' | 'glass' | 'neumorphic' | 'playful' | 'enterprise' | 'modern3d' | 'brutalist' | 'luxe' | 'pill' | 'flat' | 'editorial' | 'dashboard' | 'softCloud' | 'cosmic' | 'corporate' | 'bank' | 'government' | 'military' | 'legal' | 'medical' | 'swiss' | 'scandinavian' | 'bauhaus' | 'notebook' | 'origami' | 'watercolor' | 'monochrome' | 'paper' | 'zen' | 'terminal' | 'hacker' | 'retro8bit' | 'synthwave' | 'cyberpunk' | 'steampunk' | 'vapor' | 'neon' | 'windows95' | 'material' | 'fluent' | 'cupertino' | 'ant' | 'bootstrap' | 'chakra' | 'notion' | 'linear' | 'vercel' | 'candy' | 'bubblegum' | 'cartoon' | 'kawaii' | 'circus' | 'gaming' | 'kiddo' | 'disco' | 'clown';
|
|
950
|
-
|
|
951
941
|
/** A content block in the {@link NiceDocumentEditor}. */
|
|
952
942
|
declare interface NiceDocumentBlock {
|
|
953
943
|
id: string;
|
|
@@ -975,7 +965,7 @@ declare interface NiceDocumentBlock {
|
|
|
975
965
|
open?: boolean;
|
|
976
966
|
/** Checklist items checked status for list blocks with listType='checklist'. */
|
|
977
967
|
checked?: boolean[];
|
|
978
|
-
/** Indentation level (0
|
|
968
|
+
/** Indentation level (0�4). */
|
|
979
969
|
indent?: number;
|
|
980
970
|
/** Lock block from editing. */
|
|
981
971
|
locked?: boolean;
|
|
@@ -986,7 +976,7 @@ declare type NiceDocumentBlockType = 'paragraph' | 'heading' | 'list' | 'image'
|
|
|
986
976
|
|
|
987
977
|
export declare const NiceDocumentEditor: ForwardRefExoticComponent<NiceDocumentEditorProps & RefAttributes<HTMLDivElement>>;
|
|
988
978
|
|
|
989
|
-
/** Props for the {@link NiceDocumentEditor} component
|
|
979
|
+
/** Props for the {@link NiceDocumentEditor} component � a block-based document editor (Notion-like). */
|
|
990
980
|
export declare interface NiceDocumentEditorProps extends NiceBaseProps {
|
|
991
981
|
blocks?: NiceDocumentBlock[];
|
|
992
982
|
onChange?: (blocks: NiceDocumentBlock[]) => void;
|
|
@@ -1033,15 +1023,6 @@ export declare interface NiceDropDownBoxProps extends NiceFormFieldProps {
|
|
|
1033
1023
|
dropdownWidth?: number | string;
|
|
1034
1024
|
}
|
|
1035
1025
|
|
|
1036
|
-
/**
|
|
1037
|
-
* Layout sizing for editors, viewers and players.
|
|
1038
|
-
* - `'minimal'` — smallest usable chrome, toolbar hidden or icon-only
|
|
1039
|
-
* - `'compact'` — reduced padding, single-row toolbar
|
|
1040
|
-
* - `'standard'` — default layout with full toolbar
|
|
1041
|
-
* - `'fullscreen'` — expands to fill the viewport
|
|
1042
|
-
*/
|
|
1043
|
-
declare type NiceEditorSize = 'minimal' | 'compact' | 'standard' | 'fullscreen';
|
|
1044
|
-
|
|
1045
1026
|
export declare const NiceEmojiPicker: default_2.FC<NiceEmojiPickerProps>;
|
|
1046
1027
|
|
|
1047
1028
|
export declare interface NiceEmojiPickerProps {
|
|
@@ -1163,98 +1144,27 @@ declare interface NiceFileUploadRef {
|
|
|
1163
1144
|
openFileBrowser: () => void;
|
|
1164
1145
|
}
|
|
1165
1146
|
|
|
1166
|
-
/** A single filter condition in the {@link NiceFilterBuilder} tree. */
|
|
1167
|
-
declare type NiceFilterCondition = {
|
|
1168
|
-
type: 'condition';
|
|
1169
|
-
field: string;
|
|
1170
|
-
operator: NiceFilterOperator;
|
|
1171
|
-
value: unknown;
|
|
1172
|
-
};
|
|
1173
|
-
|
|
1174
|
-
/** A group of conditions joined by AND/OR logic in the {@link NiceFilterBuilder}. */
|
|
1175
|
-
declare type NiceFilterGroup = {
|
|
1176
|
-
type: 'group';
|
|
1177
|
-
logic: 'and' | 'or';
|
|
1178
|
-
items: (NiceFilterCondition | NiceFilterGroup)[];
|
|
1179
|
-
};
|
|
1180
|
-
|
|
1181
|
-
/** Comparison operators available in the {@link NiceFilterBuilder}. */
|
|
1182
|
-
declare type NiceFilterOperator = '=' | '<>' | '<' | '<=' | '>' | '>=' | 'contains' | 'notcontains' | 'startswith' | 'endswith' | 'between' | 'isblank' | 'isnotblank' | (string & {});
|
|
1183
|
-
|
|
1184
|
-
export declare const NiceFloatingLabelInput: default_2.ForwardRefExoticComponent<NiceFloatingLabelInputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
1185
|
-
|
|
1186
|
-
export declare interface NiceFloatingLabelInputProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
1187
|
-
/** Label text (floats up when focused or has value) */
|
|
1188
|
-
label: string;
|
|
1189
|
-
/** Helper text shown below input */
|
|
1190
|
-
helperText?: string;
|
|
1191
|
-
/** Error message (shows instead of helper text when present) */
|
|
1192
|
-
error?: string;
|
|
1193
|
-
/** Success state */
|
|
1194
|
-
success?: boolean;
|
|
1195
|
-
/** Left icon */
|
|
1196
|
-
startIcon?: default_2.ReactNode;
|
|
1197
|
-
/** Right icon */
|
|
1198
|
-
endIcon?: default_2.ReactNode;
|
|
1199
|
-
/** Show character counter */
|
|
1200
|
-
showCounter?: boolean;
|
|
1201
|
-
/** Input variant */
|
|
1202
|
-
variant?: 'outlined' | 'filled' | 'standard';
|
|
1203
|
-
/** Size variant */
|
|
1204
|
-
size?: NiceSize;
|
|
1205
|
-
/** Full width */
|
|
1206
|
-
fullWidth?: boolean;
|
|
1207
|
-
/** Extra class name */
|
|
1208
|
-
className?: string;
|
|
1209
|
-
/** Test ID */
|
|
1210
|
-
'data-testid'?: string;
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
1147
|
export declare const NiceForm: default_2.FC<NiceFormProps>;
|
|
1214
1148
|
|
|
1215
|
-
/** Extended base props for form-field components (inputs, selects, etc.). */
|
|
1216
|
-
declare interface NiceFormFieldProps extends NiceBaseProps {
|
|
1217
|
-
/** Field label displayed above or beside the control. */
|
|
1218
|
-
label?: string;
|
|
1219
|
-
/** Assistive text shown below the field. */
|
|
1220
|
-
helperText?: string;
|
|
1221
|
-
/** Validation error message — when set the field is styled as invalid. */
|
|
1222
|
-
error?: string;
|
|
1223
|
-
/** Marks the field as required (adds visual indicator). */
|
|
1224
|
-
required?: boolean;
|
|
1225
|
-
/** Disables the field. */
|
|
1226
|
-
disabled?: boolean;
|
|
1227
|
-
/** Makes the field read-only. */
|
|
1228
|
-
readOnly?: boolean;
|
|
1229
|
-
/** Visual size of the field. */
|
|
1230
|
-
size?: NiceSize;
|
|
1231
|
-
/** HTML `name` attribute used in form serialization. */
|
|
1232
|
-
name?: string;
|
|
1233
|
-
/** When true, pressing Enter will trigger the onSubmit callback (if provided). */
|
|
1234
|
-
submitOnEnter?: boolean;
|
|
1235
|
-
/** Callback triggered when Enter is pressed (if submitOnEnter is true). */
|
|
1236
|
-
onSubmit?: () => void;
|
|
1237
|
-
/** Show a keyboard shortcuts hint icon (?) next to the label. */
|
|
1238
|
-
showKeyboardHints?: boolean;
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
1149
|
/** Describes a single field in a {@link NiceForm} layout. */
|
|
1242
1150
|
declare interface NiceFormItem {
|
|
1243
1151
|
field: string;
|
|
1244
1152
|
label?: string;
|
|
1245
1153
|
colSpan?: number;
|
|
1246
1154
|
required?: boolean;
|
|
1247
|
-
/** Static visibility flag
|
|
1155
|
+
/** Static visibility flag � set to false to always hide. */
|
|
1248
1156
|
visible?: boolean;
|
|
1249
1157
|
/**
|
|
1250
1158
|
* Dynamic visibility: evaluated against current form data.
|
|
1251
1159
|
* Example: `(data) => data.country === 'PL'`
|
|
1252
1160
|
*/
|
|
1253
1161
|
visibleWhen?: (data: Record<string, any>) => boolean;
|
|
1254
|
-
render?: (value:
|
|
1162
|
+
render?: (value: unknown, onChange: (v: unknown) => void) => default_2.ReactNode;
|
|
1255
1163
|
hint?: string;
|
|
1256
|
-
/** Group name
|
|
1164
|
+
/** Group name � fields with the same group are rendered together under a section header. */
|
|
1257
1165
|
group?: string;
|
|
1166
|
+
/** Tab name � fields with the same tab are rendered together under a tab. Tabs take precedence over groups for top-level structure. */
|
|
1167
|
+
tab?: string;
|
|
1258
1168
|
/** Field type for auto-rendering (text, number, select, etc.). */
|
|
1259
1169
|
type?: string;
|
|
1260
1170
|
/** Options for select/radio type fields. */
|
|
@@ -1262,15 +1172,39 @@ declare interface NiceFormItem {
|
|
|
1262
1172
|
label: string;
|
|
1263
1173
|
value: string | number;
|
|
1264
1174
|
} | string>;
|
|
1175
|
+
/** Mask pattern for `type: 'masked'`. */
|
|
1176
|
+
mask?: string;
|
|
1177
|
+
/** Placeholder text shown when no value is selected/entered. */
|
|
1178
|
+
placeholder?: string;
|
|
1179
|
+
/** Default value applied when no value exists in `data`. */
|
|
1180
|
+
defaultValue?: unknown;
|
|
1181
|
+
/** Disable this field individually. */
|
|
1182
|
+
disabled?: boolean;
|
|
1183
|
+
/** Render this field in read-only mode individually. */
|
|
1184
|
+
readOnly?: boolean;
|
|
1185
|
+
/** Hide this field (alias of `visible: false`). */
|
|
1186
|
+
hidden?: boolean;
|
|
1187
|
+
/**
|
|
1188
|
+
* Optional unit / currency code rendered as a suffix for `type: 'currency'`
|
|
1189
|
+
* or `type: 'number'` (e.g. `'PLN'`, `'$'`, `'kg'`). Defaults to `'PLN'`
|
|
1190
|
+
* for currency.
|
|
1191
|
+
*/
|
|
1192
|
+
unit?: string;
|
|
1193
|
+
/** Decimal precision for `type: 'number'` / `type: 'currency'`. Default 2 for currency, 0 for number. */
|
|
1194
|
+
precision?: number;
|
|
1195
|
+
/** Stepper increment for `type: 'number'` / `type: 'currency'`. Default 100 for currency, 1 for number. */
|
|
1196
|
+
step?: number;
|
|
1197
|
+
/** For `type: 'address'` � render sub-fields in 1 or 2 columns. Default 2. */
|
|
1198
|
+
columns?: 1 | 2;
|
|
1265
1199
|
}
|
|
1266
1200
|
|
|
1267
|
-
/** Props for the {@link NiceForm} component
|
|
1201
|
+
/** Props for the {@link NiceForm} component � a declarative, data-driven form layout. */
|
|
1268
1202
|
export declare interface NiceFormProps extends NiceBaseProps {
|
|
1269
1203
|
items: NiceFormItem[];
|
|
1270
1204
|
/** Inline form data. Ignored when `dataSource` + `recordKey` are provided. */
|
|
1271
1205
|
data?: Record<string, any>;
|
|
1272
1206
|
/** Field change callback. Ignored when `dataSource` is provided. */
|
|
1273
|
-
onFieldChange?: (field: string, value:
|
|
1207
|
+
onFieldChange?: (field: string, value: unknown) => void;
|
|
1274
1208
|
onSubmit?: (data: Record<string, any>) => void;
|
|
1275
1209
|
/**
|
|
1276
1210
|
* Two-way data source binding.
|
|
@@ -1282,8 +1216,8 @@ export declare interface NiceFormProps extends NiceBaseProps {
|
|
|
1282
1216
|
recordKey?: unknown;
|
|
1283
1217
|
columns?: number;
|
|
1284
1218
|
/**
|
|
1285
|
-
* Responsive columns: map of min-width breakpoint (px)
|
|
1286
|
-
* Example: `{ 0: 1, 600: 2, 1024: 3 }`
|
|
1219
|
+
* Responsive columns: map of min-width breakpoint (px) ? column count.
|
|
1220
|
+
* Example: `{ 0: 1, 600: 2, 1024: 3 }` ? 1 col on small, 2 on medium, 3 on large.
|
|
1287
1221
|
*/
|
|
1288
1222
|
responsiveColumns?: Record<number, number>;
|
|
1289
1223
|
gap?: number | string;
|
|
@@ -1295,6 +1229,20 @@ export declare interface NiceFormProps extends NiceBaseProps {
|
|
|
1295
1229
|
autoSaveDelay?: number;
|
|
1296
1230
|
/** Callback when dirty state changes. */
|
|
1297
1231
|
onDirtyChange?: (isDirty: boolean) => void;
|
|
1232
|
+
/** When true, render Submit/Reset buttons at the bottom. */
|
|
1233
|
+
showActions?: boolean;
|
|
1234
|
+
/** Custom Submit button label. */
|
|
1235
|
+
submitLabel?: string;
|
|
1236
|
+
/** Custom Reset button label. */
|
|
1237
|
+
resetLabel?: string;
|
|
1238
|
+
/**
|
|
1239
|
+
* When provided, a Cancel button is rendered on the LEFT side of the
|
|
1240
|
+
* actions row. Used by popup hosts (NiceDataGrid edit popup, NiceKanban
|
|
1241
|
+
* edit popup, etc.) to dismiss the modal without submitting.
|
|
1242
|
+
*/
|
|
1243
|
+
onCancel?: () => void;
|
|
1244
|
+
/** Custom Cancel button label. */
|
|
1245
|
+
cancelLabel?: string;
|
|
1298
1246
|
}
|
|
1299
1247
|
|
|
1300
1248
|
export declare const NiceGradientPicker: default_2.ForwardRefExoticComponent<NiceGradientPickerProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -1306,12 +1254,16 @@ export declare interface NiceGradientPickerProps extends NiceBaseProps {
|
|
|
1306
1254
|
showCssOutput?: boolean;
|
|
1307
1255
|
/** Show preset gallery */
|
|
1308
1256
|
showPresets?: boolean;
|
|
1257
|
+
/** Show the inline editor (type/angle/stops controls). When false, only preview/presets/random remain. */
|
|
1258
|
+
showEditor?: boolean;
|
|
1309
1259
|
/** Show random button */
|
|
1310
1260
|
showRandom?: boolean;
|
|
1311
1261
|
/** Maximum number of gradient stops */
|
|
1312
1262
|
maxStops?: number;
|
|
1313
1263
|
label?: string;
|
|
1314
1264
|
disabled?: boolean;
|
|
1265
|
+
/** Fixed width of the whole control. Defaults to 320px so the layout stays stable when stops are added. */
|
|
1266
|
+
width?: string | number;
|
|
1315
1267
|
}
|
|
1316
1268
|
|
|
1317
1269
|
declare type NiceGradientShape = 'circle' | 'ellipse';
|
|
@@ -1336,7 +1288,7 @@ declare interface NiceGradientValue {
|
|
|
1336
1288
|
stops: NiceGradientStop[];
|
|
1337
1289
|
}
|
|
1338
1290
|
|
|
1339
|
-
declare type NiceHarmonyMode = 'monochromatic' | 'complementary' | 'split-complementary' | 'analogous' | 'triadic' | 'tetradic' | 'square';
|
|
1291
|
+
declare type NiceHarmonyMode = 'monochromatic' | 'complementary' | 'split-complementary' | 'analogous' | 'triadic' | 'tetradic' | 'square' | 'custom';
|
|
1340
1292
|
|
|
1341
1293
|
export declare const NiceHtmlEditor: default_2.FC<NiceHtmlEditorProps>;
|
|
1342
1294
|
|
|
@@ -1399,7 +1351,7 @@ declare interface NiceHtmlEditorAIRef {
|
|
|
1399
1351
|
/** Available toolbar commands for the {@link NiceHtmlEditor}. */
|
|
1400
1352
|
declare type NiceHtmlEditorCommand = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'h1' | 'h2' | 'h3' | 'ul' | 'ol' | 'link' | 'unlink' | 'undo' | 'redo' | 'clear' | 'table' | 'image' | 'code' | 'markdown' | 'blockquote' | 'hr' | 'fontSize' | 'fontColor' | 'bgColor' | 'subscript' | 'superscript' | 'indent' | 'outdent' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'fullscreen' | 'removeFormat' | 'print' | 'source' | 'emoji' | 'findReplace';
|
|
1401
1353
|
|
|
1402
|
-
/** Props for the {@link NiceHtmlEditor} component
|
|
1354
|
+
/** Props for the {@link NiceHtmlEditor} component � a WYSIWYG rich-text editor with toolbar, mentions, and image upload. */
|
|
1403
1355
|
export declare interface NiceHtmlEditorProps extends NiceFormFieldProps {
|
|
1404
1356
|
value: string;
|
|
1405
1357
|
onChange: (html: string) => void;
|
|
@@ -1532,28 +1484,6 @@ declare interface NiceImageEditorState {
|
|
|
1532
1484
|
/** Available tools in the {@link NiceImageEditor} toolbar. */
|
|
1533
1485
|
declare type NiceImageEditorTool = 'crop' | 'rotate' | 'flip' | 'brightness' | 'contrast' | 'saturate' | 'blur' | 'annotate';
|
|
1534
1486
|
|
|
1535
|
-
export declare const NiceInPlaceEditor: default_2.ForwardRefExoticComponent<NiceInPlaceEditorProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
1536
|
-
|
|
1537
|
-
declare interface NiceInPlaceEditorOption {
|
|
1538
|
-
label: string;
|
|
1539
|
-
value: string;
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
/** Props for the {@link NiceInPlaceEditor} component — click-to-edit inline text that toggles between display and editor mode. */
|
|
1543
|
-
export declare interface NiceInPlaceEditorProps extends NiceBaseProps {
|
|
1544
|
-
value: string;
|
|
1545
|
-
onChange: (value: string) => void;
|
|
1546
|
-
type?: NiceInPlaceEditorType;
|
|
1547
|
-
options?: NiceInPlaceEditorOption[];
|
|
1548
|
-
submitOnBlur?: boolean;
|
|
1549
|
-
placeholder?: string;
|
|
1550
|
-
disabled?: boolean;
|
|
1551
|
-
size?: NiceSize;
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
/** Supported editor types for the {@link NiceInPlaceEditor}. */
|
|
1555
|
-
declare type NiceInPlaceEditorType = 'text' | 'textarea' | 'select' | 'date' | 'number';
|
|
1556
|
-
|
|
1557
1487
|
export declare const NiceInputOtp: default_2.ForwardRefExoticComponent<NiceInputOtpProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
1558
1488
|
|
|
1559
1489
|
/** Props for the {@link NiceInputOtp} component — a one-time-password input with separate digit boxes. */
|
|
@@ -1568,6 +1498,8 @@ export declare interface NiceInputOtpProps extends NiceFormFieldProps {
|
|
|
1568
1498
|
/** Called when all digits are filled */
|
|
1569
1499
|
onComplete?: (value: string) => void;
|
|
1570
1500
|
autoFocus?: boolean;
|
|
1501
|
+
/** Width of a single digit cell (number = px). Defaults per `size`. */
|
|
1502
|
+
cellWidth?: number | string;
|
|
1571
1503
|
}
|
|
1572
1504
|
|
|
1573
1505
|
/**
|
|
@@ -1607,7 +1539,7 @@ export declare interface NiceInvoiceLineEditorProps extends NiceFormFieldProps {
|
|
|
1607
1539
|
export declare const NiceKnob: default_2.ForwardRefExoticComponent<NiceKnobProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
1608
1540
|
|
|
1609
1541
|
/** Props for the {@link NiceKnob} component — a rotary knob for numeric input (SVG-based). */
|
|
1610
|
-
export declare interface NiceKnobProps extends Omit<NiceFormFieldProps, 'size'> {
|
|
1542
|
+
export declare interface NiceKnobProps extends Omit<NiceFormFieldProps, 'size' | 'labelPlacement'> {
|
|
1611
1543
|
value?: number;
|
|
1612
1544
|
onChange?: (value: number) => void;
|
|
1613
1545
|
min?: number;
|
|
@@ -1619,39 +1551,32 @@ export declare interface NiceKnobProps extends Omit<NiceFormFieldProps, 'size'>
|
|
|
1619
1551
|
valueTemplate?: string;
|
|
1620
1552
|
/** Knob diameter in pixels or NiceSize preset. */
|
|
1621
1553
|
size?: number | NiceSize;
|
|
1554
|
+
/** Where to place the label relative to the knob. Defaults to 'top'. */
|
|
1555
|
+
labelPlacement?: 'top' | 'bottom' | 'left' | 'right';
|
|
1556
|
+
/**
|
|
1557
|
+
* When true (default), centers the label horizontally over/under the knob in
|
|
1558
|
+
* top/bottom placements, or vertically next to the knob in left/right
|
|
1559
|
+
* placements. Set to false to keep the label at the start of its axis.
|
|
1560
|
+
*/
|
|
1561
|
+
isLabelCentered?: boolean;
|
|
1622
1562
|
}
|
|
1623
1563
|
|
|
1624
|
-
|
|
1625
|
-
declare interface NiceLoadOptions {
|
|
1626
|
-
filter?: NiceFilterGroup;
|
|
1627
|
-
sort?: NiceSortExpression[];
|
|
1628
|
-
skip?: number;
|
|
1629
|
-
take?: number;
|
|
1630
|
-
search?: string;
|
|
1631
|
-
searchFields?: string[];
|
|
1632
|
-
select?: string[];
|
|
1633
|
-
expand?: string[];
|
|
1634
|
-
group?: {
|
|
1635
|
-
field: string;
|
|
1636
|
-
direction?: NiceSortDirection;
|
|
1637
|
-
}[];
|
|
1638
|
-
/** Arbitrary parameters forwarded to the adapter (e.g. custom query strings). */
|
|
1639
|
-
customParams?: Record<string, unknown>;
|
|
1640
|
-
}
|
|
1564
|
+
export declare const NiceLookup: default_2.FC<NiceLookupProps>;
|
|
1641
1565
|
|
|
1642
|
-
/**
|
|
1643
|
-
declare interface
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1566
|
+
/** Column definition for the mini-grid lookup mode. */
|
|
1567
|
+
declare interface NiceLookupColumn {
|
|
1568
|
+
/** Field key in the row record. */
|
|
1569
|
+
key: string;
|
|
1570
|
+
/** Header label for the column. */
|
|
1571
|
+
header: string;
|
|
1572
|
+
/** Column width (CSS, e.g. '60px' or '20%'). */
|
|
1573
|
+
width?: string | number;
|
|
1647
1574
|
}
|
|
1648
1575
|
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
/** Props for the {@link NiceLookup} component — a simple select-like lookup with optional search. */
|
|
1576
|
+
/** Props for the {@link NiceLookup} component — a select-like lookup with optional search or a mini data grid. */
|
|
1652
1577
|
export declare interface NiceLookupProps extends NiceFormFieldProps {
|
|
1653
|
-
/** Available options. */
|
|
1654
|
-
options
|
|
1578
|
+
/** Available options. Used when `data`/`columns` aren't provided. */
|
|
1579
|
+
options?: NiceOption[];
|
|
1655
1580
|
/** Selected value. */
|
|
1656
1581
|
value: string;
|
|
1657
1582
|
/** Called when the selection changes. */
|
|
@@ -1664,6 +1589,16 @@ export declare interface NiceLookupProps extends NiceFormFieldProps {
|
|
|
1664
1589
|
loading?: boolean;
|
|
1665
1590
|
/** Input placeholder text. */
|
|
1666
1591
|
placeholder?: string;
|
|
1592
|
+
/** Tabular data rows for the mini-grid mode. */
|
|
1593
|
+
data?: Record<string, unknown>[];
|
|
1594
|
+
/** Column definitions for the mini-grid mode. Required when `data` is provided. */
|
|
1595
|
+
columns?: NiceLookupColumn[];
|
|
1596
|
+
/** Field key in each row used as the selected value. Defaults to `'id'`. */
|
|
1597
|
+
valueField?: string;
|
|
1598
|
+
/** Field key in each row used for the displayed text. Defaults to the first column's key. */
|
|
1599
|
+
displayField?: string;
|
|
1600
|
+
/** Width of the dropdown when in mini-grid mode (CSS). */
|
|
1601
|
+
dropdownWidth?: string | number;
|
|
1667
1602
|
}
|
|
1668
1603
|
|
|
1669
1604
|
export declare const NiceMarkdownEditor: default_2.ForwardRefExoticComponent<NiceMarkdownEditorProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -1706,7 +1641,9 @@ export declare interface NiceMaskedInputProps extends NiceFormFieldProps {
|
|
|
1706
1641
|
*
|
|
1707
1642
|
* Examples: `(999) 999-9999`, `9999 9999 9999 9999`, `99/99/9999`
|
|
1708
1643
|
*/
|
|
1709
|
-
mask
|
|
1644
|
+
mask?: string;
|
|
1645
|
+
/** Predefined mask preset — sets the mask pattern automatically. `mask` takes precedence. */
|
|
1646
|
+
maskPreset?: NiceMaskPreset;
|
|
1710
1647
|
/** Character shown for unfilled positions (default: '_') */
|
|
1711
1648
|
maskChar?: string;
|
|
1712
1649
|
placeholder?: string;
|
|
@@ -1716,6 +1653,9 @@ export declare interface NiceMaskedInputProps extends NiceFormFieldProps {
|
|
|
1716
1653
|
autoFocus?: boolean;
|
|
1717
1654
|
}
|
|
1718
1655
|
|
|
1656
|
+
/** Predefined mask presets. */
|
|
1657
|
+
export declare type NiceMaskPreset = 'phone' | 'credit-card' | 'date' | 'ssn' | 'zip' | 'time' | 'iban';
|
|
1658
|
+
|
|
1719
1659
|
export declare const NiceMention: default_2.ForwardRefExoticComponent<NiceMentionProps & default_2.RefAttributes<HTMLTextAreaElement>>;
|
|
1720
1660
|
|
|
1721
1661
|
/** Props for the {@link NiceMention} component — a textarea with @mention triggers and suggestion popup. */
|
|
@@ -1742,29 +1682,6 @@ export declare interface NiceMentionSuggestion {
|
|
|
1742
1682
|
[k: string]: unknown;
|
|
1743
1683
|
}
|
|
1744
1684
|
|
|
1745
|
-
export declare const NiceMultiColumnComboBox: default_2.ForwardRefExoticComponent<NiceMultiColumnComboBoxProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
1746
|
-
|
|
1747
|
-
/** A column definition for the {@link NiceMultiColumnComboBox} dropdown grid. */
|
|
1748
|
-
declare interface NiceMultiColumnComboBoxColumn {
|
|
1749
|
-
field: string;
|
|
1750
|
-
header: string;
|
|
1751
|
-
width?: number | string;
|
|
1752
|
-
}
|
|
1753
|
-
|
|
1754
|
-
/** Props for the {@link NiceMultiColumnComboBox} component — a combo box whose dropdown shows data in columns (like a mini-grid). */
|
|
1755
|
-
export declare interface NiceMultiColumnComboBoxProps extends NiceBaseProps {
|
|
1756
|
-
columns: NiceMultiColumnComboBoxColumn[];
|
|
1757
|
-
data: Record<string, any>[];
|
|
1758
|
-
value?: string;
|
|
1759
|
-
onChange?: (value: string) => void;
|
|
1760
|
-
displayExpr?: string;
|
|
1761
|
-
valueExpr?: string;
|
|
1762
|
-
placeholder?: string;
|
|
1763
|
-
disabled?: boolean;
|
|
1764
|
-
size?: NiceSize;
|
|
1765
|
-
filterable?: boolean;
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
1685
|
export declare const NiceNumberInput: default_2.ForwardRefExoticComponent<NiceNumberInputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
1769
1686
|
|
|
1770
1687
|
/** Props for the {@link NiceNumberInput} component — a numeric field with stepper and precision control. */
|
|
@@ -1789,28 +1706,32 @@ export declare interface NiceNumberInputProps extends NiceFormFieldProps {
|
|
|
1789
1706
|
precision?: number;
|
|
1790
1707
|
/** Prefix content (e.g. currency symbol). */
|
|
1791
1708
|
prefix?: default_2.ReactNode;
|
|
1792
|
-
/**
|
|
1709
|
+
/** Prefix mode: 'label' (static, default) or 'select' (dropdown). */
|
|
1710
|
+
prefixType?: 'label' | 'select';
|
|
1711
|
+
/** Options for the prefix select dropdown. */
|
|
1712
|
+
prefixOptions?: NiceSuffixOption[];
|
|
1713
|
+
/** Currently selected prefix value (controlled). */
|
|
1714
|
+
prefixValue?: string;
|
|
1715
|
+
/** Called when the prefix select changes. */
|
|
1716
|
+
onPrefixChange?: (value: string, prevWeight: number | undefined, newWeight: number | undefined) => void;
|
|
1717
|
+
/** Suffix content (e.g. unit label or ReactNode). */
|
|
1793
1718
|
suffix?: default_2.ReactNode;
|
|
1794
1719
|
/** Show ▲/▼ stepper buttons (default `true`). */
|
|
1795
1720
|
showStepper?: boolean;
|
|
1721
|
+
/** Display format preset applied on blur: 'integer', 'decimal', 'money', 'percent'. */
|
|
1722
|
+
formatPreset?: 'integer' | 'decimal' | 'money' | 'percent';
|
|
1723
|
+
/** Custom display formatter applied on blur. Takes precedence over formatPreset. */
|
|
1724
|
+
format?: (value: number) => string;
|
|
1725
|
+
/** Suffix mode: 'label' (static, default) or 'select' (dropdown). */
|
|
1726
|
+
suffixType?: 'label' | 'select';
|
|
1727
|
+
/** Options for the suffix select dropdown. */
|
|
1728
|
+
suffixOptions?: NiceSuffixOption[];
|
|
1729
|
+
/** Currently selected suffix value (controlled). */
|
|
1730
|
+
suffixValue?: string;
|
|
1731
|
+
/** Called when the suffix select changes. */
|
|
1732
|
+
onSuffixChange?: (value: string, prevWeight: number | undefined, newWeight: number | undefined) => void;
|
|
1796
1733
|
}
|
|
1797
1734
|
|
|
1798
|
-
/** A single option displayed in selects, radio-groups, autocompletes and similar list-based editors. */
|
|
1799
|
-
declare type NiceOption<T = string> = {
|
|
1800
|
-
/** The option's backing value. */
|
|
1801
|
-
value: T;
|
|
1802
|
-
/** Display text shown to the user. */
|
|
1803
|
-
label: string;
|
|
1804
|
-
/** When `true` the option cannot be selected. */
|
|
1805
|
-
disabled?: boolean;
|
|
1806
|
-
/** Optional icon rendered before the label. */
|
|
1807
|
-
icon?: React.ReactNode;
|
|
1808
|
-
/** Secondary description text. */
|
|
1809
|
-
description?: string;
|
|
1810
|
-
/** Grouping key for grouped dropdowns. */
|
|
1811
|
-
group?: string;
|
|
1812
|
-
};
|
|
1813
|
-
|
|
1814
1735
|
export declare const NicePasswordInput: default_2.ForwardRefExoticComponent<NicePasswordInputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
1815
1736
|
|
|
1816
1737
|
/** Props for the {@link NicePasswordInput} component — a password field with visibility toggle and strength meter. */
|
|
@@ -1827,6 +1748,8 @@ export declare interface NicePasswordInputProps extends NiceFormFieldProps {
|
|
|
1827
1748
|
showStrength?: boolean;
|
|
1828
1749
|
/** Custom strength rules — overrides default rules */
|
|
1829
1750
|
strengthRules?: NicePasswordRule[];
|
|
1751
|
+
/** Where to display the strength/validation section: 'bottom' (default, below control) or 'right' (beside control). */
|
|
1752
|
+
validationPlacement?: 'bottom' | 'right';
|
|
1830
1753
|
autoFocus?: boolean;
|
|
1831
1754
|
autoComplete?: string;
|
|
1832
1755
|
}
|
|
@@ -1907,10 +1830,10 @@ export declare interface NicePhoneInputProps extends NiceFormFieldProps {
|
|
|
1907
1830
|
onBlur?: (e: default_2.FocusEvent<HTMLInputElement>) => void;
|
|
1908
1831
|
}
|
|
1909
1832
|
|
|
1910
|
-
export declare const NicePickList: <T =
|
|
1833
|
+
export declare const NicePickList: <T = unknown>(props: NicePickListProps<T> & default_2.RefAttributes<HTMLDivElement>) => default_2.ReactElement | null;
|
|
1911
1834
|
|
|
1912
1835
|
/** Props for the {@link NicePickList} component — a dual-list control for moving items between source and target. */
|
|
1913
|
-
export declare interface NicePickListProps<T =
|
|
1836
|
+
export declare interface NicePickListProps<T = unknown> extends NiceBaseProps {
|
|
1914
1837
|
/** Items in the source list */
|
|
1915
1838
|
source: T[];
|
|
1916
1839
|
/** Items in the target list */
|
|
@@ -1995,6 +1918,8 @@ export declare interface NiceRangeSliderProps extends NiceFormFieldProps {
|
|
|
1995
1918
|
showLabels?: boolean;
|
|
1996
1919
|
/** Custom label formatter. */
|
|
1997
1920
|
formatLabel?: (value: number) => string;
|
|
1921
|
+
/** Where to show the range value text. */
|
|
1922
|
+
valuePlacement?: 'right' | 'bottom' | 'none';
|
|
1998
1923
|
}
|
|
1999
1924
|
|
|
2000
1925
|
export declare const NiceRating: default_2.ForwardRefExoticComponent<NiceRatingProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -2018,6 +1943,24 @@ export declare interface NiceRatingProps extends NiceBaseProps {
|
|
|
2018
1943
|
/** Name for form submission */
|
|
2019
1944
|
name?: string;
|
|
2020
1945
|
error?: string;
|
|
1946
|
+
/** Assistive text shown below the field. */
|
|
1947
|
+
helperText?: string;
|
|
1948
|
+
/** Marks the field as required. */
|
|
1949
|
+
required?: boolean;
|
|
1950
|
+
/** Shows a loading spinner inside the control and disables interaction. */
|
|
1951
|
+
loading?: boolean;
|
|
1952
|
+
/** Label placement: top (default) or left. */
|
|
1953
|
+
labelPlacement?: 'top' | 'left';
|
|
1954
|
+
/** Error placement: bottom (default) or right. */
|
|
1955
|
+
errorPlacement?: 'bottom' | 'right';
|
|
1956
|
+
/** Explicit width for the label column when labelPlacement is 'left'. */
|
|
1957
|
+
labelWidth?: string | number;
|
|
1958
|
+
/** Explicit width for the control column. */
|
|
1959
|
+
controlWidth?: string | number;
|
|
1960
|
+
/** Value display placement. */
|
|
1961
|
+
valuePlacement?: 'right' | 'bottom' | 'none';
|
|
1962
|
+
/** Custom value format, e.g. "{value}/5" */
|
|
1963
|
+
valueTemplate?: string;
|
|
2021
1964
|
}
|
|
2022
1965
|
|
|
2023
1966
|
/**
|
|
@@ -2060,8 +2003,8 @@ export declare const NiceSelect: default_2.ForwardRefExoticComponent<NiceSelectP
|
|
|
2060
2003
|
|
|
2061
2004
|
/** Props for the {@link NiceSelect} component. */
|
|
2062
2005
|
export declare interface NiceSelectProps extends NiceFormFieldProps {
|
|
2063
|
-
/** Static options array. Merged with (or overridden by) `optionsSource`. */
|
|
2064
|
-
options?: NiceOption
|
|
2006
|
+
/** Static options array. Plain strings are treated as `{ value: s, label: s }`. Merged with (or overridden by) `optionsSource`. */
|
|
2007
|
+
options?: Array<NiceOption | string>;
|
|
2065
2008
|
value?: string | string[];
|
|
2066
2009
|
onChange?: (value: string | string[]) => void;
|
|
2067
2010
|
placeholder?: string;
|
|
@@ -2090,6 +2033,8 @@ export declare interface NiceSelectProps extends NiceFormFieldProps {
|
|
|
2090
2033
|
loading?: boolean;
|
|
2091
2034
|
/** Custom render function for option items. */
|
|
2092
2035
|
renderOption?: (option: NiceOption, isSelected: boolean) => default_2.ReactNode;
|
|
2036
|
+
/** When true (default false), the trigger width grows to fit selected items in `multiple` mode. When false, width stays fixed. */
|
|
2037
|
+
multipleAutosize?: boolean;
|
|
2093
2038
|
}
|
|
2094
2039
|
|
|
2095
2040
|
export declare const NiceSignature: default_2.ForwardRefExoticComponent<NiceSignatureProps & default_2.RefAttributes<NiceSignatureRef>>;
|
|
@@ -2172,6 +2117,8 @@ export declare interface NiceSignatureProps {
|
|
|
2172
2117
|
disabled?: boolean;
|
|
2173
2118
|
/** Read only (shows signature but can't edit) */
|
|
2174
2119
|
readOnly?: boolean;
|
|
2120
|
+
/** Display mode — hides toolbar and prevents editing. Equivalent to readOnly + showClearButton/showUndoButton/showColorPicker/showSizeSlider all false. */
|
|
2121
|
+
displayMode?: boolean;
|
|
2175
2122
|
/** On begin stroke */
|
|
2176
2123
|
onBegin?: () => void;
|
|
2177
2124
|
/** On end stroke */
|
|
@@ -2209,13 +2156,12 @@ declare interface NiceSignatureStroke {
|
|
|
2209
2156
|
width: number;
|
|
2210
2157
|
}
|
|
2211
2158
|
|
|
2212
|
-
/** T-shirt sizing used across all components for consistent visual density. */
|
|
2213
|
-
declare type NiceSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
2214
|
-
|
|
2215
2159
|
export declare const NiceSlider: default_2.ForwardRefExoticComponent<NiceSliderProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
2216
2160
|
|
|
2217
2161
|
/** Props for the {@link NiceSlider} component — a single-thumb range slider for numeric input. */
|
|
2218
|
-
export declare interface NiceSliderProps extends NiceFormFieldProps {
|
|
2162
|
+
export declare interface NiceSliderProps extends Omit<NiceFormFieldProps, 'labelPlacement'> {
|
|
2163
|
+
/** Where to place the label relative to the slider. 'top' (default) shows label and value above the track; 'bottom' shows label and value above the track but in a row above (legacy 'left' behaviour); 'left' places label to the left and value to the right of the slider on a single row. */
|
|
2164
|
+
labelPlacement?: 'top' | 'bottom' | 'left';
|
|
2219
2165
|
/** Current value. */
|
|
2220
2166
|
value?: number;
|
|
2221
2167
|
/** Called when the value changes. */
|
|
@@ -2234,15 +2180,26 @@ export declare interface NiceSliderProps extends NiceFormFieldProps {
|
|
|
2234
2180
|
formatValue?: (v: number) => string;
|
|
2235
2181
|
/** Show tick marks on the slider track. */
|
|
2236
2182
|
showTicks?: boolean;
|
|
2183
|
+
/**
|
|
2184
|
+
* Distance between ticks expressed in slider value units. Defaults to `step`
|
|
2185
|
+
* when `showTicks` is true. If the resulting tick count would exceed
|
|
2186
|
+
* {@link maxTicks}, the renderer falls back to evenly spaced ticks.
|
|
2187
|
+
*/
|
|
2188
|
+
tickInterval?: number;
|
|
2189
|
+
/** Maximum number of ticks rendered. Defaults to 21 (so a 0–100 step=5 shows 21 marks). */
|
|
2190
|
+
maxTicks?: number;
|
|
2191
|
+
/** Render numeric labels under each tick. Defaults to `false`. */
|
|
2192
|
+
showTickLabels?: boolean;
|
|
2237
2193
|
}
|
|
2238
2194
|
|
|
2239
|
-
/**
|
|
2240
|
-
declare
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2195
|
+
/** An option for the prefix/suffix select dropdown with optional conversion weight. */
|
|
2196
|
+
export declare interface NiceSuffixOption {
|
|
2197
|
+
/** Option value. */
|
|
2198
|
+
value: string;
|
|
2199
|
+
/** Display label. */
|
|
2200
|
+
label: string;
|
|
2201
|
+
/** Conversion weight relative to the base unit. When set and the user switches units, the numeric value is multiplied by `(prevWeight / newWeight)`. */
|
|
2202
|
+
weight?: number;
|
|
2246
2203
|
}
|
|
2247
2204
|
|
|
2248
2205
|
export declare const NiceTagBox: default_2.FC<NiceTagBoxProps>;
|
|
@@ -2250,7 +2207,7 @@ export declare const NiceTagBox: default_2.FC<NiceTagBoxProps>;
|
|
|
2250
2207
|
/** Props for the {@link NiceTagBox} component — a multi-select input that displays selected items as tags/chips. */
|
|
2251
2208
|
export declare interface NiceTagBoxProps extends NiceFormFieldProps {
|
|
2252
2209
|
/** Available options. */
|
|
2253
|
-
options
|
|
2210
|
+
options?: NiceOption[];
|
|
2254
2211
|
/** Array of selected values. */
|
|
2255
2212
|
value: string[];
|
|
2256
2213
|
/** Called when the selection changes. */
|
|
@@ -2267,6 +2224,13 @@ export declare interface NiceTagBoxProps extends NiceFormFieldProps {
|
|
|
2267
2224
|
placeholder?: string;
|
|
2268
2225
|
/** Alias for options — array of string suggestions. */
|
|
2269
2226
|
suggestions?: string[];
|
|
2227
|
+
/**
|
|
2228
|
+
* When true, the control grows vertically as more tags are added (tags wrap to
|
|
2229
|
+
* new rows). When false (default), the control keeps a fixed single-row height
|
|
2230
|
+
* and tags overflow horizontally with a scroll. Set to true to opt in to the
|
|
2231
|
+
* legacy auto-expanding behaviour.
|
|
2232
|
+
*/
|
|
2233
|
+
autoExpand?: boolean;
|
|
2270
2234
|
}
|
|
2271
2235
|
|
|
2272
2236
|
/**
|
|
@@ -2306,12 +2270,16 @@ export declare interface NiceTextAreaProps extends NiceFormFieldProps {
|
|
|
2306
2270
|
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
2307
2271
|
autoFocus?: boolean;
|
|
2308
2272
|
showCount?: boolean;
|
|
2273
|
+
/** Where to display the character counter: 'bottom' (default, below control) or 'right' (beside control). */
|
|
2274
|
+
counterPlacement?: 'bottom' | 'right';
|
|
2309
2275
|
}
|
|
2310
2276
|
|
|
2311
2277
|
export declare const NiceTextInput: default_2.ForwardRefExoticComponent<NiceTextInputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
2312
2278
|
|
|
2313
2279
|
/** Props for the {@link NiceTextInput} component. */
|
|
2314
|
-
export declare interface NiceTextInputProps extends NiceFormFieldProps {
|
|
2280
|
+
export declare interface NiceTextInputProps extends Omit<NiceFormFieldProps, 'labelPlacement'> {
|
|
2281
|
+
/** Where to place the label. 'inside' renders a Material-style floating label that sits as a placeholder inside the input and animates upward when focused or filled. Defaults to 'top'. */
|
|
2282
|
+
labelPlacement?: 'top' | 'left' | 'inside';
|
|
2315
2283
|
/** Controlled input value. */
|
|
2316
2284
|
value?: string;
|
|
2317
2285
|
/** Uncontrolled default value. */
|
|
@@ -2360,6 +2328,27 @@ export declare interface NiceTimePickerProps extends NiceFormFieldProps {
|
|
|
2360
2328
|
max?: string;
|
|
2361
2329
|
/** Show clear button */
|
|
2362
2330
|
clearable?: boolean;
|
|
2331
|
+
/**
|
|
2332
|
+
* Optional explicit target date to combine with the picked time
|
|
2333
|
+
* (`Date` or `YYYY-MM-DD` string). When omitted while {@link countdown}
|
|
2334
|
+
* is enabled, the target auto-resolves to the **next occurrence**:
|
|
2335
|
+
* today if the picked time hasn't passed yet, tomorrow if it has.
|
|
2336
|
+
*/
|
|
2337
|
+
targetDate?: string | Date;
|
|
2338
|
+
/** Fires whenever the resolved target Date changes. */
|
|
2339
|
+
onTargetChange?: (target: Date) => void;
|
|
2340
|
+
/** Show a live countdown label beside the picker. */
|
|
2341
|
+
countdown?: boolean;
|
|
2342
|
+
/** Built-in countdown format preset (default `'verbose'`). */
|
|
2343
|
+
countdownFormat?: NiceCountdownFormat;
|
|
2344
|
+
/** Custom formatter (overrides {@link countdownFormat}). */
|
|
2345
|
+
formatCountdown?: (msRemaining: number, target: Date) => string;
|
|
2346
|
+
/** Label rendered before the countdown text (e.g. `'starts in'`). */
|
|
2347
|
+
countdownLabel?: default_2.ReactNode;
|
|
2348
|
+
/** Update interval in ms (default `1000`). */
|
|
2349
|
+
countdownInterval?: number;
|
|
2350
|
+
/** Text shown when the target time has elapsed (default `'now'`). */
|
|
2351
|
+
countdownDoneText?: string;
|
|
2363
2352
|
}
|
|
2364
2353
|
|
|
2365
2354
|
export declare const NiceToggle: default_2.ForwardRefExoticComponent<NiceToggleProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
@@ -2374,64 +2363,30 @@ export declare interface NiceToggleProps extends NiceBaseProps {
|
|
|
2374
2363
|
onChange?: (checked: boolean) => void;
|
|
2375
2364
|
/** Disables the toggle. */
|
|
2376
2365
|
disabled?: boolean;
|
|
2366
|
+
/** Read-only mode. */
|
|
2367
|
+
readOnly?: boolean;
|
|
2368
|
+
/** Shows a loading spinner inside the control and disables interaction. */
|
|
2369
|
+
loading?: boolean;
|
|
2370
|
+
/** Marks the field as required. */
|
|
2371
|
+
required?: boolean;
|
|
2377
2372
|
/** Visual size. */
|
|
2378
2373
|
size?: NiceSize;
|
|
2379
2374
|
/** HTML name. */
|
|
2380
2375
|
name?: string;
|
|
2376
|
+
/** Validation error message. */
|
|
2377
|
+
error?: string;
|
|
2378
|
+
/** Assistive text shown below the field. */
|
|
2379
|
+
helperText?: string;
|
|
2381
2380
|
/** Show keyboard shortcuts hint. */
|
|
2382
2381
|
showKeyboardHints?: boolean;
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
group?: string;
|
|
2392
|
-
}
|
|
2393
|
-
|
|
2394
|
-
export declare interface NiceTransferListProps {
|
|
2395
|
-
/** All available items */
|
|
2396
|
-
dataSource: NiceTransferListItem[];
|
|
2397
|
-
/** Keys of items in the right (target) list */
|
|
2398
|
-
targetKeys?: string[];
|
|
2399
|
-
/** Controlled selection */
|
|
2400
|
-
selectedKeys?: string[];
|
|
2401
|
-
/** Callback when target keys change */
|
|
2402
|
-
onChange?: (targetKeys: string[], direction: 'left' | 'right', moveKeys: string[]) => void;
|
|
2403
|
-
/** Callback when selection changes */
|
|
2404
|
-
onSelectChange?: (sourceSelectedKeys: string[], targetSelectedKeys: string[]) => void;
|
|
2405
|
-
/** Custom render for items */
|
|
2406
|
-
render?: (item: NiceTransferListItem) => default_2.ReactNode;
|
|
2407
|
-
/** Custom render for list title */
|
|
2408
|
-
titles?: [default_2.ReactNode, default_2.ReactNode];
|
|
2409
|
-
/** Enable searching */
|
|
2410
|
-
showSearch?: boolean;
|
|
2411
|
-
/** Search placeholder */
|
|
2412
|
-
searchPlaceholder?: string;
|
|
2413
|
-
/** Filter function for search */
|
|
2414
|
-
filterOption?: (inputValue: string, item: NiceTransferListItem) => boolean;
|
|
2415
|
-
/** Enable select all */
|
|
2416
|
-
showSelectAll?: boolean;
|
|
2417
|
-
/** Disabled state */
|
|
2418
|
-
disabled?: boolean;
|
|
2419
|
-
/** Enable drag and drop transfer */
|
|
2420
|
-
draggable?: boolean;
|
|
2421
|
-
/** One-way mode (items can only move to target) */
|
|
2422
|
-
oneWay?: boolean;
|
|
2423
|
-
/** Custom operations buttons */
|
|
2424
|
-
operations?: [default_2.ReactNode, default_2.ReactNode];
|
|
2425
|
-
/** Group items by group field */
|
|
2426
|
-
showGroups?: boolean;
|
|
2427
|
-
/** Extra class name */
|
|
2428
|
-
className?: string;
|
|
2429
|
-
/** Inline styles */
|
|
2430
|
-
style?: default_2.CSSProperties;
|
|
2431
|
-
/** Height of the lists */
|
|
2432
|
-
listHeight?: number;
|
|
2433
|
-
/** Test ID */
|
|
2434
|
-
'data-testid'?: string;
|
|
2382
|
+
/** Label position: 'right' (default — to the right of the toggle) or 'left'. */
|
|
2383
|
+
labelPlacement?: 'right' | 'left';
|
|
2384
|
+
/** Error/validation position: 'bottom' (default) or 'right'. */
|
|
2385
|
+
errorPlacement?: 'bottom' | 'right';
|
|
2386
|
+
/** Explicit width for the label column when labelPlacement is 'left'. */
|
|
2387
|
+
labelWidth?: string | number;
|
|
2388
|
+
/** Explicit width for the control column. */
|
|
2389
|
+
controlWidth?: string | number;
|
|
2435
2390
|
}
|
|
2436
2391
|
|
|
2437
2392
|
export declare const NiceTreeSelect: default_2.ForwardRefExoticComponent<NiceTreeSelectProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -2442,6 +2397,7 @@ declare interface NiceTreeSelectNode {
|
|
|
2442
2397
|
label: string;
|
|
2443
2398
|
children?: NiceTreeSelectNode[];
|
|
2444
2399
|
disabled?: boolean;
|
|
2400
|
+
/** @deprecated Icons are no longer rendered — prop kept for backward compatibility. */
|
|
2445
2401
|
icon?: default_2.ReactNode;
|
|
2446
2402
|
}
|
|
2447
2403
|
|
|
@@ -2617,44 +2573,6 @@ declare interface TextAnnotation extends AnnotationBase {
|
|
|
2617
2573
|
|
|
2618
2574
|
declare type TextStyle = 'professional' | 'casual' | 'formal' | 'concise';
|
|
2619
2575
|
|
|
2620
|
-
/**
|
|
2621
|
-
* @fileoverview Traceless™ — Zero-Trace Privacy Architecture
|
|
2622
|
-
* @module @nice2dev/ui/core/traceless
|
|
2623
|
-
*
|
|
2624
|
-
* Traceless™ is OmniVerk's flagship privacy feature that allows complete control
|
|
2625
|
-
* over client-side storage (cookies, localStorage, sessionStorage).
|
|
2626
|
-
*
|
|
2627
|
-
* "Żadnych śladów. Żadnych cookies. Żadnego localStorage. Żadnego bannera. Traceless."
|
|
2628
|
-
*
|
|
2629
|
-
* @example
|
|
2630
|
-
* ```tsx
|
|
2631
|
-
* import { TracelessProvider, useTracelessPolicy, StorageAdapter } from '@nice2dev/ui';
|
|
2632
|
-
*
|
|
2633
|
-
* // In your app root:
|
|
2634
|
-
* <TracelessProvider>
|
|
2635
|
-
* <App />
|
|
2636
|
-
* </TracelessProvider>
|
|
2637
|
-
*
|
|
2638
|
-
* // In components:
|
|
2639
|
-
* const { mode, canUseCookies, canUseLocalStorage } = useTracelessPolicy();
|
|
2640
|
-
* const storage = useStorageAdapter();
|
|
2641
|
-
* storage.set('key', 'value'); // Automatically respects policy
|
|
2642
|
-
* ```
|
|
2643
|
-
*/
|
|
2644
|
-
/**
|
|
2645
|
-
* Privacy storage modes from most private to most permissive.
|
|
2646
|
-
*
|
|
2647
|
-
* | Mode | Cookies | localStorage | sessionStorage | Consent Banner |
|
|
2648
|
-
* |------------|---------|--------------|----------------|----------------|
|
|
2649
|
-
* | traceless | ❌ | ❌ | ❌ | ❌ Never |
|
|
2650
|
-
* | ephemeral | ❌ | ❌ | ✅ | ❌ Never |
|
|
2651
|
-
* | private | 1 auth | ❌ | ✅ | ❌ Exempt |
|
|
2652
|
-
* | balanced | ❌ | ✅ | ✅ | ⚠️ Maybe |
|
|
2653
|
-
* | full | ✅ | ✅ | ✅ | ✅ Required |
|
|
2654
|
-
* | custom | Config | Config | Config | Config |
|
|
2655
|
-
*/
|
|
2656
|
-
declare type TracelessMode = 'traceless' | 'ephemeral' | 'private' | 'balanced' | 'full' | 'custom';
|
|
2657
|
-
|
|
2658
2576
|
/**
|
|
2659
2577
|
* Standard props that can be added to any component to support Traceless policy.
|
|
2660
2578
|
*/
|