@admin-layout/tailwind-design-pro 10.0.9-alpha.26 → 10.0.9-alpha.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
  2. package/lib/components/Layout/BasicLayout/index.js.map +1 -1
  3. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts +1 -8
  4. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts.map +1 -1
  5. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
  6. package/lib/components/Layout/GlobalHeader/Header.d.ts +1 -14
  7. package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
  8. package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
  9. package/lib/components/Layout/GlobalHeader/Logo.d.ts +1 -7
  10. package/lib/components/Layout/GlobalHeader/Logo.d.ts.map +1 -1
  11. package/lib/components/Layout/GlobalHeader/Logo.js.map +1 -1
  12. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +2 -29
  13. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -1
  14. package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -1
  15. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts +1 -12
  16. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts.map +1 -1
  17. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
  18. package/lib/components/Layout/GlobalHeader/RightContent.d.ts +1 -13
  19. package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
  20. package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -1
  21. package/lib/components/Layout/GlobalHeader/RightMenu.d.ts +1 -18
  22. package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -1
  23. package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -1
  24. package/lib/components/Layout/Sidebar/Divider.d.ts +1 -31
  25. package/lib/components/Layout/Sidebar/Divider.d.ts.map +1 -1
  26. package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
  27. package/lib/components/Layout/Sidebar/DynamicIcon.d.ts +1 -8
  28. package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -1
  29. package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -1
  30. package/lib/components/Layout/Sidebar/Sidebar.d.ts +1 -12
  31. package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +1 -1
  32. package/lib/components/Layout/Sidebar/Sidebar.js.map +1 -1
  33. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +1 -1
  34. package/lib/components/Layout/getPageTitle.d.ts +1 -16
  35. package/lib/components/Layout/getPageTitle.d.ts.map +1 -1
  36. package/lib/components/Layout/getPageTitle.js.map +1 -1
  37. package/lib/components/ThemeProvider/ThemeProvider.d.ts +2 -13
  38. package/lib/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
  39. package/lib/components/ThemeProvider/ThemeProvider.js +2 -1
  40. package/lib/components/ThemeProvider/ThemeProvider.js.map +1 -1
  41. package/lib/components/ThemeProvider/index.d.ts +1 -1
  42. package/lib/components/ThemeProvider/index.d.ts.map +1 -1
  43. package/lib/components/ThemeProvider/types.d.ts +12 -0
  44. package/lib/components/ThemeProvider/types.d.ts.map +1 -1
  45. package/lib/components/UI/Pagination.d.ts +6 -0
  46. package/lib/components/UI/Pagination.d.ts.map +1 -0
  47. package/lib/components/UI/Pagination.js +59 -0
  48. package/lib/components/UI/Pagination.js.map +1 -0
  49. package/lib/components/UI/ParamSearchResultContainer.d.ts +90 -0
  50. package/lib/components/UI/ParamSearchResultContainer.d.ts.map +1 -0
  51. package/lib/components/UI/ParamSearchResultContainer.js +80 -0
  52. package/lib/components/UI/ParamSearchResultContainer.js.map +1 -0
  53. package/lib/components/UI/PropertyCard.d.ts +24 -0
  54. package/lib/components/UI/PropertyCard.d.ts.map +1 -0
  55. package/lib/components/UI/PropertyCard.js +377 -0
  56. package/lib/components/UI/PropertyCard.js.map +1 -0
  57. package/lib/components/UI/PropertyCardList.d.ts +93 -0
  58. package/lib/components/UI/PropertyCardList.d.ts.map +1 -0
  59. package/lib/components/UI/PropertyCardList.js +41 -0
  60. package/lib/components/UI/PropertyCardList.js.map +1 -0
  61. package/lib/components/UI/icons/LocationIcon.d.ts +7 -0
  62. package/lib/components/UI/icons/LocationIcon.d.ts.map +1 -0
  63. package/lib/components/UI/icons/LocationIcon.js +18 -0
  64. package/lib/components/UI/icons/LocationIcon.js.map +1 -0
  65. package/lib/components/UI/icons/index.d.ts +2 -0
  66. package/lib/components/UI/icons/index.d.ts.map +1 -0
  67. package/lib/components/UI/index.d.ts +4 -0
  68. package/lib/components/UI/index.d.ts.map +1 -1
  69. package/lib/components/index.js +1 -1
  70. package/lib/components/typings.d.ts +121 -51
  71. package/lib/components/typings.d.ts.map +1 -1
  72. package/lib/config/env-config.d.ts +1 -0
  73. package/lib/config/env-config.d.ts.map +1 -1
  74. package/lib/config/env-config.js +5 -1
  75. package/lib/config/env-config.js.map +1 -1
  76. package/lib/helpers/DynamicIcon.d.ts +7 -4
  77. package/lib/helpers/DynamicIcon.d.ts.map +1 -1
  78. package/lib/helpers/DynamicIcon.js +11 -15
  79. package/lib/helpers/DynamicIcon.js.map +1 -1
  80. package/lib/hooks/index.d.ts +2 -0
  81. package/lib/hooks/index.d.ts.map +1 -1
  82. package/lib/hooks/use-get-current-lat-long.d.ts +18 -0
  83. package/lib/hooks/use-get-current-lat-long.d.ts.map +1 -0
  84. package/lib/hooks/use-get-current-lat-long.js +29 -0
  85. package/lib/hooks/use-get-current-lat-long.js.map +1 -0
  86. package/lib/hooks/useTailwindTheme.js +82 -0
  87. package/lib/hooks/useTailwindTheme.js.map +1 -0
  88. package/package.json +2 -2
  89. package/lib/components/Layout/typings.d.ts +0 -77
  90. package/lib/components/Layout/typings.d.ts.map +0 -1
@@ -0,0 +1,82 @@
1
+ import {useState,useEffect}from'react';import {FaMoon}from'@react-icons/all-files/fa/FaMoon.js';import {FaSun}from'@react-icons/all-files/fa/FaSun.js';const useTailwindTheme = () => {
2
+ // Check if dark mode is preferred by user or system
3
+ const [isDark, setIsDark] = useState(() => {
4
+ if (typeof window !== 'undefined') {
5
+ // Check local storage first, then system preference
6
+ const storedTheme = localStorage.getItem('color-theme');
7
+ if (storedTheme === 'dark') return true;
8
+ if (storedTheme === 'light') return false;
9
+ return window.matchMedia('(prefers-color-scheme: dark)').matches;
10
+ }
11
+ return false;
12
+ });
13
+ // Set dark mode class on body when theme changes
14
+ useEffect(() => {
15
+ document.documentElement.classList.toggle('dark', isDark);
16
+ localStorage.setItem('color-theme', isDark ? 'dark' : 'light');
17
+ }, [isDark]);
18
+ const toggleColorMode = () => setIsDark(!isDark);
19
+ const colorModeLabel = isDark ? 'light' : 'dark';
20
+ const ColorModeIcon = isDark ? FaSun : FaMoon;
21
+ // Define colors for both light and dark modes
22
+ const bgColor = isDark ? '#1A202C' : 'white'; // gray-800 or white
23
+ const color = isDark ? 'white' : '#2d3748'; // white or gray-800
24
+ const grayColor = isDark ? '#A0AEC0' : '#4A5568'; // gray-400 or gray-600
25
+ const greenColor = '#38A169'; // green-500 in both modes
26
+ const passiveColor = isDark ? '#4A5568' : '#E2E8F0'; // gray-600 or gray-200
27
+ const borderColor = isDark ? '#4A5568' : '#E2E8F0'; // gray-600 or gray-200
28
+ const checkBgColor = isDark ? '#1A202C' : '#CBD5E0'; // gray-800 or gray-300
29
+ const radioActiveBgColor = isDark ? 'rgb(0 31 71)' : '#EBF8FF'; // custom dark blue or blue-50
30
+ const checkInactiveColor = isDark ? 'rgba(255, 255, 255, 0.4)' : '#CBD5E0'; // whiteAlpha-400 or gray-300
31
+ const blueColor = '#2869E0'; // same in both modes
32
+ const yellowColor = '#F5BC00'; // same in both modes
33
+ const blackColor = '#000'; // same in both modes
34
+ const becomeHostColor = isDark ? '#4299E1' : '#9DECF9'; // blue-400 or cyan-200
35
+ const activeMenuBgColor = isDark ? '#2D3748' : '#EDF2F7'; // gray-700 or gray-100
36
+ const shadowColor = isDark ? 'rgba(205, 205, 162, 0.25) 0px 6px 12px -2px, rgba(255,255,255, 0.3) 0px 3px 7px -3px' : 'rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px';
37
+ const calendarAvailableColor = '#3e9f31'; // same in both modes
38
+ const calendarPartialColor = '#31679f'; // same in both modes
39
+ const calendarBlockColor = isDark ? '#2d3748' : '#e2e8f0'; // gray-800 or gray-300
40
+ const discountColor = '#3182CE'; // blue-500 in both modes
41
+ const cancelColor = '#E53E3E'; // red-500 in both modes
42
+ const errorColor = '#C53030'; // red-600 in both modes
43
+ // Tailwind-specific class helpers
44
+ const textColorClass = isDark ? 'text-white' : 'text-gray-800';
45
+ const borderColorClass = isDark ? 'border-gray-600' : 'border-gray-200';
46
+ const bgColorClass = isDark ? 'bg-gray-800' : 'bg-white';
47
+ const textColor = isDark ? 'white' : 'gray-800';
48
+ const shadowClass = isDark ? 'shadow-dark' : 'shadow-light';
49
+ return {
50
+ toggleColorMode,
51
+ colorModeLabel,
52
+ ColorModeIcon,
53
+ color,
54
+ bgColor,
55
+ blackColor,
56
+ borderColor,
57
+ checkBgColor,
58
+ radioActiveBgColor,
59
+ checkInactiveColor,
60
+ grayColor,
61
+ greenColor,
62
+ passiveColor,
63
+ blueColor,
64
+ yellowColor,
65
+ becomeHostColor,
66
+ activeMenuBgColor,
67
+ shadowColor,
68
+ calendarAvailableColor,
69
+ calendarPartialColor,
70
+ calendarBlockColor,
71
+ discountColor,
72
+ cancelColor,
73
+ errorColor,
74
+ isDark,
75
+ // Tailwind specific
76
+ textColor,
77
+ borderColorClass,
78
+ bgColorClass,
79
+ textColorClass,
80
+ shadowClass
81
+ };
82
+ };export{useTailwindTheme};//# sourceMappingURL=useTailwindTheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTailwindTheme.js","sources":["../../src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version": "10.0.9-alpha.26",
3
+ "version": "10.0.9-alpha.28",
4
4
  "description": "Sample core for higher packages to depend on",
5
5
  "license": "ISC",
6
6
  "author": "CDMBase LLC",
@@ -58,7 +58,7 @@
58
58
  }
59
59
  }
60
60
  },
61
- "gitHead": "e7dc256d48c03cb457c180d0313038e135134fd9",
61
+ "gitHead": "43d37ef5839d2a634209ed5bf9753c5f72ed8527",
62
62
  "typescript": {
63
63
  "definition": "lib/index.d.ts"
64
64
  }
@@ -1,77 +0,0 @@
1
- import * as H from 'history';
2
- import { RouterProps as BasicRouteProps } from 'react-router-dom';
3
- import * as React from 'react';
4
- export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
5
- to: H.Location;
6
- replace?: boolean;
7
- innerRef?: React.Ref<HTMLAnchorElement>;
8
- }
9
- export type MergerSettingsType<T> = Partial<T> & {
10
- primaryColor?: string;
11
- colorWeak?: boolean;
12
- };
13
- export interface MenuDataItem {
14
- /**
15
- * @name Submenu
16
- */
17
- children?: MenuDataItem[];
18
- /**
19
- * @name Hidden subtots in the menu
20
- */
21
- hideChildrenInMenu?: boolean;
22
- /**
23
- * @name Hide you and child nodes in the menu
24
- */
25
- hideInMenu?: boolean;
26
- /**
27
- * @name Icon
28
- */
29
- icon?: React.ReactNode;
30
- /**
31
- * @name Custom menu International KEY
32
- */
33
- locale?: string | false;
34
- /**
35
- * @name Name of the menu
36
- */
37
- name?: string;
38
- /**
39
- * @name Used to calibrate the selected value, the default is `path`
40
- */
41
- key?: string;
42
- /**
43
- * @name disable menu option
44
- */
45
- disabled?: boolean;
46
- /**
47
- * @name 路径
48
- */
49
- path?: string;
50
- /**
51
- * @name Custom parent node
52
- * @description When this node is selected, the node of ParentKeys will be selected.
53
- */
54
- parentKeys?: string[];
55
- /**
56
- * @name Hide yourself and upgrade the child node to your own
57
- */
58
- flatMenu?: boolean;
59
- [key: string]: any;
60
- }
61
- export interface Route extends MenuDataItem {
62
- routes?: Route[];
63
- }
64
- export type WithFalse<T> = T | false;
65
- export interface RouterTypes<P> extends Omit<BasicRouteProps, 'location'> {
66
- computedMatch?: any;
67
- route?: Route;
68
- location: BasicRouteProps['location'] | {
69
- pathname?: string;
70
- };
71
- }
72
- export interface MessageDescriptor {
73
- id: any;
74
- description?: string;
75
- defaultMessage?: string;
76
- }
77
- //# sourceMappingURL=typings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typings.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/typings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAC5E,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;CAC3C;AAED,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,GAAG,CAAC,E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