revdev-components 0.5.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 (42) hide show
  1. package/README.md +40 -0
  2. package/build/dialog/index.d.ts +2 -0
  3. package/build/dialog/info/index.d.ts +18 -0
  4. package/build/dialog/regular/index.d.ts +20 -0
  5. package/build/fields/date-picker/index.d.ts +7 -0
  6. package/build/fields/hidden/index.d.ts +6 -0
  7. package/build/fields/index.d.ts +8 -0
  8. package/build/fields/input/index.d.ts +7 -0
  9. package/build/fields/input-number/index.d.ts +7 -0
  10. package/build/fields/line/index.d.ts +15 -0
  11. package/build/fields/radio-button/index.d.ts +7 -0
  12. package/build/fields/range-picker/index.d.ts +8 -0
  13. package/build/fields/text-area/index.d.ts +7 -0
  14. package/build/flat-button/index.d.ts +9 -0
  15. package/build/form/index.d.ts +19 -0
  16. package/build/form-controls/division-row/index.d.ts +7 -0
  17. package/build/form-controls/form-button/index.d.ts +7 -0
  18. package/build/form-controls/form-error/index.d.ts +7 -0
  19. package/build/form-controls/index.d.ts +3 -0
  20. package/build/hooks/debounce.d.ts +2 -0
  21. package/build/hooks/form-rules.d.ts +13 -0
  22. package/build/hooks/index.d.ts +3 -0
  23. package/build/hooks/mount.d.ts +2 -0
  24. package/build/icon/amenity/index.d.ts +5 -0
  25. package/build/icon/amenity/names.d.ts +2 -0
  26. package/build/icon/basic/index.d.ts +6 -0
  27. package/build/icon/flag/index.d.ts +5 -0
  28. package/build/icon/flag/names.d.ts +2 -0
  29. package/build/icon/index.d.ts +4 -0
  30. package/build/icon/regular/index.d.ts +5 -0
  31. package/build/icon/regular/names.d.ts +2 -0
  32. package/build/icon/social/index.d.ts +5 -0
  33. package/build/icon/social/names.d.ts +2 -0
  34. package/build/index.d.ts +8 -0
  35. package/build/index.js +7371 -0
  36. package/build/interfaces/form.d.ts +9 -0
  37. package/build/interfaces/index.d.ts +1 -0
  38. package/build/interfaces/option.d.ts +8 -0
  39. package/build/styles.css +115 -0
  40. package/next.config.mjs +17 -0
  41. package/package.json +58 -0
  42. package/postcss.config.mjs +6 -0
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2
+
3
+ ## Getting Started
4
+
5
+ First, run the development server:
6
+
7
+ ```bash
8
+ npm run dev
9
+ # or
10
+ yarn dev
11
+ # or
12
+ pnpm dev
13
+ # or
14
+ bun dev
15
+ ```
16
+
17
+ Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18
+
19
+ You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
20
+
21
+ [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
22
+
23
+ The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
24
+
25
+ This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
26
+
27
+ ## Learn More
28
+
29
+ To learn more about Next.js, take a look at the following resources:
30
+
31
+ - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
32
+ - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
33
+
34
+ You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
35
+
36
+ ## Deploy on Vercel
37
+
38
+ The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
39
+
40
+ Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
@@ -0,0 +1,2 @@
1
+ export * from "./info";
2
+ export * from "./regular";
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ type AppDialogTitleHandler = (close?: React.ReactNode) => React.ReactNode;
3
+ export interface InfoDialogProps {
4
+ titlePrefix?: string;
5
+ title?: string | AppDialogTitleHandler;
6
+ children: React.ReactNode;
7
+ hideFooter?: boolean;
8
+ className?: string;
9
+ width?: number;
10
+ contentClassName?: string;
11
+ hideClose?: boolean;
12
+ onOk?: () => void;
13
+ onClose?: () => void;
14
+ open?: boolean;
15
+ maskClosable?: boolean;
16
+ }
17
+ export declare const InfoDialog: React.FC<InfoDialogProps>;
18
+ export {};
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ type AppDialogTitleHandler = (close?: React.ReactNode) => React.ReactNode;
3
+ export interface RegularDialogProps {
4
+ titlePrefix?: string;
5
+ title?: string | AppDialogTitleHandler;
6
+ children: React.ReactNode;
7
+ hideFooter?: boolean;
8
+ className?: string;
9
+ width?: number;
10
+ okText?: string;
11
+ cancelText?: string;
12
+ footerClassName?: string;
13
+ contentClassName?: string;
14
+ hideOk?: boolean;
15
+ onOk?: () => void;
16
+ onClose?: () => void;
17
+ open?: boolean;
18
+ }
19
+ export declare const RegularDialog: React.FC<RegularDialogProps>;
20
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { DatePickerProps } from "antd";
3
+ import { FormLineProps } from "../line";
4
+ interface Props extends FormLineProps, Omit<DatePickerProps, "name"> {
5
+ }
6
+ export declare const DatePickerField: React.FC<Props>;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ interface Props {
3
+ name: string;
4
+ }
5
+ export declare const HiddenField: React.FC<Props>;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ export * from "./date-picker";
2
+ export * from "./hidden";
3
+ export * from "./input";
4
+ export * from "./line";
5
+ export * from "./input-number";
6
+ export * from "./radio-button";
7
+ export * from "./range-picker";
8
+ export * from "./text-area";
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { InputProps } from "antd";
3
+ import { FormLineProps } from "../line";
4
+ interface Props extends FormLineProps, Omit<InputProps, "name"> {
5
+ }
6
+ export declare const InputField: React.FC<Props>;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { InputNumberProps } from "antd";
3
+ import { FormLineProps } from "../line";
4
+ interface Props extends FormLineProps, Omit<InputNumberProps, "name"> {
5
+ }
6
+ export declare const InputNumberField: React.FC<Props>;
7
+ export {};
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { FormRule } from "antd";
3
+ import { NamePath } from "antd/es/form/interface";
4
+ export declare function useLineProps<T extends FormLineProps>({ lineClassName, name, label, rules, valuePropName, noStyle, ...rest }: T): [FormLineProps, Omit<T, "lineClassName" | "name" | "label" | "rules" | "valuePropName" | "noStyle">];
5
+ export interface FormLineProps {
6
+ lineClassName?: string;
7
+ name: NamePath;
8
+ label?: string;
9
+ rules?: FormRule | FormRule[];
10
+ valuePropName?: string;
11
+ noStyle?: boolean;
12
+ }
13
+ export declare const FormLine: React.FC<FormLineProps & {
14
+ children?: React.ReactNode;
15
+ }>;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { RadioGroupProps } from "antd";
3
+ import { FormLineProps } from "../line";
4
+ interface Props extends FormLineProps, Omit<RadioGroupProps, "name"> {
5
+ }
6
+ export declare const RadioButtonField: React.FC<Props>;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { RangePickerProps } from "antd/es/date-picker";
3
+ import { FormLineProps } from "../line";
4
+ interface Props extends FormLineProps, Omit<RangePickerProps, "name"> {
5
+ oneMonth?: boolean;
6
+ }
7
+ export declare const RangePickerField: React.FC<Props>;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { TextAreaProps } from "antd/es/input";
3
+ import { FormLineProps } from "../line";
4
+ interface Props extends FormLineProps, Omit<TextAreaProps, "name"> {
5
+ }
6
+ export declare const TextAreaField: React.FC<Props>;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { RegularIconName, SocialIconName } from "../icon";
3
+ export interface Props {
4
+ className?: string;
5
+ children?: React.ReactNode;
6
+ icon?: RegularIconName | SocialIconName;
7
+ onClick: () => void;
8
+ }
9
+ export declare const FlatButton: React.FC<Props>;
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ import { FormInstance } from "antd/lib/form";
3
+ import { Store } from "antd/es/form/interface";
4
+ import { FieldData } from "../interfaces";
5
+ export interface FormOptions {
6
+ valid: boolean;
7
+ }
8
+ export interface AppFormProps {
9
+ children?: React.ReactNode | ((options: FormOptions) => React.ReactNode);
10
+ className?: string;
11
+ onFinish?: (values: any) => void;
12
+ onValuesChange?: (changedValues: any, values: any) => void;
13
+ onChange?: (values: any) => void;
14
+ onFieldsChange?: (changedFields: FieldData[], allFields: FieldData[]) => void;
15
+ form?: FormInstance;
16
+ onValid?: (valid: boolean) => void;
17
+ initialValues?: Store;
18
+ }
19
+ export declare const AppForm: React.FC<AppFormProps>;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface Props {
3
+ children?: React.ReactNode;
4
+ className?: string;
5
+ }
6
+ export declare const DivisionRow: React.FC<Props>;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface Props {
3
+ className?: string;
4
+ submitText?: string;
5
+ }
6
+ export declare const FormButton: React.FC<Props>;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface Props {
3
+ children?: string;
4
+ className?: string;
5
+ }
6
+ export declare const FormError: React.FC<Props>;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from "./division-row";
2
+ export * from "./form-button";
3
+ export * from "./form-error";
@@ -0,0 +1,2 @@
1
+ import { DependencyList } from "react";
2
+ export declare const useDebounceEffect: (delay: number, effect: () => void, deps?: DependencyList) => void;
@@ -0,0 +1,13 @@
1
+ import { Rule } from "antd/lib/form";
2
+ export type AppFormRule = (errorMessage: string) => Rule;
3
+ export type AppFormRuleLength = (errorMessage: string, length: number) => Rule;
4
+ export interface AppFormRules {
5
+ required: AppFormRule;
6
+ email: AppFormRule;
7
+ onlyNumber: AppFormRule;
8
+ onlyPositiveInteger: AppFormRule;
9
+ onlyKey: AppFormRule;
10
+ maxLength: AppFormRuleLength;
11
+ minLength: AppFormRuleLength;
12
+ }
13
+ export declare function useAppFormRules(): AppFormRules;
@@ -0,0 +1,3 @@
1
+ export * from "./debounce";
2
+ export * from "./form-rules";
3
+ export * from "./mount";
@@ -0,0 +1,2 @@
1
+ export declare function useDidMount(): boolean;
2
+ export declare function usePrevious<T>(value: T): T | undefined;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { AmenityIconName } from "./names";
3
+ import { BasicIconProps } from "../basic";
4
+ export * from "./names";
5
+ export declare const AmenityIcon: React.FC<BasicIconProps<AmenityIconName>>;
@@ -0,0 +1,2 @@
1
+ export declare const AmenityIconNameList: ("book" | "calendar" | "edit" | "group" | "key" | "language" | "location" | "tag" | "map" | "view" | "ac" | "additional-request" | "baby-bath" | "baking-sheet" | "balcony" | "bathtub" | "bbq-grill" | "beach-access" | "beach-view" | "beach" | "bed-linens" | "board-games" | "breakfast" | "calendar-verified" | "ceiling-fan" | "children-dinnerware" | "city-skyline-view" | "cleaning-products" | "clothing-storage" | "coffee-maker" | "communication" | "crib" | "dedicated-workspace" | "dining-table" | "dishes" | "dishwasher" | "door-open" | "dryer" | "electric-stove" | "elevator" | "essentials" | "ethernet-connection" | "exterior-camera" | "fire-extinguisher" | "first-aid-kit" | "flash" | "hair-dryer" | "hanger" | "heating" | "high-chair" | "hot-tub" | "hot-water" | "housekeeping" | "indoor-fireplace" | "iron" | "kettle" | "keypad" | "kitchen" | "laundromat" | "lighthouse" | "lit-path" | "lock-up" | "lockbox" | "luggage-drop-off" | "marina-view" | "microwave" | "mountain-view" | "neff-oven" | "outdoor-furniture" | "oven" | "parking" | "peaceful" | "pet" | "poll" | "portable-fan" | "pillow" | "private-entrance" | "refrigerator" | "return-keys" | "rice-maker" | "room-darkening-shades" | "rule" | "shampoo" | "smart-lock" | "smoke-alarm" | "smoking" | "soap" | "sound-system" | "stove" | "stylish" | "toaster" | "toy" | "trash" | "travel-crib" | "turn-things-off" | "tv" | "used-towels" | "washer" | "wifi" | "wine-glass" | "yard")[];
2
+ export type AmenityIconName = (typeof AmenityIconNameList)[number];
@@ -0,0 +1,6 @@
1
+ import React, { SVGAttributes } from "react";
2
+ export interface BasicIconProps<TIconName extends string> extends SVGAttributes<any> {
3
+ name: TIconName;
4
+ className?: string;
5
+ }
6
+ export declare function useBasicIcon<TIconName extends string>({ className, name, ...props }: BasicIconProps<TIconName>, icons: Record<TIconName, string>): React.ReactNode | undefined;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { BasicIconProps } from "../basic";
3
+ import { FlagIconName } from "./names";
4
+ export * from "./names";
5
+ export declare const FlagIcon: React.FC<BasicIconProps<FlagIconName>>;
@@ -0,0 +1,2 @@
1
+ export declare const FlagIconNameList: ("by" | "cy" | "fr" | "in" | "tr" | "am" | "az" | "cn" | "es" | "eu" | "ge" | "ru" | "ua" | "us")[];
2
+ export type FlagIconName = (typeof FlagIconNameList)[number];
@@ -0,0 +1,4 @@
1
+ export * from "./regular";
2
+ export * from "./amenity";
3
+ export * from "./flag";
4
+ export * from "./social";
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { RegularIconName } from "./names";
3
+ import { BasicIconProps } from "../basic";
4
+ export * from "./names";
5
+ export declare const RegularIcon: React.FC<BasicIconProps<RegularIconName>>;
@@ -0,0 +1,2 @@
1
+ export declare const RegularIconNameList: ("add" | "add-box" | "add-circle" | "add-circle-outline" | "apps" | "arrow-back" | "arrow-back-ios" | "arrow-compass-down" | "arrow-compass-up" | "arrow-drop-down" | "arrow-drop-up" | "arrow-forward" | "arrow-forward-ios" | "arrow-left" | "arrow-right" | "autorenew" | "backspace" | "book" | "bookmark" | "bookmark-outline" | "brightness" | "bug" | "brightness-outline" | "building" | "calendar" | "cards" | "check-circle" | "check-circle-outline" | "circle-notifications" | "city" | "close" | "collections-bookmark" | "contact-support" | "cross" | "cube-letter" | "cube-outline" | "date-range" | "door" | "delete-forever" | "delete-outline" | "delete" | "done" | "edit" | "email-outline" | "email-symbol" | "email" | "enter" | "equalizer" | "error-outline" | "error" | "expand-less" | "expand-more" | "extension" | "external-link" | "facebook" | "favorite" | "favorite-outline" | "file-upload" | "flag" | "flag-outline" | "flip" | "folder" | "gender" | "globe" | "grid-on" | "grid-view" | "group" | "group-add" | "help" | "help-live" | "help-outline" | "highlight-remove" | "hourglass-empty" | "image" | "info-outline" | "info" | "key" | "keyboard" | "keyboard-arrow-down" | "keyboard-arrow-left" | "keyboard-arrow-right" | "keyboard-arrow-up" | "keyboard-voice" | "known" | "known-outline" | "language" | "letter-match" | "library-books" | "lightbulb" | "lightbulb-outline" | "list" | "location" | "lock" | "lock-open-outline" | "lock-outline" | "logout" | "loop" | "mail" | "mail-outline" | "match-up" | "menu" | "menu-book" | "more-horizontal" | "more-vertical" | "multiple-choice" | "person" | "phone" | "person-add" | "person-outline" | "pie-chart" | "pie-chart-outlined" | "play-arrow" | "play-circle-filled" | "play-circle-outline" | "playlist-add" | "playlist-add-check" | "power-off" | "price-tag" | "rate-down" | "rate-down-outline" | "rate-up" | "rate-up-outline" | "refresh" | "remove" | "remove-circle" | "remove-circle-outline" | "replay-circle-filled" | "search" | "sentiment-dissatisfied" | "sentiment-satisfied" | "settings" | "share" | "snowflake" | "sort-asc" | "sort-desc" | "sort" | "space" | "spelling" | "star-half" | "star-outline" | "star" | "street" | "subdirectory-arrow-left" | "sun" | "table" | "tablet" | "tags" | "thumb-down" | "thumb-down-outline" | "thumb-up" | "thumb-up-outline" | "time" | "translate" | "tree" | "usd" | "visibility" | "volume-off" | "volume-up" | "wallet" | "magic-wand" | "microphone-off" | "microphone" | "moon" | "music" | "people" | "learn" | "audio" | "tag" | "unknown" | "unknown-outline" | "discover")[];
2
+ export type RegularIconName = (typeof RegularIconNameList)[number];
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { BasicIconProps } from "../basic";
3
+ import { SocialIconName } from "./names";
4
+ export * from "./names";
5
+ export declare const SocialIcon: React.FC<BasicIconProps<SocialIconName>>;
@@ -0,0 +1,2 @@
1
+ export declare const SocialIconNameList: ("facebook" | "google" | "instagram" | "telegram" | "viber" | "whatsapp" | "youtube")[];
2
+ export type SocialIconName = (typeof SocialIconNameList)[number];
@@ -0,0 +1,8 @@
1
+ export * from "./icon";
2
+ export * from "./interfaces";
3
+ export * from "./form";
4
+ export * from "./fields";
5
+ export * from "./hooks";
6
+ export * from "./form-controls";
7
+ export * from "./dialog";
8
+ export * from "./flat-button";