@wizleap-inc/wiz-ui-react 0.14.0 → 0.16.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.
Files changed (58) hide show
  1. package/dist/components/base/dropdown/components/dropdown-item.d.ts +10 -0
  2. package/dist/components/base/dropdown/components/dropdown.d.ts +13 -0
  3. package/dist/components/base/dropdown/components/index.d.ts +2 -0
  4. package/dist/components/base/dropdown/index.d.ts +1 -0
  5. package/dist/components/base/index.d.ts +5 -0
  6. package/dist/components/base/inputs/checkbox/components/checkbox.d.ts +14 -0
  7. package/dist/components/base/inputs/checkbox/components/index.d.ts +2 -0
  8. package/dist/components/base/inputs/checkbox/components/types.d.ts +6 -0
  9. package/dist/components/base/inputs/checkbox/index.d.ts +1 -0
  10. package/dist/components/base/inputs/index.d.ts +4 -0
  11. package/dist/components/base/inputs/selectbox/components/index.d.ts +1 -0
  12. package/dist/components/base/inputs/selectbox/components/selectbox.d.ts +19 -0
  13. package/dist/components/base/inputs/selectbox/index.d.ts +1 -0
  14. package/dist/components/base/inputs/time-picker/components/index.d.ts +1 -0
  15. package/dist/components/base/inputs/time-picker/components/time-picker.d.ts +15 -0
  16. package/dist/components/base/inputs/time-picker/index.d.ts +1 -0
  17. package/dist/components/base/inputs/time-picker/types/time.d.ts +6 -0
  18. package/dist/components/base/inputs/upload/components/index.d.ts +2 -0
  19. package/dist/components/base/inputs/upload/components/upload-display.d.ts +12 -0
  20. package/dist/components/base/inputs/upload/components/upload-input.d.ts +7 -0
  21. package/dist/components/base/inputs/upload/index.d.ts +1 -0
  22. package/dist/components/base/navigation/components/index.d.ts +2 -0
  23. package/dist/components/base/navigation/components/navigation-container.d.ts +10 -0
  24. package/dist/components/base/navigation/components/navigation-item.d.ts +18 -0
  25. package/dist/components/base/navigation/index.d.ts +1 -0
  26. package/dist/components/base/popup/utils/wrap.d.ts +4 -1
  27. package/dist/components/base/popup-button-group/components/button-item.d.ts +9 -0
  28. package/dist/components/base/popup-button-group/components/divider-item.d.ts +2 -0
  29. package/dist/components/base/popup-button-group/components/group-item.d.ts +9 -0
  30. package/dist/components/base/popup-button-group/components/index.d.ts +1 -0
  31. package/dist/components/base/popup-button-group/components/popup-button-group.d.ts +16 -0
  32. package/dist/components/base/popup-button-group/index.d.ts +1 -0
  33. package/dist/components/base/popup-button-group/types.d.ts +30 -0
  34. package/dist/components/base/snackbar/components/index.d.ts +3 -0
  35. package/dist/components/base/snackbar/components/snackbar-context.d.ts +6 -0
  36. package/dist/components/base/snackbar/components/snackbar-provider.d.ts +4 -0
  37. package/dist/components/base/snackbar/components/snackbar.d.ts +9 -0
  38. package/dist/components/base/snackbar/index.d.ts +1 -0
  39. package/dist/components/base/tooltip/components/index.d.ts +1 -0
  40. package/dist/components/base/tooltip/components/tooltip.d.ts +10 -0
  41. package/dist/components/base/tooltip/index.d.ts +1 -0
  42. package/dist/components/custom/form/components/form-control.d.ts +10 -0
  43. package/dist/components/custom/form/components/form-group-context.d.ts +8 -0
  44. package/dist/components/custom/form/components/form-group.d.ts +11 -0
  45. package/dist/components/custom/form/components/index.d.ts +2 -0
  46. package/dist/components/custom/form/index.d.ts +1 -0
  47. package/dist/components/custom/index.d.ts +2 -0
  48. package/dist/components/custom/notification/components/index.d.ts +3 -0
  49. package/dist/components/custom/notification/components/notification-list.d.ts +11 -0
  50. package/dist/components/custom/notification/components/notification-panel.d.ts +12 -0
  51. package/dist/components/custom/notification/components/notification.d.ts +11 -0
  52. package/dist/components/custom/notification/components/types.d.ts +20 -0
  53. package/dist/components/custom/notification/index.d.ts +1 -0
  54. package/dist/style.css +1 -1
  55. package/dist/wiz-ui.es.js +3281 -2044
  56. package/dist/wiz-ui.umd.js +25 -25
  57. package/package.json +3 -3
  58. /package/dist/components/custom/form/{form-control-context.d.ts → components/form-control-context.d.ts} +0 -0
@@ -0,0 +1,10 @@
1
+ import { FC, MouseEventHandler, ReactNode } from "react";
2
+ import { TIcon } from '../../../../components/icons';
3
+ type Props = {
4
+ icon?: TIcon;
5
+ disabled?: boolean;
6
+ onClick?: MouseEventHandler<HTMLButtonElement>;
7
+ children: ReactNode;
8
+ };
9
+ export declare const WizDropdownItem: FC<Props>;
10
+ export {};
@@ -0,0 +1,13 @@
1
+ import { ComponentProps, FC, ReactNode } from "react";
2
+ import { WizPopup } from '../../../../components';
3
+ type Props = {
4
+ isOpen: boolean;
5
+ children: ReactNode;
6
+ options: ReactNode;
7
+ skeleton?: boolean;
8
+ gap?: ComponentProps<typeof WizPopup>["gap"];
9
+ isDirectionFixed?: boolean;
10
+ onClose: () => void;
11
+ };
12
+ export declare const WizDropdown: FC<Props>;
13
+ export {};
@@ -0,0 +1,2 @@
1
+ export { WizDropdown } from "./dropdown";
2
+ export { WizDropdownItem } from "./dropdown-item";
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -22,4 +22,9 @@ export * from "./calendar";
22
22
  export * from "./accordion";
23
23
  export * from "./text";
24
24
  export * from "./graphs";
25
+ export * from "./tooltip";
25
26
  export * from "./heading";
27
+ export * from "./popup-button-group";
28
+ export * from "./navigation";
29
+ export * from "./dropdown";
30
+ export * from "./snackbar";
@@ -0,0 +1,14 @@
1
+ import { SpacingKeys } from "@wizleap-inc/wiz-ui-constants";
2
+ import { FC } from "react";
3
+ import { CheckBoxOption } from "./types";
4
+ type Props = {
5
+ options: CheckBoxOption[];
6
+ values: number[];
7
+ disabled?: boolean;
8
+ direction?: "horizontal" | "vertical";
9
+ gap?: SpacingKeys;
10
+ strikeThrough?: boolean;
11
+ onChange?: (values: number[]) => void;
12
+ };
13
+ export declare const WizCheckBox: FC<Props>;
14
+ export {};
@@ -0,0 +1,2 @@
1
+ export { WizCheckBox } from "./checkbox";
2
+ export * from "./types";
@@ -0,0 +1,6 @@
1
+ export interface CheckBoxOption {
2
+ label: string;
3
+ value: number;
4
+ disabled?: boolean;
5
+ key: string;
6
+ }
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -1,4 +1,8 @@
1
+ export * from "./checkbox";
1
2
  export * from "./radio";
3
+ export * from "./selectbox";
2
4
  export * from "./text";
3
5
  export * from "./toggle-switch";
4
6
  export * from "./panel-switch";
7
+ export * from "./time-picker";
8
+ export * from "./upload";
@@ -0,0 +1 @@
1
+ export { WizSelectBox } from "./selectbox";
@@ -0,0 +1,19 @@
1
+ import { FC } from "react";
2
+ type SelectBoxOption = {
3
+ label: string;
4
+ exLabel?: string;
5
+ value: number;
6
+ };
7
+ type Props = {
8
+ options: SelectBoxOption[];
9
+ value: number | null;
10
+ placeholder?: string;
11
+ width?: string;
12
+ disabled?: boolean;
13
+ expand?: boolean;
14
+ error?: boolean;
15
+ isDirectionFixed?: boolean;
16
+ onChange: (value: number | null) => void;
17
+ };
18
+ export declare const WizSelectBox: FC<Props>;
19
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -0,0 +1 @@
1
+ export * from "./time-picker";
@@ -0,0 +1,15 @@
1
+ import { Time } from "../types/time";
2
+ type Props = {
3
+ time: Time | null;
4
+ placeholder?: string;
5
+ width?: string;
6
+ disabled?: boolean;
7
+ isDirectionFixed?: boolean;
8
+ error?: boolean;
9
+ onChange: (time: Time | null) => void;
10
+ };
11
+ export declare const WizTimePicker: {
12
+ ({ time, placeholder, width, disabled, isDirectionFixed, error, onChange, }: Props): JSX.Element;
13
+ displayName: "WizTimePicker";
14
+ };
15
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -0,0 +1,6 @@
1
+ export declare const HOURS: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
2
+ export declare const MINUTES: readonly [0, 15, 30, 45];
3
+ export type Time = {
4
+ hour: (typeof HOURS)[number];
5
+ minute: (typeof MINUTES)[number];
6
+ };
@@ -0,0 +1,2 @@
1
+ export { WizUploadInput } from "./upload-input";
2
+ export { WizUploadDisplay } from "./upload-display";
@@ -0,0 +1,12 @@
1
+ import { FC } from "react";
2
+ type Props = {
3
+ files: File[];
4
+ uploadingFileCount: number;
5
+ completedFileCount: number;
6
+ progress: number;
7
+ isUploaded: boolean;
8
+ isUploading: boolean;
9
+ multiple: boolean;
10
+ };
11
+ export declare const WizUploadDisplay: FC<Props>;
12
+ export {};
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ type Props = {
3
+ setupXHR: () => XMLHttpRequest;
4
+ multiple?: boolean;
5
+ };
6
+ export declare const WizUploadInput: FC<Props>;
7
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -0,0 +1,2 @@
1
+ export { WizNavigationItem } from "./navigation-item";
2
+ export { WizNavigationContainer } from "./navigation-container";
@@ -0,0 +1,10 @@
1
+ import { FC, ReactNode } from "react";
2
+ interface Props {
3
+ isOpen: boolean;
4
+ width?: string;
5
+ sticky?: boolean;
6
+ children: ReactNode;
7
+ footer?: ReactNode;
8
+ }
9
+ export declare const WizNavigationContainer: FC<Props>;
10
+ export {};
@@ -0,0 +1,18 @@
1
+ import { FC } from "react";
2
+ import { TIcon } from '../../../../components';
3
+ import { ButtonGroupItem } from "../../popup-button-group/types";
4
+ interface Props {
5
+ icon: TIcon;
6
+ label: string;
7
+ active: boolean;
8
+ href: string;
9
+ disabled?: boolean;
10
+ tooltipText?: string;
11
+ isPopupLocking?: boolean;
12
+ buttons?: ButtonGroupItem[];
13
+ isPopupOpen?: boolean;
14
+ onTogglePopup: (isPopup: boolean) => void;
15
+ onTogglePopupLocking: (lock: boolean) => void;
16
+ }
17
+ export declare const WizNavigationItem: FC<Props>;
18
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -1,6 +1,9 @@
1
1
  import { DirectionValue } from "../types/direction";
2
2
  export type Args = {
3
- bound: DOMRect;
3
+ bound: {
4
+ width: number;
5
+ height: number;
6
+ };
4
7
  content: DOMRect;
5
8
  anchor: DOMRect;
6
9
  gap: number;
@@ -0,0 +1,9 @@
1
+ import { FC } from "react";
2
+ import { ButtonItem as ButtonItemType } from "../types";
3
+ interface Props {
4
+ item: ButtonItemType;
5
+ disabled: boolean;
6
+ depth: number;
7
+ }
8
+ export declare const ButtonItem: FC<Props>;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ import { FC } from "react";
2
+ export declare const DividerItem: FC;
@@ -0,0 +1,9 @@
1
+ import { FC } from "react";
2
+ import { GroupItem as GroupItemType } from "../types";
3
+ interface Props {
4
+ item: GroupItemType;
5
+ disabled: boolean;
6
+ depth: number;
7
+ }
8
+ export declare const GroupItem: FC<Props>;
9
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./popup-button-group";
@@ -0,0 +1,16 @@
1
+ import { SpacingKeys } from "@wizleap-inc/wiz-ui-constants";
2
+ import { FC } from "react";
3
+ import { ButtonGroupItem } from "../types";
4
+ interface Props {
5
+ options: ButtonGroupItem[];
6
+ width?: string;
7
+ p?: SpacingKeys;
8
+ borderRadius?: SpacingKeys;
9
+ disabled?: boolean;
10
+ expand?: boolean;
11
+ groupDivider?: boolean;
12
+ buttonDivider?: boolean;
13
+ depth?: number;
14
+ }
15
+ export declare const WizPopupButtonGroup: FC<Props>;
16
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -0,0 +1,30 @@
1
+ import { TIcon } from '../../../components';
2
+ export interface PopupButtonOption {
3
+ label: string;
4
+ value: number;
5
+ exLabel?: string;
6
+ icon?: TIcon;
7
+ iconDefaultColor?: "green.800" | "gray.500";
8
+ disabled?: boolean;
9
+ onClick: () => void;
10
+ }
11
+ export interface ButtonItem {
12
+ kind: "button";
13
+ option: PopupButtonOption;
14
+ }
15
+ interface DividerItem {
16
+ kind: "divider";
17
+ }
18
+ export interface GroupItem {
19
+ kind: "group";
20
+ title: string;
21
+ items: ButtonGroupItem[];
22
+ groupDivider?: boolean;
23
+ buttonDivider?: boolean;
24
+ }
25
+ export type ButtonGroupItem = ButtonItem | DividerItem | GroupItem;
26
+ export type ItemElement = DividerItem | {
27
+ kind: "item";
28
+ item: Exclude<ButtonGroupItem, DividerItem>;
29
+ };
30
+ export {};
@@ -0,0 +1,3 @@
1
+ export { WizSnackbar } from "./snackbar";
2
+ export { useSnackbar } from "./snackbar-context";
3
+ export { WizSnackbarProvider } from "./snackbar-provider";
@@ -0,0 +1,6 @@
1
+ type SnackbarContextType = {
2
+ showSnackbar: (message: string) => void;
3
+ };
4
+ export declare const SnackbarContext: import("react").Context<SnackbarContextType>;
5
+ export declare const useSnackbar: () => SnackbarContextType;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ import { FC, ReactNode } from "react";
2
+ export declare const WizSnackbarProvider: FC<{
3
+ children: ReactNode;
4
+ }>;
@@ -0,0 +1,9 @@
1
+ import { FC } from "react";
2
+ type Props = {
3
+ message: string;
4
+ enableAnimation?: boolean;
5
+ autoClose?: boolean;
6
+ onClose: () => void;
7
+ };
8
+ export declare const WizSnackbar: FC<Props>;
9
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -0,0 +1 @@
1
+ export * from "./tooltip";
@@ -0,0 +1,10 @@
1
+ import { FC, ReactNode } from "react";
2
+ interface Props {
3
+ direction?: "top" | "bottom" | "left" | "right";
4
+ hover?: boolean;
5
+ isDirectionFixed?: boolean;
6
+ children: ReactNode;
7
+ content: ReactNode;
8
+ }
9
+ export declare const WizTooltip: FC<Props>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export { WizTooltip } from "./components";
@@ -0,0 +1,10 @@
1
+ import { FC, ReactNode } from "react";
2
+ type Props = {
3
+ htmlFor?: string;
4
+ label: string;
5
+ required?: boolean;
6
+ error?: string;
7
+ children: ReactNode;
8
+ };
9
+ export declare const WizFormControl: FC<Props>;
10
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ColorKeys, FontSizeKeys } from "@wizleap-inc/wiz-ui-constants";
2
+ type FormGroupContextType = {
3
+ labelWidth?: string;
4
+ labelColor?: ColorKeys;
5
+ labelFontSize?: FontSizeKeys;
6
+ };
7
+ export declare const FormGroupContext: import("react").Context<FormGroupContextType>;
8
+ export {};
@@ -0,0 +1,11 @@
1
+ import { ColorKeys, FontSizeKeys, SpacingKeys } from "@wizleap-inc/wiz-ui-constants";
2
+ import { FC, ReactNode } from "react";
3
+ type Props = {
4
+ labelWidth?: string;
5
+ labelColor?: ColorKeys;
6
+ labelFontSize?: FontSizeKeys;
7
+ gap?: SpacingKeys;
8
+ children: ReactNode;
9
+ };
10
+ export declare const WizFormGroup: FC<Props>;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ export { WizFormControl } from "./form-control";
2
+ export { WizFormGroup } from "./form-group";
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -1 +1,3 @@
1
+ export * from "./form";
2
+ export * from "./notification";
1
3
  export * from "./schedule";
@@ -0,0 +1,3 @@
1
+ export { WizNotification } from "./notification";
2
+ export { WizNotificationList } from "./notification-list";
3
+ export { WizNotificationPanel } from "./notification-panel";
@@ -0,0 +1,11 @@
1
+ import { FC } from "react";
2
+ import { NotificationItem, PanelVariant } from "./types";
3
+ type Props = {
4
+ variant?: PanelVariant;
5
+ notifications: NotificationItem[];
6
+ height?: string;
7
+ emptyMessage?: string;
8
+ onClick?: (id: string) => void;
9
+ };
10
+ export declare const WizNotificationList: FC<Props>;
11
+ export {};
@@ -0,0 +1,12 @@
1
+ import { FC } from "react";
2
+ import { PanelVariant, TableInfoItem } from "./types";
3
+ type Props = {
4
+ title: string;
5
+ timestamp: Date;
6
+ variant?: PanelVariant;
7
+ read: boolean;
8
+ tableInfo?: TableInfoItem[];
9
+ onClick?: () => void;
10
+ };
11
+ export declare const WizNotificationPanel: FC<Props>;
12
+ export {};
@@ -0,0 +1,11 @@
1
+ import { FC } from "react";
2
+ import { NotificationItem, NotificationTabItem } from "./types";
3
+ type Props = {
4
+ tabs: NotificationTabItem[];
5
+ notifications: NotificationItem[];
6
+ height?: string;
7
+ emptyMessage?: string;
8
+ onClick?: (id: string) => void;
9
+ };
10
+ export declare const WizNotification: FC<Props>;
11
+ export {};
@@ -0,0 +1,20 @@
1
+ export type PanelVariant = "primary" | "secondary";
2
+ export type NotificationTabItem = {
3
+ label: string;
4
+ name: string;
5
+ notificationCount?: number;
6
+ disabled?: boolean;
7
+ variant: PanelVariant;
8
+ };
9
+ export type TableInfoItem = {
10
+ title: string;
11
+ content: string;
12
+ };
13
+ export type NotificationItem = {
14
+ id: string;
15
+ title: string;
16
+ timestamp: Date;
17
+ tabName: string;
18
+ read: boolean;
19
+ tableInfo?: TableInfoItem[];
20
+ };
@@ -0,0 +1 @@
1
+ export * from "./components";