@kingsimba/nc-ui 0.1.18 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -31,25 +31,37 @@ declare interface ActivityIndicatorProps {
31
31
  className?: string;
32
32
  }
33
33
 
34
- export declare function Alert({ code, text, type, button, onAction }: AlertProps): JSX_2.Element;
34
+ export declare function Alert({ code, text, type, button, onAction, children, onClose, className, style, }: AlertProps): JSX_2.Element;
35
35
 
36
- export declare interface AlertProps {
37
- /** Error or warning code to display */
38
- code: number;
39
- /** Alert message text */
36
+ declare interface AlertActionButton {
37
+ /** Button text */
40
38
  text: string;
41
- /** Type of alert - determines styling */
39
+ /** Optional button variant override */
40
+ variant?: ButtonVariant;
41
+ }
42
+
43
+ export declare interface AlertProps {
44
+ /** Optional code shown before the message in the legacy alert layout */
45
+ code?: number | string;
46
+ /** Optional alert message text for the legacy alert layout */
47
+ text?: string;
48
+ /** Visual style of the alert */
42
49
  type: AlertType;
43
50
  /** Optional action button configuration */
44
- button?: {
45
- text: string;
46
- variant?: ButtonVariant;
47
- };
48
- /** Callback when action button is clicked */
51
+ button?: AlertActionButton;
52
+ /** Callback when the action button is clicked */
49
53
  onAction?: () => void;
54
+ /** Optional inline content. When provided, it replaces the legacy code/text layout. */
55
+ children?: default_2.ReactNode;
56
+ /** Optional close handler. When provided, a dismiss button is shown. */
57
+ onClose?: () => void;
58
+ /** Additional CSS class name */
59
+ className?: string;
60
+ /** Additional inline styles */
61
+ style?: default_2.CSSProperties;
50
62
  }
51
63
 
52
- export declare type AlertType = 'warning' | 'error';
64
+ export declare type AlertType = 'info' | 'success' | 'warning' | 'error' | 'danger';
53
65
 
54
66
  /**
55
67
  * Container component that wraps an app with its title bar.
@@ -765,23 +777,34 @@ export { Notification_2 as Notification }
765
777
  export declare function NotificationContainer(): JSX_2.Element;
766
778
 
767
779
  export declare const notificationManager: {
768
- show: (notification: Omit<NotificationType, "id">) => string;
780
+ show: (notification: NotificationOptions_2) => string;
769
781
  };
770
782
 
783
+ declare interface NotificationOptions_2 {
784
+ title?: string;
785
+ message: string;
786
+ type?: NotificationType | 'error';
787
+ dismissible?: boolean;
788
+ duration?: number;
789
+ }
790
+ export { NotificationOptions_2 as NotificationOptions }
791
+
771
792
  declare interface NotificationProps {
772
- notification: NotificationType;
793
+ notification: NotificationRecord;
773
794
  }
774
795
 
775
- export declare interface NotificationType {
796
+ export declare interface NotificationRecord {
776
797
  id: string;
777
798
  title?: string;
778
799
  message: string;
779
- type?: 'warning' | 'danger' | 'success' | null;
800
+ type?: NotificationType;
780
801
  dismissible?: boolean;
781
- lastingTime?: number;
802
+ duration?: number;
782
803
  isRemoving?: boolean;
783
804
  }
784
805
 
806
+ export declare type NotificationType = 'warning' | 'danger' | 'success' | 'info' | null;
807
+
785
808
  export declare function NumberInput({ value, onChange, min, max, step, label, disabled, size }: NumberInputProps): JSX_2.Element;
786
809
 
787
810
  export declare interface NumberInputProps {
@@ -902,6 +925,8 @@ declare class RunningAppsStore {
902
925
 
903
926
  export declare const runningAppsStore: RunningAppsStore;
904
927
 
928
+ export declare function showNotification(notification: NotificationOptions_2): string;
929
+
905
930
  export declare function Slider({ value, onChange, min, max, step, label, disabled, showValue, formatValue, width, }: SliderProps): JSX_2.Element;
906
931
 
907
932
  export declare interface SliderProps {