@stenajs-webui/elements 19.0.5 → 20.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stenajs-webui/elements",
3
- "version": "19.0.5",
3
+ "version": "20.0.0",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "author": "mattias800",
@@ -34,8 +34,8 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@react-aria/focus": "^3.15.0",
37
- "@stenajs-webui/core": "19.0.5",
38
- "@stenajs-webui/theme": "19.0.5",
37
+ "@stenajs-webui/core": "20.0.0",
38
+ "@stenajs-webui/theme": "20.0.0",
39
39
  "classnames": "^2.3.1"
40
40
  },
41
41
  "peerDependencies": {
@@ -68,5 +68,5 @@
68
68
  "files": [
69
69
  "dist"
70
70
  ],
71
- "gitHead": "36e2d14bb36897ef637580b66bc40e2dda274348"
71
+ "gitHead": "44209c859186d3264a3bd136fac61c622b51d01d"
72
72
  }
@@ -1,3 +0,0 @@
1
- export declare type ShowCommand<TProps, TPromiseResolve> = keyof TProps extends never ? () => Promise<TPromiseResolve | undefined> : (props: TProps) => Promise<TPromiseResolve | undefined>;
2
- export declare type ResolveCommand<TPromiseResolve> = (resolveValue: TPromiseResolve) => void;
3
- export declare type RejectCommand = (error?: Error) => void;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { RejectCommand, ResolveCommand } from "./DialogCommands";
3
- export interface DialogContextValue<TResolveValue> {
4
- resolve: ResolveCommand<TResolveValue>;
5
- reject: RejectCommand;
6
- }
7
- export declare const DialogContext: import("react").Context<DialogContextValue<any> | undefined>;
@@ -1,23 +0,0 @@
1
- import React, { CSSProperties, ReactNode, RefObject } from "react";
2
- import { RejectCommand, ShowCommand } from "./DialogCommands";
3
- declare type UseDialogCallbacks<TProps, TPromiseResolve> = {
4
- show: ShowCommand<TProps, TPromiseResolve>;
5
- reject: RejectCommand;
6
- };
7
- export declare type UseDialogResult<TProps, TPromiseResolve> = [
8
- ReactNode,
9
- UseDialogCallbacks<TProps, TPromiseResolve>
10
- ];
11
- export interface DialogOptions {
12
- disableCloseOnClickOutside?: boolean;
13
- modal: boolean;
14
- className: string;
15
- closingClassName: string;
16
- contentWrapperClassName: string;
17
- dialogStyle?: CSSProperties;
18
- ref?: RefObject<HTMLDialogElement>;
19
- onResolve?: () => void;
20
- onReject?: () => void;
21
- }
22
- export declare function useDialog<TProps, TPromiseResolve = void>(component: React.FC<TProps>, options: DialogOptions): UseDialogResult<TProps, TPromiseResolve>;
23
- export {};
@@ -1,2 +0,0 @@
1
- import { DialogContextValue } from "./DialogContext";
2
- export declare const useDialogPromise: <TResolveValue = void>() => DialogContextValue<TResolveValue>;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- import { DialogOptions, UseDialogResult } from "../UseDialog";
3
- export declare function useAlertDialog<TProps, TPromiseResolve = void>(component: React.FC<TProps>, options?: Partial<DialogOptions>): UseDialogResult<TProps, TPromiseResolve>;
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- import { DialogOptions, UseDialogResult } from "../UseDialog";
3
- export declare type SlideFrom = SlideFromLeftRight | SlideFromTopBottom;
4
- export declare type SlideFromLeftRight = "left" | "right";
5
- export declare type SlideFromTopBottom = "top" | "bottom";
6
- interface DrawerOptions extends Partial<Omit<DialogOptions, "disableCloseOnClickOutside">> {
7
- }
8
- export declare function useDrawerDialog<TProps, TPromiseResolve = void>(component: React.FC<TProps>, slideFrom?: SlideFrom, options?: DrawerOptions): UseDialogResult<TProps, TPromiseResolve>;
9
- export {};
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- import { DialogOptions, UseDialogResult } from "../UseDialog";
3
- export declare function useModalDialog<TProps, TPromiseResolve = void>(component: React.FC<TProps>, options?: Partial<DialogOptions>): UseDialogResult<TProps, TPromiseResolve>;
@@ -1,12 +0,0 @@
1
- import * as React from "react";
2
- import { PropsWithChildren, ReactNode } from "react";
3
- import { MediumIcon } from "../../../icons/IconSizes";
4
- export interface AlertInfoModalProps extends PropsWithChildren {
5
- heading: string;
6
- text?: string;
7
- buttons?: ReactNode;
8
- icon?: MediumIcon;
9
- onRequestClose?: () => void;
10
- maxWidth?: string;
11
- }
12
- export declare const InfoAlert: React.FC<AlertInfoModalProps>;
@@ -1,6 +0,0 @@
1
- import * as React from "react";
2
- import { ReactNode } from "react";
3
- export interface ModalActionButtonsProps {
4
- buttons: ReactNode;
5
- }
6
- export declare const ModalActionButtons: React.FC<ModalActionButtonsProps>;
@@ -1,5 +0,0 @@
1
- import * as React from "react";
2
- import { BoxProps } from "@stenajs-webui/core";
3
- export interface ModalBodyProps extends Omit<BoxProps, "indent" | "spacing"> {
4
- }
5
- export declare const ModalBody: React.FC<ModalBodyProps>;
@@ -1,6 +0,0 @@
1
- import * as React from "react";
2
- export interface ModalHeaderProps {
3
- heading?: string;
4
- onClickClose?: () => void;
5
- }
6
- export declare const ModalHeader: React.FC<ModalHeaderProps>;
@@ -1,5 +0,0 @@
1
- import * as React from "react";
2
- export interface ModalHeadingProps {
3
- children: string;
4
- }
5
- export declare const ModalHeading: React.FC<ModalHeadingProps>;