@nice2dev/ui 1.4.20 → 1.4.21

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/NiceGantt-Drl4gvw9.cjs +1 -0
  3. package/dist/{NiceGantt.doc-B6YZcJvG.cjs → NiceGantt.doc-DTv0r7bP.cjs} +2 -2
  4. package/dist/NiceModuleLifecyclePanel-jckyVqqt.cjs +1 -0
  5. package/dist/NiceWindow-DQyf5wat.cjs +1 -0
  6. package/dist/{core-lazy-BhQxFuLf.cjs → core-lazy-DirbU7jp.cjs} +1 -1
  7. package/dist/display/NiceDocumentApprovalFlow.mjs +67 -89
  8. package/dist/display/NiceLeaderboard.mjs +47 -40
  9. package/dist/display/NiceQuestCard.mjs +93 -76
  10. package/dist/docs/NiceGantt.doc.json.mjs +9 -9
  11. package/dist/documentation/utils.mjs +1 -1
  12. package/dist/index.cjs +94 -94
  13. package/dist/index.d.ts +58 -2
  14. package/dist/index.mjs +778 -776
  15. package/dist/navigation/NiceMenu.mjs +249 -248
  16. package/dist/navigation.cjs +1 -1
  17. package/dist/navigation.d.ts +6 -0
  18. package/dist/overlays/NiceResponsiveBox.mjs +51 -24
  19. package/dist/overlays/NiceTutorial.mjs +136 -127
  20. package/dist/overlays.cjs +1 -1
  21. package/dist/overlays.d.ts +25 -2
  22. package/dist/planning/NiceGantt.mjs +130 -121
  23. package/dist/planning/NiceStepper.mjs +36 -35
  24. package/dist/style.css +2 -2
  25. package/dist/tools/NiceDraggable.mjs +44 -29
  26. package/dist/tools/NiceSortable.mjs +66 -48
  27. package/dist/tools/NiceSpeechToText.mjs +67 -52
  28. package/dist/tools/NiceValidationBuilder.mjs +210 -119
  29. package/dist/tools/NiceViewRegistry.mjs +67 -34
  30. package/package.json +4 -4
  31. package/dist/NiceBottomSheet.doc-keq-Fzlz.cjs +0 -8
  32. package/dist/NiceGantt-BygumlaY.cjs +0 -1
  33. package/dist/NiceModuleLifecyclePanel-DAIbzfZd.cjs +0 -1
  34. package/dist/NiceWindow-BklnkBpu.cjs +0 -1
  35. package/dist/docs/NiceBottomSheet.doc.json.mjs +0 -32
package/dist/index.d.ts CHANGED
@@ -423,6 +423,7 @@ import { NiceUserMenuResponse } from '@nice2dev/ui-core';
423
423
  import { NiceUserPreferences } from '@nice2dev/ui-core';
424
424
  import { NiceUserPreferencesProvider } from '@nice2dev/ui-core';
425
425
  import { NiceUserPreferencesProviderProps } from '@nice2dev/ui-core';
426
+ import { NiceValidationOptions } from '@nice2dev/ui-core';
426
427
  import { NiceValidationStatus } from '@nice2dev/ui-core';
427
428
  import { NiceVariant } from '@nice2dev/ui-core';
428
429
  import { NiceVisuallyHidden } from '@nice2dev/ui-core';
@@ -7478,6 +7479,9 @@ export { NICE_DISPLAY_STYLE_INFO }
7478
7479
 
7479
7480
  export { NICE_DISPLAY_STYLES }
7480
7481
 
7482
+ /** The drag data's type in `dataTransfer` (1.4.21). */
7483
+ export declare const NICE_DRAG_MIME = "application/nice-drag";
7484
+
7481
7485
  export { NICE_INPUT_DEFAULTS }
7482
7486
 
7483
7487
  export { NICE_INTENT_EVENT }
@@ -17189,6 +17193,12 @@ export declare interface NiceMenuProps extends NiceBaseProps {
17189
17193
  showDividers?: boolean;
17190
17194
  /** Top-item alignment for dropdown panels. */
17191
17195
  panelAlign?: NiceMenuAlign;
17196
+ /**
17197
+ * What `panelAlign` lines a dropdown panel up with (1.4.21): the item it opens from (default) or
17198
+ * the whole menu bar — `start` / `center` / `end` of the bar. Horizontal menus in portal mode (the
17199
+ * default); without a portal the panel stays at its item.
17200
+ */
17201
+ panelAnchor?: 'item' | 'menu';
17192
17202
  /** Min width for dropdown / sub-panel (px). */
17193
17203
  panelMinWidth?: number;
17194
17204
  /** Max width for dropdown / sub-panel (px). */
@@ -20991,6 +21001,11 @@ export declare interface NiceResponseContract {
20991
21001
  fields?: NiceFieldExpectation[];
20992
21002
  }
20993
21003
 
21004
+ /**
21005
+ * {@link NiceResponsiveBox} — a flex row of items with ratios that adapts to the room it has (1.4.21:
21006
+ * "kompletnie nieresponsywne" — it was a fixed row): it stacks into a column when narrower than
21007
+ * `stackBelow` and, with `minItemWidth`, wraps items onto new lines rather than squeezing them.
21008
+ */
20994
21009
  export declare const NiceResponsiveBox: default_2.FC<NiceResponsiveBoxProps>;
20995
21010
 
20996
21011
  /** A flex item within the {@link NiceResponsiveBox}. */
@@ -21007,12 +21022,22 @@ export declare interface NiceResponsiveBoxItem {
21007
21022
 
21008
21023
  /** Props for the {@link NiceResponsiveBox} component — a flex container with configurable ratios and base sizes. */
21009
21024
  export declare interface NiceResponsiveBoxProps extends NiceBaseProps {
21010
- /** Flex direction. */
21025
+ /** Flex direction (while the box is wide enough — see `stackBelow`). */
21011
21026
  direction?: 'row' | 'column';
21012
21027
  /** Flex items. */
21013
21028
  items?: NiceResponsiveBoxItem[];
21014
21029
  /** Gap between items (px or CSS value). */
21015
21030
  gap?: number | string;
21031
+ /**
21032
+ * Below this width of the box (px) a row stacks into a column (1.4.21; default 480, `0` never). The
21033
+ * box's own width counts, not the window's, so it adapts wherever it is placed.
21034
+ */
21035
+ stackBelow?: number;
21036
+ /**
21037
+ * Items never shrink below this width (px): they wrap onto the next line instead (1.4.21). Unset:
21038
+ * no wrapping.
21039
+ */
21040
+ minItemWidth?: number;
21016
21041
  }
21017
21042
 
21018
21043
  export { NiceResponsiveValue }
@@ -22977,6 +23002,8 @@ export declare interface NiceSpeechToTextProps extends NiceBaseProps {
22977
23002
  activeLabel?: string;
22978
23003
  /** Show the visible text label next to the icon. Defaults to `false` (icon-only). The aria-label is always present. */
22979
23004
  showLabel?: boolean;
23005
+ /** Called with the browser's error code (`not-allowed`, `audio-capture`, `no-speech`, `network`, …). */
23006
+ onError?: (code: string) => void;
22980
23007
  }
22981
23008
 
22982
23009
  export declare const NiceSpeedDialAction: default_2.FC<NiceSpeedDialProps>;
@@ -23349,8 +23376,18 @@ export declare interface NiceStepperStep {
23349
23376
  content?: default_2.ReactNode;
23350
23377
  /** Mark the step as optional. */
23351
23378
  optional?: boolean;
23379
+ /**
23380
+ * The step's state, overriding the one its place gives (1.4.21): `error` shows a cross in the error
23381
+ * colour, `skipped` a muted, dashed indicator.
23382
+ */
23383
+ status?: NiceStepperStepStatus;
23384
+ /** More under the subtitle — a note, a comment (1.4.21). */
23385
+ description?: default_2.ReactNode;
23352
23386
  }
23353
23387
 
23388
+ /** A step's state in a {@link NiceStepper} (1.4.21). */
23389
+ export declare type NiceStepperStepStatus = 'completed' | 'active' | 'pending' | 'error' | 'skipped';
23390
+
23354
23391
  export declare const NiceStockChart: default_2.ForwardRefExoticComponent<NiceStockChartProps & default_2.RefAttributes<HTMLDivElement>> & {
23355
23392
  displayName: string;
23356
23393
  };
@@ -25654,10 +25691,18 @@ export declare interface NiceTutorialProps {
25654
25691
  closeOnEscape?: boolean;
25655
25692
  /** Close on overlay click (default false) */
25656
25693
  closeOnOverlayClick?: boolean;
25657
- /** Show step progress indicator (default true) */
25694
+ /** Show the "1 of 5" step counter (default true) */
25658
25695
  showProgress?: boolean;
25659
25696
  /** Show skip button (default true) */
25660
25697
  showSkipButton?: boolean;
25698
+ /** Show the Back button from the second step on (default true). 1.4.21. */
25699
+ showBackButton?: boolean;
25700
+ /** Show the close (×) icon in the tooltip header (default: follows `showSkipButton`). 1.4.21. */
25701
+ showCloseButton?: boolean;
25702
+ /** Show the progress bar (default: follows `showAutoplay`). 1.4.21. */
25703
+ showProgressBar?: boolean;
25704
+ /** Show the autoplay speed slider next to Play (default true). 1.4.21. */
25705
+ showSpeedControl?: boolean;
25661
25706
  /** Custom labels */
25662
25707
  labels?: {
25663
25708
  next?: string;
@@ -26061,6 +26106,8 @@ export declare interface NiceValidationIssue {
26061
26106
  path?: string;
26062
26107
  }
26063
26108
 
26109
+ export { NiceValidationOptions }
26110
+
26064
26111
  /** Validation report. */
26065
26112
  export declare interface NiceValidationReport {
26066
26113
  /** View id. */
@@ -28185,6 +28232,15 @@ export declare type RbacAction = 'create' | 'read' | 'update' | 'delete' | 'expo
28185
28232
 
28186
28233
  export { ReactQueryAdapterConfig }
28187
28234
 
28235
+ /**
28236
+ * What a {@link NiceDraggable} carries, read in a drop target's `onDrop` (1.4.21): its `data` and
28237
+ * `group`, or `null` for a drag that did not come from one.
28238
+ */
28239
+ export declare function readNiceDrag(event: Pick<DragEvent, 'dataTransfer'> | default_2.DragEvent): {
28240
+ data: unknown;
28241
+ group?: string;
28242
+ } | null;
28243
+
28188
28244
  export declare interface RealtimeDataPoint {
28189
28245
  timestamp: number;
28190
28246
  value: number;