@nice2dev/ui 1.0.12 → 1.0.14
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/CHANGELOG.md +28 -0
- package/README.md +53 -36
- package/css/legacy-bg-text-aliases.css +83 -0
- package/dist/NiceErrorBoundary-BLTq8mPU.cjs +1 -0
- package/dist/NiceErrorBoundary-Bjw5U31n.js +762 -0
- package/dist/NiceForm-CUlhtlHw.js +5357 -0
- package/dist/NiceForm-DTgIGX88.cjs +382 -0
- package/dist/NiceForm.css +1 -1
- package/dist/NiceModal-C_t2qqZd.js +95 -0
- package/dist/NiceModal-FQqBxCij.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-CCFHxKIu.js +6343 -0
- package/dist/NiceModuleLifecyclePanel-D8cIOI8I.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -1
- package/dist/NicePagination-BVkkePJU.js +171 -0
- package/dist/NicePagination-DGd3Hrh9.cjs +1 -0
- package/dist/NicePinCodeInput-CDtodnIM.js +11875 -0
- package/dist/NicePinCodeInput-DytLfqZL.cjs +419 -0
- package/dist/NicePinCodeInput.css +1 -1
- package/dist/NiceSavedQueryPanel-CbR3EDQU.cjs +596 -0
- package/dist/NiceSavedQueryPanel-DJqCNWYZ.js +6446 -0
- package/dist/NiceTabs-B-9_mzpc.js +1624 -0
- package/dist/NiceTabs-CHg36waF.cjs +1 -0
- package/dist/NiceWindow-BxGVzUs2.js +1409 -0
- package/dist/NiceWindow-HhPIzPzs.cjs +1 -0
- package/dist/charts-Us8Ep8MJ.cjs +761 -0
- package/dist/charts-fO6InNZd.js +4645 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.mjs +1 -1
- package/dist/core-B-tu8l9M.cjs +96 -0
- package/dist/core-BJ_UNMlX.js +22276 -0
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +7 -0
- package/dist/data.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.mjs +3 -3
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.mjs +2 -2
- package/dist/index-DHc_KZkF.js +61311 -0
- package/dist/index-drIVMHeC.cjs +5194 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1140 -63
- package/dist/index.mjs +833 -819
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.mjs +3 -3
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +309 -70
- package/dist/navigation.mjs +91 -90
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.mjs +2 -2
- package/dist/style.css +7 -0
- package/package.json +9 -5
package/dist/index.d.ts
CHANGED
|
@@ -2734,6 +2734,9 @@ export { createCustomDataSource }
|
|
|
2734
2734
|
*/
|
|
2735
2735
|
export declare function createDocIndex(docs: ComponentDoc[], packageName: string): DocIndex;
|
|
2736
2736
|
|
|
2737
|
+
/** Build an empty recipe scaffold (used by NiceRecipeEditor "new" mode). */
|
|
2738
|
+
export declare function createEmptyRecipe(partial?: Partial<NiceRecipeModel>): NiceRecipeModel;
|
|
2739
|
+
|
|
2737
2740
|
export { createGraphQLDataSource }
|
|
2738
2741
|
|
|
2739
2742
|
export { createGraphQLSubscriptionSource }
|
|
@@ -6700,6 +6703,9 @@ export declare type NetworkNodeCategory = 'router' | 'switch' | 'access-point' |
|
|
|
6700
6703
|
|
|
6701
6704
|
export declare type NetworkNodeStatus = 'online' | 'offline' | 'warning';
|
|
6702
6705
|
|
|
6706
|
+
/** Tiny non-cryptographic id generator suitable for UI-only records. */
|
|
6707
|
+
export declare function newRecipeId(prefix?: string): string;
|
|
6708
|
+
|
|
6703
6709
|
export { NICE_BREAKPOINTS }
|
|
6704
6710
|
|
|
6705
6711
|
export { NICE_BUILTIN_ICONS }
|
|
@@ -7267,6 +7273,42 @@ export declare interface NiceAuditLogProps {
|
|
|
7267
7273
|
'data-testid'?: string;
|
|
7268
7274
|
}
|
|
7269
7275
|
|
|
7276
|
+
export declare const NiceAuthButtons: default_2.ForwardRefExoticComponent<NiceAuthButtonsProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
7277
|
+
|
|
7278
|
+
export declare interface NiceAuthButtonsProps {
|
|
7279
|
+
/**
|
|
7280
|
+
* Authenticated user — when set, renders the user-menu instead of
|
|
7281
|
+
* login/register buttons.
|
|
7282
|
+
*/
|
|
7283
|
+
user?: NiceAuthUser;
|
|
7284
|
+
/** Items shown in the user-menu dropdown (only when `user` is set). */
|
|
7285
|
+
userMenuItems?: UserMenuItem[];
|
|
7286
|
+
/** Convenience handler appended as a "Profile" item if no items are given. */
|
|
7287
|
+
onProfile?: () => void;
|
|
7288
|
+
/** Convenience handler appended as a "Logout" item if no items are given. */
|
|
7289
|
+
onLogout?: () => void;
|
|
7290
|
+
/** Show the "Sign in" button when no `user`. Default: `true`. */
|
|
7291
|
+
showLogin?: boolean;
|
|
7292
|
+
/** Login button label. */
|
|
7293
|
+
loginLabel?: string;
|
|
7294
|
+
/** Login click handler. */
|
|
7295
|
+
onLoginClick?: () => void;
|
|
7296
|
+
/** Show the "Register" button when no `user`. Default: auto-true if `onRegisterClick` provided. */
|
|
7297
|
+
showRegister?: boolean;
|
|
7298
|
+
/** Register button label. */
|
|
7299
|
+
registerLabel?: string;
|
|
7300
|
+
/** Register click handler. */
|
|
7301
|
+
onRegisterClick?: () => void;
|
|
7302
|
+
/** Button size. */
|
|
7303
|
+
size?: NiceSize;
|
|
7304
|
+
/** Compact mode — hides login button text on narrow viewports (CSS-driven). */
|
|
7305
|
+
compact?: boolean;
|
|
7306
|
+
className?: string;
|
|
7307
|
+
style?: default_2.CSSProperties;
|
|
7308
|
+
id?: string;
|
|
7309
|
+
'data-testid'?: string;
|
|
7310
|
+
}
|
|
7311
|
+
|
|
7270
7312
|
/**
|
|
7271
7313
|
* {@link NiceAuthGuard} — Protected route/section wrapper.
|
|
7272
7314
|
* Checks authentication and permission/role requirements before rendering children.
|
|
@@ -7297,6 +7339,21 @@ export declare interface NiceAuthGuardProps {
|
|
|
7297
7339
|
children: default_2.ReactNode;
|
|
7298
7340
|
}
|
|
7299
7341
|
|
|
7342
|
+
export declare interface NiceAuthUser {
|
|
7343
|
+
/** Display name. */
|
|
7344
|
+
name: string;
|
|
7345
|
+
/** Avatar image URL. */
|
|
7346
|
+
avatarUrl?: string;
|
|
7347
|
+
/** Initials fallback (auto-derived from `name` when omitted). */
|
|
7348
|
+
initials?: string;
|
|
7349
|
+
/** Optional email address shown in the user-menu header. */
|
|
7350
|
+
email?: string;
|
|
7351
|
+
/** Optional role/title shown in the user-menu header. */
|
|
7352
|
+
role?: string;
|
|
7353
|
+
/** Online status indicator. */
|
|
7354
|
+
status?: 'online' | 'away' | 'busy' | 'offline';
|
|
7355
|
+
}
|
|
7356
|
+
|
|
7300
7357
|
export declare const NiceAutocomplete: default_2.FC<NiceAutocompleteProps>;
|
|
7301
7358
|
|
|
7302
7359
|
/** Props for the {@link NiceAutocomplete} component — a text input with filtered suggestion dropdown and optional multi-select. */
|
|
@@ -11221,6 +11278,8 @@ export declare interface NiceFileManagerProps extends NiceBaseProps {
|
|
|
11221
11278
|
viewMode?: 'list' | 'detail' | 'thumbnails';
|
|
11222
11279
|
selectable?: boolean;
|
|
11223
11280
|
showBreadcrumb?: boolean;
|
|
11281
|
+
/** Show top toolbar with single/dual-pane switch + view mode toggles + search */
|
|
11282
|
+
showTopToolbar?: boolean;
|
|
11224
11283
|
/** Show function-key toolbar at bottom (dual-pane style) */
|
|
11225
11284
|
showFnToolbar?: boolean;
|
|
11226
11285
|
/** Show status bar with selection summary */
|
|
@@ -11257,6 +11316,10 @@ export declare interface NiceFileManagerProps extends NiceBaseProps {
|
|
|
11257
11316
|
onRefresh?: (panel?: NiceFilePanel) => void;
|
|
11258
11317
|
/** Sort change */
|
|
11259
11318
|
onSortChange?: (sort: NiceFileSort, panel?: NiceFilePanel) => void;
|
|
11319
|
+
/** Top toolbar — toggle dual-pane mode (called when user clicks Single/Dual buttons) */
|
|
11320
|
+
onDualPaneChange?: (dual: boolean) => void;
|
|
11321
|
+
/** Top toolbar — change view mode */
|
|
11322
|
+
onViewModeChange?: (mode: 'list' | 'detail' | 'thumbnails') => void;
|
|
11260
11323
|
}
|
|
11261
11324
|
|
|
11262
11325
|
/** Active panel identifier for dual-pane {@link NiceFileManager}. */
|
|
@@ -12498,6 +12561,31 @@ export { NiceInfiniteScrollConfig }
|
|
|
12498
12561
|
|
|
12499
12562
|
export { NiceInfiniteScrollState }
|
|
12500
12563
|
|
|
12564
|
+
/**
|
|
12565
|
+
* Shared meal/recipe/ingredient models.
|
|
12566
|
+
*
|
|
12567
|
+
* Used by:
|
|
12568
|
+
* - NiceRecipe (planning) — display
|
|
12569
|
+
* - NiceRecipeEditor (tools) — editing
|
|
12570
|
+
* - NiceScheduler (planning) — when an event has `eventType: 'recipe'`
|
|
12571
|
+
*/
|
|
12572
|
+
/** A single measurable component of a recipe (e.g. "200 g flour"). */
|
|
12573
|
+
export declare interface NiceIngredient {
|
|
12574
|
+
id: string;
|
|
12575
|
+
/** Display name, e.g. "All-purpose flour". */
|
|
12576
|
+
name: string;
|
|
12577
|
+
/** Numeric amount (parsed). Use `unit` for the measurement. */
|
|
12578
|
+
quantity?: number;
|
|
12579
|
+
/** Free-form unit string: "g", "ml", "tbsp", "cup", "pcs". */
|
|
12580
|
+
unit?: string;
|
|
12581
|
+
/** Free-form notes shown next to the ingredient ("sifted", "room temp"). */
|
|
12582
|
+
notes?: string;
|
|
12583
|
+
/** Optional grouping ("Dough", "Filling", "Topping"). */
|
|
12584
|
+
group?: string;
|
|
12585
|
+
/** Marks the ingredient as completed in interactive shopping/cook mode. */
|
|
12586
|
+
checked?: boolean;
|
|
12587
|
+
}
|
|
12588
|
+
|
|
12501
12589
|
export { NiceInlineHelp }
|
|
12502
12590
|
|
|
12503
12591
|
export { NiceInlineHelpProps }
|
|
@@ -12694,6 +12782,8 @@ export declare interface NiceKanbanBoardProps extends NiceBaseProps, TracelessSt
|
|
|
12694
12782
|
size?: NiceSize;
|
|
12695
12783
|
/** Allow columns to be collapsed */
|
|
12696
12784
|
collapsible?: boolean;
|
|
12785
|
+
/** Layout mode — `scroll` (default, horizontal scroll when overflowing) or `responsive` (columns wrap to fit container width). */
|
|
12786
|
+
layoutMode?: NiceKanbanLayoutMode;
|
|
12697
12787
|
/** View mode (default, compact, detailed) */
|
|
12698
12788
|
viewMode?: NiceKanbanViewMode;
|
|
12699
12789
|
/** Callback when view mode changes */
|
|
@@ -12748,6 +12838,11 @@ export declare interface NiceKanbanColumn {
|
|
|
12748
12838
|
limit?: number;
|
|
12749
12839
|
}
|
|
12750
12840
|
|
|
12841
|
+
/** Layout mode for the kanban board container.
|
|
12842
|
+
* - `scroll`: Columns keep their min/max width and the board scrolls horizontally when they don't fit (default).
|
|
12843
|
+
* - `responsive`: Columns wrap onto multiple rows and flex-grow to fill the available width — no horizontal overflow. */
|
|
12844
|
+
declare type NiceKanbanLayoutMode = 'scroll' | 'responsive';
|
|
12845
|
+
|
|
12751
12846
|
/** Persisted state for NiceKanbanBoard */
|
|
12752
12847
|
export declare interface NiceKanbanPersistedState {
|
|
12753
12848
|
/** Collapsed column keys */
|
|
@@ -13351,6 +13446,57 @@ export declare interface NiceLoginFormProps extends NiceBaseProps {
|
|
|
13351
13446
|
passwordPlaceholder?: string;
|
|
13352
13447
|
}
|
|
13353
13448
|
|
|
13449
|
+
export declare const NiceLogo: default_2.ForwardRefExoticComponent<NiceLogoProps & default_2.RefAttributes<HTMLElement>>;
|
|
13450
|
+
|
|
13451
|
+
export declare interface NiceLogoProps {
|
|
13452
|
+
/** Image URL to render as `<img>`. Has priority over `icon` and `variant`. */
|
|
13453
|
+
src?: string;
|
|
13454
|
+
/** Custom icon node (SVG / NiceIcon / emoji). Has priority over `variant`. */
|
|
13455
|
+
icon?: default_2.ReactNode;
|
|
13456
|
+
/**
|
|
13457
|
+
* Pre-built brand mark variant from the OmniVerk family.
|
|
13458
|
+
* Used when neither `src` nor `icon` is provided.
|
|
13459
|
+
* Default: `'mark'`.
|
|
13460
|
+
*/
|
|
13461
|
+
variant?: NiceLogoVariant;
|
|
13462
|
+
/** Brand name rendered next to the icon. Hidden if `iconOnly` is true. */
|
|
13463
|
+
text?: string;
|
|
13464
|
+
/** Render only the icon (no text). */
|
|
13465
|
+
iconOnly?: boolean;
|
|
13466
|
+
/** Render only the text (no icon). */
|
|
13467
|
+
textOnly?: boolean;
|
|
13468
|
+
/**
|
|
13469
|
+
* Logo height in pixels — width is derived to preserve aspect ratio.
|
|
13470
|
+
* Accepts presets (`xs`/`sm`/`md`/`lg`/`xl`) or a raw number.
|
|
13471
|
+
* Default: `'md'` (32 px).
|
|
13472
|
+
*/
|
|
13473
|
+
size?: NiceLogoSize;
|
|
13474
|
+
/**
|
|
13475
|
+
* Render as `<a href>` link.
|
|
13476
|
+
* If neither `href` nor `onClick` is set, the logo is a static `<span>`.
|
|
13477
|
+
*/
|
|
13478
|
+
href?: string;
|
|
13479
|
+
/** Click handler — renders as `<button>`. */
|
|
13480
|
+
onClick?: () => void;
|
|
13481
|
+
/** Accessible label (default: `text` or "Brand"). */
|
|
13482
|
+
ariaLabel?: string;
|
|
13483
|
+
className?: string;
|
|
13484
|
+
style?: default_2.CSSProperties;
|
|
13485
|
+
id?: string;
|
|
13486
|
+
'data-testid'?: string;
|
|
13487
|
+
}
|
|
13488
|
+
|
|
13489
|
+
export declare type NiceLogoSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
|
|
13490
|
+
|
|
13491
|
+
/**
|
|
13492
|
+
* Brand mark variant.
|
|
13493
|
+
* - `mark` (default): symbol only — diamond + triangle (NtdOmniVerk).
|
|
13494
|
+
* - `badge`: rounded-square enclosed mark (NtdOmniVerkBadge), good for favicons / chips.
|
|
13495
|
+
* - `spinner`: animated rotating mark (NtdOmniVerkSpinner) — use for loading states.
|
|
13496
|
+
* - `logo`: full mark + wordmark side-by-side (NtdOmniVerkLogo).
|
|
13497
|
+
*/
|
|
13498
|
+
export declare type NiceLogoVariant = 'mark' | 'badge' | 'spinner' | 'logo';
|
|
13499
|
+
|
|
13354
13500
|
export declare const NiceLookup: default_2.FC<NiceLookupProps>;
|
|
13355
13501
|
|
|
13356
13502
|
/** Column definition for the mini-grid lookup mode. */
|
|
@@ -13657,50 +13803,50 @@ export declare interface NiceMdiWorkspaceProps extends NiceBaseProps {
|
|
|
13657
13803
|
unsavedWarningMessage?: string;
|
|
13658
13804
|
}
|
|
13659
13805
|
|
|
13660
|
-
|
|
13661
|
-
|
|
13662
|
-
|
|
13663
|
-
|
|
13664
|
-
|
|
13665
|
-
|
|
13666
|
-
|
|
13667
|
-
|
|
13668
|
-
|
|
13669
|
-
|
|
13670
|
-
/**
|
|
13671
|
-
|
|
13672
|
-
|
|
13673
|
-
key: string;
|
|
13674
|
-
/** Display label. */
|
|
13675
|
-
label: string;
|
|
13676
|
-
/** Optional icon. */
|
|
13677
|
-
icon?: default_2.ReactNode;
|
|
13678
|
-
/** If set, renders the item as a link. */
|
|
13679
|
-
href?: string;
|
|
13680
|
-
/** Click handler. */
|
|
13681
|
-
onClick?: () => void;
|
|
13682
|
-
/** Disable the item. */
|
|
13683
|
-
disabled?: boolean;
|
|
13806
|
+
/** A planned meal — references one or more recipes. */
|
|
13807
|
+
export declare interface NiceMeal {
|
|
13808
|
+
id: string;
|
|
13809
|
+
/** Display name, e.g. "Sunday Brunch". */
|
|
13810
|
+
name: string;
|
|
13811
|
+
/** Date/time the meal is served. */
|
|
13812
|
+
servedAt?: Date;
|
|
13813
|
+
kind?: NiceMealKind;
|
|
13814
|
+
/** Recipes that compose this meal. */
|
|
13815
|
+
recipeIds: string[];
|
|
13816
|
+
/** Optional override of total servings for this meal. */
|
|
13817
|
+
servings?: number;
|
|
13818
|
+
notes?: string;
|
|
13684
13819
|
}
|
|
13685
13820
|
|
|
13686
|
-
/**
|
|
13687
|
-
export declare
|
|
13688
|
-
/** Unique key. */
|
|
13689
|
-
key: string;
|
|
13690
|
-
/** Panel trigger label. */
|
|
13691
|
-
label: string;
|
|
13692
|
-
/** Multi-column layout. */
|
|
13693
|
-
columns: NiceMegaMenuColumn[];
|
|
13694
|
-
/** Fully custom panel renderer (overrides columns). */
|
|
13695
|
-
renderPanel?: () => default_2.ReactNode;
|
|
13696
|
-
}
|
|
13821
|
+
/** Meal kind used by meal planners. */
|
|
13822
|
+
export declare type NiceMealKind = 'breakfast' | 'lunch' | 'dinner' | 'snack' | 'other';
|
|
13697
13823
|
|
|
13698
|
-
/**
|
|
13699
|
-
|
|
13700
|
-
|
|
13701
|
-
|
|
13702
|
-
|
|
13703
|
-
|
|
13824
|
+
/**
|
|
13825
|
+
* Weekly meal planner — rows are meal kinds (breakfast/lunch/dinner by
|
|
13826
|
+
* default), columns are the seven days starting at {@link weekStart}.
|
|
13827
|
+
* Each cell shows the meals served at that day+kind; users can add a
|
|
13828
|
+
* recipe from the pool via the cell's `+` picker, or remove individual
|
|
13829
|
+
* meal cards. Pure-client state (raises {@link onChange} with the new
|
|
13830
|
+
* meals array).
|
|
13831
|
+
*
|
|
13832
|
+
* Pairs naturally with `NiceScheduler` — meal `servedAt` dates can be
|
|
13833
|
+
* surfaced as scheduler events upstream.
|
|
13834
|
+
*/
|
|
13835
|
+
export declare const NiceMealPlan: default_2.FC<NiceMealPlanProps>;
|
|
13836
|
+
|
|
13837
|
+
export declare interface NiceMealPlanProps extends NiceBaseProps {
|
|
13838
|
+
/** Pool of recipes the user can pick from. */
|
|
13839
|
+
recipes: NiceRecipeModel[];
|
|
13840
|
+
/** Planned meals. */
|
|
13841
|
+
meals: NiceMeal[];
|
|
13842
|
+
/** Called whenever the meal list changes. */
|
|
13843
|
+
onChange?: (meals: NiceMeal[]) => void;
|
|
13844
|
+
/** First day of the week to render (defaults to today's Monday). */
|
|
13845
|
+
weekStart?: Date;
|
|
13846
|
+
/** Which meal-kind rows to show (default: breakfast/lunch/dinner). */
|
|
13847
|
+
rows?: NiceMealKind[];
|
|
13848
|
+
/** Read-only mode (no add/remove/move). */
|
|
13849
|
+
readOnly?: boolean;
|
|
13704
13850
|
}
|
|
13705
13851
|
|
|
13706
13852
|
export declare const NiceMention: default_2.ForwardRefExoticComponent<NiceMentionProps & default_2.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -13731,34 +13877,146 @@ export declare interface NiceMentionSuggestion {
|
|
|
13731
13877
|
|
|
13732
13878
|
export declare const NiceMenu: default_2.FC<NiceMenuProps>;
|
|
13733
13879
|
|
|
13734
|
-
|
|
13880
|
+
export declare type NiceMenuAlign = 'start' | 'center' | 'end';
|
|
13881
|
+
|
|
13882
|
+
export declare type NiceMenuDensity = 'compact' | 'normal' | 'comfortable';
|
|
13883
|
+
|
|
13884
|
+
/**
|
|
13885
|
+
* A single entry in {@link NiceMenu}. Both legacy (`key` + `text` + `items`)
|
|
13886
|
+
* and new (`id` + `label` + `children`) shapes are accepted; new fields
|
|
13887
|
+
* take precedence when both are supplied.
|
|
13888
|
+
*/
|
|
13735
13889
|
export declare interface NiceMenuItem {
|
|
13736
|
-
/**
|
|
13737
|
-
|
|
13738
|
-
/**
|
|
13739
|
-
|
|
13740
|
-
/**
|
|
13890
|
+
/** New canonical identifier. */
|
|
13891
|
+
id?: string;
|
|
13892
|
+
/** Legacy alias for `id`. */
|
|
13893
|
+
key?: string;
|
|
13894
|
+
/** New canonical label (string or arbitrary node). */
|
|
13895
|
+
label?: default_2.ReactNode;
|
|
13896
|
+
/** Legacy alias for `label`. */
|
|
13897
|
+
text?: string;
|
|
13898
|
+
/** Optional small description shown under the label inside dropdown panels. */
|
|
13899
|
+
description?: default_2.ReactNode;
|
|
13900
|
+
/** Leading icon. */
|
|
13741
13901
|
icon?: default_2.ReactNode;
|
|
13742
|
-
/**
|
|
13902
|
+
/** Optional badge (string / number) shown to the right of the label. */
|
|
13903
|
+
badge?: default_2.ReactNode;
|
|
13904
|
+
/** When set, renders the entry as an `<a>`. */
|
|
13905
|
+
href?: string;
|
|
13906
|
+
/** Anchor target. */
|
|
13907
|
+
target?: string;
|
|
13908
|
+
/** Anchor rel. */
|
|
13909
|
+
rel?: string;
|
|
13910
|
+
/** Click handler. */
|
|
13911
|
+
onClick?: (event: default_2.MouseEvent) => void;
|
|
13912
|
+
/** Disable the entry. */
|
|
13743
13913
|
disabled?: boolean;
|
|
13744
|
-
/**
|
|
13914
|
+
/** Render the entry as a danger / destructive action. */
|
|
13915
|
+
danger?: boolean;
|
|
13916
|
+
/** When `true`, render a horizontal divider instead of an entry (panel-only). */
|
|
13917
|
+
divider?: boolean;
|
|
13918
|
+
/** New canonical children list (only the first level of nesting opens a flyout). */
|
|
13919
|
+
children?: NiceMenuItem[];
|
|
13920
|
+
/** Legacy alias for `children`. */
|
|
13745
13921
|
items?: NiceMenuItem[];
|
|
13746
|
-
/**
|
|
13747
|
-
|
|
13922
|
+
/** Tooltip / `aria-label` override. */
|
|
13923
|
+
ariaLabel?: string;
|
|
13748
13924
|
}
|
|
13749
13925
|
|
|
13750
|
-
|
|
13926
|
+
export declare type NiceMenuOrientation = 'horizontal' | 'vertical';
|
|
13927
|
+
|
|
13751
13928
|
export declare interface NiceMenuProps extends NiceBaseProps {
|
|
13752
|
-
/** Size variant. */
|
|
13753
|
-
size?: NiceSize;
|
|
13754
13929
|
/** Menu items. */
|
|
13755
13930
|
items: NiceMenuItem[];
|
|
13756
13931
|
/** Layout direction. */
|
|
13757
|
-
orientation?:
|
|
13758
|
-
/**
|
|
13759
|
-
|
|
13932
|
+
orientation?: NiceMenuOrientation;
|
|
13933
|
+
/** Visual style. */
|
|
13934
|
+
variant?: NiceMenuVariant;
|
|
13935
|
+
/** Density preset (paddings + font size). */
|
|
13936
|
+
density?: NiceMenuDensity;
|
|
13937
|
+
/** Size preset. */
|
|
13938
|
+
size?: NiceSize;
|
|
13939
|
+
/** Stretch top-level items to fill the container. */
|
|
13940
|
+
fullWidth?: boolean;
|
|
13941
|
+
/** Show vertical separators between top items. */
|
|
13942
|
+
showDividers?: boolean;
|
|
13943
|
+
/** Top-item alignment for dropdown panels. */
|
|
13944
|
+
panelAlign?: NiceMenuAlign;
|
|
13945
|
+
/** Min width for dropdown / sub-panel (px). */
|
|
13946
|
+
panelMinWidth?: number;
|
|
13947
|
+
/** Max width for dropdown / sub-panel (px). */
|
|
13948
|
+
panelMaxWidth?: number;
|
|
13949
|
+
/**
|
|
13950
|
+
* Gap (in px or any CSS length) between top-level items. Use `0` for
|
|
13951
|
+
* a fully flush bar (e.g. tab-bar look). Default: density-driven (`4px`).
|
|
13952
|
+
*/
|
|
13953
|
+
itemGap?: number | string;
|
|
13954
|
+
/**
|
|
13955
|
+
* Horizontal padding inside each top-level button. Overrides density.
|
|
13956
|
+
* Accepts a number (treated as `px`) or any CSS length.
|
|
13957
|
+
*/
|
|
13958
|
+
paddingX?: number | string;
|
|
13959
|
+
/**
|
|
13960
|
+
* Vertical padding inside each top-level button. Overrides density.
|
|
13961
|
+
* Accepts a number (treated as `px`) or any CSS length.
|
|
13962
|
+
*/
|
|
13963
|
+
paddingY?: number | string;
|
|
13964
|
+
/**
|
|
13965
|
+
* Render dropdown / sub-panels in a `document.body` portal so the menu
|
|
13966
|
+
* never gets clipped by `overflow: hidden` ancestors. Default: `true`.
|
|
13967
|
+
* Set `false` to fall back to the legacy absolute-positioned panel.
|
|
13968
|
+
*/
|
|
13969
|
+
portal?: boolean;
|
|
13970
|
+
/**
|
|
13971
|
+
* z-index applied to the portalled dropdown panel. Default: `1100`.
|
|
13972
|
+
*/
|
|
13973
|
+
panelZIndex?: number;
|
|
13974
|
+
/** Custom arrow node for items with children. Default: `▾`. */
|
|
13975
|
+
arrowIcon?: default_2.ReactNode;
|
|
13976
|
+
/** Custom flyout arrow shown next to nested items. Default: `▸`. */
|
|
13977
|
+
flyoutArrowIcon?: default_2.ReactNode;
|
|
13978
|
+
/** Close the panel after selecting any leaf entry. Default: `true`. */
|
|
13979
|
+
closeOnSelect?: boolean;
|
|
13980
|
+
/**
|
|
13981
|
+
* How to open dropdown panels:
|
|
13982
|
+
* - `click` (default) — toggle on trigger click only.
|
|
13983
|
+
* - `hover` — open on pointer-enter, close on pointer-leave (after `closeDelay`).
|
|
13984
|
+
* - `both` — opens on hover *and* click (best-of-both for mega-menus).
|
|
13985
|
+
*/
|
|
13986
|
+
openTrigger?: 'click' | 'hover' | 'both';
|
|
13987
|
+
/** Delay (ms) before opening on hover. Default: `120`. */
|
|
13988
|
+
openDelay?: number;
|
|
13989
|
+
/** Delay (ms) before closing after pointer leaves the menu+panel. Default: `180`. */
|
|
13990
|
+
closeDelay?: number;
|
|
13991
|
+
/** Notified whenever the open trigger id changes (null = closed). */
|
|
13992
|
+
onOpenChange?: (id: string | null) => void;
|
|
13993
|
+
/** Highlight the matching id (or any of its ancestors). */
|
|
13994
|
+
activeId?: string;
|
|
13995
|
+
/** Legacy alias for `activeId`. */
|
|
13996
|
+
activeKey?: string;
|
|
13997
|
+
/** Called when any leaf is clicked. */
|
|
13998
|
+
onItemClick?: (item: NiceMenuItem, event: default_2.MouseEvent) => void;
|
|
13999
|
+
/** Accessible name for the wrapper `<nav>`. */
|
|
14000
|
+
ariaLabel?: string;
|
|
14001
|
+
/** Optional renderer for top-level trigger label (allows wrapping with i18n components). */
|
|
14002
|
+
renderTriggerLabel?: (item: NiceMenuItem) => default_2.ReactNode;
|
|
14003
|
+
/** Optional renderer for panel-entry label. */
|
|
14004
|
+
renderEntryLabel?: (item: NiceMenuItem) => default_2.ReactNode;
|
|
13760
14005
|
}
|
|
13761
14006
|
|
|
14007
|
+
/**
|
|
14008
|
+
* Visual style for top-level triggers.
|
|
14009
|
+
* - `separated` — soft buttons with gap (default-ish)
|
|
14010
|
+
* - `group` — flush button-group with shared border
|
|
14011
|
+
* - `pills` — rounded pills, primary fill on active
|
|
14012
|
+
* - `ghost` — chrome-less, hover only (used by NiceTopNav)
|
|
14013
|
+
* - `solid` — opaque buttons on `--bg-elevated`
|
|
14014
|
+
* - `underline` — flat with animated underline on hover/active
|
|
14015
|
+
* - `tabs` — tab-bar look (top-rounded, bottom border)
|
|
14016
|
+
* - `glass` — translucent blurred background
|
|
14017
|
+
*/
|
|
14018
|
+
export declare type NiceMenuVariant = 'separated' | 'group' | 'pills' | 'ghost' | 'solid' | 'underline' | 'tabs' | 'glass' | 'bordered' | 'borderless';
|
|
14019
|
+
|
|
13762
14020
|
export declare const NiceMergeRequestBuilder: default_2.FC<NiceMergeRequestBuilderProps>;
|
|
13763
14021
|
|
|
13764
14022
|
export declare interface NiceMergeRequestBuilderProps extends NiceBaseProps {
|
|
@@ -14319,6 +14577,197 @@ export declare interface NiceNavbarProps extends NiceFormFieldProps {
|
|
|
14319
14577
|
onBrandClick?: () => void;
|
|
14320
14578
|
}
|
|
14321
14579
|
|
|
14580
|
+
export declare const NiceNavMenu: default_2.ForwardRefExoticComponent<NiceNavMenuProps & default_2.RefAttributes<HTMLElement>>;
|
|
14581
|
+
|
|
14582
|
+
export declare type NiceNavMenuAlign = 'start' | 'end' | 'auto';
|
|
14583
|
+
|
|
14584
|
+
export declare interface NiceNavMenuItem {
|
|
14585
|
+
/** Stable id used for active-marking and keyboard focus. */
|
|
14586
|
+
id: string;
|
|
14587
|
+
/** Displayed label. */
|
|
14588
|
+
label: default_2.ReactNode;
|
|
14589
|
+
/** Optional icon (emoji, SVG node, NiceIcon). */
|
|
14590
|
+
icon?: default_2.ReactNode;
|
|
14591
|
+
/** Navigation href (rendered as `<a>` when no children). */
|
|
14592
|
+
href?: string;
|
|
14593
|
+
/** Anchor `target` attribute (only when `href` is set). */
|
|
14594
|
+
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
14595
|
+
/** Anchor `rel` attribute (only when `href` is set). */
|
|
14596
|
+
rel?: string;
|
|
14597
|
+
/** Click handler (rendered as `<button>` when no `href`). */
|
|
14598
|
+
onClick?: (e: default_2.MouseEvent) => void;
|
|
14599
|
+
/** Disable the item. */
|
|
14600
|
+
disabled?: boolean;
|
|
14601
|
+
/** Render as a danger action (red text). */
|
|
14602
|
+
danger?: boolean;
|
|
14603
|
+
/** Render as a divider (label/icon ignored). */
|
|
14604
|
+
divider?: boolean;
|
|
14605
|
+
/** Optional badge node rendered to the right of the label. */
|
|
14606
|
+
badge?: default_2.ReactNode;
|
|
14607
|
+
/** Optional secondary text shown under the label inside dropdowns. */
|
|
14608
|
+
description?: string;
|
|
14609
|
+
/** Sub-items (only honored at level-1 to produce a level-2 flyout). */
|
|
14610
|
+
children?: NiceNavMenuItem[];
|
|
14611
|
+
/**
|
|
14612
|
+
* **Mega menu** — when set on a top-level item, opens a FULL-WIDTH panel
|
|
14613
|
+
* anchored to the bar's bottom edge instead of a floating dropdown. Use for
|
|
14614
|
+
* marketing/SaaS navs where you want rich multi-column content.
|
|
14615
|
+
*
|
|
14616
|
+
* Either pass a ready `megaPanel` JSX node, or use the structured
|
|
14617
|
+
* `megaColumns` shorthand which renders a clean column-based layout for you.
|
|
14618
|
+
* Both can be set; `megaPanel` wins.
|
|
14619
|
+
*/
|
|
14620
|
+
megaPanel?: default_2.ReactNode | (() => default_2.ReactNode);
|
|
14621
|
+
/** Structured mega-menu data — rendered as columns of items. */
|
|
14622
|
+
megaColumns?: NiceNavMenuMegaColumn[];
|
|
14623
|
+
/** Optional footer node rendered at the bottom of the mega panel (CTA strip). */
|
|
14624
|
+
megaFooter?: default_2.ReactNode;
|
|
14625
|
+
}
|
|
14626
|
+
|
|
14627
|
+
/** A single column of items inside a mega-menu panel. */
|
|
14628
|
+
export declare interface NiceNavMenuMegaColumn {
|
|
14629
|
+
/** Optional column heading. */
|
|
14630
|
+
title?: default_2.ReactNode;
|
|
14631
|
+
/** Items rendered in the column (no nested mega; each is a simple item). */
|
|
14632
|
+
items: NiceNavMenuItem[];
|
|
14633
|
+
/** Optional footer node under this column (e.g. "View all" link). */
|
|
14634
|
+
footer?: default_2.ReactNode;
|
|
14635
|
+
}
|
|
14636
|
+
|
|
14637
|
+
export declare interface NiceNavMenuProps {
|
|
14638
|
+
/** Top-level items. */
|
|
14639
|
+
items: NiceNavMenuItem[];
|
|
14640
|
+
/** Currently active item id (matched against any nested item id). */
|
|
14641
|
+
activeId?: string;
|
|
14642
|
+
/** Size scale. Default `'md'`. */
|
|
14643
|
+
size?: NiceNavMenuSize;
|
|
14644
|
+
/** Dropdown panel alignment. Default `'start'`. */
|
|
14645
|
+
align?: NiceNavMenuAlign;
|
|
14646
|
+
/** Accessible label for the surrounding `<nav>`. */
|
|
14647
|
+
ariaLabel?: string;
|
|
14648
|
+
/** Render full-width (top-level items stretch to fill). Default `false`. */
|
|
14649
|
+
stretch?: boolean;
|
|
14650
|
+
/**
|
|
14651
|
+
* How top-level dropdowns / mega-panels open. Default `'click'` for backward
|
|
14652
|
+
* compatibility. Set to `'hover'` to get the classical desktop mega-menu
|
|
14653
|
+
* pattern (Apple / Microsoft / Stripe) — opens on mouse-enter, closes after
|
|
14654
|
+
* a short grace delay so the cursor can travel into the panel.
|
|
14655
|
+
*/
|
|
14656
|
+
trigger?: 'click' | 'hover';
|
|
14657
|
+
/** Hover-close grace delay in ms. Default 150. Only used when `trigger='hover'`. */
|
|
14658
|
+
hoverCloseDelay?: number;
|
|
14659
|
+
/** Pass-through className. */
|
|
14660
|
+
className?: string;
|
|
14661
|
+
/** Pass-through style. */
|
|
14662
|
+
style?: default_2.CSSProperties;
|
|
14663
|
+
/** Pass-through id. */
|
|
14664
|
+
id?: string;
|
|
14665
|
+
/** Test id. */
|
|
14666
|
+
'data-testid'?: string;
|
|
14667
|
+
}
|
|
14668
|
+
|
|
14669
|
+
export declare type NiceNavMenuSize = 'sm' | 'md' | 'lg';
|
|
14670
|
+
|
|
14671
|
+
export declare const NiceNavShell: ForwardRefExoticComponent<NiceNavShellProps & RefAttributes<HTMLDivElement>>;
|
|
14672
|
+
|
|
14673
|
+
export declare interface NiceNavShellApi {
|
|
14674
|
+
activeRoute: string | undefined;
|
|
14675
|
+
tabs: NiceNavShellTab[];
|
|
14676
|
+
openRoute: (route: string, opts?: Partial<NiceNavShellTab>) => void;
|
|
14677
|
+
closeTab: (id: string) => void;
|
|
14678
|
+
closeOthers: (id: string) => void;
|
|
14679
|
+
closeAll: () => void;
|
|
14680
|
+
pinTab: (id: string, pinned?: boolean) => void;
|
|
14681
|
+
setDirty: (id: string, dirty?: boolean) => void;
|
|
14682
|
+
}
|
|
14683
|
+
|
|
14684
|
+
export declare type NiceNavShellPersistence = 'memory' | 'localStorage' | 'session';
|
|
14685
|
+
|
|
14686
|
+
export declare interface NiceNavShellProps {
|
|
14687
|
+
/** Top navigation slot — pass a ReactNode or render-prop. */
|
|
14688
|
+
topNav?: Slot;
|
|
14689
|
+
/**
|
|
14690
|
+
* Convenience pass-through: when set (and `topNav` is not), the shell
|
|
14691
|
+
* renders an internal `<NiceTopNav>` with these props. Lets consumers get
|
|
14692
|
+
* a fully-featured top bar (logo / nav menu / search / pickers /
|
|
14693
|
+
* notifications / user menu / collapsible right cluster) without having
|
|
14694
|
+
* to import and instantiate NiceTopNav themselves.
|
|
14695
|
+
*/
|
|
14696
|
+
topNavProps?: NiceTopNavProps;
|
|
14697
|
+
/** Sidebar navigation slot. */
|
|
14698
|
+
sidebar?: Slot;
|
|
14699
|
+
/** Map of route → content (ReactNode or factory). */
|
|
14700
|
+
routes: Record<string, ReactNode | (() => ReactNode)>;
|
|
14701
|
+
/** Initial / default route (used when uncontrolled). */
|
|
14702
|
+
defaultRoute?: string;
|
|
14703
|
+
/** Controlled active route. */
|
|
14704
|
+
activeRoute?: string;
|
|
14705
|
+
/** Called whenever the active route changes. */
|
|
14706
|
+
onRouteChange?: (route: string) => void;
|
|
14707
|
+
/** Optional per-route labels (used for tab titles). */
|
|
14708
|
+
routeLabels?: Record<string, ReactNode>;
|
|
14709
|
+
/** Optional per-route icons. */
|
|
14710
|
+
routeIcons?: Record<string, ReactNode>;
|
|
14711
|
+
/** Fallback rendered when active route has no entry in `routes`. */
|
|
14712
|
+
fallback?: ReactNode;
|
|
14713
|
+
/**
|
|
14714
|
+
* Rendered in the content area when no route is active (uncontrolled mode
|
|
14715
|
+
* with no `defaultRoute`). Defaults to a blank panel painted with the
|
|
14716
|
+
* theme background — intentionally empty so the shell never auto-jumps to
|
|
14717
|
+
* the first route. Pass any node to customise (welcome screen, hero,
|
|
14718
|
+
* shortcuts grid, etc.).
|
|
14719
|
+
*/
|
|
14720
|
+
emptyState?: ReactNode;
|
|
14721
|
+
/** `'enabled'` shows the tab strip; `'disabled'` (default) just routes content. */
|
|
14722
|
+
tabsMode?: 'enabled' | 'disabled';
|
|
14723
|
+
/** When `false` (default) navigating to an already-open route focuses it instead of duplicating. */
|
|
14724
|
+
allowDuplicateTabs?: boolean;
|
|
14725
|
+
/** Maximum number of tabs (oldest non-pinned auto-closes when exceeded). */
|
|
14726
|
+
maxTabs?: number;
|
|
14727
|
+
/** Show close X. Default `true`. */
|
|
14728
|
+
closableTabs?: boolean;
|
|
14729
|
+
/** Allow pin/unpin via context menu. Default `true`. */
|
|
14730
|
+
pinnableTabs?: boolean;
|
|
14731
|
+
/** Reorder via drag (shipped as basic HTML5 drag — opt-in). Default `false`. */
|
|
14732
|
+
reorderableTabs?: boolean;
|
|
14733
|
+
/** Persistence backend for tab list. Default `'memory'`. */
|
|
14734
|
+
persistTabs?: NiceNavShellPersistence;
|
|
14735
|
+
/** Storage key for persistence. Default `'nice-nav-shell:tabs'`. */
|
|
14736
|
+
persistKey?: string;
|
|
14737
|
+
/** Tab strip is wheel-scrollable + shows ◀▶ arrows on overflow. Default `true`. */
|
|
14738
|
+
tabsScrollable?: boolean;
|
|
14739
|
+
/** Right-click tab → menu (close / close others / close all / pin). Default `true`. */
|
|
14740
|
+
tabsContextMenu?: boolean;
|
|
14741
|
+
/** Content swap animation. Default `'fade'`. */
|
|
14742
|
+
tabsAnimation?: NiceNavShellTabsAnimation;
|
|
14743
|
+
/** Initial tab list (used only on first mount when storage is empty). */
|
|
14744
|
+
initialTabs?: NiceNavShellTab[];
|
|
14745
|
+
/** Routes auto-opened as pinned on first mount. */
|
|
14746
|
+
pinnedRoutes?: string[];
|
|
14747
|
+
className?: string;
|
|
14748
|
+
contentClassName?: string;
|
|
14749
|
+
'data-testid'?: string;
|
|
14750
|
+
}
|
|
14751
|
+
|
|
14752
|
+
export declare interface NiceNavShellTab {
|
|
14753
|
+
/** Unique stable id. Defaults to `route` if omitted at openRoute call. */
|
|
14754
|
+
id: string;
|
|
14755
|
+
/** Route key the tab represents. */
|
|
14756
|
+
route: string;
|
|
14757
|
+
/** Tab label (string or arbitrary node). */
|
|
14758
|
+
label: ReactNode;
|
|
14759
|
+
/** Optional leading icon. */
|
|
14760
|
+
icon?: ReactNode;
|
|
14761
|
+
/** Pinned tabs render first and have no close button by default. */
|
|
14762
|
+
pinned?: boolean;
|
|
14763
|
+
/** When true, shows a `•` dot indicating unsaved work. */
|
|
14764
|
+
dirty?: boolean;
|
|
14765
|
+
/** Per-tab override of `closableTabs`. */
|
|
14766
|
+
closable?: boolean;
|
|
14767
|
+
}
|
|
14768
|
+
|
|
14769
|
+
export declare type NiceNavShellTabsAnimation = 'none' | 'fade' | 'slide';
|
|
14770
|
+
|
|
14322
14771
|
export declare const NiceNetworkDiscoveryPanel: default_2.FC<NiceNetworkDiscoveryPanelProps>;
|
|
14323
14772
|
|
|
14324
14773
|
export declare interface NiceNetworkDiscoveryPanelProps extends NiceBaseProps {
|
|
@@ -14412,6 +14861,24 @@ export declare interface NiceNotificationChannel {
|
|
|
14412
14861
|
configUrl?: string;
|
|
14413
14862
|
}
|
|
14414
14863
|
|
|
14864
|
+
export declare interface NiceNotificationItem {
|
|
14865
|
+
id: string;
|
|
14866
|
+
title: string;
|
|
14867
|
+
body?: string;
|
|
14868
|
+
/** Visual level (controls color of marker dot). Default `'info'`. */
|
|
14869
|
+
level?: NiceNotificationLevel;
|
|
14870
|
+
/** Optional ISO date string or Date instance. */
|
|
14871
|
+
timestamp?: string | Date;
|
|
14872
|
+
/** Whether this notification has already been seen. */
|
|
14873
|
+
read?: boolean;
|
|
14874
|
+
/** Optional icon/avatar node. */
|
|
14875
|
+
icon?: default_2.ReactNode;
|
|
14876
|
+
/** Click handler — fires when the row is activated. */
|
|
14877
|
+
onClick?: () => void;
|
|
14878
|
+
}
|
|
14879
|
+
|
|
14880
|
+
export declare type NiceNotificationLevel = 'info' | 'success' | 'warning' | 'error';
|
|
14881
|
+
|
|
14415
14882
|
export declare const NiceNotificationPreferences: default_2.FC<NiceNotificationPreferencesProps>;
|
|
14416
14883
|
|
|
14417
14884
|
export declare interface NiceNotificationPreferencesProps extends NiceBaseProps {
|
|
@@ -14444,6 +14911,49 @@ export declare interface NiceNotificationPrefs {
|
|
|
14444
14911
|
};
|
|
14445
14912
|
}
|
|
14446
14913
|
|
|
14914
|
+
export declare const NiceNotifications: default_2.ForwardRefExoticComponent<NiceNotificationsProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
14915
|
+
|
|
14916
|
+
export declare interface NiceNotificationsProps {
|
|
14917
|
+
/** List of notifications. */
|
|
14918
|
+
items?: NiceNotificationItem[];
|
|
14919
|
+
/**
|
|
14920
|
+
* Optional explicit unread count. When omitted, it is computed from
|
|
14921
|
+
* `items.filter(i => !i.read).length`.
|
|
14922
|
+
*/
|
|
14923
|
+
unreadCount?: number;
|
|
14924
|
+
/** Title rendered at the top of the dropdown panel. */
|
|
14925
|
+
panelTitle?: string;
|
|
14926
|
+
/** Empty-state text. */
|
|
14927
|
+
emptyText?: string;
|
|
14928
|
+
/** Width (px) of the dropdown panel. Default: 340. */
|
|
14929
|
+
panelWidth?: number;
|
|
14930
|
+
/** Maximum dropdown height (px). Default: 420. */
|
|
14931
|
+
maxHeight?: number;
|
|
14932
|
+
/** Show "Mark all as read" link in panel header. Default: true. */
|
|
14933
|
+
showMarkAllRead?: boolean;
|
|
14934
|
+
/** Show "View all" link at panel footer. Default: false. */
|
|
14935
|
+
showViewAll?: boolean;
|
|
14936
|
+
/** Mark-all-as-read handler. */
|
|
14937
|
+
onMarkAllRead?: () => void;
|
|
14938
|
+
/** View-all handler. */
|
|
14939
|
+
onViewAll?: () => void;
|
|
14940
|
+
/** Per-item read-toggle handler (called when user marks an item read). */
|
|
14941
|
+
onItemRead?: (id: string) => void;
|
|
14942
|
+
/** Custom bell icon. */
|
|
14943
|
+
icon?: default_2.ReactNode;
|
|
14944
|
+
/** Controlled open flag. */
|
|
14945
|
+
open?: boolean;
|
|
14946
|
+
onOpenChange?: (open: boolean) => void;
|
|
14947
|
+
/** Cap the badge display (default 99 → shows "99+"). */
|
|
14948
|
+
badgeMax?: number;
|
|
14949
|
+
/** Size variant of the trigger. */
|
|
14950
|
+
size?: 'sm' | 'md' | 'lg';
|
|
14951
|
+
className?: string;
|
|
14952
|
+
style?: default_2.CSSProperties;
|
|
14953
|
+
id?: string;
|
|
14954
|
+
'data-testid'?: string;
|
|
14955
|
+
}
|
|
14956
|
+
|
|
14447
14957
|
export declare const NiceNumberInput: default_2.ForwardRefExoticComponent<NiceNumberInputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
14448
14958
|
|
|
14449
14959
|
/** Props for the {@link NiceNumberInput} component — a numeric field with stepper and precision control. */
|
|
@@ -15880,6 +16390,165 @@ export declare interface NiceRealtimeChartRef {
|
|
|
15880
16390
|
getData: () => RealtimeDataPoint[];
|
|
15881
16391
|
}
|
|
15882
16392
|
|
|
16393
|
+
/**
|
|
16394
|
+
* Recipe display component — shows photos, metadata (servings/time/difficulty),
|
|
16395
|
+
* ingredient list and step-by-step instructions. Read-mostly; pair with
|
|
16396
|
+
* {@link NiceRecipeEditor} (from `@nice2dev/ui-tools`) for editing.
|
|
16397
|
+
*/
|
|
16398
|
+
export declare const NiceRecipe: default_2.FC<NiceRecipeProps>;
|
|
16399
|
+
|
|
16400
|
+
/** A named group of recipe ids. */
|
|
16401
|
+
export declare interface NiceRecipeCollection {
|
|
16402
|
+
id: string;
|
|
16403
|
+
name: string;
|
|
16404
|
+
description?: string;
|
|
16405
|
+
recipeIds: string[];
|
|
16406
|
+
}
|
|
16407
|
+
|
|
16408
|
+
/**
|
|
16409
|
+
* Sidebar of named collections (cookbooks, weekly menus, themes…) plus a
|
|
16410
|
+
* `NiceRecipeList` filtered to the active collection's recipe ids.
|
|
16411
|
+
* Includes inline create / rename / delete and an "Add recipe" picker.
|
|
16412
|
+
*/
|
|
16413
|
+
export declare const NiceRecipeCollections: default_2.FC<NiceRecipeCollectionsProps>;
|
|
16414
|
+
|
|
16415
|
+
export declare interface NiceRecipeCollectionsProps extends NiceBaseProps {
|
|
16416
|
+
/** Pool of recipes the collections reference. */
|
|
16417
|
+
recipes: NiceRecipeModel[];
|
|
16418
|
+
/** Collections to display. */
|
|
16419
|
+
collections: NiceRecipeCollection[];
|
|
16420
|
+
/** Fired when collections change (rename, add, remove, add/remove recipe). */
|
|
16421
|
+
onChange?: (collections: NiceRecipeCollection[]) => void;
|
|
16422
|
+
/** Hide create / rename / delete controls. */
|
|
16423
|
+
readOnly?: boolean;
|
|
16424
|
+
/** Fired when a recipe card inside the active collection is clicked. */
|
|
16425
|
+
onSelectRecipe?: (recipe: NiceRecipeModel) => void;
|
|
16426
|
+
}
|
|
16427
|
+
|
|
16428
|
+
/** Difficulty enum used by recipe + scheduler-recipe variant. */
|
|
16429
|
+
export declare type NiceRecipeDifficulty = 'easy' | 'medium' | 'hard';
|
|
16430
|
+
|
|
16431
|
+
/**
|
|
16432
|
+
* Recipe editor — full CRUD over a {@link NiceRecipe}: metadata,
|
|
16433
|
+
* ingredients (add/remove/reorder), steps (add/remove/reorder), photos
|
|
16434
|
+
* (URL-based). Pair with {@link NiceRecipe} (from `@nice2dev/ui-planning`)
|
|
16435
|
+
* for read-only display.
|
|
16436
|
+
*/
|
|
16437
|
+
export declare const NiceRecipeEditor: default_2.FC<NiceRecipeEditorProps>;
|
|
16438
|
+
|
|
16439
|
+
export declare interface NiceRecipeEditorProps extends NiceBaseProps {
|
|
16440
|
+
/** Recipe to edit. Pass `undefined` for "new". */
|
|
16441
|
+
recipe?: NiceRecipeModel;
|
|
16442
|
+
/** Called on every change (live binding). */
|
|
16443
|
+
onChange?: (recipe: NiceRecipeModel) => void;
|
|
16444
|
+
/** Called when the user clicks Save (`showActions`). */
|
|
16445
|
+
onSave?: (recipe: NiceRecipeModel) => void;
|
|
16446
|
+
/** Called when the user clicks Cancel. */
|
|
16447
|
+
onCancel?: () => void;
|
|
16448
|
+
/** Render Save/Cancel buttons. */
|
|
16449
|
+
showActions?: boolean;
|
|
16450
|
+
/** Custom Save button label. */
|
|
16451
|
+
saveLabel?: string;
|
|
16452
|
+
/** Custom Cancel button label. */
|
|
16453
|
+
cancelLabel?: string;
|
|
16454
|
+
}
|
|
16455
|
+
|
|
16456
|
+
/**
|
|
16457
|
+
* Browsable, searchable, filterable grid of {@link NiceRecipe} cards.
|
|
16458
|
+
* Pure-client filtering: title/description/tags substring + difficulty + tag.
|
|
16459
|
+
*/
|
|
16460
|
+
export declare const NiceRecipeList: default_2.FC<NiceRecipeListProps>;
|
|
16461
|
+
|
|
16462
|
+
export declare interface NiceRecipeListProps extends NiceBaseProps {
|
|
16463
|
+
/** Recipes to browse. */
|
|
16464
|
+
recipes: NiceRecipeModel[];
|
|
16465
|
+
/** Fired when the user activates a card. */
|
|
16466
|
+
onSelect?: (recipe: NiceRecipeModel) => void;
|
|
16467
|
+
/** Initial search query. */
|
|
16468
|
+
initialQuery?: string;
|
|
16469
|
+
/** Hide the difficulty / tag filters. */
|
|
16470
|
+
hideFilters?: boolean;
|
|
16471
|
+
/** Empty-state hint when no recipes match. */
|
|
16472
|
+
emptyMessage?: string;
|
|
16473
|
+
}
|
|
16474
|
+
|
|
16475
|
+
/** A full recipe record. */
|
|
16476
|
+
export declare interface NiceRecipeModel {
|
|
16477
|
+
id: string;
|
|
16478
|
+
title: string;
|
|
16479
|
+
description?: string;
|
|
16480
|
+
/** Number of servings the recipe yields. */
|
|
16481
|
+
servings?: number;
|
|
16482
|
+
prepMinutes?: number;
|
|
16483
|
+
cookMinutes?: number;
|
|
16484
|
+
difficulty?: NiceRecipeDifficulty;
|
|
16485
|
+
cuisine?: string;
|
|
16486
|
+
tags?: string[];
|
|
16487
|
+
ingredients: NiceIngredient[];
|
|
16488
|
+
steps: NiceRecipeStep[];
|
|
16489
|
+
photos?: NiceRecipePhoto[];
|
|
16490
|
+
nutrition?: NiceRecipeNutrition;
|
|
16491
|
+
/** External source (URL or attribution). */
|
|
16492
|
+
sourceUrl?: string;
|
|
16493
|
+
createdAt?: Date;
|
|
16494
|
+
updatedAt?: Date;
|
|
16495
|
+
}
|
|
16496
|
+
|
|
16497
|
+
/** Optional nutrition summary per serving. */
|
|
16498
|
+
export declare interface NiceRecipeNutrition {
|
|
16499
|
+
calories?: number;
|
|
16500
|
+
protein?: number;
|
|
16501
|
+
fat?: number;
|
|
16502
|
+
carbs?: number;
|
|
16503
|
+
fiber?: number;
|
|
16504
|
+
sugar?: number;
|
|
16505
|
+
sodium?: number;
|
|
16506
|
+
}
|
|
16507
|
+
|
|
16508
|
+
/** A photo attached to a recipe. */
|
|
16509
|
+
export declare interface NiceRecipePhoto {
|
|
16510
|
+
id: string;
|
|
16511
|
+
/** Image URL (data:, blob:, http(s):). */
|
|
16512
|
+
url: string;
|
|
16513
|
+
/** Alt text / caption. */
|
|
16514
|
+
caption?: string;
|
|
16515
|
+
/** When true, this photo is used as the cover image. */
|
|
16516
|
+
primary?: boolean;
|
|
16517
|
+
}
|
|
16518
|
+
|
|
16519
|
+
/** Props for {@link NiceRecipe}. */
|
|
16520
|
+
export declare interface NiceRecipeProps extends NiceBaseProps {
|
|
16521
|
+
/** Recipe to display. */
|
|
16522
|
+
recipe: NiceRecipeModel;
|
|
16523
|
+
/** Compact card layout (smaller paddings, hides description / nutrition). */
|
|
16524
|
+
compact?: boolean;
|
|
16525
|
+
/** Hide the photo gallery. */
|
|
16526
|
+
hidePhotos?: boolean;
|
|
16527
|
+
/** Hide the ingredients column. */
|
|
16528
|
+
hideIngredients?: boolean;
|
|
16529
|
+
/** Hide the steps list. */
|
|
16530
|
+
hideSteps?: boolean;
|
|
16531
|
+
/** Toggle an ingredient's `checked` state (interactive shopping mode). */
|
|
16532
|
+
onIngredientToggle?: (ingredient: NiceIngredient) => void;
|
|
16533
|
+
/** Toggle a step's `done` state (interactive cook mode). */
|
|
16534
|
+
onStepToggle?: (step: NiceRecipeStep) => void;
|
|
16535
|
+
}
|
|
16536
|
+
|
|
16537
|
+
/** A single step / instruction in a recipe. */
|
|
16538
|
+
export declare interface NiceRecipeStep {
|
|
16539
|
+
id: string;
|
|
16540
|
+
/** Render order (1-based). */
|
|
16541
|
+
order: number;
|
|
16542
|
+
/** Human instruction text. Markdown-friendly but rendered as plain text by default. */
|
|
16543
|
+
instruction: string;
|
|
16544
|
+
/** Optional duration in minutes for timers. */
|
|
16545
|
+
durationMinutes?: number;
|
|
16546
|
+
/** Optional URL of an image illustrating the step. */
|
|
16547
|
+
image?: string;
|
|
16548
|
+
/** Marks the step as completed in interactive cook mode. */
|
|
16549
|
+
done?: boolean;
|
|
16550
|
+
}
|
|
16551
|
+
|
|
15883
16552
|
/**
|
|
15884
16553
|
* NiceReconciliationView — Bank reconciliation split-view with drag-drop matching.
|
|
15885
16554
|
*
|
|
@@ -16452,6 +17121,40 @@ export declare interface NiceSchedulerEvent {
|
|
|
16452
17121
|
description?: string;
|
|
16453
17122
|
/** Event visual style */
|
|
16454
17123
|
eventStyle?: 'solid' | 'striped' | 'outlined' | 'dashed';
|
|
17124
|
+
/**
|
|
17125
|
+
* Discriminator selecting which form variant to use in the built-in editor.
|
|
17126
|
+
* Defaults to `'task'`. Use `'recipe'` to attach a {@link NiceRecipe} via
|
|
17127
|
+
* `recipe`, or `'service'` to attach service data via `service`.
|
|
17128
|
+
*/
|
|
17129
|
+
eventType?: NiceSchedulerEventType;
|
|
17130
|
+
/** Recipe payload — present when `eventType === 'recipe'`. */
|
|
17131
|
+
recipe?: NiceRecipeModel;
|
|
17132
|
+
/** Service payload — present when `eventType === 'service'`. */
|
|
17133
|
+
service?: NiceSchedulerServiceData;
|
|
17134
|
+
}
|
|
17135
|
+
|
|
17136
|
+
/**
|
|
17137
|
+
* Discriminator for the kind of thing scheduled. Built-ins:
|
|
17138
|
+
* - `'task'` — generic event (default, back-compat).
|
|
17139
|
+
* - `'recipe'` — meal-prep / cooking session backed by a {@link NiceRecipe}.
|
|
17140
|
+
* - `'service'` — a service appointment (provider, customer, location, price).
|
|
17141
|
+
*
|
|
17142
|
+
* Consumers can extend with custom string literals — the scheduler will treat
|
|
17143
|
+
* unknown types like `'task'` unless a matching {@link NiceSchedulerEventTypeDef}
|
|
17144
|
+
* is provided in `eventTypes`.
|
|
17145
|
+
*/
|
|
17146
|
+
export declare type NiceSchedulerEventType = 'task' | 'recipe' | 'service' | (string & {});
|
|
17147
|
+
|
|
17148
|
+
/** Definition of a custom event-type option exposed in the editor's type picker. */
|
|
17149
|
+
export declare interface NiceSchedulerEventTypeDef {
|
|
17150
|
+
/** Discriminator value matching {@link NiceSchedulerEvent.eventType}. */
|
|
17151
|
+
type: NiceSchedulerEventType;
|
|
17152
|
+
/** Display label in the editor select. */
|
|
17153
|
+
label: string;
|
|
17154
|
+
/** Optional emoji/icon glyph. */
|
|
17155
|
+
icon?: string;
|
|
17156
|
+
/** Optional accent color for the chip in the calendar grid. */
|
|
17157
|
+
color?: string;
|
|
16455
17158
|
}
|
|
16456
17159
|
|
|
16457
17160
|
/** Props for the {@link NiceScheduler} component — a full-featured calendar / scheduler with drag, recurring events, resources, and inline editing. */
|
|
@@ -16499,6 +17202,19 @@ export declare interface NiceSchedulerProps extends NiceBaseProps {
|
|
|
16499
17202
|
editable?: boolean;
|
|
16500
17203
|
/** Custom field set for the built-in editor — when provided, replaces the auto-generated default fields. NiceForm-compatible. */
|
|
16501
17204
|
formFields?: NiceFormItem[];
|
|
17205
|
+
/**
|
|
17206
|
+
* Per-event-type form field overrides. When a key matches the active
|
|
17207
|
+
* `eventType` in the editor, those NiceForm items REPLACE the type-specific
|
|
17208
|
+
* section (recipe/service body). Use `'task'` to override the default form.
|
|
17209
|
+
*/
|
|
17210
|
+
formFieldsByType?: Partial<Record<NiceSchedulerEventType, NiceFormItem[]>>;
|
|
17211
|
+
/**
|
|
17212
|
+
* Available event-type options in the editor's type picker. When omitted,
|
|
17213
|
+
* defaults to a single `'task'` entry (back-compat — no picker shown).
|
|
17214
|
+
* Pass `[{type:'task'},{type:'recipe'},{type:'service'}]` to enable all three
|
|
17215
|
+
* built-ins.
|
|
17216
|
+
*/
|
|
17217
|
+
eventTypes?: NiceSchedulerEventTypeDef[];
|
|
16502
17218
|
/** Custom full editor render — when provided, takes over the entire editor body. */
|
|
16503
17219
|
renderEventEditor?: (ctx: {
|
|
16504
17220
|
event?: NiceSchedulerEvent | null;
|
|
@@ -16529,6 +17245,26 @@ export declare interface NiceSchedulerResource {
|
|
|
16529
17245
|
color?: string;
|
|
16530
17246
|
}
|
|
16531
17247
|
|
|
17248
|
+
/** Service-specific data attached to a `service` event. */
|
|
17249
|
+
export declare interface NiceSchedulerServiceData {
|
|
17250
|
+
/** Service name (e.g. "Haircut", "Oil change"). */
|
|
17251
|
+
serviceName: string;
|
|
17252
|
+
/** Person providing the service. */
|
|
17253
|
+
providerName?: string;
|
|
17254
|
+
/** Customer name. */
|
|
17255
|
+
customerName?: string;
|
|
17256
|
+
/** Customer phone / email. */
|
|
17257
|
+
customerContact?: string;
|
|
17258
|
+
/** Location / address. */
|
|
17259
|
+
location?: string;
|
|
17260
|
+
/** Price (numeric). */
|
|
17261
|
+
price?: number;
|
|
17262
|
+
/** Currency code (ISO 4217), defaults to display-only "PLN". */
|
|
17263
|
+
currency?: string;
|
|
17264
|
+
/** Free-form notes. */
|
|
17265
|
+
notes?: string;
|
|
17266
|
+
}
|
|
17267
|
+
|
|
16532
17268
|
/** Available calendar views for the {@link NiceScheduler}. */
|
|
16533
17269
|
export declare type NiceSchedulerView = 'day' | 'week' | 'workWeek' | 'month' | 'dayRange' | 'monthRange' | 'agenda' | 'timeline';
|
|
16534
17270
|
|
|
@@ -16550,6 +17286,77 @@ export declare interface NiceScrollViewProps extends NiceBaseProps {
|
|
|
16550
17286
|
children?: default_2.ReactNode;
|
|
16551
17287
|
}
|
|
16552
17288
|
|
|
17289
|
+
export declare const NiceSearchBar: default_2.ForwardRefExoticComponent<NiceSearchBarProps & default_2.RefAttributes<NiceSearchBarHandle>>;
|
|
17290
|
+
|
|
17291
|
+
export declare type NiceSearchBarExpandDirection = 'left' | 'right' | 'down';
|
|
17292
|
+
|
|
17293
|
+
export declare interface NiceSearchBarHandle {
|
|
17294
|
+
focus: () => void;
|
|
17295
|
+
expand: () => void;
|
|
17296
|
+
collapse: () => void;
|
|
17297
|
+
clear: () => void;
|
|
17298
|
+
}
|
|
17299
|
+
|
|
17300
|
+
export declare interface NiceSearchBarProps {
|
|
17301
|
+
/** Controlled value. */
|
|
17302
|
+
value?: string;
|
|
17303
|
+
/** Default value (uncontrolled). */
|
|
17304
|
+
defaultValue?: string;
|
|
17305
|
+
/** Change handler. */
|
|
17306
|
+
onChange?: (value: string) => void;
|
|
17307
|
+
/** Submit handler — fires on Enter. */
|
|
17308
|
+
onSubmit?: (value: string) => void;
|
|
17309
|
+
/** Clear handler — fires when ✕ is clicked or Escape pressed with non-empty value. */
|
|
17310
|
+
onClear?: () => void;
|
|
17311
|
+
/** Placeholder text (defaults to translated "Search…"). */
|
|
17312
|
+
placeholder?: string;
|
|
17313
|
+
/**
|
|
17314
|
+
* If true, the bar starts already expanded and stays so unless `collapsible`
|
|
17315
|
+
* is also true. Default: `false`.
|
|
17316
|
+
*/
|
|
17317
|
+
defaultExpanded?: boolean;
|
|
17318
|
+
/**
|
|
17319
|
+
* Controlled expanded flag. When provided, takes priority over the
|
|
17320
|
+
* internal state.
|
|
17321
|
+
*/
|
|
17322
|
+
expanded?: boolean;
|
|
17323
|
+
/** Notified whenever the expanded state changes. */
|
|
17324
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
17325
|
+
/**
|
|
17326
|
+
* Allow the bar to collapse. Default: `true` when no `expanded` is given.
|
|
17327
|
+
* Set to `false` to render an always-expanded plain search input.
|
|
17328
|
+
*/
|
|
17329
|
+
collapsible?: boolean;
|
|
17330
|
+
/**
|
|
17331
|
+
* Direction the input grows when expanding from the icon-button.
|
|
17332
|
+
* Default: `'left'` (suitable for top-nav right cluster).
|
|
17333
|
+
*/
|
|
17334
|
+
expandDirection?: NiceSearchBarExpandDirection;
|
|
17335
|
+
/**
|
|
17336
|
+
* Maximum width of the expanded input (px). Default: `260`.
|
|
17337
|
+
* On narrow screens caps automatically at `100vw - 32px`.
|
|
17338
|
+
*/
|
|
17339
|
+
expandWidth?: number;
|
|
17340
|
+
/**
|
|
17341
|
+
* Auto-collapse when the input loses focus AND is empty. Default: `true`.
|
|
17342
|
+
*/
|
|
17343
|
+
autoCollapseOnBlur?: boolean;
|
|
17344
|
+
/** Size variant. */
|
|
17345
|
+
size?: NiceSearchBarSize;
|
|
17346
|
+
/** Custom search icon. Default: 🔍 (will use NiceIcon when wired by host). */
|
|
17347
|
+
icon?: default_2.ReactNode;
|
|
17348
|
+
/** Disable the control. */
|
|
17349
|
+
disabled?: boolean;
|
|
17350
|
+
/** Accessible label. */
|
|
17351
|
+
ariaLabel?: string;
|
|
17352
|
+
className?: string;
|
|
17353
|
+
style?: default_2.CSSProperties;
|
|
17354
|
+
id?: string;
|
|
17355
|
+
'data-testid'?: string;
|
|
17356
|
+
}
|
|
17357
|
+
|
|
17358
|
+
export declare type NiceSearchBarSize = 'sm' | 'md' | 'lg';
|
|
17359
|
+
|
|
16553
17360
|
/**
|
|
16554
17361
|
* `NiceSegmentedControl` — single-selection toggle group with an animated
|
|
16555
17362
|
* sliding "thumb" highlight, iOS-style. The control owns a single value
|
|
@@ -16806,10 +17613,36 @@ export declare interface NiceSidebarNavProps {
|
|
|
16806
17613
|
onPreferencesChange?: (prefs: SidebarNavUserPrefs) => void;
|
|
16807
17614
|
/** Sidebar width in px (default: 264) */
|
|
16808
17615
|
width?: number;
|
|
17616
|
+
/** Sidebar width in px when collapsed/icon-only (default: 56). */
|
|
17617
|
+
collapsedWidth?: number;
|
|
17618
|
+
/**
|
|
17619
|
+
* Which side of the screen the sidebar is anchored to. Default `'left'`.
|
|
17620
|
+
* `'right'` flips the chevron direction and pushes the footer-toggle to the
|
|
17621
|
+
* left edge — useful for RTL or right-side admin shells.
|
|
17622
|
+
*/
|
|
17623
|
+
position?: 'left' | 'right';
|
|
17624
|
+
/**
|
|
17625
|
+
* **Minimal mode** — hides the mode strip, sources, favorites and footer
|
|
17626
|
+
* preferences, leaving only the navigation tree. Use for stripped-down
|
|
17627
|
+
* shells (auth flows, embedded views) where the full taxonomy is overkill.
|
|
17628
|
+
* Default `false`.
|
|
17629
|
+
*/
|
|
17630
|
+
minimal?: boolean;
|
|
17631
|
+
/** Optional header slot rendered above the mode strip / tree (e.g. workspace switcher). */
|
|
17632
|
+
header?: ReactNode;
|
|
17633
|
+
/** Optional footer slot rendered below the standard footer-toggle row. */
|
|
17634
|
+
footerExtra?: ReactNode;
|
|
16809
17635
|
/** Collapsed (icon-only) mode */
|
|
16810
17636
|
collapsed?: boolean;
|
|
16811
17637
|
/** Called when collapsed state changes (for toggle button) */
|
|
16812
17638
|
onCollapsedChange?: (collapsed: boolean) => void;
|
|
17639
|
+
/**
|
|
17640
|
+
* When `true` (default), users can still expand/collapse module branches
|
|
17641
|
+
* even while the sidebar itself is in icon-only collapsed mode (chevrons
|
|
17642
|
+
* stay visible). When `false`, all branches are forced flat / always-open
|
|
17643
|
+
* in collapsed mode (legacy behaviour).
|
|
17644
|
+
*/
|
|
17645
|
+
expandableWhenCollapsed?: boolean;
|
|
16813
17646
|
/** Extra CSS class on the root element */
|
|
16814
17647
|
className?: string;
|
|
16815
17648
|
/** Size variant */
|
|
@@ -18460,6 +19293,245 @@ export declare interface NiceTooltipProps {
|
|
|
18460
19293
|
children: default_2.ReactElement;
|
|
18461
19294
|
}
|
|
18462
19295
|
|
|
19296
|
+
export declare const NiceTopNav: default_2.ForwardRefExoticComponent<NiceTopNavProps & default_2.RefAttributes<HTMLElement>>;
|
|
19297
|
+
|
|
19298
|
+
export declare type NiceTopNavDensity = 'compact' | 'normal' | 'comfortable';
|
|
19299
|
+
|
|
19300
|
+
/**
|
|
19301
|
+
* Optional extra round icon-button shown in the right cluster
|
|
19302
|
+
* (e.g. settings gear). When `menuItems` is provided, clicking the
|
|
19303
|
+
* button opens a small dropdown menu; otherwise `onClick` fires.
|
|
19304
|
+
*
|
|
19305
|
+
* Added in v1.0.10 to satisfy customizable user-button cluster
|
|
19306
|
+
* feedback for {@link NiceTopNav}.
|
|
19307
|
+
*/
|
|
19308
|
+
declare interface NiceTopNavExtraAction {
|
|
19309
|
+
id: string;
|
|
19310
|
+
label: string;
|
|
19311
|
+
icon: default_2.ReactNode;
|
|
19312
|
+
onClick?: () => void;
|
|
19313
|
+
menuItems?: UserMenuItem[];
|
|
19314
|
+
/** Optional badge / dot. */
|
|
19315
|
+
badge?: number | string;
|
|
19316
|
+
}
|
|
19317
|
+
|
|
19318
|
+
/** @deprecated v2 nav-item type. Prefer {@link NiceNavMenuItem} via `navMenuItems`. */
|
|
19319
|
+
export declare interface NiceTopNavItem {
|
|
19320
|
+
id: string;
|
|
19321
|
+
label: string;
|
|
19322
|
+
icon?: default_2.ReactNode;
|
|
19323
|
+
href?: string;
|
|
19324
|
+
onClick?: () => void;
|
|
19325
|
+
}
|
|
19326
|
+
|
|
19327
|
+
/** @deprecated v2 language type. Prefer `<NiceLanguagePicker>` props. */
|
|
19328
|
+
export declare interface NiceTopNavLanguageOption {
|
|
19329
|
+
code: string;
|
|
19330
|
+
label: string;
|
|
19331
|
+
flag?: default_2.ReactNode;
|
|
19332
|
+
}
|
|
19333
|
+
|
|
19334
|
+
/** @deprecated v2 user-menu item. Prefer {@link UserMenuItem}. */
|
|
19335
|
+
export declare interface NiceTopNavMenuItem {
|
|
19336
|
+
id: string;
|
|
19337
|
+
label: string;
|
|
19338
|
+
icon?: default_2.ReactNode;
|
|
19339
|
+
onClick?: () => void;
|
|
19340
|
+
divider?: boolean;
|
|
19341
|
+
href?: string;
|
|
19342
|
+
}
|
|
19343
|
+
|
|
19344
|
+
export declare interface NiceTopNavProps {
|
|
19345
|
+
height?: number | string;
|
|
19346
|
+
density?: NiceTopNavDensity;
|
|
19347
|
+
maxWidth?: number | string;
|
|
19348
|
+
paddingX?: number | string;
|
|
19349
|
+
gap?: number | string;
|
|
19350
|
+
borderBottom?: boolean;
|
|
19351
|
+
elevated?: boolean;
|
|
19352
|
+
sticky?: boolean;
|
|
19353
|
+
variant?: NiceTopNavVariant;
|
|
19354
|
+
accentBar?: boolean;
|
|
19355
|
+
accentBarColor?: string;
|
|
19356
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
19357
|
+
/**
|
|
19358
|
+
* Visual state — mirrors the standard control state contract used across
|
|
19359
|
+
* basic Nice2Dev controls (input, button). Defaults to `'normal'`.
|
|
19360
|
+
* - `loading` — renders a subtle shimmer overlay; bar remains interactive.
|
|
19361
|
+
* - `error` — accents the bottom border with `--color-danger`.
|
|
19362
|
+
* - `disabled` — dims the bar and disables pointer events.
|
|
19363
|
+
*/
|
|
19364
|
+
state?: 'normal' | 'loading' | 'error' | 'disabled';
|
|
19365
|
+
/**
|
|
19366
|
+
* Compact mode — collapses brand name, hides labels on icon-only actions,
|
|
19367
|
+
* tightens paddings. Combine with `size='sm'` for an ultra-dense bar.
|
|
19368
|
+
*/
|
|
19369
|
+
compact?: boolean;
|
|
19370
|
+
collapsible?: boolean;
|
|
19371
|
+
collapsed?: boolean;
|
|
19372
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
19373
|
+
/**
|
|
19374
|
+
* Bar height when collapsed. Defaults to `32` so the entire bar content
|
|
19375
|
+
* (brand, nav menu, search, pickers, notifications, user menu) stays
|
|
19376
|
+
* visible — proportionally scaled down via {@link collapsedContentScale}.
|
|
19377
|
+
* Lower values produce an almost-hidden strip; raise for more breathing
|
|
19378
|
+
* room around shrunk controls.
|
|
19379
|
+
*/
|
|
19380
|
+
collapsedHeight?: number | string;
|
|
19381
|
+
/**
|
|
19382
|
+
* Scale factor (0–1) applied to the logo / brand name while collapsed.
|
|
19383
|
+
* Default `0.5`. Affects only the brand block; use
|
|
19384
|
+
* {@link collapsedContentScale} to scale the rest of the bar.
|
|
19385
|
+
*/
|
|
19386
|
+
collapsedLogoScale?: number;
|
|
19387
|
+
/**
|
|
19388
|
+
* Scale factor (0–1) applied to the whole inner row (nav menu, search,
|
|
19389
|
+
* pickers, notifications, user menu, collapse button) while collapsed.
|
|
19390
|
+
* The bar shows ALL of its content — just very small — so users keep
|
|
19391
|
+
* full functionality on a slim strip. Default `0.55`.
|
|
19392
|
+
*/
|
|
19393
|
+
collapsedContentScale?: number;
|
|
19394
|
+
hideOnScroll?: boolean;
|
|
19395
|
+
scrollThreshold?: number;
|
|
19396
|
+
logo?: default_2.ReactNode;
|
|
19397
|
+
brandName?: string;
|
|
19398
|
+
brandHref?: string;
|
|
19399
|
+
onBrandClick?: () => void;
|
|
19400
|
+
logoVariant?: NiceLogoVariant;
|
|
19401
|
+
logoSize?: NiceLogoSize;
|
|
19402
|
+
/**
|
|
19403
|
+
* Brand block alignment within the bar. Combined with {@link navAlignment}
|
|
19404
|
+
* gives 9 possible layouts. Default `'left'`.
|
|
19405
|
+
*
|
|
19406
|
+
* - `'left'` — brand sits at the very start of the bar (classic).
|
|
19407
|
+
* - `'center'` — brand is centered (use with `navAlignment='start'` for
|
|
19408
|
+
* a Bootstrap-style centered logo).
|
|
19409
|
+
* - `'right'` — brand sits at the end (rare, useful for RTL or unusual layouts).
|
|
19410
|
+
*/
|
|
19411
|
+
brandAlign?: 'left' | 'center' | 'right';
|
|
19412
|
+
/**
|
|
19413
|
+
* Pre-baked configuration profile. Sets sensible defaults for several props
|
|
19414
|
+
* at once so a one-line `<NiceTopNav preset="marketing" />` ships a polished
|
|
19415
|
+
* bar. Any explicit prop overrides the preset's default.
|
|
19416
|
+
*
|
|
19417
|
+
* - `'marketing'` — landing-page bar: brand left, nav center, login/register
|
|
19418
|
+
* right, no search, no pickers, accent bar on, sticky.
|
|
19419
|
+
* - `'saas'` — admin/SaaS bar: brand left, nav left, full toolbar
|
|
19420
|
+
* (search + lang + theme + notifications + user menu),
|
|
19421
|
+
* collapsible right cluster opens by default, settings
|
|
19422
|
+
* gear after the avatar.
|
|
19423
|
+
* - `'docs'` — documentation bar: brand left, nav left, prominent
|
|
19424
|
+
* always-expanded search (max 500px), theme picker only.
|
|
19425
|
+
* - `'minimal'` — bare brand bar: brand only, no nav, no right cluster.
|
|
19426
|
+
*/
|
|
19427
|
+
preset?: 'marketing' | 'saas' | 'docs' | 'minimal';
|
|
19428
|
+
navItems?: NiceTopNavItem[];
|
|
19429
|
+
navMenuItems?: NiceNavMenuItem[];
|
|
19430
|
+
activeNavId?: string;
|
|
19431
|
+
navAlignment?: 'start' | 'center' | 'end';
|
|
19432
|
+
/**
|
|
19433
|
+
* How mega-menu items in `navMenuItems` open. Default `'hover'` (classical
|
|
19434
|
+
* desktop pattern). Switch to `'click'` for touch-first sites. Only applies
|
|
19435
|
+
* when at least one nav item carries `megaPanel` or `megaColumns`.
|
|
19436
|
+
*/
|
|
19437
|
+
megaTrigger?: 'hover' | 'click';
|
|
19438
|
+
mobileBreakpoint?: number;
|
|
19439
|
+
/**
|
|
19440
|
+
* How navigation behaves below `mobileBreakpoint`:
|
|
19441
|
+
* - `hamburger` (default) — collapse to hamburger button + drawer.
|
|
19442
|
+
* - `wrap` — let nav items wrap onto a second row.
|
|
19443
|
+
* - `scroll` — keep nav inline; horizontally scroll-snap overflowed items.
|
|
19444
|
+
*/
|
|
19445
|
+
mobileVariant?: 'hamburger' | 'wrap' | 'scroll';
|
|
19446
|
+
searchPlaceholder?: string;
|
|
19447
|
+
searchValue?: string;
|
|
19448
|
+
onSearchChange?: (value: string) => void;
|
|
19449
|
+
onSearchSubmit?: (value: string) => void;
|
|
19450
|
+
collapsibleSearch?: boolean;
|
|
19451
|
+
searchCollapsible?: boolean;
|
|
19452
|
+
searchExpandDirection?: NiceSearchBarExpandDirection;
|
|
19453
|
+
searchExpandWidth?: number;
|
|
19454
|
+
searchBarProps?: Partial<NiceSearchBarProps>;
|
|
19455
|
+
centerContent?: default_2.ReactNode;
|
|
19456
|
+
/** Toggle search visibility independently of search props presence. Default: derived from search props. */
|
|
19457
|
+
showSearch?: boolean;
|
|
19458
|
+
languages?: NiceTopNavLanguageOption[];
|
|
19459
|
+
currentLanguage?: string;
|
|
19460
|
+
onLanguageChange?: (code: string) => void;
|
|
19461
|
+
showLanguagePicker?: boolean;
|
|
19462
|
+
languagePickerProps?: Partial<NiceLanguagePickerProps>;
|
|
19463
|
+
themes?: NiceTopNavThemeOption[];
|
|
19464
|
+
currentTheme?: string;
|
|
19465
|
+
onThemeChange?: (id: string) => void;
|
|
19466
|
+
showThemePicker?: boolean;
|
|
19467
|
+
themePickerProps?: Partial<NiceThemePickerProps>;
|
|
19468
|
+
notificationsCount?: number;
|
|
19469
|
+
onNotificationsClick?: () => void;
|
|
19470
|
+
notifications?: NiceNotificationItem[];
|
|
19471
|
+
onMarkAllNotificationsRead?: () => void;
|
|
19472
|
+
/** Toggle notifications visibility independently of notification props presence. */
|
|
19473
|
+
showNotifications?: boolean;
|
|
19474
|
+
user?: NiceTopNavUser | NiceAuthUser;
|
|
19475
|
+
userMenuItems?: UserMenuItem[];
|
|
19476
|
+
/** @deprecated Use `userMenuItems`. */
|
|
19477
|
+
userMenu?: NiceTopNavMenuItem[];
|
|
19478
|
+
onProfile?: () => void;
|
|
19479
|
+
onLogout?: () => void;
|
|
19480
|
+
showLogin?: boolean;
|
|
19481
|
+
loginLabel?: string;
|
|
19482
|
+
onLoginClick?: () => void;
|
|
19483
|
+
showRegister?: boolean;
|
|
19484
|
+
registerLabel?: string;
|
|
19485
|
+
onRegisterClick?: () => void;
|
|
19486
|
+
/**
|
|
19487
|
+
* Extra round icon-buttons rendered right before the auth/user-menu cluster.
|
|
19488
|
+
* Each entry can either fire `onClick` directly or open a small dropdown
|
|
19489
|
+
* (`menuItems`). Use this to add a customizable settings gear / quick actions
|
|
19490
|
+
* without forking {@link NiceAuthButtons}.
|
|
19491
|
+
*/
|
|
19492
|
+
extraActions?: NiceTopNavExtraAction[];
|
|
19493
|
+
/** Show a built-in settings gear (uses inline Ntd-style cog SVG). */
|
|
19494
|
+
showSettings?: boolean;
|
|
19495
|
+
/** Settings click handler — used when `settingsMenuItems` is empty. */
|
|
19496
|
+
onSettingsClick?: () => void;
|
|
19497
|
+
/** Optional dropdown items shown when the settings gear is clicked. */
|
|
19498
|
+
settingsMenuItems?: UserMenuItem[];
|
|
19499
|
+
/** Settings button aria-label / tooltip. */
|
|
19500
|
+
settingsLabel?: string;
|
|
19501
|
+
/**
|
|
19502
|
+
* Wrap search + language + theme pickers in a collapsible cluster with a
|
|
19503
|
+
* chevron toggle. When `true` (default), the cluster starts collapsed and
|
|
19504
|
+
* expands to the LEFT on click — saves horizontal space and prevents the
|
|
19505
|
+
* navigation menu from overlapping the right toolbar. Set to `false` to
|
|
19506
|
+
* always render the pickers inline.
|
|
19507
|
+
*/
|
|
19508
|
+
collapsibleRightCluster?: boolean;
|
|
19509
|
+
/** Initial open state of the collapsible cluster. Default `false`. */
|
|
19510
|
+
rightClusterDefaultOpen?: boolean;
|
|
19511
|
+
leftContent?: default_2.ReactNode;
|
|
19512
|
+
rightContent?: default_2.ReactNode;
|
|
19513
|
+
className?: string;
|
|
19514
|
+
style?: default_2.CSSProperties;
|
|
19515
|
+
id?: string;
|
|
19516
|
+
'data-testid'?: string;
|
|
19517
|
+
}
|
|
19518
|
+
|
|
19519
|
+
/** @deprecated v2 theme type. Prefer `<NiceThemePicker>` props. */
|
|
19520
|
+
export declare interface NiceTopNavThemeOption {
|
|
19521
|
+
id: string;
|
|
19522
|
+
label: string;
|
|
19523
|
+
icon?: default_2.ReactNode;
|
|
19524
|
+
}
|
|
19525
|
+
|
|
19526
|
+
/** @deprecated v2 user type. Prefer {@link NiceAuthUser}. */
|
|
19527
|
+
export declare interface NiceTopNavUser {
|
|
19528
|
+
name: string;
|
|
19529
|
+
avatarUrl?: string;
|
|
19530
|
+
initials?: string;
|
|
19531
|
+
}
|
|
19532
|
+
|
|
19533
|
+
export declare type NiceTopNavVariant = 'default' | 'primary' | 'accent' | 'transparent' | 'glass' | 'dark';
|
|
19534
|
+
|
|
18463
19535
|
export declare interface NiceTopologyData {
|
|
18464
19536
|
links: Array<{
|
|
18465
19537
|
sourceId: string;
|
|
@@ -21226,6 +22298,9 @@ export declare interface RealtimeDataPoint {
|
|
|
21226
22298
|
label?: string;
|
|
21227
22299
|
}
|
|
21228
22300
|
|
|
22301
|
+
/** Total time = prep + cook (minutes), or undefined if neither provided. */
|
|
22302
|
+
export declare function recipeTotalMinutes(recipe: NiceRecipeModel): number | undefined;
|
|
22303
|
+
|
|
21229
22304
|
/**
|
|
21230
22305
|
* Reconciliation view configuration.
|
|
21231
22306
|
*/
|
|
@@ -22266,7 +23341,7 @@ export declare interface SidebarNavDataNode {
|
|
|
22266
23341
|
export declare interface SidebarNavDataSource {
|
|
22267
23342
|
id: string;
|
|
22268
23343
|
label: string;
|
|
22269
|
-
icon?:
|
|
23344
|
+
icon?: ReactNode;
|
|
22270
23345
|
color?: string;
|
|
22271
23346
|
/** Server URL or connection string hint */
|
|
22272
23347
|
url?: string;
|
|
@@ -22277,7 +23352,7 @@ export declare interface SidebarNavDataSource {
|
|
|
22277
23352
|
export declare interface SidebarNavFavorite {
|
|
22278
23353
|
id: string;
|
|
22279
23354
|
label: string;
|
|
22280
|
-
icon?:
|
|
23355
|
+
icon?: ReactNode;
|
|
22281
23356
|
route?: string;
|
|
22282
23357
|
sourceId?: string;
|
|
22283
23358
|
moduleId?: string;
|
|
@@ -22300,7 +23375,7 @@ export declare type SidebarNavMode = 'all' | 'by-role' | 'by-unit' | 'favorites'
|
|
|
22300
23375
|
export declare interface SidebarNavModule {
|
|
22301
23376
|
id: string;
|
|
22302
23377
|
label: string;
|
|
22303
|
-
icon?:
|
|
23378
|
+
icon?: ReactNode;
|
|
22304
23379
|
views: SidebarNavView[];
|
|
22305
23380
|
/** Source this module belongs to */
|
|
22306
23381
|
sourceId?: string;
|
|
@@ -22310,7 +23385,7 @@ export declare interface SidebarNavModule {
|
|
|
22310
23385
|
export declare interface SidebarNavRole {
|
|
22311
23386
|
id: string;
|
|
22312
23387
|
label: string;
|
|
22313
|
-
icon?:
|
|
23388
|
+
icon?: ReactNode;
|
|
22314
23389
|
modules: SidebarNavModule[];
|
|
22315
23390
|
/** Source this role belongs to */
|
|
22316
23391
|
sourceId?: string;
|
|
@@ -22320,7 +23395,7 @@ export declare interface SidebarNavRole {
|
|
|
22320
23395
|
export declare interface SidebarNavUnit {
|
|
22321
23396
|
id: string;
|
|
22322
23397
|
label: string;
|
|
22323
|
-
icon?:
|
|
23398
|
+
icon?: ReactNode;
|
|
22324
23399
|
modules: SidebarNavModule[];
|
|
22325
23400
|
/** Source this unit belongs to */
|
|
22326
23401
|
sourceId?: string;
|
|
@@ -22357,7 +23432,7 @@ export declare interface SidebarNavUserPrefs {
|
|
|
22357
23432
|
export declare interface SidebarNavView {
|
|
22358
23433
|
id: string;
|
|
22359
23434
|
label: string;
|
|
22360
|
-
icon?:
|
|
23435
|
+
icon?: ReactNode;
|
|
22361
23436
|
/** Route path for navigation */
|
|
22362
23437
|
route?: string;
|
|
22363
23438
|
/** Badge counter (unread notifications, pending tasks, …) */
|
|
@@ -22427,6 +23502,8 @@ declare interface SliderConfig {
|
|
|
22427
23502
|
format?: (value: number) => string;
|
|
22428
23503
|
}
|
|
22429
23504
|
|
|
23505
|
+
declare type Slot = ReactNode | ((api: NiceNavShellApi) => ReactNode);
|
|
23506
|
+
|
|
22430
23507
|
export declare interface SmartDeviceDto {
|
|
22431
23508
|
id: string;
|
|
22432
23509
|
name: string;
|