forma-ui 0.0.21 → 0.0.23
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/Interfaces/dictionary.d.ts +0 -0
- package/dist/Interfaces/dictionary.js +0 -0
- package/dist/Interfaces/global.d.ts +0 -0
- package/dist/Interfaces/global.js +0 -0
- package/dist/Interfaces/meta.d.ts +0 -0
- package/dist/Interfaces/meta.js +0 -0
- package/dist/app/[lang]/stores/LangStore.d.ts +0 -0
- package/dist/app/[lang]/stores/LangStore.js +0 -0
- package/dist/components/icon/icon.d.ts +0 -0
- package/dist/components/icon/icon.js +0 -0
- package/dist/components/ui/Accordion.d.ts +0 -0
- package/dist/components/ui/Accordion.js +0 -0
- package/dist/components/ui/Button.d.ts +0 -0
- package/dist/components/ui/Button.js +0 -0
- package/dist/components/ui/CheckBox.d.ts +0 -0
- package/dist/components/ui/CheckBox.js +0 -0
- package/dist/components/ui/Drawer.d.ts +0 -0
- package/dist/components/ui/Drawer.js +0 -0
- package/dist/components/ui/Input.d.ts +0 -0
- package/dist/components/ui/Input.js +4 -6
- package/dist/components/ui/Input.types.d.ts +0 -0
- package/dist/components/ui/Input.types.js +0 -0
- package/dist/components/ui/Modal.d.ts +0 -0
- package/dist/components/ui/Modal.js +0 -0
- package/dist/components/ui/Overlay.d.ts +0 -0
- package/dist/components/ui/Overlay.js +0 -0
- package/dist/components/ui/RadioButton.d.ts +0 -0
- package/dist/components/ui/RadioButton.js +0 -0
- package/dist/components/ui/Table.d.ts +0 -0
- package/dist/components/ui/Table.js +0 -0
- package/dist/components/ui/Tabs.d.ts +0 -0
- package/dist/components/ui/Tabs.js +0 -0
- package/dist/configs/language.d.ts +0 -0
- package/dist/configs/language.js +0 -0
- package/dist/configs/metadata.d.ts +0 -0
- package/dist/configs/metadata.js +0 -0
- package/dist/dictionaries/en.json +0 -0
- package/dist/dictionaries/fa.json +0 -0
- package/dist/dictionaries/index.d.ts +0 -0
- package/dist/dictionaries/index.js +0 -0
- package/dist/hooks/useDevice.d.ts +0 -0
- package/dist/hooks/useDevice.js +0 -0
- package/dist/hooks/useTranslation.d.ts +0 -0
- package/dist/hooks/useTranslation.js +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/libs/api/axiosClient.d.ts +0 -0
- package/dist/libs/api/axiosClient.js +0 -0
- package/dist/libs/api/cns.d.ts +0 -0
- package/dist/libs/api/cns.js +0 -0
- package/dist/libs/api/usePostFetch.d.ts +0 -0
- package/dist/libs/api/usePostFetch.js +0 -0
- package/dist/libs/cn.d.ts +0 -0
- package/dist/libs/cn.js +0 -0
- package/dist/libs/cookieUtils.d.ts +0 -0
- package/dist/libs/cookieUtils.js +0 -0
- package/dist/libs/detectComponentResponsive.d.ts +0 -0
- package/dist/libs/detectComponentResponsive.js +0 -0
- package/dist/libs/detectDeviceFromUA.d.ts +0 -0
- package/dist/libs/detectDeviceFromUA.js +0 -0
- package/dist/libs/drawer/modal.d.ts +0 -0
- package/dist/libs/drawer/modal.js +0 -0
- package/dist/libs/fonts.d.ts +0 -0
- package/dist/libs/fonts.js +0 -0
- package/dist/libs/metadataHelper.d.ts +0 -0
- package/dist/libs/metadataHelper.js +0 -0
- package/dist/libs/modal/modal.d.ts +0 -0
- package/dist/libs/modal/modal.js +0 -0
- package/dist/libs/translation.d.ts +0 -0
- package/dist/libs/translation.js +0 -0
- package/dist/libs/utils.d.ts +0 -0
- package/dist/libs/utils.js +0 -0
- package/dist/locale/de.d.ts +0 -0
- package/dist/locale/de.js +0 -0
- package/dist/locale/en.d.ts +0 -0
- package/dist/locale/en.js +0 -0
- package/dist/locale/fa.d.ts +0 -0
- package/dist/locale/fa.js +0 -0
- package/dist/locale/global/de.json +0 -0
- package/dist/locale/global/en.json +0 -0
- package/dist/locale/global/fa.json +0 -0
- package/dist/locale/home/de.json +0 -0
- package/dist/locale/home/en.json +0 -0
- package/dist/locale/home/fa.json +0 -0
- package/dist/locale/index.d.ts +0 -0
- package/dist/locale/index.js +0 -0
- package/dist/locale/meta/de.json +0 -0
- package/dist/locale/meta/en.json +0 -0
- package/dist/locale/meta/fa.json +0 -0
- package/dist/locale/meta/home/de.json +0 -0
- package/dist/locale/meta/home/en.json +0 -0
- package/dist/locale/meta/home/fa.json +0 -0
- package/dist/locale/meta/tools/de.json +0 -0
- package/dist/locale/meta/tools/en.json +0 -0
- package/dist/locale/meta/tools/fa.json +0 -0
- package/dist/middleware.d.ts +0 -0
- package/dist/middleware.js +0 -0
- package/dist/store/appStore.d.ts +0 -0
- package/dist/store/appStore.js +0 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/nextImageLoader.d.ts +0 -0
- package/dist/utils/nextImageLoader.js +0 -0
- package/package.json +1 -1
- package/dist/locale/about/en.json +0 -3
- package/dist/locale/about/fa.json +0 -3
- package/dist/locale/coin/en.json +0 -4
- package/dist/locale/coin/fa.json +0 -4
- package/dist/locale/meta/about/en.json +0 -10
- package/dist/locale/meta/about/fa.json +0 -5
- package/dist/utils/forma-ui/inputTranslate.d.ts +0 -9
- package/dist/utils/forma-ui/inputTranslate.js +0 -17
- package/dist/utils/forma-ui/translate.d.ts +0 -8
- package/dist/utils/forma-ui/translate.js +0 -16
- package/dist/utils/translate.d.ts +0 -8
- package/dist/utils/translate.js +0 -16
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/Interfaces/meta.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -13,8 +13,6 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
13
13
|
import { useState, useRef, useEffect, forwardRef } from "react";
|
|
14
14
|
import { CloseSquareIcon, EmailIcon, MobielIcon, SunIcon, HideIcon, LockIcon, SearchIcon, ShowIcon, MoonIcon, } from "../icon/icon";
|
|
15
15
|
import { cn } from "../../libs/cn";
|
|
16
|
-
// Simple translation function replacement (no external library)
|
|
17
|
-
import { inputTranslate } from "../../utils/translate";
|
|
18
16
|
// InputText Component
|
|
19
17
|
export function InputText(_a) {
|
|
20
18
|
var { label, className, id, disabled, value, onChange, onClear } = _a, props = __rest(_a, ["label", "className", "id", "disabled", "value", "onChange", "onClear"]);
|
|
@@ -42,7 +40,7 @@ export const InputEmail = forwardRef((_a, ref) => {
|
|
|
42
40
|
onClear === null || onClear === void 0 ? void 0 : onClear();
|
|
43
41
|
};
|
|
44
42
|
const emailPattern = "[\\-a-zA-Z0-9~!$%^&*_=+\\}\\{'?]+(\\.[-a-zA-Z0-9~!$%^&*_=+\\}\\{'?]+)*@[a-zA-Z0-9_][-a-zA-Z0-9_]*(\\.[-a-zA-Z0-9_]+)*\\.[a-zA-Z]{2,}(:[0-9]{1,5})?";
|
|
45
|
-
return (_jsxs(_Fragment, { children: [label && (_jsx("label", { htmlFor: id, className: "text-Neutral-300 text-[10px] font-medium px-3 mb-1", children: label })), _jsxs("div", { className: "relative", children: [_jsx("input", Object.assign({ ref: ref, id: id, type: "email", pattern: variant === "auth" ? emailPattern : undefined, placeholder: placeholder, disabled: disabled, value: value, onChange: onChange, onBlur: () => setShowError(false), onFocus: () => setShowError(false), className: cn("autofill-input peer placeholder-Neutral-200 w-full px-[2.7rem] py-3 rounded-2xl bg-secondary-50 dark:bg-background-light border border-secondary-100 focus:outline-none focus:ring-0 focus:border-secondary-400 justify-between items-center text-Neutral-500 dark:text-white relative", className) }, props)), !disabled && (_jsx("button", { type: "button", onClick: handleClear, className: "absolute inset-y-0 rtl:left-0 ltr:right-0 flex items-center p-2", children: _jsx(CloseSquareIcon, {}) })), _jsx("div", { className: "absolute inset-y-0 rtl:right-0 ltr:left-0 rtl:pr-3 ltr:pl-3 flex items-center pointer-events-none", children: _jsx(EmailIcon, {}) }), error && !showError && (_jsx("div", { className: "peer-focus:hidden absolute inset-x-0 mt-2 mx-3", children: _jsx("div", { className: "text-Error-400 text-xs font-medium", children:
|
|
43
|
+
return (_jsxs(_Fragment, { children: [label && (_jsx("label", { htmlFor: id, className: "text-Neutral-300 text-[10px] font-medium px-3 mb-1", children: label })), _jsxs("div", { className: "relative", children: [_jsx("input", Object.assign({ ref: ref, id: id, type: "email", pattern: variant === "auth" ? emailPattern : undefined, placeholder: placeholder, disabled: disabled, value: value, onChange: onChange, onBlur: () => setShowError(false), onFocus: () => setShowError(false), className: cn("autofill-input peer placeholder-Neutral-200 w-full px-[2.7rem] py-3 rounded-2xl bg-secondary-50 dark:bg-background-light border border-secondary-100 focus:outline-none focus:ring-0 focus:border-secondary-400 justify-between items-center text-Neutral-500 dark:text-white relative", className) }, props)), !disabled && (_jsx("button", { type: "button", onClick: handleClear, className: "absolute inset-y-0 rtl:left-0 ltr:right-0 flex items-center p-2", children: _jsx(CloseSquareIcon, {}) })), _jsx("div", { className: "absolute inset-y-0 rtl:right-0 ltr:left-0 rtl:pr-3 ltr:pl-3 flex items-center pointer-events-none", children: _jsx(EmailIcon, {}) }), error && !showError && (_jsx("div", { className: "peer-focus:hidden absolute inset-x-0 mt-2 mx-3", children: _jsx("div", { className: "text-Error-400 text-xs font-medium", children: error }) }))] })] }));
|
|
46
44
|
});
|
|
47
45
|
InputEmail.displayName = "InputEmail";
|
|
48
46
|
// InputMobile Component
|
|
@@ -57,7 +55,7 @@ export const InputMobile = forwardRef((_a, ref) => {
|
|
|
57
55
|
}
|
|
58
56
|
onClear === null || onClear === void 0 ? void 0 : onClear();
|
|
59
57
|
};
|
|
60
|
-
return (_jsxs(_Fragment, { children: [label && (_jsx("label", { htmlFor: id, className: "text-base font-medium text-Neutral-300 px-3 mb-1", children: label })), _jsxs("div", { className: "relative", children: [_jsx("input", Object.assign({ ref: ref, id: id, type: "tel", inputMode: "numeric", pattern: "^09[0-9]{9}$", maxLength: 11, placeholder: placeholder, disabled: disabled, value: value, onChange: onChange, onBlur: () => setShowError(false), onFocus: () => setShowError(false), className: cn("autofill-input peer placeholder-Neutral-200 w-full px-[2.7rem] py-3 rounded-2xl bg-secondary-50 dark:bg-background-light border border-secondary-100 focus:outline-none focus:ring-0 focus:border-secondary-400 justify-between items-center text-Neutral-500 dark:text-white relative", className) }, props)), !disabled && (_jsx("button", { type: "button", onClick: handleClear, className: "absolute inset-y-0 rtl:left-0 ltr:right-0 flex items-center p-2", children: _jsx(CloseSquareIcon, {}) })), _jsx("div", { className: "absolute inset-y-0 rtl:right-0 ltr:left-0 rtl:pr-3 ltr:pl-3 flex items-center pointer-events-none", children: _jsx(MobielIcon, {}) }), error && !showError && (_jsx("div", { className: "peer-focus:hidden absolute inset-x-0 mt-2 mx-3", children: _jsx("div", { className: "text-Error-400 text-xs font-medium", children:
|
|
58
|
+
return (_jsxs(_Fragment, { children: [label && (_jsx("label", { htmlFor: id, className: "text-base font-medium text-Neutral-300 px-3 mb-1", children: label })), _jsxs("div", { className: "relative", children: [_jsx("input", Object.assign({ ref: ref, id: id, type: "tel", inputMode: "numeric", pattern: "^09[0-9]{9}$", maxLength: 11, placeholder: placeholder, disabled: disabled, value: value, onChange: onChange, onBlur: () => setShowError(false), onFocus: () => setShowError(false), className: cn("autofill-input peer placeholder-Neutral-200 w-full px-[2.7rem] py-3 rounded-2xl bg-secondary-50 dark:bg-background-light border border-secondary-100 focus:outline-none focus:ring-0 focus:border-secondary-400 justify-between items-center text-Neutral-500 dark:text-white relative", className) }, props)), !disabled && (_jsx("button", { type: "button", onClick: handleClear, className: "absolute inset-y-0 rtl:left-0 ltr:right-0 flex items-center p-2", children: _jsx(CloseSquareIcon, {}) })), _jsx("div", { className: "absolute inset-y-0 rtl:right-0 ltr:left-0 rtl:pr-3 ltr:pl-3 flex items-center pointer-events-none", children: _jsx(MobielIcon, {}) }), error && !showError && (_jsx("div", { className: "peer-focus:hidden absolute inset-x-0 mt-2 mx-3", children: _jsx("div", { className: "text-Error-400 text-xs font-medium", children: error }) })), _jsx("div", { className: "hidden peer-invalid:flex absolute mt-2 mx-3", children: _jsx("div", { className: "text-Error-400 text-xs font-medium", children: error }) })] })] }));
|
|
61
59
|
});
|
|
62
60
|
InputMobile.displayName = "InputMobile";
|
|
63
61
|
// InputTextArea Component
|
|
@@ -86,7 +84,7 @@ export const InputPassword = forwardRef((_a, ref) => {
|
|
|
86
84
|
onClear === null || onClear === void 0 ? void 0 : onClear();
|
|
87
85
|
};
|
|
88
86
|
return (_jsxs(_Fragment, { children: [label && (_jsx("label", { htmlFor: id, className: "text-base font-medium text-Neutral-300 px-3", children: label })), _jsxs("div", { className: "w-full relative mt-1", children: [_jsx("input", Object.assign({ ref: ref, id: id, type: showPassword ? "text" : "password", minLength: 5, placeholder: "xxxx xxxx xxxx xxxx", value: value, onChange: onChange, className: cn("autofill-input peer placeholder-Neutral-200 w-full px-[2.7rem] py-3 rounded-2xl bg-secondary-50 dark:bg-background-light border border-secondary-100 focus:outline-none focus:ring-0 focus:border-secondary-400 justify-between items-center text-Neutral-500 dark:text-white relative", variant === "change_password" &&
|
|
89
|
-
"invalid:focus:border-Error-400 invalid:border-Error-400", className) }, props)), _jsx("div", { className: "absolute inset-y-0 rtl:right-0 ltr:left-0 rtl:pr-3 ltr:pl-3 flex items-center pointer-events-none", children: _jsx(LockIcon, {}) }), _jsx("div", { className: "absolute inset-y-0 rtl:left-0 ltr:right-0 px-3 flex items-center", children: variant === "password" ? (_jsx("button", { type: "button", onClick: handleClear, children: _jsx(CloseSquareIcon, {}) })) : (_jsx("button", { type: "button", onClick: handleTogglePassword, children: showPassword ? _jsx(HideIcon, {}) : _jsx(ShowIcon, {}) })) }), error && (_jsx("div", { className: "peer-focus:hidden absolute mt-2 mx-3", children: _jsx("div", { className: "text-Error-400 text-xs font-medium", children:
|
|
87
|
+
"invalid:focus:border-Error-400 invalid:border-Error-400", className) }, props)), _jsx("div", { className: "absolute inset-y-0 rtl:right-0 ltr:left-0 rtl:pr-3 ltr:pl-3 flex items-center pointer-events-none", children: _jsx(LockIcon, {}) }), _jsx("div", { className: "absolute inset-y-0 rtl:left-0 ltr:right-0 px-3 flex items-center", children: variant === "password" ? (_jsx("button", { type: "button", onClick: handleClear, children: _jsx(CloseSquareIcon, {}) })) : (_jsx("button", { type: "button", onClick: handleTogglePassword, children: showPassword ? _jsx(HideIcon, {}) : _jsx(ShowIcon, {}) })) }), error && (_jsx("div", { className: "peer-focus:hidden absolute mt-2 mx-3", children: _jsx("div", { className: "text-Error-400 text-xs font-medium", children: error }) }))] })] }));
|
|
90
88
|
});
|
|
91
89
|
InputPassword.displayName = "InputPassword";
|
|
92
90
|
// InputRePassword Component
|
|
@@ -107,7 +105,7 @@ export const InputRePassword = forwardRef((_a, ref) => {
|
|
|
107
105
|
setError("");
|
|
108
106
|
}
|
|
109
107
|
};
|
|
110
|
-
return (_jsxs(_Fragment, { children: [label && (_jsx("label", { htmlFor: id, className: "text-base font-medium text-Neutral-300 px-3", children: label })), _jsxs("div", { className: "w-full relative mt-1", children: [_jsx("input", Object.assign({ ref: ref, id: id, type: showPassword ? "text" : "password", placeholder: "xxxx xxxx xxxx xxxx", value: value, onChange: handleChange, className: cn("autofill-input placeholder-Neutral-200 w-full px-[2.7rem] py-3 rounded-2xl bg-secondary-50 dark:bg-background-light border border-secondary-100 focus:outline-none focus:ring-0 focus:border-secondary-400 justify-between items-center text-Neutral-500 dark:text-white relative", error && "!border-Error-400 !focus:border-Error-400") }, props)), _jsx("button", { type: "button", onClick: handleTogglePassword, className: "absolute inset-y-0 rtl:left-0 ltr:right-0 px-3 flex items-center cursor-pointer", children: showPassword ? _jsx(HideIcon, {}) : _jsx(ShowIcon, {}) }), _jsx("div", { className: "absolute inset-y-0 rtl:right-0 ltr:left-0 rtl:pr-3 ltr:pl-3 flex items-center pointer-events-none", children: _jsx(LockIcon, {}) }), error && (_jsx("div", { className: "absolute mt-2 mx-3", children: _jsx("div", { className: "text-Error-400 text-xs font-medium", children:
|
|
108
|
+
return (_jsxs(_Fragment, { children: [label && (_jsx("label", { htmlFor: id, className: "text-base font-medium text-Neutral-300 px-3", children: label })), _jsxs("div", { className: "w-full relative mt-1", children: [_jsx("input", Object.assign({ ref: ref, id: id, type: showPassword ? "text" : "password", placeholder: "xxxx xxxx xxxx xxxx", value: value, onChange: handleChange, className: cn("autofill-input placeholder-Neutral-200 w-full px-[2.7rem] py-3 rounded-2xl bg-secondary-50 dark:bg-background-light border border-secondary-100 focus:outline-none focus:ring-0 focus:border-secondary-400 justify-between items-center text-Neutral-500 dark:text-white relative", error && "!border-Error-400 !focus:border-Error-400") }, props)), _jsx("button", { type: "button", onClick: handleTogglePassword, className: "absolute inset-y-0 rtl:left-0 ltr:right-0 px-3 flex items-center cursor-pointer", children: showPassword ? _jsx(HideIcon, {}) : _jsx(ShowIcon, {}) }), _jsx("div", { className: "absolute inset-y-0 rtl:right-0 ltr:left-0 rtl:pr-3 ltr:pl-3 flex items-center pointer-events-none", children: _jsx(LockIcon, {}) }), error && (_jsx("div", { className: "absolute mt-2 mx-3", children: _jsx("div", { className: "text-Error-400 text-xs font-medium", children: error }) }))] })] }));
|
|
111
109
|
});
|
|
112
110
|
InputRePassword.displayName = "InputRePassword";
|
|
113
111
|
// InputDarkLight Component
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/configs/language.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/configs/metadata.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/hooks/useDevice.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/libs/api/cns.d.ts
CHANGED
|
File without changes
|
package/dist/libs/api/cns.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/libs/cn.d.ts
CHANGED
|
File without changes
|
package/dist/libs/cn.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/libs/cookieUtils.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/libs/fonts.d.ts
CHANGED
|
File without changes
|
package/dist/libs/fonts.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/libs/modal/modal.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/libs/translation.js
CHANGED
|
File without changes
|
package/dist/libs/utils.d.ts
CHANGED
|
File without changes
|
package/dist/libs/utils.js
CHANGED
|
File without changes
|
package/dist/locale/de.d.ts
CHANGED
|
File without changes
|
package/dist/locale/de.js
CHANGED
|
File without changes
|
package/dist/locale/en.d.ts
CHANGED
|
File without changes
|
package/dist/locale/en.js
CHANGED
|
File without changes
|
package/dist/locale/fa.d.ts
CHANGED
|
File without changes
|
package/dist/locale/fa.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/locale/home/de.json
CHANGED
|
File without changes
|
package/dist/locale/home/en.json
CHANGED
|
File without changes
|
package/dist/locale/home/fa.json
CHANGED
|
File without changes
|
package/dist/locale/index.d.ts
CHANGED
|
File without changes
|
package/dist/locale/index.js
CHANGED
|
File without changes
|
package/dist/locale/meta/de.json
CHANGED
|
File without changes
|
package/dist/locale/meta/en.json
CHANGED
|
File without changes
|
package/dist/locale/meta/fa.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/middleware.d.ts
CHANGED
|
File without changes
|
package/dist/middleware.js
CHANGED
|
File without changes
|
package/dist/store/appStore.d.ts
CHANGED
|
File without changes
|
package/dist/store/appStore.js
CHANGED
|
File without changes
|