siesa-ui-kit 1.0.11 → 1.0.12
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/dist/components/Button/icons.d.ts +6 -5
- package/dist/components/Button/icons.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +68 -9
- package/dist/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.types.d.ts +18 -0
- package/dist/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/dist/components/Dropdown/icons.d.ts +3 -0
- package/dist/components/Dropdown/icons.d.ts.map +1 -1
- package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.d.ts.map +1 -1
- package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.types.d.ts +21 -0
- package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.types.d.ts.map +1 -1
- package/dist/components/Navbar/Navbar.d.ts.map +1 -1
- package/dist/components/Navbar/Navbar.types.d.ts +46 -1
- package/dist/components/Navbar/Navbar.types.d.ts.map +1 -1
- package/dist/components/NavigationRailGroup/NavigationRailGroup.d.ts +122 -0
- package/dist/components/NavigationRailGroup/NavigationRailGroup.d.ts.map +1 -0
- package/dist/components/NavigationRailGroup/NavigationRailGroup.types.d.ts +139 -0
- package/dist/components/NavigationRailGroup/NavigationRailGroup.types.d.ts.map +1 -0
- package/dist/components/NavigationRailGroup/icons.d.ts +33 -0
- package/dist/components/NavigationRailGroup/icons.d.ts.map +1 -0
- package/dist/components/NavigationRailGroup/index.d.ts +4 -0
- package/dist/components/NavigationRailGroup/index.d.ts.map +1 -0
- package/dist/components/NavigationRailItem/NavigationRailItem.d.ts.map +1 -1
- package/dist/components/NavigationRailItem/NavigationRailItem.types.d.ts +14 -0
- package/dist/components/NavigationRailItem/NavigationRailItem.types.d.ts.map +1 -1
- package/dist/components/NavigationRailTypes/NavigationRailTypes.d.ts.map +1 -1
- package/dist/components/NavigationRailTypes/NavigationRailTypes.types.d.ts +49 -0
- package/dist/components/NavigationRailTypes/NavigationRailTypes.types.d.ts.map +1 -1
- package/dist/components/NavigationRailTypes/icons.d.ts +15 -29
- package/dist/components/NavigationRailTypes/icons.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/icons.d.ts +6 -2
- package/dist/components/Select/icons.d.ts.map +1 -1
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/siesa-ui-kit.cjs +483 -235
- package/dist/siesa-ui-kit.cjs.map +1 -1
- package/dist/siesa-ui-kit.mjs +6727 -1641
- package/dist/siesa-ui-kit.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/LayoutBase/LayoutBase.d.ts +73 -0
- package/dist/views/LayoutBase/LayoutBase.d.ts.map +1 -0
- package/dist/views/LayoutBase/LayoutBase.types.d.ts +99 -0
- package/dist/views/LayoutBase/LayoutBase.types.d.ts.map +1 -0
- package/dist/views/LayoutBase/index.d.ts +3 -0
- package/dist/views/LayoutBase/index.d.ts.map +1 -0
- package/dist/views/ListView/ListView.d.ts +18 -12
- package/dist/views/ListView/ListView.d.ts.map +1 -1
- package/dist/views/ListView/ListView.types.d.ts +31 -94
- package/dist/views/ListView/ListView.types.d.ts.map +1 -1
- package/dist/views/ListView/index.d.ts +1 -1
- package/dist/views/ListView/index.d.ts.map +1 -1
- package/package.json +6 -1
package/dist/siesa-ui-kit.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("react");function He(r){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const t=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(a,n,t.get?t:{enumerable:!0,get:()=>r[n]})}}return a.default=r,Object.freeze(a)}const E=He(y),z=({type:r="default",size:a="base",iconOnly:n=!1,leftIcon:t,rightIcon:s,children:o,disabled:c=!1,className:d="",onClick:x,htmlType:h="button",fullWidth:l=!1,ariaLabel:u,badge:p=!1,badgeCount:g,badgeColor:f="red",...m})=>{const i={xs:n?"h-6 w-6 p-1":"h-6 py-1 px-2 gap-2",sm:n?"h-7 w-7 p-1.5":"h-7 py-1 px-2 gap-2",base:n?"h-8 w-8 p-2":"h-8 py-1.5 px-2.5 gap-2",l:n?"h-9 w-9 p-2.5":"h-9 py-2 px-3 gap-3",xl:n?"h-10 w-10 p-3":"h-10 py-2 px-4 gap-3"},b={xs:"w-4 h-4",sm:"w-4 h-4",base:"w-4 h-4",l:"w-4 h-4",xl:"w-4 h-4"},w={xs:"text-xs",sm:"text-sm",base:"text-sm",l:"text-sm",xl:"text-sm"},N={default:`
|
|
2
2
|
bg-primary-custom-600
|
|
3
3
|
text-primary-inverse-content
|
|
4
4
|
border
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
duration-150
|
|
50
50
|
dark:text-dark-content-custom
|
|
51
51
|
dark:hover:bg-hover-overlay-dark
|
|
52
|
-
`},
|
|
52
|
+
`},B=`
|
|
53
53
|
inline-flex
|
|
54
54
|
items-center
|
|
55
55
|
justify-center
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
disabled:opacity-50
|
|
67
67
|
disabled:cursor-not-allowed
|
|
68
68
|
disabled:pointer-events-none
|
|
69
|
-
`,
|
|
69
|
+
`,k=l?"w-full":"",j=[B,i[a],N[r],k,d].join(" ").replace(/\s+/g," ").trim(),R=D=>D?e.jsx("span",{className:`inline-flex items-center justify-center ${b[a]}`,children:D}):null,A=()=>n?R(t):e.jsxs(e.Fragment,{children:[t&&R(t),o&&e.jsx("span",{className:w[a],children:o}),s&&R(s)]}),C={zinc:{bg:"bg-zinc-600",text:"text-white"},red:{bg:"bg-red-700",text:"text-white"},orange:{bg:"bg-orange-700",text:"text-white"},amber:{bg:"bg-amber-700",text:"text-white"},yellow:{bg:"bg-yellow-700",text:"text-white"},lime:{bg:"bg-lime-700",text:"text-white"},green:{bg:"bg-green-700",text:"text-white"},emerald:{bg:"bg-emerald-700",text:"text-white"},teal:{bg:"bg-teal-700",text:"text-white"},cyan:{bg:"bg-cyan-700",text:"text-white"},sky:{bg:"bg-sky-700",text:"text-white"},blue:{bg:"bg-blue-700",text:"text-white"},indigo:{bg:"bg-indigo-700",text:"text-white"},violet:{bg:"bg-violet-700",text:"text-white"},purple:{bg:"bg-purple-700",text:"text-white"},fuchsia:{bg:"bg-fuchsia-700",text:"text-white"},pink:{bg:"bg-pink-700",text:"text-white"},rose:{bg:"bg-rose-700",text:"text-white"},primary:{bg:"bg-primary-custom-600",text:"text-white"},secondary:{bg:"bg-zinc-600",text:"text-white"},tertiary:{bg:"bg-zinc-600",text:"text-white"}},v=C[f]||C.red,V=()=>!p&&g===void 0?null:g!==void 0?e.jsx("span",{className:`
|
|
70
70
|
absolute
|
|
71
71
|
-top-1
|
|
72
72
|
-right-1
|
|
@@ -80,19 +80,19 @@
|
|
|
80
80
|
text-[10px]
|
|
81
81
|
font-bold
|
|
82
82
|
leading-none
|
|
83
|
-
${
|
|
84
|
-
${
|
|
83
|
+
${v.bg}
|
|
84
|
+
${v.text}
|
|
85
85
|
pointer-events-none
|
|
86
|
-
`.trim().replace(/\s+/g," "),"aria-label":`${
|
|
86
|
+
`.trim().replace(/\s+/g," "),"aria-label":`${g} notificaciones`,children:g>99?"99+":g}):e.jsx("span",{className:`
|
|
87
87
|
absolute
|
|
88
88
|
-top-1
|
|
89
89
|
-right-1
|
|
90
90
|
w-2
|
|
91
91
|
h-2
|
|
92
92
|
rounded-full
|
|
93
|
-
${
|
|
93
|
+
${v.bg}
|
|
94
94
|
pointer-events-none
|
|
95
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Notificación"});return e.jsxs("button",{type:
|
|
95
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Notificación"});return e.jsxs("button",{type:h,className:`${j} ${p||g!==void 0?"relative":""}`,disabled:c,onClick:x,"aria-label":u,...m,children:[A(),V()]})},Y=y.forwardRef(({label:r,labelSecondary:a,helperText:n,error:t=!1,errorMessage:s,leftIcon:o,rightIcon:c,fullWidth:d=!1,className:x="",disabled:h=!1,id:l,...u},p)=>{const g=l||`input-${Math.random().toString(36).substr(2,9)}`,f=`
|
|
96
96
|
w-full
|
|
97
97
|
px-3
|
|
98
98
|
py-1.5
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
dark:border-dark-border-primary
|
|
113
113
|
dark:text-dark-content-primary
|
|
114
114
|
dark:placeholder:text-dark-content-tertiary
|
|
115
|
-
`,h
|
|
115
|
+
`,m=h?`
|
|
116
116
|
opacity-50
|
|
117
117
|
cursor-not-allowed
|
|
118
118
|
bg-bg-secondary
|
|
@@ -127,24 +127,24 @@
|
|
|
127
127
|
dark:focus:border-dark-border-custom
|
|
128
128
|
dark:focus:ring-dark-border-custom
|
|
129
129
|
dark:focus:ring-offset-dark-bg-primary
|
|
130
|
-
`,
|
|
130
|
+
`,i=t?`
|
|
131
131
|
border-error-border!
|
|
132
132
|
focus:ring-error-border/30!
|
|
133
133
|
focus:ring-offset-2!
|
|
134
134
|
dark:border-error-border!
|
|
135
135
|
dark:focus:ring-error-border/30!
|
|
136
136
|
dark:focus:ring-offset-dark-bg-primary!
|
|
137
|
-
`:"",
|
|
138
|
-
${
|
|
139
|
-
${
|
|
140
|
-
${
|
|
137
|
+
`:"",b=d?"w-full":"w-[265px]",w=N=>{if(!N)return null;const B=N.props.className||"";return y.cloneElement(N,{className:`w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary ${B}`})};return e.jsxs("div",{className:`flex flex-col gap-2 ${b} ${x}`,children:[r&&e.jsxs("label",{htmlFor:g,className:"flex items-center w-full font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:[e.jsx("span",{className:"flex-1",children:r}),a&&e.jsx("span",{className:"text-xs leading-4 text-primary-custom-600 dark:text-primary-custom-600",children:a})]}),e.jsxs("div",{className:"relative flex items-center",children:[o&&e.jsx("div",{className:"absolute left-3 pointer-events-none",children:w(o)}),e.jsx("input",{ref:p,id:g,disabled:h,className:`
|
|
138
|
+
${f}
|
|
139
|
+
${m}
|
|
140
|
+
${i}
|
|
141
141
|
${o?"pl-9":""}
|
|
142
|
-
${
|
|
143
|
-
`.trim().replace(/\s+/g," "),...
|
|
142
|
+
${c?"pr-9":""}
|
|
143
|
+
`.trim().replace(/\s+/g," "),...u}),c&&e.jsx("div",{className:"absolute right-3 pointer-events-none",children:w(c)})]}),(n||s)&&e.jsx("p",{className:`
|
|
144
144
|
text-xs
|
|
145
145
|
leading-5
|
|
146
|
-
${
|
|
147
|
-
`.trim().replace(/\s+/g," "),children:
|
|
146
|
+
${t?"text-error-content dark:text-error-content":"text-content-tertiary dark:text-dark-content-tertiary"}
|
|
147
|
+
`.trim().replace(/\s+/g," "),children:t&&s?s:n})]})});Y.displayName="Input";const ge=y.forwardRef(({label:r,description:a,helperText:n,error:t=!1,errorMessage:s,fullWidth:o=!1,resize:c="vertical",className:d="",disabled:x=!1,id:h,rows:l=4,...u},p)=>{const g=h||`textarea-${Math.random().toString(36).substr(2,9)}`,f=`
|
|
148
148
|
w-full
|
|
149
149
|
px-3
|
|
150
150
|
pr-1.5
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
dark:border-dark-border-primary
|
|
165
165
|
dark:text-dark-content-primary
|
|
166
166
|
dark:placeholder:text-dark-content-tertiary
|
|
167
|
-
`,
|
|
167
|
+
`,m=x?`
|
|
168
168
|
opacity-50
|
|
169
169
|
cursor-not-allowed
|
|
170
170
|
bg-bg-secondary
|
|
@@ -176,24 +176,24 @@
|
|
|
176
176
|
dark:hover:border-zinc-500
|
|
177
177
|
dark:focus:border-2
|
|
178
178
|
dark:focus:border-dark-border-custom
|
|
179
|
-
`,
|
|
179
|
+
`,i=t?`
|
|
180
180
|
border-error-border!
|
|
181
181
|
focus:border-2!
|
|
182
182
|
focus:border-error-border!
|
|
183
183
|
dark:border-error-border!
|
|
184
184
|
dark:focus:border-2!
|
|
185
185
|
dark:focus:border-error-border!
|
|
186
|
-
`:"",
|
|
187
|
-
${p}
|
|
188
|
-
${h}
|
|
189
|
-
${g}
|
|
186
|
+
`:"",b=c==="none"?"resize-none":c==="vertical"?"resize-y":c==="horizontal"?"resize-x":"resize",w=o?"w-full":"w-[312px]";return e.jsxs("div",{className:`flex flex-col gap-2 ${w} ${d}`,children:[(r||a)&&e.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[r&&e.jsx("label",{htmlFor:g,className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:r}),a&&e.jsx("p",{className:"text-sm leading-5 text-content-secondary dark:text-dark-content-secondary",children:a})]}),e.jsx("textarea",{ref:p,id:g,disabled:x,rows:l,className:`
|
|
190
187
|
${f}
|
|
191
|
-
|
|
188
|
+
${m}
|
|
189
|
+
${i}
|
|
190
|
+
${b}
|
|
191
|
+
`.trim().replace(/\s+/g," "),...u}),(n||s)&&e.jsx("p",{className:`
|
|
192
192
|
text-sm
|
|
193
193
|
leading-5
|
|
194
194
|
text-content-tertiary
|
|
195
195
|
dark:text-dark-content-tertiary
|
|
196
|
-
`.trim().replace(/\s+/g," "),children:
|
|
196
|
+
`.trim().replace(/\s+/g," "),children:t&&s?s:n})]})});ge.displayName="Textarea";const ve=y.forwardRef(({label:r,description:a,checked:n=!1,indeterminate:t=!1,disabled:s=!1,className:o="",id:c,onChange:d,...x},h)=>{const l=y.useRef(null),u=h||l,p=c||`checkbox-${Math.random().toString(36).substr(2,9)}`;y.useEffect(()=>{u.current&&(u.current.indeterminate=t)},[t,u]);const i=[`
|
|
197
197
|
w-4
|
|
198
198
|
h-4
|
|
199
199
|
rounded
|
|
@@ -207,10 +207,10 @@
|
|
|
207
207
|
justify-center
|
|
208
208
|
dark:bg-dark-bg-primary
|
|
209
209
|
dark:border-dark-border-primary
|
|
210
|
-
`,
|
|
210
|
+
`,s?`
|
|
211
211
|
opacity-50
|
|
212
212
|
cursor-not-allowed
|
|
213
|
-
`:n||
|
|
213
|
+
`:n||t?`
|
|
214
214
|
peer-hover:border-[#50a5f7]
|
|
215
215
|
peer-focus:ring-2
|
|
216
216
|
peer-focus:ring-primary-custom-400/20
|
|
@@ -226,13 +226,13 @@
|
|
|
226
226
|
dark:peer-hover:border-[#b6b6b9]
|
|
227
227
|
dark:peer-focus:border-dark-border-custom
|
|
228
228
|
dark:peer-focus:ring-dark-border-custom/20
|
|
229
|
-
`,n||
|
|
229
|
+
`,n||t?`
|
|
230
230
|
bg-primary-custom-600!
|
|
231
231
|
border-primary-custom-500!
|
|
232
232
|
shadow-button-inset
|
|
233
233
|
dark:bg-dark-bg-inverse!
|
|
234
234
|
dark:border-dark-bg-inverse!
|
|
235
|
-
`:"",
|
|
235
|
+
`:"",s?"cursor-not-allowed":"cursor-pointer"].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:`inline-flex gap-3 items-start ${o}`,children:[e.jsxs("div",{className:"flex items-center justify-center h-5 w-4 shrink-0",children:[e.jsx("input",{ref:u,type:"checkbox",id:p,checked:n,disabled:s,onChange:d,className:"peer sr-only",...x}),e.jsxs("label",{htmlFor:p,className:i,children:[n&&!t&&e.jsx("svg",{className:"w-3 h-3 text-primary-inverse-content pointer-events-none",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),t&&e.jsx("svg",{className:"w-3 h-3 text-primary-inverse-content pointer-events-none",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2 6H10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})]})]}),(r||a)&&e.jsxs("label",{htmlFor:p,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${s?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[r&&e.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:r}),a&&e.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:a})]})]})});ve.displayName="Checkbox";const ke=y.forwardRef(({label:r,description:a,checked:n=!1,disabled:t=!1,className:s="",id:o,onChange:c,value:d,name:x,...h},l)=>{const u=o||`radio-${Math.random().toString(36).substr(2,9)}`,p=`
|
|
236
236
|
w-4
|
|
237
237
|
h-4
|
|
238
238
|
rounded-full
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
justify-center
|
|
247
247
|
dark:bg-dark-bg-primary
|
|
248
248
|
dark:border-dark-border-primary
|
|
249
|
-
`,
|
|
249
|
+
`,g=t?`
|
|
250
250
|
opacity-50
|
|
251
251
|
cursor-not-allowed
|
|
252
252
|
`:`
|
|
@@ -257,18 +257,18 @@
|
|
|
257
257
|
dark:peer-hover:border-dark-border-custom
|
|
258
258
|
dark:peer-focus:ring-dark-border-custom
|
|
259
259
|
dark:peer-focus:border-dark-border-custom
|
|
260
|
-
`,
|
|
260
|
+
`,f=n?`
|
|
261
261
|
bg-primary-custom-600!
|
|
262
262
|
border-primary-inverse-border!
|
|
263
263
|
shadow-button-inset
|
|
264
264
|
dark:bg-dark-bg-inverse!
|
|
265
265
|
dark:border-dark-bg-inverse!
|
|
266
|
-
`:"";return e.jsxs("div",{className:`flex gap-3 items-start ${
|
|
267
|
-
${b}
|
|
268
|
-
${u}
|
|
266
|
+
`:"";return e.jsxs("div",{className:`flex gap-3 items-start ${s}`,children:[e.jsxs("div",{className:"flex items-center justify-center h-5 w-4 shrink-0",children:[e.jsx("input",{ref:l,type:"radio",id:u,checked:n,disabled:t,onChange:c,value:d,name:x,className:"peer sr-only",...h}),e.jsx("label",{htmlFor:u,className:`
|
|
269
267
|
${p}
|
|
270
|
-
${
|
|
271
|
-
|
|
268
|
+
${g}
|
|
269
|
+
${f}
|
|
270
|
+
${t?"cursor-not-allowed":"cursor-pointer"}
|
|
271
|
+
`.trim().replace(/\s+/g," "),children:n&&e.jsx("div",{className:"w-1.5 h-1.5 bg-white rounded-full dark:bg-dark-content-inverse"})})]}),(r||a)&&e.jsxs("label",{htmlFor:u,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${t?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[r&&e.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:r}),a&&e.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:a})]})]})});ke.displayName="Radio";const oe=y.forwardRef(({label:r,description:a,labelPosition:n="leading",checked:t=!1,disabled:s=!1,className:o="",id:c,onChange:d,ariaLabel:x,...h},l)=>{const u=c||`switch-${Math.random().toString(36).substr(2,9)}`,p=`
|
|
272
272
|
w-8
|
|
273
273
|
h-5
|
|
274
274
|
rounded-xl
|
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
relative
|
|
278
278
|
transition-all
|
|
279
279
|
duration-200
|
|
280
|
-
`,
|
|
280
|
+
`,g=()=>s?t?`
|
|
281
281
|
bg-primary-custom-600
|
|
282
282
|
border-primary-inverse-border
|
|
283
283
|
opacity-50
|
|
@@ -291,27 +291,27 @@
|
|
|
291
291
|
cursor-not-allowed
|
|
292
292
|
dark:bg-dark-bg-primary
|
|
293
293
|
dark:border-dark-border-primary
|
|
294
|
-
`:
|
|
294
|
+
`:t?`
|
|
295
295
|
bg-primary-custom-600
|
|
296
296
|
border-primary-inverse-border
|
|
297
297
|
cursor-pointer
|
|
298
298
|
peer-hover:border-[#307cc5]
|
|
299
|
-
peer-focus:shadow-
|
|
299
|
+
peer-focus:shadow-lg
|
|
300
300
|
dark:bg-primary-custom-600
|
|
301
301
|
dark:border-primary-inverse-border
|
|
302
302
|
dark:peer-hover:border-[#307cc5]
|
|
303
|
-
dark:peer-focus:shadow-
|
|
303
|
+
dark:peer-focus:shadow-lg
|
|
304
304
|
`:`
|
|
305
305
|
bg-[#fafafa]
|
|
306
306
|
border-border-primary
|
|
307
307
|
cursor-pointer
|
|
308
308
|
peer-hover:border-[#b6b6b9]
|
|
309
|
-
peer-focus:shadow-
|
|
309
|
+
peer-focus:shadow-lg
|
|
310
310
|
dark:bg-dark-bg-primary
|
|
311
311
|
dark:border-dark-border-primary
|
|
312
312
|
dark:peer-hover:border-[#b6b6b9]
|
|
313
|
-
dark:peer-focus:shadow-
|
|
314
|
-
`,
|
|
313
|
+
dark:peer-focus:shadow-lg
|
|
314
|
+
`,f=()=>{const N=`
|
|
315
315
|
absolute
|
|
316
316
|
w-4
|
|
317
317
|
h-4
|
|
@@ -322,7 +322,7 @@
|
|
|
322
322
|
-translate-y-1/2
|
|
323
323
|
transition-all
|
|
324
324
|
duration-200
|
|
325
|
-
`,
|
|
325
|
+
`,B=t?"left-[13px]":"left-px";return s?`${N} ${B} ${t?"border-primary-inverse-border dark:border-primary-inverse-border":"border-border-primary dark:border-dark-border-primary"}`:`${N} ${B} ${t?`
|
|
326
326
|
border-primary-inverse-border
|
|
327
327
|
peer-hover:border-[#307cc5]
|
|
328
328
|
dark:border-primary-inverse-border
|
|
@@ -332,29 +332,29 @@
|
|
|
332
332
|
peer-hover:border-[#b6b6b9]
|
|
333
333
|
dark:border-dark-border-primary
|
|
334
334
|
dark:peer-hover:border-[#b6b6b9]
|
|
335
|
-
`}`},
|
|
335
|
+
`}`},m=[p,g()].join(" ").replace(/\s+/g," ").trim(),i=f().replace(/\s+/g," ").trim(),b=r||a?e.jsxs("label",{htmlFor:u,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${s?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[r&&e.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:r}),a&&e.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:a})]}):null,w=e.jsxs("div",{className:"flex items-center justify-center shrink-0",children:[e.jsx("input",{ref:l,type:"checkbox",id:u,checked:t,disabled:s,onChange:d,className:"peer sr-only","aria-label":x||r,...h}),e.jsx("label",{htmlFor:u,className:m,"aria-hidden":"true",children:e.jsx("div",{className:i})})]});return e.jsx("div",{className:`flex gap-2 items-center w-[344px] ${o}`,children:n==="leading"?e.jsxs(e.Fragment,{children:[b,w]}):e.jsxs(e.Fragment,{children:[w,b]})})});oe.displayName="Switch";const ye=y.forwardRef(({size:r="10",type:a="circular",src:n,alt:t="",initials:s,className:o="",...c},d)=>{const x={4:"w-5 h-5",6:"w-6 h-6",8:"w-8 h-8",10:"w-10 h-10"},h={4:"text-xs",6:"text-xs",8:"text-sm",10:"text-base"},l={circular:"rounded-full",rounded:"rounded-md"},u=`
|
|
336
336
|
relative
|
|
337
337
|
inline-flex
|
|
338
338
|
items-center
|
|
339
339
|
justify-center
|
|
340
340
|
overflow-hidden
|
|
341
|
-
${
|
|
342
|
-
${
|
|
343
|
-
`;return n?e.jsx("div",{ref:
|
|
344
|
-
${
|
|
345
|
-
${
|
|
341
|
+
${x[r]}
|
|
342
|
+
${l[a]}
|
|
343
|
+
`;return n?e.jsx("div",{ref:d,className:`${u} ${o}`.trim().replace(/\s+/g," "),children:e.jsx("img",{src:n,alt:t,className:"w-full h-full object-cover",...c})}):s?e.jsx("div",{ref:d,className:`
|
|
344
|
+
${u}
|
|
345
|
+
${h[r]}
|
|
346
346
|
bg-content-primary
|
|
347
347
|
text-white
|
|
348
348
|
font-normal
|
|
349
349
|
dark:bg-dark-bg-inverse
|
|
350
350
|
dark:text-dark-content-inverse
|
|
351
351
|
${o}
|
|
352
|
-
`.trim().replace(/\s+/g," "),children:e.jsx("span",{className:"leading-none",children:
|
|
353
|
-
${
|
|
352
|
+
`.trim().replace(/\s+/g," "),children:e.jsx("span",{className:"leading-none",children:s})}):e.jsx("div",{ref:d,className:`
|
|
353
|
+
${u}
|
|
354
354
|
bg-background-secondary
|
|
355
355
|
dark:bg-dark-bg-primary
|
|
356
356
|
${o}
|
|
357
|
-
`.trim().replace(/\s+/g," ")})});
|
|
357
|
+
`.trim().replace(/\s+/g," ")})});ye.displayName="Avatar";const U=y.forwardRef(({type:r="default",className:a="",...n},t)=>{const c=["w-full h-px border-0",{default:"bg-border-primary dark:bg-dark-border-primary",soft:"bg-border-secondary dark:bg-gray-700"}[r],a].join(" ").replace(/\s+/g," ").trim();return e.jsx("hr",{ref:t,className:c,...n})});U.displayName="Divider";const we=y.forwardRef(({term:r,details:a,className:n="",...t},s)=>{const o=`
|
|
358
358
|
flex
|
|
359
359
|
flex-wrap
|
|
360
360
|
gap-1
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
border-b
|
|
364
364
|
border-border-secondary
|
|
365
365
|
dark:border-gray-700
|
|
366
|
-
`,
|
|
366
|
+
`,c="flex-1 min-w-[180px]",d=[o,n].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{ref:s,className:d,...t,children:[e.jsx("div",{className:c,children:e.jsx("p",{className:"text-sm leading-5 text-content-secondary dark:text-gray-400 font-normal",children:r})}),e.jsx("div",{className:c,children:e.jsx("p",{className:"text-sm leading-5 text-content-primary dark:text-dark-content-primary font-normal",children:a})})]})});we.displayName="DescriptionList";const je=y.forwardRef(({title:r,description:a,children:n,actions:t,onCancel:s,onConfirm:o,cancelText:c="Cancelar",confirmText:d="Confirmar",className:x="",...h},l)=>{const u=t||e.jsxs(e.Fragment,{children:[s&&e.jsx(z,{type:"plain",size:"base",onClick:s,children:c}),o&&e.jsx(z,{type:"default",size:"base",onClick:o,children:d})]});return e.jsx("div",{ref:l,className:`
|
|
367
367
|
w-[512px]
|
|
368
368
|
bg-white
|
|
369
369
|
dark:bg-dark-bg-primary
|
|
@@ -371,8 +371,8 @@
|
|
|
371
371
|
border-border-primary
|
|
372
372
|
dark:border-dark-border-primary
|
|
373
373
|
rounded-xl
|
|
374
|
-
${
|
|
375
|
-
`.trim().replace(/\s+/g," "),...
|
|
374
|
+
${x}
|
|
375
|
+
`.trim().replace(/\s+/g," "),...h,children:e.jsxs("div",{className:"p-6 flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("p",{className:"text-sm leading-5 font-bold text-content-primary dark:text-dark-content-primary",children:r}),a&&e.jsx("p",{className:"text-sm leading-5 font-normal text-content-tertiary dark:text-content-tertiary",children:a})]}),n&&e.jsx("div",{className:"flex flex-col gap-3",children:n}),e.jsx("div",{className:"flex flex-wrap gap-3 items-center justify-end",children:u})]})})});je.displayName="Alert";const G=y.forwardRef(({color:r="zinc",leftIcon:a,label:n,count:t,className:s="",...o},c)=>{const x={zinc:{bg:"bg-zinc-100",text:"text-zinc-600",hover:"hover:bg-zinc-200",notificationBg:"bg-zinc-600",notificationText:"text-zinc-100"},red:{bg:"bg-red-100",text:"text-red-700",hover:"hover:bg-red-200",notificationBg:"bg-red-700",notificationText:"text-red-100"},orange:{bg:"bg-orange-100",text:"text-orange-700",hover:"hover:bg-orange-200",notificationBg:"bg-orange-700",notificationText:"text-orange-100"},amber:{bg:"bg-amber-100",text:"text-amber-700",hover:"hover:bg-amber-200",notificationBg:"bg-amber-700",notificationText:"text-amber-100"},yellow:{bg:"bg-yellow-100",text:"text-yellow-700",hover:"hover:bg-yellow-200",notificationBg:"bg-yellow-700",notificationText:"text-yellow-100"},lime:{bg:"bg-lime-100",text:"text-lime-700",hover:"hover:bg-lime-200",notificationBg:"bg-lime-700",notificationText:"text-lime-100"},green:{bg:"bg-green-100",text:"text-green-700",hover:"hover:bg-green-200",notificationBg:"bg-green-700",notificationText:"text-green-100"},emerald:{bg:"bg-emerald-100",text:"text-emerald-700",hover:"hover:bg-emerald-200",notificationBg:"bg-emerald-700",notificationText:"text-emerald-100"},teal:{bg:"bg-teal-100",text:"text-teal-700",hover:"hover:bg-teal-200",notificationBg:"bg-teal-700",notificationText:"text-teal-100"},cyan:{bg:"bg-cyan-100",text:"text-cyan-700",hover:"hover:bg-cyan-200",notificationBg:"bg-cyan-700",notificationText:"text-cyan-100"},sky:{bg:"bg-sky-100",text:"text-sky-700",hover:"hover:bg-sky-200",notificationBg:"bg-sky-700",notificationText:"text-sky-100"},blue:{bg:"bg-blue-100",text:"text-blue-700",hover:"hover:bg-blue-200",notificationBg:"bg-blue-700",notificationText:"text-blue-100"},indigo:{bg:"bg-indigo-100",text:"text-indigo-700",hover:"hover:bg-indigo-200",notificationBg:"bg-indigo-700",notificationText:"text-indigo-100"},violet:{bg:"bg-violet-100",text:"text-violet-700",hover:"hover:bg-violet-200",notificationBg:"bg-violet-700",notificationText:"text-violet-100"},purple:{bg:"bg-purple-100",text:"text-purple-700",hover:"hover:bg-purple-200",notificationBg:"bg-purple-700",notificationText:"text-purple-100"},fuchsia:{bg:"bg-fuchsia-100",text:"text-fuchsia-700",hover:"hover:bg-fuchsia-200",notificationBg:"bg-fuchsia-700",notificationText:"text-fuchsia-100"},pink:{bg:"bg-pink-100",text:"text-pink-700",hover:"hover:bg-pink-200",notificationBg:"bg-pink-700",notificationText:"text-pink-100"},rose:{bg:"bg-rose-100",text:"text-rose-700",hover:"hover:bg-rose-200",notificationBg:"bg-rose-700",notificationText:"text-rose-100"},primary:{bg:"bg-primary-custom-100",text:"text-primary-custom-600",hover:"hover:bg-primary-custom-200",notificationBg:"bg-primary-custom-600",notificationText:"text-primary-custom-100"},secondary:{bg:"bg-zinc-100",text:"text-zinc-600",hover:"hover:bg-zinc-200",notificationBg:"bg-zinc-600",notificationText:"text-zinc-100"},tertiary:{bg:"bg-zinc-100",text:"text-zinc-600",hover:"hover:bg-zinc-200",notificationBg:"bg-zinc-600",notificationText:"text-zinc-100"}}[r],h=u=>{const p=u.props.className||"";return y.cloneElement(u,{className:`w-3 h-3 ${p}`.trim()})},l=["inline-flex","items-center","gap-1","px-1.5","py-1","rounded-md","font-sans",x.bg,x.hover,"transition-colors","duration-200",s].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{ref:c,className:l,...o,children:[a&&e.jsx("div",{className:`flex items-center justify-center ${x.text}`,children:h(a)}),e.jsx("span",{className:`font-sans text-xs leading-4 ${x.text}`,children:n}),t!==void 0&&e.jsx("div",{className:`
|
|
376
376
|
h-3
|
|
377
377
|
flex
|
|
378
378
|
items-center
|
|
@@ -380,16 +380,16 @@
|
|
|
380
380
|
px-0.5
|
|
381
381
|
rounded-xs
|
|
382
382
|
min-w-[12px]
|
|
383
|
-
${
|
|
384
|
-
`.trim().replace(/\s+/g," "),children:e.jsx("span",{className:`font-sans text-xs leading-4 ${
|
|
383
|
+
${x.notificationBg}
|
|
384
|
+
`.trim().replace(/\s+/g," "),children:e.jsx("span",{className:`font-sans text-xs leading-4 ${x.notificationText}`,children:t})})]})});G.displayName="Badge";const le=y.forwardRef(({value:r,defaultValue:a=0,onChange:n,min:t=0,max:s,label:o,linkText:c,onLinkClick:d,helperText:x,error:h=!1,disabled:l=!1,className:u="",...p},g)=>{const[f,m]=y.useState(a),i=r!==void 0,b=i?r:f;y.useEffect(()=>{i||m(a)},[a,i]);const w=D=>{let Z=D;t!==void 0&&Z<t&&(Z=t),s!==void 0&&Z>s&&(Z=s),i||m(Z),n?.(Z)},N=()=>{l||w(b-1)},B=()=>{l||w(b+1)},k=l||t!==void 0&&b<=t,j=l||s!==void 0&&b>=s,R=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),A=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8 3V13M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),C=h?"border-error-border dark:border-error-border":"border-border-primary dark:border-dark-border-primary",v=!l&&!h?"hover:border-[#f9f9f9] dark:hover:border-[#f9f9f9]":"",V=!l&&!h?"focus-within:border-2 focus-within:border-[#329cff] dark:focus-within:border-[#329cff]":"";return e.jsxs("div",{ref:g,className:`flex flex-col gap-2 ${u}`.trim(),...p,children:[o&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("label",{className:"text-sm leading-5 font-bold text-content-primary dark:text-dark-content-primary",children:o}),c&&e.jsx("button",{type:"button",onClick:d,disabled:l,className:`
|
|
385
385
|
text-xs leading-4
|
|
386
386
|
text-primary-custom-600
|
|
387
387
|
hover:underline
|
|
388
388
|
dark:text-primary-custom-600
|
|
389
|
-
${
|
|
389
|
+
${l?"opacity-50 cursor-not-allowed":"cursor-pointer"}
|
|
390
390
|
transition-colors
|
|
391
391
|
duration-200
|
|
392
|
-
`.trim().replace(/\s+/g," "),children:
|
|
392
|
+
`.trim().replace(/\s+/g," "),children:c})]}),e.jsxs("div",{className:`
|
|
393
393
|
flex
|
|
394
394
|
items-center
|
|
395
395
|
gap-2
|
|
@@ -398,38 +398,128 @@
|
|
|
398
398
|
bg-white
|
|
399
399
|
dark:bg-dark-bg-primary
|
|
400
400
|
border
|
|
401
|
-
${
|
|
402
|
-
${
|
|
403
|
-
${
|
|
401
|
+
${C}
|
|
402
|
+
${v}
|
|
403
|
+
${V}
|
|
404
404
|
rounded-lg
|
|
405
405
|
transition-colors
|
|
406
406
|
duration-200
|
|
407
|
-
${
|
|
408
|
-
`.trim().replace(/\s+/g," "),children:[e.jsx("button",{type:"button",onClick:
|
|
407
|
+
${l?"opacity-50 cursor-not-allowed":""}
|
|
408
|
+
`.trim().replace(/\s+/g," "),children:[e.jsx("button",{type:"button",onClick:N,disabled:k,className:`
|
|
409
409
|
flex
|
|
410
410
|
items-center
|
|
411
411
|
justify-center
|
|
412
412
|
w-4
|
|
413
413
|
h-4
|
|
414
|
-
${
|
|
414
|
+
${k?"text-content-tertiary dark:text-content-tertiary cursor-not-allowed":"text-content-primary dark:text-dark-content-primary hover:text-content-secondary dark:hover:text-content-secondary cursor-pointer"}
|
|
415
415
|
transition-colors
|
|
416
416
|
duration-200
|
|
417
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Decrementar",children:e.jsx(
|
|
417
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Decrementar",children:e.jsx(R,{})}),e.jsx("div",{className:"flex-1 text-center",children:e.jsx("span",{className:`
|
|
418
418
|
text-base leading-6
|
|
419
|
-
${
|
|
420
|
-
`.trim().replace(/\s+/g," "),children:
|
|
419
|
+
${b===0?"text-content-tertiary dark:text-content-tertiary":"text-content-primary dark:text-dark-content-primary"}
|
|
420
|
+
`.trim().replace(/\s+/g," "),children:b})}),e.jsx("button",{type:"button",onClick:B,disabled:j,className:`
|
|
421
421
|
flex
|
|
422
422
|
items-center
|
|
423
423
|
justify-center
|
|
424
424
|
w-4
|
|
425
425
|
h-4
|
|
426
|
-
${
|
|
426
|
+
${j?"text-content-tertiary dark:text-content-tertiary cursor-not-allowed":"text-content-primary dark:text-dark-content-primary hover:text-content-secondary dark:hover:text-content-secondary cursor-pointer"}
|
|
427
427
|
transition-colors
|
|
428
428
|
duration-200
|
|
429
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Incrementar",children:e.jsx(
|
|
429
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Incrementar",children:e.jsx(A,{})})]}),x&&e.jsx("p",{className:`
|
|
430
430
|
text-sm leading-5
|
|
431
|
-
${
|
|
432
|
-
`.trim().replace(/\s+/g," "),children:
|
|
431
|
+
${h?"text-error-content dark:text-error-content":"text-content-tertiary dark:text-content-tertiary"}
|
|
432
|
+
`.trim().replace(/\s+/g," "),children:x})]})});le.displayName="Quantity";const te=({icon:r,label:a,selected:n=!1,disabled:t=!1,badge:s=!1,badgeCount:o,onClick:c,onMouseEnter:d,onMouseLeave:x,ariaLabel:h,id:l,showLabelText:u=!0,showIcon:p=!0,className:g=""})=>{const f=["flex","flex-col","items-center","justify-center","px-4","py-1","rounded-full","overflow-hidden","shrink-0",n?"bg-primary-custom-100 dark:bg-primary-custom-600/30":"bg-transparent hover:bg-primary-custom-100 dark:hover:bg-primary-custom-600/20","transition-colors","duration-150"].join(" "),m=["w-4","h-4","shrink-0",n?"text-primary-custom-600 dark:text-white":t?"text-content-tertiary dark:text-content-tertiary":"text-content-primary hover:text-primary-custom-600 dark:text-dark-content-primary dark:hover:text-white","transition-colors","duration-150"].join(" "),i=["text-xs","leading-3","font-bold","text-center","w-full","min-w-full","text-content-primary","dark:text-dark-content-primary","wrap-break-word"].join(" "),b=["relative","flex","flex-col","items-center","gap-1","px-0.5","py-0","w-14","shrink-0",t?"cursor-not-allowed opacity-55 pointer-events-none":"cursor-pointer","focus:outline-hidden","focus-visible:ring-2","focus-visible:ring-primary-custom-400","focus-visible:ring-offset-2","focus-visible:ring-offset-primary-custom-100","dark:focus-visible:ring-dark-border-custom","dark:focus-visible:ring-offset-dark-bg-primary","focus-visible:shadow-lg","dark:focus-visible:shadow-2xl","rounded-lg",g].join(" "),w=()=>!s&&o===void 0?null:o!==void 0?e.jsx("span",{className:`
|
|
433
|
+
absolute
|
|
434
|
+
-top-0.5
|
|
435
|
+
left-8
|
|
436
|
+
flex
|
|
437
|
+
items-center
|
|
438
|
+
justify-center
|
|
439
|
+
min-w-3
|
|
440
|
+
h-3
|
|
441
|
+
px-1
|
|
442
|
+
rounded-full
|
|
443
|
+
text-xs
|
|
444
|
+
font-bold
|
|
445
|
+
leading-none
|
|
446
|
+
bg-red-700
|
|
447
|
+
text-white
|
|
448
|
+
dark:bg-red-700
|
|
449
|
+
dark:text-white
|
|
450
|
+
pointer-events-none
|
|
451
|
+
select-none
|
|
452
|
+
`,"aria-label":`${o} notificaciones`,"data-badge":!0,children:o>99?"99+":o}):e.jsx("span",{className:`
|
|
453
|
+
absolute
|
|
454
|
+
-top-0.5
|
|
455
|
+
left-8
|
|
456
|
+
w-3
|
|
457
|
+
h-3
|
|
458
|
+
rounded-full
|
|
459
|
+
bg-red-700
|
|
460
|
+
dark:bg-red-700
|
|
461
|
+
pointer-events-none
|
|
462
|
+
select-none
|
|
463
|
+
`,"aria-label":"Notificación","data-badge":!0});return e.jsxs("button",{type:"button",className:b,disabled:t,onClick:c,onMouseEnter:d,onMouseLeave:x,"aria-label":h||a,"aria-current":n?"page":void 0,"aria-disabled":t,"data-item-id":l,"data-testid":`navigation-rail-item-${l}`,children:[p&&e.jsx("div",{className:f,children:e.jsx("span",{className:m,children:r})}),u&&e.jsx("p",{className:i,children:a}),w()]})};te.displayName="NavigationRailItem";const Fe=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"w-4 h-4",children:e.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),X=({variant:r="default",children:a,items:n,open:t,onOpenChange:s,disabled:o=!1,className:c="",menuClassName:d="",ariaLabel:x,placeholder:h="Options",renderTrigger:l})=>{const[u,p]=y.useState(!1),[g,f]=y.useState("bottom-left"),m=y.useRef(null),i=y.useRef(null),b=t!==void 0,w=b?t:u,N=y.useCallback(()=>{if(!m.current)return;const C=m.current.getBoundingClientRect(),v=window.innerWidth,V=window.innerHeight,D=200,Z=250,P=V-C.bottom,S=C.top,$=v-C.left,H=C.right,F=P<Z&&S>P,T=$<D&&H>$;f(F&&T?"top-right":F?"top-left":T?"bottom-right":"bottom-left")},[]),B=()=>{if(o)return;const C=!w;C&&N(),b||p(C),s?.(C)};y.useEffect(()=>{const C=v=>{m.current&&!m.current.contains(v.target)&&(b||p(!1),s?.(!1))};if(w)return document.addEventListener("mousedown",C),()=>{document.removeEventListener("mousedown",C)}},[w,b,s]),y.useEffect(()=>{const C=v=>{v.key==="Escape"&&w&&(b||p(!1),s?.(!1))};if(w)return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[w,b,s]);const k=C=>{C.disabled||C.isDivider||C.isHeading||(C.onClick&&C.onClick({}),b||p(!1),s?.(!1))},j=["inline-flex","items-center","justify-center","rounded-lg","font-bold","text-sm","whitespace-nowrap","transition-all","duration-150",r==="icon-only"?"w-9 h-9":"gap-2 px-3 py-2","bg-white","text-content-secondary","border","border-border-primary","hover:bg-background-secondary","dark:bg-dark-bg-primary","dark:text-dark-content-primary","dark:border-dark-border-primary","dark:hover:bg-dark-bg-secondary","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","focus:ring-offset-2","dark:focus:ring-dark-border-custom","dark:focus:ring-offset-dark-bg-primary",o&&"opacity-50",o&&"cursor-not-allowed",o&&"pointer-events-none",c].filter(Boolean).join(" ").replace(/\s+/g," ").trim(),A=["absolute",{"bottom-left":"top-full left-0 mt-2","bottom-right":"top-full right-0 mt-2","top-left":"bottom-full left-0 mb-2","top-right":"bottom-full right-0 mb-2"}[g],"min-w-[182px]","rounded-lg","p-1","border","z-50","bg-background-secondary","border-border-primary","dark:bg-dark-bg-primary","dark:border-dark-border-primary","shadow-lg",d].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{ref:m,className:"relative inline-block",children:[l?e.jsx("div",{onClick:B,role:"button",tabIndex:o?-1:0,children:l(w)}):e.jsxs("button",{type:"button",className:j,onClick:B,disabled:o,"aria-label":x||(r==="icon-only"?"Abrir menú":void 0),"aria-haspopup":"true","aria-expanded":w,children:[r==="default"&&e.jsx("span",{children:a||h}),e.jsx(Fe,{})]}),w&&e.jsx("div",{ref:i,className:A,children:n.map((C,v)=>C.isDivider?e.jsx(qe,{className:C.className},v):C.isHeading?e.jsx(We,{className:C.className,children:C.children},v):e.jsx(Oe,{...C,onClick:()=>k(C)},v))})]})},Oe=({children:r,icon:a,description:n,shortcut:t,disabled:s=!1,selected:o=!1,onClick:c,className:d=""})=>{const x=["flex","items-center","gap-3","px-4","py-2","rounded-lg","text-sm","font-normal","w-full","text-left","text-content-primary",!s&&"hover:bg-bg-primary",o&&"bg-bg-primary","dark:text-dark-content-primary",!s&&"dark:hover:bg-dark-bg-secondary",o&&"dark:bg-dark-bg-secondary",s&&"opacity-50",s&&"cursor-not-allowed",!s&&"cursor-pointer",d].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",className:x,onClick:c,disabled:s,children:[a&&e.jsx("span",{className:"inline-flex items-center justify-center w-4 h-4 text-content-secondary dark:text-dark-content-secondary",children:a}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-content-primary dark:text-dark-content-primary",children:r}),n&&e.jsx("div",{className:"text-xs text-content-secondary dark:text-dark-content-secondary mt-0.5",children:n})]}),t&&e.jsx("span",{className:"text-xs text-content-secondary dark:text-dark-content-secondary ml-auto whitespace-nowrap",children:t})]})},We=({children:r,className:a=""})=>{const n=["px-4","py-1","text-xs","font-normal","text-content-tertiary","dark:text-dark-content-tertiary",a].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{className:n,children:r})},qe=({className:r=""})=>{const a=["px-4","py-1",r].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{className:a,children:e.jsx("div",{className:"h-px bg-border-primary dark:bg-dark-border-primary"})})},Ue=({className:r=""})=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:e.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),ae=({label:r,icon:a,children:n=[],defaultOpen:t=!1,disabled:s=!1,onOpenChange:o,onClick:c,isCollapsible:d=n.length>0,showHeading:x=!1,headingLabel:h,showDivider:l=!0,selected:u=!1,badge:p=!1,badgeCount:g,badgeColor:f="red",className:m=""})=>{const[i,b]=y.useState(t),w=()=>{if(s||!d)return;const k=!i;b(k),o?.(k)},N=k=>{s||(d?w():c?.(k))},B=k=>j=>{k.disabled||k.onClick?.(j)};return e.jsxs("div",{className:`flex flex-col gap-0.5 w-full ${m}`,children:[x&&h&&e.jsx("div",{className:"flex flex-col gap-0 items-start pb-1 pt-3 px-0 w-full",children:e.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal leading-4 not-italic text-xs text-content-tertiary dark:text-content-tertiary w-full",children:h})}),e.jsxs("button",{onClick:N,disabled:s,className:["flex items-center gap-3 px-4 py-2 w-full","rounded-lg cursor-pointer","transition-all duration-150",u&&!s&&"bg-primary-custom-100 text-primary-custom-600",!u&&!s&&"text-content-primary",!s&&"hover:bg-primary-custom-100",!s&&"hover:text-primary-custom-600",u&&!s&&"dark:bg-dark-bg-custom dark:text-dark-content-custom",!u&&!s&&"dark:text-content-primary",!s&&"dark:hover:bg-dark-bg-custom",!s&&"dark:hover:text-dark-content-custom",!s&&"focus:outline-hidden",!s&&"focus:ring-2",!s&&"focus:ring-offset-2",!s&&"focus:ring-primary-custom-400",!s&&"focus:ring-offset-bg-primary",!s&&"dark:focus:ring-offset-dark-bg-primary",s&&"opacity-50",s&&"cursor-not-allowed"].filter(Boolean).join(" "),"aria-expanded":i&&d,"aria-disabled":s,children:[a&&e.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:a}),e.jsx("div",{className:"flex flex-1 flex-col items-start justify-center gap-0.5",children:e.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal leading-5 not-italic text-sm text-left",children:r})}),(p||g)&&e.jsx("div",{className:"flex items-center justify-center shrink-0",children:g?e.jsx("div",{className:"flex items-center justify-center px-1.5 py-0.5 rounded-full bg-red-500 dark:bg-red-600 text-white text-xs font-bold min-w-6 h-6",children:g>99?"99+":g}):e.jsx("div",{className:"w-2 h-2 rounded-full bg-red-500 dark:bg-red-600 shrink-0"})}),d&&e.jsx("div",{className:["flex items-center justify-center w-4 h-4 shrink-0","text-content-secondary dark:text-content-secondary","transition-transform duration-200",i?"rotate-180":"rotate-0"].join(" "),children:e.jsx(Ue,{className:"w-4 h-4"})})]}),l&&e.jsx("div",{className:"w-full h-px bg-border-primary dark:bg-dark-border-primary"}),i&&d&&n.length>0&&e.jsx("div",{className:"flex flex-col gap-0.5 w-full py-2 px-0",children:n.map((k,j)=>e.jsxs("div",{onClick:B(k),className:["flex gap-3 items-center pl-6 pr-4 py-2 w-full","rounded-lg cursor-pointer","transition-all duration-150",!k.disabled&&"text-content-primary",!k.disabled&&"hover:bg-primary-custom-100",!k.disabled&&"hover:text-primary-custom-600",!k.disabled&&"dark:text-content-primary",!k.disabled&&"dark:hover:bg-dark-bg-custom",!k.disabled&&"dark:hover:text-dark-content-custom",!k.disabled&&"focus:outline-hidden",!k.disabled&&"focus:ring-2",!k.disabled&&"focus:ring-offset-2",!k.disabled&&"focus:ring-primary-custom-400",!k.disabled&&"focus:ring-offset-bg-primary",!k.disabled&&"dark:focus:ring-offset-dark-bg-primary",k.disabled&&"opacity-50",k.disabled&&"cursor-not-allowed",k.className].filter(Boolean).join(" "),children:[k.icon&&e.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:k.icon}),e.jsx("div",{className:"flex flex-1 flex-col items-start justify-center gap-0.5",children:e.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal leading-5 not-italic text-sm text-left",children:k.label})})]},j))})]})},_e=({className:r="w-4 h-4"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:r,children:e.jsx("path",{fillRule:"evenodd",d:"M6.455 1.45A.5.5 0 0 1 6.952 1h2.096a.5.5 0 0 1 .497.45l.186 1.858a4.996 4.996 0 0 1 1.466.848l1.703-.769a.5.5 0 0 1 .639.206l1.047 1.814a.5.5 0 0 1-.14.656l-1.517 1.09a5.026 5.026 0 0 1 0 1.694l1.516 1.09a.5.5 0 0 1 .141.656l-1.047 1.814a.5.5 0 0 1-.639.206l-1.703-.768c-.433.36-.928.649-1.466.847l-.186 1.858a.5.5 0 0 1-.497.45H6.952a.5.5 0 0 1-.497-.45l-.186-1.858a4.993 4.993 0 0 1-1.466-.848l-1.703.769a.5.5 0 0 1-.639-.206l-1.047-1.814a.5.5 0 0 1 .14-.656l1.517-1.09a5.033 5.033 0 0 1 0-1.694l-1.516-1.09a.5.5 0 0 1-.141-.656L2.461 3.39a.5.5 0 0 1 .639-.206l1.703.768c.433-.36.928-.649 1.466-.847l.186-1.858ZM8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",clipRule:"evenodd"})}),Ge=({className:r="w-4 h-4"})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:r,children:[e.jsx("path",{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 1 1-1.06-1.06L12.69 4.22a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}),e.jsx("path",{fillRule:"evenodd",d:"M2.22 9.28a.75.75 0 0 0 0 1.06l2.5 2.5a.75.75 0 1 0 1.06-1.06l-2.5-2.5a.75.75 0 0 0-1.06 0Z",clipRule:"evenodd"})]}),Qe=({className:r="w-4 h-4"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:r,children:e.jsx("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"})}),Ke=({className:r="w-4 h-4"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:r,children:e.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),Xe={"cog-6-tooth":_e,check:Ge,x:Qe,"chevron-down":Ke},Je=(r,a)=>{if(!r)return null;const n=Xe[r];return n?e.jsx(n,{className:a}):(console.warn(`Icon "${r}" not found in iconMap`),null)},ie=({label:r="Label",description:a,showDescription:n=!0,iconName:t="cog-6-tooth",showIcon:s=!0,actionLabel:o,showAction:c=!1,onActionClick:d,className:x="",...h})=>e.jsxs("div",{className:`
|
|
464
|
+
flex
|
|
465
|
+
gap-3
|
|
466
|
+
items-center
|
|
467
|
+
px-4
|
|
468
|
+
py-2
|
|
469
|
+
rounded-lg
|
|
470
|
+
w-56
|
|
471
|
+
${x}
|
|
472
|
+
`,"data-testid":"dropdown-item-heading",...h,children:[s&&t&&e.jsx("div",{className:`
|
|
473
|
+
flex
|
|
474
|
+
items-center
|
|
475
|
+
justify-center
|
|
476
|
+
shrink-0
|
|
477
|
+
w-4
|
|
478
|
+
h-4
|
|
479
|
+
`,"data-testid":"icon-wrapper",children:e.jsx("div",{className:"text-primary-custom-600 dark:text-dark-content-inverse",children:Je(t,"w-4 h-4")})}),e.jsxs("div",{className:`
|
|
480
|
+
flex
|
|
481
|
+
flex-1
|
|
482
|
+
flex-col
|
|
483
|
+
gap-0.5
|
|
484
|
+
items-start
|
|
485
|
+
justify-center
|
|
486
|
+
min-w-0
|
|
487
|
+
`,"data-testid":"content-wrapper",children:[e.jsx("p",{className:`
|
|
488
|
+
font-bold
|
|
489
|
+
text-sm
|
|
490
|
+
leading-5
|
|
491
|
+
text-content-primary
|
|
492
|
+
dark:text-dark-content-inverse
|
|
493
|
+
whitespace-nowrap
|
|
494
|
+
overflow-hidden
|
|
495
|
+
text-ellipsis
|
|
496
|
+
`,"data-testid":"label",children:r}),n&&a&&e.jsx("p",{className:`
|
|
497
|
+
font-normal
|
|
498
|
+
text-xs
|
|
499
|
+
leading-4
|
|
500
|
+
text-content-secondary
|
|
501
|
+
dark:text-dark-border-inverse
|
|
502
|
+
w-full
|
|
503
|
+
whitespace-pre-wrap
|
|
504
|
+
overflow-hidden
|
|
505
|
+
text-ellipsis
|
|
506
|
+
`,"data-testid":"description",children:a})]}),c&&o&&e.jsx("div",{className:`
|
|
507
|
+
flex
|
|
508
|
+
items-center
|
|
509
|
+
justify-center
|
|
510
|
+
shrink-0
|
|
511
|
+
cursor-pointer
|
|
512
|
+
hover:opacity-80
|
|
513
|
+
transition-opacity
|
|
514
|
+
duration-150
|
|
515
|
+
`,"data-testid":"action-wrapper",onClick:d,role:"button",tabIndex:0,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&d?.(l)},children:e.jsx("p",{className:`
|
|
516
|
+
font-normal
|
|
517
|
+
text-xs
|
|
518
|
+
leading-3
|
|
519
|
+
text-content-secondary
|
|
520
|
+
dark:text-dark-border-inverse
|
|
521
|
+
whitespace-nowrap
|
|
522
|
+
`,"data-testid":"action-label",children:o})})]});ie.displayName="DropdownItemHeading";const Ye=({count:r,color:a="red",className:n="",ariaLabel:t})=>{const s={zinc:{bg:"bg-zinc-600",text:"text-white"},red:{bg:"bg-content-extensions-red",text:"text-white"},orange:{bg:"bg-orange-700",text:"text-white"},amber:{bg:"bg-amber-700",text:"text-white"},yellow:{bg:"bg-yellow-700",text:"text-white"},lime:{bg:"bg-lime-700",text:"text-white"},green:{bg:"bg-green-700",text:"text-white"},emerald:{bg:"bg-emerald-700",text:"text-white"},teal:{bg:"bg-teal-700",text:"text-white"},cyan:{bg:"bg-cyan-700",text:"text-white"},sky:{bg:"bg-sky-700",text:"text-white"},blue:{bg:"bg-blue-700",text:"text-white"},indigo:{bg:"bg-indigo-700",text:"text-white"},violet:{bg:"bg-violet-700",text:"text-white"},purple:{bg:"bg-purple-700",text:"text-white"},fuchsia:{bg:"bg-fuchsia-700",text:"text-white"},pink:{bg:"bg-pink-700",text:"text-white"},rose:{bg:"bg-rose-700",text:"text-white"},primary:{bg:"bg-primary-custom-600",text:"text-white"},secondary:{bg:"bg-zinc-600",text:"text-white"},tertiary:{bg:"bg-zinc-600",text:"text-white"}},o=s[a]||s.red,c=t||(r!==void 0&&r>0?`${r} notificaci${r===1?"ón":"ones"}`:"Notificación pendiente");if(r!==void 0&&r>0){const d=r>99?"99+":r.toString();return e.jsx("span",{className:`
|
|
433
523
|
inline-flex
|
|
434
524
|
items-center
|
|
435
525
|
justify-center
|
|
@@ -446,7 +536,7 @@
|
|
|
446
536
|
dark:${o.bg}
|
|
447
537
|
dark:${o.text}
|
|
448
538
|
${n}
|
|
449
|
-
`.trim().replace(/\s+/g," "),role:"status","aria-label":
|
|
539
|
+
`.trim().replace(/\s+/g," "),role:"status","aria-label":c,children:d})}return e.jsx("span",{className:`
|
|
450
540
|
inline-block
|
|
451
541
|
w-2
|
|
452
542
|
h-2
|
|
@@ -455,7 +545,7 @@
|
|
|
455
545
|
pointer-events-none
|
|
456
546
|
dark:${o.bg}
|
|
457
547
|
${n}
|
|
458
|
-
`.trim().replace(/\s+/g," "),role:"status","aria-label":
|
|
548
|
+
`.trim().replace(/\s+/g," "),role:"status","aria-label":c})},er=({className:r=""})=>e.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M9.78 4.22a.75.75 0 0 1 0 1.06L7.06 8l2.72 2.72a.75.75 0 1 1-1.06 1.06L5.47 8.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"})}),rr=({className:r=""})=>e.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),tr=({currentPage:r=1,totalPages:a,onPageChange:n,backText:t="Atrás",nextText:s="Siguiente",siblingCount:o=1,showBackButton:c=!0,showNextButton:d=!0,className:x="",ariaLabel:h="Paginación"})=>{const l=y.useMemo(()=>{const m=o*2+3+2;if(a<=m)return Array.from({length:a},(j,R)=>R+1);const i=Math.max(r-o,1),b=Math.min(r+o,a),w=i>2,N=b<a-1,B=1,k=a;if(!w&&N){const j=3+2*o;return[...Array.from({length:j},(A,C)=>C+1),"...",a]}if(w&&!N){const j=3+2*o,R=Array.from({length:j},(A,C)=>a-j+C+1);return[B,"...",...R]}if(w&&N){const j=Array.from({length:b-i+1},(R,A)=>i+A);return[B,"...",...j,"...",k]}return[]},[r,a,o]),u=f=>{f>=1&&f<=a&&f!==r&&n?.(f)},p=({page:f,isActive:m=!1,disabled:i=!1,onClick:b,ariaLabel:w})=>{const N=f==="...",R=[`
|
|
459
549
|
inline-flex
|
|
460
550
|
items-center
|
|
461
551
|
justify-center
|
|
@@ -468,12 +558,12 @@
|
|
|
468
558
|
whitespace-nowrap
|
|
469
559
|
transition-all
|
|
470
560
|
duration-150
|
|
471
|
-
`,
|
|
561
|
+
`,N?`
|
|
472
562
|
text-primary-custom-600
|
|
473
563
|
dark:text-primary-custom-600
|
|
474
564
|
cursor-default
|
|
475
565
|
pointer-events-none
|
|
476
|
-
`:
|
|
566
|
+
`:m?`
|
|
477
567
|
bg-primary-custom-100
|
|
478
568
|
text-primary-custom-600
|
|
479
569
|
dark:bg-primary-custom-100
|
|
@@ -485,17 +575,17 @@
|
|
|
485
575
|
dark:text-primary-custom-600
|
|
486
576
|
dark:hover:bg-primary-custom-100
|
|
487
577
|
dark:active:scale-95
|
|
488
|
-
`,
|
|
578
|
+
`,i?`
|
|
489
579
|
opacity-50
|
|
490
580
|
cursor-not-allowed
|
|
491
581
|
pointer-events-none
|
|
492
|
-
`:""].join(" ").replace(/\s+/g," ").trim();return e.jsx("button",{type:"button",className:
|
|
582
|
+
`:""].join(" ").replace(/\s+/g," ").trim();return e.jsx("button",{type:"button",className:R,onClick:b,disabled:i||N,"aria-label":w,"aria-current":m?"page":void 0,children:f})},g=`
|
|
493
583
|
inline-flex
|
|
494
584
|
items-center
|
|
495
585
|
justify-between
|
|
496
586
|
gap-0
|
|
497
|
-
${
|
|
498
|
-
`.replace(/\s+/g," ").trim();return e.jsxs("nav",{className:
|
|
587
|
+
${x}
|
|
588
|
+
`.replace(/\s+/g," ").trim();return e.jsxs("nav",{className:g,"aria-label":h,role:"navigation",children:[c&&e.jsxs("button",{type:"button",className:`
|
|
499
589
|
inline-flex
|
|
500
590
|
items-center
|
|
501
591
|
justify-center
|
|
@@ -513,8 +603,8 @@
|
|
|
513
603
|
dark:active:scale-95
|
|
514
604
|
transition-all
|
|
515
605
|
duration-150
|
|
516
|
-
${
|
|
517
|
-
`.replace(/\s+/g," ").trim(),onClick:()=>
|
|
606
|
+
${r===1?"opacity-50 cursor-not-allowed pointer-events-none":""}
|
|
607
|
+
`.replace(/\s+/g," ").trim(),onClick:()=>u(r-1),disabled:r===1,"aria-label":`${t} page`,children:[e.jsx(er,{className:"w-4 h-4"}),t]}),e.jsx("div",{className:"inline-flex items-center",children:l.map((f,m)=>e.jsx(p,{page:f,isActive:f===r,onClick:()=>typeof f=="number"&&u(f),ariaLabel:typeof f=="number"?`Go to page ${f}`:`Page ${f}`},`${f}-${m}`))}),d&&e.jsxs("button",{type:"button",className:`
|
|
518
608
|
inline-flex
|
|
519
609
|
items-center
|
|
520
610
|
justify-center
|
|
@@ -532,8 +622,8 @@
|
|
|
532
622
|
dark:active:scale-95
|
|
533
623
|
transition-all
|
|
534
624
|
duration-150
|
|
535
|
-
${
|
|
536
|
-
`.replace(/\s+/g," ").trim(),onClick:()=>
|
|
625
|
+
${r===a?"opacity-50 cursor-not-allowed pointer-events-none":""}
|
|
626
|
+
`.replace(/\s+/g," ").trim(),onClick:()=>u(r+1),disabled:r===a,"aria-label":`${s} page`,children:[s,e.jsx(rr,{className:"w-4 h-4"})]})]})};function ar({title:r,titleId:a,...n},t){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},n),r?E.createElement("title",{id:a},r):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const sr=E.forwardRef(ar);function nr({title:r,titleId:a,...n},t){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},n),r?E.createElement("title",{id:a},r):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9"}))}const or=E.forwardRef(nr);function lr({title:r,titleId:a,...n},t){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},n),r?E.createElement("title",{id:a},r):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const ir=E.forwardRef(lr),dr=({className:r="size-5"})=>e.jsx(or,{className:r,"aria-hidden":"true"}),cr=({className:r="size-4"})=>e.jsx(sr,{className:r,"aria-hidden":"true"}),xr=({options:r=[],value:a,defaultValue:n,placeholder:t="Seleccionar...",disabled:s=!1,error:o=!1,label:c,description:d,showLabel:x=!0,showDescription:h=!0,menuHeader:l,onChange:u,className:p="",triggerClassName:g="",menuClassName:f="",ariaLabel:m,id:i,name:b,required:w=!1,menuPosition:N="bottom",fullWidth:B=!1})=>{const[k,j]=y.useState(!1),[R,A]=y.useState(a!==void 0?a:n),[C,v]=y.useState(-1),V=y.useRef(null),D=y.useRef(null),Z=y.useRef(null);y.useEffect(()=>{a!==void 0&&A(a)},[a]),y.useEffect(()=>{const L=O=>{V.current&&!V.current.contains(O.target)&&j(!1)};if(k)return document.addEventListener("mousedown",L),()=>{document.removeEventListener("mousedown",L)}},[k]),y.useEffect(()=>{const L=O=>{if(k)switch(O.key){case"Escape":j(!1),D.current?.focus();break;case"ArrowDown":O.preventDefault(),v(_=>_<r.length-1?_+1:0);break;case"ArrowUp":O.preventDefault(),v(_=>_>0?_-1:r.length-1);break;case"Enter":O.preventDefault(),C>=0&&C<r.length&&$(r[C]);break}};if(k)return document.addEventListener("keydown",L),()=>{document.removeEventListener("keydown",L)}},[k,C,r]);const P=r.find(L=>L.value===R),S=()=>{s||(j(!k),v(-1))},$=L=>{L.disabled||(A(L.value),j(!1),u?.(L.value),setTimeout(()=>{D.current?.focus()},0))},M=[`
|
|
537
627
|
inline-flex
|
|
538
628
|
items-center
|
|
539
629
|
justify-between
|
|
@@ -548,7 +638,7 @@
|
|
|
548
638
|
border
|
|
549
639
|
transition-all
|
|
550
640
|
duration-150
|
|
551
|
-
`,
|
|
641
|
+
`,B?"w-full":"min-w-[200px]",o?`
|
|
552
642
|
border-error-border
|
|
553
643
|
bg-error-bg
|
|
554
644
|
text-content-primary
|
|
@@ -562,22 +652,20 @@
|
|
|
562
652
|
dark:bg-dark-bg-primary
|
|
563
653
|
dark:border-dark-border-primary
|
|
564
654
|
dark:text-dark-content-primary
|
|
565
|
-
`,!
|
|
566
|
-
hover:
|
|
567
|
-
hover:
|
|
568
|
-
|
|
569
|
-
dark:hover:bg-[linear-gradient(90deg,rgba(255,255,255,0.1)_0%,rgba(255,255,255,0.1)_100%)]
|
|
570
|
-
`:"",a?"":`
|
|
655
|
+
`,!s&&!o?`
|
|
656
|
+
hover:border-[#f9f9f9]
|
|
657
|
+
dark:hover:border-[#3a3a3f]
|
|
658
|
+
`:"",s?"":`
|
|
571
659
|
focus:outline-hidden
|
|
572
660
|
focus:ring-2
|
|
573
661
|
focus:ring-primary-custom-400
|
|
574
662
|
focus:ring-offset-2
|
|
575
663
|
dark:focus:ring-dark-border-custom
|
|
576
664
|
dark:focus:ring-offset-dark-bg-primary
|
|
577
|
-
`,
|
|
665
|
+
`,s?`
|
|
578
666
|
opacity-50
|
|
579
667
|
cursor-not-allowed
|
|
580
|
-
`:"",
|
|
668
|
+
`:"",g].join(" ").replace(/\s+/g," ").trim(),Ae=[`
|
|
581
669
|
absolute
|
|
582
670
|
z-50
|
|
583
671
|
w-full
|
|
@@ -586,13 +674,16 @@
|
|
|
586
674
|
overflow-y-auto
|
|
587
675
|
p-1
|
|
588
676
|
rounded-md
|
|
589
|
-
border
|
|
677
|
+
border
|
|
678
|
+
shadow-lg
|
|
590
679
|
transition-all
|
|
591
680
|
duration-150
|
|
592
|
-
`,
|
|
681
|
+
`,N==="top"?"bottom-full mb-1":"top-full mt-1",`
|
|
593
682
|
bg-background-secondary
|
|
683
|
+
border-border-secondary
|
|
594
684
|
dark:bg-dark-bg-primary
|
|
595
|
-
|
|
685
|
+
dark:border-dark-border-primary
|
|
686
|
+
`,k?"opacity-100 visible":"opacity-0 invisible",f].join(" ").replace(/\s+/g," ").trim(),Ze=`
|
|
596
687
|
flex
|
|
597
688
|
items-center
|
|
598
689
|
cursor-pointer
|
|
@@ -606,7 +697,62 @@
|
|
|
606
697
|
text-[10px]
|
|
607
698
|
leading-[12px]
|
|
608
699
|
font-bold
|
|
609
|
-
`,
|
|
700
|
+
`,Ee=(L,O)=>{const _=L.value===R,xe=O===C,De=xe||_&&xe?"bg-primary-custom-600 text-primary-inverse-content dark:bg-primary-custom-600 dark:text-primary-inverse-content":"text-content-primary dark:text-dark-content-primary",Pe=L.disabled?"":"hover:bg-primary-custom-600 hover:text-primary-inverse-content dark:hover:bg-primary-custom-600 dark:hover:text-primary-inverse-content",Te=L.disabled?"opacity-50 cursor-not-allowed":"";return[Ze,De,Pe,Te].join(" ").replace(/\s+/g," ").trim()},Ve=["shrink-0","w-4","h-4","transition-transform","duration-150",k&&"rotate-180",s?"text-content-tertiary dark:text-content-tertiary":"text-content-secondary dark:text-content-secondary"].filter(Boolean).join(" ").replace(/\s+/g," ").trim(),ze="shrink-0 w-4 h-4";return e.jsxs("div",{className:`relative ${B?"w-full":""} ${p}`,ref:V,children:[x&&c||h&&d?e.jsxs("div",{className:"flex flex-col gap-1 mb-1 w-full",children:[x&&c&&e.jsxs("label",{htmlFor:i,className:"text-sm font-bold leading-5 text-content-primary dark:text-dark-content-primary",children:[c,w&&e.jsx("span",{className:"ml-1 text-error-content",children:"*"})]}),h&&d&&e.jsx("p",{className:"text-sm font-normal leading-5 text-content-tertiary dark:text-content-tertiary",children:d})]}):null,e.jsxs("button",{ref:D,type:"button",className:M,onClick:S,disabled:s,"aria-label":m||c,"aria-haspopup":"listbox","aria-expanded":k,id:i,children:[e.jsx("span",{className:P?"":"text-content-secondary dark:text-content-secondary",children:P?P.label:t}),e.jsx(dr,{className:Ve})]}),b&&e.jsx("input",{type:"hidden",name:b,value:R!==void 0?String(R):""}),k&&e.jsxs("div",{ref:Z,className:Ae,role:"listbox",children:[l&&e.jsx("div",{className:"flex items-center gap-0.5 px-6 py-0.5 rounded-[5px]",children:e.jsx("span",{className:"text-[10px] font-bold leading-[12px] text-content-tertiary dark:text-content-tertiary",children:l})}),r.length===0&&e.jsx("div",{className:"px-2 py-1.5 text-[10px] leading-[12px] text-content-secondary dark:text-content-secondary",children:"No hay opciones disponibles"}),r.map((L,O)=>e.jsxs("div",{className:Ee(L,O),onClick:()=>$(L),onMouseEnter:()=>v(O),role:"option","aria-selected":L.value===R,"aria-disabled":L.disabled,children:[e.jsx("div",{className:"w-4 flex items-center justify-center",children:L.value===R&&e.jsx(cr,{className:ze})}),L.icon&&e.jsx("span",{className:"shrink-0 w-4 h-4",children:L.icon}),e.jsx("span",{className:"flex-1 text-left",children:L.label})]},L.value))]})]})},mr=({icon:r,label:a,selected:n=!1,disabled:t=!1,badge:s=!1,badgeCount:o,onClick:c,ariaLabel:d,id:x})=>{const h=["flex","flex-col","items-center","justify-center","px-4","py-1","rounded-full","overflow-hidden","shrink-0",n?"bg-primary-custom-100 dark:bg-primary-custom-600/30":"bg-transparent hover:bg-primary-custom-100 dark:hover:bg-primary-custom-600/20","transition-colors","duration-150"].join(" "),l=["w-4","h-4","shrink-0",n||!t?n?"text-primary-custom-600 dark:text-white":"text-content-primary hover:text-primary-custom-600 dark:text-dark-content-primary dark:hover:text-white":"text-content-tertiary dark:text-content-tertiary","transition-colors","duration-150"].join(" "),u=["text-[10px]","leading-3","font-bold","text-center","w-full","min-w-full","text-content-primary","dark:text-dark-content-primary"].join(" "),p=["relative","flex","flex-col","items-center","gap-1","px-0.5","py-0","w-14","shrink-0",t?"cursor-not-allowed opacity-50 pointer-events-none":"cursor-pointer","focus:outline-hidden","focus-visible:ring-2","focus-visible:ring-primary-custom-400","focus-visible:ring-offset-2","dark:focus-visible:ring-dark-border-custom","dark:focus-visible:ring-offset-dark-bg-primary","rounded-lg"].join(" "),g=()=>!s&&o===void 0?null:o!==void 0?e.jsx("span",{className:`
|
|
701
|
+
absolute
|
|
702
|
+
-top-0.5
|
|
703
|
+
left-[34px]
|
|
704
|
+
flex
|
|
705
|
+
items-center
|
|
706
|
+
justify-center
|
|
707
|
+
min-w-[13px]
|
|
708
|
+
h-[13px]
|
|
709
|
+
px-1
|
|
710
|
+
rounded-full
|
|
711
|
+
text-[10px]
|
|
712
|
+
font-bold
|
|
713
|
+
leading-none
|
|
714
|
+
bg-red-700
|
|
715
|
+
text-white
|
|
716
|
+
dark:bg-red-700
|
|
717
|
+
dark:text-white
|
|
718
|
+
pointer-events-none
|
|
719
|
+
`,"aria-label":`${o} notificaciones`,children:o>99?"99+":o}):e.jsx("span",{className:`
|
|
720
|
+
absolute
|
|
721
|
+
-top-0.5
|
|
722
|
+
left-[34px]
|
|
723
|
+
w-[13px]
|
|
724
|
+
h-[13px]
|
|
725
|
+
rounded-full
|
|
726
|
+
bg-red-700
|
|
727
|
+
dark:bg-red-700
|
|
728
|
+
pointer-events-none
|
|
729
|
+
`,"aria-label":"Notificación"});return e.jsxs("button",{type:"button",className:p,disabled:t,onClick:c,"aria-label":d||a,"aria-current":n?"page":void 0,"data-item-id":x,children:[e.jsx("div",{className:h,children:e.jsx("span",{className:l,children:r})}),e.jsx("p",{className:u,children:a}),g()]})},ur=({items:r,alignment:a="top",showFab:n=!1,fabIcon:t,onFabClick:s,fabAriaLabel:o="Crear nuevo",className:c="",selectedId:d,onItemSelect:x})=>{const h=["flex","flex-col","items-center","relative","w-20","h-full","bg-white","dark:bg-dark-bg-primary","border-r","border-border-primary","dark:border-dark-border-primary",c].join(" "),l=["flex","flex-col","items-center","gap-10","w-20","pb-10","pt-2",a!=="top"&&"grow",a!=="top"&&"basis-0",a!=="top"&&"min-h-0"].filter(Boolean).join(" "),p=(()=>{const m=["flex","flex-col","items-center","gap-3","w-20"];return a==="top"?[...m,"shrink-0"].join(" "):a==="center"?[...m,"absolute","left-1/2","top-1/2","-translate-x-1/2","-translate-y-1/2"].join(" "):a==="bottom"?[...m,"grow","basis-0","min-h-0","justify-end","shrink-0"].join(" "):m.join(" ")})(),g=["flex","items-center","justify-center","p-3","shrink-0","rounded-md","bg-primary-custom-600","text-primary-inverse-content","border","border-primary-custom-600","shadow-button-inset","hover:bg-primary-custom-500","active:scale-95","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","focus:ring-offset-2","dark:bg-dark-bg-inverse","dark:text-dark-content-inverse","dark:border-dark-bg-inverse","dark:hover:bg-dark-bg-inverse/90","dark:focus:ring-dark-border-custom","dark:focus:ring-offset-dark-bg-primary","transition-all","duration-150"].join(" "),f=m=>{m.disabled||(m.onClick&&m.onClick(),x&&m.id&&x(m.id))};return e.jsx("nav",{className:h,"aria-label":"Navegación principal",children:e.jsxs("div",{className:l,children:[n&&e.jsx("div",{className:"flex items-start gap-2.5 shrink-0",children:e.jsx("button",{type:"button",className:g,onClick:s,"aria-label":o,children:e.jsx("span",{className:"w-4 h-4 flex items-center justify-center",children:t})})}),e.jsx("div",{className:p,children:r.map((m,i)=>e.jsx(mr,{...m,selected:m.selected||d!==void 0&&m.id===d,onClick:()=>f(m)},m.id||i))})]})})},Ne=({height:r=900,width:a=248,showHeading:n=!0,heading:t,showSearch:s=!0,search:o,sections:c,items:d,className:x="",panelClassName:h=""})=>{const[l,u]=y.useState(o?.value||""),p=m=>{u(m),o?.onChange?.(m)},g={height:typeof r=="number"?`${r}px`:r},f={width:typeof a=="number"?`${a}px`:a};return e.jsx("div",{className:`flex items-start relative ${x}`,style:g,"data-testid":"navigation-rail-panel-container",children:e.jsxs("div",{className:`bg-bg-primary dark:bg-dark-bg-primary border-border-primary dark:border-dark-border-primary border-b-0 border-l border-r border-solid border-t-0 flex flex-col h-full items-start overflow-clip relative shrink-0 ${h}`,style:f,"data-testid":"navigation-rail-panel",children:[n&&t&&e.jsx("div",{className:"flex flex-col items-start p-3 relative shrink-0 w-full",children:e.jsx(ie,{label:t.label,description:t.description,showDescription:t.showDescription!==!1,iconName:t.iconName,showIcon:!0,actionLabel:t.actionLabel,showAction:t.showAction,onActionClick:t.onActionClick,className:"w-full"})}),s&&e.jsx("div",{className:"flex flex-col items-start p-3 relative shrink-0 w-full","data-testid":"navigation-rail-search",children:e.jsx(Y,{placeholder:o?.placeholder||"Buscar módulo",value:l,onChange:m=>p(m.target.value),className:"w-full"})}),e.jsx(U,{className:"w-full"}),e.jsxs("div",{className:"flex flex-1 flex-col gap-0.5 items-start min-h-px min-w-px p-3 relative shrink-0 overflow-y-auto w-full","data-testid":"navigation-rail-body",children:[c&&c.length>0?c.map((m,i)=>e.jsxs("div",{className:"w-full",children:[m.heading&&e.jsx("div",{className:"flex flex-col gap-0 items-start pb-1 pt-3 px-0 relative shrink-0 w-full","data-testid":`section-heading-${i}`,children:e.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal text-xs leading-4 not-italic relative shrink-0 text-content-tertiary dark:text-content-tertiary w-full whitespace-pre-wrap",children:m.heading})}),e.jsx("div",{className:"flex flex-col gap-0.5 items-start relative shrink-0 w-full","data-testid":`section-items-${i}`,children:m.items.map((b,w)=>e.jsx(me,{item:b},`item-${i}-${w}`))}),m.showDivider!==!1&&i<c.length-1&&e.jsx(U,{className:"mt-3 w-full"})]},`section-${i}`)):null,d&&d.length>0&&!c?d.map((m,i)=>e.jsx(me,{item:m},`item-${i}`)):null]})]})})},me=({item:r})=>r.isCollapsible?e.jsx(ae,{label:r.label,icon:r.icon,children:r.children,defaultOpen:r.defaultOpen,disabled:r.disabled,onClick:r.onClick,onOpenChange:r.onOpenChange,className:r.className,showDivider:!1,showHeading:!1}):e.jsxs("button",{onClick:r.onClick,disabled:r.disabled,className:["flex items-center gap-3 px-4 py-2 w-full","rounded-lg cursor-pointer","transition-colors duration-150",!r.disabled&&"text-content-primary",!r.disabled&&"hover:bg-primary-custom-100",!r.disabled&&"dark:text-content-primary",!r.disabled&&"dark:hover:bg-dark-bg-custom",!r.disabled&&"focus:outline-hidden",!r.disabled&&"focus:ring-2",!r.disabled&&"focus:ring-offset-2",!r.disabled&&"focus:ring-primary-custom-400",!r.disabled&&"focus:ring-offset-bg-primary",!r.disabled&&"dark:focus:ring-offset-dark-bg-primary",r.disabled&&"opacity-50",r.disabled&&"cursor-not-allowed",r.className].filter(Boolean).join(" "),"data-testid":`navigation-rail-item-${r.label}`,"aria-disabled":r.disabled,children:[r.icon&&e.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:r.icon}),e.jsx("p",{className:"font-['Inter:Regular',sans-serif] text-sm font-normal leading-5 not-italic relative shrink-0 text-left",children:r.label})]});function pr({title:r,titleId:a,...n},t){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},n),r?E.createElement("title",{id:a},r):null,E.createElement("path",{fillRule:"evenodd",d:"M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))}const fr=E.forwardRef(pr);function hr({title:r,titleId:a,...n},t){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},n),r?E.createElement("title",{id:a},r):null,E.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const br=E.forwardRef(hr);function gr({title:r,titleId:a,...n},t){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},n),r?E.createElement("title",{id:a},r):null,E.createElement("path",{fillRule:"evenodd",d:"M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Z",clipRule:"evenodd"}))}const Ce=E.forwardRef(gr),vr=({className:r="size-5"})=>e.jsx(br,{className:r,"aria-hidden":"true"}),kr=({className:r="size-5"})=>e.jsx(fr,{className:r,"aria-hidden":"true"}),ue=({className:r="size-5"})=>e.jsx(ir,{className:r,"aria-hidden":"true"}),pe=({className:r="size-5"})=>e.jsx(Ce,{className:r,"aria-hidden":"true"}),de=y.forwardRef(({collapsed:r=!0,items:a=[],showRecentButton:n=!0,showSearchButton:t=!0,onCollapsedChange:s,onItemClick:o,onItemHover:c,className:d,labels:x={}},h)=>{const[l,u]=y.useState(""),p={searchButton:x.searchButton??"Search",searchPlaceholder:x.searchPlaceholder??"Buscar módulo",recentButton:x.recentButton??"Recientes",collapseButton:x.collapseButton??"Colapsar",expandButton:x.expandButton??"Expandir"},g=()=>{s?.(!r)},f=(i,b)=>{b.onClick?.(new Event("click")),o?.(i,b)},m=(i,b)=>{c?.(i,b)};return e.jsxs("div",{ref:h,className:`
|
|
730
|
+
${r?"w-[80px]":"w-[215px]"}
|
|
731
|
+
h-full
|
|
732
|
+
bg-background-primary dark:bg-background-primary
|
|
733
|
+
${r?"border-r border-border-primary dark:border-border-primary":"border-l border-r border-border-primary dark:border-border-primary"}
|
|
734
|
+
border-solid
|
|
735
|
+
flex flex-col
|
|
736
|
+
items-center
|
|
737
|
+
relative
|
|
738
|
+
transition-all duration-300
|
|
739
|
+
${d||""}
|
|
740
|
+
`,children:[!r&&e.jsxs("div",{className:"w-full flex flex-col gap-3 px-3 py-3 relative shrink-0",children:[e.jsx(Y,{placeholder:p.searchPlaceholder,value:l,onChange:i=>u(i.target.value),leftIcon:e.jsx(pe,{className:"size-4 text-content-secondary dark:text-content-secondary"}),fullWidth:!0}),e.jsx(U,{className:"w-full"})]}),e.jsxs("div",{className:`
|
|
741
|
+
flex-1 flex flex-col
|
|
742
|
+
items-center min-h-px min-w-px
|
|
743
|
+
relative shrink-0
|
|
744
|
+
px-0
|
|
745
|
+
${r?"gap-7 py-2 w-[80px]":"gap-0.5 p-3 w-full bg-background-primary dark:bg-background-primary border-l dark:border-border-primary border-border-primary border-solid"}
|
|
746
|
+
`,children:[r&&t&&e.jsx(z,{type:"default",size:"xl",iconOnly:!0,leftIcon:e.jsx(pe,{className:"overflow-clip relative shrink-0 size-4 text-primary-inverse-content dark:text-primary-inverse-content"}),ariaLabel:p.searchButton}),e.jsx("div",{className:`
|
|
747
|
+
flex flex-col items-center min-h-px min-w-px
|
|
748
|
+
relative shrink-0
|
|
749
|
+
flex-1
|
|
750
|
+
overflow-hidden
|
|
751
|
+
${r?"gap-3 leading-none w-[80px]":"gap-0.5 p-3 w-full"}
|
|
752
|
+
`,children:a.length===0?e.jsxs(e.Fragment,{children:[r&&Array.from({length:4}).map((i,b)=>e.jsx(te,{id:`demo-collapsed-${b}`,label:"Item",icon:e.jsx("svg",{className:"size-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12a9 9 0 1118 0 9 9 0 01-18 0z"})}),showLabelText:!1},`demo-collapsed-${b}`)),!r&&Array.from({length:6}).map((i,b)=>e.jsx(ae,{label:"Item",showDivider:!1,showHeading:!1},`demo-expanded-${b}`))]}):r?e.jsx(e.Fragment,{children:a.map((i,b)=>e.jsx(te,{id:i.id,label:i.label,icon:i.icon,selected:i.active,disabled:i.disabled,badge:i.badge,badgeCount:i.badgeCount,ariaLabel:i.ariaLabel,showLabelText:!1,onClick:()=>f(b,i),onMouseEnter:()=>m(b,i),onMouseLeave:i.onMouseLeave},i.id))}):e.jsx(e.Fragment,{children:a.map((i,b)=>{const w=i.children&&i.children.length>0;return e.jsx("div",{className:"w-full",children:e.jsx(ae,{label:i.label,icon:i.icon,selected:i.active,disabled:i.disabled,badge:i.badge,badgeCount:i.badgeCount,badgeColor:i.badgeColor,showDivider:!1,showHeading:!1,isCollapsible:w,defaultOpen:i.defaultOpen,children:w?i.children:void 0,onClick:()=>f(b,i)})},i.id)})})}),e.jsxs("div",{className:`w-full flex flex-col gap-3 items-center relative shrink-0 ${r?"":"px-3"}`,children:[e.jsx(U,{className:"w-full"}),e.jsxs("div",{className:`
|
|
753
|
+
flex flex-col gap-3 relative shrink-0 w-full
|
|
754
|
+
${r?"items-stretch px-3":"items-stretch"}
|
|
755
|
+
`,children:[n&&r&&e.jsx(z,{type:"outline",size:"base",fullWidth:!0,leftIcon:e.jsx(ue,{className:"size-4 text-primary-custom-600 dark:text-primary-custom-600"}),ariaLabel:p.recentButton}),n&&!r&&e.jsx(z,{type:"outline",size:"base",leftIcon:e.jsx(ue,{className:"size-4 text-primary-custom-600 dark:text-primary-custom-600"}),fullWidth:!0,children:p.recentButton}),r?e.jsx(z,{type:"plain",size:"base",fullWidth:!0,leftIcon:e.jsx(vr,{className:"overflow-clip relative shrink-0 size-4 text-background-inverse-custom-primary dark:text-background-inverse-custom-primary"}),onClick:g,ariaLabel:p.expandButton}):e.jsx(z,{type:"outline",size:"base",leftIcon:e.jsx(kr,{className:"overflow-clip relative shrink-0 size-4 text-content-custom-primary dark:text-content-custom-primary"}),onClick:g,fullWidth:!0,children:p.collapseButton})]})]})]})]})});de.displayName="NavigationRailTypes";const yr=({className:r="size-4"})=>e.jsx(Ce,{className:r,"aria-hidden":"true"}),se=y.forwardRef(({state:r="collapsed",items:a=[],onStateChange:n,onItemClick:t,onItemHover:s,labels:o={},className:c,showSearchButton:d=!0},x)=>{const[h,l]=y.useState(!1),[u,p]=y.useState("hover"),[g,f]=y.useState(null),m=y.useRef(null),i={searchPlaceholder:o.searchPlaceholder??"Buscar módulo",collapseButton:o.collapseButton??"Colapsar",recentSection:o.recentSection??"Recientes",frequentSection:o.frequentSection??"Opciones frecuentes"},b=r==="collapsed"||r==="hover"||r==="searcher";y.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const w=v=>{n?.(v?"collapsed":"expanded")},N=v=>{const V=a[v];V&&t?.(V)},B=v=>{const V=a[v];V&&b&&k(V)},k=v=>{b&&v.isCollapsible&&v.children&&(m.current&&(clearTimeout(m.current),m.current=null),f(v),p("hover"),l(!0),s?.(v))},j=()=>{b&&u==="hover"&&(m.current=setTimeout(()=>{l(!1),f(null)},150))},R=()=>{m.current&&(clearTimeout(m.current),m.current=null)},A=()=>{b&&u==="hover"&&(l(!1),f(null))},C=a.map(v=>({id:v.id,label:v.label,icon:v.icon,active:v.active,disabled:v.disabled,badge:v.badge,badgeCount:v.badgeCount,children:v.children,defaultOpen:v.defaultOpen,onClick:()=>{v.onClick?.()},onMouseLeave:()=>j()}));return e.jsxs("div",{ref:x,className:`relative flex items-start h-full ${c||""}`,"data-testid":"navigation-rail-group",children:[e.jsx(de,{collapsed:b,items:C,showRecentButton:!1,showSearchButton:d,onCollapsedChange:w,onItemClick:N,onItemHover:B,labels:{searchButton:i.searchPlaceholder,searchPlaceholder:i.searchPlaceholder,collapseButton:i.collapseButton}}),h&&b&&e.jsx("div",{className:"absolute left-[80px] top-0 z-10 h-full",onMouseEnter:R,onMouseLeave:A,children:e.jsx(Ne,{height:"100%",width:248,showHeading:u==="hover"&&g!==null,heading:u==="hover"&&g?{label:g.label,iconName:"cog-6-tooth",showDescription:!1,showAction:!1}:void 0,showSearch:u==="searcher",search:{placeholder:i.searchPlaceholder},sections:u==="hover"&&g?.children?[{items:g.children.map(v=>({label:v.label,icon:v.icon,onClick:v.onClick,disabled:v.disabled}))}]:u==="searcher"?[{heading:i.recentSection,items:[{label:"Configuración",icon:e.jsx(yr,{className:"size-4"})}]},{heading:i.frequentSection,items:[{label:"Item"}]}]:[]})})]})});se.displayName="NavigationRailGroup";const wr=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"transition-transform",children:e.jsx("path",{d:"M12 10L8 6L4 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),jr=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"transition-transform",children:e.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Nr=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M14 8H2M2 8L6.5 3.5M2 8L6.5 12.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Cr=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2 8H14M14 8L9.5 3.5M14 8L9.5 12.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),$r=({column:r,sortable:a,sorted:n,sortDirection:t,onSort:s})=>{const x=[`
|
|
610
756
|
flex
|
|
611
757
|
items-center
|
|
612
758
|
gap-3
|
|
@@ -618,12 +764,12 @@
|
|
|
618
764
|
dark:border-dark-border-primary
|
|
619
765
|
transition-colors
|
|
620
766
|
duration-150
|
|
621
|
-
`,
|
|
767
|
+
`,a?`
|
|
622
768
|
cursor-pointer
|
|
623
769
|
hover:bg-background-secondary
|
|
624
770
|
dark:hover:bg-dark-bg-primary/50
|
|
625
771
|
select-none
|
|
626
|
-
`:"",{left:"justify-start",center:"justify-center",right:"justify-end"}[
|
|
772
|
+
`:"",{left:"justify-start",center:"justify-center",right:"justify-end"}[r.align||"left"]].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:x,onClick:a?s:void 0,role:a?"button":void 0,tabIndex:a?0:void 0,onKeyDown:a?h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),s())}:void 0,style:{width:r.width},children:[e.jsx("span",{className:`
|
|
627
773
|
text-sm
|
|
628
774
|
font-bold
|
|
629
775
|
text-content-secondary
|
|
@@ -631,17 +777,17 @@
|
|
|
631
777
|
text-ellipsis
|
|
632
778
|
overflow-hidden
|
|
633
779
|
whitespace-nowrap
|
|
634
|
-
`,children:
|
|
780
|
+
`,children:r.header}),a&&e.jsxs("span",{className:"shrink-0 text-content-secondary dark:text-content-secondary",children:[n&&t==="asc"&&e.jsx(wr,{}),n&&t==="desc"&&e.jsx(jr,{}),!n&&e.jsx("div",{className:"w-4 h-4"})]})]})},fe=({children:r,align:a="left",width:n,isStriped:t=!1,rowIndex:s=0})=>{const o={left:"justify-start text-left",center:"justify-center text-center",right:"justify-end text-right"},c=t&&s%2===1?"bg-background-secondary dark:bg-dark-bg-primary/30":"";return e.jsx("div",{className:`
|
|
635
781
|
flex
|
|
636
782
|
flex-col
|
|
637
|
-
${o[
|
|
783
|
+
${o[a]}
|
|
638
784
|
px-6
|
|
639
785
|
py-4
|
|
640
786
|
min-h-[56px]
|
|
641
787
|
border-b
|
|
642
788
|
border-border-secondary
|
|
643
789
|
dark:border-dark-border-primary
|
|
644
|
-
${
|
|
790
|
+
${c}
|
|
645
791
|
`,style:{width:n},children:e.jsx("span",{className:`
|
|
646
792
|
text-sm
|
|
647
793
|
text-content-primary
|
|
@@ -649,7 +795,7 @@
|
|
|
649
795
|
text-ellipsis
|
|
650
796
|
overflow-hidden
|
|
651
797
|
w-full
|
|
652
|
-
`,children:
|
|
798
|
+
`,children:r})})},Br=({currentPage:r,totalPages:a,onPageChange:n,previousLabel:t="Anterior",nextLabel:s="Siguiente"})=>{const c=(()=>{const d=[];if(a<=7)for(let h=1;h<=a;h++)d.push(h);else d.push(1),r<=3?d.push(2,3):r>=a-2?(d.push("..."),d.push(a-2,a-1)):(d.push("..."),d.push(r),d.push("...")),a>1&&d.push(a);return d})();return e.jsxs("div",{className:"flex items-center justify-between w-full h-9",children:[e.jsxs("button",{onClick:()=>r>1&&n(r-1),disabled:r===1,className:`
|
|
653
799
|
flex
|
|
654
800
|
items-center
|
|
655
801
|
gap-3
|
|
@@ -666,7 +812,7 @@
|
|
|
666
812
|
disabled:cursor-not-allowed
|
|
667
813
|
transition-colors
|
|
668
814
|
duration-150
|
|
669
|
-
`,children:[e.jsx(
|
|
815
|
+
`,children:[e.jsx(Nr,{}),e.jsx("span",{children:t})]}),e.jsx("div",{className:"flex items-center gap-0",children:c.map((d,x)=>{if(d==="...")return e.jsx("div",{className:`
|
|
670
816
|
flex
|
|
671
817
|
items-center
|
|
672
818
|
justify-center
|
|
@@ -676,7 +822,7 @@
|
|
|
676
822
|
font-bold
|
|
677
823
|
text-primary-custom-600
|
|
678
824
|
dark:text-primary-custom-600
|
|
679
|
-
`,children:
|
|
825
|
+
`,children:d},`ellipsis-${x}`);const h=d===r;return e.jsx("button",{onClick:()=>n(d),className:`
|
|
680
826
|
flex
|
|
681
827
|
items-center
|
|
682
828
|
justify-center
|
|
@@ -689,8 +835,8 @@
|
|
|
689
835
|
dark:text-primary-custom-600
|
|
690
836
|
transition-colors
|
|
691
837
|
duration-150
|
|
692
|
-
${
|
|
693
|
-
`,children:
|
|
838
|
+
${h?"bg-blue-100 dark:bg-blue-900/30":"hover:bg-blue-50 dark:hover:bg-blue-900/20"}
|
|
839
|
+
`,children:d},d)})}),e.jsxs("button",{onClick:()=>r<a&&n(r+1),disabled:r===a,className:`
|
|
694
840
|
flex
|
|
695
841
|
items-center
|
|
696
842
|
gap-3
|
|
@@ -707,7 +853,7 @@
|
|
|
707
853
|
disabled:cursor-not-allowed
|
|
708
854
|
transition-colors
|
|
709
855
|
duration-150
|
|
710
|
-
`,children:[e.jsx("span",{children:
|
|
856
|
+
`,children:[e.jsx("span",{children:s}),e.jsx(Cr,{})]})]})},$e=({title:r,columns:a,data:n,variant:t="basic",showBorder:s=!0,showShadow:o=!0,onSort:c,sortColumn:d,sortDirection:x,fullWidth:h=!1,emptyMessage:l="No hay datos disponibles",loading:u=!1,loadingRows:p=5,pagination:g,className:f="",id:m})=>{const[i,b]=y.useState(null),[w,N]=y.useState(null),B=d!==void 0?d:i,k=x!==void 0?x:w,j=S=>{let $="asc";B===S&&(k==="asc"?$="desc":k==="desc"&&($=null)),c?c(S,$):(b($?S:null),N($))},R=(S,$)=>typeof $=="function"?$(S):S[$],Z=[`
|
|
711
857
|
flex
|
|
712
858
|
flex-col
|
|
713
859
|
gap-4
|
|
@@ -716,13 +862,13 @@
|
|
|
716
862
|
rounded-xl
|
|
717
863
|
transition-all
|
|
718
864
|
duration-150
|
|
719
|
-
`,
|
|
865
|
+
`,s?"border border-border-primary dark:border-dark-border-primary":"",o?"shadow-base":"","p-8",h||t==="fullWidth"?"w-full":"",f].join(" ").replace(/\s+/g," ").trim(),P=t==="grid"?`
|
|
720
866
|
border
|
|
721
867
|
border-border-primary
|
|
722
868
|
dark:border-dark-border-primary
|
|
723
869
|
rounded-lg
|
|
724
870
|
overflow-hidden
|
|
725
|
-
`:"";return e.jsxs("div",{className:
|
|
871
|
+
`:"";return e.jsxs("div",{className:Z,id:m,children:[r&&e.jsx("div",{className:"flex items-center justify-center w-full",children:e.jsx("h3",{className:`
|
|
726
872
|
text-base
|
|
727
873
|
font-bold
|
|
728
874
|
text-content-primary
|
|
@@ -730,13 +876,13 @@
|
|
|
730
876
|
text-ellipsis
|
|
731
877
|
overflow-hidden
|
|
732
878
|
whitespace-nowrap
|
|
733
|
-
`,children:
|
|
879
|
+
`,children:r})}),e.jsx("div",{className:`flex w-full overflow-x-auto ${P}`,children:a.map((S,$)=>{const H=typeof S.accessor=="function"?`column_${$}`:String(S.accessor);return e.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[e.jsx($r,{column:S,sortable:S.sortable||!1,sorted:B===H,sortDirection:B===H?k:null,onSort:()=>j(H)}),u&&e.jsx(e.Fragment,{children:Array.from({length:p}).map((F,T)=>e.jsx(fe,{align:S.align,width:S.width,isStriped:t==="striped",rowIndex:T,children:e.jsx("div",{className:`
|
|
734
880
|
h-4
|
|
735
881
|
bg-background-secondary
|
|
736
882
|
dark:bg-dark-border-primary
|
|
737
883
|
rounded
|
|
738
884
|
animate-pulse
|
|
739
|
-
`})},`loading-${
|
|
885
|
+
`})},`loading-${T}`))}),!u&&n.length>0&&e.jsx(e.Fragment,{children:n.map((F,T)=>{const Q=R(F,S.accessor),K=S.render?S.render(Q,F,T):Q;return e.jsx(fe,{align:S.align,width:S.width,isStriped:t==="striped",rowIndex:T,children:K},T)})}),!u&&n.length===0&&$===0&&e.jsx("div",{className:`
|
|
740
886
|
flex
|
|
741
887
|
items-center
|
|
742
888
|
justify-center
|
|
@@ -745,7 +891,7 @@
|
|
|
745
891
|
text-sm
|
|
746
892
|
text-content-secondary
|
|
747
893
|
dark:text-content-secondary
|
|
748
|
-
`,style:{gridColumn:`1 / ${
|
|
894
|
+
`,style:{gridColumn:`1 / ${a.length+1}`},children:l})]},H)})}),g&&e.jsx(Br,{currentPage:g.currentPage,totalPages:g.totalPages,onPageChange:g.onPageChange,previousLabel:g.previousLabel,nextLabel:g.nextLabel})]})},Rr=({label:r,active:a=!1,icon:n,badge:t,disabled:s=!1,onClick:o,className:c="",ariaLabel:d})=>{const x=`
|
|
749
895
|
relative
|
|
750
896
|
flex
|
|
751
897
|
flex-col
|
|
@@ -757,7 +903,7 @@
|
|
|
757
903
|
p-0
|
|
758
904
|
border-0
|
|
759
905
|
bg-transparent
|
|
760
|
-
`,
|
|
906
|
+
`,l=s?"opacity-50 cursor-not-allowed pointer-events-none":"",u=`
|
|
761
907
|
flex
|
|
762
908
|
items-center
|
|
763
909
|
justify-center
|
|
@@ -768,30 +914,30 @@
|
|
|
768
914
|
transition-all
|
|
769
915
|
duration-150
|
|
770
916
|
w-full
|
|
771
|
-
`,
|
|
917
|
+
`,p=s?"":`
|
|
772
918
|
group-hover:bg-[rgba(0,0,0,0.03)]
|
|
773
919
|
group-focus-visible:bg-[rgba(0,0,0,0.03)]
|
|
774
|
-
group-focus-visible:shadow-
|
|
920
|
+
group-focus-visible:shadow-lg
|
|
775
921
|
dark:group-hover:bg-white/5
|
|
776
922
|
dark:group-focus-visible:bg-white/5
|
|
777
|
-
dark:group-focus-visible:shadow-
|
|
778
|
-
`,
|
|
923
|
+
dark:group-focus-visible:shadow-2xl
|
|
924
|
+
`,g=a?`
|
|
779
925
|
text-primary-custom-600
|
|
780
926
|
dark:text-primary-custom-600
|
|
781
927
|
`:`
|
|
782
928
|
text-content-primary
|
|
783
929
|
dark:text-dark-content-primary
|
|
784
|
-
`,
|
|
930
|
+
`,f=`
|
|
785
931
|
w-3
|
|
786
932
|
h-3
|
|
787
933
|
shrink-0
|
|
788
|
-
`,
|
|
934
|
+
`,m=a?`
|
|
789
935
|
bg-primary-custom-600
|
|
790
936
|
dark:bg-primary-custom-600
|
|
791
937
|
`:`
|
|
792
938
|
bg-content-primary
|
|
793
939
|
dark:bg-dark-content-primary
|
|
794
|
-
`,
|
|
940
|
+
`,i=a?`
|
|
795
941
|
absolute
|
|
796
942
|
-bottom-2.5
|
|
797
943
|
left-0
|
|
@@ -801,13 +947,13 @@
|
|
|
801
947
|
bg-primary-custom-600
|
|
802
948
|
dark:bg-primary-custom-600
|
|
803
949
|
z-10
|
|
804
|
-
`:"hidden",
|
|
950
|
+
`:"hidden",b=[x,"",l,"group",c].join(" ").replace(/\s+/g," ").trim(),w=[u,p].join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",role:"tab","aria-selected":a,"aria-disabled":s,"aria-label":d||r,tabIndex:s?-1:0,className:b,onClick:s?void 0:o,disabled:s,children:[e.jsxs("div",{className:w,children:[n&&e.jsx("span",{className:`${f} ${g}`.trim(),children:n}),e.jsx("span",{className:`
|
|
805
951
|
text-sm
|
|
806
952
|
font-bold
|
|
807
953
|
leading-5
|
|
808
954
|
whitespace-nowrap
|
|
809
|
-
${
|
|
810
|
-
`.replace(/\s+/g," ").trim(),children:
|
|
955
|
+
${g}
|
|
956
|
+
`.replace(/\s+/g," ").trim(),children:r}),t!==void 0&&t>0&&e.jsx("span",{className:`
|
|
811
957
|
flex
|
|
812
958
|
items-center
|
|
813
959
|
justify-center
|
|
@@ -820,15 +966,15 @@
|
|
|
820
966
|
leading-4
|
|
821
967
|
text-primary-inverse-content
|
|
822
968
|
dark:text-dark-bg-primary
|
|
823
|
-
${
|
|
824
|
-
`.replace(/\s+/g," ").trim(),"aria-label":`${
|
|
969
|
+
${m}
|
|
970
|
+
`.replace(/\s+/g," ").trim(),"aria-label":`${t} notificaciones`,children:t>99?"99+":t})]}),e.jsx("div",{className:i})]})},Sr=({items:r,activeId:a,defaultActiveId:n,onChange:t,className:s="",fullWidth:o=!1,size:c="base",showBorder:d=!0})=>{const[x,h]=y.useState(n||(r.length>0?r[0].id:"")),l=a!==void 0,u=l?a:x,p=b=>{l||h(b),t?.(b)},f=`
|
|
825
971
|
flex
|
|
826
972
|
items-end
|
|
827
973
|
pb-2.5
|
|
828
|
-
${{sm:"gap-0",base:"gap-1",lg:"gap-2"}[
|
|
974
|
+
${{sm:"gap-0",base:"gap-1",lg:"gap-2"}[c]}
|
|
829
975
|
${o?"w-full":""}
|
|
830
|
-
${
|
|
831
|
-
`,
|
|
976
|
+
${d?"border-b border-border-primary dark:border-dark-border-primary":""}
|
|
977
|
+
`,m=o?"flex-1":"",i=[f,s].join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{role:"tablist","aria-label":"Pestañas de navegación",className:i,children:r.map(b=>e.jsx(Rr,{label:b.label,active:u===b.id,icon:b.icon,badge:b.badge,disabled:b.disabled,onClick:()=>p(b.id),className:m},b.id))})},Ir=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{d:"M1.75 1.002a.75.75 0 1 0 0 1.5h1.035l1.38 5.514a2.75 2.75 0 0 0 2.658 2.048h5.355a2.75 2.75 0 0 0 2.658-2.048l.9-3.597a.75.75 0 0 0-.728-.919H4.655l-.22-.88A.75.75 0 0 0 3.71 2H1.75ZM5 13a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM11.5 13a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Z"})}),Mr=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M12 5a4 4 0 0 0-8 0v2.379a1.5 1.5 0 0 1-.44 1.06L2.294 9.707a1 1 0 0 0-.293.707V11a1 1 0 0 0 1 1h2a3 3 0 1 0 6 0h2a1 1 0 0 0 1-1v-.586a1 1 0 0 0-.293-.707L12.44 8.44A1.5 1.5 0 0 1 12 7.38V5Zm-5.5 7a1.5 1.5 0 0 0 3 0h-3Z",clipRule:"evenodd"})}),he=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M9.965 11.026a5 5 0 1 1 1.06-1.06l2.755 2.754a.75.75 0 1 1-1.06 1.06l-2.755-2.754ZM10.5 7a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z",clipRule:"evenodd"})}),be=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),re=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M6.701 2.25c.577-1 2.02-1 2.598 0l5.196 9a1.5 1.5 0 0 1-1.299 2.25H2.804a1.5 1.5 0 0 1-1.3-2.25l5.197-9ZM8 4a.75.75 0 0 1 .75.75v3a.75.75 0 1 1-1.5 0v-3A.75.75 0 0 1 8 4Zm0 7.25a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"})}),Lr=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M14 4.75A2.75 2.75 0 0 0 11.25 2h-3A2.75 2.75 0 0 0 5.5 4.75v.5a.75.75 0 0 0 1.5 0v-.5c0-.69.56-1.25 1.25-1.25h3c.69 0 1.25.56 1.25 1.25v6.5c0 .69-.56 1.25-1.25 1.25h-3c-.69 0-1.25-.56-1.25-1.25v-.5a.75.75 0 0 0-1.5 0v.5A2.75 2.75 0 0 0 8.25 14h3A2.75 2.75 0 0 0 14 11.25v-6.5Zm-9.47.47a.75.75 0 0 0-1.06 0L1.22 7.47a.75.75 0 0 0 0 1.06l2.25 2.25a.75.75 0 1 0 1.06-1.06l-.97-.97h5.69a.75.75 0 0 0 0-1.5H3.56l.97-.97a.75.75 0 0 0 0-1.06Z",clipRule:"evenodd"})}),ee=({logo:r,productName:a="Nombre Producto",environmentBadge:n,userDropdown:t,actions:s,notifications:o,className:c="",variant:d="responsive",hideActionButtons:x=!1,showNavigationButton:h=!1,navigationButtonProps:l={},leadingAction:u,siesaLogo:p,showBusinessLogo:g=!1,showSiesaLogoLeading:f=!0,showSiesaLogoTrailing:m=!1,onNavigationClick:i,onSearchClick:b,onCartClick:w,onNotificationsClick:N})=>{const B=`
|
|
832
978
|
box-border
|
|
833
979
|
flex
|
|
834
980
|
flex-col
|
|
@@ -852,59 +998,91 @@
|
|
|
852
998
|
dark:focus:ring-offset-dark-bg-primary
|
|
853
999
|
transition-all
|
|
854
1000
|
duration-150
|
|
855
|
-
`,C
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
1001
|
+
`,k=d==="mobile",j=d==="desktop",R=d==="tablet",A=d==="responsive",C=()=>{if(k||!h)return null;const M={type:"default",size:"base",iconOnly:!0,leftIcon:e.jsx(Lr,{}),ariaLabel:"Volver",onClick:i,...l};return j||R?e.jsx(z,{...M}):e.jsx("div",{className:"hidden md:block",children:e.jsx(z,{...M})})},v=()=>{if(k||!g)return null;const M=e.jsx("img",{src:"/,Business Logo.png",alt:"Business Logo",className:"w-full h-full object-contain"});return j?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[168px] h-[30px]",children:M}):R?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[140px] h-[25px]",children:M}):e.jsx("div",{className:"hidden md:block overflow-hidden relative shrink-0 w-[140px] lg:w-[168px] h-[25px] lg:h-[30px]",children:M})},V=()=>{const M=e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-full h-full object-contain"}),W=e.jsx("img",{src:"/siesa_logo_mobile.png",alt:"Siesa",className:"w-full h-full object-contain"});return k?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[30px] h-[30px]",children:W}):f?j?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:M}):R?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:M}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden overflow-hidden relative shrink-0 w-[30px] h-[30px]",children:W}),f&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block lg:hidden overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:M}),e.jsx("div",{className:"hidden lg:block overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:M})]})]}):null},D=()=>{if(!m||k)return null;const M=e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-full h-full object-contain"});return j?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:M}):R?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:M}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block lg:hidden overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:M}),e.jsx("div",{className:"hidden lg:block overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:M})]})},Z=({responsive:M=!0})=>{const W=e.jsx("div",{className:"grow shrink-0 w-px min-h-px bg-border-primary dark:bg-dark-border-primary"});return k?null:j||R?e.jsx("div",{className:"flex flex-col gap-2 h-8 items-start px-0 py-1 relative shrink-0",children:W}):M?e.jsx("div",{className:"hidden md:flex flex-col gap-2 h-8 items-start px-0 py-1 relative shrink-0",children:W}):null},P=()=>{if(k||!a)return null;const M=e.jsx("p",{className:"font-bold leading-7 text-xl text-content-primary dark:text-dark-content-primary tracking-[-0.5px] whitespace-nowrap",children:a});return j||R?M:e.jsx("p",{className:"hidden md:block font-bold leading-7 text-xl text-content-primary dark:text-dark-content-primary tracking-[-0.5px] whitespace-nowrap",children:a})},S=()=>n?k?e.jsx(G,{color:"yellow",leftIcon:e.jsx(re,{}),label:"Pruebas"}):j||R?e.jsx(G,{color:"yellow",leftIcon:e.jsx(re,{}),label:n}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden",children:e.jsx(G,{color:"yellow",leftIcon:e.jsx(re,{}),label:"Pruebas"})}),e.jsx("div",{className:"hidden md:block",children:e.jsx(G,{color:"yellow",leftIcon:e.jsx(re,{}),label:n})})]}):null,$=()=>x?null:k?e.jsx("button",{className:B,"aria-label":"Buscar",onClick:b,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(he,{})})}):A?e.jsx("button",{className:`md:hidden ${B}`,"aria-label":"Buscar",onClick:b,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(he,{})})}):null,H=()=>x?null:e.jsxs("div",{className:"relative",children:[e.jsx("button",{className:B,"aria-label":"Carrito de compras",onClick:w,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(Ir,{})})}),o?.cart!==void 0&&o.cart>0&&e.jsx("div",{className:"absolute bg-error-content dark:bg-error-content flex flex-col gap-2.5 h-4 items-center justify-center left-[calc(50%+8px)] px-1 py-0 rounded-full top-[calc(50%-8px)] -translate-x-1/2 -translate-y-1/2 pointer-events-none min-w-[16px]",children:e.jsx("p",{className:"font-bold leading-3 text-[10px] text-white text-center whitespace-nowrap",children:o.cart>99?"+99":o.cart})})]}),F=()=>x?null:e.jsxs("div",{className:"relative",children:[e.jsx("button",{className:B,"aria-label":"Notificaciones",onClick:N,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(Mr,{})})}),o?.bell&&e.jsx("div",{className:"absolute w-2 h-2 bg-error-content dark:bg-error-content rounded-full left-[calc(50%+4px)] top-[calc(50%-8px)] -translate-x-1/2 pointer-events-none"})]}),T=()=>{if(!t)return null;const M=t.menuItems||[{children:"Account",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{d:"M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM12.735 14c.618 0 1.093-.561.872-1.139a6.002 6.002 0 0 0-11.215 0c-.22.578.254 1.139.872 1.139h9.47Z"})}),onClick:t.onAccountClick},{children:"Notifications",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M12 5a4 4 0 0 0-8 0v2.379a1.5 1.5 0 0 1-.44 1.06L2.294 9.707a1 1 0 0 0-.293.707V11a1 1 0 0 0 1 1h2a3 3 0 1 0 6 0h2a1 1 0 0 0 1-1v-.586a1 1 0 0 0-.293-.707L12.44 8.44A1.5 1.5 0 0 1 12 7.38V5Zm-5.5 7a1.5 1.5 0 0 0 3 0h-3Z",clipRule:"evenodd"})}),onClick:t.onNotificationsClick},{children:"Billing",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M4 2a1.5 1.5 0 0 0-1.5 1.5v9A1.5 1.5 0 0 0 4 14h8a1.5 1.5 0 0 0 1.5-1.5V6.621a1.5 1.5 0 0 0-.44-1.06L9.94 2.439A1.5 1.5 0 0 0 8.878 2H4Zm4 9.5a.75.75 0 0 1-.75-.75V8.06l-.72.72a.75.75 0 0 1-1.06-1.06l2-2a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-.72-.72v2.69a.75.75 0 0 1-.75.75Z",clipRule:"evenodd"})}),onClick:t.onBillingClick},{isDivider:!0},{children:"Dark mode",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{d:"M14.438 10.148c.19-.425-.321-.787-.748-.601A5.5 5.5 0 0 1 6.453 2.31c.186-.427-.176-.938-.6-.748a6.501 6.501 0 1 0 8.585 8.586Z"})}),onClick:t.onDarkModeClick},{isDivider:!0},{children:"Sign Out",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M14 4.75A2.75 2.75 0 0 0 11.25 2h-3A2.75 2.75 0 0 0 5.5 4.75v.5a.75.75 0 0 0 1.5 0v-.5c0-.69.56-1.25 1.25-1.25h3c.69 0 1.25.56 1.25 1.25v6.5c0 .69-.56 1.25-1.25 1.25h-3c-.69 0-1.25-.56-1.25-1.25v-.5a.75.75 0 0 0-1.5 0v.5A2.75 2.75 0 0 0 8.25 14h3A2.75 2.75 0 0 0 14 11.25v-6.5Zm-9.47.47a.75.75 0 0 0-1.06 0L1.22 7.47a.75.75 0 0 0 0 1.06l2.25 2.25a.75.75 0 1 0 1.06-1.06l-.97-.97h5.69a.75.75 0 0 0 0-1.5H3.56l.97-.97a.75.75 0 0 0 0-1.06Z",clipRule:"evenodd"})}),onClick:t.onSignOutClick}];if(k)return e.jsx(X,{items:M,renderTrigger:q=>e.jsx("button",{className:`
|
|
1002
|
+
box-border
|
|
1003
|
+
flex
|
|
1004
|
+
items-center
|
|
1005
|
+
justify-center
|
|
1006
|
+
overflow-hidden
|
|
1007
|
+
p-0
|
|
1008
|
+
relative
|
|
1009
|
+
shrink-0
|
|
1010
|
+
hover:bg-background-secondary
|
|
1011
|
+
focus:outline-none
|
|
1012
|
+
focus:ring-2
|
|
1013
|
+
focus:ring-primary-custom-400
|
|
1014
|
+
focus:ring-offset-2
|
|
1015
|
+
dark:hover:bg-dark-bg-secondary
|
|
1016
|
+
dark:focus:ring-dark-border-custom
|
|
1017
|
+
dark:focus:ring-offset-dark-bg-primary
|
|
1018
|
+
rounded-lg
|
|
1019
|
+
transition-all
|
|
1020
|
+
duration-150
|
|
1021
|
+
${q?"bg-background-secondary dark:bg-dark-bg-secondary":""}
|
|
1022
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:e.jsx("div",{className:"relative rounded-full shrink-0 w-8 h-8",children:e.jsx("img",{alt:t.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-full w-full h-full",src:t.avatar})})})});const W=()=>e.jsx(X,{items:M,renderTrigger:q=>e.jsx("button",{className:`
|
|
1023
|
+
box-border
|
|
1024
|
+
flex
|
|
1025
|
+
items-center
|
|
1026
|
+
justify-center
|
|
1027
|
+
overflow-hidden
|
|
1028
|
+
p-0
|
|
1029
|
+
relative
|
|
1030
|
+
shrink-0
|
|
1031
|
+
hover:bg-background-secondary
|
|
1032
|
+
focus:outline-none
|
|
1033
|
+
focus:ring-2
|
|
1034
|
+
focus:ring-primary-custom-400
|
|
1035
|
+
focus:ring-offset-2
|
|
1036
|
+
dark:hover:bg-dark-bg-secondary
|
|
1037
|
+
dark:focus:ring-dark-border-custom
|
|
1038
|
+
dark:focus:ring-offset-dark-bg-primary
|
|
1039
|
+
rounded-lg
|
|
1040
|
+
transition-all
|
|
1041
|
+
duration-150
|
|
1042
|
+
${q?"bg-background-secondary dark:bg-dark-bg-secondary":""}
|
|
1043
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:e.jsxs("div",{className:"box-border flex gap-3 items-center justify-center overflow-hidden px-3 py-2 relative rounded-lg shrink-0",children:[e.jsxs("div",{className:"flex gap-3 items-center justify-center relative shrink-0",children:[e.jsx("div",{className:"flex items-center justify-center relative shrink-0",children:e.jsx("div",{className:"relative rounded-md shrink-0 w-10 h-10",children:e.jsx("img",{alt:t.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-md w-full h-full",src:t.avatar})})}),e.jsxs("div",{className:"flex flex-col gap-0.5 items-start justify-center relative shrink-0 w-[123px]",children:[e.jsx("p",{className:"leading-5 relative shrink-0 text-sm text-content-primary dark:text-dark-content-primary whitespace-nowrap font-normal",children:t.name}),(t.email||t.role)&&e.jsx("p",{className:"leading-4 min-w-full relative shrink-0 text-xs text-content-secondary dark:text-content-secondary w-min whitespace-nowrap overflow-hidden text-ellipsis",children:t.email||t.role})]})]}),e.jsx("div",{className:"overflow-hidden relative shrink-0 w-5 h-5 text-content-secondary dark:text-content-secondary",children:e.jsx(be,{})})]})})});return j||R?W():e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden",children:e.jsx(X,{items:M,renderTrigger:q=>e.jsx("button",{className:`
|
|
1044
|
+
box-border
|
|
1045
|
+
flex
|
|
1046
|
+
items-center
|
|
1047
|
+
justify-center
|
|
1048
|
+
overflow-hidden
|
|
1049
|
+
p-0
|
|
1050
|
+
relative
|
|
1051
|
+
shrink-0
|
|
1052
|
+
hover:bg-background-secondary
|
|
1053
|
+
focus:outline-none
|
|
1054
|
+
focus:ring-2
|
|
1055
|
+
focus:ring-primary-custom-400
|
|
1056
|
+
focus:ring-offset-2
|
|
1057
|
+
dark:hover:bg-dark-bg-secondary
|
|
1058
|
+
dark:focus:ring-dark-border-custom
|
|
1059
|
+
dark:focus:ring-offset-dark-bg-primary
|
|
1060
|
+
rounded-lg
|
|
1061
|
+
transition-all
|
|
1062
|
+
duration-150
|
|
1063
|
+
${q?"bg-background-secondary dark:bg-dark-bg-secondary":""}
|
|
1064
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:e.jsx("div",{className:"relative rounded-full shrink-0 w-8 h-8",children:e.jsx("img",{alt:t.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-full w-full h-full",src:t.avatar})})})})}),e.jsx("div",{className:"hidden md:flex",children:e.jsx(X,{items:M,renderTrigger:q=>e.jsx("button",{className:`
|
|
1065
|
+
box-border
|
|
1066
|
+
flex
|
|
1067
|
+
items-center
|
|
1068
|
+
justify-center
|
|
1069
|
+
overflow-hidden
|
|
1070
|
+
p-0
|
|
1071
|
+
relative
|
|
1072
|
+
shrink-0
|
|
1073
|
+
hover:bg-background-secondary
|
|
1074
|
+
focus:outline-none
|
|
1075
|
+
focus:ring-2
|
|
1076
|
+
focus:ring-primary-custom-400
|
|
1077
|
+
focus:ring-offset-2
|
|
1078
|
+
dark:hover:bg-dark-bg-secondary
|
|
1079
|
+
dark:focus:ring-dark-border-custom
|
|
1080
|
+
dark:focus:ring-offset-dark-bg-primary
|
|
1081
|
+
rounded-lg
|
|
1082
|
+
transition-all
|
|
1083
|
+
duration-150
|
|
1084
|
+
${q?"bg-background-secondary dark:bg-dark-bg-secondary":""}
|
|
1085
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:e.jsxs("div",{className:"box-border flex gap-3 items-center justify-center overflow-hidden px-3 py-2 relative rounded-lg shrink-0",children:[e.jsxs("div",{className:"flex gap-3 items-center justify-center relative shrink-0",children:[e.jsx("div",{className:"flex items-center justify-center relative shrink-0",children:e.jsx("div",{className:"relative rounded-md shrink-0 w-10 h-10",children:e.jsx("img",{alt:t.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-md w-full h-full",src:t.avatar})})}),e.jsxs("div",{className:"flex flex-col gap-0.5 items-start justify-center relative shrink-0 w-[123px]",children:[e.jsx("p",{className:"leading-5 relative shrink-0 text-sm text-content-primary dark:text-dark-content-primary whitespace-nowrap font-normal",children:t.name}),(t.email||t.role)&&e.jsx("p",{className:"leading-4 min-w-full relative shrink-0 text-xs text-content-secondary dark:text-content-secondary w-min whitespace-nowrap overflow-hidden text-ellipsis",children:t.email||t.role})]})]}),e.jsx("div",{className:"overflow-hidden relative shrink-0 w-5 h-5 text-content-secondary dark:text-content-secondary",children:e.jsx(be,{})})]})})})})]})},I=[`
|
|
908
1086
|
box-border
|
|
909
1087
|
flex
|
|
910
1088
|
gap-8
|
|
@@ -915,7 +1093,7 @@
|
|
|
915
1093
|
w-full
|
|
916
1094
|
bg-background-primary
|
|
917
1095
|
dark:bg-dark-bg-primary
|
|
918
|
-
`,{responsive:"h-[40px] md:h-16",desktop:"h-16",tablet:"h-16",mobile:"h-[40px]"}[
|
|
1096
|
+
`,{responsive:"h-[40px] md:h-16",desktop:"h-16",tablet:"h-16",mobile:"h-[40px]"}[d],c].join(" ").replace(/\s+/g," ").trim();return e.jsxs("nav",{className:I,children:[e.jsxs("div",{className:"flex gap-4 items-center relative shrink-0",children:[!k&&(u||h&&e.jsx(C,{})),r||e.jsx(v,{}),g&&f&&!k&&e.jsx(Z,{}),p||e.jsx(V,{}),a&&f&&!k&&e.jsx(Z,{}),e.jsx(P,{})]}),e.jsxs("div",{className:"flex gap-4 items-center justify-end grow min-h-px min-w-px relative shrink-0",children:[e.jsx(S,{}),e.jsx($,{}),e.jsx(H,{}),e.jsx(F,{}),t&&!x&&e.jsx(Z,{}),e.jsx(T,{}),m&&t&&!k&&e.jsx(Z,{}),e.jsx(D,{}),s&&e.jsx("div",{className:"flex gap-2 items-center",children:s})]})]})},Ar=({items:r,activeItemId:a,onItemClick:n,className:t="",ariaLabel:s="Navegación Principal"})=>{r.length>5&&console.warn("NavigationBar: Se recomienda un máximo de 5 ítems para mejor UX");const o=l=>{l.disabled||(l.onClick&&l.onClick(l.id),n&&n(l.id))},c=l=>{const u=l.active||l.id===a,p=`
|
|
919
1097
|
flex-1
|
|
920
1098
|
flex
|
|
921
1099
|
flex-col
|
|
@@ -927,8 +1105,8 @@
|
|
|
927
1105
|
cursor-pointer
|
|
928
1106
|
transition-all
|
|
929
1107
|
duration-150
|
|
930
|
-
${
|
|
931
|
-
`.replace(/\s+/g," ").trim(),
|
|
1108
|
+
${l.disabled?"opacity-50 cursor-not-allowed pointer-events-none":""}
|
|
1109
|
+
`.replace(/\s+/g," ").trim(),g=`
|
|
932
1110
|
flex
|
|
933
1111
|
items-center
|
|
934
1112
|
justify-center
|
|
@@ -938,8 +1116,8 @@
|
|
|
938
1116
|
overflow-hidden
|
|
939
1117
|
transition-all
|
|
940
1118
|
duration-150
|
|
941
|
-
${
|
|
942
|
-
`.replace(/\s+/g," ").trim(),
|
|
1119
|
+
${u?"bg-primary-custom-100 dark:bg-primary-custom-100":"bg-transparent hover:bg-hover-overlay dark:hover:bg-hover-overlay-dark"}
|
|
1120
|
+
`.replace(/\s+/g," ").trim(),f=`
|
|
943
1121
|
font-['SiesaBT:Bold',sans-serif]
|
|
944
1122
|
text-[10px]
|
|
945
1123
|
leading-[12px]
|
|
@@ -951,7 +1129,7 @@
|
|
|
951
1129
|
dark:text-dark-content-primary
|
|
952
1130
|
transition-colors
|
|
953
1131
|
duration-150
|
|
954
|
-
`.replace(/\s+/g," ").trim(),
|
|
1132
|
+
`.replace(/\s+/g," ").trim(),m=`
|
|
955
1133
|
w-4
|
|
956
1134
|
h-4
|
|
957
1135
|
shrink-0
|
|
@@ -959,43 +1137,43 @@
|
|
|
959
1137
|
dark:text-dark-content-primary
|
|
960
1138
|
transition-colors
|
|
961
1139
|
duration-150
|
|
962
|
-
`.replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",className:
|
|
1140
|
+
`.replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",className:p,onClick:()=>o(l),disabled:l.disabled,"aria-label":l.ariaLabel||l.label,"aria-current":u?"page":void 0,children:[e.jsx("div",{className:g,children:e.jsx("span",{className:m,children:l.icon})}),e.jsx("span",{className:f,children:l.label})]},l.id)},d=`
|
|
963
1141
|
bg-bg-primary
|
|
964
1142
|
dark:bg-dark-bg-primary
|
|
965
1143
|
p-4
|
|
966
1144
|
w-full
|
|
967
1145
|
transition-colors
|
|
968
1146
|
duration-150
|
|
969
|
-
`.replace(/\s+/g," ").trim(),
|
|
1147
|
+
`.replace(/\s+/g," ").trim(),x=`
|
|
970
1148
|
flex
|
|
971
1149
|
items-start
|
|
972
1150
|
justify-center
|
|
973
1151
|
w-full
|
|
974
|
-
`.replace(/\s+/g," ").trim(),
|
|
1152
|
+
`.replace(/\s+/g," ").trim(),h=`
|
|
975
1153
|
flex-1
|
|
976
1154
|
flex
|
|
977
1155
|
items-start
|
|
978
1156
|
gap-2
|
|
979
1157
|
min-h-0
|
|
980
1158
|
min-w-0
|
|
981
|
-
`.replace(/\s+/g," ").trim();return e.jsx("nav",{className:`${
|
|
1159
|
+
`.replace(/\s+/g," ").trim();return e.jsx("nav",{className:`${d} ${t}`.trim(),role:"navigation","aria-label":s,children:e.jsx("div",{className:x,children:e.jsx("div",{className:h,children:r.map(l=>c(l))})})})},Zr=({lightColor:r,darkColor:a,className:n=""})=>e.jsxs("svg",{className:`w-4 h-4 shrink-0 ${n}`.trim(),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16","aria-hidden":"true",children:[e.jsx("circle",{cx:"8",cy:"8",r:"8",fill:r,className:"dark:hidden"}),e.jsx("circle",{cx:"8",cy:"8",r:"8",fill:a,className:"hidden dark:block"})]}),J=({status:r="available",className:a=""})=>{const t={available:{lightColor:"#0e79fd",darkColor:"#93d1fd",label:"Disponible"},occupied:{lightColor:"#af460e",darkColor:"#f5a927",label:"Ocupada"},reserved:{lightColor:"#7e22ce",darkColor:"#c084fc",label:"Reservada"},outOfService:{lightColor:"#3f3f46",darkColor:"#a1a1aa",label:"Fuera de Servicio"}}[r],o=[`
|
|
982
1160
|
inline-flex
|
|
983
1161
|
items-center
|
|
984
1162
|
gap-1
|
|
985
1163
|
shrink-0
|
|
986
|
-
`,
|
|
1164
|
+
`,a].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:o,role:"presentation","aria-label":`Estado: ${t.label}`,children:[e.jsx(Zr,{lightColor:t.lightColor,darkColor:t.darkColor}),e.jsx("span",{className:`
|
|
987
1165
|
text-xs
|
|
988
1166
|
leading-4
|
|
989
1167
|
font-normal
|
|
990
1168
|
text-content-primary
|
|
991
1169
|
dark:text-dark-content-primary
|
|
992
1170
|
whitespace-nowrap
|
|
993
|
-
`.replace(/\s+/g," ").trim(),children:
|
|
1171
|
+
`.replace(/\s+/g," ").trim(),children:t.label})]})},Er=({className:r=""})=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:e.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Vr=({className:r=""})=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:e.jsx("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),zr=({className:r=""})=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:e.jsx("path",{d:"M10.5 5H1.5M8.5 1V3M3.5 1V3M3.25 11H8.75C9.57843 11 10.25 10.3284 10.25 9.5V3.5C10.25 2.67157 9.57843 2 8.75 2H3.25C2.42157 2 1.75 2.67157 1.75 3.5V9.5C1.75 10.3284 2.42157 11 3.25 11Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Dr=({className:r=""})=>e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:[e.jsx("path",{d:"M10.5 6C10.5 8.48528 8.48528 10.5 6 10.5C3.51472 10.5 1.5 8.48528 1.5 6C1.5 3.51472 3.51472 1.5 6 1.5C8.48528 1.5 10.5 3.51472 10.5 6Z",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M9.18198 2.81802L2.81802 9.18198",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Pr=({className:r=""})=>e.jsx("svg",{width:"13",height:"10",viewBox:"0 0 13 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:e.jsx("path",{d:"M9.25 9V8C9.25 6.89543 8.35457 6 7.25 6H2.75C1.64543 6 0.75 6.89543 0.75 8V9M12.25 9V8C12.25 6.89543 11.3546 6 10.25 6H9.75M7 2.5C7 3.60457 6.10457 4.5 5 4.5C3.89543 4.5 3 3.60457 3 2.5C3 1.39543 3.89543 0.5 5 0.5C6.10457 0.5 7 1.39543 7 2.5ZM10 2C10 2.82843 9.32843 3.5 8.5 3.5C7.67157 3.5 7 2.82843 7 2C7 1.17157 7.67157 0.5 8.5 0.5C9.32843 0.5 10 1.17157 10 2Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"})}),Be=({locationName:r,status:a="available",state:n="enabled",capacity:t,onClick:s,disabled:o=!1,className:c="",ariaLabel:d,fullWidth:x=!0})=>{const l={available:{textColor:"text-primary-custom-600 dark:text-primary-custom-600",badgeBg:"bg-primary-custom-100 dark:bg-blue-900/30",badgeText:"text-primary-custom-600 dark:text-blue-400",activedBg:"bg-primary-custom-100 dark:bg-blue-900/30",icon:Er,badgeLabel:"Disponible"},occupied:{textColor:"text-[#af460e] dark:text-orange-400",badgeBg:"bg-[#fcedc9] dark:bg-yellow-900/30",badgeText:"text-[#af460e] dark:text-orange-400",activedBg:"bg-[#fcedc9] dark:bg-yellow-900/30",icon:Vr,badgeLabel:"Ocupada"},reserved:{textColor:"text-[#7e22ce] dark:text-fuchsia-400",badgeBg:"bg-[#f3e8ff] dark:bg-purple-900/30",badgeText:"text-[#7e22ce] dark:text-purple-400",activedBg:"bg-[#f3e8ff] dark:bg-purple-900/30",icon:zr,badgeLabel:"Reservada"},outOfService:{textColor:"text-[#3f3f46] dark:text-zinc-400",badgeBg:"bg-[#f4f4f5] dark:bg-zinc-800/30",badgeText:"text-content-tertiary dark:text-zinc-400",activedBg:"bg-[#f4f4f5] dark:bg-zinc-800/30",icon:Dr,badgeLabel:"F. de Servicio"}}[a],u=l.icon,p=n==="actived"?l.activedBg:"bg-white dark:bg-dark-bg-primary",m=[`
|
|
994
1172
|
flex
|
|
995
1173
|
flex-col
|
|
996
1174
|
items-stretch
|
|
997
1175
|
justify-between
|
|
998
|
-
${
|
|
1176
|
+
${x?"w-full":"w-[189px]"}
|
|
999
1177
|
h-[68px]
|
|
1000
1178
|
p-2
|
|
1001
1179
|
rounded-lg
|
|
@@ -1013,28 +1191,28 @@
|
|
|
1013
1191
|
disabled:opacity-50
|
|
1014
1192
|
disabled:cursor-not-allowed
|
|
1015
1193
|
disabled:pointer-events-none
|
|
1016
|
-
`,
|
|
1194
|
+
`,p,c].join(" ").replace(/\s+/g," ").trim(),i=t?`${t.current}/${t.total} mesas`:null;return e.jsxs("button",{className:m,onClick:s,disabled:o,"aria-label":d||`${r} - ${l.badgeLabel}`,type:"button",children:[e.jsx("div",{className:`
|
|
1017
1195
|
text-base
|
|
1018
1196
|
font-bold
|
|
1019
1197
|
leading-6
|
|
1020
|
-
${
|
|
1021
|
-
`.replace(/\s+/g," ").trim(),children:
|
|
1198
|
+
${l.textColor}
|
|
1199
|
+
`.replace(/\s+/g," ").trim(),children:r}),e.jsxs("div",{className:"flex items-center justify-between",children:[i&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Pr,{className:l.textColor}),e.jsx("span",{className:`
|
|
1022
1200
|
text-[10px]
|
|
1023
1201
|
leading-[12px]
|
|
1024
|
-
${
|
|
1025
|
-
`.replace(/\s+/g," ").trim(),children:
|
|
1202
|
+
${l.textColor}
|
|
1203
|
+
`.replace(/\s+/g," ").trim(),children:i})]}),e.jsxs("div",{className:`
|
|
1026
1204
|
inline-flex
|
|
1027
1205
|
items-center
|
|
1028
1206
|
gap-1
|
|
1029
1207
|
px-1.5
|
|
1030
1208
|
py-1
|
|
1031
1209
|
rounded-md
|
|
1032
|
-
${
|
|
1033
|
-
`.replace(/\s+/g," ").trim(),children:[e.jsx(
|
|
1210
|
+
${l.badgeBg}
|
|
1211
|
+
`.replace(/\s+/g," ").trim(),children:[e.jsx(u,{className:l.badgeText}),e.jsx("span",{className:`
|
|
1034
1212
|
text-xs
|
|
1035
1213
|
leading-4
|
|
1036
|
-
${
|
|
1037
|
-
`.replace(/\s+/g," ").trim(),children:
|
|
1214
|
+
${l.badgeText}
|
|
1215
|
+
`.replace(/\s+/g," ").trim(),children:l.badgeLabel})]})]})]})},Re=({size:r="l",border:a=!1,children:n,disabled:t=!1,className:s="",onClick:o,ariaLabel:c,htmlType:d="button",...x})=>{const h={s:"w-10 h-10",m:"w-[65px] h-[65px]",l:"w-20 h-20"},l={s:"text-2xl",m:"text-5xl",l:"text-5xl"},f=[`
|
|
1038
1216
|
inline-flex
|
|
1039
1217
|
items-center
|
|
1040
1218
|
justify-center
|
|
@@ -1054,7 +1232,7 @@
|
|
|
1054
1232
|
disabled:pointer-events-none
|
|
1055
1233
|
transition-all
|
|
1056
1234
|
duration-150
|
|
1057
|
-
`,
|
|
1235
|
+
`,h[r],l[r],a?`
|
|
1058
1236
|
bg-white
|
|
1059
1237
|
text-content-primary
|
|
1060
1238
|
border
|
|
@@ -1091,7 +1269,7 @@
|
|
|
1091
1269
|
dark:active:bg-dark-bg-inverse
|
|
1092
1270
|
dark:active:text-dark-content-inverse
|
|
1093
1271
|
dark:active:scale-95
|
|
1094
|
-
`,
|
|
1272
|
+
`,s].join(" ").replace(/\s+/g," ").trim();return e.jsx("button",{type:d,className:f,disabled:t,onClick:o,"aria-label":c||`Número ${n}`,...x,children:n})},Se=({image:r,label:a,active:n=!1,disabled:t=!1,onClick:s,className:o="",ariaLabel:c})=>{const h=[`
|
|
1095
1273
|
flex
|
|
1096
1274
|
flex-col
|
|
1097
1275
|
gap-2
|
|
@@ -1107,7 +1285,7 @@
|
|
|
1107
1285
|
focus:ring-offset-2
|
|
1108
1286
|
dark:focus:ring-dark-border-custom
|
|
1109
1287
|
dark:focus:ring-offset-dark-bg-primary
|
|
1110
|
-
`,
|
|
1288
|
+
`,t?`
|
|
1111
1289
|
bg-white
|
|
1112
1290
|
text-content-primary
|
|
1113
1291
|
opacity-55
|
|
@@ -1135,7 +1313,7 @@
|
|
|
1135
1313
|
dark:text-dark-content-primary
|
|
1136
1314
|
dark:hover:bg-dark-bg-primary/80
|
|
1137
1315
|
dark:active:scale-95
|
|
1138
|
-
`,o].join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",className:
|
|
1316
|
+
`,o].join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",className:h,disabled:t,onClick:s,"aria-label":c||a,"aria-pressed":n,children:[e.jsx("div",{className:"aspect-158/80 w-full rounded-lg overflow-hidden",children:e.jsx("img",{src:r,alt:a,className:"w-full h-full object-cover"})}),e.jsx("div",{className:"w-full text-left leading-5",children:a})]})},Tr=({className:r=""})=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,"aria-hidden":"true",children:e.jsx("path",{d:"M8 3V13M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ie=({image:r,productName:a,price:n,buttonText:t="Agregar",active:s=!1,disabled:o=!1,onAddClick:c,onCardClick:d,className:x="",ariaLabel:h})=>{const l=`
|
|
1139
1317
|
flex
|
|
1140
1318
|
flex-col
|
|
1141
1319
|
gap-2
|
|
@@ -1150,12 +1328,12 @@
|
|
|
1150
1328
|
focus:ring-offset-2
|
|
1151
1329
|
dark:focus:ring-dark-border-custom
|
|
1152
1330
|
dark:focus:ring-offset-dark-bg-primary
|
|
1153
|
-
`,
|
|
1331
|
+
`,u=o?`
|
|
1154
1332
|
bg-white
|
|
1155
1333
|
opacity-55
|
|
1156
1334
|
cursor-not-allowed
|
|
1157
1335
|
dark:bg-dark-bg-primary
|
|
1158
|
-
`:
|
|
1336
|
+
`:s?`
|
|
1159
1337
|
bg-primary-custom-100
|
|
1160
1338
|
cursor-pointer
|
|
1161
1339
|
dark:bg-dark-bg-custom
|
|
@@ -1163,22 +1341,22 @@
|
|
|
1163
1341
|
bg-white
|
|
1164
1342
|
cursor-pointer
|
|
1165
1343
|
dark:bg-dark-bg-primary
|
|
1166
|
-
`,
|
|
1344
|
+
`,p=o?`
|
|
1167
1345
|
text-content-primary
|
|
1168
1346
|
dark:text-dark-content-primary
|
|
1169
|
-
`:
|
|
1347
|
+
`:s?`
|
|
1170
1348
|
text-primary-custom-600
|
|
1171
1349
|
dark:text-dark-content-custom
|
|
1172
1350
|
`:`
|
|
1173
1351
|
text-content-primary
|
|
1174
1352
|
dark:text-dark-content-primary
|
|
1175
|
-
`,
|
|
1353
|
+
`,g=[l,u,x].join(" ").replace(/\s+/g," ").trim(),f=i=>{o||i.target.closest("button")||d?.(i)},m=i=>{i.stopPropagation(),!o&&c?.(i)};return e.jsxs("div",{className:g,onClick:f,role:"article","aria-label":h||`${a} - ${n}`,tabIndex:o?-1:0,children:[e.jsxs("div",{className:"flex flex-col gap-3 w-full",children:[e.jsx("div",{className:"h-[88px] w-full rounded-lg overflow-hidden",children:e.jsx("img",{src:r,alt:a,className:"w-full h-full object-cover"})}),e.jsxs("div",{className:`flex flex-col w-full font-bold ${p}`.trim().replace(/\s+/g," "),children:[e.jsx("div",{className:"text-sm leading-5",children:a}),e.jsx("div",{className:"text-2xl leading-8 tracking-tighter",children:n})]})]}),e.jsx(z,{type:"default",size:"sm",leftIcon:e.jsx(Tr,{className:"w-4 h-4"}),onClick:m,disabled:o,fullWidth:!0,ariaLabel:`${t} ${a}`,children:t})]})},Hr=({className:r=""})=>e.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M5 3.25V4H2.75a.75.75 0 0 0 0 1.5h.3l.815 8.15A1.5 1.5 0 0 0 5.357 15h5.285a1.5 1.5 0 0 0 1.493-1.35l.815-8.15h.3a.75.75 0 0 0 0-1.5H11v-.75A2.25 2.25 0 0 0 8.75 1h-1.5A2.25 2.25 0 0 0 5 3.25Zm2.25-.75a.75.75 0 0 0-.75.75V4h3v-.75a.75.75 0 0 0-.75-.75h-1.5ZM6.05 6a.75.75 0 0 1 .787.713l.275 5.5a.75.75 0 0 1-1.498.075l-.275-5.5A.75.75 0 0 1 6.05 6Zm3.9 0a.75.75 0 0 1 .712.787l-.275 5.5a.75.75 0 0 1-1.498-.075l.275-5.5a.75.75 0 0 1 .786-.711Z",clipRule:"evenodd"})}),ce=({categoryLabel:r,categoryColor:a="lime",productRef:n,price:t,productName:s,descriptionItems:o=[],showDescription:c=!0,quantity:d=0,minQuantity:x=0,maxQuantity:h,onQuantityChange:l,onDelete:u,disabled:p=!1,className:g="",deleteIcon:f})=>{const m={lime:{bg:"bg-lime-100 dark:bg-lime-900/40",text:"text-lime-700 dark:text-lime-300"},red:{bg:"bg-red-100 dark:bg-red-900/40",text:"text-red-700 dark:text-red-300"},orange:{bg:"bg-orange-100 dark:bg-orange-900/40",text:"text-orange-700 dark:text-orange-300"},amber:{bg:"bg-amber-100 dark:bg-amber-900/40",text:"text-amber-700 dark:text-amber-300"},yellow:{bg:"bg-yellow-100 dark:bg-yellow-900/40",text:"text-yellow-700 dark:text-yellow-300"},green:{bg:"bg-green-100 dark:bg-green-900/40",text:"text-green-700 dark:text-green-300"},emerald:{bg:"bg-emerald-100 dark:bg-emerald-900/40",text:"text-emerald-700 dark:text-emerald-300"},teal:{bg:"bg-teal-100 dark:bg-teal-900/40",text:"text-teal-700 dark:text-teal-300"},cyan:{bg:"bg-cyan-100 dark:bg-cyan-900/40",text:"text-cyan-700 dark:text-cyan-300"},sky:{bg:"bg-sky-100 dark:bg-sky-900/40",text:"text-sky-700 dark:text-sky-300"},blue:{bg:"bg-blue-100 dark:bg-blue-900/40",text:"text-blue-700 dark:text-blue-300"},indigo:{bg:"bg-indigo-100 dark:bg-indigo-900/40",text:"text-indigo-700 dark:text-indigo-300"},violet:{bg:"bg-violet-100 dark:bg-violet-900/40",text:"text-violet-700 dark:text-violet-300"},purple:{bg:"bg-purple-100 dark:bg-purple-900/40",text:"text-purple-700 dark:text-purple-300"},fuchsia:{bg:"bg-fuchsia-100 dark:bg-fuchsia-900/40",text:"text-fuchsia-700 dark:text-fuchsia-300"},pink:{bg:"bg-pink-100 dark:bg-pink-900/40",text:"text-pink-700 dark:text-pink-300"},rose:{bg:"bg-rose-100 dark:bg-rose-900/40",text:"text-rose-700 dark:text-rose-300"},zinc:{bg:"bg-zinc-100 dark:bg-zinc-800/50",text:"text-zinc-600 dark:text-zinc-300"},primary:{bg:"bg-primary-custom-100 dark:bg-primary-custom-600/30",text:"text-primary-custom-600 dark:text-primary-custom-300"}},i=m[a]||m.lime,b=N=>{!p&&l&&l(N)},w=()=>{!p&&u&&u()};return e.jsxs("div",{className:`
|
|
1176
1354
|
flex
|
|
1177
1355
|
flex-col
|
|
1178
1356
|
gap-2
|
|
1179
1357
|
w-full
|
|
1180
|
-
${
|
|
1181
|
-
${
|
|
1358
|
+
${p?"opacity-50 pointer-events-none":""}
|
|
1359
|
+
${g}
|
|
1182
1360
|
`.trim().replace(/\s+/g," "),"data-component":"POSProductSidebarItems",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[e.jsxs("div",{className:"flex items-center gap-1 w-full",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx("div",{className:`
|
|
1183
1361
|
inline-flex
|
|
1184
1362
|
items-center
|
|
@@ -1187,15 +1365,15 @@
|
|
|
1187
1365
|
rounded-md
|
|
1188
1366
|
transition-colors
|
|
1189
1367
|
duration-150
|
|
1190
|
-
${
|
|
1368
|
+
${i.bg}
|
|
1191
1369
|
`.trim().replace(/\s+/g," "),children:e.jsx("span",{className:`
|
|
1192
1370
|
text-xs
|
|
1193
1371
|
leading-4
|
|
1194
1372
|
font-normal
|
|
1195
1373
|
text-center
|
|
1196
1374
|
whitespace-nowrap
|
|
1197
|
-
${
|
|
1198
|
-
`.trim().replace(/\s+/g," "),children:
|
|
1375
|
+
${i.text}
|
|
1376
|
+
`.trim().replace(/\s+/g," "),children:r})}),e.jsx("span",{className:"text-[10px] leading-3 font-normal text-content-primary dark:text-dark-content-primary whitespace-nowrap",children:n})]}),e.jsx("div",{className:"flex items-center shrink-0",children:e.jsx("span",{className:"text-xs leading-4 font-bold text-content-primary dark:text-dark-content-primary whitespace-nowrap text-right",children:t})})]}),e.jsx("div",{className:"flex items-start w-full",children:e.jsx("span",{className:"text-xs leading-4 font-bold text-content-primary dark:text-dark-content-primary flex-1 min-w-0",children:s})})]}),c&&o.length>0&&e.jsx("div",{className:`
|
|
1199
1377
|
flex
|
|
1200
1378
|
flex-col
|
|
1201
1379
|
gap-2
|
|
@@ -1206,7 +1384,7 @@
|
|
|
1206
1384
|
w-full
|
|
1207
1385
|
transition-colors
|
|
1208
1386
|
duration-150
|
|
1209
|
-
`.trim().replace(/\s+/g," "),children:o.map((
|
|
1387
|
+
`.trim().replace(/\s+/g," "),children:o.map((N,B)=>e.jsxs("div",{className:"flex items-center gap-1 w-full",children:[e.jsx("span",{className:"flex-1 min-w-0 text-xs leading-3 font-normal text-content-primary dark:text-dark-content-primary",children:N.description}),e.jsx("span",{className:"text-xs leading-3 font-bold text-content-primary dark:text-dark-content-primary whitespace-nowrap text-right shrink-0",children:N.price})]},B))})]}),e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("div",{className:"w-[118px]",children:e.jsx(le,{value:d,min:x,max:h,onChange:b,disabled:p})}),e.jsx("button",{type:"button",onClick:w,disabled:p,className:`
|
|
1210
1388
|
flex
|
|
1211
1389
|
items-center
|
|
1212
1390
|
justify-center
|
|
@@ -1229,16 +1407,16 @@
|
|
|
1229
1407
|
active:scale-95
|
|
1230
1408
|
transition-all
|
|
1231
1409
|
duration-150
|
|
1232
|
-
${
|
|
1233
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Eliminar producto",children:
|
|
1410
|
+
${p?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
1411
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Eliminar producto",children:f||e.jsx(Hr,{className:"w-[18px] h-[21px]"})})]})]})};ce.displayName="POSProductSidebarItems";const ne=({tableNumber:r,status:a="available",shape:n="square",chairs:t=4,showChairs:s=!0,isActive:o=!1,onClick:c,className:d="",disabled:x=!1,children:h})=>{const l={available:{border:"border-[#0e79fd]",borderDark:"dark:border-[#93d1fd]",bgEnabled:"bg-transparent",bgEnabledDark:"dark:bg-transparent",bgActive:"bg-primary-custom-100",bgActiveDark:"dark:bg-[#1e3a5f]",borderActive:"border-[#bce4ff]",borderActiveDark:"dark:border-[#1e3a5f]",table:"bg-[#0e79fd]",tableDark:"dark:bg-[#93d1fd]",chair:"bg-[#0e79fd]",chairDark:"dark:bg-[#93d1fd]",text:"text-[#0e79fd]",textDark:"dark:text-[#93d1fd]",focusRing:"focus:ring-[#93d1fd]",focusRingDark:"dark:focus:ring-[#0e79fd]"},busy:{border:"border-[#af460e]",borderDark:"dark:border-[#f5a927]",bgEnabled:"bg-transparent",bgEnabledDark:"dark:bg-transparent",bgActive:"bg-[#fed7aa]",bgActiveDark:"dark:bg-[#5c3a1e]",borderActive:"border-[#fed7aa]",borderActiveDark:"dark:border-[#5c3a1e]",table:"bg-[#af460e]",tableDark:"dark:bg-[#f5a927]",chair:"bg-[#af460e]",chairDark:"dark:bg-[#f5a927]",text:"text-[#af460e]",textDark:"dark:text-[#f5a927]",focusRing:"focus:ring-[#f5a927]",focusRingDark:"dark:focus:ring-[#af460e]"},reserved:{border:"border-[#7e22ce]",borderDark:"dark:border-[#c084fc]",bgEnabled:"bg-transparent",bgEnabledDark:"dark:bg-transparent",bgActive:"bg-[#e9d5ff]",bgActiveDark:"dark:bg-[#3b1f5c]",borderActive:"border-[#e9d5ff]",borderActiveDark:"dark:border-[#3b1f5c]",table:"bg-[#7e22ce]",tableDark:"dark:bg-[#c084fc]",chair:"bg-[#7e22ce]",chairDark:"dark:bg-[#c084fc]",text:"text-[#7e22ce]",textDark:"dark:text-[#c084fc]",focusRing:"focus:ring-[#c084fc]",focusRingDark:"dark:focus:ring-[#7e22ce]"}},u={square:{container:"rounded-[4px]",table:"w-[64px] h-[64px] rounded-[4px]"},circle:{container:"rounded-[9999px]",table:"w-[64px] h-[64px] rounded-[9999px]"},rectangle:{container:"rounded-[4px]",table:"w-[80px] h-[64px] rounded-[4px]"},oval:{container:"rounded-3xl",table:"w-[80px] h-[64px] rounded-3xl"}},p=({rotation:i})=>e.jsxs("div",{className:"w-[28px] h-[22px]",style:{transform:`rotate(${i}deg)`},"aria-hidden":"true",children:[e.jsx("div",{className:`
|
|
1234
1412
|
absolute
|
|
1235
1413
|
top-0
|
|
1236
1414
|
left-0
|
|
1237
1415
|
right-0
|
|
1238
1416
|
h-[16px]
|
|
1239
1417
|
rounded-t-[4px]
|
|
1240
|
-
${
|
|
1241
|
-
${
|
|
1418
|
+
${l[a].chair}
|
|
1419
|
+
${l[a].chairDark}
|
|
1242
1420
|
`}),e.jsx("div",{className:`
|
|
1243
1421
|
absolute
|
|
1244
1422
|
bottom-0
|
|
@@ -1246,14 +1424,14 @@
|
|
|
1246
1424
|
right-[7.14%]
|
|
1247
1425
|
h-[14px]
|
|
1248
1426
|
rounded-b-[4px]
|
|
1249
|
-
${
|
|
1250
|
-
${
|
|
1251
|
-
`})]}),
|
|
1252
|
-
${
|
|
1253
|
-
${
|
|
1254
|
-
${
|
|
1427
|
+
${l[a].chair}
|
|
1428
|
+
${l[a].chairDark}
|
|
1429
|
+
`})]}),g=()=>{!x&&c&&c()},f=i=>{(i.key==="Enter"||i.key===" ")&&!x&&c&&(i.preventDefault(),c())},m=["w-[160px]","h-[160px]","shrink-0","relative","flex","flex-col","items-center","justify-center","p-0","border-2","box-border","rounded-[8px]",o?l[a].borderActive:l[a].border,o?l[a].borderActiveDark:l[a].borderDark,o?l[a].bgActive:l[a].bgEnabled,o?l[a].bgActiveDark:l[a].bgEnabledDark,"focus:outline-hidden","focus:ring-2",l[a].focusRing,l[a].focusRingDark,"focus:ring-offset-2","dark:focus:ring-offset-dark-bg-primary","transition-all","duration-150",c&&!x?"cursor-pointer":"",c&&!x?"hover:scale-105":"",c&&!x?"active:scale-95":"",x?"opacity-50 cursor-not-allowed":"",d].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{className:m,onClick:g,onKeyDown:f,disabled:x,type:"button","aria-label":`Mesa ${r} - ${a==="available"?"Disponible":a==="busy"?"Ocupada":"Reservada"}`,children:[e.jsxs("div",{className:"flex flex-col gap-[4px] items-center justify-center w-[134px] h-[134px] shrink-0",children:[s&&(t===2||t===4||t===6||t===8)&&e.jsxs("div",{className:"flex gap-[4px] items-center justify-center shrink-0",children:[t>=6&&e.jsxs(e.Fragment,{children:[e.jsx(p,{rotation:0}),e.jsx(p,{rotation:0})]}),t===2&&e.jsx(p,{rotation:0}),t===4&&e.jsx(p,{rotation:0})]}),e.jsxs("div",{className:"flex gap-[4px] items-center justify-center shrink-0",children:[s&&(t===4||t===6||t===8)&&e.jsxs("div",{className:"flex flex-col gap-[4px] items-start justify-center shrink-0",children:[t>=8&&e.jsxs(e.Fragment,{children:[e.jsx(p,{rotation:270}),e.jsx(p,{rotation:270})]}),(t===4||t===6)&&e.jsx(p,{rotation:270})]}),e.jsx("div",{className:"flex flex-col gap-[4px] items-start justify-center shrink-0",children:e.jsx("div",{className:"flex items-center shrink-0",children:e.jsx("div",{className:`
|
|
1430
|
+
${u[n].table}
|
|
1431
|
+
${l[a].table}
|
|
1432
|
+
${l[a].tableDark}
|
|
1255
1433
|
shrink-0
|
|
1256
|
-
`})})}),
|
|
1434
|
+
`})})}),s&&(t===4||t===6||t===8)&&e.jsxs("div",{className:"flex flex-col gap-[4px] items-start justify-center shrink-0",children:[t>=8&&e.jsxs(e.Fragment,{children:[e.jsx(p,{rotation:90}),e.jsx(p,{rotation:90})]}),(t===4||t===6)&&e.jsx(p,{rotation:90})]})]}),s&&(t===2||t===4||t===6||t===8)&&e.jsxs("div",{className:"flex gap-[4px] items-center justify-center shrink-0",children:[t>=6&&e.jsxs(e.Fragment,{children:[e.jsx(p,{rotation:180}),e.jsx(p,{rotation:180})]}),t===2&&e.jsx(p,{rotation:180}),t===4&&e.jsx(p,{rotation:180})]})]}),e.jsxs("div",{className:`
|
|
1257
1435
|
flex
|
|
1258
1436
|
flex-col
|
|
1259
1437
|
justify-center
|
|
@@ -1267,7 +1445,77 @@
|
|
|
1267
1445
|
shrink-0
|
|
1268
1446
|
text-[10px]
|
|
1269
1447
|
font-normal
|
|
1270
|
-
${
|
|
1271
|
-
${
|
|
1272
|
-
`,children:[e.jsxs("p",{className:"leading-[12px] text-ellipsis overflow-hidden",children:["Mesa ",t]}),m]})]})},ce=v.createContext(void 0),ar=({children:t,defaultTheme:s="light"})=>{const[n,r]=v.useState(()=>typeof window<"u"&&localStorage.getItem("siesa-ui-theme")||s);v.useEffect(()=>{const l=window.document.documentElement;n==="dark"?l.classList.add("dark"):l.classList.remove("dark"),localStorage.setItem("siesa-ui-theme",n)},[n]);const a=()=>{r(l=>l==="light"?"dark":"light")},o=l=>{r(l)};return e.jsx(ce.Provider,{value:{theme:n,toggleTheme:a,setTheme:o},children:t})},nr=()=>{const t=v.useContext(ce);if(t===void 0)throw new Error("useTheme debe ser usado dentro de un ThemeProvider");return t};exports.Alert=ie;exports.Avatar=ae;exports.Badge=P;exports.Button=q;exports.Checkbox=re;exports.DescriptionList=oe;exports.Divider=ne;exports.Dropdown=ke;exports.Input=Y;exports.Navbar=Ve;exports.NavigationBar=Pe;exports.Notification=je;exports.POSConvention=We;exports.POSLocationButton=Xe;exports.POSNumberButton=Je;exports.POSProductButton=Ye;exports.POSProductCard=rr;exports.POSProductSidebarItems=le;exports.POSTable=sr;exports.Pagination=$e;exports.Quantity=G;exports.Radio=te;exports.Select=Le;exports.Switch=se;exports.Table=ze;exports.Tabs=Ee;exports.Textarea=ee;exports.ThemeProvider=ar;exports.useTheme=nr;
|
|
1448
|
+
${l[a].text}
|
|
1449
|
+
${l[a].textDark}
|
|
1450
|
+
`,children:[e.jsxs("p",{className:"leading-[12px] text-ellipsis overflow-hidden",children:["Mesa ",r]}),h]})]})},Fr=r=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),Or=r=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r,children:e.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),Wr=r=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r,children:[e.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),e.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),qr=({onSubmit:r,onForgotPassword:a,onSignUp:n,isLoading:t=!1,errorMessage:s,className:o="",showBackground:c=!0,variant:d="responsive"})=>{const[x,h]=y.useState(""),[l,u]=y.useState(""),[p,g]=y.useState(!1),[f,m]=y.useState(""),i=N=>{if(N.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(x)){m("Por favor ingresa un email válido");return}m(""),r?.(x,l)},b=N=>{h(N.target.value),f&&m("")},w=()=>{g(!p)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",o].join(" "),children:[c&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...d==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:d==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Iniciar Sesión"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Inicia sesión ingresando con tu correo electrónico y contraseña."})]}),s&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:s}),e.jsxs("form",{onSubmit:i,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Fr,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:x,onChange:b,disabled:t,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",f?"border-error-border!":""].filter(Boolean).join(" ")})]}),f&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:f})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("button",{type:"button",onClick:a,className:"text-[12px] leading-4 font-bold text-primary-custom-600 dark:text-[#93d1fd] hover:underline transition-all duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm px-1",children:"Olvidé mi Contraseña"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Or,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:p?"text":"password",placeholder:"••••••••",value:l,onChange:N=>u(N.target.value),disabled:t,required:!0,autoComplete:"current-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:w,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":p?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(Wr,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:t||!x||!l,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:t?"Iniciando sesión...":"Iniciar Sesión"})]}),e.jsx("button",{type:"button",onClick:n,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"¿No tienes una cuenta?"})]})]})},Ur=r=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r,children:e.jsx("path",{fillRule:"evenodd",d:"M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0Zm-5-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 9c-1.825 0-3.422.977-4.295 2.437A5.49 5.49 0 0 0 8 13.5a5.49 5.49 0 0 0 4.294-2.063A4.997 4.997 0 0 0 8 9Z",clipRule:"evenodd"})}),_r=r=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),Gr=r=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r,children:e.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),Qr=r=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r,children:[e.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),e.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),Kr=({onSubmit:r,onSignIn:a,onTermsClick:n,onPrivacyClick:t,isLoading:s=!1,errorMessage:o,className:c="",showBackground:d=!0,variant:x="responsive"})=>{const[h,l]=y.useState(""),[u,p]=y.useState(""),[g,f]=y.useState(""),[m,i]=y.useState(!1),[b,w]=y.useState(""),N=j=>{if(j.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(u)){w("Por favor ingresa un email válido");return}w(""),r?.(h,u,g)},B=j=>{p(j.target.value),b&&w("")},k=()=>{i(!m)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",c].join(" "),children:[d&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...x==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:x==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Crear Cuenta"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Ingresa todos los datos para crear tu cuenta."})]}),o&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:o}),e.jsxs("form",{onSubmit:N,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"name-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Nombre ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Ur,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"name-input",type:"text",placeholder:"Juan Pérez",value:h,onChange:j=>l(j.target.value),disabled:s,required:!0,autoComplete:"name",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(_r,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:u,onChange:B,disabled:s,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",b?"border-error-border!":""].filter(Boolean).join(" ")})]}),b&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:b})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Gr,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:m?"text":"password",placeholder:"••••••••",value:g,onChange:j=>f(j.target.value),disabled:s,required:!0,autoComplete:"new-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:k,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":m?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(Qr,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:s||!h||!u||!g,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:s?"Registrando...":"Registrarse"})]}),e.jsx("button",{type:"button",onClick:a,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"Ya tengo una cuenta"}),e.jsx("div",{className:"w-full text-center",children:e.jsxs("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:["Al registrarse, estás aceptando nuestras"," ",e.jsx("button",{type:"button",onClick:n,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Condiciones de Uso"})," ","y nuestras"," ",e.jsx("button",{type:"button",onClick:t,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Políticas de Privacidad"}),"."]})})]})]})},Xr=({productName:r="Mi Aplicación",siesaLogoPath:a,siesaLogoWidth:n,siesaLogoHeight:t,userDropdown:s,navigationItems:o,children:c,className:d="",contentClassName:x="",navbarProps:h={},navigationRailProps:l={}})=>{const[u,p]=y.useState("collapsed"),g=f=>{f&&p(f)};return e.jsxs("div",{className:["h-screen","w-full","bg-white","dark:bg-dark-bg-primary","flex","flex-col","overflow-hidden",d].join(" ").replace(/\s+/g," ").trim(),children:[e.jsx(ee,{productName:r,userDropdown:s,hideActionButtons:!0,showSiesaLogoLeading:!0,showBusinessLogo:!1,siesaLogo:a?e.jsx("img",{src:a,alt:"Siesa",className:"object-contain",style:{width:n||"100%",height:t||"100%"}}):void 0,className:"bg-white dark:bg-dark-bg-primary",...h}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[e.jsx(se,{state:u,items:o,showSearchButton:!1,onStateChange:g,...l}),e.jsx("div",{className:["flex-1","overflow-y-auto","bg-gray-50","dark:bg-dark-bg-primary",x].join(" ").replace(/\s+/g," ").trim(),children:c})]})]})},Jr=({className:r=""})=>e.jsx("svg",{className:r,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.543 2.232a.75.75 0 0 0-1.085 0l-5.25 5.5A.75.75 0 0 0 2.75 9H4v4a1 1 0 0 0 1 1h1.5a.5.5 0 0 0 .5-.5v-2a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v2a.5.5 0 0 0 .5.5H12a1 1 0 0 0 1-1V9h1.25a.75.75 0 0 0 .543-1.268l-5.25-5.5Z"})}),Yr=({className:r=""})=>e.jsx("svg",{className:r,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0ZM5.37 2.822a6.493 6.493 0 0 0-2.818 3.428h2.103c.088-.907.254-1.778.494-2.595a8.932 8.932 0 0 1 .221-.833ZM1.5 8c0 .522.062 1.03.179 1.516l.135.484h2.49a16.15 16.15 0 0 1 0-4H1.815L1.68 6.484A6.533 6.533 0 0 0 1.5 8Zm.552 2.75A6.493 6.493 0 0 0 5.37 14.18a8.932 8.932 0 0 1-.221-.833 13.2 13.2 0 0 1-.494-2.595H2.552Zm4.058 0c.083.78.23 1.497.429 2.128.197.622.423 1.07.649 1.357.225.286.401.265.312.265.089 0 .265.021.49-.265.226-.287.452-.735.649-1.357.199-.631.346-1.348.429-2.128H6.11Zm4.234 0a13.198 13.198 0 0 1-.494 2.595 8.938 8.938 0 0 1-.22.833 6.493 6.493 0 0 0 2.817-3.428h-2.103Zm2.104-2h-2.48a16.15 16.15 0 0 0 0-4h2.48l.135.484A6.538 6.538 0 0 1 14.5 8a6.538 6.538 0 0 1-.179 1.516l-.135.484h.162Zm-2.818-4.928c.167.251.394.699.221.833.24.817.406 1.688.494 2.595h2.103a6.493 6.493 0 0 0-2.818-3.428ZM9.89 6h-3.78c.083-.78.23-1.497.429-2.128.197-.622.423-1.07.649-1.357.225-.286.401-.265.312-.265.089 0 .265-.021.49.265.226.287.452.735.649 1.357.199.631.346 1.348.429 2.128Zm-4.234 0H3.553a6.493 6.493 0 0 1 2.818-3.428 8.932 8.932 0 0 0-.221.833c-.24.817-.406 1.688-.494 2.595Zm.144 2a14.65 14.65 0 0 0 0 4h4.4a14.65 14.65 0 0 0 0-4H5.8Z"})}),et=({className:r=""})=>e.jsx("svg",{className:r,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M4 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V6.414A2 2 0 0 0 13.414 5L10 1.586A2 2 0 0 0 8.586 1H4Zm1 5a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1H5Zm-.5 2.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5Zm.5 1.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1H5Z",clipRule:"evenodd"})}),rt=({className:r=""})=>e.jsx("svg",{className:r,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1 9.5A3.5 3.5 0 0 0 4.5 13H12a3 3 0 0 0 .917-5.857 2.503 2.503 0 0 0-3.198-3.019 3.5 3.5 0 0 0-6.628 2.171A3.5 3.5 0 0 0 1 9.5Z"})}),tt=({className:r=""})=>e.jsx("svg",{className:r,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2 4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4ZM10 4a2 2 0 0 1 2-2h.5a.5.5 0 0 1 0 1H12a1 1 0 0 0-1 1v.5a.5.5 0 0 1-1 0V4ZM2 12a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v2ZM10.5 8a.5.5 0 0 0-.5.5V10H8.5a.5.5 0 0 0 0 1H10v1.5a.5.5 0 0 0 1 0V11h1.5a.5.5 0 0 0 0-1H11V8.5a.5.5 0 0 0-.5-.5Z"})}),at=({className:r=""})=>e.jsx("svg",{className:r,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"})}),st=({className:r=""})=>e.jsx("svg",{className:r,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M2.5 4a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1ZM4.75 3.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5ZM4 8a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 4 8Zm.75 3.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5ZM3 8a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm-.5 4.5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Z",clipRule:"evenodd"})}),nt=({className:r=""})=>e.jsxs("svg",{className:r,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M14 2H2c-.55 0-.95.538-.75 1.032l3 7.5c.127.318.44.528.783.528h5.934c.343 0 .656-.21.783-.528l3-7.5C14.95 2.538 14.55 2 14 2Z"}),e.jsx("path",{d:"M6 12.25v1.25a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1.25H6Z"})]}),ot=({className:r=""})=>e.jsx("svg",{className:r,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),lt=({className:r=""})=>e.jsxs("svg",{className:r,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),it=({title:r="List View",navbarProductName:a="SB Commercial",tableTitle:n="Usuarios",columns:t,data:s,navigationItems:o,quickFilters:c,actionButtons:d,userDropdown:x,notifications:h,environmentBadge:l,showNavigationRail:u=!0,navigationRailState:p="collapsed",onNavigationRailStateChange:g,onNavItemClick:f,onSearch:m,searchPlaceholder:i="Buscar",onSort:b,sortColumn:w,sortDirection:N,pagination:B,loading:k=!1,loadingRows:j=5,emptyMessage:R="No hay datos disponibles",className:A="",onNotificationsClick:C,viewOptions:v,selectedViewOption:V,onViewOptionChange:D})=>{const[Z,P]=y.useState(""),[S,$]=y.useState(!1),H=o||[{id:"home",icon:e.jsx(Jr,{className:"w-4 h-4"}),label:"Inicio",active:!0},{id:"option1",icon:e.jsx(Yr,{className:"w-4 h-4"}),label:"Opción 1"},{id:"option2",icon:e.jsx(et,{className:"w-4 h-4"}),label:"Opción 2"},{id:"option3",icon:e.jsx(rt,{className:"w-4 h-4"}),label:"Opción 3"},{id:"more",icon:e.jsx(tt,{className:"w-4 h-4"}),label:"Ver más..."}],F=c||[{id:"paid",label:"Facturas Pagadas",color:"lime"},{id:"pending",label:"Facturas Pendientes por Pago",color:"rose"},{id:"orders",label:"Órdenes de Compra",color:"sky"}],T=d||[{id:"audit",label:"Auditoría",leftIcon:e.jsx(st,{className:"w-4 h-4"}),type:"default",onClick:()=>{}},{id:"filter",label:"Filtrar",leftIcon:e.jsx(nt,{className:"w-4 h-4"}),type:"default",onClick:()=>{}},{id:"create",label:"Crear",leftIcon:e.jsx(at,{className:"w-4 h-4"}),type:"default",onClick:()=>{}}],Q=I=>{P(I.target.value),m?.(I.target.value)},K=t.map(I=>({header:I.header,accessor:I.accessor,sortable:I.sortable,render:I.render,align:I.align,width:I.width}));return e.jsxs("div",{className:["bg-background-secondary","dark:bg-dark-bg-primary","flex","w-full","h-full","min-h-screen",A].join(" "),children:[u&&e.jsx(se,{state:p,items:H,onStateChange:g,onItemClick:f,showSearchButton:!0}),e.jsxs("div",{className:"flex flex-col flex-1 overflow-hidden",children:[e.jsx(ee,{productName:a,environmentBadge:l,userDropdown:x,notifications:h,hideActionButtons:!1,onNotificationsClick:C,className:"bg-background-secondary dark:bg-dark-bg-primary"}),e.jsx("div",{className:"flex items-center gap-2 px-4 py-2 w-full bg-background-secondary dark:bg-dark-bg-primary",children:F.map(I=>e.jsx(G,{color:I.color,label:I.label,leftIcon:I.icon},I.id))}),e.jsx("div",{className:"flex flex-1 overflow-hidden bg-background-secondary dark:bg-dark-bg-primary",children:e.jsxs("div",{className:"flex flex-col gap-4 flex-1 bg-white dark:bg-dark-bg-primary p-4 rounded-tl-3xl overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("h2",{className:"font-bold text-xl leading-7 tracking-[-0.5px] text-content-primary dark:text-dark-content-primary",children:r}),e.jsx("div",{className:"flex items-center gap-2",children:T.map(I=>e.jsx(z,{type:I.type,size:"sm",leftIcon:I.leftIcon,onClick:I.onClick,children:I.label},I.id))})]}),e.jsxs("div",{className:"flex flex-col gap-4 flex-1 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-xl p-8 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-4 w-full",children:[e.jsx("h3",{className:"flex-1 font-bold text-base leading-6 text-content-primary dark:text-dark-content-primary overflow-hidden text-ellipsis whitespace-nowrap",children:n}),e.jsx(Y,{placeholder:i,leftIcon:e.jsx(lt,{className:"w-4 h-4"}),value:Z,onChange:Q,className:"w-[200px]"}),v&&e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>$(!S),className:"flex items-center gap-3 px-3 py-2 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-lg shadow-xs hover:bg-background-secondary dark:hover:bg-dark-bg-secondary transition-colors",children:[e.jsx("span",{className:"font-bold text-sm text-content-secondary dark:text-content-secondary",children:"Ver"}),e.jsx(ot,{className:"w-5 h-5 text-content-secondary dark:text-content-secondary"})]}),S&&e.jsx("div",{className:"absolute top-full right-0 mt-1 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-lg shadow-lg z-10 min-w-[150px]",children:v.map(I=>e.jsx("button",{onClick:()=>{D?.(I.id),$(!1)},className:["block","w-full","px-4","py-2","text-left","text-sm","hover:bg-background-secondary","dark:hover:bg-dark-bg-secondary",V===I.id?"bg-primary-custom-100 dark:bg-primary-custom-600/20":""].join(" "),children:I.label},I.id))})]})]}),e.jsx($e,{columns:K,data:s,variant:"grid",showBorder:!1,showShadow:!1,loading:k,loadingRows:j,emptyMessage:R,onSort:b,sortColumn:w,sortDirection:N,pagination:B,className:"flex-1"})]})]})})]})]})},dt=r=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),ct=r=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r,children:e.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),xt=r=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r,children:[e.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),e.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),mt=({onSubmit:r,onForgotPassword:a,onSignUp:n,isLoading:t=!1,errorMessage:s,className:o="",showBackground:c=!0,variant:d="responsive"})=>{const[x,h]=y.useState(""),[l,u]=y.useState(""),[p,g]=y.useState(!1),[f,m]=y.useState(""),i=N=>{if(N.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(x)){m("Por favor ingresa un email válido");return}m(""),r?.(x,l)},b=N=>{h(N.target.value),f&&m("")},w=()=>{g(!p)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",o].join(" "),children:[c&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...d==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:d==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Iniciar Sesión"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Inicia sesión ingresando con tu correo electrónico y contraseña."})]}),s&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:s}),e.jsxs("form",{onSubmit:i,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(dt,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:x,onChange:b,disabled:t,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",f?"border-error-border!":""].filter(Boolean).join(" ")})]}),f&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:f})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("button",{type:"button",onClick:a,className:"text-[12px] leading-4 font-bold text-primary-custom-600 dark:text-[#93d1fd] hover:underline transition-all duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm px-1",children:"Olvidé mi Contraseña"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(ct,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:p?"text":"password",placeholder:"••••••••",value:l,onChange:N=>u(N.target.value),disabled:t,required:!0,autoComplete:"current-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:w,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":p?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(xt,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:t||!x||!l,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:t?"Iniciando sesión...":"Iniciar Sesión"})]}),e.jsx("button",{type:"button",onClick:n,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"¿No tienes una cuenta?"})]})]})},ut=({className:r=""})=>e.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M14 8a.75.75 0 0 1-.75.75H4.56l3.22 3.22a.75.75 0 1 1-1.06 1.06l-4.5-4.5a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 0 1 1.06 1.06L4.56 7.25h8.69A.75.75 0 0 1 14 8Z",clipRule:"evenodd"})}),pt=({className:r=""})=>e.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"})}),Me=({tableTitle:r="Mesa 1",changeTableLabel:a="Cambiar Mesa",menusTitle:n="Menús",menus:t=[{id:"1",label:"Corral"},{id:"2",label:"Burguer One"},{id:"3",label:"Andrés Carne de Res"},{id:"4",label:"Aceites"},{id:"5",label:"Kiosco Mac"},{id:"6",label:"Kiosco Qbano"},{id:"7",label:"Premier Dinning"}],selectedMenuId:s="1",onMenuSelect:o,onChangeTable:c,categoryTitle:d="Categoría",categories:x=[],selectedCategoryId:h,onCategorySelect:l,productsTitle:u="Productos",products:p=[],onAddProduct:g,activeTab:f="products",onTabChange:m,orderItems:i=[],onOrderItemQuantityChange:b,onOrderItemDelete:w,subtotal:N="40,000.00",taxes:B="40,000.00",total:k="40,000.00",confirmLabel:j="Confirmar Pedido",onConfirmOrder:R,isLoading:A=!1,errorMessage:C,userAvatar:v,userName:V="Jhonnatan Diaz",userRole:D="Administrador",businessLogo:Z,siesaLogo:P,className:S=""})=>e.jsxs("div",{className:`
|
|
1451
|
+
min-h-screen
|
|
1452
|
+
w-full
|
|
1453
|
+
bg-background-secondary
|
|
1454
|
+
dark:bg-dark-bg-primary
|
|
1455
|
+
flex
|
|
1456
|
+
flex-col
|
|
1457
|
+
${S}
|
|
1458
|
+
`.trim().replace(/\s+/g," "),children:[e.jsx(ee,{logo:Z&&e.jsx("div",{className:"h-[30px] w-[168px] overflow-hidden",children:typeof Z=="string"?e.jsx("img",{src:Z,alt:"Business Logo",className:"h-full w-full object-contain"}):Z}),productName:"",userDropdown:v?{avatar:v,name:V,role:D}:void 0,hideActionButtons:!0,siesaLogo:P&&e.jsx("div",{className:"h-[30px] w-[120px] overflow-hidden",children:typeof P=="string"?e.jsx("img",{src:P,alt:"Siesa Logo",className:"h-full w-full object-contain"}):P}),variant:"desktop",className:"bg-background-secondary dark:bg-dark-bg-primary"}),e.jsx("div",{className:"flex flex-1 w-full overflow-hidden",children:e.jsxs("div",{className:"flex flex-1 w-full overflow-hidden",children:[e.jsxs("div",{className:`
|
|
1459
|
+
flex-1
|
|
1460
|
+
flex
|
|
1461
|
+
flex-col
|
|
1462
|
+
gap-4
|
|
1463
|
+
p-4
|
|
1464
|
+
bg-white
|
|
1465
|
+
dark:bg-dark-bg-primary
|
|
1466
|
+
rounded-tl-3xl
|
|
1467
|
+
rounded-tr-3xl
|
|
1468
|
+
overflow-hidden
|
|
1469
|
+
`,children:[e.jsxs("div",{className:"flex items-center gap-4 w-full",children:[e.jsx("div",{className:"shrink-0",children:e.jsx(z,{type:"default",leftIcon:e.jsx(ut,{className:"w-4 h-4"}),onClick:c,ariaLabel:a,children:a})}),e.jsx("div",{className:"h-8 w-px bg-border-primary dark:bg-dark-border-primary shrink-0"}),e.jsx("div",{className:"shrink-0",children:e.jsx("h2",{className:"text-xl font-bold leading-7 tracking-tight text-content-primary dark:text-dark-content-primary",children:n})}),e.jsx("div",{className:"flex-1 flex gap-2 overflow-x-auto overflow-y-hidden",children:t.map($=>e.jsx(z,{type:s===$.id?"default":"outline-solid",onClick:()=>o?.($.id),children:$.label},$.id))})]}),e.jsxs("div",{className:`
|
|
1470
|
+
flex-1
|
|
1471
|
+
flex
|
|
1472
|
+
gap-0
|
|
1473
|
+
bg-background-secondary
|
|
1474
|
+
dark:bg-dark-bg-primary/50
|
|
1475
|
+
rounded-xl
|
|
1476
|
+
overflow-hidden
|
|
1477
|
+
`,children:[e.jsx("div",{className:"w-[213px] p-4 border-b border-border-primary dark:border-dark-border-primary",children:e.jsxs("div",{className:"flex flex-col gap-4 h-full",children:[e.jsx("div",{className:"flex items-center justify-center w-full",children:e.jsx("h3",{className:"text-xl font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:d})}),e.jsx("div",{className:"flex-1 flex flex-col gap-2 overflow-x-hidden overflow-y-auto",children:x.map($=>e.jsx(Se,{image:$.image,label:$.label,active:h===$.id,onClick:()=>l?.($.id)},$.id))})]})}),e.jsx("div",{className:"flex-1 p-4 border-l border-b border-border-primary dark:border-dark-border-primary",children:e.jsxs("div",{className:"flex flex-col gap-4 h-full",children:[e.jsx("div",{className:"flex items-center justify-center w-full",children:e.jsx("h3",{className:"text-xl font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:u})}),e.jsxs("div",{className:"flex-1 overflow-x-hidden overflow-y-auto",children:[e.jsx("div",{className:"flex flex-col items-center justify-start min-h-full w-full",children:e.jsx("div",{className:"flex flex-wrap gap-2 justify-center max-w-[704px]",children:p.map($=>e.jsx(Ie,{image:$.image,productName:$.name,price:$.price,onAddClick:()=>g?.($.id)},$.id))})}),p.length===0&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx("p",{className:"text-content-secondary dark:text-content-secondary",children:"No hay productos disponibles"})}),A&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx("p",{className:"text-content-secondary dark:text-content-secondary",children:"Cargando productos..."})}),C&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx("p",{className:"text-red-600 dark:text-red-400",children:C})})]})]})})]})]}),e.jsx("div",{className:"w-[304px] p-4 flex flex-col gap-0 h-full overflow-hidden",children:e.jsxs("div",{className:"flex flex-col h-full relative",children:[e.jsx("div",{className:"border-b border-border-primary dark:border-dark-border-primary pb-4 z-10",children:e.jsx("h2",{className:"text-xl font-bold leading-7 tracking-tight text-content-primary dark:text-dark-content-primary",children:r})}),e.jsxs("div",{className:"flex items-start py-2.5 z-10",children:[e.jsxs("button",{className:`
|
|
1478
|
+
flex-1
|
|
1479
|
+
flex
|
|
1480
|
+
flex-col
|
|
1481
|
+
items-center
|
|
1482
|
+
p-2
|
|
1483
|
+
rounded-lg
|
|
1484
|
+
transition-colors
|
|
1485
|
+
duration-150
|
|
1486
|
+
${f==="products"?"relative":""}
|
|
1487
|
+
`,onClick:()=>m?.("products"),children:[e.jsx("span",{className:`
|
|
1488
|
+
text-sm
|
|
1489
|
+
font-bold
|
|
1490
|
+
leading-5
|
|
1491
|
+
${f==="products"?"text-primary-custom-600 dark:text-primary-custom-600":"text-content-primary dark:text-dark-content-primary"}
|
|
1492
|
+
`,children:"Productos"}),f==="products"&&e.jsx("div",{className:"absolute -bottom-2.5 left-0 right-0 h-0.5 bg-primary-custom-600 dark:bg-primary-custom-600 rounded-full"})]}),e.jsxs("button",{className:`
|
|
1493
|
+
flex-1
|
|
1494
|
+
flex
|
|
1495
|
+
flex-col
|
|
1496
|
+
items-center
|
|
1497
|
+
p-2
|
|
1498
|
+
rounded-lg
|
|
1499
|
+
transition-colors
|
|
1500
|
+
duration-150
|
|
1501
|
+
${f==="client"?"relative":""}
|
|
1502
|
+
`,onClick:()=>m?.("client"),children:[e.jsx("span",{className:`
|
|
1503
|
+
text-sm
|
|
1504
|
+
font-bold
|
|
1505
|
+
leading-5
|
|
1506
|
+
${f==="client"?"text-primary-custom-600 dark:text-primary-custom-600":"text-content-primary dark:text-dark-content-primary"}
|
|
1507
|
+
`,children:"Cliente"}),f==="client"&&e.jsx("div",{className:"absolute -bottom-2.5 left-0 right-0 h-0.5 bg-primary-custom-600 dark:bg-primary-custom-600 rounded-full"})]})]}),e.jsxs("div",{className:`
|
|
1508
|
+
flex-1
|
|
1509
|
+
flex
|
|
1510
|
+
flex-col
|
|
1511
|
+
gap-2
|
|
1512
|
+
p-4
|
|
1513
|
+
bg-white
|
|
1514
|
+
dark:bg-dark-bg-primary
|
|
1515
|
+
rounded-bl-lg
|
|
1516
|
+
rounded-br-lg
|
|
1517
|
+
overflow-x-hidden
|
|
1518
|
+
overflow-y-auto
|
|
1519
|
+
z-10
|
|
1520
|
+
`,children:[i.map(($,H)=>e.jsxs(y.Fragment,{children:[e.jsx(ce,{categoryLabel:$.categoryLabel,categoryColor:$.categoryColor,productRef:$.productRef,price:$.price,productName:$.productName,descriptionItems:$.descriptionItems,showDescription:!!$.descriptionItems&&$.descriptionItems.length>0,quantity:$.quantity,onQuantityChange:F=>b?.($.productId,F),onDelete:()=>w?.($.productId)}),H<i.length-1&&e.jsx(U,{})]},$.productId)),i.length===0&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx("p",{className:"text-content-secondary dark:text-content-secondary text-center",children:"No hay productos en el pedido"})})]}),e.jsxs("div",{className:"flex flex-col gap-4 pt-4 z-10",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-start text-base font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:[e.jsx("div",{className:"flex-1",children:"Subtotal"}),e.jsx("div",{className:"flex-1 text-right",children:N})]}),e.jsxs("div",{className:"flex items-start text-base font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:[e.jsx("div",{className:"flex-1",children:"Impuestos"}),e.jsx("div",{className:"flex-1 text-right",children:B})]}),e.jsx(U,{}),e.jsxs("div",{className:"flex items-start text-lg font-bold leading-7 text-content-primary dark:text-dark-content-primary",children:[e.jsx("div",{className:"flex-1",children:"Total"}),e.jsx("div",{className:"flex-1 text-right",children:k})]})]}),e.jsx("div",{className:"flex gap-2 w-full",children:e.jsx(z,{type:"default",leftIcon:e.jsx(pt,{className:"w-4 h-4"}),onClick:R,fullWidth:!0,disabled:i.length===0||A,children:j})})]})]})})]})})]});Me.displayName="ProductsView";const ft=({className:r="w-4 h-4"})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:r,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),ht=({onSubmit:r,onBackToLogin:a,isLoading:n=!1,errorMessage:t,successMessage:s,className:o="",showBackground:c=!0,variant:d="responsive"})=>{const[x,h]=y.useState(""),[l,u]=y.useState(""),p=f=>{if(f.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(x)){u("Por favor ingresa un email válido");return}u(""),r?.(x)},g=f=>{h(f.target.value),l&&u("")};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",o].join(" "),children:[c&&e.jsxs("div",{className:"hidden md:block absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.jpg",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-zinc-700",...d==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:d==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Restablecer Contraseña"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Reestablece tu contraseña ingresando con tu correo electrónico."})]}),t&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:t}),s&&e.jsx("div",{className:["w-full","p-3","bg-[#d1fae5]","dark:bg-[#064e3b]","border","border-[#a7f3d0]","dark:border-[#065f46]","rounded-md","text-[#065f46]","dark:text-[#a7f3d0]","text-sm"].join(" "),role:"status",children:s}),e.jsxs("form",{onSubmit:p,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(ft,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:x,onChange:g,disabled:n,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-zinc-700","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",l?"border-error-border!":""].filter(Boolean).join(" ")})]}),l&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:l})]}),e.jsx("button",{type:"submit",disabled:n||!x,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:n?"Enviando...":"Reestablecer Contraseña"})]}),e.jsx("button",{type:"button",onClick:a,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","bg-transparent","border","border-[#93d1fd]","dark:border-[#93d1fd]","rounded-md","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"Iniciar Sesión"})]})]})},bt=r=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r,children:e.jsx("path",{fillRule:"evenodd",d:"M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0Zm-5-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 9c-1.825 0-3.422.977-4.295 2.437A5.49 5.49 0 0 0 8 13.5a5.49 5.49 0 0 0 4.294-2.063A4.997 4.997 0 0 0 8 9Z",clipRule:"evenodd"})}),gt=r=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),vt=r=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r,children:e.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),kt=r=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...r,children:[e.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),e.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),yt=({onSubmit:r,onSignIn:a,onTermsClick:n,onPrivacyClick:t,isLoading:s=!1,errorMessage:o,className:c="",showBackground:d=!0,variant:x="responsive"})=>{const[h,l]=y.useState(""),[u,p]=y.useState(""),[g,f]=y.useState(""),[m,i]=y.useState(!1),[b,w]=y.useState(""),N=j=>{if(j.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(u)){w("Por favor ingresa un email válido");return}w(""),r?.(h,u,g)},B=j=>{p(j.target.value),b&&w("")},k=()=>{i(!m)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",c].join(" "),children:[d&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...x==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:x==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Crear Cuenta"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Ingresa todos los datos para crear tu cuenta."})]}),o&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:o}),e.jsxs("form",{onSubmit:N,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"name-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Nombre ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(bt,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"name-input",type:"text",placeholder:"Juan Pérez",value:h,onChange:j=>l(j.target.value),disabled:s,required:!0,autoComplete:"name",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(gt,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:u,onChange:B,disabled:s,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",b?"border-error-border!":""].filter(Boolean).join(" ")})]}),b&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:b})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(vt,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:m?"text":"password",placeholder:"••••••••",value:g,onChange:j=>f(j.target.value),disabled:s,required:!0,autoComplete:"new-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:k,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":m?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(kt,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:s||!h||!u||!g,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:s?"Registrando...":"Registrarse"})]}),e.jsx("button",{type:"button",onClick:a,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"Ya tengo una cuenta"}),e.jsx("div",{className:"w-full text-center",children:e.jsxs("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:["Al registrarse, estás aceptando nuestras"," ",e.jsx("button",{type:"button",onClick:n,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Condiciones de Uso"})," ","y nuestras"," ",e.jsx("button",{type:"button",onClick:t,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Políticas de Privacidad"}),"."]})})]})]})},wt=({className:r=""})=>e.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"})}),jt=({className:r=""})=>e.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M2.22 2.22a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-.72-.72v2.69a.75.75 0 0 1-1.5 0V2.5c0-.69.56-1.25 1.25-1.25h4.75a.75.75 0 0 1 0 1.5H4.81l.72.72a.75.75 0 0 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06ZM9 2.75a.75.75 0 0 1 .75-.75h4.75C15.19 2 15.75 2.56 15.75 3.25v4.75a.75.75 0 0 1-1.5 0V5.31l-.72.72a.75.75 0 1 1-1.06-1.06l2-2a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-.72-.72V8a.75.75 0 0 1-1.5 0V3.5H9.75A.75.75 0 0 1 9 2.75ZM2.75 9a.75.75 0 0 1 .75.75v2.69l.72-.72a.75.75 0 1 1 1.06 1.06l-2 2a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l.72.72V9.75c0-.41.34-.75.75-.75Zm10.5 0a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-4.75c-.69 0-1.25-.56-1.25-1.25V9.75a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"})}),Nt=({className:r=""})=>e.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M2.75 2a.75.75 0 0 0-.75.75v3.5a.75.75 0 0 0 1.5 0V3.81l2.47 2.47a.75.75 0 1 0 1.06-1.06L4.56 2.75h2.69a.75.75 0 0 0 0-1.5h-4.5ZM9 2.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-2.69l2.47 2.47a.75.75 0 1 1-1.06 1.06L10.5 4.56v2.69a.75.75 0 0 1-1.5 0v-4.5ZM2.75 9a.75.75 0 0 1 .75.75v2.69l2.47-2.47a.75.75 0 1 1 1.06 1.06L4.56 13.5h2.69a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75v-4.5a.75.75 0 0 1 .75-.75Zm10.5 0a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-.75.75h-4.5a.75.75 0 0 1 0-1.5h2.69l-2.47-2.47a.75.75 0 1 1 1.06-1.06l2.47 2.47V9.75a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"})}),Ct=({className:r=""})=>e.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M2 4.75A2.75 2.75 0 0 1 4.75 2h3a2.75 2.75 0 0 1 2.75 2.75v.5a.75.75 0 0 1-1.5 0v-.5c0-.69-.56-1.25-1.25-1.25h-3c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h3c.69 0 1.25-.56 1.25-1.25v-.5a.75.75 0 0 1 1.5 0v.5A2.75 2.75 0 0 1 7.75 14h-3A2.75 2.75 0 0 1 2 11.25v-6.5Zm10.58 2.96-1.72-1.72a.75.75 0 1 1 1.06-1.06l2.78 2.78c.3.29.3.76 0 1.06l-2.78 2.78a.75.75 0 1 1-1.06-1.06l1.72-1.72H7.25a.75.75 0 0 1 0-1.5h5.33Z",clipRule:"evenodd"})}),$t=({className:r=""})=>e.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M13.78 10.47a.75.75 0 0 1 0 1.06l-2.25 2.25a.75.75 0 1 1-1.06-1.06l.97-.97H5.75a.75.75 0 0 1 0-1.5h5.69l-.97-.97a.75.75 0 0 1 1.06-1.06l2.25 2.25ZM2.22 5.53a.75.75 0 0 1 0-1.06l2.25-2.25a.75.75 0 0 1 1.06 1.06l-.97.97h5.69a.75.75 0 0 1 0 1.5H4.56l.97.97a.75.75 0 1 1-1.06 1.06L2.22 5.53Z",clipRule:"evenodd"})}),Bt=({className:r=""})=>e.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M2.5 3.5h3v3h-3v-3ZM6.5 2a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-4ZM2.5 10.5h3v3h-3v-3ZM6.5 9a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-4ZM10.5 3.5h3v3h-3v-3ZM13.5 2h-3a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-.5ZM10.5 10.5h3v3h-3v-3Z"})}),Rt=({className:r=""})=>e.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"})}),St=({locations:r=[],activeLocationId:a,tables:n=[],tablesTitle:t="Mesas de Antejardín",showPeopleCountPanel:s=!1,selectedTable:o,onLocationSelect:c,onTableSelect:d,onCreateTables:x,onMergeTables:h,onSplitTables:l,onPeopleCountSelect:u,onAssignTable:p,onTransferTable:g,onSetCutlery:f,onClosePeoplePanel:m,onTableSwitchChange:i,isLoading:b=!1,errorMessage:w,tableLayout:N="grid",className:B="",userInfo:k})=>{const j=()=>e.jsx("div",{className:"w-full shrink-0",children:e.jsx(ee,{variant:"desktop",productName:"",userDropdown:k?{avatar:k.avatar,name:k.name,email:k.role,onMenuClick:()=>{}}:void 0})}),R=()=>e.jsxs("div",{className:["w-full","md:w-[245px]","h-auto","md:h-full","shrink-0","flex","flex-col","gap-2.5","p-4","overflow-auto"].join(" "),children:[e.jsx("div",{className:"w-full",children:e.jsx("h2",{className:["text-xl","leading-7","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Salones"})}),e.jsx("div",{className:"flex flex-col gap-2 w-full",children:b?e.jsx("div",{className:"text-content-secondary dark:text-content-secondary text-sm",children:"Cargando salones..."}):r.length===0?e.jsx("div",{className:"text-content-secondary dark:text-content-secondary text-sm",children:"No hay salones disponibles"}):r.map(v=>e.jsx(Be,{locationName:v.name,status:v.status,state:v.id===a?"actived":"enabled",capacity:v.capacity,onClick:()=>c?.(v.id)},v.id))})]}),A=()=>e.jsxs("div",{className:["flex-1","min-w-0","flex","flex-col","gap-4","p-4","bg-white","dark:bg-dark-bg-primary","rounded-tl-3xl","rounded-tr-3xl","overflow-auto"].join(" "),children:[e.jsxs("div",{className:"flex flex-col md:flex-row gap-4 items-start md:items-center justify-between w-full",children:[e.jsx("h2",{className:["text-xl","leading-7","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary","flex-1"].join(" "),children:t}),e.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.jsx(z,{type:"default",size:"sm",leftIcon:e.jsx(wt,{}),onClick:x,children:"Crear Mesas"}),e.jsx(z,{type:"default",size:"sm",leftIcon:e.jsx(jt,{}),onClick:h,children:"Unir Mesas"}),e.jsx(z,{type:"default",size:"sm",leftIcon:e.jsx(Nt,{}),onClick:l,children:"Separar Mesas"})]})]}),e.jsx("div",{className:["flex-1","bg-background-secondary","dark:bg-dark-bg-secondary","rounded-xl","p-4","overflow-auto","min-h-[400px]"].join(" "),children:b?e.jsx("div",{className:"flex items-center justify-center h-full text-content-secondary dark:text-content-secondary",children:"Cargando mesas..."}):w?e.jsx("div",{className:"flex items-center justify-center h-full text-error-content dark:text-error-content",children:w}):n.length===0?e.jsx("div",{className:"flex items-center justify-center h-full text-content-secondary dark:text-content-secondary",children:"No hay mesas en esta ubicación"}):N==="grid"?e.jsx("div",{className:"flex flex-col items-center justify-center min-h-full w-full p-4",children:e.jsx("div",{className:"flex flex-wrap gap-2 justify-center max-w-[664px]",children:n.map(v=>e.jsx(ne,{tableNumber:v.tableNumber,status:v.status,shape:v.shape,chairs:v.chairs,isActive:v.isActive,onClick:()=>d?.(v.tableNumber)},v.tableNumber))})}):e.jsx("div",{className:"relative w-full h-full min-h-[400px]",children:n.map(v=>e.jsx("div",{className:"absolute",style:v.position?{left:`${v.position.x}%`,top:`${v.position.y}%`,transform:"translate(-50%, -50%)"}:void 0,children:e.jsx(ne,{tableNumber:v.tableNumber,status:v.status,shape:v.shape,chairs:v.chairs,isActive:v.isActive,onClick:()=>d?.(v.tableNumber)})},v.tableNumber))})}),e.jsxs("div",{className:"flex flex-wrap gap-4 items-center w-full",children:[e.jsx(J,{status:"available"}),e.jsx(J,{status:"occupied"}),e.jsx(J,{status:"reserved"}),e.jsx(J,{status:"outOfService"})]})]}),C=()=>s?e.jsxs("div",{className:["w-full","md:w-[304px]","shrink-0","flex","flex-col","p-4","overflow-hidden"].join(" "),children:[e.jsxs("div",{className:"flex items-center justify-between w-full pb-4 border-b border-border-primary dark:border-dark-border-primary shrink-0",children:[e.jsx(oe,{label:o?.locationName||"Ubicación",description:o?.tableName||"Mesa",labelPosition:"trailing",checked:!1,onChange:v=>i?.(v.target.checked)}),e.jsx("button",{className:["p-2","rounded-md","border","border-primary-custom-300","text-primary-custom-600","hover:bg-background-secondary","dark:border-dark-border-custom","dark:hover:bg-dark-bg-primary","transition-colors"].join(" "),onClick:m,"aria-label":"Cerrar panel",children:e.jsx(Rt,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full flex-1 overflow-auto pt-4",children:[e.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[e.jsx("h3",{className:["text-xl","leading-7","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Tomar pedido"}),e.jsx("p",{className:["text-sm","leading-5","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Selecciona la cantidad de personas"})]}),e.jsx("div",{className:"grid grid-cols-3 gap-2 w-full mt-2",children:[1,2,3,4,5,6,7,8].map(v=>e.jsx(Re,{size:"l",border:!0,onClick:()=>u?.(v),children:v},v))})]}),e.jsxs("div",{className:"flex flex-col gap-4 w-full pt-4 mt-auto shrink-0 grow-0 basis-auto border-t border-border-primary dark:border-dark-border-primary",children:[e.jsx(z,{type:"default",size:"sm",fullWidth:!0,leftIcon:e.jsx(Ct,{}),onClick:p,children:"Asignar"}),e.jsxs("div",{className:"flex gap-2 w-full",children:[e.jsx(z,{type:"outline",size:"sm",fullWidth:!0,leftIcon:e.jsx($t,{}),onClick:g,children:"Transferir"}),e.jsx(z,{type:"outline",size:"sm",fullWidth:!0,leftIcon:e.jsx(Bt,{}),onClick:f,children:"Cubiertos"})]})]})]}):null;return e.jsxs("div",{className:["flex","flex-col","w-full","min-h-screen","bg-background-secondary","dark:bg-dark-bg-primary",B].join(" "),children:[j(),e.jsxs("div",{className:"flex flex-1 w-full overflow-hidden",children:[R(),A(),C()]})]})},Le=y.createContext(void 0),It=({children:r,defaultTheme:a="light"})=>{const[n,t]=y.useState(()=>typeof window<"u"&&localStorage.getItem("siesa-ui-theme")||a);y.useEffect(()=>{const c=window.document.documentElement;n==="dark"?c.classList.add("dark"):c.classList.remove("dark"),localStorage.setItem("siesa-ui-theme",n)},[n]);const s=()=>{t(c=>c==="light"?"dark":"light")},o=c=>{t(c)};return e.jsx(Le.Provider,{value:{theme:n,toggleTheme:s,setTheme:o},children:r})},Mt=()=>{const r=y.useContext(Le);if(r===void 0)throw new Error("useTheme debe ser usado dentro de un ThemeProvider");return r};exports.Alert=je;exports.Avatar=ye;exports.Badge=G;exports.Button=z;exports.Checkbox=ve;exports.DescriptionList=we;exports.Divider=U;exports.Dropdown=X;exports.DropdownItemCollapsible=ae;exports.DropdownItemHeading=ie;exports.Input=Y;exports.LayoutBase=Xr;exports.ListView=it;exports.LoginView=qr;exports.LoginViewPage=mt;exports.Navbar=ee;exports.NavigationBar=Ar;exports.NavigationRail=ur;exports.NavigationRailGroup=se;exports.NavigationRailItem=te;exports.NavigationRailPanel=Ne;exports.NavigationRailTypes=de;exports.Notification=Ye;exports.POSConvention=J;exports.POSLocationButton=Be;exports.POSNumberButton=Re;exports.POSProductButton=Se;exports.POSProductCard=Ie;exports.POSProductSidebarItems=ce;exports.POSTable=ne;exports.Pagination=tr;exports.ProductsView=Me;exports.Quantity=le;exports.Radio=ke;exports.RecoverPasswordView=ht;exports.Select=xr;exports.SignUpView=Kr;exports.SignUpViewPage=yt;exports.Switch=oe;exports.Table=$e;exports.TableLayoutView=St;exports.Tabs=Sr;exports.Textarea=ge;exports.ThemeProvider=It;exports.useTheme=Mt;
|
|
1273
1521
|
//# sourceMappingURL=siesa-ui-kit.cjs.map
|