@wizleap-inc/wiz-ui-react 0.16.3 → 0.18.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 (50) hide show
  1. package/dist/components/base/index.d.ts +4 -0
  2. package/dist/components/base/information-panel/components/index.d.ts +1 -0
  3. package/dist/components/base/information-panel/components/information-panel.d.ts +13 -0
  4. package/dist/components/base/information-panel/index.d.ts +1 -0
  5. package/dist/components/base/inputs/index.d.ts +3 -0
  6. package/dist/components/base/inputs/password/components/index.d.ts +1 -0
  7. package/dist/components/base/inputs/password/components/password-input.d.ts +14 -0
  8. package/dist/components/base/inputs/password/index.d.ts +1 -0
  9. package/dist/components/base/inputs/search-input/components/index.d.ts +1 -0
  10. package/dist/components/base/inputs/search-input/components/search-input.d.ts +16 -0
  11. package/dist/components/base/inputs/search-input/components/search-popup-panel.d.ts +10 -0
  12. package/dist/components/base/inputs/search-input/components/types.d.ts +5 -0
  13. package/dist/components/base/inputs/search-input/index.d.ts +1 -0
  14. package/dist/components/base/inputs/search-selector/components/index.d.ts +1 -0
  15. package/dist/components/base/inputs/search-selector/components/search-selector-helper.d.ts +2 -0
  16. package/dist/components/base/inputs/search-selector/components/search-selector.d.ts +18 -0
  17. package/dist/components/base/inputs/search-selector/components/types.d.ts +5 -0
  18. package/dist/components/base/inputs/search-selector/index.d.ts +1 -0
  19. package/dist/components/base/popup/utils/index.d.ts +1 -1
  20. package/dist/components/base/popup/utils/wrap.d.ts +16 -0
  21. package/dist/components/base/progress-bar/components/index.d.ts +3 -0
  22. package/dist/components/base/progress-bar/components/progress-bar.d.ts +7 -0
  23. package/dist/components/base/progress-bar/components/progress-line.d.ts +7 -0
  24. package/dist/components/base/progress-bar/components/progress-point.d.ts +8 -0
  25. package/dist/components/base/progress-bar/components/progress.d.ts +4 -0
  26. package/dist/components/base/progress-bar/index.d.ts +1 -0
  27. package/dist/components/base/progress-bar/types/index.d.ts +1 -0
  28. package/dist/components/base/progress-bar/types/progress-item.d.ts +10 -0
  29. package/dist/components/base/skeleton/components/index.d.ts +3 -0
  30. package/dist/components/base/skeleton/components/skeleton-circle.d.ts +11 -0
  31. package/dist/components/base/skeleton/components/skeleton-text.d.ts +14 -0
  32. package/dist/components/base/skeleton/components/skeleton.d.ts +14 -0
  33. package/dist/components/base/skeleton/index.d.ts +1 -0
  34. package/dist/components/base/text-area/components/index.d.ts +1 -0
  35. package/dist/components/base/text-area/components/text-area.d.ts +12 -0
  36. package/dist/components/base/text-area/index.d.ts +1 -0
  37. package/dist/components/custom/chat/components/chat-card.d.ts +21 -0
  38. package/dist/components/custom/chat/components/chat-form.d.ts +11 -0
  39. package/dist/components/custom/chat/components/chat-item.d.ts +8 -0
  40. package/dist/components/custom/chat/components/index.d.ts +3 -0
  41. package/dist/components/custom/chat/components/types.d.ts +11 -0
  42. package/dist/components/custom/chat/index.d.ts +1 -0
  43. package/dist/components/custom/index.d.ts +1 -0
  44. package/dist/hooks/index.d.ts +2 -0
  45. package/dist/hooks/use-breakpoint.d.ts +40 -0
  46. package/dist/index.d.ts +1 -0
  47. package/dist/style.css +1 -1
  48. package/dist/wiz-ui.es.js +3221 -2310
  49. package/dist/wiz-ui.umd.js +27 -26
  50. package/package.json +1 -1
@@ -7,7 +7,9 @@ export * from "./box";
7
7
  export * from "./card";
8
8
  export * from "./tag";
9
9
  export * from "./icon";
10
+ export * from "./information-panel";
10
11
  export * from "./divider";
12
+ export * from "./progress-bar";
11
13
  export * from "./tab";
12
14
  export * from "./step-bar";
13
15
  export * from "./message-box";
@@ -28,3 +30,5 @@ export * from "./popup-button-group";
28
30
  export * from "./navigation";
29
31
  export * from "./dropdown";
30
32
  export * from "./snackbar";
33
+ export * from "./text-area";
34
+ export * from "./skeleton";
@@ -0,0 +1 @@
1
+ export { WizInformationPanel } from "./information-panel";
@@ -0,0 +1,13 @@
1
+ import { FC } from "react";
2
+ type Message = {
3
+ text: string;
4
+ type: "default" | "error";
5
+ };
6
+ type Props = {
7
+ messages: Message[];
8
+ width?: string;
9
+ border?: boolean;
10
+ onClose: () => void;
11
+ };
12
+ export declare const WizInformationPanel: FC<Props>;
13
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -1,8 +1,11 @@
1
1
  export * from "./checkbox";
2
2
  export * from "./radio";
3
+ export * from "./search-input";
4
+ export * from "./search-selector";
3
5
  export * from "./selectbox";
4
6
  export * from "./text";
5
7
  export * from "./toggle-switch";
6
8
  export * from "./panel-switch";
9
+ export * from "./password";
7
10
  export * from "./time-picker";
8
11
  export * from "./upload";
@@ -0,0 +1 @@
1
+ export { WizPasswordInput } from "./password-input";
@@ -0,0 +1,14 @@
1
+ import { AutoCompleteKeys } from "@wizleap-inc/wiz-ui-constants";
2
+ type Props = {
3
+ id?: string;
4
+ value: string;
5
+ placeholder?: string;
6
+ disabled?: boolean;
7
+ expand?: boolean;
8
+ width?: string;
9
+ autocomplete?: Extract<AutoCompleteKeys, "currentPassword" | "newPassword">;
10
+ error?: boolean;
11
+ onChange: (value: string) => void;
12
+ };
13
+ export declare const WizPasswordInput: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLInputElement>>;
14
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -0,0 +1 @@
1
+ export { WizSearchInput } from "./search-input";
@@ -0,0 +1,16 @@
1
+ import { FC } from "react";
2
+ import { SearchInputOption } from "./types";
3
+ type Props = {
4
+ options: SearchInputOption[];
5
+ values: number[];
6
+ name?: string;
7
+ placeholder?: string;
8
+ disabled?: boolean;
9
+ expand?: boolean;
10
+ inputWidth?: string;
11
+ popupWidth?: string;
12
+ isDirectionFixed?: boolean;
13
+ onChangeValues: (values: number[]) => void;
14
+ };
15
+ export declare const WizSearchInput: FC<Props>;
16
+ export {};
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ import { SearchInputOption } from "./types";
3
+ type Props = {
4
+ options: SearchInputOption[];
5
+ values: number[];
6
+ width?: string;
7
+ onChangeValues: (values: number[]) => void;
8
+ };
9
+ export declare const SearchPopupPanel: FC<Props>;
10
+ export {};
@@ -0,0 +1,5 @@
1
+ export type SearchInputOption = {
2
+ label: string;
3
+ value: number;
4
+ children: SearchInputOption[];
5
+ };
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -0,0 +1 @@
1
+ export { WizSearchSelector } from "./search-selector";
@@ -0,0 +1,2 @@
1
+ import { SearchSelectorOption } from "./types";
2
+ export declare function filterOptions(options: SearchSelectorOption[], searchText: string): SearchSelectorOption[];
@@ -0,0 +1,18 @@
1
+ import { FC } from "react";
2
+ import { SearchSelectorOption } from "./types";
3
+ type Props = {
4
+ options: SearchSelectorOption[];
5
+ values: number[];
6
+ placeholder?: string;
7
+ width?: string;
8
+ disabled?: boolean;
9
+ expand?: boolean;
10
+ multiSelectable?: boolean;
11
+ addable?: boolean;
12
+ error?: boolean;
13
+ isDirectionFixed?: boolean;
14
+ onChangeValues: (values: number[]) => void;
15
+ onCreate?: (label: string) => void;
16
+ };
17
+ export declare const WizSearchSelector: FC<Props>;
18
+ export {};
@@ -0,0 +1,5 @@
1
+ export type SearchSelectorOption = {
2
+ label: string;
3
+ value: number;
4
+ exLabel?: string;
5
+ };
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -1,2 +1,2 @@
1
- export { wrapDirection } from "./wrap";
2
1
  export * from "./placement";
2
+ export { wrapDirection, wrapOutOfBound } from "./wrap";
@@ -39,3 +39,19 @@ export declare const reflection: {
39
39
  verticalCenter: (args: Args) => "Center" | "Top" | "Bottom";
40
40
  };
41
41
  export declare const wrapDirection: Record<DirectionValue, (args: Args) => DirectionValue>;
42
+ /**
43
+ * 境界外にPopupContentが出てしまう場合、回り込みにより方向を変更します。ただし、変更後も境界外に出てしまう場合は変更しません。
44
+ */
45
+ export declare const wrapOutOfBound: (dir: DirectionValue, placementArgs: {
46
+ bound: {
47
+ width: number;
48
+ height: number;
49
+ };
50
+ content: DOMRect;
51
+ anchor: DOMRect;
52
+ gap: number;
53
+ window: {
54
+ scrollX: number;
55
+ scrollY: number;
56
+ };
57
+ }) => DirectionValue;
@@ -0,0 +1,3 @@
1
+ export * from "./progress-bar";
2
+ export * from "./progress-point";
3
+ export * from "./progress-line";
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ import { ProgressItem } from "../types";
3
+ type Props = {
4
+ contents: ProgressItem[];
5
+ };
6
+ export declare const WizProgressBar: FC<Props>;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ type Props = {
3
+ active?: boolean;
4
+ isFirst: boolean;
5
+ };
6
+ export declare const WizProgressLine: FC<Props>;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import { FC } from "react";
2
+ import type { ProgressStatus } from "../types";
3
+ type Props = {
4
+ status: ProgressStatus;
5
+ value?: number;
6
+ };
7
+ export declare const WizProgressPoint: FC<Props>;
8
+ export {};
@@ -0,0 +1,4 @@
1
+ import { ProgressItem } from "../types";
2
+ export declare const Progress: ({ content }: {
3
+ content: ProgressItem;
4
+ }) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -0,0 +1 @@
1
+ export * from "./progress-item";
@@ -0,0 +1,10 @@
1
+ export type ProgressStatus = "done" | "active" | "inactive" | "none" | "pending" | "dead";
2
+ export interface ProgressItem {
3
+ id: string;
4
+ status: ProgressStatus;
5
+ label?: string;
6
+ annotation?: string;
7
+ tooltip?: string;
8
+ progress?: boolean;
9
+ value?: number;
10
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./skeleton";
2
+ export * from "./skeleton-circle";
3
+ export * from "./skeleton-text";
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from "react";
2
+ type Props = {
3
+ size: string;
4
+ isLoading?: boolean;
5
+ children?: ReactNode;
6
+ };
7
+ export declare const WizSkeletonCircle: {
8
+ ({ size, isLoading, children, }: Props): JSX.Element;
9
+ displayName: "WizSkeletonCircle";
10
+ };
11
+ export {};
@@ -0,0 +1,14 @@
1
+ import { FontSizeKeys, SpacingKeys } from "@wizleap-inc/wiz-ui-constants";
2
+ import { ReactNode } from "react";
3
+ type Props = {
4
+ fontSize?: FontSizeKeys;
5
+ gap?: SpacingKeys;
6
+ lines?: number;
7
+ isLoading?: boolean;
8
+ children?: ReactNode;
9
+ };
10
+ export declare const WizSkeletonText: {
11
+ ({ fontSize, gap, lines, isLoading, children, }: Props): JSX.Element;
12
+ displayName: "WizSkeletonText";
13
+ };
14
+ export {};
@@ -0,0 +1,14 @@
1
+ import { SpacingKeys } from "@wizleap-inc/wiz-ui-constants";
2
+ import { ReactNode } from "react";
3
+ type Props = {
4
+ width?: string;
5
+ height?: string;
6
+ borderRadius?: SpacingKeys;
7
+ isLoading?: boolean;
8
+ children?: ReactNode;
9
+ };
10
+ export declare const WizSkeleton: {
11
+ ({ width, height, borderRadius, isLoading, children, }: Props): JSX.Element;
12
+ displayName: "WizSkeleton";
13
+ };
14
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -0,0 +1 @@
1
+ export { WizTextArea } from "./text-area";
@@ -0,0 +1,12 @@
1
+ type Props = {
2
+ id?: string;
3
+ value: string;
4
+ placeholder?: string;
5
+ disabled?: boolean;
6
+ expand?: boolean;
7
+ rows?: number;
8
+ error?: boolean;
9
+ onChange: (value: string) => void;
10
+ };
11
+ export declare const WizTextArea: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLTextAreaElement>>;
12
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -0,0 +1,21 @@
1
+ import { ComponentProps, FC } from "react";
2
+ import { WizSelectBox } from '../../../../components';
3
+ import { Message } from "./types";
4
+ type Props = {
5
+ textValue: string;
6
+ username: string;
7
+ placeholder?: string;
8
+ messages: Message[];
9
+ haveNewMessage?: boolean;
10
+ formRows?: number;
11
+ typingUsername?: string;
12
+ status?: number | null;
13
+ statusOptions?: ComponentProps<typeof WizSelectBox>["options"];
14
+ statusPlaceholder?: string;
15
+ onChangeStatus?: (status: number | null) => void;
16
+ onChangeTextValue: (value: string) => void;
17
+ onSubmit: () => void;
18
+ onToggleOpen?: (isOpen: boolean) => void;
19
+ };
20
+ export declare const WizChatCard: FC<Props>;
21
+ export {};
@@ -0,0 +1,11 @@
1
+ import { FC } from "react";
2
+ type Props = {
3
+ value: string;
4
+ disabled?: boolean;
5
+ placeholder?: string;
6
+ formRows?: number;
7
+ onChange: (value: string) => void;
8
+ onSubmit: () => void;
9
+ };
10
+ export declare const WizChatForm: FC<Props>;
11
+ export {};
@@ -0,0 +1,8 @@
1
+ import { FC } from "react";
2
+ import { Message } from "./types";
3
+ type Props = {
4
+ content: Message;
5
+ maxChatItemWidth?: string;
6
+ };
7
+ export declare const WizChatItem: FC<Props>;
8
+ export {};
@@ -0,0 +1,3 @@
1
+ export { WizChatCard } from "./chat-card";
2
+ export { WizChatItem } from "./chat-item";
3
+ export { WizChatForm } from "./chat-form";
@@ -0,0 +1,11 @@
1
+ export type Message = {
2
+ message: string;
3
+ sender: "me" | "other";
4
+ time: Date;
5
+ username?: string;
6
+ readers?: string[];
7
+ };
8
+ export type DisplayMessage = {
9
+ date: Date;
10
+ contents: Message[];
11
+ };
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -1,3 +1,4 @@
1
+ export * from "./chat";
1
2
  export * from "./form";
2
3
  export * from "./notification";
3
4
  export * from "./schedule";
@@ -0,0 +1,2 @@
1
+ export { useBreakpoint, BreakpointProvider } from "./use-breakpoint";
2
+ export type { Breakpoint, BreakpointVariant } from "./use-breakpoint";
@@ -0,0 +1,40 @@
1
+ import { ReactNode } from "react";
2
+ declare const BREAKPOINTS: readonly ["sm", "md", "lg"];
3
+ /**
4
+ * @see {@link useBreakpoint}
5
+ * @example
6
+ * BreakpointVariantは、次の値のいずれかを取ります。
7
+ * - sm: max-width: 480px(30rem)
8
+ * - md: max-width: 768px(48rem)
9
+ * - lg: max-width: 1024px(64rem)
10
+ *
11
+ * この閾値は、BreakpointProviderを使用して、カスタマイズすることができます。
12
+ */
13
+ export type BreakpointVariant = (typeof BREAKPOINTS)[number];
14
+ export type Breakpoint = Record<BreakpointVariant, number>;
15
+ /**
16
+ * @see {@link BreakpointVariant}
17
+ * @example
18
+ * # カスタマイズ
19
+ * `useBreakpoint`フックを使用して、一番近いBreakpointProviderで設定された値を取得できます。もし設定されてない場合はDEFAULT_BREAKPOINTが返されます。
20
+ * この戻り値は、`bp`という名前のPropsにそのまま渡すことができます。
21
+ *
22
+ * ```jsx
23
+ * import { Timeline } from "wiz-ui-react";
24
+ * import { useBreakpoint } from "wiz-ui-react/hooks/use-breakpoint";
25
+ *
26
+ *
27
+ * const App = () => {
28
+ * const bp = useBreakpoint()
29
+ *
30
+ * return (
31
+ * <Timeline bp={bp} />
32
+ * )
33
+ * };
34
+ */
35
+ export declare const useBreakpoint: () => "sm" | "md" | "lg";
36
+ export declare const BreakpointProvider: ({ children, bp, }: {
37
+ children: ReactNode;
38
+ bp: Breakpoint;
39
+ }) => JSX.Element;
40
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./components";
2
+ export * from "./hooks";
2
3
  export declare const version = "0.0.0";
3
4
  declare const _default: {
4
5
  version: string;