@rufous/ui 0.0.1

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 (101) hide show
  1. package/README.md +69 -0
  2. package/dist/Buttons/Button.cjs +42 -0
  3. package/dist/Buttons/Button.d.cjs +17 -0
  4. package/dist/Buttons/Button.d.cts +10 -0
  5. package/dist/Buttons/Button.d.d.cts +10 -0
  6. package/dist/Buttons/Button.d.d.ts +10 -0
  7. package/dist/Buttons/Button.d.js +0 -0
  8. package/dist/Buttons/Button.d.ts +10 -0
  9. package/dist/Buttons/Button.js +6 -0
  10. package/dist/CheckBoxes/CheckBox.cjs +62 -0
  11. package/dist/CheckBoxes/CheckBox.d.cjs +17 -0
  12. package/dist/CheckBoxes/CheckBox.d.cts +15 -0
  13. package/dist/CheckBoxes/CheckBox.d.d.cts +15 -0
  14. package/dist/CheckBoxes/CheckBox.d.d.ts +15 -0
  15. package/dist/CheckBoxes/CheckBox.d.js +0 -0
  16. package/dist/CheckBoxes/CheckBox.d.ts +15 -0
  17. package/dist/CheckBoxes/CheckBox.js +6 -0
  18. package/dist/Contexts/rufousThemeProvider.cjs +177 -0
  19. package/dist/Contexts/rufousThemeProvider.d.cjs +17 -0
  20. package/dist/Contexts/rufousThemeProvider.d.cts +28 -0
  21. package/dist/Contexts/rufousThemeProvider.d.d.cts +28 -0
  22. package/dist/Contexts/rufousThemeProvider.d.d.ts +28 -0
  23. package/dist/Contexts/rufousThemeProvider.d.js +0 -0
  24. package/dist/Contexts/rufousThemeProvider.d.ts +28 -0
  25. package/dist/Contexts/rufousThemeProvider.js +9 -0
  26. package/dist/TextFields/FloatingInput.cjs +65 -0
  27. package/dist/TextFields/FloatingInput.d.cjs +17 -0
  28. package/dist/TextFields/FloatingInput.d.cts +23 -0
  29. package/dist/TextFields/FloatingInput.d.d.cts +23 -0
  30. package/dist/TextFields/FloatingInput.d.d.ts +23 -0
  31. package/dist/TextFields/FloatingInput.d.js +0 -0
  32. package/dist/TextFields/FloatingInput.d.ts +23 -0
  33. package/dist/TextFields/FloatingInput.js +6 -0
  34. package/dist/chunk-2FHTGYR4.js +83 -0
  35. package/dist/chunk-3IBCGGN3.js +48 -0
  36. package/dist/chunk-5VDW4EZK.js +71 -0
  37. package/dist/chunk-6FEUS4CQ.js +41 -0
  38. package/dist/chunk-73G3VTVS.js +48 -0
  39. package/dist/chunk-ASP3DBRX.js +9 -0
  40. package/dist/chunk-AWA5Y5LH.js +32 -0
  41. package/dist/chunk-D7SFBVJY.js +155 -0
  42. package/dist/chunk-H372BAXA.js +42 -0
  43. package/dist/chunk-PULIGWAP.js +62 -0
  44. package/dist/chunk-QJPQC544.js +29 -0
  45. package/dist/chunk-QKDJLUKZ.js +29 -0
  46. package/dist/chunk-QZFGQ5JM.js +157 -0
  47. package/dist/chunk-WZAU77G7.js +55 -0
  48. package/dist/chunk-ZZ37BKUK.js +0 -0
  49. package/dist/icons/archivedIcon.cjs +77 -0
  50. package/dist/icons/archivedIcon.d.cts +8 -0
  51. package/dist/icons/archivedIcon.d.ts +8 -0
  52. package/dist/icons/archivedIcon.js +6 -0
  53. package/dist/icons/copyIcon.cjs +70 -0
  54. package/dist/icons/copyIcon.d.cts +8 -0
  55. package/dist/icons/copyIcon.d.ts +8 -0
  56. package/dist/icons/copyIcon.js +6 -0
  57. package/dist/icons/editIcon.cjs +71 -0
  58. package/dist/icons/editIcon.d.cts +8 -0
  59. package/dist/icons/editIcon.d.ts +8 -0
  60. package/dist/icons/editIcon.js +6 -0
  61. package/dist/icons/helpOutlinedIcon.cjs +91 -0
  62. package/dist/icons/helpOutlinedIcon.d.cts +8 -0
  63. package/dist/icons/helpOutlinedIcon.d.ts +8 -0
  64. package/dist/icons/helpOutlinedIcon.js +6 -0
  65. package/dist/icons/hierarchyIcon.cjs +84 -0
  66. package/dist/icons/hierarchyIcon.d.cts +8 -0
  67. package/dist/icons/hierarchyIcon.d.ts +8 -0
  68. package/dist/icons/hierarchyIcon.js +6 -0
  69. package/dist/icons/index.cjs +664 -0
  70. package/dist/icons/index.d.cts +10 -0
  71. package/dist/icons/index.d.ts +10 -0
  72. package/dist/icons/index.js +39 -0
  73. package/dist/icons/nineDotMenuIcon.cjs +184 -0
  74. package/dist/icons/nineDotMenuIcon.d.cts +8 -0
  75. package/dist/icons/nineDotMenuIcon.d.ts +8 -0
  76. package/dist/icons/nineDotMenuIcon.js +6 -0
  77. package/dist/icons/rufousLauncherBird.cjs +186 -0
  78. package/dist/icons/rufousLauncherBird.d.cts +8 -0
  79. package/dist/icons/rufousLauncherBird.d.ts +8 -0
  80. package/dist/icons/rufousLauncherBird.js +6 -0
  81. package/dist/icons/unArchivedIcon.cjs +77 -0
  82. package/dist/icons/unArchivedIcon.d.cts +8 -0
  83. package/dist/icons/unArchivedIcon.d.ts +8 -0
  84. package/dist/icons/unArchivedIcon.js +6 -0
  85. package/dist/icons/workItemIcon.cjs +58 -0
  86. package/dist/icons/workItemIcon.d.cts +8 -0
  87. package/dist/icons/workItemIcon.d.ts +8 -0
  88. package/dist/icons/workItemIcon.js +6 -0
  89. package/dist/main.cjs +874 -0
  90. package/dist/main.css +244 -0
  91. package/dist/main.d.cts +15 -0
  92. package/dist/main.d.ts +15 -0
  93. package/dist/main.js +61 -0
  94. package/dist/style.css +244 -0
  95. package/dist/style.d.cts +2 -0
  96. package/dist/style.d.ts +2 -0
  97. package/dist/utils/constants.cjs +106 -0
  98. package/dist/utils/constants.d.cts +80 -0
  99. package/dist/utils/constants.d.ts +80 -0
  100. package/dist/utils/constants.js +6 -0
  101. package/package.json +58 -0
package/README.md ADDED
@@ -0,0 +1,69 @@
1
+ # React + TypeScript + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+
10
+ ## Expanding the ESLint configuration
11
+
12
+ If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
13
+
14
+ ```js
15
+ export default tseslint.config([
16
+ globalIgnores(['dist']),
17
+ {
18
+ files: ['**/*.{ts,tsx}'],
19
+ extends: [
20
+ // Other configs...
21
+
22
+ // Remove tseslint.configs.recommended and replace with this
23
+ ...tseslint.configs.recommendedTypeChecked,
24
+ // Alternatively, use this for stricter rules
25
+ ...tseslint.configs.strictTypeChecked,
26
+ // Optionally, add this for stylistic rules
27
+ ...tseslint.configs.stylisticTypeChecked,
28
+
29
+ // Other configs...
30
+ ],
31
+ languageOptions: {
32
+ parserOptions: {
33
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
34
+ tsconfigRootDir: import.meta.dirname,
35
+ },
36
+ // other options...
37
+ },
38
+ },
39
+ ])
40
+ ```
41
+
42
+ You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
43
+
44
+ ```js
45
+ // eslint.config.js
46
+ import reactX from 'eslint-plugin-react-x'
47
+ import reactDom from 'eslint-plugin-react-dom'
48
+
49
+ export default tseslint.config([
50
+ globalIgnores(['dist']),
51
+ {
52
+ files: ['**/*.{ts,tsx}'],
53
+ extends: [
54
+ // Other configs...
55
+ // Enable lint rules for React
56
+ reactX.configs['recommended-typescript'],
57
+ // Enable lint rules for React DOM
58
+ reactDom.configs.recommended,
59
+ ],
60
+ languageOptions: {
61
+ parserOptions: {
62
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
63
+ tsconfigRootDir: import.meta.dirname,
64
+ },
65
+ // other options...
66
+ },
67
+ },
68
+ ])
69
+ ```
@@ -0,0 +1,42 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // lib/Buttons/Button.jsx
30
+ var Button_exports = {};
31
+ __export(Button_exports, {
32
+ Button: () => Button
33
+ });
34
+ module.exports = __toCommonJS(Button_exports);
35
+ var import_react = __toESM(require("react"), 1);
36
+ var Button = ({ children, onClick, ...props }) => {
37
+ return /* @__PURE__ */ import_react.default.createElement("button", { className: "btn", onClick, ...props }, children);
38
+ };
39
+ // Annotate the CommonJS export names for ESM import in node:
40
+ 0 && (module.exports = {
41
+ Button
42
+ });
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // lib/Buttons/Button.d.ts
16
+ var Button_d_exports = {};
17
+ module.exports = __toCommonJS(Button_d_exports);
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+
3
+ interface ButtonProps {
4
+ children: React.ReactNode;
5
+ onClick?: () => void;
6
+ }
7
+
8
+ declare const Button: React.FC<ButtonProps>;
9
+
10
+ export { Button, type ButtonProps };
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+
3
+ interface ButtonProps {
4
+ children: React.ReactNode;
5
+ onClick?: () => void;
6
+ }
7
+
8
+ declare const Button: React.FC<ButtonProps>;
9
+
10
+ export { Button, type ButtonProps };
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+
3
+ interface ButtonProps {
4
+ children: React.ReactNode;
5
+ onClick?: () => void;
6
+ }
7
+
8
+ declare const Button: React.FC<ButtonProps>;
9
+
10
+ export { Button, type ButtonProps };
File without changes
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+
3
+ interface ButtonProps {
4
+ children: React.ReactNode;
5
+ onClick?: () => void;
6
+ }
7
+
8
+ declare const Button: React.FC<ButtonProps>;
9
+
10
+ export { Button, type ButtonProps };
@@ -0,0 +1,6 @@
1
+ import {
2
+ Button
3
+ } from "../chunk-ASP3DBRX.js";
4
+ export {
5
+ Button
6
+ };
@@ -0,0 +1,62 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // lib/CheckBoxes/CheckBox.jsx
30
+ var CheckBox_exports = {};
31
+ __export(CheckBox_exports, {
32
+ Checkbox: () => Checkbox
33
+ });
34
+ module.exports = __toCommonJS(CheckBox_exports);
35
+ var import_react = __toESM(require("react"), 1);
36
+ var Checkbox = ({
37
+ id,
38
+ label,
39
+ checked,
40
+ onChange,
41
+ disabled = false,
42
+ className = "",
43
+ style
44
+ }) => {
45
+ const handleChange = (e) => {
46
+ onChange(e.target.checked);
47
+ };
48
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "checkbox-wrapper-13" }, /* @__PURE__ */ import_react.default.createElement("label", { className: `${className}`, style }, /* @__PURE__ */ import_react.default.createElement(
49
+ "input",
50
+ {
51
+ id,
52
+ type: "checkbox",
53
+ checked,
54
+ onChange: handleChange,
55
+ disabled
56
+ }
57
+ ), label && /* @__PURE__ */ import_react.default.createElement("span", { className: "checkbox-label" }, label)));
58
+ };
59
+ // Annotate the CommonJS export names for ESM import in node:
60
+ 0 && (module.exports = {
61
+ Checkbox
62
+ });
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // lib/CheckBoxes/CheckBox.d.ts
16
+ var CheckBox_d_exports = {};
17
+ module.exports = __toCommonJS(CheckBox_d_exports);
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+
3
+ interface CheckboxProps {
4
+ id?: string;
5
+ label?: string;
6
+ checked: boolean;
7
+ onChange: (checked: boolean) => void;
8
+ disabled?: boolean;
9
+ className?: string;
10
+ style?: React.CSSProperties;
11
+ }
12
+
13
+ declare const Checkbox: React.FC<CheckboxProps>;
14
+
15
+ export { Checkbox, type CheckboxProps };
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+
3
+ interface CheckboxProps {
4
+ id?: string;
5
+ label?: string;
6
+ checked: boolean;
7
+ onChange: (checked: boolean) => void;
8
+ disabled?: boolean;
9
+ className?: string;
10
+ style?: React.CSSProperties;
11
+ }
12
+
13
+ declare const Checkbox: React.FC<CheckboxProps>;
14
+
15
+ export { Checkbox, type CheckboxProps };
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+
3
+ interface CheckboxProps {
4
+ id?: string;
5
+ label?: string;
6
+ checked: boolean;
7
+ onChange: (checked: boolean) => void;
8
+ disabled?: boolean;
9
+ className?: string;
10
+ style?: React.CSSProperties;
11
+ }
12
+
13
+ declare const Checkbox: React.FC<CheckboxProps>;
14
+
15
+ export { Checkbox, type CheckboxProps };
File without changes
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+
3
+ interface CheckboxProps {
4
+ id?: string;
5
+ label?: string;
6
+ checked: boolean;
7
+ onChange: (checked: boolean) => void;
8
+ disabled?: boolean;
9
+ className?: string;
10
+ style?: React.CSSProperties;
11
+ }
12
+
13
+ declare const Checkbox: React.FC<CheckboxProps>;
14
+
15
+ export { Checkbox, type CheckboxProps };
@@ -0,0 +1,6 @@
1
+ import {
2
+ Checkbox
3
+ } from "../chunk-QKDJLUKZ.js";
4
+ export {
5
+ Checkbox
6
+ };
@@ -0,0 +1,177 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // lib/Contexts/rufousThemeProvider.jsx
30
+ var rufousThemeProvider_exports = {};
31
+ __export(rufousThemeProvider_exports, {
32
+ RufousThemeProvider: () => RufousThemeProvider,
33
+ useRufousTheme: () => useRufousTheme
34
+ });
35
+ module.exports = __toCommonJS(rufousThemeProvider_exports);
36
+ var import_react = __toESM(require("react"), 1);
37
+
38
+ // lib/utils/constants.ts
39
+ var APP_THEMES = {
40
+ default: {
41
+ name: "Default",
42
+ primaryColor: "#707070",
43
+ secondaryColor: "#e0e0e0",
44
+ backgroundColor: "#f5f5f5",
45
+ surfaceColor: "#ffffff",
46
+ iconColor: "#707070",
47
+ textColor: "#2d2d2d",
48
+ textSecondaryColor: "#6f6f6f",
49
+ borderColor: "#dcdcdc",
50
+ hoverColor: "#d4d4d4",
51
+ activeColor: "#5a5a5a",
52
+ button: {
53
+ background: "#707070",
54
+ text: "#ffffff",
55
+ hoverBackground: "#5f5f5f",
56
+ disabledBackground: "#cfcfcf"
57
+ },
58
+ input: {
59
+ background: "#ffffff",
60
+ text: "#2d2d2d",
61
+ border: "#ccc",
62
+ placeholder: "#999",
63
+ focusBorder: "#707070"
64
+ },
65
+ card: {
66
+ background: "#ffffff",
67
+ shadow: "0 1px 3px rgba(0,0,0,0.1)"
68
+ },
69
+ sidebar: {
70
+ background: "#e8e8e8",
71
+ text: "#2d2d2d",
72
+ hover: "#dcdcdc"
73
+ },
74
+ success: "#4CAF50",
75
+ warning: "#FFC107",
76
+ error: "#F44336"
77
+ },
78
+ rufous: {
79
+ name: "Rufous",
80
+ primaryColor: "#a81c08",
81
+ secondaryColor: "#f7d4cc",
82
+ backgroundColor: "#fff8f7",
83
+ surfaceColor: "#fff",
84
+ iconColor: "#a81c08",
85
+ textColor: "#2d2d2d",
86
+ textSecondaryColor: "#6f6f6f",
87
+ borderColor: "#e5e5e5",
88
+ hoverColor: "#f3c2b9",
89
+ activeColor: "#c01708",
90
+ button: {
91
+ background: "#a81c08",
92
+ text: "#ffffff",
93
+ hoverBackground: "#8f1907",
94
+ disabledBackground: "#f4cccc"
95
+ },
96
+ input: {
97
+ background: "#ffffff",
98
+ text: "#2d2d2d",
99
+ border: "#ccc",
100
+ placeholder: "#999",
101
+ focusBorder: "#a81c08"
102
+ },
103
+ card: {
104
+ background: "#ffffff",
105
+ shadow: "0 1px 3px rgba(0,0,0,0.1)"
106
+ },
107
+ sidebar: {
108
+ background: "#fff0ed",
109
+ text: "#2d2d2d",
110
+ hover: "#f5e0dc"
111
+ },
112
+ success: "#4CAF50",
113
+ warning: "#FFC107",
114
+ error: "#F44336"
115
+ }
116
+ };
117
+
118
+ // lib/Contexts/rufousThemeProvider.jsx
119
+ var RufousThemeContext = (0, import_react.createContext)(null);
120
+ var RufousThemeProvider = ({ children }) => {
121
+ const [committedThemeKey, setCommittedThemeKey] = (0, import_react.useState)("default");
122
+ const [previewThemeKey, setPreviewThemeKey] = (0, import_react.useState)("default");
123
+ const [settings, setSettings] = (0, import_react.useState)(null);
124
+ const getGeneralSettings = async () => {
125
+ try {
126
+ const theme = localStorage.getItem("theme") || "default";
127
+ setCommittedThemeKey(theme);
128
+ setPreviewThemeKey(theme);
129
+ } catch (err) {
130
+ console.error("Error fetching general settings:", err);
131
+ }
132
+ };
133
+ (0, import_react.useEffect)(() => {
134
+ getGeneralSettings();
135
+ }, []);
136
+ const fullTheme = (0, import_react.useMemo)(() => {
137
+ return {
138
+ themeKey: previewThemeKey || settings.theme,
139
+ customStyles: APP_THEMES[previewThemeKey || settings.theme]
140
+ };
141
+ }, [previewThemeKey, settings]);
142
+ const previewTheme = (key) => setPreviewThemeKey(key);
143
+ const saveTheme = (inputKey) => {
144
+ const key = previewThemeKey || settings.theme || inputKey;
145
+ localStorage.setItem("theme", key);
146
+ setCommittedThemeKey(key);
147
+ };
148
+ const cancelTheme = () => setPreviewThemeKey(committedThemeKey);
149
+ return /* @__PURE__ */ import_react.default.createElement(
150
+ RufousThemeContext.Provider,
151
+ {
152
+ value: {
153
+ theme: fullTheme,
154
+ previewTheme,
155
+ saveTheme,
156
+ cancelTheme,
157
+ currentThemeKey: previewThemeKey,
158
+ committedThemeKey,
159
+ settings,
160
+ updateSettings: (v) => setSettings(v)
161
+ }
162
+ },
163
+ /* @__PURE__ */ import_react.default.createElement(
164
+ "div",
165
+ {
166
+ className: `theme-${previewThemeKey || committedThemeKey || "default"}`
167
+ },
168
+ children
169
+ )
170
+ );
171
+ };
172
+ var useRufousTheme = () => (0, import_react.useContext)(RufousThemeContext);
173
+ // Annotate the CommonJS export names for ESM import in node:
174
+ 0 && (module.exports = {
175
+ RufousThemeProvider,
176
+ useRufousTheme
177
+ });
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // lib/Contexts/rufousThemeProvider.d.ts
16
+ var rufousThemeProvider_d_exports = {};
17
+ module.exports = __toCommonJS(rufousThemeProvider_d_exports);
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ // customThemeProvider.d.ts
4
+
5
+
6
+
7
+ type Theme = {
8
+ themeKey: string;
9
+ customStyles: any; // Replace `any` with a proper type if you have a defined theme structure
10
+ };
11
+
12
+ type RufousThemeContextType = {
13
+ theme: Theme;
14
+ previewTheme: (key: string) => void;
15
+ saveTheme: () => void;
16
+ cancelTheme: () => void;
17
+ currentThemeKey: string;
18
+ committedThemeKey: string;
19
+ updateSettings: () => void;
20
+ };
21
+
22
+ declare const RufousThemeProvider: React.FC<{
23
+ children: ReactNode;
24
+ }>;
25
+
26
+ declare const useRufousTheme: () => RufousThemeContextType;
27
+
28
+ export { RufousThemeProvider, useRufousTheme };
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ // customThemeProvider.d.ts
4
+
5
+
6
+
7
+ type Theme = {
8
+ themeKey: string;
9
+ customStyles: any; // Replace `any` with a proper type if you have a defined theme structure
10
+ };
11
+
12
+ type RufousThemeContextType = {
13
+ theme: Theme;
14
+ previewTheme: (key: string) => void;
15
+ saveTheme: () => void;
16
+ cancelTheme: () => void;
17
+ currentThemeKey: string;
18
+ committedThemeKey: string;
19
+ updateSettings: () => void;
20
+ };
21
+
22
+ declare const RufousThemeProvider: React.FC<{
23
+ children: ReactNode;
24
+ }>;
25
+
26
+ declare const useRufousTheme: () => RufousThemeContextType;
27
+
28
+ export { RufousThemeProvider, useRufousTheme };
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ // customThemeProvider.d.ts
4
+
5
+
6
+
7
+ type Theme = {
8
+ themeKey: string;
9
+ customStyles: any; // Replace `any` with a proper type if you have a defined theme structure
10
+ };
11
+
12
+ type RufousThemeContextType = {
13
+ theme: Theme;
14
+ previewTheme: (key: string) => void;
15
+ saveTheme: () => void;
16
+ cancelTheme: () => void;
17
+ currentThemeKey: string;
18
+ committedThemeKey: string;
19
+ updateSettings: () => void;
20
+ };
21
+
22
+ declare const RufousThemeProvider: React.FC<{
23
+ children: ReactNode;
24
+ }>;
25
+
26
+ declare const useRufousTheme: () => RufousThemeContextType;
27
+
28
+ export { RufousThemeProvider, useRufousTheme };
File without changes
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ // customThemeProvider.d.ts
4
+
5
+
6
+
7
+ type Theme = {
8
+ themeKey: string;
9
+ customStyles: any; // Replace `any` with a proper type if you have a defined theme structure
10
+ };
11
+
12
+ type RufousThemeContextType = {
13
+ theme: Theme;
14
+ previewTheme: (key: string) => void;
15
+ saveTheme: () => void;
16
+ cancelTheme: () => void;
17
+ currentThemeKey: string;
18
+ committedThemeKey: string;
19
+ updateSettings: () => void;
20
+ };
21
+
22
+ declare const RufousThemeProvider: React.FC<{
23
+ children: ReactNode;
24
+ }>;
25
+
26
+ declare const useRufousTheme: () => RufousThemeContextType;
27
+
28
+ export { RufousThemeProvider, useRufousTheme };
@@ -0,0 +1,9 @@
1
+ import {
2
+ RufousThemeProvider,
3
+ useRufousTheme
4
+ } from "../chunk-5VDW4EZK.js";
5
+ import "../chunk-2FHTGYR4.js";
6
+ export {
7
+ RufousThemeProvider,
8
+ useRufousTheme
9
+ };