abrplus-ui-kit 0.2.9
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 +159 -0
- package/dist/antOverrides.cjs.js +127 -0
- package/dist/antOverrides.es.js +127 -0
- package/dist/atoms.cjs.js +391 -0
- package/dist/atoms.es.js +392 -0
- package/dist/colors-CztsZ6e_.js +2213 -0
- package/dist/colors-TPZkyKI4.cjs +2212 -0
- package/dist/deepMerge-CG1he8ZD.js +20 -0
- package/dist/deepMerge-Cn27K7-s.cjs +19 -0
- package/dist/index-2Q5IExhU.cjs +89 -0
- package/dist/index-BOfdgXvN.cjs +265 -0
- package/dist/index-BnnlMHRY.cjs +27 -0
- package/dist/index-BzahloOb.js +28 -0
- package/dist/index-C24zbKLS.js +350 -0
- package/dist/index-CCvWoynu.cjs +12 -0
- package/dist/index-CQKRmQkW.js +543 -0
- package/dist/index-CW9vyiq6.cjs +349 -0
- package/dist/index-D8BknfUe.js +266 -0
- package/dist/index-DCP3xelB.cjs +1629 -0
- package/dist/index-DCojd1ld.js +90 -0
- package/dist/index-DLUd_0LP.js +13 -0
- package/dist/index-WgcaHHjH.js +1630 -0
- package/dist/index-keKfh9ZW.cjs +542 -0
- package/dist/index.cjs.js +109 -0
- package/dist/index.css +1519 -0
- package/dist/index.es.js +109 -0
- package/dist/index2.css +3 -0
- package/dist/molecules.cjs.js +7823 -0
- package/dist/molecules.es.js +7825 -0
- package/dist/organisms.cjs.js +940 -0
- package/dist/organisms.es.js +940 -0
- package/dist/provider.cjs.js +48 -0
- package/dist/provider.es.js +48 -0
- package/dist/sortable.esm-CwrpjqII.cjs +3872 -0
- package/dist/sortable.esm-DfJu5xWT.js +3873 -0
- package/dist/theme.css +102 -0
- package/dist/types/antOverrides.d.ts +2 -0
- package/dist/types/assets/fonts/icomoon/selection.json.d.ts +3 -0
- package/dist/types/atoms.d.ts +2 -0
- package/dist/types/components/antOverrides/alert/index.d.ts +2 -0
- package/dist/types/components/antOverrides/avatar/index.d.ts +15 -0
- package/dist/types/components/antOverrides/breadcrumb/index.d.ts +4 -0
- package/dist/types/components/antOverrides/dropdown/index.d.ts +4 -0
- package/dist/types/components/antOverrides/flex/index.d.ts +4 -0
- package/dist/types/components/antOverrides/image/index.d.ts +7 -0
- package/dist/types/components/antOverrides/index.d.ts +18 -0
- package/dist/types/components/antOverrides/infiniteLoader/index.d.ts +12 -0
- package/dist/types/components/antOverrides/loading/index.d.ts +14 -0
- package/dist/types/components/antOverrides/menu/index.d.ts +8 -0
- package/dist/types/components/antOverrides/pagination/index.d.ts +3 -0
- package/dist/types/components/antOverrides/progress/index.d.ts +3 -0
- package/dist/types/components/antOverrides/segmented/index.d.ts +4 -0
- package/dist/types/components/antOverrides/skeleton/index.d.ts +10 -0
- package/dist/types/components/antOverrides/slider/index.d.ts +5 -0
- package/dist/types/components/antOverrides/steps/index.d.ts +11 -0
- package/dist/types/components/antOverrides/switch/index.d.ts +3 -0
- package/dist/types/components/antOverrides/text/index.d.ts +31 -0
- package/dist/types/components/antOverrides/timeline/index.d.ts +4 -0
- package/dist/types/components/antOverrides/tooltip/index.d.ts +8 -0
- package/dist/types/components/antOverrides/upload/index.d.ts +7 -0
- package/dist/types/components/atoms/badge/index.d.ts +3 -0
- package/dist/types/components/atoms/behavioralAtoms/index.d.ts +2 -0
- package/dist/types/components/atoms/behavioralAtoms/portalContainer/index.d.ts +7 -0
- package/dist/types/components/atoms/behavioralAtoms/render/index.d.ts +14 -0
- package/dist/types/components/atoms/borderedTitle/index.d.ts +9 -0
- package/dist/types/components/atoms/box/index.d.ts +7 -0
- package/dist/types/components/atoms/breadcrumbs/index.d.ts +5 -0
- package/dist/types/components/atoms/card/index.d.ts +5 -0
- package/dist/types/components/atoms/checkbox/index.d.ts +7 -0
- package/dist/types/components/atoms/clickAwayListener/index.d.ts +11 -0
- package/dist/types/components/atoms/collapse/index.d.ts +6 -0
- package/dist/types/components/atoms/datePicker/index.d.ts +16 -0
- package/dist/types/components/atoms/empty/index.d.ts +5 -0
- package/dist/types/components/atoms/fallback/index.d.ts +4 -0
- package/dist/types/components/atoms/horizontalLine/index.d.ts +9 -0
- package/dist/types/components/atoms/icon/constants/iconNames.d.ts +1 -0
- package/dist/types/components/atoms/icon/constants/iconsContent.d.ts +808 -0
- package/dist/types/components/atoms/icon/iconPack/index.d.ts +2 -0
- package/dist/types/components/atoms/icon/index.d.ts +26 -0
- package/dist/types/components/atoms/index.d.ts +24 -0
- package/dist/types/components/atoms/navigationTabs/index.d.ts +35 -0
- package/dist/types/components/atoms/popover/index.d.ts +14 -0
- package/dist/types/components/atoms/popover/link.d.ts +6 -0
- package/dist/types/components/atoms/radio/index.d.ts +7 -0
- package/dist/types/components/atoms/rangePicker/index.d.ts +14 -0
- package/dist/types/components/atoms/separator/index.d.ts +5 -0
- package/dist/types/components/atoms/tab/index.d.ts +9 -0
- package/dist/types/components/atoms/tooltip/index.d.ts +7 -0
- package/dist/types/components/atoms/tooltip/titleTooltip.d.ts +5 -0
- package/dist/types/components/atoms/upload/index.d.ts +11 -0
- package/dist/types/components/atoms/verticalLine/index.d.ts +7 -0
- package/dist/types/components/atoms/view/helper.d.ts +20 -0
- package/dist/types/components/atoms/view/index.d.ts +26 -0
- package/dist/types/components/index.d.ts +4 -0
- package/dist/types/components/molecules/accordion/index.d.ts +20 -0
- package/dist/types/components/molecules/actionHeader/index.d.ts +11 -0
- package/dist/types/components/molecules/audioVisualizer/index.d.ts +15 -0
- package/dist/types/components/molecules/avatarUpload/index.d.ts +15 -0
- package/dist/types/components/molecules/button/action/index.d.ts +5 -0
- package/dist/types/components/molecules/button/icon/index.d.ts +11 -0
- package/dist/types/components/molecules/button/index.d.ts +18 -0
- package/dist/types/components/molecules/button/negative/index.d.ts +5 -0
- package/dist/types/components/molecules/button/primary/index.d.ts +3 -0
- package/dist/types/components/molecules/button/secondary/index.d.ts +3 -0
- package/dist/types/components/molecules/button/secondaryQuiet/index.d.ts +3 -0
- package/dist/types/components/molecules/button/shared.d.ts +23 -0
- package/dist/types/components/molecules/button/tertiary/index.d.ts +3 -0
- package/dist/types/components/molecules/button/text/index.d.ts +10 -0
- package/dist/types/components/molecules/catch/index.d.ts +9 -0
- package/dist/types/components/molecules/chevronIcon/index.d.ts +6 -0
- package/dist/types/components/molecules/copyButton/index.d.ts +8 -0
- package/dist/types/components/molecules/index.d.ts +24 -0
- package/dist/types/components/molecules/input/TextArea/index.d.ts +25 -0
- package/dist/types/components/molecules/input/default/index.d.ts +23 -0
- package/dist/types/components/molecules/input/emojiPicker/index.d.ts +21 -0
- package/dist/types/components/molecules/input/ghost/index.d.ts +25 -0
- package/dist/types/components/molecules/input/index.d.ts +19 -0
- package/dist/types/components/molecules/input/number/index.d.ts +28 -0
- package/dist/types/components/molecules/input/search/index.d.ts +7 -0
- package/dist/types/components/molecules/input/tag/index.d.ts +13 -0
- package/dist/types/components/molecules/inputDatePicker/index.d.ts +17 -0
- package/dist/types/components/molecules/inputErrorMessage/index.d.ts +9 -0
- package/dist/types/components/molecules/inputRangePicker/index.d.ts +16 -0
- package/dist/types/components/molecules/logo/index.d.ts +25 -0
- package/dist/types/components/molecules/noResult/index.d.ts +8 -0
- package/dist/types/components/molecules/notification/index.d.ts +13 -0
- package/dist/types/components/molecules/select/components/clearIcon.d.ts +2 -0
- package/dist/types/components/molecules/select/components/index.d.ts +5 -0
- package/dist/types/components/molecules/select/components/label.d.ts +6 -0
- package/dist/types/components/molecules/select/components/notFound.d.ts +5 -0
- package/dist/types/components/molecules/select/components/placeholder.d.ts +7 -0
- package/dist/types/components/molecules/select/components/suffix.d.ts +10 -0
- package/dist/types/components/molecules/select/index.d.ts +13 -0
- package/dist/types/components/molecules/select/multiple/index.d.ts +5 -0
- package/dist/types/components/molecules/select/single/index.d.ts +5 -0
- package/dist/types/components/molecules/select/style.d.ts +8 -0
- package/dist/types/components/molecules/select/treeSelect/index.d.ts +2 -0
- package/dist/types/components/molecules/select/types.d.ts +108 -0
- package/dist/types/components/molecules/sortableList/index.d.ts +19 -0
- package/dist/types/components/molecules/spliter/index.d.ts +8 -0
- package/dist/types/components/molecules/tag/index.d.ts +17 -0
- package/dist/types/components/molecules/tagCollectionView/index.d.ts +14 -0
- package/dist/types/components/molecules/tagInput/components/notFoundAddItem.d.ts +4 -0
- package/dist/types/components/molecules/tagInput/index.d.ts +6 -0
- package/dist/types/components/molecules/tagInput/style.d.ts +9 -0
- package/dist/types/components/molecules/tagInput/types.d.ts +66 -0
- package/dist/types/components/molecules/timePicker/index.d.ts +6 -0
- package/dist/types/components/molecules/titleBox/index.d.ts +8 -0
- package/dist/types/components/molecules/titleBox/status.d.ts +5 -0
- package/dist/types/components/molecules/titleBox/title.d.ts +7 -0
- package/dist/types/components/molecules/tree/index.d.ts +29 -0
- package/dist/types/components/molecules/tree/searchBar/index.d.ts +7 -0
- package/dist/types/components/molecules/verticalTabs/index.d.ts +19 -0
- package/dist/types/components/organisms/avatarGroup/index.d.ts +25 -0
- package/dist/types/components/organisms/drawer/components/footer.d.ts +3 -0
- package/dist/types/components/organisms/drawer/components/headerTitle.d.ts +8 -0
- package/dist/types/components/organisms/drawer/index.d.ts +24 -0
- package/dist/types/components/organisms/index.d.ts +4 -0
- package/dist/types/components/organisms/modal/base.d.ts +6 -0
- package/dist/types/components/organisms/modal/confirm.d.ts +6 -0
- package/dist/types/components/organisms/modal/delete.d.ts +4 -0
- package/dist/types/components/organisms/modal/error.d.ts +4 -0
- package/dist/types/components/organisms/modal/index.d.ts +14 -0
- package/dist/types/components/organisms/modal/info.d.ts +4 -0
- package/dist/types/components/organisms/modal/type.d.ts +11 -0
- package/dist/types/components/organisms/table/column.d.ts +20 -0
- package/dist/types/components/organisms/table/components/cell/currencyCell.d.ts +7 -0
- package/dist/types/components/organisms/table/components/cell/dateCell.d.ts +6 -0
- package/dist/types/components/organisms/table/components/cell/index.d.ts +10 -0
- package/dist/types/components/organisms/table/components/cell/status.d.ts +8 -0
- package/dist/types/components/organisms/table/components/expandIcon.d.ts +7 -0
- package/dist/types/components/organisms/table/components/headerTitle.d.ts +10 -0
- package/dist/types/components/organisms/table/config.d.ts +8 -0
- package/dist/types/components/organisms/table/dndSort/context.d.ts +6 -0
- package/dist/types/components/organisms/table/dndSort/dragHandle.d.ts +1 -0
- package/dist/types/components/organisms/table/dndSort/index.d.ts +3 -0
- package/dist/types/components/organisms/table/dndSort/provider.d.ts +10 -0
- package/dist/types/components/organisms/table/dndSort/row.d.ts +6 -0
- package/dist/types/components/organisms/table/index.d.ts +30 -0
- package/dist/types/components/organisms/table/pagination/components.d.ts +18 -0
- package/dist/types/components/organisms/table/pagination/usePagination.d.ts +22 -0
- package/dist/types/configs/constructors/AbrplusUIKit.d.ts +17 -0
- package/dist/types/configs/constructors/index.d.ts +1 -0
- package/dist/types/configs/index.d.ts +6 -0
- package/dist/types/configs/locales/en.d.ts +1030 -0
- package/dist/types/configs/locales/fa.d.ts +1031 -0
- package/dist/types/configs/locales/i18nextTFunction.d.ts +5 -0
- package/dist/types/configs/locales/index.d.ts +10 -0
- package/dist/types/configs/providers/AbrplusUIKitProvider.d.ts +11 -0
- package/dist/types/configs/providers/index.d.ts +1 -0
- package/dist/types/configs/tailwindcss/index.d.ts +103 -0
- package/dist/types/configs/theme/colors.d.ts +114 -0
- package/dist/types/configs/theme/index.d.ts +1 -0
- package/dist/types/configs/types/index.d.ts +98 -0
- package/dist/types/constants/chartColors.d.ts +1 -0
- package/dist/types/constants/datepickerColors.d.ts +2 -0
- package/dist/types/constants/dimantions.d.ts +12 -0
- package/dist/types/constants/enum.d.ts +5 -0
- package/dist/types/constants/index.d.ts +3 -0
- package/dist/types/constants/variables.d.ts +2 -0
- package/dist/types/hooks/index.d.ts +6 -0
- package/dist/types/hooks/useAntConfig.d.ts +24 -0
- package/dist/types/hooks/useDebounce.d.ts +1 -0
- package/dist/types/hooks/useInteractions.d.ts +15 -0
- package/dist/types/hooks/useLocalStorageState.d.ts +3 -0
- package/dist/types/hooks/useObserveWindow.d.ts +9 -0
- package/dist/types/hooks/useWindowDimensions.d.ts +16 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/main.d.ts +3 -0
- package/dist/types/molecules.d.ts +2 -0
- package/dist/types/organisms.d.ts +2 -0
- package/dist/types/provider.d.ts +2 -0
- package/dist/types/theme.d.ts +1 -0
- package/dist/types/utilities/batch.d.ts +9 -0
- package/dist/types/utilities/createIcomoonIconSet.d.ts +9 -0
- package/dist/types/utilities/deepMerge.d.ts +1 -0
- package/dist/types/utilities/getErrorMessage.d.ts +1 -0
- package/dist/types/utilities/index.d.ts +7 -0
- package/dist/types/utilities/isPersian.d.ts +1 -0
- package/dist/types/utilities/mmss.d.ts +1 -0
- package/dist/types/utilities/testUtils/index.d.ts +3 -0
- package/dist/types/utilities/testUtils/withReactQuery.d.ts +2 -0
- package/dist/types/utilities/testUtils/withReactRouter.d.ts +2 -0
- package/package.json +195 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type TranslationKeys<T extends Record<string, any>> = {
|
|
2
|
+
[K in keyof T]: K extends string ? T[K] extends Record<string, any> ? `${K}.${TranslationKeys<T[K]>}` : K : never;
|
|
3
|
+
}[keyof T];
|
|
4
|
+
export type I18nextTFunction<T extends Record<string, any>> = <K extends TranslationKeys<T>>(key: K, ...params: any) => string;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as i18n } from 'i18next';
|
|
2
|
+
declare const languageNames: {
|
|
3
|
+
fa: string;
|
|
4
|
+
en: string;
|
|
5
|
+
};
|
|
6
|
+
export type Language = keyof typeof languageNames;
|
|
7
|
+
export type Resources = Record<Language, Record<string, string>>;
|
|
8
|
+
declare const initializeI18n: (lang?: Language, resources?: Resources) => void;
|
|
9
|
+
declare const getLanguageName: () => string;
|
|
10
|
+
export { getLanguageName, i18n, initializeI18n };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AbrplusUIKitType } from '../constructors';
|
|
2
|
+
import { APP_NAME } from '../types';
|
|
3
|
+
import { ConfigProviderProps } from 'antd';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
export interface AbrplusUIKitProviderProps extends ConfigProviderProps {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
locales: AbrplusUIKitType['locales'];
|
|
8
|
+
antdConfigs?: Partial<ConfigProviderProps>;
|
|
9
|
+
appName?: APP_NAME;
|
|
10
|
+
}
|
|
11
|
+
export declare const AbrplusUIKitProvider: ({ children, locales, appName, antdConfigs, }: AbrplusUIKitProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AbrplusUIKitProvider';
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
declare const config: {
|
|
2
|
+
content: {
|
|
3
|
+
files: string[];
|
|
4
|
+
};
|
|
5
|
+
theme: {
|
|
6
|
+
fontFamily: {
|
|
7
|
+
'yekan-normal': string;
|
|
8
|
+
'yekan-medium': string;
|
|
9
|
+
'yekan-light': string;
|
|
10
|
+
'yekan-bold': string;
|
|
11
|
+
'roboto-normal': string;
|
|
12
|
+
'roboto-light': string;
|
|
13
|
+
'roboto-medium': string;
|
|
14
|
+
'roboto-bold': string;
|
|
15
|
+
};
|
|
16
|
+
colors: {
|
|
17
|
+
'white-ff': string;
|
|
18
|
+
'white-ff-10': string;
|
|
19
|
+
'white-ff-15': string;
|
|
20
|
+
'white-ff-20': string;
|
|
21
|
+
'white-ff-35': string;
|
|
22
|
+
'light-1': string;
|
|
23
|
+
'light-2': string;
|
|
24
|
+
'light-3': string;
|
|
25
|
+
'light-4': string;
|
|
26
|
+
'light-5': string;
|
|
27
|
+
'light-6': string;
|
|
28
|
+
'light-7': string;
|
|
29
|
+
primary: string;
|
|
30
|
+
'primary-dark-1': string;
|
|
31
|
+
'primary-dark-2': string;
|
|
32
|
+
'primary-light-1': string;
|
|
33
|
+
'primary-light-2': string;
|
|
34
|
+
'primary-light-3': string;
|
|
35
|
+
secondary: string;
|
|
36
|
+
'secondary-dark-1': string;
|
|
37
|
+
'secondary-light-1': string;
|
|
38
|
+
'secondary-light-2': string;
|
|
39
|
+
tertiary: string;
|
|
40
|
+
'tertiary-dark-1': string;
|
|
41
|
+
negative: string;
|
|
42
|
+
'negative-dark-1': string;
|
|
43
|
+
'negative-light-1': string;
|
|
44
|
+
'negative-light-2': string;
|
|
45
|
+
'negative-light-3': string;
|
|
46
|
+
'negative-light-4': string;
|
|
47
|
+
'negative-light-5': string;
|
|
48
|
+
positive: string;
|
|
49
|
+
'positive-dark-1': string;
|
|
50
|
+
'positive-dark-2': string;
|
|
51
|
+
'positive-light-2': string;
|
|
52
|
+
'positive-light-3': string;
|
|
53
|
+
'sales-action': string;
|
|
54
|
+
black: string;
|
|
55
|
+
transparent: string;
|
|
56
|
+
'sales-action-dark-1': string;
|
|
57
|
+
'sales-action-light-1': string;
|
|
58
|
+
'sales-action-light-2': string;
|
|
59
|
+
'sales-action-light-3': string;
|
|
60
|
+
'call-action': string;
|
|
61
|
+
'call-action-dark-1': string;
|
|
62
|
+
'call-action-light-1': string;
|
|
63
|
+
'call-action-light-2': string;
|
|
64
|
+
'call-action-light-3': string;
|
|
65
|
+
'marketing-action': string;
|
|
66
|
+
'marketing-action-dark-1': string;
|
|
67
|
+
'marketing-action-light-1': string;
|
|
68
|
+
'marketing-action-light-2': string;
|
|
69
|
+
'marketing-action-light-3': string;
|
|
70
|
+
'club-action': string;
|
|
71
|
+
'club-action-dark-1': string;
|
|
72
|
+
'club-action-light-1': string;
|
|
73
|
+
'club-action-light-2': string;
|
|
74
|
+
'club-action-light-3': string;
|
|
75
|
+
'team-action': string;
|
|
76
|
+
'team-action-dark-1': string;
|
|
77
|
+
'team-action-light-1': string;
|
|
78
|
+
'team-action-light-2': string;
|
|
79
|
+
'team-action-light-3': string;
|
|
80
|
+
'desk-action': string;
|
|
81
|
+
'desk-action-dark-1': string;
|
|
82
|
+
'desk-action-light-1': string;
|
|
83
|
+
'desk-action-light-2': string;
|
|
84
|
+
'desk-action-light-3': string;
|
|
85
|
+
'form-action': string;
|
|
86
|
+
'form-action-dark-1': string;
|
|
87
|
+
'form-action-light-1': string;
|
|
88
|
+
'form-action-light-2': string;
|
|
89
|
+
'form-action-light-3': string;
|
|
90
|
+
'task-action': string;
|
|
91
|
+
'task-action-dark-1': string;
|
|
92
|
+
'task-action-light-1': string;
|
|
93
|
+
'task-action-light-2': string;
|
|
94
|
+
'task-action-light-3': string;
|
|
95
|
+
'rayan-action': string;
|
|
96
|
+
'rayan-action-dark-1': string;
|
|
97
|
+
'rayan-action-light-1': string;
|
|
98
|
+
'rayan-action-light-2': string;
|
|
99
|
+
'rayan-action-light-3': string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export default config;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
declare const colors: {
|
|
2
|
+
readonly white_ff: "#ffffff";
|
|
3
|
+
readonly white_ff_10: "#ffffff10";
|
|
4
|
+
readonly white_ff_15: "#ffffff15";
|
|
5
|
+
readonly white_ff_20: "#ffffff20";
|
|
6
|
+
readonly white_ff_35: "#ffffff35";
|
|
7
|
+
readonly light_1: "#f8f9fb";
|
|
8
|
+
readonly light_2: "#f1f3f8";
|
|
9
|
+
readonly light_3: "#f9fbff";
|
|
10
|
+
readonly light_4: "#f7fafe";
|
|
11
|
+
readonly light_5: "#ebf3ff";
|
|
12
|
+
readonly light_6: "#eaeff5";
|
|
13
|
+
readonly light_7: "#d9e1ea";
|
|
14
|
+
readonly primary: "#435879";
|
|
15
|
+
readonly primary_dark_1: "#2b4063";
|
|
16
|
+
readonly primary_dark_2: "#192540";
|
|
17
|
+
readonly primary_light_1: "#516b93";
|
|
18
|
+
readonly primary_light_2: "#91a8c3";
|
|
19
|
+
readonly primary_light_3: "#b8c7d8";
|
|
20
|
+
readonly secondary: "#1e51c1";
|
|
21
|
+
readonly secondary_dark_1: "#163b8e";
|
|
22
|
+
readonly secondary_light_1: "#2159d4";
|
|
23
|
+
readonly secondary_light_2: "#386de0";
|
|
24
|
+
readonly tertiary: "#1ba9c7";
|
|
25
|
+
readonly tertiary_dark_1: "#489fb5";
|
|
26
|
+
readonly negative: "#c9252d";
|
|
27
|
+
readonly negative_dark_1: "#bb121a";
|
|
28
|
+
readonly negative_light_1: "#d7373f";
|
|
29
|
+
readonly negative_light_2: "#e34850";
|
|
30
|
+
readonly negative_light_3: "#f6d8da";
|
|
31
|
+
readonly negative_light_4: "#f9e3e4";
|
|
32
|
+
readonly negative_light_5: "#fdf3f3";
|
|
33
|
+
readonly positive: "#268e6c";
|
|
34
|
+
readonly positive_dark_1: "#12805c";
|
|
35
|
+
readonly positive_dark_2: "#107154";
|
|
36
|
+
readonly positive_light_2: "#2d9d78";
|
|
37
|
+
readonly positive_light_3: "#eefaf6";
|
|
38
|
+
readonly sales_action: "#ec6c2c";
|
|
39
|
+
readonly black: "#000000";
|
|
40
|
+
readonly transparent: "transparent";
|
|
41
|
+
readonly sales: {
|
|
42
|
+
action: string;
|
|
43
|
+
action_dark_1: string;
|
|
44
|
+
action_light_1: string;
|
|
45
|
+
action_light_2: string;
|
|
46
|
+
action_light_3: string;
|
|
47
|
+
};
|
|
48
|
+
readonly call: {
|
|
49
|
+
action: string;
|
|
50
|
+
action_dark_1: string;
|
|
51
|
+
action_light_1: string;
|
|
52
|
+
action_light_2: string;
|
|
53
|
+
action_light_3: string;
|
|
54
|
+
};
|
|
55
|
+
readonly marketing: {
|
|
56
|
+
action: string;
|
|
57
|
+
action_dark_1: string;
|
|
58
|
+
action_light_1: string;
|
|
59
|
+
action_light_2: string;
|
|
60
|
+
action_light_3: string;
|
|
61
|
+
};
|
|
62
|
+
readonly club: {
|
|
63
|
+
action: string;
|
|
64
|
+
action_dark_1: string;
|
|
65
|
+
action_light_1: string;
|
|
66
|
+
action_light_2: string;
|
|
67
|
+
action_light_3: string;
|
|
68
|
+
};
|
|
69
|
+
readonly team: {
|
|
70
|
+
action: string;
|
|
71
|
+
action_dark_1: string;
|
|
72
|
+
action_light_1: string;
|
|
73
|
+
action_light_2: string;
|
|
74
|
+
action_light_3: string;
|
|
75
|
+
};
|
|
76
|
+
readonly desk: {
|
|
77
|
+
action: string;
|
|
78
|
+
action_dark_1: string;
|
|
79
|
+
action_light_1: string;
|
|
80
|
+
action_light_2: string;
|
|
81
|
+
action_light_3: string;
|
|
82
|
+
};
|
|
83
|
+
readonly form: {
|
|
84
|
+
action: string;
|
|
85
|
+
action_dark_1: string;
|
|
86
|
+
action_light_1: string;
|
|
87
|
+
action_light_2: string;
|
|
88
|
+
action_light_3: string;
|
|
89
|
+
};
|
|
90
|
+
readonly task: {
|
|
91
|
+
action: string;
|
|
92
|
+
action_dark_1: string;
|
|
93
|
+
action_light_1: string;
|
|
94
|
+
action_light_2: string;
|
|
95
|
+
action_light_3: string;
|
|
96
|
+
};
|
|
97
|
+
readonly rayan: {
|
|
98
|
+
action: string;
|
|
99
|
+
action_dark_1: string;
|
|
100
|
+
action_light_1: string;
|
|
101
|
+
action_light_2: string;
|
|
102
|
+
action_light_3: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
type ColorScheme = typeof colors;
|
|
106
|
+
type AppColorSchema = {
|
|
107
|
+
action: string;
|
|
108
|
+
action_dark_1: string;
|
|
109
|
+
action_light_1: string;
|
|
110
|
+
action_light_2: string;
|
|
111
|
+
action_light_3: string;
|
|
112
|
+
};
|
|
113
|
+
export { colors };
|
|
114
|
+
export type { AppColorSchema, ColorScheme };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './colors';
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export type APP_NAME = 'home' | 'sales' | 'call' | 'marketing' | 'club' | 'sandbox' | 'bi' | 'team' | 'storybook' | 'desk' | 'form' | 'task' | 'rayan';
|
|
2
|
+
export type InputFieldError = {
|
|
3
|
+
message?: string;
|
|
4
|
+
} | null;
|
|
5
|
+
export type AppDirection = 'rtl' | 'ltr';
|
|
6
|
+
export interface ITreeOption {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
children?: ITreeOption[];
|
|
10
|
+
hasChildren: boolean;
|
|
11
|
+
checkable?: boolean;
|
|
12
|
+
[prop: string]: any;
|
|
13
|
+
}
|
|
14
|
+
export type ErrorLike = {
|
|
15
|
+
message?: string;
|
|
16
|
+
};
|
|
17
|
+
export interface AxiosResponse<T = any> {
|
|
18
|
+
data: T;
|
|
19
|
+
status: number;
|
|
20
|
+
statusText: string;
|
|
21
|
+
headers: Record<string, string>;
|
|
22
|
+
config: unknown;
|
|
23
|
+
request?: unknown;
|
|
24
|
+
}
|
|
25
|
+
export declare class InternalRequestError extends Error {
|
|
26
|
+
message: string;
|
|
27
|
+
status?: number | undefined;
|
|
28
|
+
response?: AxiosResponse | undefined;
|
|
29
|
+
constructor(message: string, status?: number | undefined, response?: AxiosResponse | undefined);
|
|
30
|
+
isApiException: boolean;
|
|
31
|
+
static isRequestError(error: any): error is InternalRequestError;
|
|
32
|
+
}
|
|
33
|
+
export type ClientError = Error | InternalRequestError | null;
|
|
34
|
+
type Params<Key extends string = string> = {
|
|
35
|
+
readonly [key in Key]: string;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* @ignore
|
|
39
|
+
*/
|
|
40
|
+
export type QueryParamDefault = Record<string, string | Array<string | Array<any> | Record<string, any> | null> | Record<string, any> | null | undefined>;
|
|
41
|
+
export interface Options<Q extends QueryParamDefault> {
|
|
42
|
+
query?: Q;
|
|
43
|
+
title?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface Route<Parts extends string, QueryParams extends QueryParamDefault> {
|
|
46
|
+
title?: string;
|
|
47
|
+
template(): string;
|
|
48
|
+
create: CreateFun<Parts, QueryParams>;
|
|
49
|
+
route: <Parts1 extends string, QueryParams1 extends QueryParamDefault>(arg: Parts1 | Parts1[], option?: Options<QueryParams1>) => Route<Parts1 | Parts, QueryParams & QueryParams1>;
|
|
50
|
+
useQueryParams(): Partial<QueryParameterAssignString<QueryParams>>;
|
|
51
|
+
useParams(): Required<Params<PathParam<Parts>>>;
|
|
52
|
+
/**
|
|
53
|
+
* This is useFull for where you have a dynamic param
|
|
54
|
+
* @param createParams the params which will fill from current route
|
|
55
|
+
*/
|
|
56
|
+
useCreate<T1 extends PathParam<Parts>>(createParams: T1[]): CreateFun<Exclude<Parts, `:${T1}`>, QueryParams>;
|
|
57
|
+
/**
|
|
58
|
+
* This is useful for create breadcrumbs
|
|
59
|
+
*/
|
|
60
|
+
useMap(): {
|
|
61
|
+
path: string | string[];
|
|
62
|
+
title?: string;
|
|
63
|
+
create(): string;
|
|
64
|
+
}[];
|
|
65
|
+
createNestedRoutes: <C>(generator: (parent: Route<Parts, QueryParams>) => C) => {
|
|
66
|
+
root: Route<Parts, QueryParams>;
|
|
67
|
+
} & C;
|
|
68
|
+
}
|
|
69
|
+
type QueryParameterAssignString<T> = {
|
|
70
|
+
[P in keyof T]: T[P] | string;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* @ignore
|
|
74
|
+
*/
|
|
75
|
+
export type PathParam<T extends string> = T extends `:${infer A}` ? A : never;
|
|
76
|
+
/**
|
|
77
|
+
* @ignore
|
|
78
|
+
*/
|
|
79
|
+
export type PathPart<T extends string> = string | PathParam<T>;
|
|
80
|
+
/**
|
|
81
|
+
* @ignore
|
|
82
|
+
*/
|
|
83
|
+
export type CreateFun<Parts extends string, QueryParams extends QueryParamDefault> = Parts extends `:${any}` ? (params: Record<PathParam<Parts>, string> & {
|
|
84
|
+
query?: Partial<QueryParameterAssignString<QueryParams>>;
|
|
85
|
+
}) => string : (params?: {
|
|
86
|
+
query?: Partial<QueryParameterAssignString<QueryParams>>;
|
|
87
|
+
}) => string;
|
|
88
|
+
export declare enum LogoIconNameType {
|
|
89
|
+
User = "User",
|
|
90
|
+
SecurityGroup = "SecurityGroup",
|
|
91
|
+
Department = "Department",
|
|
92
|
+
Office = "Office",
|
|
93
|
+
Position = "Position",
|
|
94
|
+
SecurityCustomer = "SecurityCustomer",
|
|
95
|
+
SecurityAgent = "SecurityAgent",
|
|
96
|
+
SecurityOperator = "SecurityOperator"
|
|
97
|
+
}
|
|
98
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const chartColors: string[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const SCREEN_SIZE: {
|
|
2
|
+
WIDTH: number;
|
|
3
|
+
HEIGHT: number;
|
|
4
|
+
};
|
|
5
|
+
export declare const MIN_RESPONSIVE_HEIGHT: {
|
|
6
|
+
TABLET: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const HEADER_HEIGHT = 56;
|
|
9
|
+
export declare const MENU: {
|
|
10
|
+
WIDTH: number;
|
|
11
|
+
ITEM_SIZE: number;
|
|
12
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AppDirection, Language } from '../configs';
|
|
2
|
+
export declare const useAntConfig: (language: Language) => {
|
|
3
|
+
theme: {
|
|
4
|
+
token: {
|
|
5
|
+
fontFamily: string;
|
|
6
|
+
colorPrimary: "#435879";
|
|
7
|
+
colorSuccess: "#268e6c";
|
|
8
|
+
colorError: "#c9252d";
|
|
9
|
+
borderRadius: number;
|
|
10
|
+
};
|
|
11
|
+
components: {
|
|
12
|
+
Input: {
|
|
13
|
+
colorBorder: "#b8c7d8";
|
|
14
|
+
hoverBorderColor: "#2b4063";
|
|
15
|
+
colorBgContainerDisabled: "#eaeff5";
|
|
16
|
+
};
|
|
17
|
+
Collapse: {
|
|
18
|
+
headerBg: "#f1f3f8";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
direction: AppDirection;
|
|
23
|
+
locale: import('antd/lib/locale').Locale;
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useDebounce: <T extends (...args: Parameters<T>) => ReturnType<T>>(fn: T, delay: number) => (...args: Parameters<T>) => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AnyHandlerEventTypes, GestureHandlers } from '@use-gesture/react';
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* const { isTabFocused, eventHandlers } = useInteractions();
|
|
5
|
+
*
|
|
6
|
+
* return <button {...eventHandlers()} />;
|
|
7
|
+
*/
|
|
8
|
+
declare function useInteractions<HandlerTypes extends AnyHandlerEventTypes>({ onHover, onBlur, onFocus, onMouseDown, onMouseUp, onMouseLeave, onKeyUp, ...handlers }?: GestureHandlers<HandlerTypes>): {
|
|
9
|
+
eventHandlers: (...args: any[]) => import('@use-gesture/react/dist/declarations/src/types').ReactDOMAttributes;
|
|
10
|
+
isFocused: boolean;
|
|
11
|
+
isHovered: boolean;
|
|
12
|
+
isActive: boolean;
|
|
13
|
+
isTabFocused: boolean;
|
|
14
|
+
};
|
|
15
|
+
export { useInteractions };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function useObserveWindow(): {
|
|
2
|
+
getIsWidthSmallerThan: (query: number) => boolean | undefined;
|
|
3
|
+
getIsWidthLargerThan: (query: number) => boolean | undefined;
|
|
4
|
+
getIsWidthBetween: (queries: [number, number]) => boolean | undefined;
|
|
5
|
+
isSmallerThanExtraLarge: boolean | undefined;
|
|
6
|
+
isSmallerThanMedium: boolean | undefined;
|
|
7
|
+
isSmallerThanSmall: boolean | undefined;
|
|
8
|
+
isSmallerThenLarge: boolean | undefined;
|
|
9
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type Size = {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
};
|
|
5
|
+
declare function getWindowDimensions(): {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* This was implemented with proxy because of perf, so destructor response
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* const { width, height } = useWindowDimensions();
|
|
14
|
+
*/
|
|
15
|
+
declare function useWindowDimensions(): Size;
|
|
16
|
+
export { getWindowDimensions, useWindowDimensions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type BatchFunction = (...props: any[]) => React.ReactNode;
|
|
2
|
+
type BatchRecord = {
|
|
3
|
+
[K in string]: BatchRecord | BatchFunction;
|
|
4
|
+
};
|
|
5
|
+
type BatchResult<T extends BatchRecord> = {
|
|
6
|
+
readonly [K in Capitalize<keyof T & string>]: T[K];
|
|
7
|
+
};
|
|
8
|
+
declare function batch<T extends BatchRecord>(components: T): BatchResult<T>;
|
|
9
|
+
export { batch };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
type IcomoonProps = {
|
|
3
|
+
size?: number;
|
|
4
|
+
name?: string;
|
|
5
|
+
color?: string | string[];
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
};
|
|
8
|
+
export declare function createIcomoonIconSet(): (props: IcomoonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function deepMerge<T extends object>(target: T, source: Partial<T>): T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getErrorMessage(error?: unknown | false | null): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isPersianOrArabic: (value: string) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mmss: (secs: number) => string;
|