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.
- package/README.md +40 -0
- package/build/dialog/index.d.ts +2 -0
- package/build/dialog/info/index.d.ts +18 -0
- package/build/dialog/regular/index.d.ts +20 -0
- package/build/fields/date-picker/index.d.ts +7 -0
- package/build/fields/hidden/index.d.ts +6 -0
- package/build/fields/index.d.ts +8 -0
- package/build/fields/input/index.d.ts +7 -0
- package/build/fields/input-number/index.d.ts +7 -0
- package/build/fields/line/index.d.ts +15 -0
- package/build/fields/radio-button/index.d.ts +7 -0
- package/build/fields/range-picker/index.d.ts +8 -0
- package/build/fields/text-area/index.d.ts +7 -0
- package/build/flat-button/index.d.ts +9 -0
- package/build/form/index.d.ts +19 -0
- package/build/form-controls/division-row/index.d.ts +7 -0
- package/build/form-controls/form-button/index.d.ts +7 -0
- package/build/form-controls/form-error/index.d.ts +7 -0
- package/build/form-controls/index.d.ts +3 -0
- package/build/hooks/debounce.d.ts +2 -0
- package/build/hooks/form-rules.d.ts +13 -0
- package/build/hooks/index.d.ts +3 -0
- package/build/hooks/mount.d.ts +2 -0
- package/build/icon/amenity/index.d.ts +5 -0
- package/build/icon/amenity/names.d.ts +2 -0
- package/build/icon/basic/index.d.ts +6 -0
- package/build/icon/flag/index.d.ts +5 -0
- package/build/icon/flag/names.d.ts +2 -0
- package/build/icon/index.d.ts +4 -0
- package/build/icon/regular/index.d.ts +5 -0
- package/build/icon/regular/names.d.ts +2 -0
- package/build/icon/social/index.d.ts +5 -0
- package/build/icon/social/names.d.ts +2 -0
- package/build/index.d.ts +8 -0
- package/build/index.js +7371 -0
- package/build/interfaces/form.d.ts +9 -0
- package/build/interfaces/index.d.ts +1 -0
- package/build/interfaces/option.d.ts +8 -0
- package/build/styles.css +115 -0
- package/next.config.mjs +17 -0
- package/package.json +58 -0
- 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,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,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,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,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,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,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,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];
|