@e-burgos/tucu-ui 1.0.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 +1113 -0
- package/components/auth/forget-password-form.d.ts +16 -0
- package/components/auth/index.d.ts +4 -0
- package/components/auth/reset-pin-form.d.ts +18 -0
- package/components/auth/sign-in-form.d.ts +18 -0
- package/components/auth/sign-up-form.d.ts +21 -0
- package/components/blockchain/coin-card.d.ts +17 -0
- package/components/blockchain/coin-info-card.d.ts +15 -0
- package/components/blockchain/coin-listbox.d.ts +14 -0
- package/components/blockchain/collection-card.d.ts +19 -0
- package/components/blockchain/collection-select-list.d.ts +11 -0
- package/components/blockchain/currency-swap-icons.d.ts +7 -0
- package/components/blockchain/index.d.ts +9 -0
- package/components/blockchain/live-price-feed.d.ts +24 -0
- package/components/blockchain/nft-grid.d.ts +11 -0
- package/components/blockchain/transaction-info.d.ts +7 -0
- package/components/buttons/button/button-drip.d.ts +12 -0
- package/components/buttons/button/button-loader.d.ts +9 -0
- package/components/buttons/button/index.d.ts +23 -0
- package/components/buttons/hamburger.d.ts +6 -0
- package/components/buttons/index.d.ts +6 -0
- package/components/buttons/topup-button.d.ts +8 -0
- package/components/cards/author-card.d.ts +7 -0
- package/components/cards/card-container.d.ts +7 -0
- package/components/cards/card-title.d.ts +9 -0
- package/components/cards/index.d.ts +5 -0
- package/components/cards/panel-action-card.d.ts +16 -0
- package/components/cards/panel-card.d.ts +8 -0
- package/components/carousel/carousel-cards.d.ts +19 -0
- package/components/carousel/carousel-component.d.ts +41 -0
- package/components/carousel/carousel-image.d.ts +18 -0
- package/components/carousel/index.d.ts +3 -0
- package/components/common/avatar.d.ts +12 -0
- package/components/common/badge.d.ts +8 -0
- package/components/common/collapse.d.ts +7 -0
- package/components/common/index.d.ts +7 -0
- package/components/common/menu-item.d.ts +21 -0
- package/components/common/scrollbar-native.d.ts +14 -0
- package/components/common/scrollbar.d.ts +14 -0
- package/components/common/skeleton.d.ts +6 -0
- package/components/dialog/drawer-container.d.ts +8 -0
- package/components/dialog/drawer.d.ts +19 -0
- package/components/dialog/index.d.ts +5 -0
- package/components/dialog/modal.d.ts +21 -0
- package/components/dialog/sidebar-menu.d.ts +13 -0
- package/components/dialog/sidebar.d.ts +12 -0
- package/components/forms/checkbox.d.ts +38 -0
- package/components/forms/field-error-text.d.ts +19 -0
- package/components/forms/field-helper-text.d.ts +18 -0
- package/components/forms/file-input.d.ts +8 -0
- package/components/forms/form-system/example/error-container-example.d.ts +3 -0
- package/components/forms/form-system/example/form-example.d.ts +3 -0
- package/components/forms/form-system/example/form-methods-example.d.ts +3 -0
- package/components/forms/form-system/example/validations.d.ts +14 -0
- package/components/forms/form-system/form-field.d.ts +14 -0
- package/components/forms/form-system/form.d.ts +13 -0
- package/components/forms/form-system/hook-form.d.ts +3 -0
- package/components/forms/form-system/index.d.ts +10 -0
- package/components/forms/form-system/types/dependencies.type.d.ts +11 -0
- package/components/forms/form-system/types/extend-react-hook-form.type.d.ts +16 -0
- package/components/forms/form-system/types/index.d.ts +3 -0
- package/components/forms/form-system/types/validations.type.d.ts +9 -0
- package/components/forms/index.d.ts +17 -0
- package/components/forms/input-label.d.ts +9 -0
- package/components/forms/input-searcher.d.ts +7 -0
- package/components/forms/input-select.d.ts +24 -0
- package/components/forms/input-switch.d.ts +13 -0
- package/components/forms/input.d.ts +14 -0
- package/components/forms/pin-code.d.ts +97 -0
- package/components/forms/radio-group.d.ts +56 -0
- package/components/forms/radio.d.ts +87 -0
- package/components/forms/textarea.d.ts +10 -0
- package/components/forms/toggle-bar.d.ts +9 -0
- package/components/forms/uploader-two.d.ts +44 -0
- package/components/forms/uploader.d.ts +2 -0
- package/components/icons/arrow-link-icon.d.ts +1 -0
- package/components/icons/arrow-right.d.ts +1 -0
- package/components/icons/arrow-up.d.ts +1 -0
- package/components/icons/bitcoin.d.ts +1 -0
- package/components/icons/bnb.d.ts +1 -0
- package/components/icons/book.d.ts +1 -0
- package/components/icons/brands/facebook.d.ts +1 -0
- package/components/icons/brands/github.d.ts +1 -0
- package/components/icons/brands/instagram.d.ts +1 -0
- package/components/icons/brands/telegram.d.ts +1 -0
- package/components/icons/brands/twitter.d.ts +1 -0
- package/components/icons/calendar-icon.d.ts +1 -0
- package/components/icons/cardano.d.ts +1 -0
- package/components/icons/check.d.ts +1 -0
- package/components/icons/checkmark.d.ts +1 -0
- package/components/icons/chevron-down.d.ts +1 -0
- package/components/icons/chevron-forward.d.ts +1 -0
- package/components/icons/chevron-right.d.ts +1 -0
- package/components/icons/classic-layout-icon.d.ts +1 -0
- package/components/icons/close.d.ts +1 -0
- package/components/icons/compact-grid.d.ts +1 -0
- package/components/icons/compass.d.ts +1 -0
- package/components/icons/copy.d.ts +1 -0
- package/components/icons/disk.d.ts +1 -0
- package/components/icons/document.d.ts +1 -0
- package/components/icons/doge.d.ts +1 -0
- package/components/icons/dots-icon.d.ts +1 -0
- package/components/icons/ethereum-dark.d.ts +1 -0
- package/components/icons/ethereum.d.ts +1 -0
- package/components/icons/exchange.d.ts +1 -0
- package/components/icons/export-icon.d.ts +1 -0
- package/components/icons/external-link.d.ts +1 -0
- package/components/icons/eye.d.ts +1 -0
- package/components/icons/eyeslash.d.ts +1 -0
- package/components/icons/farm.d.ts +1 -0
- package/components/icons/flash.d.ts +1 -0
- package/components/icons/flow.d.ts +1 -0
- package/components/icons/gas-icon.d.ts +1 -0
- package/components/icons/guide-icon.d.ts +1 -0
- package/components/icons/history.d.ts +1 -0
- package/components/icons/home.d.ts +1 -0
- package/components/icons/horizontal-three-dots.d.ts +1 -0
- package/components/icons/icon-us-flag.d.ts +1 -0
- package/components/icons/index.d.ts +97 -0
- package/components/icons/info-circle.d.ts +1 -0
- package/components/icons/info-icon.d.ts +1 -0
- package/components/icons/left-align.d.ts +1 -0
- package/components/icons/level-icon.d.ts +1 -0
- package/components/icons/link-icon.d.ts +1 -0
- package/components/icons/live-pricing.d.ts +1 -0
- package/components/icons/lock-icon.d.ts +1 -0
- package/components/icons/long-arrow-left.d.ts +1 -0
- package/components/icons/long-arrow-right.d.ts +1 -0
- package/components/icons/long-arrow-up.d.ts +1 -0
- package/components/icons/loop-icon.d.ts +1 -0
- package/components/icons/lucide-react/index.d.ts +1 -0
- package/components/icons/media-play-icon.d.ts +1 -0
- package/components/icons/menu-icon.d.ts +2 -0
- package/components/icons/minimal-layout-icon.d.ts +1 -0
- package/components/icons/modern-layout-icon.d.ts +1 -0
- package/components/icons/moon.d.ts +1 -0
- package/components/icons/more-icon.d.ts +1 -0
- package/components/icons/normal-grid.d.ts +1 -0
- package/components/icons/option.d.ts +1 -0
- package/components/icons/play-icon.d.ts +1 -0
- package/components/icons/plus-circle.d.ts +1 -0
- package/components/icons/plus.d.ts +1 -0
- package/components/icons/pool.d.ts +1 -0
- package/components/icons/power.d.ts +1 -0
- package/components/icons/profile.d.ts +1 -0
- package/components/icons/question-icon.d.ts +1 -0
- package/components/icons/question-solid-icon.d.ts +1 -0
- package/components/icons/range-icon.d.ts +1 -0
- package/components/icons/refresh.d.ts +1 -0
- package/components/icons/retro-layout-icon.d.ts +1 -0
- package/components/icons/right-align.d.ts +1 -0
- package/components/icons/sand-clock.d.ts +1 -0
- package/components/icons/search.d.ts +1 -0
- package/components/icons/shut-down-icon.d.ts +1 -0
- package/components/icons/spike-bar.d.ts +1 -0
- package/components/icons/star-fill.d.ts +1 -0
- package/components/icons/star.d.ts +1 -0
- package/components/icons/sun.d.ts +1 -0
- package/components/icons/swap-icon.d.ts +1 -0
- package/components/icons/tag-icon.d.ts +1 -0
- package/components/icons/tag.d.ts +1 -0
- package/components/icons/tether.d.ts +1 -0
- package/components/icons/trading-bot-icon.d.ts +1 -0
- package/components/icons/trend-arrow-down-icon.d.ts +1 -0
- package/components/icons/trend-arrow-up-icon.d.ts +1 -0
- package/components/icons/tucu.d.ts +1 -0
- package/components/icons/unlocked.d.ts +1 -0
- package/components/icons/upload.d.ts +1 -0
- package/components/icons/usdc.d.ts +1 -0
- package/components/icons/verified-icon.d.ts +1 -0
- package/components/icons/verified.d.ts +1 -0
- package/components/icons/vertical-three-dots.d.ts +1 -0
- package/components/icons/vote-icon.d.ts +1 -0
- package/components/icons/warning.d.ts +1 -0
- package/components/index.d.ts +16 -0
- package/components/layouts/authentication/layout.d.ts +5 -0
- package/components/layouts/classic/layout.d.ts +16 -0
- package/components/layouts/header/header.d.ts +16 -0
- package/components/layouts/menus/collapsible-menu.d.ts +3 -0
- package/components/layouts/menus/expandable-sidebar.d.ts +8 -0
- package/components/layouts/menus/minimal-nav-menu.d.ts +5 -0
- package/components/layouts/minimal/layout.d.ts +24 -0
- package/components/layouts/root-layout.d.ts +18 -0
- package/components/links/active-link.d.ts +7 -0
- package/components/links/anchor-link.d.ts +3 -0
- package/components/links/index.d.ts +2 -0
- package/components/loaders/index.d.ts +3 -0
- package/components/loaders/loader.d.ts +20 -0
- package/components/loaders/progressbar.d.ts +64 -0
- package/components/loaders/spinner.d.ts +15 -0
- package/components/logos/index.d.ts +2 -0
- package/components/logos/logo-theme.d.ts +5 -0
- package/components/logos/logo.d.ts +13 -0
- package/components/notifications/alert.d.ts +12 -0
- package/components/notifications/index.d.ts +3 -0
- package/components/notifications/notification-card.d.ts +14 -0
- package/components/notifications/toast.d.ts +3 -0
- package/components/tabs/index.d.ts +3 -0
- package/components/tabs/param-tab.d.ts +13 -0
- package/components/tabs/tab-select.d.ts +10 -0
- package/components/tabs/tab.d.ts +20 -0
- package/components/typography/index.d.ts +39 -0
- package/components/utils/code-block.d.ts +8 -0
- package/components/utils/image.d.ts +16 -0
- package/components/utils/index.d.ts +5 -0
- package/components/utils/reveal-content.d.ts +6 -0
- package/components/utils/scroll-to-top.d.ts +5 -0
- package/components/utils/test-brand-classes.d.ts +1 -0
- package/hooks/index.d.ts +13 -0
- package/hooks/use-breakpoint.d.ts +1 -0
- package/hooks/use-click-away.d.ts +1 -0
- package/hooks/use-copy-to-clipboard.d.ts +1 -0
- package/hooks/use-element-size.d.ts +9 -0
- package/hooks/use-event-listener.d.ts +7 -0
- package/hooks/use-grid-switcher.d.ts +6 -0
- package/hooks/use-is-mobile.d.ts +4 -0
- package/hooks/use-is-mounted.d.ts +1 -0
- package/hooks/use-lock-body-scroll.d.ts +1 -0
- package/hooks/use-measure.d.ts +1 -0
- package/hooks/use-scrollable-slider.d.ts +7 -0
- package/hooks/use-toast-store.d.ts +17 -0
- package/hooks/use-window-scroll.d.ts +1 -0
- package/index.css +1 -0
- package/index.d.ts +10 -0
- package/index.js +133 -0
- package/index.mjs +44201 -0
- package/libs/framer-motion/fade-in-bottom.d.ts +18 -0
- package/libs/index.d.ts +3 -0
- package/libs/local-storage/index.d.ts +7 -0
- package/libs/range-map.d.ts +1 -0
- package/lucide-react/index.d.ts +1 -0
- package/package.json +76 -0
- package/react-router-dom/index.d.ts +1 -0
- package/storybook/components/StoryContainer.d.ts +6 -0
- package/storybook/components/pages/Accessibility.d.ts +1 -0
- package/storybook/components/pages/Introduction.d.ts +1 -0
- package/storybook/hooks/useDummy.d.ts +34 -0
- package/swiper-react/index.d.ts +2 -0
- package/themes/components/pages/not-found.d.ts +2 -0
- package/themes/components/theme-provider/app-routes.d.ts +17 -0
- package/themes/components/theme-provider/index.d.ts +26 -0
- package/themes/components/theme-provider/settings-button.d.ts +2 -0
- package/themes/components/theme-provider/settings-drawer.d.ts +3 -0
- package/themes/config.d.ts +106 -0
- package/themes/index.d.ts +9 -0
- package/themes/use-direction.d.ts +1 -0
- package/themes/use-theme-color.d.ts +10 -0
- package/themes/use-theme.d.ts +83 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare function fadeInBottom(type?: string, duration?: number, translateY?: number): {
|
|
2
|
+
enter: {
|
|
3
|
+
y: number;
|
|
4
|
+
opacity: number;
|
|
5
|
+
transition: {
|
|
6
|
+
type: string;
|
|
7
|
+
duration: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
exit: {
|
|
11
|
+
y: number;
|
|
12
|
+
opacity: number;
|
|
13
|
+
transition: {
|
|
14
|
+
type: string;
|
|
15
|
+
duration: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
package/libs/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function rangeMap(n: number, fn: (i: number) => any): any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'lucide-react';
|
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@e-burgos/tucu-ui",
|
|
3
|
+
"description": "Tucu UI Library",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"module": "./index.mjs",
|
|
7
|
+
"types": "./index.d.ts",
|
|
8
|
+
"style": "./index.css",
|
|
9
|
+
"author": "Esteban Burgos",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/e-burgos/tucu-ui"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"ui",
|
|
17
|
+
"tucu-ui",
|
|
18
|
+
"e-burgos",
|
|
19
|
+
"tailwind",
|
|
20
|
+
"components",
|
|
21
|
+
"library",
|
|
22
|
+
"react",
|
|
23
|
+
"zustand"
|
|
24
|
+
],
|
|
25
|
+
"homepage": "https://tucu-ui.netlify.app",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./index.d.ts",
|
|
29
|
+
"style": "./index.css",
|
|
30
|
+
"import": "./index.mjs",
|
|
31
|
+
"require": "./index.js"
|
|
32
|
+
},
|
|
33
|
+
"./styles": "./index.css"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"**/*"
|
|
37
|
+
],
|
|
38
|
+
"sideEffects": true,
|
|
39
|
+
"scripts": {
|
|
40
|
+
"storybook": "storybook dev --initial-path=/docs/1-documentation-1-introduction--documentation -p 6006",
|
|
41
|
+
"build-storybook": "storybook build --output-dir ../../dist/ui/storybook-tucu-ui",
|
|
42
|
+
"publish-storybook": "pnpm dlx chromatic --project-token --force-rebuild --exit-zero-on-changes --auto-accept-changes",
|
|
43
|
+
"serve-storybook": "serve ../../dist/ui/storybook-tucu-ui -p 8080",
|
|
44
|
+
"chromatic": "pnpm dlx chromatic --project-token --force-rebuild",
|
|
45
|
+
"storybook-doctor": "pnpm dlx storybook doctor",
|
|
46
|
+
"publish:lib": "cd ../../dist/ui/tucu-ui && pnpm npm publish --access public --no-git-checks",
|
|
47
|
+
"install:lib": "cd ../../ui/tucu-ui && pnpm install"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@headlessui/react": "2.2.4",
|
|
51
|
+
"@tailwindcss/typography": "0.0.0-insiders.0339c42",
|
|
52
|
+
"classnames": "^2.5.1",
|
|
53
|
+
"framer-motion": "12.23.3",
|
|
54
|
+
"lucide-react": "^0.460.0",
|
|
55
|
+
"react-dropzone": "14.3.8",
|
|
56
|
+
"react-hook-form": "7.60.0",
|
|
57
|
+
"react-router-dom": "7.9.1",
|
|
58
|
+
"react-router": "7.9.1",
|
|
59
|
+
"react-use": "^17.6.0",
|
|
60
|
+
"recharts": "3.0.0",
|
|
61
|
+
"swiper": "11.2.8",
|
|
62
|
+
"zustand": "^5.0.8"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"tailwindcss": "^4.1.10",
|
|
66
|
+
"@tailwindcss/postcss": "^4.1.10",
|
|
67
|
+
"postcss": "^8.5.6",
|
|
68
|
+
"prismjs": "^1.30.0",
|
|
69
|
+
"@types/prismjs": "^1.26.5"
|
|
70
|
+
},
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"react": ">=18.0.0",
|
|
73
|
+
"react-dom": ">=18.0.0",
|
|
74
|
+
"tailwindcss": ">=4.0.0"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'react-router-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Accessibility(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Introduction(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const menuItems: ({
|
|
2
|
+
name: string;
|
|
3
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
href: string;
|
|
5
|
+
component: import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
dropdownItems?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
name: string;
|
|
9
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
href: string;
|
|
11
|
+
component: import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
dropdownItems: {
|
|
13
|
+
name: string;
|
|
14
|
+
href: string;
|
|
15
|
+
component: import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
}[];
|
|
17
|
+
})[];
|
|
18
|
+
export declare const menuItemsWithDropdown: ({
|
|
19
|
+
name: string;
|
|
20
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
href: string;
|
|
22
|
+
component: import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
dropdownItems?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
name: string;
|
|
26
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
href: string;
|
|
28
|
+
component: import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
dropdownItems: {
|
|
30
|
+
name: string;
|
|
31
|
+
href: string;
|
|
32
|
+
component: import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
}[];
|
|
34
|
+
})[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IMenuItem } from '../../../components/common/menu-item';
|
|
3
|
+
type AppRouteType = {
|
|
4
|
+
key: string;
|
|
5
|
+
path: string;
|
|
6
|
+
element: JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
interface AppRoutesMenuItem extends Omit<IMenuItem, 'dropdownItems'> {
|
|
9
|
+
component: JSX.Element;
|
|
10
|
+
dropdownItems?: AppRoutesMenuItem[];
|
|
11
|
+
}
|
|
12
|
+
interface AppRoutesProps {
|
|
13
|
+
menuItems: AppRoutesMenuItem[];
|
|
14
|
+
}
|
|
15
|
+
export declare const AppRoutes: FC<AppRoutesProps>;
|
|
16
|
+
export default AppRoutes;
|
|
17
|
+
export type { AppRoutesMenuItem, AppRoutesProps, AppRouteType };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Routes } from 'react-router-dom';
|
|
2
|
+
import { AppRoutesMenuItem } from './app-routes';
|
|
3
|
+
import { ISettingAction, MODE, PresetColorType } from '../../config';
|
|
4
|
+
import { LayoutTypeProps } from '../../../components/layouts/root-layout';
|
|
5
|
+
interface ThemeProviderProps extends Omit<LayoutTypeProps, 'menuItems'> {
|
|
6
|
+
menuItems: AppRoutesMenuItem[];
|
|
7
|
+
brandColor?: PresetColorType;
|
|
8
|
+
customPaletteColor?: {
|
|
9
|
+
primary?: PresetColorType | string;
|
|
10
|
+
secondary?: PresetColorType | string;
|
|
11
|
+
accent?: PresetColorType | string;
|
|
12
|
+
dark?: PresetColorType | string;
|
|
13
|
+
light?: PresetColorType | string;
|
|
14
|
+
};
|
|
15
|
+
showSettings?: boolean;
|
|
16
|
+
mode?: MODE;
|
|
17
|
+
settingActions?: ISettingAction;
|
|
18
|
+
customRoutes?: React.ReactElement<typeof Routes>;
|
|
19
|
+
withRouterProvider?: boolean;
|
|
20
|
+
headerClassName?: string;
|
|
21
|
+
contentClassName?: string;
|
|
22
|
+
fullWidth?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function ThemeProvider({ logo, rightButton, brandColor, customPaletteColor, showSettings, customRoutes, className, headerClassName, contentClassName, fullWidth, mode: appMode, menuItems: appMenuItems, layout: appLayout, settingActions, withRouterProvider, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default ThemeProvider;
|
|
26
|
+
export type { ThemeProviderProps };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { LogoPropTypes } from '../components/logos/logo';
|
|
2
|
+
export interface IThemeItem {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ISettingAction {
|
|
7
|
+
disabledMode?: boolean;
|
|
8
|
+
disabledLayout?: boolean;
|
|
9
|
+
disabledDirection?: boolean;
|
|
10
|
+
disabledPreset?: boolean;
|
|
11
|
+
disabledSecondary?: boolean;
|
|
12
|
+
disabledAccent?: boolean;
|
|
13
|
+
disabledDark?: boolean;
|
|
14
|
+
disabledLight?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type MODE = 'light' | 'dark';
|
|
17
|
+
export type DIRECTION = 'ltr' | 'rtl';
|
|
18
|
+
export type LogoType = LogoPropTypes;
|
|
19
|
+
export declare enum LAYOUT_OPTIONS {
|
|
20
|
+
NONE = "none",
|
|
21
|
+
MINIMAL = "minimal",
|
|
22
|
+
CLASSIC = "classic"
|
|
23
|
+
}
|
|
24
|
+
export type LayoutOptionType = 'none' | 'minimal' | 'classic';
|
|
25
|
+
export declare const LayoutOptions: IThemeItem[];
|
|
26
|
+
export type PresetColorType = 'Green' | 'Black' | 'Blue' | 'Red' | 'Purple' | 'Orange' | 'Rose' | 'Pink' | 'Yellow' | 'Lime' | 'Teal' | 'Cyan' | 'Navy' | 'Maroon' | 'Brown' | 'Gray' | 'Silver' | 'Gold' | 'Coral' | 'Salmon' | 'Chocolate' | 'Tan' | 'Beige' | 'Mint' | 'Lavender' | 'Violet' | 'Bufus' | 'BufusBlue' | 'BufusDark' | 'BufusAccent' | 'ThemeLight' | 'ThemeDark';
|
|
27
|
+
export declare enum PRESET_LABEL_COLORS {
|
|
28
|
+
GREEN = "Green",
|
|
29
|
+
BLACK = "Black",
|
|
30
|
+
BLUE = "Blue",
|
|
31
|
+
RED = "Red",
|
|
32
|
+
PURPLE = "Purple",
|
|
33
|
+
ORANGE = "Orange",
|
|
34
|
+
ROSE = "Rose",
|
|
35
|
+
PINK = "Pink",
|
|
36
|
+
YELLOW = "Yellow",
|
|
37
|
+
LIME = "Lime",
|
|
38
|
+
TEAL = "Teal",
|
|
39
|
+
CYAN = "Cyan",
|
|
40
|
+
NAVY = "Navy",
|
|
41
|
+
MAROON = "Maroon",
|
|
42
|
+
BROWN = "Brown",
|
|
43
|
+
GRAY = "Gray",
|
|
44
|
+
SILVER = "Silver",
|
|
45
|
+
GOLD = "Gold",
|
|
46
|
+
CORAL = "Coral",
|
|
47
|
+
SALMON = "Salmon",
|
|
48
|
+
CHOCOLATE = "Chocolate",
|
|
49
|
+
TAN = "Tan",
|
|
50
|
+
BEIGE = "Beige",
|
|
51
|
+
MINT = "Mint",
|
|
52
|
+
LAVENDER = "Lavender",
|
|
53
|
+
VIOLET = "Violet",
|
|
54
|
+
BUFUS = "Bufus",
|
|
55
|
+
BUFUS_BLUE = "BufusBlue",
|
|
56
|
+
BUFUS_DARK = "BufusDark",
|
|
57
|
+
BUFUS_ACCENT = "BufusAccent",
|
|
58
|
+
THEME_LIGHT = "ThemeLight",
|
|
59
|
+
THEME_DARK = "ThemeDark"
|
|
60
|
+
}
|
|
61
|
+
export declare enum PRESET_COLORS {
|
|
62
|
+
GREEN = "#009e60",
|
|
63
|
+
BLACK = "#323743",
|
|
64
|
+
BLUE = "#2a52be",
|
|
65
|
+
RED = "#e34234",
|
|
66
|
+
PURPLE = "#9370DB",
|
|
67
|
+
ORANGE = "#ffa500",
|
|
68
|
+
ROSE = "#ff1493",
|
|
69
|
+
PINK = "#ffc0cb",
|
|
70
|
+
YELLOW = "#ffff00",
|
|
71
|
+
LIME = "#00ff00",
|
|
72
|
+
TEAL = "#008080",
|
|
73
|
+
CYAN = "#00ffff",
|
|
74
|
+
NAVY = "#000080",
|
|
75
|
+
MAROON = "#800000",
|
|
76
|
+
BROWN = "#a52a2a",
|
|
77
|
+
GRAY = "#808080",
|
|
78
|
+
SILVER = "#c0c0c0",
|
|
79
|
+
GOLD = "#ffd700",
|
|
80
|
+
CORAL = "#ff7f50",
|
|
81
|
+
SALMON = "#fa8072",
|
|
82
|
+
CHOCOLATE = "#d2691e",
|
|
83
|
+
TAN = "#d2b48c",
|
|
84
|
+
BEIGE = "#f5f5dc",
|
|
85
|
+
MINT = "#98ff98",
|
|
86
|
+
LAVENDER = "#e6e6fa",
|
|
87
|
+
VIOLET = "#ee82ee",
|
|
88
|
+
BUFUS = "#00D6F2",
|
|
89
|
+
BUFUS_BLUE = "#0184BF",
|
|
90
|
+
BUFUS_DARK = "#273240",
|
|
91
|
+
BUFUS_ACCENT = "#F26522",
|
|
92
|
+
THEME_LIGHT = "#fcfcfc",
|
|
93
|
+
THEME_DARK = "#0d1321"
|
|
94
|
+
}
|
|
95
|
+
export declare const ColorPreset: IThemeItem[];
|
|
96
|
+
export declare const Direction: IThemeItem[];
|
|
97
|
+
export declare const defaultLogo: LogoType;
|
|
98
|
+
export declare const defaultSettingActions: ISettingAction;
|
|
99
|
+
export declare const defaultLayout = LAYOUT_OPTIONS.CLASSIC;
|
|
100
|
+
export declare const defaultColorPreset: IThemeItem;
|
|
101
|
+
export declare const defaultSecondaryPreset: IThemeItem;
|
|
102
|
+
export declare const defaultAccentPreset: IThemeItem;
|
|
103
|
+
export declare const defaultDarkPreset: IThemeItem;
|
|
104
|
+
export declare const defaultLightPreset: IThemeItem;
|
|
105
|
+
export declare const defaultDirection = "ltr";
|
|
106
|
+
export declare const defaultMode = "dark";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './components/pages/not-found';
|
|
2
|
+
export * from './components/theme-provider/app-routes';
|
|
3
|
+
export * from './components/theme-provider/index';
|
|
4
|
+
export * from './components/theme-provider/settings-button';
|
|
5
|
+
export * from './components/theme-provider/settings-drawer';
|
|
6
|
+
export * from './config';
|
|
7
|
+
export * from './use-direction';
|
|
8
|
+
export * from './use-theme-color';
|
|
9
|
+
export * from './use-theme';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useDirection(layout: string): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function hexToRGB(hex: string): string;
|
|
2
|
+
interface IUseThemeColorProps {
|
|
3
|
+
brandColor: string;
|
|
4
|
+
secondaryColor: string;
|
|
5
|
+
accentColor: string;
|
|
6
|
+
darkColor: string;
|
|
7
|
+
lightColor: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function useThemeColor({ brandColor, secondaryColor, accentColor, darkColor, lightColor, }: IUseThemeColorProps): void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { DIRECTION, IThemeItem, LogoType, LAYOUT_OPTIONS, MODE, ISettingAction } from './config';
|
|
2
|
+
export interface ITheme {
|
|
3
|
+
preset: IThemeItem;
|
|
4
|
+
secondaryPreset: IThemeItem;
|
|
5
|
+
accentPreset: IThemeItem;
|
|
6
|
+
darkPreset: IThemeItem;
|
|
7
|
+
lightPreset: IThemeItem;
|
|
8
|
+
direction: DIRECTION;
|
|
9
|
+
layout: LAYOUT_OPTIONS;
|
|
10
|
+
mode: MODE;
|
|
11
|
+
logo: LogoType;
|
|
12
|
+
isSettingsOpen: boolean;
|
|
13
|
+
showSettings: boolean;
|
|
14
|
+
settingActions: ISettingAction;
|
|
15
|
+
setPreset: (preset: IThemeItem) => void;
|
|
16
|
+
setSecondaryPreset: (secondaryPreset: IThemeItem) => void;
|
|
17
|
+
setAccentPreset: (accentPreset: IThemeItem) => void;
|
|
18
|
+
setDarkPreset: (darkPreset: IThemeItem) => void;
|
|
19
|
+
setLightPreset: (lightPreset: IThemeItem) => void;
|
|
20
|
+
setDirection: (direction: DIRECTION) => void;
|
|
21
|
+
setLayout: (layout: LAYOUT_OPTIONS) => void;
|
|
22
|
+
setMode: (mode: MODE) => void;
|
|
23
|
+
setLogo: (logo: LogoType) => void;
|
|
24
|
+
setIsSettingsOpen: (isSettingsOpen: boolean) => void;
|
|
25
|
+
setShowSettings: (showSettings: boolean) => void;
|
|
26
|
+
setSettingActions: (settingActions: ISettingAction) => void;
|
|
27
|
+
restoreDefaultColors: () => void;
|
|
28
|
+
}
|
|
29
|
+
export declare const useTheme: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<ITheme>, "setState" | "persist"> & {
|
|
30
|
+
setState(partial: ITheme | Partial<ITheme> | ((state: ITheme) => ITheme | Partial<ITheme>), replace?: false | undefined): unknown;
|
|
31
|
+
setState(state: ITheme | ((state: ITheme) => ITheme), replace: true): unknown;
|
|
32
|
+
persist: {
|
|
33
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<ITheme, {
|
|
34
|
+
preset: IThemeItem;
|
|
35
|
+
secondaryPreset: IThemeItem;
|
|
36
|
+
accentPreset: IThemeItem;
|
|
37
|
+
darkPreset: IThemeItem;
|
|
38
|
+
lightPreset: IThemeItem;
|
|
39
|
+
direction: DIRECTION;
|
|
40
|
+
layout: LAYOUT_OPTIONS;
|
|
41
|
+
mode: MODE;
|
|
42
|
+
logo: {
|
|
43
|
+
logo: null;
|
|
44
|
+
name: string;
|
|
45
|
+
secondName?: string;
|
|
46
|
+
path?: string;
|
|
47
|
+
preset?: import('./config').PRESET_LABEL_COLORS;
|
|
48
|
+
className?: string;
|
|
49
|
+
size?: "small" | "medium" | "large" | "xlarge";
|
|
50
|
+
isoType?: boolean;
|
|
51
|
+
};
|
|
52
|
+
showSettings: boolean;
|
|
53
|
+
settingActions: ISettingAction;
|
|
54
|
+
}, unknown>>) => void;
|
|
55
|
+
clearStorage: () => void;
|
|
56
|
+
rehydrate: () => Promise<void> | void;
|
|
57
|
+
hasHydrated: () => boolean;
|
|
58
|
+
onHydrate: (fn: (state: ITheme) => void) => () => void;
|
|
59
|
+
onFinishHydration: (fn: (state: ITheme) => void) => () => void;
|
|
60
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<ITheme, {
|
|
61
|
+
preset: IThemeItem;
|
|
62
|
+
secondaryPreset: IThemeItem;
|
|
63
|
+
accentPreset: IThemeItem;
|
|
64
|
+
darkPreset: IThemeItem;
|
|
65
|
+
lightPreset: IThemeItem;
|
|
66
|
+
direction: DIRECTION;
|
|
67
|
+
layout: LAYOUT_OPTIONS;
|
|
68
|
+
mode: MODE;
|
|
69
|
+
logo: {
|
|
70
|
+
logo: null;
|
|
71
|
+
name: string;
|
|
72
|
+
secondName?: string;
|
|
73
|
+
path?: string;
|
|
74
|
+
preset?: import('./config').PRESET_LABEL_COLORS;
|
|
75
|
+
className?: string;
|
|
76
|
+
size?: "small" | "medium" | "large" | "xlarge";
|
|
77
|
+
isoType?: boolean;
|
|
78
|
+
};
|
|
79
|
+
showSettings: boolean;
|
|
80
|
+
settingActions: ISettingAction;
|
|
81
|
+
}, unknown>>;
|
|
82
|
+
};
|
|
83
|
+
}>;
|