@stenajs-webui/elements 18.1.2 → 18.3.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/dist/components/ui/dialog/DialogCommands.d.ts +3 -0
- package/dist/components/ui/dialog/DialogContext.d.ts +7 -0
- package/dist/components/ui/dialog/UseDialog.d.ts +22 -0
- package/dist/components/ui/dialog/UseDialogPromise.d.ts +2 -0
- package/dist/components/ui/dialog/drawer/UseDrawerDialog.d.ts +9 -0
- package/dist/components/ui/dialog/modal/UseModalDialog.d.ts +3 -0
- package/dist/components/ui/tag/Tag.d.ts +5 -1
- package/dist/icons/ui/IconsUi.d.ts +5 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.es.js +1336 -1160
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/CHANGELOG.md +0 -549
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,7 @@
|
|
|
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>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { 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
|
+
ref?: RefObject<HTMLDialogElement>;
|
|
18
|
+
onResolve?: () => void;
|
|
19
|
+
onReject?: () => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function useDialog<TProps, TPromiseResolve = void>(component: React.FC<TProps>, options: DialogOptions): UseDialogResult<TProps, TPromiseResolve>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
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,10 +1,14 @@
|
|
|
1
|
+
import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
|
1
2
|
import * as React from "react";
|
|
3
|
+
import { CSSProperties } from "react";
|
|
2
4
|
export interface TagProps {
|
|
3
5
|
variant?: TagVariant;
|
|
4
6
|
label?: string;
|
|
5
7
|
size?: TagSize;
|
|
6
8
|
className?: string;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
icon?: IconDefinition;
|
|
7
11
|
}
|
|
8
|
-
export declare type TagVariant = "info" | "error" | "warning" | "success" | "passive"
|
|
12
|
+
export declare type TagVariant = "info" | "error" | "warning" | "success" | "passive";
|
|
9
13
|
export declare type TagSize = "medium" | "small";
|
|
10
14
|
export declare const Tag: React.FC<TagProps>;
|
|
@@ -73,6 +73,9 @@ export declare const stenaFileXlsLabel: IconDefinition;
|
|
|
73
73
|
export declare const stenaFilter: IconDefinition;
|
|
74
74
|
export declare const stenaFinancePaid: IconDefinition;
|
|
75
75
|
export declare const stenaFinancePay: IconDefinition;
|
|
76
|
+
export declare const stenaFinanceRaise: IconDefinition;
|
|
77
|
+
export declare const stenaFinanceRebatePercent: IconDefinition;
|
|
78
|
+
export declare const stenaFinanceRebate: IconDefinition;
|
|
76
79
|
export declare const stenaFinanceUnpaid: IconDefinition;
|
|
77
80
|
export declare const stenaFinanceWallet: IconDefinition;
|
|
78
81
|
export declare const stenaHamburger: IconDefinition;
|
|
@@ -111,6 +114,7 @@ export declare const stenaQuestionBubble: IconDefinition;
|
|
|
111
114
|
export declare const stenaQuestionCircle: IconDefinition;
|
|
112
115
|
export declare const stenaRefresh: IconDefinition;
|
|
113
116
|
export declare const stenaSailingCargo: IconDefinition;
|
|
117
|
+
export declare const stenaSailingCrane: IconDefinition;
|
|
114
118
|
export declare const stenaSailingDrivers: IconDefinition;
|
|
115
119
|
export declare const stenaSailingGate: IconDefinition;
|
|
116
120
|
export declare const stenaSailingImportExport: IconDefinition;
|
|
@@ -153,6 +157,7 @@ export declare const stenaSync: IconDefinition;
|
|
|
153
157
|
export declare const stenaTag: IconDefinition;
|
|
154
158
|
export declare const stenaTags: IconDefinition;
|
|
155
159
|
export declare const stenaTimesCircle: IconDefinition;
|
|
160
|
+
export declare const stenaTimesSmall: IconDefinition;
|
|
156
161
|
export declare const stenaTimes: IconDefinition;
|
|
157
162
|
export declare const stenaTodoDone: IconDefinition;
|
|
158
163
|
export declare const stenaTodoList: IconDefinition;
|
package/dist/index.d.ts
CHANGED
|
@@ -42,3 +42,7 @@ export * from "./components/ui/value-table/ValueTable";
|
|
|
42
42
|
export * from "./components/ui/value-table/ValueTableItem";
|
|
43
43
|
export * from "./components/ui/route-leg/RouteLeg";
|
|
44
44
|
export * from "./components/ui/route-leg/TimeTag";
|
|
45
|
+
export * from "./components/ui/dialog/UseDialog";
|
|
46
|
+
export * from "./components/ui/dialog/UseDialogPromise";
|
|
47
|
+
export * from "./components/ui/dialog/drawer/UseDrawerDialog";
|
|
48
|
+
export * from "./components/ui/dialog/modal/UseModalDialog";
|