@beweco/aurora-ui 0.0.2 → 0.0.4

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 (115) hide show
  1. package/README.md +8 -8
  2. package/dist/index.cjs.js +291 -0
  3. package/dist/index.esm.js +282 -0
  4. package/dist/types/components/Menu/Menu.d.ts +14 -0
  5. package/dist/types/components/Menu/Menu.d.ts.map +1 -0
  6. package/dist/types/components/Menu/Menu.types.d.ts +29 -0
  7. package/dist/types/components/Menu/Menu.types.d.ts.map +1 -0
  8. package/dist/types/components/Menu/index.d.ts +2 -0
  9. package/dist/types/components/Menu/index.d.ts.map +1 -0
  10. package/dist/types/components/Menu/sidebar-items.d.ts +3 -0
  11. package/dist/types/components/Menu/sidebar-items.d.ts.map +1 -0
  12. package/dist/{esm → types}/components/button/Button.d.ts.map +1 -1
  13. package/dist/types/components/icon/Icon.d.ts +10 -0
  14. package/dist/types/components/icon/Icon.d.ts.map +1 -0
  15. package/dist/types/components/icon/Icon.types.d.ts +25 -0
  16. package/dist/types/components/icon/Icon.types.d.ts.map +1 -0
  17. package/dist/types/components/index.d.ts +4 -0
  18. package/dist/types/components/index.d.ts.map +1 -0
  19. package/dist/types/components/menu-nav-list/MenuNavList.d.ts +5 -0
  20. package/dist/types/components/menu-nav-list/MenuNavList.d.ts.map +1 -0
  21. package/dist/types/components/menu-nav-list/MenuNavList.styles.d.ts +19 -0
  22. package/dist/types/components/menu-nav-list/MenuNavList.styles.d.ts.map +1 -0
  23. package/dist/types/components/menu-nav-list/MenuNavList.types.d.ts +27 -0
  24. package/dist/types/components/menu-nav-list/MenuNavList.types.d.ts.map +1 -0
  25. package/dist/types/components/menuprueba/MenuPrueba.d.ts +4 -0
  26. package/dist/types/components/menuprueba/MenuPrueba.d.ts.map +1 -0
  27. package/dist/types/components/menuprueba/MenuPrueba.types.d.ts +23 -0
  28. package/dist/types/components/menuprueba/MenuPrueba.types.d.ts.map +1 -0
  29. package/dist/types/components/menuprueba/index.d.ts +3 -0
  30. package/dist/types/components/menuprueba/index.d.ts.map +1 -0
  31. package/dist/types/index.d.ts +7 -0
  32. package/dist/types/index.d.ts.map +1 -0
  33. package/package.json +22 -14
  34. package/dist/cjs/__rslib_css__/styles/globals.cjs +0 -1
  35. package/dist/cjs/components/button/Button.cjs +0 -1
  36. package/dist/cjs/components/button/Button.d.ts.map +0 -1
  37. package/dist/cjs/components/button/index.cjs +0 -1
  38. package/dist/cjs/components/icon/Icon.cjs +0 -1
  39. package/dist/cjs/components/icon/Icon.d.ts +0 -9
  40. package/dist/cjs/components/icon/Icon.d.ts.map +0 -1
  41. package/dist/cjs/components/icon/Icon.types.d.ts +0 -13
  42. package/dist/cjs/components/icon/Icon.types.d.ts.map +0 -1
  43. package/dist/cjs/components/icon/index.cjs +0 -1
  44. package/dist/cjs/contexts/theme/index.cjs +0 -1
  45. package/dist/cjs/contexts/theme/theme-context.cjs +0 -1
  46. package/dist/cjs/contexts/theme/theme-context.type.cjs +0 -1
  47. package/dist/cjs/index.cjs +0 -1
  48. package/dist/cjs/index.d.ts +0 -6
  49. package/dist/cjs/index.d.ts.map +0 -1
  50. package/dist/cjs/providers/theme/index.cjs +0 -1
  51. package/dist/cjs/providers/theme/theme-provider.cjs +0 -1
  52. package/dist/cjs/styles/colors.default.cjs +0 -1
  53. package/dist/esm/__rslib_css__/styles/globals.js +0 -0
  54. package/dist/esm/components/button/Button.d.ts +0 -8
  55. package/dist/esm/components/button/Button.js +0 -23
  56. package/dist/esm/components/button/Button.types.d.ts +0 -23
  57. package/dist/esm/components/button/Button.types.d.ts.map +0 -1
  58. package/dist/esm/components/button/Button.types.js +0 -0
  59. package/dist/esm/components/button/index.d.ts +0 -3
  60. package/dist/esm/components/button/index.d.ts.map +0 -1
  61. package/dist/esm/components/button/index.js +0 -3
  62. package/dist/esm/components/icon/Icon.d.ts +0 -9
  63. package/dist/esm/components/icon/Icon.d.ts.map +0 -1
  64. package/dist/esm/components/icon/Icon.js +0 -22
  65. package/dist/esm/components/icon/Icon.types.d.ts +0 -13
  66. package/dist/esm/components/icon/Icon.types.d.ts.map +0 -1
  67. package/dist/esm/components/icon/Icon.types.js +0 -0
  68. package/dist/esm/components/icon/index.d.ts +0 -4
  69. package/dist/esm/components/icon/index.d.ts.map +0 -1
  70. package/dist/esm/components/icon/index.js +0 -4
  71. package/dist/esm/contexts/theme/index.d.ts +0 -3
  72. package/dist/esm/contexts/theme/index.d.ts.map +0 -1
  73. package/dist/esm/contexts/theme/index.js +0 -1
  74. package/dist/esm/contexts/theme/theme-context.d.ts +0 -4
  75. package/dist/esm/contexts/theme/theme-context.d.ts.map +0 -1
  76. package/dist/esm/contexts/theme/theme-context.js +0 -11
  77. package/dist/esm/contexts/theme/theme-context.type.d.ts +0 -6
  78. package/dist/esm/contexts/theme/theme-context.type.d.ts.map +0 -1
  79. package/dist/esm/contexts/theme/theme-context.type.js +0 -0
  80. package/dist/esm/index.d.ts +0 -6
  81. package/dist/esm/index.d.ts.map +0 -1
  82. package/dist/esm/index.js +0 -7
  83. package/dist/esm/providers/theme/index.d.ts +0 -3
  84. package/dist/esm/providers/theme/index.d.ts.map +0 -1
  85. package/dist/esm/providers/theme/index.js +0 -2
  86. package/dist/esm/providers/theme/theme-provider.d.ts +0 -4
  87. package/dist/esm/providers/theme/theme-provider.d.ts.map +0 -1
  88. package/dist/esm/providers/theme/theme-provider.js +0 -17
  89. package/dist/esm/providers/theme/theme-provider.types.d.ts +0 -5
  90. package/dist/esm/providers/theme/theme-provider.types.d.ts.map +0 -1
  91. package/dist/esm/providers/theme/theme-provider.types.js +0 -0
  92. package/dist/esm/styles/colors.default.d.ts +0 -179
  93. package/dist/esm/styles/colors.default.d.ts.map +0 -1
  94. package/dist/esm/styles/colors.default.js +0 -179
  95. /package/dist/{cjs → types}/components/button/Button.d.ts +0 -0
  96. /package/dist/{cjs → types}/components/button/Button.types.d.ts +0 -0
  97. /package/dist/{cjs → types}/components/button/Button.types.d.ts.map +0 -0
  98. /package/dist/{cjs → types}/components/button/index.d.ts +0 -0
  99. /package/dist/{cjs → types}/components/button/index.d.ts.map +0 -0
  100. /package/dist/{cjs → types}/components/icon/index.d.ts +0 -0
  101. /package/dist/{cjs → types}/components/icon/index.d.ts.map +0 -0
  102. /package/dist/{cjs → types}/contexts/theme/index.d.ts +0 -0
  103. /package/dist/{cjs → types}/contexts/theme/index.d.ts.map +0 -0
  104. /package/dist/{cjs → types}/contexts/theme/theme-context.d.ts +0 -0
  105. /package/dist/{cjs → types}/contexts/theme/theme-context.d.ts.map +0 -0
  106. /package/dist/{cjs → types}/contexts/theme/theme-context.type.d.ts +0 -0
  107. /package/dist/{cjs → types}/contexts/theme/theme-context.type.d.ts.map +0 -0
  108. /package/dist/{cjs → types}/providers/theme/index.d.ts +0 -0
  109. /package/dist/{cjs → types}/providers/theme/index.d.ts.map +0 -0
  110. /package/dist/{cjs → types}/providers/theme/theme-provider.d.ts +0 -0
  111. /package/dist/{cjs → types}/providers/theme/theme-provider.d.ts.map +0 -0
  112. /package/dist/{cjs → types}/providers/theme/theme-provider.types.d.ts +0 -0
  113. /package/dist/{cjs → types}/providers/theme/theme-provider.types.d.ts.map +0 -0
  114. /package/dist/{cjs → types}/styles/colors.default.d.ts +0 -0
  115. /package/dist/{cjs → types}/styles/colors.default.d.ts.map +0 -0
package/README.md CHANGED
@@ -1,15 +1,15 @@
1
- # @beweco/aura-ui
1
+ # @beweco/aurora-ui
2
2
 
3
- Bewe Aura UI Component Library - A modern, lightweight, and customizable React component library.
3
+ Bewe Aurora UI Component Library - A modern, lightweight, and customizable React component library.
4
4
 
5
5
  ## Overview
6
6
 
7
- @beweco/aura-ui is a React component library designed to provide a consistent and beautiful user interface for Bewe applications. Built with TypeScript for type safety and modern development practices, it uses Storybook as its primary development and visualization environment.
7
+ @beweco/aurora-ui is a React component library designed to provide a consistent and beautiful user interface for Bewe applications. Built with TypeScript for type safety and modern development practices, it uses Storybook as its primary development and visualization environment.
8
8
 
9
9
  ## Installation
10
10
 
11
11
  ```bash
12
- bun install @beweco/aura-ui
12
+ bun install @beweco/aurora-ui
13
13
  ```
14
14
 
15
15
  ## Quick Start
@@ -17,14 +17,14 @@ bun install @beweco/aura-ui
17
17
  To use the components, you need to wrap your application with the `ThemeProvider` .
18
18
 
19
19
  ```tsx
20
- import { ThemeProvider } from '@beweco/aura-ui';
21
- import { Button } from '@beweco/aura-ui';
20
+ import { ThemeProvider } from '@beweco/aurora-ui';
21
+ import { Button } from '@beweco/aurora-ui';
22
22
 
23
23
  function App() {
24
24
  return (
25
25
  <ThemeProvider>
26
26
  <Button color="primary">
27
- Hello Aura UI!
27
+ Hello Aurora UI!
28
28
  </Button>
29
29
  </ThemeProvider>
30
30
  );
@@ -113,7 +113,7 @@ For testing purposes, you can publish a beta version:
113
113
 
114
114
  Users can then install the beta version using:
115
115
  ```bash
116
- bun install @beweco/aura-ui@beta
116
+ bun install @beweco/aurora-ui@beta
117
117
  ```
118
118
 
119
119
  ## Contributing
@@ -0,0 +1,291 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var react$1 = require('@heroui/react');
5
+ var react = require('react');
6
+ var react$2 = require('@iconify/react');
7
+
8
+ /******************************************************************************
9
+ Copyright (c) Microsoft Corporation.
10
+
11
+ Permission to use, copy, modify, and/or distribute this software for any
12
+ purpose with or without fee is hereby granted.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
15
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
16
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
17
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
18
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
19
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20
+ PERFORMANCE OF THIS SOFTWARE.
21
+ ***************************************************************************** */
22
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
23
+
24
+
25
+ var __assign = function() {
26
+ __assign = Object.assign || function __assign(t) {
27
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
28
+ s = arguments[i];
29
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
30
+ }
31
+ return t;
32
+ };
33
+ return __assign.apply(this, arguments);
34
+ };
35
+
36
+ function __rest(s, e) {
37
+ var t = {};
38
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
39
+ t[p] = s[p];
40
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
41
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
42
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
43
+ t[p[i]] = s[p[i]];
44
+ }
45
+ return t;
46
+ }
47
+
48
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
49
+ var e = new Error(message);
50
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
51
+ };
52
+
53
+ /**
54
+ * Button component with HeroUI styling
55
+ * Provides a consistent interface for button interactions across the application
56
+ */
57
+ var ButtonPrueba = function (_a) {
58
+ var children = _a.children, startIcon = _a.startIcon, endIcon = _a.endIcon, _b = _a.loading, loading = _b === void 0 ? false : _b, disabled = _a.disabled, _c = _a.variant, variant = _c === void 0 ? "solid" : _c, _d = _a.color, color = _d === void 0 ? "primary" : _d, _e = _a.size, size = _e === void 0 ? "md" : _e, radius = _a.radius, _f = _a.fullWidth, fullWidth = _f === void 0 ? false : _f, _g = _a.className, className = _g === void 0 ? "" : _g, props = __rest(_a, ["children", "startIcon", "endIcon", "loading", "disabled", "variant", "color", "size", "radius", "fullWidth", "className"]);
59
+ react.useEffect(function () {
60
+ // console.log("estamos dentro del botnon");
61
+ }, []);
62
+ return (jsxRuntime.jsx(react$1.Button, __assign({ variant: variant, color: color, size: size, radius: radius, fullWidth: fullWidth, isLoading: loading, isDisabled: disabled, startContent: startIcon, endContent: endIcon, className: className }, props, { children: children })));
63
+ };
64
+
65
+ var sizeMap = {
66
+ sm: "16px",
67
+ md: "20px",
68
+ lg: "24px",
69
+ xl: "32px",
70
+ };
71
+ var IconComponent = function (_a) {
72
+ var _b;
73
+ var icon = _a.icon, _c = _a.size, size = _c === void 0 ? "md" : _c, className = _a.className, style = _a.style, color = _a.color, hFlip = _a.hFlip, vFlip = _a.vFlip, flip = _a.flip, rotate = _a.rotate, nativeProps = __rest(_a, ["icon", "size", "className", "style", "color", "hFlip", "vFlip", "flip", "rotate"]);
74
+ var iconSize = (_b = sizeMap[size]) !== null && _b !== void 0 ? _b : sizeMap.md;
75
+ return (jsxRuntime.jsx("span", __assign({}, nativeProps, { children: jsxRuntime.jsx(react$2.Icon, { icon: icon, width: iconSize, height: iconSize, className: className, style: style, color: color, hFlip: hFlip, vFlip: vFlip, flip: flip, rotate: rotate }) })));
76
+ };
77
+
78
+ var MenuPrueba = function (_a) {
79
+ var logo = _a.logo, company = _a.company, user = _a.user, items = _a.items, _b = _a.collapsed, collapsed = _b === void 0 ? false : _b, onCollapse = _a.onCollapse;
80
+ return (jsxRuntime.jsxs("aside", { className: "h-screen flex flex-col bg-gray-900 border-r border-gray-800 transition-all duration-300 ".concat(collapsed ? "w-20" : "w-64"), style: { minWidth: collapsed ? 80 : 256, maxWidth: collapsed ? 80 : 256 }, children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-3 px-6 py-5 border-b border-gray-800", children: [jsxRuntime.jsx("img", { src: logo, alt: company, className: "rounded-full bg-white", style: { width: 40, height: 40 } }), !collapsed && (jsxRuntime.jsx("span", { className: "font-bold uppercase text-base tracking-widest text-white", children: company })), jsxRuntime.jsx("button", { type: "button", className: "ml-auto text-white opacity-60 hover:opacity-100", onClick: onCollapse, "aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar", children: collapsed ? "»" : "«" })] }), jsxRuntime.jsxs("div", { className: "flex items-center gap-3 px-6 py-4 border-b border-gray-800", children: [jsxRuntime.jsx("img", { src: user.avatar, alt: user.name, className: "rounded-full", style: { width: 36, height: 36 } }), !collapsed && (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { className: "font-semibold text-white text-sm", children: user.name }), jsxRuntime.jsx("div", { className: "text-xs text-gray-400", children: user.email })] }))] }), jsxRuntime.jsx("nav", { className: "flex-1 mt-4", children: jsxRuntime.jsx("ul", { className: "flex flex-col gap-1", children: items.map(function (item, _idx) { return (jsxRuntime.jsx("li", { className: "list-none", children: jsxRuntime.jsxs("button", { type: "button", className: "flex items-center w-full gap-3 px-6 py-3 rounded-lg cursor-pointer transition-colors ".concat(item.selected
81
+ ? "bg-gray-800 text-white font-semibold"
82
+ : "hover:bg-gray-800 text-gray-300"), onClick: item.onClick, children: [jsxRuntime.jsx("span", { className: "text-lg", children: item.icon }), !collapsed && jsxRuntime.jsx("span", { className: "text-base", children: item.label })] }) }, item.label)); }) }) }), jsxRuntime.jsx("div", { className: "px-6 py-4 text-xs text-gray-500 border-t border-gray-800", children: !collapsed && "© BeweOS" })] }));
83
+ };
84
+ MenuPrueba.displayName = "MenuPrueba";
85
+
86
+ var themeColors = {
87
+ "purple-light": {
88
+ extend: "light",
89
+ colors: {
90
+ background: "#ffffff",
91
+ foreground: "#111827",
92
+ primary: {
93
+ 50: "#eee4f8",
94
+ 100: "#d7bfef",
95
+ 200: "#bf99e5",
96
+ 300: "#a773db",
97
+ 400: "#904ed2",
98
+ 500: "#7828c8",
99
+ 600: "#6321a5",
100
+ 700: "#4e1a82",
101
+ 800: "#39135f",
102
+ 900: "#240c3c",
103
+ DEFAULT: "#7828c8",
104
+ foreground: "#ffffff",
105
+ },
106
+ focus: "#904ed2",
107
+ },
108
+ },
109
+ "purple-dark": {
110
+ extend: "dark",
111
+ colors: {
112
+ background: "#1A1023",
113
+ foreground: "#ffffff",
114
+ primary: {
115
+ 50: "#2c193f",
116
+ 100: "#462764",
117
+ 200: "#603689",
118
+ 300: "#7944ae",
119
+ 400: "#9353d3",
120
+ 500: "#a671db",
121
+ 600: "#b98fe2",
122
+ 700: "#ccadee",
123
+ 800: "#dfcbf2",
124
+ 900: "#f2eafa",
125
+ DEFAULT: "#9353d3",
126
+ foreground: "#ffffff",
127
+ },
128
+ focus: "#a671db",
129
+ },
130
+ },
131
+ "green-light": {
132
+ extend: "light",
133
+ colors: {
134
+ background: "#ffffff",
135
+ foreground: "#111827",
136
+ primary: {
137
+ 50: "#ecf9f0",
138
+ 100: "#d1f0dc",
139
+ 200: "#b6e7c7",
140
+ 300: "#9cdeb3",
141
+ 400: "#81d59e",
142
+ 500: "#66cc8a",
143
+ 600: "#54a872",
144
+ 700: "#42855a",
145
+ 800: "#306142",
146
+ 900: "#1f3d29",
147
+ DEFAULT: "#66cc8a",
148
+ foreground: "#000000",
149
+ },
150
+ focus: "#81d59e",
151
+ },
152
+ },
153
+ "green-dark": {
154
+ extend: "dark",
155
+ colors: {
156
+ background: "#0F1D15",
157
+ foreground: "#ffffff",
158
+ primary: {
159
+ 50: "#1f3d29",
160
+ 100: "#306142",
161
+ 200: "#42855a",
162
+ 300: "#54a872",
163
+ 400: "#66cc8a",
164
+ 500: "#81d59e",
165
+ 600: "#9cdeb3",
166
+ 700: "#b6e7c7",
167
+ 800: "#d1f0dc",
168
+ 900: "#ecf9f0",
169
+ DEFAULT: "#66cc8a",
170
+ foreground: "#000000",
171
+ },
172
+ focus: "#81d59e",
173
+ },
174
+ },
175
+ "blue-light": {
176
+ extend: "light",
177
+ colors: {
178
+ background: "#ffffff",
179
+ foreground: "#111827",
180
+ primary: {
181
+ 50: "#eff6ff",
182
+ 100: "#dbeafe",
183
+ 200: "#bfdbfe",
184
+ 300: "#93c5fd",
185
+ 400: "#60a5fa",
186
+ 500: "#3b82f6",
187
+ 600: "#2563eb",
188
+ 700: "#1d4ed8",
189
+ 800: "#1e40af",
190
+ 900: "#1e3a8a",
191
+ DEFAULT: "#3b82f6",
192
+ foreground: "#ffffff",
193
+ },
194
+ focus: "#60a5fa",
195
+ },
196
+ },
197
+ "blue-dark": {
198
+ extend: "dark",
199
+ colors: {
200
+ background: "#101d3a",
201
+ foreground: "#ffffff",
202
+ primary: {
203
+ 50: "#1e3a8a",
204
+ 100: "#1e40af",
205
+ 200: "#1d4ed8",
206
+ 300: "#2563eb",
207
+ 400: "#3b82f6",
208
+ 500: "#60a5fa",
209
+ 600: "#93c5fd",
210
+ 700: "#bfdbfe",
211
+ 800: "#dbeafe",
212
+ 900: "#eff6ff",
213
+ DEFAULT: "#3b82f6",
214
+ foreground: "#ffffff",
215
+ },
216
+ focus: "#60a5fa",
217
+ },
218
+ },
219
+ "yellow-light": {
220
+ extend: "light",
221
+ colors: {
222
+ background: "#ffffff",
223
+ foreground: "#111827",
224
+ primary: {
225
+ 50: "#fefce8",
226
+ 100: "#fef9c3",
227
+ 200: "#fef08a",
228
+ 300: "#fde047",
229
+ 400: "#facc15",
230
+ 500: "#eab308",
231
+ 600: "#ca8a04",
232
+ 700: "#a16207",
233
+ 800: "#854d0e",
234
+ 900: "#713f12",
235
+ DEFAULT: "#eab308",
236
+ foreground: "#111827",
237
+ },
238
+ focus: "#facc15",
239
+ },
240
+ },
241
+ "yellow-dark": {
242
+ extend: "dark",
243
+ colors: {
244
+ background: "#18181b",
245
+ foreground: "#ffffff",
246
+ primary: {
247
+ 50: "#713f12",
248
+ 100: "#854d0e",
249
+ 200: "#a16207",
250
+ 300: "#ca8a04",
251
+ 400: "#eab308",
252
+ 500: "#facc15",
253
+ 600: "#fde047",
254
+ 700: "#fef08a",
255
+ 800: "#fef9c3",
256
+ 900: "#fefce8",
257
+ DEFAULT: "#facc15",
258
+ foreground: "#18181b",
259
+ },
260
+ focus: "#eab308",
261
+ },
262
+ },
263
+ };
264
+
265
+ var ThemeContext = react.createContext({
266
+ theme: "light",
267
+ // biome-ignore lint/suspicious/noEmptyBlockStatements: <explanation>
268
+ setTheme: function () { },
269
+ });
270
+ var useThemeContext = function () {
271
+ var context = react.useContext(ThemeContext);
272
+ if (!context) {
273
+ throw new Error("useThemeContext debe ser usado dentro de un ThemeProvider");
274
+ }
275
+ return context;
276
+ };
277
+
278
+ var ThemeProvider = function (_a) {
279
+ var children = _a.children;
280
+ var _b = useThemeContext(), theme = _b.theme, setTheme = _b.setTheme;
281
+ return (jsxRuntime.jsx(ThemeContext.Provider, { value: { theme: theme, setTheme: setTheme }, children: jsxRuntime.jsx("main", { className: "".concat(theme, " bg-background text-foreground "), children: children }) }));
282
+ };
283
+
284
+ exports.ButtonPrueba = ButtonPrueba;
285
+ exports.IconComponent = IconComponent;
286
+ exports.MenuPrueba = MenuPrueba;
287
+ exports.ThemeContext = ThemeContext;
288
+ exports.ThemeProvider = ThemeProvider;
289
+ exports.sizeMap = sizeMap;
290
+ exports.themeColors = themeColors;
291
+ exports.useThemeContext = useThemeContext;
@@ -0,0 +1,282 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { Button } from '@heroui/react';
3
+ import { useEffect, createContext, useContext } from 'react';
4
+ import { Icon } from '@iconify/react';
5
+
6
+ /******************************************************************************
7
+ Copyright (c) Microsoft Corporation.
8
+
9
+ Permission to use, copy, modify, and/or distribute this software for any
10
+ purpose with or without fee is hereby granted.
11
+
12
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
13
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
14
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
15
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
16
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
17
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18
+ PERFORMANCE OF THIS SOFTWARE.
19
+ ***************************************************************************** */
20
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
21
+
22
+
23
+ var __assign = function() {
24
+ __assign = Object.assign || function __assign(t) {
25
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
26
+ s = arguments[i];
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
28
+ }
29
+ return t;
30
+ };
31
+ return __assign.apply(this, arguments);
32
+ };
33
+
34
+ function __rest(s, e) {
35
+ var t = {};
36
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
37
+ t[p] = s[p];
38
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
39
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
40
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
41
+ t[p[i]] = s[p[i]];
42
+ }
43
+ return t;
44
+ }
45
+
46
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
47
+ var e = new Error(message);
48
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
49
+ };
50
+
51
+ /**
52
+ * Button component with HeroUI styling
53
+ * Provides a consistent interface for button interactions across the application
54
+ */
55
+ var ButtonPrueba = function (_a) {
56
+ var children = _a.children, startIcon = _a.startIcon, endIcon = _a.endIcon, _b = _a.loading, loading = _b === void 0 ? false : _b, disabled = _a.disabled, _c = _a.variant, variant = _c === void 0 ? "solid" : _c, _d = _a.color, color = _d === void 0 ? "primary" : _d, _e = _a.size, size = _e === void 0 ? "md" : _e, radius = _a.radius, _f = _a.fullWidth, fullWidth = _f === void 0 ? false : _f, _g = _a.className, className = _g === void 0 ? "" : _g, props = __rest(_a, ["children", "startIcon", "endIcon", "loading", "disabled", "variant", "color", "size", "radius", "fullWidth", "className"]);
57
+ useEffect(function () {
58
+ // console.log("estamos dentro del botnon");
59
+ }, []);
60
+ return (jsx(Button, __assign({ variant: variant, color: color, size: size, radius: radius, fullWidth: fullWidth, isLoading: loading, isDisabled: disabled, startContent: startIcon, endContent: endIcon, className: className }, props, { children: children })));
61
+ };
62
+
63
+ var sizeMap = {
64
+ sm: "16px",
65
+ md: "20px",
66
+ lg: "24px",
67
+ xl: "32px",
68
+ };
69
+ var IconComponent = function (_a) {
70
+ var _b;
71
+ var icon = _a.icon, _c = _a.size, size = _c === void 0 ? "md" : _c, className = _a.className, style = _a.style, color = _a.color, hFlip = _a.hFlip, vFlip = _a.vFlip, flip = _a.flip, rotate = _a.rotate, nativeProps = __rest(_a, ["icon", "size", "className", "style", "color", "hFlip", "vFlip", "flip", "rotate"]);
72
+ var iconSize = (_b = sizeMap[size]) !== null && _b !== void 0 ? _b : sizeMap.md;
73
+ return (jsx("span", __assign({}, nativeProps, { children: jsx(Icon, { icon: icon, width: iconSize, height: iconSize, className: className, style: style, color: color, hFlip: hFlip, vFlip: vFlip, flip: flip, rotate: rotate }) })));
74
+ };
75
+
76
+ var MenuPrueba = function (_a) {
77
+ var logo = _a.logo, company = _a.company, user = _a.user, items = _a.items, _b = _a.collapsed, collapsed = _b === void 0 ? false : _b, onCollapse = _a.onCollapse;
78
+ return (jsxs("aside", { className: "h-screen flex flex-col bg-gray-900 border-r border-gray-800 transition-all duration-300 ".concat(collapsed ? "w-20" : "w-64"), style: { minWidth: collapsed ? 80 : 256, maxWidth: collapsed ? 80 : 256 }, children: [jsxs("div", { className: "flex items-center gap-3 px-6 py-5 border-b border-gray-800", children: [jsx("img", { src: logo, alt: company, className: "rounded-full bg-white", style: { width: 40, height: 40 } }), !collapsed && (jsx("span", { className: "font-bold uppercase text-base tracking-widest text-white", children: company })), jsx("button", { type: "button", className: "ml-auto text-white opacity-60 hover:opacity-100", onClick: onCollapse, "aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar", children: collapsed ? "»" : "«" })] }), jsxs("div", { className: "flex items-center gap-3 px-6 py-4 border-b border-gray-800", children: [jsx("img", { src: user.avatar, alt: user.name, className: "rounded-full", style: { width: 36, height: 36 } }), !collapsed && (jsxs("div", { children: [jsx("div", { className: "font-semibold text-white text-sm", children: user.name }), jsx("div", { className: "text-xs text-gray-400", children: user.email })] }))] }), jsx("nav", { className: "flex-1 mt-4", children: jsx("ul", { className: "flex flex-col gap-1", children: items.map(function (item, _idx) { return (jsx("li", { className: "list-none", children: jsxs("button", { type: "button", className: "flex items-center w-full gap-3 px-6 py-3 rounded-lg cursor-pointer transition-colors ".concat(item.selected
79
+ ? "bg-gray-800 text-white font-semibold"
80
+ : "hover:bg-gray-800 text-gray-300"), onClick: item.onClick, children: [jsx("span", { className: "text-lg", children: item.icon }), !collapsed && jsx("span", { className: "text-base", children: item.label })] }) }, item.label)); }) }) }), jsx("div", { className: "px-6 py-4 text-xs text-gray-500 border-t border-gray-800", children: !collapsed && "© BeweOS" })] }));
81
+ };
82
+ MenuPrueba.displayName = "MenuPrueba";
83
+
84
+ var themeColors = {
85
+ "purple-light": {
86
+ extend: "light",
87
+ colors: {
88
+ background: "#ffffff",
89
+ foreground: "#111827",
90
+ primary: {
91
+ 50: "#eee4f8",
92
+ 100: "#d7bfef",
93
+ 200: "#bf99e5",
94
+ 300: "#a773db",
95
+ 400: "#904ed2",
96
+ 500: "#7828c8",
97
+ 600: "#6321a5",
98
+ 700: "#4e1a82",
99
+ 800: "#39135f",
100
+ 900: "#240c3c",
101
+ DEFAULT: "#7828c8",
102
+ foreground: "#ffffff",
103
+ },
104
+ focus: "#904ed2",
105
+ },
106
+ },
107
+ "purple-dark": {
108
+ extend: "dark",
109
+ colors: {
110
+ background: "#1A1023",
111
+ foreground: "#ffffff",
112
+ primary: {
113
+ 50: "#2c193f",
114
+ 100: "#462764",
115
+ 200: "#603689",
116
+ 300: "#7944ae",
117
+ 400: "#9353d3",
118
+ 500: "#a671db",
119
+ 600: "#b98fe2",
120
+ 700: "#ccadee",
121
+ 800: "#dfcbf2",
122
+ 900: "#f2eafa",
123
+ DEFAULT: "#9353d3",
124
+ foreground: "#ffffff",
125
+ },
126
+ focus: "#a671db",
127
+ },
128
+ },
129
+ "green-light": {
130
+ extend: "light",
131
+ colors: {
132
+ background: "#ffffff",
133
+ foreground: "#111827",
134
+ primary: {
135
+ 50: "#ecf9f0",
136
+ 100: "#d1f0dc",
137
+ 200: "#b6e7c7",
138
+ 300: "#9cdeb3",
139
+ 400: "#81d59e",
140
+ 500: "#66cc8a",
141
+ 600: "#54a872",
142
+ 700: "#42855a",
143
+ 800: "#306142",
144
+ 900: "#1f3d29",
145
+ DEFAULT: "#66cc8a",
146
+ foreground: "#000000",
147
+ },
148
+ focus: "#81d59e",
149
+ },
150
+ },
151
+ "green-dark": {
152
+ extend: "dark",
153
+ colors: {
154
+ background: "#0F1D15",
155
+ foreground: "#ffffff",
156
+ primary: {
157
+ 50: "#1f3d29",
158
+ 100: "#306142",
159
+ 200: "#42855a",
160
+ 300: "#54a872",
161
+ 400: "#66cc8a",
162
+ 500: "#81d59e",
163
+ 600: "#9cdeb3",
164
+ 700: "#b6e7c7",
165
+ 800: "#d1f0dc",
166
+ 900: "#ecf9f0",
167
+ DEFAULT: "#66cc8a",
168
+ foreground: "#000000",
169
+ },
170
+ focus: "#81d59e",
171
+ },
172
+ },
173
+ "blue-light": {
174
+ extend: "light",
175
+ colors: {
176
+ background: "#ffffff",
177
+ foreground: "#111827",
178
+ primary: {
179
+ 50: "#eff6ff",
180
+ 100: "#dbeafe",
181
+ 200: "#bfdbfe",
182
+ 300: "#93c5fd",
183
+ 400: "#60a5fa",
184
+ 500: "#3b82f6",
185
+ 600: "#2563eb",
186
+ 700: "#1d4ed8",
187
+ 800: "#1e40af",
188
+ 900: "#1e3a8a",
189
+ DEFAULT: "#3b82f6",
190
+ foreground: "#ffffff",
191
+ },
192
+ focus: "#60a5fa",
193
+ },
194
+ },
195
+ "blue-dark": {
196
+ extend: "dark",
197
+ colors: {
198
+ background: "#101d3a",
199
+ foreground: "#ffffff",
200
+ primary: {
201
+ 50: "#1e3a8a",
202
+ 100: "#1e40af",
203
+ 200: "#1d4ed8",
204
+ 300: "#2563eb",
205
+ 400: "#3b82f6",
206
+ 500: "#60a5fa",
207
+ 600: "#93c5fd",
208
+ 700: "#bfdbfe",
209
+ 800: "#dbeafe",
210
+ 900: "#eff6ff",
211
+ DEFAULT: "#3b82f6",
212
+ foreground: "#ffffff",
213
+ },
214
+ focus: "#60a5fa",
215
+ },
216
+ },
217
+ "yellow-light": {
218
+ extend: "light",
219
+ colors: {
220
+ background: "#ffffff",
221
+ foreground: "#111827",
222
+ primary: {
223
+ 50: "#fefce8",
224
+ 100: "#fef9c3",
225
+ 200: "#fef08a",
226
+ 300: "#fde047",
227
+ 400: "#facc15",
228
+ 500: "#eab308",
229
+ 600: "#ca8a04",
230
+ 700: "#a16207",
231
+ 800: "#854d0e",
232
+ 900: "#713f12",
233
+ DEFAULT: "#eab308",
234
+ foreground: "#111827",
235
+ },
236
+ focus: "#facc15",
237
+ },
238
+ },
239
+ "yellow-dark": {
240
+ extend: "dark",
241
+ colors: {
242
+ background: "#18181b",
243
+ foreground: "#ffffff",
244
+ primary: {
245
+ 50: "#713f12",
246
+ 100: "#854d0e",
247
+ 200: "#a16207",
248
+ 300: "#ca8a04",
249
+ 400: "#eab308",
250
+ 500: "#facc15",
251
+ 600: "#fde047",
252
+ 700: "#fef08a",
253
+ 800: "#fef9c3",
254
+ 900: "#fefce8",
255
+ DEFAULT: "#facc15",
256
+ foreground: "#18181b",
257
+ },
258
+ focus: "#eab308",
259
+ },
260
+ },
261
+ };
262
+
263
+ var ThemeContext = createContext({
264
+ theme: "light",
265
+ // biome-ignore lint/suspicious/noEmptyBlockStatements: <explanation>
266
+ setTheme: function () { },
267
+ });
268
+ var useThemeContext = function () {
269
+ var context = useContext(ThemeContext);
270
+ if (!context) {
271
+ throw new Error("useThemeContext debe ser usado dentro de un ThemeProvider");
272
+ }
273
+ return context;
274
+ };
275
+
276
+ var ThemeProvider = function (_a) {
277
+ var children = _a.children;
278
+ var _b = useThemeContext(), theme = _b.theme, setTheme = _b.setTheme;
279
+ return (jsx(ThemeContext.Provider, { value: { theme: theme, setTheme: setTheme }, children: jsx("main", { className: "".concat(theme, " bg-background text-foreground "), children: children }) }));
280
+ };
281
+
282
+ export { ButtonPrueba, IconComponent, MenuPrueba, ThemeContext, ThemeProvider, sizeMap, themeColors, useThemeContext };
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import "./Menu.scss";
3
+ import type { MenuComponentProps } from "./Menu.types";
4
+ /**
5
+ * Sidebar menu component for navigation and user actions.
6
+ * @param commerceInfo - Object with logo and name of the company.
7
+ * @param userInfo - Object with user avatar, name, and email.
8
+ * @param helpButton - Help button configuration.
9
+ * @param upgradeCard - Optional upgrade card configuration.
10
+ * @param isOpenSidebar - Controls sidebar visibility.
11
+ * @param onOpenSidebarChange - Callback to open/close sidebar.
12
+ */
13
+ export declare const Menu: React.NamedExoticComponent<MenuComponentProps>;
14
+ //# sourceMappingURL=Menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,gDAiLf,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { MenuNavListItem } from "../menu-nav-list/MenuNavList.types";
2
+ export interface MenuComponentProps {
3
+ commerceInfo: {
4
+ logo: string;
5
+ name: string;
6
+ };
7
+ userInfo: {
8
+ avatar: string;
9
+ name: string;
10
+ email: string;
11
+ };
12
+ helpButton: {
13
+ title: string;
14
+ redirect: string;
15
+ };
16
+ upgradeCard?: {
17
+ title: string;
18
+ description: string;
19
+ buttonText: string;
20
+ buttonLink: string;
21
+ };
22
+ menuItems: {
23
+ items: MenuNavListItem[];
24
+ selectedKey: string;
25
+ };
26
+ isOpenSidebar?: boolean;
27
+ onOpenSidebarChange?: (open: boolean) => void;
28
+ }
29
+ //# sourceMappingURL=Menu.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu/Menu.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAE1E,MAAM,WAAW,kBAAkB;IAClC,YAAY,EAAE;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACb,CAAC;IACF,QAAQ,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,UAAU,EAAE;QACX,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,WAAW,CAAC,EAAE;QACb,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,SAAS,EAAE;QACV,KAAK,EAAE,eAAe,EAAE,CAAC;QACzB,WAAW,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C"}
@@ -0,0 +1,2 @@
1
+ export { Menu } from "./Menu";
2
+ //# sourceMappingURL=index.d.ts.map