siesa-ui-kit 1.0.11 → 1.0.13
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/LookupField/LookupField.d.ts +6 -0
- package/dist/components/LookupField/LookupField.d.ts.map +1 -0
- package/dist/components/LookupField/LookupField.types.d.ts +274 -0
- package/dist/components/LookupField/LookupField.types.d.ts.map +1 -0
- package/dist/components/LookupField/__stories__/DocComponents.d.ts +37 -0
- package/dist/components/LookupField/__stories__/DocComponents.d.ts.map +1 -0
- package/dist/components/LookupField/__stories__/mocks/browser.d.ts +2 -0
- package/dist/components/LookupField/__stories__/mocks/browser.d.ts.map +1 -0
- package/dist/components/LookupField/__stories__/mocks/data.d.ts +38 -0
- package/dist/components/LookupField/__stories__/mocks/data.d.ts.map +1 -0
- package/dist/components/LookupField/__stories__/mocks/handlers.d.ts +3 -0
- package/dist/components/LookupField/__stories__/mocks/handlers.d.ts.map +1 -0
- package/dist/components/LookupField/hooks/index.d.ts +10 -0
- package/dist/components/LookupField/hooks/index.d.ts.map +1 -0
- package/dist/components/LookupField/hooks/useClickOutside.d.ts +11 -0
- package/dist/components/LookupField/hooks/useClickOutside.d.ts.map +1 -0
- package/dist/components/LookupField/hooks/useDebouncedSearch.d.ts +2 -0
- package/dist/components/LookupField/hooks/useDebouncedSearch.d.ts.map +1 -0
- package/dist/components/LookupField/hooks/useFloatingDropdown.d.ts +38 -0
- package/dist/components/LookupField/hooks/useFloatingDropdown.d.ts.map +1 -0
- package/dist/components/LookupField/hooks/useKeyboardNavigation.d.ts +16 -0
- package/dist/components/LookupField/hooks/useKeyboardNavigation.d.ts.map +1 -0
- package/dist/components/LookupField/hooks/useTranslationSafe.d.ts +9 -0
- package/dist/components/LookupField/hooks/useTranslationSafe.d.ts.map +1 -0
- package/dist/components/LookupField/hooks/useVirtualList.d.ts +40 -0
- package/dist/components/LookupField/hooks/useVirtualList.d.ts.map +1 -0
- package/dist/components/LookupField/index.d.ts +7 -0
- package/dist/components/LookupField/index.d.ts.map +1 -0
- package/dist/components/LookupField/parts/LiveRegion.d.ts +6 -0
- package/dist/components/LookupField/parts/LiveRegion.d.ts.map +1 -0
- package/dist/components/LookupField/parts/SearchInput.d.ts +11 -0
- package/dist/components/LookupField/parts/SearchInput.d.ts.map +1 -0
- package/dist/components/LookupField/services/api.d.ts +23 -0
- package/dist/components/LookupField/services/api.d.ts.map +1 -0
- package/dist/components/LookupField/services/api.types.d.ts +74 -0
- package/dist/components/LookupField/services/api.types.d.ts.map +1 -0
- package/dist/components/LookupField/services/index.d.ts +4 -0
- package/dist/components/LookupField/services/index.d.ts.map +1 -0
- package/dist/components/LookupField/types/filter.types.d.ts +51 -0
- package/dist/components/LookupField/types/filter.types.d.ts.map +1 -0
- package/dist/components/LookupField/utils/cn.d.ts +3 -0
- package/dist/components/LookupField/utils/cn.d.ts.map +1 -0
- package/dist/components/LookupField/utils/filterBuilder.d.ts +35 -0
- package/dist/components/LookupField/utils/filterBuilder.d.ts.map +1 -0
- package/dist/components/LookupField/utils/index.d.ts +4 -0
- package/dist/components/LookupField/utils/index.d.ts.map +1 -0
- package/dist/components/LookupField/utils/templateInterpolation.d.ts +13 -0
- package/dist/components/LookupField/utils/templateInterpolation.d.ts.map +1 -0
- 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 +38 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/siesa-ui-kit.cjs +489 -238
- package/dist/siesa-ui-kit.cjs.map +1 -1
- package/dist/siesa-ui-kit.mjs +12302 -1519
- 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 +20 -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"),b=require("react"),xn=require("react-dom");function gn(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,r.get?r:{enumerable:!0,get:()=>t[s]})}}return n.default=t,Object.freeze(n)}const M=gn(b),Ls=gn(xn),Q=({type:t="default",size:n="base",iconOnly:s=!1,leftIcon:r,rightIcon:o,children:a,disabled:i=!1,className:l="",onClick:c,htmlType:u="button",fullWidth:d=!1,ariaLabel:f,badge:m=!1,badgeCount:p,badgeColor:g="red",...h})=>{const x={xs:s?"h-6 w-6 p-1":"h-6 py-1 px-2 gap-2",sm:s?"h-7 w-7 p-1.5":"h-7 py-1 px-2 gap-2",base:s?"h-8 w-8 p-2":"h-8 py-1.5 px-2.5 gap-2",l:s?"h-9 w-9 p-2.5":"h-9 py-2 px-3 gap-3",xl:s?"h-10 w-10 p-3":"h-10 py-2 px-4 gap-3"},v={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"},j={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
|
+
`},C=`
|
|
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=d?"w-full":"",N=[C,x[n],j[t],k,l].join(" ").replace(/\s+/g," ").trim(),A=D=>D?e.jsx("span",{className:`inline-flex items-center justify-center ${v[n]}`,children:D}):null,E=()=>s?A(r):e.jsxs(e.Fragment,{children:[r&&A(r),a&&e.jsx("span",{className:w[n],children:a}),o&&A(o)]}),S={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"}},y=S[g]||S.red,O=()=>!m&&p===void 0?null:p!==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
|
+
${y.bg}
|
|
84
|
+
${y.text}
|
|
85
85
|
pointer-events-none
|
|
86
|
-
`.trim().replace(/\s+/g," "),"aria-label":`${
|
|
86
|
+
`.trim().replace(/\s+/g," "),"aria-label":`${p} notificaciones`,children:p>99?"99+":p}):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
|
+
${y.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:u,className:`${N} ${m||p!==void 0?"relative":""}`,disabled:i,onClick:c,"aria-label":f,...h,children:[E(),O()]})},nt=b.forwardRef(({label:t,labelSecondary:n,helperText:s,error:r=!1,errorMessage:o,leftIcon:a,rightIcon:i,fullWidth:l=!1,className:c="",disabled:u=!1,id:d,...f},m)=>{const p=d||`input-${Math.random().toString(36).substr(2,9)}`,g=`
|
|
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
|
+
`,h=u?`
|
|
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
|
+
`,x=r?`
|
|
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
|
-
${p}
|
|
139
|
-
${h}
|
|
137
|
+
`:"",v=l?"w-full":"w-[265px]",w=j=>{if(!j)return null;const C=j.props.className||"";return b.cloneElement(j,{className:`w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary ${C}`})};return e.jsxs("div",{className:`flex flex-col gap-2 ${v} ${c}`,children:[t&&e.jsxs("label",{htmlFor:p,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:t}),n&&e.jsx("span",{className:"text-xs leading-4 text-primary-custom-600 dark:text-primary-custom-600",children:n})]}),e.jsxs("div",{className:"relative flex items-center",children:[a&&e.jsx("div",{className:"absolute left-3 pointer-events-none",children:w(a)}),e.jsx("input",{ref:m,id:p,disabled:u,className:`
|
|
140
138
|
${g}
|
|
141
|
-
${
|
|
142
|
-
${
|
|
143
|
-
|
|
139
|
+
${h}
|
|
140
|
+
${x}
|
|
141
|
+
${a?"pl-9":""}
|
|
142
|
+
${i?"pr-9":""}
|
|
143
|
+
`.trim().replace(/\s+/g," "),...f}),i&&e.jsx("div",{className:"absolute right-3 pointer-events-none",children:w(i)})]}),(s||o)&&e.jsx("p",{className:`
|
|
144
144
|
text-xs
|
|
145
145
|
leading-5
|
|
146
146
|
${r?"text-error-content dark:text-error-content":"text-content-tertiary dark:text-dark-content-tertiary"}
|
|
147
|
-
`.trim().replace(/\s+/g," "),children:r&&
|
|
147
|
+
`.trim().replace(/\s+/g," "),children:r&&o?o:s})]})});nt.displayName="Input";const bn=b.forwardRef(({label:t,description:n,helperText:s,error:r=!1,errorMessage:o,fullWidth:a=!1,resize:i="vertical",className:l="",disabled:c=!1,id:u,rows:d=4,...f},m)=>{const p=u||`textarea-${Math.random().toString(36).substr(2,9)}`,g=`
|
|
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
|
-
`,h=
|
|
167
|
+
`,h=c?`
|
|
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
|
+
`,x=r?`
|
|
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}
|
|
186
|
+
`:"",v=i==="none"?"resize-none":i==="vertical"?"resize-y":i==="horizontal"?"resize-x":"resize",w=a?"w-full":"w-[312px]";return e.jsxs("div",{className:`flex flex-col gap-2 ${w} ${l}`,children:[(t||n)&&e.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[t&&e.jsx("label",{htmlFor:p,className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:t}),n&&e.jsx("p",{className:"text-sm leading-5 text-content-secondary dark:text-dark-content-secondary",children:n})]}),e.jsx("textarea",{ref:m,id:p,disabled:c,rows:d,className:`
|
|
189
187
|
${g}
|
|
190
|
-
${
|
|
191
|
-
|
|
188
|
+
${h}
|
|
189
|
+
${x}
|
|
190
|
+
${v}
|
|
191
|
+
`.trim().replace(/\s+/g," "),...f}),(s||o)&&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:r&&
|
|
196
|
+
`.trim().replace(/\s+/g," "),children:r&&o?o:s})]})});bn.displayName="Textarea";const vn=b.forwardRef(({label:t,description:n,checked:s=!1,indeterminate:r=!1,disabled:o=!1,className:a="",id:i,onChange:l,...c},u)=>{const d=b.useRef(null),f=u||d,m=i||`checkbox-${Math.random().toString(36).substr(2,9)}`;b.useEffect(()=>{f.current&&(f.current.indeterminate=r)},[r,f]);const x=[`
|
|
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
|
+
`,o?`
|
|
211
211
|
opacity-50
|
|
212
212
|
cursor-not-allowed
|
|
213
|
-
`:
|
|
213
|
+
`:s||r?`
|
|
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
|
-
`,
|
|
229
|
+
`,s||r?`
|
|
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
|
+
`:"",o?"cursor-not-allowed":"cursor-pointer"].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:`inline-flex gap-3 items-start ${a}`,children:[e.jsxs("div",{className:"flex items-center justify-center h-5 w-4 shrink-0",children:[e.jsx("input",{ref:f,type:"checkbox",id:m,checked:s,disabled:o,onChange:l,className:"peer sr-only",...c}),e.jsxs("label",{htmlFor:m,className:x,children:[s&&!r&&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"})}),r&&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"})})]})]}),(t||n)&&e.jsxs("label",{htmlFor:m,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${o?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[t&&e.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:t}),n&&e.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:n})]})]})});vn.displayName="Checkbox";const kn=b.forwardRef(({label:t,description:n,checked:s=!1,disabled:r=!1,className:o="",id:a,onChange:i,value:l,name:c,...u},d)=>{const f=a||`radio-${Math.random().toString(36).substr(2,9)}`,m=`
|
|
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
|
+
`,p=r?`
|
|
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
|
+
`,g=s?`
|
|
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
|
-
${
|
|
268
|
-
${u}
|
|
266
|
+
`:"";return e.jsxs("div",{className:`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:d,type:"radio",id:f,checked:s,disabled:r,onChange:i,value:l,name:c,className:"peer sr-only",...u}),e.jsx("label",{htmlFor:f,className:`
|
|
267
|
+
${m}
|
|
269
268
|
${p}
|
|
269
|
+
${g}
|
|
270
270
|
${r?"cursor-not-allowed":"cursor-pointer"}
|
|
271
|
-
`.trim().replace(/\s+/g," "),children:
|
|
271
|
+
`.trim().replace(/\s+/g," "),children:s&&e.jsx("div",{className:"w-1.5 h-1.5 bg-white rounded-full dark:bg-dark-content-inverse"})})]}),(t||n)&&e.jsxs("label",{htmlFor:f,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${r?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[t&&e.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:t}),n&&e.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:n})]})]})});kn.displayName="Radio";const lr=b.forwardRef(({label:t,description:n,labelPosition:s="leading",checked:r=!1,disabled:o=!1,className:a="",id:i,onChange:l,ariaLabel:c,...u},d)=>{const f=i||`switch-${Math.random().toString(36).substr(2,9)}`,m=`
|
|
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
|
+
`,p=()=>o?r?`
|
|
281
281
|
bg-primary-custom-600
|
|
282
282
|
border-primary-inverse-border
|
|
283
283
|
opacity-50
|
|
@@ -296,22 +296,22 @@
|
|
|
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
|
+
`,g=()=>{const j=`
|
|
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
|
+
`,C=r?"left-[13px]":"left-px";return o?`${j} ${C} ${r?"border-primary-inverse-border dark:border-primary-inverse-border":"border-border-primary dark:border-dark-border-primary"}`:`${j} ${C} ${r?`
|
|
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
|
-
`}`},h=[
|
|
335
|
+
`}`},h=[m,p()].join(" ").replace(/\s+/g," ").trim(),x=g().replace(/\s+/g," ").trim(),v=t||n?e.jsxs("label",{htmlFor:f,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${o?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[t&&e.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:t}),n&&e.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:n})]}):null,w=e.jsxs("div",{className:"flex items-center justify-center shrink-0",children:[e.jsx("input",{ref:d,type:"checkbox",id:f,checked:r,disabled:o,onChange:l,className:"peer sr-only","aria-label":c||t,...u}),e.jsx("label",{htmlFor:f,className:h,"aria-hidden":"true",children:e.jsx("div",{className:x})})]});return e.jsx("div",{className:`flex gap-2 items-center w-[344px] ${a}`,children:s==="leading"?e.jsxs(e.Fragment,{children:[v,w]}):e.jsxs(e.Fragment,{children:[w,v]})})});lr.displayName="Switch";const yn=b.forwardRef(({size:t="10",type:n="circular",src:s,alt:r="",initials:o,className:a="",...i},l)=>{const c={4:"w-5 h-5",6:"w-6 h-6",8:"w-8 h-8",10:"w-10 h-10"},u={4:"text-xs",6:"text-xs",8:"text-sm",10:"text-base"},d={circular:"rounded-full",rounded:"rounded-md"},f=`
|
|
336
336
|
relative
|
|
337
337
|
inline-flex
|
|
338
338
|
items-center
|
|
339
339
|
justify-center
|
|
340
340
|
overflow-hidden
|
|
341
|
-
${
|
|
342
|
-
${
|
|
343
|
-
`;return
|
|
344
|
-
${
|
|
345
|
-
${
|
|
341
|
+
${c[t]}
|
|
342
|
+
${d[n]}
|
|
343
|
+
`;return s?e.jsx("div",{ref:l,className:`${f} ${a}`.trim().replace(/\s+/g," "),children:e.jsx("img",{src:s,alt:r,className:"w-full h-full object-cover",...i})}):o?e.jsx("div",{ref:l,className:`
|
|
344
|
+
${f}
|
|
345
|
+
${u[t]}
|
|
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
|
-
${
|
|
352
|
-
`.trim().replace(/\s+/g," "),children:e.jsx("span",{className:"leading-none",children:
|
|
353
|
-
${
|
|
351
|
+
${a}
|
|
352
|
+
`.trim().replace(/\s+/g," "),children:e.jsx("span",{className:"leading-none",children:o})}):e.jsx("div",{ref:l,className:`
|
|
353
|
+
${f}
|
|
354
354
|
bg-background-secondary
|
|
355
355
|
dark:bg-dark-bg-primary
|
|
356
|
-
${
|
|
357
|
-
`.trim().replace(/\s+/g," ")})});
|
|
356
|
+
${a}
|
|
357
|
+
`.trim().replace(/\s+/g," ")})});yn.displayName="Avatar";const Ie=b.forwardRef(({type:t="default",className:n="",...s},r)=>{const i=["w-full h-px border-0",{default:"bg-border-primary dark:bg-dark-border-primary",soft:"bg-border-secondary dark:bg-gray-700"}[t],n].join(" ").replace(/\s+/g," ").trim();return e.jsx("hr",{ref:r,className:i,...s})});Ie.displayName="Divider";const wn=b.forwardRef(({term:t,details:n,className:s="",...r},o)=>{const a=`
|
|
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
|
+
`,i="flex-1 min-w-[180px]",l=[a,s].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{ref:o,className:l,...r,children:[e.jsx("div",{className:i,children:e.jsx("p",{className:"text-sm leading-5 text-content-secondary dark:text-gray-400 font-normal",children:t})}),e.jsx("div",{className:i,children:e.jsx("p",{className:"text-sm leading-5 text-content-primary dark:text-dark-content-primary font-normal",children:n})})]})});wn.displayName="DescriptionList";const jn=b.forwardRef(({title:t,description:n,children:s,actions:r,onCancel:o,onConfirm:a,cancelText:i="Cancelar",confirmText:l="Confirmar",className:c="",...u},d)=>{const f=r||e.jsxs(e.Fragment,{children:[o&&e.jsx(Q,{type:"plain",size:"base",onClick:o,children:i}),a&&e.jsx(Q,{type:"default",size:"base",onClick:a,children:l})]});return e.jsx("div",{ref:d,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
|
+
${c}
|
|
375
|
+
`.trim().replace(/\s+/g," "),...u,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:t}),n&&e.jsx("p",{className:"text-sm leading-5 font-normal text-content-tertiary dark:text-content-tertiary",children:n})]}),s&&e.jsx("div",{className:"flex flex-col gap-3",children:s}),e.jsx("div",{className:"flex flex-wrap gap-3 items-center justify-end",children:f})]})})});jn.displayName="Alert";const $e=b.forwardRef(({color:t="zinc",leftIcon:n,label:s,count:r,className:o="",...a},i)=>{const c={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"}}[t],u=f=>{const m=f.props.className||"";return b.cloneElement(f,{className:`w-3 h-3 ${m}`.trim()})},d=["inline-flex","items-center","gap-1","px-1.5","py-1","rounded-md","font-sans",c.bg,c.hover,"transition-colors","duration-200",o].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{ref:i,className:d,...a,children:[n&&e.jsx("div",{className:`flex items-center justify-center ${c.text}`,children:u(n)}),e.jsx("span",{className:`font-sans text-xs leading-4 ${c.text}`,children:s}),r!==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
|
+
${c.notificationBg}
|
|
384
|
+
`.trim().replace(/\s+/g," "),children:e.jsx("span",{className:`font-sans text-xs leading-4 ${c.notificationText}`,children:r})})]})});$e.displayName="Badge";const cr=b.forwardRef(({value:t,defaultValue:n=0,onChange:s,min:r=0,max:o,label:a,linkText:i,onLinkClick:l,helperText:c,error:u=!1,disabled:d=!1,className:f="",...m},p)=>{const[g,h]=b.useState(n),x=t!==void 0,v=x?t:g;b.useEffect(()=>{x||h(n)},[n,x]);const w=D=>{let P=D;r!==void 0&&P<r&&(P=r),o!==void 0&&P>o&&(P=o),x||h(P),s?.(P)},j=()=>{d||w(v-1)},C=()=>{d||w(v+1)},k=d||r!==void 0&&v<=r,N=d||o!==void 0&&v>=o,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:"M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),E=()=>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"})}),S=u?"border-error-border dark:border-error-border":"border-border-primary dark:border-dark-border-primary",y=!d&&!u?"hover:border-[#f9f9f9] dark:hover:border-[#f9f9f9]":"",O=!d&&!u?"focus-within:border-2 focus-within:border-[#329cff] dark:focus-within:border-[#329cff]":"";return e.jsxs("div",{ref:p,className:`flex flex-col gap-2 ${f}`.trim(),...m,children:[a&&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:a}),i&&e.jsx("button",{type:"button",onClick:l,disabled:d,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
|
+
${d?"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:i})]}),e.jsxs("div",{className:`
|
|
393
393
|
flex
|
|
394
394
|
items-center
|
|
395
395
|
gap-2
|
|
@@ -398,26 +398,26 @@
|
|
|
398
398
|
bg-white
|
|
399
399
|
dark:bg-dark-bg-primary
|
|
400
400
|
border
|
|
401
|
-
${
|
|
402
|
-
${
|
|
403
|
-
${
|
|
401
|
+
${S}
|
|
402
|
+
${y}
|
|
403
|
+
${O}
|
|
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
|
+
${d?"opacity-50 cursor-not-allowed":""}
|
|
408
|
+
`.trim().replace(/\s+/g," "),children:[e.jsx("button",{type:"button",onClick:j,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(A,{})}),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
|
+
${v===0?"text-content-tertiary dark:text-content-tertiary":"text-content-primary dark:text-dark-content-primary"}
|
|
420
|
+
`.trim().replace(/\s+/g," "),children:v})}),e.jsx("button",{type:"button",onClick:C,disabled:N,className:`
|
|
421
421
|
flex
|
|
422
422
|
items-center
|
|
423
423
|
justify-center
|
|
@@ -426,10 +426,100 @@
|
|
|
426
426
|
${N?"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(E,{})})]}),c&&e.jsx("p",{className:`
|
|
430
430
|
text-sm leading-5
|
|
431
|
-
${
|
|
432
|
-
`.trim().replace(/\s+/g," "),children:
|
|
431
|
+
${u?"text-error-content dark:text-error-content":"text-content-tertiary dark:text-content-tertiary"}
|
|
432
|
+
`.trim().replace(/\s+/g," "),children:c})]})});cr.displayName="Quantity";const yt=({icon:t,label:n,selected:s=!1,disabled:r=!1,badge:o=!1,badgeCount:a,onClick:i,onMouseEnter:l,onMouseLeave:c,ariaLabel:u,id:d,showLabelText:f=!0,showIcon:m=!0,className:p=""})=>{const g=["flex","flex-col","items-center","justify-center","px-4","py-1","rounded-full","overflow-hidden","shrink-0",s?"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(" "),h=["w-4","h-4","shrink-0",s?"text-primary-custom-600 dark:text-white":r?"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(" "),x=["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(" "),v=["relative","flex","flex-col","items-center","gap-1","px-0.5","py-0","w-14","shrink-0",r?"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",p].join(" "),w=()=>!o&&a===void 0?null:a!==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":`${a} notificaciones`,"data-badge":!0,children:a>99?"99+":a}):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:v,disabled:r,onClick:i,onMouseEnter:l,onMouseLeave:c,"aria-label":u||n,"aria-current":s?"page":void 0,"aria-disabled":r,"data-item-id":d,"data-testid":`navigation-rail-item-${d}`,children:[m&&e.jsx("div",{className:g,children:e.jsx("span",{className:h,children:t})}),f&&e.jsx("p",{className:x,children:n}),w()]})};yt.displayName="NavigationRailItem";const $s=()=>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"})}),Qe=({variant:t="default",children:n,items:s,open:r,onOpenChange:o,disabled:a=!1,className:i="",menuClassName:l="",ariaLabel:c,placeholder:u="Options",renderTrigger:d})=>{const[f,m]=b.useState(!1),[p,g]=b.useState("bottom-left"),h=b.useRef(null),x=b.useRef(null),v=r!==void 0,w=v?r:f,j=b.useCallback(()=>{if(!h.current)return;const S=h.current.getBoundingClientRect(),y=window.innerWidth,O=window.innerHeight,D=200,P=250,Z=O-S.bottom,_=S.top,I=y-S.left,W=S.right,R=Z<P&&_>Z,B=I<D&&W>I;g(R&&B?"top-right":R?"top-left":B?"bottom-right":"bottom-left")},[]),C=()=>{if(a)return;const S=!w;S&&j(),v||m(S),o?.(S)};b.useEffect(()=>{const S=y=>{h.current&&!h.current.contains(y.target)&&(v||m(!1),o?.(!1))};if(w)return document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}},[w,v,o]),b.useEffect(()=>{const S=y=>{y.key==="Escape"&&w&&(v||m(!1),o?.(!1))};if(w)return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[w,v,o]);const k=S=>{S.disabled||S.isDivider||S.isHeading||(S.onClick&&S.onClick({}),v||m(!1),o?.(!1))},N=["inline-flex","items-center","justify-center","rounded-lg","font-bold","text-sm","whitespace-nowrap","transition-all","duration-150",t==="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",a&&"opacity-50",a&&"cursor-not-allowed",a&&"pointer-events-none",i].filter(Boolean).join(" ").replace(/\s+/g," ").trim(),E=["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"}[p],"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",l].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{ref:h,className:"relative inline-block",children:[d?e.jsx("div",{onClick:C,role:"button",tabIndex:a?-1:0,children:d(w)}):e.jsxs("button",{type:"button",className:N,onClick:C,disabled:a,"aria-label":c||(t==="icon-only"?"Abrir menú":void 0),"aria-haspopup":"true","aria-expanded":w,children:[t==="default"&&e.jsx("span",{children:n||u}),e.jsx($s,{})]}),w&&e.jsx("div",{ref:x,className:E,children:s.map((S,y)=>S.isDivider?e.jsx(Ts,{className:S.className},y):S.isHeading?e.jsx(Bs,{className:S.className,children:S.children},y):e.jsx(Os,{...S,onClick:()=>k(S)},y))})]})},Os=({children:t,icon:n,description:s,shortcut:r,disabled:o=!1,selected:a=!1,onClick:i,className:l=""})=>{const c=["flex","items-center","gap-3","px-4","py-2","rounded-lg","text-sm","font-normal","w-full","text-left","text-content-primary",!o&&"hover:bg-bg-primary",a&&"bg-bg-primary","dark:text-dark-content-primary",!o&&"dark:hover:bg-dark-bg-secondary",a&&"dark:bg-dark-bg-secondary",o&&"opacity-50",o&&"cursor-not-allowed",!o&&"cursor-pointer",l].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",className:c,onClick:i,disabled:o,children:[n&&e.jsx("span",{className:"inline-flex items-center justify-center w-4 h-4 text-content-secondary dark:text-dark-content-secondary",children:n}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-content-primary dark:text-dark-content-primary",children:t}),s&&e.jsx("div",{className:"text-xs text-content-secondary dark:text-dark-content-secondary mt-0.5",children:s})]}),r&&e.jsx("span",{className:"text-xs text-content-secondary dark:text-dark-content-secondary ml-auto whitespace-nowrap",children:r})]})},Bs=({children:t,className:n=""})=>{const s=["px-4","py-1","text-xs","font-normal","text-content-tertiary","dark:text-dark-content-tertiary",n].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{className:s,children:t})},Ts=({className:t=""})=>{const n=["px-4","py-1",t].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{className:n,children:e.jsx("div",{className:"h-px bg-border-primary dark:bg-dark-border-primary"})})},zs=({className:t=""})=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:e.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),wt=({label:t,icon:n,children:s=[],defaultOpen:r=!1,disabled:o=!1,onOpenChange:a,onClick:i,isCollapsible:l=s.length>0,showHeading:c=!1,headingLabel:u,showDivider:d=!0,selected:f=!1,badge:m=!1,badgeCount:p,badgeColor:g="red",className:h=""})=>{const[x,v]=b.useState(r),w=()=>{if(o||!l)return;const k=!x;v(k),a?.(k)},j=k=>{o||(l?w():i?.(k))},C=k=>N=>{k.disabled||k.onClick?.(N)};return e.jsxs("div",{className:`flex flex-col gap-0.5 w-full ${h}`,children:[c&&u&&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:u})}),e.jsxs("button",{onClick:j,disabled:o,className:["flex items-center gap-3 px-4 py-2 w-full","rounded-lg cursor-pointer","transition-all duration-150",f&&!o&&"bg-primary-custom-100 text-primary-custom-600",!f&&!o&&"text-content-primary",!o&&"hover:bg-primary-custom-100",!o&&"hover:text-primary-custom-600",f&&!o&&"dark:bg-dark-bg-custom dark:text-dark-content-custom",!f&&!o&&"dark:text-content-primary",!o&&"dark:hover:bg-dark-bg-custom",!o&&"dark:hover:text-dark-content-custom",!o&&"focus:outline-hidden",!o&&"focus:ring-2",!o&&"focus:ring-offset-2",!o&&"focus:ring-primary-custom-400",!o&&"focus:ring-offset-bg-primary",!o&&"dark:focus:ring-offset-dark-bg-primary",o&&"opacity-50",o&&"cursor-not-allowed"].filter(Boolean).join(" "),"aria-expanded":x&&l,"aria-disabled":o,children:[n&&e.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:n}),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:t})}),(m||p)&&e.jsx("div",{className:"flex items-center justify-center shrink-0",children:p?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:p>99?"99+":p}):e.jsx("div",{className:"w-2 h-2 rounded-full bg-red-500 dark:bg-red-600 shrink-0"})}),l&&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",x?"rotate-180":"rotate-0"].join(" "),children:e.jsx(zs,{className:"w-4 h-4"})})]}),d&&e.jsx("div",{className:"w-full h-px bg-border-primary dark:bg-dark-border-primary"}),x&&l&&s.length>0&&e.jsx("div",{className:"flex flex-col gap-0.5 w-full py-2 px-0",children:s.map((k,N)=>e.jsxs("div",{onClick:C(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})})]},N))})]})},Ds=({className:t="w-4 h-4"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,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"})}),_s=({className:t="w-4 h-4"})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,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"})]}),Ps=({className:t="w-4 h-4"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,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"})}),Vs=({className:t="w-4 h-4"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,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"})}),Fs={"cog-6-tooth":Ds,check:_s,x:Ps,"chevron-down":Vs},Zs=(t,n)=>{if(!t)return null;const s=Fs[t];return s?e.jsx(s,{className:n}):(console.warn(`Icon "${t}" not found in iconMap`),null)},dr=({label:t="Label",description:n,showDescription:s=!0,iconName:r="cog-6-tooth",showIcon:o=!0,actionLabel:a,showAction:i=!1,onActionClick:l,className:c="",...u})=>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
|
+
${c}
|
|
472
|
+
`,"data-testid":"dropdown-item-heading",...u,children:[o&&r&&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:Zs(r,"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:t}),s&&n&&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:n})]}),i&&a&&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:l,role:"button",tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&l?.(d)},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:a})})]});dr.displayName="DropdownItemHeading";const Hs=({count:t,color:n="red",className:s="",ariaLabel:r})=>{const o={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"}},a=o[n]||o.red,i=r||(t!==void 0&&t>0?`${t} notificaci${t===1?"ón":"ones"}`:"Notificación pendiente");if(t!==void 0&&t>0){const l=t>99?"99+":t.toString();return e.jsx("span",{className:`
|
|
433
523
|
inline-flex
|
|
434
524
|
items-center
|
|
435
525
|
justify-center
|
|
@@ -440,22 +530,22 @@
|
|
|
440
530
|
text-[10px]
|
|
441
531
|
font-bold
|
|
442
532
|
leading-none
|
|
443
|
-
${
|
|
444
|
-
${
|
|
533
|
+
${a.bg}
|
|
534
|
+
${a.text}
|
|
445
535
|
pointer-events-none
|
|
446
|
-
dark:${
|
|
447
|
-
dark:${
|
|
448
|
-
${
|
|
449
|
-
`.trim().replace(/\s+/g," "),role:"status","aria-label":
|
|
536
|
+
dark:${a.bg}
|
|
537
|
+
dark:${a.text}
|
|
538
|
+
${s}
|
|
539
|
+
`.trim().replace(/\s+/g," "),role:"status","aria-label":i,children:l})}return e.jsx("span",{className:`
|
|
450
540
|
inline-block
|
|
451
541
|
w-2
|
|
452
542
|
h-2
|
|
453
543
|
rounded-full
|
|
454
|
-
${
|
|
544
|
+
${a.bg}
|
|
455
545
|
pointer-events-none
|
|
456
|
-
dark:${
|
|
457
|
-
${
|
|
458
|
-
`.trim().replace(/\s+/g," "),role:"status","aria-label":
|
|
546
|
+
dark:${a.bg}
|
|
547
|
+
${s}
|
|
548
|
+
`.trim().replace(/\s+/g," "),role:"status","aria-label":i})},Ws=({className:t=""})=>e.jsx("svg",{className:t,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"})}),Us=({className:t=""})=>e.jsx("svg",{className:t,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"})}),Gs=({currentPage:t=1,totalPages:n,onPageChange:s,backText:r="Atrás",nextText:o="Siguiente",siblingCount:a=1,showBackButton:i=!0,showNextButton:l=!0,className:c="",ariaLabel:u="Paginación"})=>{const d=b.useMemo(()=>{const h=a*2+3+2;if(n<=h)return Array.from({length:n},(N,A)=>A+1);const x=Math.max(t-a,1),v=Math.min(t+a,n),w=x>2,j=v<n-1,C=1,k=n;if(!w&&j){const N=3+2*a;return[...Array.from({length:N},(E,S)=>S+1),"...",n]}if(w&&!j){const N=3+2*a,A=Array.from({length:N},(E,S)=>n-N+S+1);return[C,"...",...A]}if(w&&j){const N=Array.from({length:v-x+1},(A,E)=>x+E);return[C,"...",...N,"...",k]}return[]},[t,n,a]),f=g=>{g>=1&&g<=n&&g!==t&&s?.(g)},m=({page:g,isActive:h=!1,disabled:x=!1,onClick:v,ariaLabel:w})=>{const j=g==="...",A=[`
|
|
459
549
|
inline-flex
|
|
460
550
|
items-center
|
|
461
551
|
justify-center
|
|
@@ -468,7 +558,7 @@
|
|
|
468
558
|
whitespace-nowrap
|
|
469
559
|
transition-all
|
|
470
560
|
duration-150
|
|
471
|
-
`,
|
|
561
|
+
`,j?`
|
|
472
562
|
text-primary-custom-600
|
|
473
563
|
dark:text-primary-custom-600
|
|
474
564
|
cursor-default
|
|
@@ -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
|
+
`,x?`
|
|
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:A,onClick:v,disabled:x||j,"aria-label":w,"aria-current":h?"page":void 0,children:g})},p=`
|
|
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
|
+
${c}
|
|
588
|
+
`.replace(/\s+/g," ").trim();return e.jsxs("nav",{className:p,"aria-label":u,role:"navigation",children:[i&&e.jsxs("button",{type:"button",className:`
|
|
499
589
|
inline-flex
|
|
500
590
|
items-center
|
|
501
591
|
justify-center
|
|
@@ -514,7 +604,7 @@
|
|
|
514
604
|
transition-all
|
|
515
605
|
duration-150
|
|
516
606
|
${t===1?"opacity-50 cursor-not-allowed pointer-events-none":""}
|
|
517
|
-
`.replace(/\s+/g," ").trim(),onClick:()=>
|
|
607
|
+
`.replace(/\s+/g," ").trim(),onClick:()=>f(t-1),disabled:t===1,"aria-label":`${r} page`,children:[e.jsx(Ws,{className:"w-4 h-4"}),r]}),e.jsx("div",{className:"inline-flex items-center",children:d.map((g,h)=>e.jsx(m,{page:g,isActive:g===t,onClick:()=>typeof g=="number"&&f(g),ariaLabel:typeof g=="number"?`Go to page ${g}`:`Page ${g}`},`${g}-${h}`))}),l&&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
|
-
${t===
|
|
536
|
-
`.replace(/\s+/g," ").trim(),onClick:()=>
|
|
625
|
+
${t===n?"opacity-50 cursor-not-allowed pointer-events-none":""}
|
|
626
|
+
`.replace(/\s+/g," ").trim(),onClick:()=>f(t+1),disabled:t===n,"aria-label":`${o} page`,children:[o,e.jsx(Us,{className:"w-4 h-4"})]})]})};function qs({title:t,titleId:n,...s},r){return M.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:r,"aria-labelledby":n},s),t?M.createElement("title",{id:n},t):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Ks=M.forwardRef(qs);function Xs({title:t,titleId:n,...s},r){return M.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:r,"aria-labelledby":n},s),t?M.createElement("title",{id:n},t):null,M.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 Ys=M.forwardRef(Xs);function Qs({title:t,titleId:n,...s},r){return M.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:r,"aria-labelledby":n},s),t?M.createElement("title",{id:n},t):null,M.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 Js=M.forwardRef(Qs),eo=({className:t="size-5"})=>e.jsx(Ys,{className:t,"aria-hidden":"true"}),to=({className:t="size-4"})=>e.jsx(Ks,{className:t,"aria-hidden":"true"}),ro=({options:t=[],value:n,defaultValue:s,placeholder:r="Seleccionar...",disabled:o=!1,error:a=!1,label:i,description:l,showLabel:c=!0,showDescription:u=!0,menuHeader:d,onChange:f,className:m="",triggerClassName:p="",menuClassName:g="",ariaLabel:h,id:x,name:v,required:w=!1,menuPosition:j="bottom",fullWidth:C=!1})=>{const[k,N]=b.useState(!1),[A,E]=b.useState(n!==void 0?n:s),[S,y]=b.useState(-1),O=b.useRef(null),D=b.useRef(null),P=b.useRef(null);b.useEffect(()=>{n!==void 0&&E(n)},[n]),b.useEffect(()=>{const G=ne=>{O.current&&!O.current.contains(ne.target)&&N(!1)};if(k)return document.addEventListener("mousedown",G),()=>{document.removeEventListener("mousedown",G)}},[k]),b.useEffect(()=>{const G=ne=>{if(k)switch(ne.key){case"Escape":N(!1),D.current?.focus();break;case"ArrowDown":ne.preventDefault(),y(le=>le<t.length-1?le+1:0);break;case"ArrowUp":ne.preventDefault(),y(le=>le>0?le-1:t.length-1);break;case"Enter":ne.preventDefault(),S>=0&&S<t.length&&I(t[S]);break}};if(k)return document.addEventListener("keydown",G),()=>{document.removeEventListener("keydown",G)}},[k,S,t]);const Z=t.find(G=>G.value===A),_=()=>{o||(N(!k),y(-1))},I=G=>{G.disabled||(E(G.value),N(!1),f?.(G.value),setTimeout(()=>{D.current?.focus()},0))},z=[`
|
|
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
|
+
`,C?"w-full":"min-w-[200px]",a?`
|
|
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
|
-
`,!a
|
|
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
|
+
`,!o&&!a?`
|
|
656
|
+
hover:border-[#f9f9f9]
|
|
657
|
+
dark:hover:border-[#3a3a3f]
|
|
658
|
+
`:"",o?"":`
|
|
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
|
+
`,o?`
|
|
578
666
|
opacity-50
|
|
579
667
|
cursor-not-allowed
|
|
580
|
-
`:"",
|
|
668
|
+
`:"",p].join(" ").replace(/\s+/g," ").trim(),oe=[`
|
|
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
|
+
`,j==="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",g].join(" ").replace(/\s+/g," ").trim(),ue=`
|
|
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
|
+
`,re=(G,ne)=>{const le=G.value===A,Ne=ne===S,qe=Ne||le&&Ne?"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",ve=G.disabled?"":"hover:bg-primary-custom-600 hover:text-primary-inverse-content dark:hover:bg-primary-custom-600 dark:hover:text-primary-inverse-content",fe=G.disabled?"opacity-50 cursor-not-allowed":"";return[ue,qe,ve,fe].join(" ").replace(/\s+/g," ").trim()},ae=["shrink-0","w-4","h-4","transition-transform","duration-150",k&&"rotate-180",o?"text-content-tertiary dark:text-content-tertiary":"text-content-secondary dark:text-content-secondary"].filter(Boolean).join(" ").replace(/\s+/g," ").trim(),je="shrink-0 w-4 h-4";return e.jsxs("div",{className:`relative ${C?"w-full":""} ${m}`,ref:O,children:[c&&i||u&&l?e.jsxs("div",{className:"flex flex-col gap-1 mb-1 w-full",children:[c&&i&&e.jsxs("label",{htmlFor:x,className:"text-sm font-bold leading-5 text-content-primary dark:text-dark-content-primary",children:[i,w&&e.jsx("span",{className:"ml-1 text-error-content",children:"*"})]}),u&&l&&e.jsx("p",{className:"text-sm font-normal leading-5 text-content-tertiary dark:text-content-tertiary",children:l})]}):null,e.jsxs("button",{ref:D,type:"button",className:z,onClick:_,disabled:o,"aria-label":h||i,"aria-haspopup":"listbox","aria-expanded":k,id:x,children:[e.jsx("span",{className:Z?"":"text-content-secondary dark:text-content-secondary",children:Z?Z.label:r}),e.jsx(eo,{className:ae})]}),v&&e.jsx("input",{type:"hidden",name:v,value:A!==void 0?String(A):""}),k&&e.jsxs("div",{ref:P,className:oe,role:"listbox",children:[d&&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:d})}),t.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"}),t.map((G,ne)=>e.jsxs("div",{className:re(G,ne),onClick:()=>I(G),onMouseEnter:()=>y(ne),role:"option","aria-selected":G.value===A,"aria-disabled":G.disabled,children:[e.jsx("div",{className:"w-4 flex items-center justify-center",children:G.value===A&&e.jsx(to,{className:je})}),G.icon&&e.jsx("span",{className:"shrink-0 w-4 h-4",children:G.icon}),e.jsx("span",{className:"flex-1 text-left",children:G.label})]},G.value))]})]})},no=({icon:t,label:n,selected:s=!1,disabled:r=!1,badge:o=!1,badgeCount:a,onClick:i,ariaLabel:l,id:c})=>{const u=["flex","flex-col","items-center","justify-center","px-4","py-1","rounded-full","overflow-hidden","shrink-0",s?"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(" "),d=["w-4","h-4","shrink-0",s||!r?s?"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(" "),f=["text-[10px]","leading-3","font-bold","text-center","w-full","min-w-full","text-content-primary","dark:text-dark-content-primary"].join(" "),m=["relative","flex","flex-col","items-center","gap-1","px-0.5","py-0","w-14","shrink-0",r?"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(" "),p=()=>!o&&a===void 0?null:a!==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":`${a} notificaciones`,children:a>99?"99+":a}):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:m,disabled:r,onClick:i,"aria-label":l||n,"aria-current":s?"page":void 0,"data-item-id":c,children:[e.jsx("div",{className:u,children:e.jsx("span",{className:d,children:t})}),e.jsx("p",{className:f,children:n}),p()]})},so=({items:t,alignment:n="top",showFab:s=!1,fabIcon:r,onFabClick:o,fabAriaLabel:a="Crear nuevo",className:i="",selectedId:l,onItemSelect:c})=>{const u=["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",i].join(" "),d=["flex","flex-col","items-center","gap-10","w-20","pb-10","pt-2",n!=="top"&&"grow",n!=="top"&&"basis-0",n!=="top"&&"min-h-0"].filter(Boolean).join(" "),m=(()=>{const h=["flex","flex-col","items-center","gap-3","w-20"];return n==="top"?[...h,"shrink-0"].join(" "):n==="center"?[...h,"absolute","left-1/2","top-1/2","-translate-x-1/2","-translate-y-1/2"].join(" "):n==="bottom"?[...h,"grow","basis-0","min-h-0","justify-end","shrink-0"].join(" "):h.join(" ")})(),p=["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(" "),g=h=>{h.disabled||(h.onClick&&h.onClick(),c&&h.id&&c(h.id))};return e.jsx("nav",{className:u,"aria-label":"Navegación principal",children:e.jsxs("div",{className:d,children:[s&&e.jsx("div",{className:"flex items-start gap-2.5 shrink-0",children:e.jsx("button",{type:"button",className:p,onClick:o,"aria-label":a,children:e.jsx("span",{className:"w-4 h-4 flex items-center justify-center",children:r})})}),e.jsx("div",{className:m,children:t.map((h,x)=>e.jsx(no,{...h,selected:h.selected||l!==void 0&&h.id===l,onClick:()=>g(h)},h.id||x))})]})})},Nn=({height:t=900,width:n=248,showHeading:s=!0,heading:r,showSearch:o=!0,search:a,sections:i,items:l,className:c="",panelClassName:u=""})=>{const[d,f]=b.useState(a?.value||""),m=h=>{f(h),a?.onChange?.(h)},p={height:typeof t=="number"?`${t}px`:t},g={width:typeof n=="number"?`${n}px`:n};return e.jsx("div",{className:`flex items-start relative ${c}`,style:p,"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 ${u}`,style:g,"data-testid":"navigation-rail-panel",children:[s&&r&&e.jsx("div",{className:"flex flex-col items-start p-3 relative shrink-0 w-full",children:e.jsx(dr,{label:r.label,description:r.description,showDescription:r.showDescription!==!1,iconName:r.iconName,showIcon:!0,actionLabel:r.actionLabel,showAction:r.showAction,onActionClick:r.onActionClick,className:"w-full"})}),o&&e.jsx("div",{className:"flex flex-col items-start p-3 relative shrink-0 w-full","data-testid":"navigation-rail-search",children:e.jsx(nt,{placeholder:a?.placeholder||"Buscar módulo",value:d,onChange:h=>m(h.target.value),className:"w-full"})}),e.jsx(Ie,{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:[i&&i.length>0?i.map((h,x)=>e.jsxs("div",{className:"w-full",children:[h.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-${x}`,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:h.heading})}),e.jsx("div",{className:"flex flex-col gap-0.5 items-start relative shrink-0 w-full","data-testid":`section-items-${x}`,children:h.items.map((v,w)=>e.jsx(Tr,{item:v},`item-${x}-${w}`))}),h.showDivider!==!1&&x<i.length-1&&e.jsx(Ie,{className:"mt-3 w-full"})]},`section-${x}`)):null,l&&l.length>0&&!i?l.map((h,x)=>e.jsx(Tr,{item:h},`item-${x}`)):null]})]})})},Tr=({item:t})=>t.isCollapsible?e.jsx(wt,{label:t.label,icon:t.icon,children:t.children,defaultOpen:t.defaultOpen,disabled:t.disabled,onClick:t.onClick,onOpenChange:t.onOpenChange,className:t.className,showDivider:!1,showHeading:!1}):e.jsxs("button",{onClick:t.onClick,disabled:t.disabled,className:["flex items-center gap-3 px-4 py-2 w-full","rounded-lg cursor-pointer","transition-colors duration-150",!t.disabled&&"text-content-primary",!t.disabled&&"hover:bg-primary-custom-100",!t.disabled&&"dark:text-content-primary",!t.disabled&&"dark:hover:bg-dark-bg-custom",!t.disabled&&"focus:outline-hidden",!t.disabled&&"focus:ring-2",!t.disabled&&"focus:ring-offset-2",!t.disabled&&"focus:ring-primary-custom-400",!t.disabled&&"focus:ring-offset-bg-primary",!t.disabled&&"dark:focus:ring-offset-dark-bg-primary",t.disabled&&"opacity-50",t.disabled&&"cursor-not-allowed",t.className].filter(Boolean).join(" "),"data-testid":`navigation-rail-item-${t.label}`,"aria-disabled":t.disabled,children:[t.icon&&e.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:t.icon}),e.jsx("p",{className:"font-['Inter:Regular',sans-serif] text-sm font-normal leading-5 not-italic relative shrink-0 text-left",children:t.label})]});function oo({title:t,titleId:n,...s},r){return M.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:r,"aria-labelledby":n},s),t?M.createElement("title",{id:n},t):null,M.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 ao=M.forwardRef(oo);function io({title:t,titleId:n,...s},r){return M.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:r,"aria-labelledby":n},s),t?M.createElement("title",{id:n},t):null,M.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 lo=M.forwardRef(io);function co({title:t,titleId:n,...s},r){return M.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:r,"aria-labelledby":n},s),t?M.createElement("title",{id:n},t):null,M.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 Cn=M.forwardRef(co),uo=({className:t="size-5"})=>e.jsx(lo,{className:t,"aria-hidden":"true"}),fo=({className:t="size-5"})=>e.jsx(ao,{className:t,"aria-hidden":"true"}),zr=({className:t="size-5"})=>e.jsx(Js,{className:t,"aria-hidden":"true"}),Dr=({className:t="size-5"})=>e.jsx(Cn,{className:t,"aria-hidden":"true"}),ur=b.forwardRef(({collapsed:t=!0,items:n=[],showRecentButton:s=!0,showSearchButton:r=!0,onCollapsedChange:o,onItemClick:a,onItemHover:i,className:l,labels:c={}},u)=>{const[d,f]=b.useState(""),m={searchButton:c.searchButton??"Search",searchPlaceholder:c.searchPlaceholder??"Buscar módulo",recentButton:c.recentButton??"Recientes",collapseButton:c.collapseButton??"Colapsar",expandButton:c.expandButton??"Expandir"},p=()=>{o?.(!t)},g=(x,v)=>{v.onClick?.(new Event("click")),a?.(x,v)},h=(x,v)=>{i?.(x,v)};return e.jsxs("div",{ref:u,className:`
|
|
730
|
+
${t?"w-[80px]":"w-[215px]"}
|
|
731
|
+
h-full
|
|
732
|
+
bg-background-primary dark:bg-background-primary
|
|
733
|
+
${t?"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
|
+
${l||""}
|
|
740
|
+
`,children:[!t&&e.jsxs("div",{className:"w-full flex flex-col gap-3 px-3 py-3 relative shrink-0",children:[e.jsx(nt,{placeholder:m.searchPlaceholder,value:d,onChange:x=>f(x.target.value),leftIcon:e.jsx(Dr,{className:"size-4 text-content-secondary dark:text-content-secondary"}),fullWidth:!0}),e.jsx(Ie,{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
|
+
${t?"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:[t&&r&&e.jsx(Q,{type:"default",size:"xl",iconOnly:!0,leftIcon:e.jsx(Dr,{className:"overflow-clip relative shrink-0 size-4 text-primary-inverse-content dark:text-primary-inverse-content"}),ariaLabel:m.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
|
+
${t?"gap-3 leading-none w-[80px]":"gap-0.5 p-3 w-full"}
|
|
752
|
+
`,children:n.length===0?e.jsxs(e.Fragment,{children:[t&&Array.from({length:4}).map((x,v)=>e.jsx(yt,{id:`demo-collapsed-${v}`,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-${v}`)),!t&&Array.from({length:6}).map((x,v)=>e.jsx(wt,{label:"Item",showDivider:!1,showHeading:!1},`demo-expanded-${v}`))]}):t?e.jsx(e.Fragment,{children:n.map((x,v)=>e.jsx(yt,{id:x.id,label:x.label,icon:x.icon,selected:x.active,disabled:x.disabled,badge:x.badge,badgeCount:x.badgeCount,ariaLabel:x.ariaLabel,showLabelText:!1,onClick:()=>g(v,x),onMouseEnter:()=>h(v,x),onMouseLeave:x.onMouseLeave},x.id))}):e.jsx(e.Fragment,{children:n.map((x,v)=>{const w=x.children&&x.children.length>0;return e.jsx("div",{className:"w-full",children:e.jsx(wt,{label:x.label,icon:x.icon,selected:x.active,disabled:x.disabled,badge:x.badge,badgeCount:x.badgeCount,badgeColor:x.badgeColor,showDivider:!1,showHeading:!1,isCollapsible:w,defaultOpen:x.defaultOpen,children:w?x.children:void 0,onClick:()=>g(v,x)})},x.id)})})}),e.jsxs("div",{className:`w-full flex flex-col gap-3 items-center relative shrink-0 ${t?"":"px-3"}`,children:[e.jsx(Ie,{className:"w-full"}),e.jsxs("div",{className:`
|
|
753
|
+
flex flex-col gap-3 relative shrink-0 w-full
|
|
754
|
+
${t?"items-stretch px-3":"items-stretch"}
|
|
755
|
+
`,children:[s&&t&&e.jsx(Q,{type:"outline",size:"base",fullWidth:!0,leftIcon:e.jsx(zr,{className:"size-4 text-primary-custom-600 dark:text-primary-custom-600"}),ariaLabel:m.recentButton}),s&&!t&&e.jsx(Q,{type:"outline",size:"base",leftIcon:e.jsx(zr,{className:"size-4 text-primary-custom-600 dark:text-primary-custom-600"}),fullWidth:!0,children:m.recentButton}),t?e.jsx(Q,{type:"plain",size:"base",fullWidth:!0,leftIcon:e.jsx(uo,{className:"overflow-clip relative shrink-0 size-4 text-background-inverse-custom-primary dark:text-background-inverse-custom-primary"}),onClick:p,ariaLabel:m.expandButton}):e.jsx(Q,{type:"outline",size:"base",leftIcon:e.jsx(fo,{className:"overflow-clip relative shrink-0 size-4 text-content-custom-primary dark:text-content-custom-primary"}),onClick:p,fullWidth:!0,children:m.collapseButton})]})]})]})]})});ur.displayName="NavigationRailTypes";const mo=({className:t="size-4"})=>e.jsx(Cn,{className:t,"aria-hidden":"true"}),Et=b.forwardRef(({state:t="collapsed",items:n=[],onStateChange:s,onItemClick:r,onItemHover:o,labels:a={},className:i,showSearchButton:l=!0},c)=>{const[u,d]=b.useState(!1),[f,m]=b.useState("hover"),[p,g]=b.useState(null),h=b.useRef(null),x={searchPlaceholder:a.searchPlaceholder??"Buscar módulo",collapseButton:a.collapseButton??"Colapsar",recentSection:a.recentSection??"Recientes",frequentSection:a.frequentSection??"Opciones frecuentes"},v=t==="collapsed"||t==="hover"||t==="searcher";b.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const w=y=>{s?.(y?"collapsed":"expanded")},j=y=>{const O=n[y];O&&r?.(O)},C=y=>{const O=n[y];O&&v&&k(O)},k=y=>{v&&y.isCollapsible&&y.children&&(h.current&&(clearTimeout(h.current),h.current=null),g(y),m("hover"),d(!0),o?.(y))},N=()=>{v&&f==="hover"&&(h.current=setTimeout(()=>{d(!1),g(null)},150))},A=()=>{h.current&&(clearTimeout(h.current),h.current=null)},E=()=>{v&&f==="hover"&&(d(!1),g(null))},S=n.map(y=>({id:y.id,label:y.label,icon:y.icon,active:y.active,disabled:y.disabled,badge:y.badge,badgeCount:y.badgeCount,children:y.children,defaultOpen:y.defaultOpen,onClick:()=>{y.onClick?.()},onMouseLeave:()=>N()}));return e.jsxs("div",{ref:c,className:`relative flex items-start h-full ${i||""}`,"data-testid":"navigation-rail-group",children:[e.jsx(ur,{collapsed:v,items:S,showRecentButton:!1,showSearchButton:l,onCollapsedChange:w,onItemClick:j,onItemHover:C,labels:{searchButton:x.searchPlaceholder,searchPlaceholder:x.searchPlaceholder,collapseButton:x.collapseButton}}),u&&v&&e.jsx("div",{className:"absolute left-[80px] top-0 z-10 h-full",onMouseEnter:A,onMouseLeave:E,children:e.jsx(Nn,{height:"100%",width:248,showHeading:f==="hover"&&p!==null,heading:f==="hover"&&p?{label:p.label,iconName:"cog-6-tooth",showDescription:!1,showAction:!1}:void 0,showSearch:f==="searcher",search:{placeholder:x.searchPlaceholder},sections:f==="hover"&&p?.children?[{items:p.children.map(y=>({label:y.label,icon:y.icon,onClick:y.onClick,disabled:y.disabled}))}]:f==="searcher"?[{heading:x.recentSection,items:[{label:"Configuración",icon:e.jsx(mo,{className:"size-4"})}]},{heading:x.frequentSection,items:[{label:"Item"}]}]:[]})})]})});Et.displayName="NavigationRailGroup";const po=()=>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"})}),ho=()=>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"})}),xo=()=>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"})}),go=()=>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"})}),bo=({column:t,sortable:n,sorted:s,sortDirection:r,onSort:o})=>{const c=[`
|
|
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
|
+
`,n?`
|
|
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"}[t.align||"left"]].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:
|
|
772
|
+
`:"",{left:"justify-start",center:"justify-center",right:"justify-end"}[t.align||"left"]].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:c,onClick:n?o:void 0,role:n?"button":void 0,tabIndex:n?0:void 0,onKeyDown:n?u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),o())}:void 0,style:{width:t.width},children:[e.jsx("span",{className:`
|
|
627
773
|
text-sm
|
|
628
774
|
font-bold
|
|
629
775
|
text-content-secondary
|
|
@@ -631,25 +777,25 @@
|
|
|
631
777
|
text-ellipsis
|
|
632
778
|
overflow-hidden
|
|
633
779
|
whitespace-nowrap
|
|
634
|
-
`,children:t.header}),
|
|
780
|
+
`,children:t.header}),n&&e.jsxs("span",{className:"shrink-0 text-content-secondary dark:text-content-secondary",children:[s&&r==="asc"&&e.jsx(po,{}),s&&r==="desc"&&e.jsx(ho,{}),!s&&e.jsx("div",{className:"w-4 h-4"})]})]})},_r=({children:t,align:n="left",width:s,isStriped:r=!1,rowIndex:o=0})=>{const a={left:"justify-start text-left",center:"justify-center text-center",right:"justify-end text-right"},i=r&&o%2===1?"bg-background-secondary dark:bg-dark-bg-primary/30":"";return e.jsx("div",{className:`
|
|
635
781
|
flex
|
|
636
782
|
flex-col
|
|
637
|
-
${
|
|
783
|
+
${a[n]}
|
|
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
|
-
${
|
|
645
|
-
`,style:{width:
|
|
790
|
+
${i}
|
|
791
|
+
`,style:{width:s},children:e.jsx("span",{className:`
|
|
646
792
|
text-sm
|
|
647
793
|
text-content-primary
|
|
648
794
|
dark:text-dark-content-primary
|
|
649
795
|
text-ellipsis
|
|
650
796
|
overflow-hidden
|
|
651
797
|
w-full
|
|
652
|
-
`,children:t})})},
|
|
798
|
+
`,children:t})})},vo=({currentPage:t,totalPages:n,onPageChange:s,previousLabel:r="Anterior",nextLabel:o="Siguiente"})=>{const i=(()=>{const l=[];if(n<=7)for(let u=1;u<=n;u++)l.push(u);else l.push(1),t<=3?l.push(2,3):t>=n-2?(l.push("..."),l.push(n-2,n-1)):(l.push("..."),l.push(t),l.push("...")),n>1&&l.push(n);return l})();return e.jsxs("div",{className:"flex items-center justify-between w-full h-9",children:[e.jsxs("button",{onClick:()=>t>1&&s(t-1),disabled:t===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(xo,{}),e.jsx("span",{children:r})]}),e.jsx("div",{className:"flex items-center gap-0",children:i.map((l,c)=>{if(l==="...")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:l},`ellipsis-${c}`);const u=l===t;return e.jsx("button",{onClick:()=>s(l),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
|
+
${u?"bg-blue-100 dark:bg-blue-900/30":"hover:bg-blue-50 dark:hover:bg-blue-900/20"}
|
|
839
|
+
`,children:l},l)})}),e.jsxs("button",{onClick:()=>t<n&&s(t+1),disabled:t===n,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:o}),e.jsx(go,{})]})]})},Sn=({title:t,columns:n,data:s,variant:r="basic",showBorder:o=!0,showShadow:a=!0,onSort:i,sortColumn:l,sortDirection:c,fullWidth:u=!1,emptyMessage:d="No hay datos disponibles",loading:f=!1,loadingRows:m=5,pagination:p,className:g="",id:h})=>{const[x,v]=b.useState(null),[w,j]=b.useState(null),C=l!==void 0?l:x,k=c!==void 0?c:w,N=_=>{let I="asc";C===_&&(k==="asc"?I="desc":k==="desc"&&(I=null)),i?i(_,I):(v(I?_:null),j(I))},A=(_,I)=>typeof I=="function"?I(_):_[I],P=[`
|
|
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
|
+
`,o?"border border-border-primary dark:border-dark-border-primary":"",a?"shadow-base":"","p-8",u||r==="fullWidth"?"w-full":"",g].join(" ").replace(/\s+/g," ").trim(),Z=r==="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:P,id:h,children:[t&&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:t})}),e.jsx("div",{className:`flex w-full overflow-x-auto ${
|
|
879
|
+
`,children:t})}),e.jsx("div",{className:`flex w-full overflow-x-auto ${Z}`,children:n.map((_,I)=>{const W=typeof _.accessor=="function"?`column_${I}`:String(_.accessor);return e.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[e.jsx(bo,{column:_,sortable:_.sortable||!1,sorted:C===W,sortDirection:C===W?k:null,onSort:()=>N(W)}),f&&e.jsx(e.Fragment,{children:Array.from({length:m}).map((R,B)=>e.jsx(_r,{align:_.align,width:_.width,isStriped:r==="striped",rowIndex:B,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-${B}`))}),!f&&s.length>0&&e.jsx(e.Fragment,{children:s.map((R,B)=>{const K=A(R,_.accessor),J=_.render?_.render(K,R,B):K;return e.jsx(_r,{align:_.align,width:_.width,isStriped:r==="striped",rowIndex:B,children:J},B)})}),!f&&s.length===0&&I===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 / ${n.length+1}`},children:d})]},W)})}),p&&e.jsx(vo,{currentPage:p.currentPage,totalPages:p.totalPages,onPageChange:p.onPageChange,previousLabel:p.previousLabel,nextLabel:p.nextLabel})]})},ko=({label:t,active:n=!1,icon:s,badge:r,disabled:o=!1,onClick:a,className:i="",ariaLabel:l})=>{const c=`
|
|
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
|
+
`,d=o?"opacity-50 cursor-not-allowed pointer-events-none":"",f=`
|
|
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
|
+
`,m=o?"":`
|
|
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
|
+
`,p=n?`
|
|
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
|
+
`,g=`
|
|
785
931
|
w-3
|
|
786
932
|
h-3
|
|
787
933
|
shrink-0
|
|
788
|
-
`,h=
|
|
934
|
+
`,h=n?`
|
|
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
|
+
`,x=n?`
|
|
795
941
|
absolute
|
|
796
942
|
-bottom-2.5
|
|
797
943
|
left-0
|
|
@@ -801,12 +947,12 @@
|
|
|
801
947
|
bg-primary-custom-600
|
|
802
948
|
dark:bg-primary-custom-600
|
|
803
949
|
z-10
|
|
804
|
-
`:"hidden",
|
|
950
|
+
`:"hidden",v=[c,"",d,"group",i].join(" ").replace(/\s+/g," ").trim(),w=[f,m].join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",role:"tab","aria-selected":n,"aria-disabled":o,"aria-label":l||t,tabIndex:o?-1:0,className:v,onClick:o?void 0:a,disabled:o,children:[e.jsxs("div",{className:w,children:[s&&e.jsx("span",{className:`${g} ${p}`.trim(),children:s}),e.jsx("span",{className:`
|
|
805
951
|
text-sm
|
|
806
952
|
font-bold
|
|
807
953
|
leading-5
|
|
808
954
|
whitespace-nowrap
|
|
809
|
-
${
|
|
955
|
+
${p}
|
|
810
956
|
`.replace(/\s+/g," ").trim(),children:t}),r!==void 0&&r>0&&e.jsx("span",{className:`
|
|
811
957
|
flex
|
|
812
958
|
items-center
|
|
@@ -821,14 +967,14 @@
|
|
|
821
967
|
text-primary-inverse-content
|
|
822
968
|
dark:text-dark-bg-primary
|
|
823
969
|
${h}
|
|
824
|
-
`.replace(/\s+/g," ").trim(),"aria-label":`${r} notificaciones`,children:r>99?"99+":r})]}),e.jsx("div",{className:
|
|
970
|
+
`.replace(/\s+/g," ").trim(),"aria-label":`${r} notificaciones`,children:r>99?"99+":r})]}),e.jsx("div",{className:x})]})},yo=({items:t,activeId:n,defaultActiveId:s,onChange:r,className:o="",fullWidth:a=!1,size:i="base",showBorder:l=!0})=>{const[c,u]=b.useState(s||(t.length>0?t[0].id:"")),d=n!==void 0,f=d?n:c,m=v=>{d||u(v),r?.(v)},g=`
|
|
825
971
|
flex
|
|
826
972
|
items-end
|
|
827
973
|
pb-2.5
|
|
828
|
-
${{sm:"gap-0",base:"gap-1",lg:"gap-2"}[
|
|
829
|
-
${
|
|
830
|
-
${
|
|
831
|
-
`,h=
|
|
974
|
+
${{sm:"gap-0",base:"gap-1",lg:"gap-2"}[i]}
|
|
975
|
+
${a?"w-full":""}
|
|
976
|
+
${l?"border-b border-border-primary dark:border-dark-border-primary":""}
|
|
977
|
+
`,h=a?"flex-1":"",x=[g,o].join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{role:"tablist","aria-label":"Pestañas de navegación",className:x,children:t.map(v=>e.jsx(ko,{label:v.label,active:f===v.id,icon:v.icon,badge:v.badge,disabled:v.disabled,onClick:()=>m(v.id),className:h},v.id))})},wo=()=>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"})}),jo=()=>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"})}),Pr=()=>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"})}),Vr=()=>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"})}),ht=()=>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"})}),No=()=>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"})}),st=({logo:t,productName:n="Nombre Producto",environmentBadge:s,userDropdown:r,actions:o,notifications:a,className:i="",variant:l="responsive",hideActionButtons:c=!1,showNavigationButton:u=!1,navigationButtonProps:d={},leadingAction:f,siesaLogo:m,showBusinessLogo:p=!1,showSiesaLogoLeading:g=!0,showSiesaLogoTrailing:h=!1,onNavigationClick:x,onSearchClick:v,onCartClick:w,onNotificationsClick:j})=>{const C=`
|
|
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=l==="mobile",N=l==="desktop",A=l==="tablet",E=l==="responsive",S=()=>{if(k||!u)return null;const z={type:"default",size:"base",iconOnly:!0,leftIcon:e.jsx(No,{}),ariaLabel:"Volver",onClick:x,...d};return N||A?e.jsx(Q,{...z}):e.jsx("div",{className:"hidden md:block",children:e.jsx(Q,{...z})})},y=()=>{if(k||!p)return null;const z=e.jsx("img",{src:"/,Business Logo.png",alt:"Business Logo",className:"w-full h-full object-contain"});return N?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[168px] h-[30px]",children:z}):A?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[140px] h-[25px]",children:z}):e.jsx("div",{className:"hidden md:block overflow-hidden relative shrink-0 w-[140px] lg:w-[168px] h-[25px] lg:h-[30px]",children:z})},O=()=>{const z=e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-full h-full object-contain"}),q=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:q}):g?N?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:z}):A?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:z}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden overflow-hidden relative shrink-0 w-[30px] h-[30px]",children:q}),g&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block lg:hidden overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:z}),e.jsx("div",{className:"hidden lg:block overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:z})]})]}):null},D=()=>{if(!h||k)return null;const z=e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-full h-full object-contain"});return N?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:z}):A?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:z}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block lg:hidden overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:z}),e.jsx("div",{className:"hidden lg:block overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:z})]})},P=({responsive:z=!0})=>{const q=e.jsx("div",{className:"grow shrink-0 w-px min-h-px bg-border-primary dark:bg-dark-border-primary"});return k?null:N||A?e.jsx("div",{className:"flex flex-col gap-2 h-8 items-start px-0 py-1 relative shrink-0",children:q}):z?e.jsx("div",{className:"hidden md:flex flex-col gap-2 h-8 items-start px-0 py-1 relative shrink-0",children:q}):null},Z=()=>{if(k||!n)return null;const z=e.jsx("p",{className:"font-bold leading-7 text-xl text-content-primary dark:text-dark-content-primary tracking-[-0.5px] whitespace-nowrap",children:n});return N||A?z: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:n})},_=()=>s?k?e.jsx($e,{color:"yellow",leftIcon:e.jsx(ht,{}),label:"Pruebas"}):N||A?e.jsx($e,{color:"yellow",leftIcon:e.jsx(ht,{}),label:s}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden",children:e.jsx($e,{color:"yellow",leftIcon:e.jsx(ht,{}),label:"Pruebas"})}),e.jsx("div",{className:"hidden md:block",children:e.jsx($e,{color:"yellow",leftIcon:e.jsx(ht,{}),label:s})})]}):null,I=()=>c?null:k?e.jsx("button",{className:C,"aria-label":"Buscar",onClick:v,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(Pr,{})})}):E?e.jsx("button",{className:`md:hidden ${C}`,"aria-label":"Buscar",onClick:v,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(Pr,{})})}):null,W=()=>c?null:e.jsxs("div",{className:"relative",children:[e.jsx("button",{className:C,"aria-label":"Carrito de compras",onClick:w,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(wo,{})})}),a?.cart!==void 0&&a.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:a.cart>99?"+99":a.cart})})]}),R=()=>c?null:e.jsxs("div",{className:"relative",children:[e.jsx("button",{className:C,"aria-label":"Notificaciones",onClick:j,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(jo,{})})}),a?.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"})]}),B=()=>{if(!r)return null;const z=r.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:r.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:r.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:r.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:r.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:r.onSignOutClick}];if(k)return e.jsx(Qe,{items:z,renderTrigger:te=>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
|
+
${te?"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:r.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-full w-full h-full",src:r.avatar})})})});const q=()=>e.jsx(Qe,{items:z,renderTrigger:te=>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
|
+
${te?"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:r.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-md w-full h-full",src:r.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:r.name}),(r.email||r.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:r.email||r.role})]})]}),e.jsx("div",{className:"overflow-hidden relative shrink-0 w-5 h-5 text-content-secondary dark:text-content-secondary",children:e.jsx(Vr,{})})]})})});return N||A?q():e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden",children:e.jsx(Qe,{items:z,renderTrigger:te=>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
|
+
${te?"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:r.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-full w-full h-full",src:r.avatar})})})})}),e.jsx("div",{className:"hidden md:flex",children:e.jsx(Qe,{items:z,renderTrigger:te=>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
|
+
${te?"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:r.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-md w-full h-full",src:r.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:r.name}),(r.email||r.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:r.email||r.role})]})]}),e.jsx("div",{className:"overflow-hidden relative shrink-0 w-5 h-5 text-content-secondary dark:text-content-secondary",children:e.jsx(Vr,{})})]})})})})]})},T=[`
|
|
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]"}[l],i].join(" ").replace(/\s+/g," ").trim();return e.jsxs("nav",{className:T,children:[e.jsxs("div",{className:"flex gap-4 items-center relative shrink-0",children:[!k&&(f||u&&e.jsx(S,{})),t||e.jsx(y,{}),p&&g&&!k&&e.jsx(P,{}),m||e.jsx(O,{}),n&&g&&!k&&e.jsx(P,{}),e.jsx(Z,{})]}),e.jsxs("div",{className:"flex gap-4 items-center justify-end grow min-h-px min-w-px relative shrink-0",children:[e.jsx(_,{}),e.jsx(I,{}),e.jsx(W,{}),e.jsx(R,{}),r&&!c&&e.jsx(P,{}),e.jsx(B,{}),h&&r&&!k&&e.jsx(P,{}),e.jsx(D,{}),o&&e.jsx("div",{className:"flex gap-2 items-center",children:o})]})]})},Co=({items:t,activeItemId:n,onItemClick:s,className:r="",ariaLabel:o="Navegación Principal"})=>{t.length>5&&console.warn("NavigationBar: Se recomienda un máximo de 5 ítems para mejor UX");const a=d=>{d.disabled||(d.onClick&&d.onClick(d.id),s&&s(d.id))},i=d=>{const f=d.active||d.id===n,m=`
|
|
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
|
+
${d.disabled?"opacity-50 cursor-not-allowed pointer-events-none":""}
|
|
1109
|
+
`.replace(/\s+/g," ").trim(),p=`
|
|
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
|
+
${f?"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(),g=`
|
|
943
1121
|
font-['SiesaBT:Bold',sans-serif]
|
|
944
1122
|
text-[10px]
|
|
945
1123
|
leading-[12px]
|
|
@@ -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:m,onClick:()=>a(d),disabled:d.disabled,"aria-label":d.ariaLabel||d.label,"aria-current":f?"page":void 0,children:[e.jsx("div",{className:p,children:e.jsx("span",{className:h,children:d.icon})}),e.jsx("span",{className:g,children:d.label})]},d.id)},l=`
|
|
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(),c=`
|
|
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(),u=`
|
|
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:`${l} ${r}`.trim(),role:"navigation","aria-label":o,children:e.jsx("div",{className:c,children:e.jsx("div",{className:u,children:t.map(d=>i(d))})})})},So=({lightColor:t,darkColor:n,className:s=""})=>e.jsxs("svg",{className:`w-4 h-4 shrink-0 ${s}`.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:t,className:"dark:hidden"}),e.jsx("circle",{cx:"8",cy:"8",r:"8",fill:n,className:"hidden dark:block"})]}),Je=({status:t="available",className:n=""})=>{const r={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"}}[t],a=[`
|
|
982
1160
|
inline-flex
|
|
983
1161
|
items-center
|
|
984
1162
|
gap-1
|
|
985
1163
|
shrink-0
|
|
986
|
-
`,
|
|
1164
|
+
`,n].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:a,role:"presentation","aria-label":`Estado: ${r.label}`,children:[e.jsx(So,{lightColor:r.lightColor,darkColor:r.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:r.label})]})},
|
|
1171
|
+
`.replace(/\s+/g," ").trim(),children:r.label})]})},Ro=({className:t=""})=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:e.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Eo=({className:t=""})=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:e.jsx("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Io=({className:t=""})=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,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"})}),Ao=({className:t=""})=>e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,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"})]}),Mo=({className:t=""})=>e.jsx("svg",{width:"13",height:"10",viewBox:"0 0 13 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,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"})}),Rn=({locationName:t,status:n="available",state:s="enabled",capacity:r,onClick:o,disabled:a=!1,className:i="",ariaLabel:l,fullWidth:c=!0})=>{const d={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:Ro,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:Eo,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:Io,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:Ao,badgeLabel:"F. de Servicio"}}[n],f=d.icon,m=s==="actived"?d.activedBg:"bg-white dark:bg-dark-bg-primary",h=[`
|
|
994
1172
|
flex
|
|
995
1173
|
flex-col
|
|
996
1174
|
items-stretch
|
|
997
1175
|
justify-between
|
|
998
|
-
${
|
|
1176
|
+
${c?"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
|
+
`,m,i].join(" ").replace(/\s+/g," ").trim(),x=r?`${r.current}/${r.total} mesas`:null;return e.jsxs("button",{className:h,onClick:o,disabled:a,"aria-label":l||`${t} - ${d.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:t}),e.jsxs("div",{className:"flex items-center justify-between",children:[
|
|
1198
|
+
${d.textColor}
|
|
1199
|
+
`.replace(/\s+/g," ").trim(),children:t}),e.jsxs("div",{className:"flex items-center justify-between",children:[x&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Mo,{className:d.textColor}),e.jsx("span",{className:`
|
|
1022
1200
|
text-[10px]
|
|
1023
1201
|
leading-[12px]
|
|
1024
|
-
${
|
|
1025
|
-
`.replace(/\s+/g," ").trim(),children:
|
|
1202
|
+
${d.textColor}
|
|
1203
|
+
`.replace(/\s+/g," ").trim(),children:x})]}),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
|
+
${d.badgeBg}
|
|
1211
|
+
`.replace(/\s+/g," ").trim(),children:[e.jsx(f,{className:d.badgeText}),e.jsx("span",{className:`
|
|
1034
1212
|
text-xs
|
|
1035
1213
|
leading-4
|
|
1036
|
-
${
|
|
1037
|
-
`.replace(/\s+/g," ").trim(),children:
|
|
1214
|
+
${d.badgeText}
|
|
1215
|
+
`.replace(/\s+/g," ").trim(),children:d.badgeLabel})]})]})]})},En=({size:t="l",border:n=!1,children:s,disabled:r=!1,className:o="",onClick:a,ariaLabel:i,htmlType:l="button",...c})=>{const u={s:"w-10 h-10",m:"w-[65px] h-[65px]",l:"w-20 h-20"},d={s:"text-2xl",m:"text-5xl",l:"text-5xl"},g=[`
|
|
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
|
+
`,u[t],d[t],n?`
|
|
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
|
+
`,o].join(" ").replace(/\s+/g," ").trim();return e.jsx("button",{type:l,className:g,disabled:r,onClick:a,"aria-label":i||`Número ${s}`,...c,children:s})},In=({image:t,label:n,active:s=!1,disabled:r=!1,onClick:o,className:a="",ariaLabel:i})=>{const u=[`
|
|
1095
1273
|
flex
|
|
1096
1274
|
flex-col
|
|
1097
1275
|
gap-2
|
|
@@ -1115,7 +1293,7 @@
|
|
|
1115
1293
|
pointer-events-none
|
|
1116
1294
|
dark:bg-dark-bg-primary
|
|
1117
1295
|
dark:text-dark-content-primary
|
|
1118
|
-
`:
|
|
1296
|
+
`:s?`
|
|
1119
1297
|
bg-primary-custom-100
|
|
1120
1298
|
text-primary-custom-600
|
|
1121
1299
|
cursor-pointer
|
|
@@ -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
|
-
`,
|
|
1316
|
+
`,a].join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",className:u,disabled:r,onClick:o,"aria-label":i||n,"aria-pressed":s,children:[e.jsx("div",{className:"aspect-158/80 w-full rounded-lg overflow-hidden",children:e.jsx("img",{src:t,alt:n,className:"w-full h-full object-cover"})}),e.jsx("div",{className:"w-full text-left leading-5",children:n})]})},Lo=({className:t=""})=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:e.jsx("path",{d:"M8 3V13M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),An=({image:t,productName:n,price:s,buttonText:r="Agregar",active:o=!1,disabled:a=!1,onAddClick:i,onCardClick:l,className:c="",ariaLabel:u})=>{const d=`
|
|
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
|
+
`,f=a?`
|
|
1154
1332
|
bg-white
|
|
1155
1333
|
opacity-55
|
|
1156
1334
|
cursor-not-allowed
|
|
1157
1335
|
dark:bg-dark-bg-primary
|
|
1158
|
-
`:
|
|
1336
|
+
`:o?`
|
|
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
|
+
`,m=a?`
|
|
1167
1345
|
text-content-primary
|
|
1168
1346
|
dark:text-dark-content-primary
|
|
1169
|
-
`:
|
|
1347
|
+
`:o?`
|
|
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
|
+
`,p=[d,f,c].join(" ").replace(/\s+/g," ").trim(),g=x=>{a||x.target.closest("button")||l?.(x)},h=x=>{x.stopPropagation(),!a&&i?.(x)};return e.jsxs("div",{className:p,onClick:g,role:"article","aria-label":u||`${n} - ${s}`,tabIndex:a?-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:t,alt:n,className:"w-full h-full object-cover"})}),e.jsxs("div",{className:`flex flex-col w-full font-bold ${m}`.trim().replace(/\s+/g," "),children:[e.jsx("div",{className:"text-sm leading-5",children:n}),e.jsx("div",{className:"text-2xl leading-8 tracking-tighter",children:s})]})]}),e.jsx(Q,{type:"default",size:"sm",leftIcon:e.jsx(Lo,{className:"w-4 h-4"}),onClick:h,disabled:a,fullWidth:!0,ariaLabel:`${r} ${n}`,children:r})]})},$o=({className:t=""})=>e.jsx("svg",{className:t,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"})}),fr=({categoryLabel:t,categoryColor:n="lime",productRef:s,price:r,productName:o,descriptionItems:a=[],showDescription:i=!0,quantity:l=0,minQuantity:c=0,maxQuantity:u,onQuantityChange:d,onDelete:f,disabled:m=!1,className:p="",deleteIcon:g})=>{const h={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"}},x=h[n]||h.lime,v=j=>{!m&&d&&d(j)},w=()=>{!m&&f&&f()};return e.jsxs("div",{className:`
|
|
1176
1354
|
flex
|
|
1177
1355
|
flex-col
|
|
1178
1356
|
gap-2
|
|
1179
1357
|
w-full
|
|
1180
|
-
${
|
|
1181
|
-
${
|
|
1358
|
+
${m?"opacity-50 pointer-events-none":""}
|
|
1359
|
+
${p}
|
|
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
|
+
${x.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:t})}),e.jsx("span",{className:"text-[10px] leading-3 font-normal text-content-primary dark:text-dark-content-primary whitespace-nowrap",children:
|
|
1375
|
+
${x.text}
|
|
1376
|
+
`.trim().replace(/\s+/g," "),children:t})}),e.jsx("span",{className:"text-[10px] leading-3 font-normal text-content-primary dark:text-dark-content-primary whitespace-nowrap",children:s})]}),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:r})})]}),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:o})})]}),i&&a.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:
|
|
1387
|
+
`.trim().replace(/\s+/g," "),children:a.map((j,C)=>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:j.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:j.price})]},C))})]}),e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("div",{className:"w-[118px]",children:e.jsx(cr,{value:l,min:c,max:u,onChange:v,disabled:m})}),e.jsx("button",{type:"button",onClick:w,disabled:m,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
|
+
${m?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
1411
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Eliminar producto",children:g||e.jsx($o,{className:"w-[18px] h-[21px]"})})]})]})};fr.displayName="POSProductSidebarItems";const er=({tableNumber:t,status:n="available",shape:s="square",chairs:r=4,showChairs:o=!0,isActive:a=!1,onClick:i,className:l="",disabled:c=!1,children:u})=>{const d={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]"}},f={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"}},m=({rotation:x})=>e.jsxs("div",{className:"w-[28px] h-[22px]",style:{transform:`rotate(${x}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
|
+
${d[n].chair}
|
|
1419
|
+
${d[n].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
|
+
${d[n].chair}
|
|
1428
|
+
${d[n].chairDark}
|
|
1429
|
+
`})]}),p=()=>{!c&&i&&i()},g=x=>{(x.key==="Enter"||x.key===" ")&&!c&&i&&(x.preventDefault(),i())},h=["w-[160px]","h-[160px]","shrink-0","relative","flex","flex-col","items-center","justify-center","p-0","border-2","box-border","rounded-[8px]",a?d[n].borderActive:d[n].border,a?d[n].borderActiveDark:d[n].borderDark,a?d[n].bgActive:d[n].bgEnabled,a?d[n].bgActiveDark:d[n].bgEnabledDark,"focus:outline-hidden","focus:ring-2",d[n].focusRing,d[n].focusRingDark,"focus:ring-offset-2","dark:focus:ring-offset-dark-bg-primary","transition-all","duration-150",i&&!c?"cursor-pointer":"",i&&!c?"hover:scale-105":"",i&&!c?"active:scale-95":"",c?"opacity-50 cursor-not-allowed":"",l].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{className:h,onClick:p,onKeyDown:g,disabled:c,type:"button","aria-label":`Mesa ${t} - ${n==="available"?"Disponible":n==="busy"?"Ocupada":"Reservada"}`,children:[e.jsxs("div",{className:"flex flex-col gap-[4px] items-center justify-center w-[134px] h-[134px] shrink-0",children:[o&&(r===2||r===4||r===6||r===8)&&e.jsxs("div",{className:"flex gap-[4px] items-center justify-center shrink-0",children:[r>=6&&e.jsxs(e.Fragment,{children:[e.jsx(m,{rotation:0}),e.jsx(m,{rotation:0})]}),r===2&&e.jsx(m,{rotation:0}),r===4&&e.jsx(m,{rotation:0})]}),e.jsxs("div",{className:"flex gap-[4px] items-center justify-center shrink-0",children:[o&&(r===4||r===6||r===8)&&e.jsxs("div",{className:"flex flex-col gap-[4px] items-start justify-center shrink-0",children:[r>=8&&e.jsxs(e.Fragment,{children:[e.jsx(m,{rotation:270}),e.jsx(m,{rotation:270})]}),(r===4||r===6)&&e.jsx(m,{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
|
+
${f[s].table}
|
|
1431
|
+
${d[n].table}
|
|
1432
|
+
${d[n].tableDark}
|
|
1255
1433
|
shrink-0
|
|
1256
|
-
`})})}),
|
|
1434
|
+
`})})}),o&&(r===4||r===6||r===8)&&e.jsxs("div",{className:"flex flex-col gap-[4px] items-start justify-center shrink-0",children:[r>=8&&e.jsxs(e.Fragment,{children:[e.jsx(m,{rotation:90}),e.jsx(m,{rotation:90})]}),(r===4||r===6)&&e.jsx(m,{rotation:90})]})]}),o&&(r===2||r===4||r===6||r===8)&&e.jsxs("div",{className:"flex gap-[4px] items-center justify-center shrink-0",children:[r>=6&&e.jsxs(e.Fragment,{children:[e.jsx(m,{rotation:180}),e.jsx(m,{rotation:180})]}),r===2&&e.jsx(m,{rotation:180}),r===4&&e.jsx(m,{rotation:180})]})]}),e.jsxs("div",{className:`
|
|
1257
1435
|
flex
|
|
1258
1436
|
flex-col
|
|
1259
1437
|
justify-center
|
|
@@ -1267,7 +1445,80 @@
|
|
|
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
|
+
${d[n].text}
|
|
1449
|
+
${d[n].textDark}
|
|
1450
|
+
`,children:[e.jsxs("p",{className:"leading-[12px] text-ellipsis overflow-hidden",children:["Mesa ",t]}),u]})]})},Oo=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,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"})]}),Bo=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,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"})}),To=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,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"})]}),zo=({onSubmit:t,onForgotPassword:n,onSignUp:s,isLoading:r=!1,errorMessage:o,className:a="",showBackground:i=!0,variant:l="responsive"})=>{const[c,u]=b.useState(""),[d,f]=b.useState(""),[m,p]=b.useState(!1),[g,h]=b.useState(""),x=j=>{if(j.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){h("Por favor ingresa un email válido");return}h(""),t?.(c,d)},v=j=>{u(j.target.value),g&&h("")},w=()=>{p(!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",a].join(" "),children:[i&&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",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="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."})]}),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:x,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(Oo,{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:c,onChange:v,disabled:r,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",g?"border-error-border!":""].filter(Boolean).join(" ")})]}),g&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:g})]}),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:n,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(Bo,{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:d,onChange:j=>f(j.target.value),disabled:r,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":m?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(To,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:r||!c||!d,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:r?"Iniciando sesión...":"Iniciar Sesión"})]}),e.jsx("button",{type:"button",onClick:s,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?"})]})]})},Do=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,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"})}),_o=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,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"})]}),Po=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,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"})}),Vo=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,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"})]}),Fo=({onSubmit:t,onSignIn:n,onTermsClick:s,onPrivacyClick:r,isLoading:o=!1,errorMessage:a,className:i="",showBackground:l=!0,variant:c="responsive"})=>{const[u,d]=b.useState(""),[f,m]=b.useState(""),[p,g]=b.useState(""),[h,x]=b.useState(!1),[v,w]=b.useState(""),j=N=>{if(N.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f)){w("Por favor ingresa un email válido");return}w(""),t?.(u,f,p)},C=N=>{m(N.target.value),v&&w("")},k=()=>{x(!h)};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",i].join(" "),children:[l&&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",...c==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:c==="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."})]}),a&&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:a}),e.jsxs("form",{onSubmit:j,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(Do,{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:u,onChange:N=>d(N.target.value),disabled:o,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(_o,{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:f,onChange:C,disabled:o,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",v?"border-error-border!":""].filter(Boolean).join(" ")})]}),v&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:v})]}),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(Po,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:h?"text":"password",placeholder:"••••••••",value:p,onChange:N=>g(N.target.value),disabled:o,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":h?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(Vo,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:o||!u||!f||!p,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:o?"Registrando...":"Registrarse"})]}),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:"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:s,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:r,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"}),"."]})})]})]})};const Zo=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ho=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,s,r)=>r?r.toUpperCase():s.toLowerCase()),Fr=t=>{const n=Ho(t);return n.charAt(0).toUpperCase()+n.slice(1)},Mn=(...t)=>t.filter((n,s,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===s).join(" ").trim(),Wo=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var Uo={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Go=b.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...l},c)=>b.createElement("svg",{ref:c,...Uo,width:n,height:n,stroke:t,strokeWidth:r?Number(s)*24/Number(n):s,className:Mn("lucide",o),...!a&&!Wo(l)&&{"aria-hidden":"true"},...l},[...i.map(([u,d])=>b.createElement(u,d)),...Array.isArray(a)?a:[a]]));const It=(t,n)=>{const s=b.forwardRef(({className:r,...o},a)=>b.createElement(Go,{ref:a,iconNode:n,className:Mn(`lucide-${Zo(Fr(t))}`,`lucide-${t}`,r),...o}));return s.displayName=Fr(t),s};const qo=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ko=It("chevron-down",qo);const Xo=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Zr=It("loader-circle",Xo);const Yo=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Qo=It("search",Yo);const Jo=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ln=It("x",Jo);function $n(t){var n,s,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(n=0;n<o;n++)t[n]&&(s=$n(t[n]))&&(r&&(r+=" "),r+=s)}else for(s in t)t[s]&&(r&&(r+=" "),r+=s);return r}function ea(){for(var t,n,s=0,r="",o=arguments.length;s<o;s++)(t=arguments[s])&&(n=$n(t))&&(r&&(r+=" "),r+=n);return r}const ta=(t,n)=>{const s=new Array(t.length+n.length);for(let r=0;r<t.length;r++)s[r]=t[r];for(let r=0;r<n.length;r++)s[t.length+r]=n[r];return s},ra=(t,n)=>({classGroupId:t,validator:n}),On=(t=new Map,n=null,s)=>({nextPart:t,validators:n,classGroupId:s}),jt="-",Hr=[],na="arbitrary..",sa=t=>{const n=aa(t),{conflictingClassGroups:s,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return oa(i);const l=i.split(jt),c=l[0]===""&&l.length>1?1:0;return Bn(l,c,n)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=r[i],u=s[i];return c?u?ta(u,c):c:u||Hr}return s[i]||Hr}}},Bn=(t,n,s)=>{if(t.length-n===0)return s.classGroupId;const o=t[n],a=s.nextPart.get(o);if(a){const u=Bn(t,n+1,a);if(u)return u}const i=s.validators;if(i===null)return;const l=n===0?t.join(jt):t.slice(n).join(jt),c=i.length;for(let u=0;u<c;u++){const d=i[u];if(d.validator(l))return d.classGroupId}},oa=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=t.slice(1,-1),s=n.indexOf(":"),r=n.slice(0,s);return r?na+r:void 0})(),aa=t=>{const{theme:n,classGroups:s}=t;return ia(s,n)},ia=(t,n)=>{const s=On();for(const r in t){const o=t[r];mr(o,s,r,n)}return s},mr=(t,n,s,r)=>{const o=t.length;for(let a=0;a<o;a++){const i=t[a];la(i,n,s,r)}},la=(t,n,s,r)=>{if(typeof t=="string"){ca(t,n,s);return}if(typeof t=="function"){da(t,n,s,r);return}ua(t,n,s,r)},ca=(t,n,s)=>{const r=t===""?n:Tn(n,t);r.classGroupId=s},da=(t,n,s,r)=>{if(fa(t)){mr(t(r),n,s,r);return}n.validators===null&&(n.validators=[]),n.validators.push(ra(s,t))},ua=(t,n,s,r)=>{const o=Object.entries(t),a=o.length;for(let i=0;i<a;i++){const[l,c]=o[i];mr(c,Tn(n,l),s,r)}},Tn=(t,n)=>{let s=t;const r=n.split(jt),o=r.length;for(let a=0;a<o;a++){const i=r[a];let l=s.nextPart.get(i);l||(l=On(),s.nextPart.set(i,l)),s=l}return s},fa=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,ma=t=>{if(t<1)return{get:()=>{},set:()=>{}};let n=0,s=Object.create(null),r=Object.create(null);const o=(a,i)=>{s[a]=i,n++,n>t&&(n=0,r=s,s=Object.create(null))};return{get(a){let i=s[a];if(i!==void 0)return i;if((i=r[a])!==void 0)return o(a,i),i},set(a,i){a in s?s[a]=i:o(a,i)}}},tr="!",Wr=":",pa=[],Ur=(t,n,s,r,o)=>({modifiers:t,hasImportantModifier:n,baseClassName:s,maybePostfixModifierPosition:r,isExternal:o}),ha=t=>{const{prefix:n,experimentalParseClassName:s}=t;let r=o=>{const a=[];let i=0,l=0,c=0,u;const d=o.length;for(let h=0;h<d;h++){const x=o[h];if(i===0&&l===0){if(x===Wr){a.push(o.slice(c,h)),c=h+1;continue}if(x==="/"){u=h;continue}}x==="["?i++:x==="]"?i--:x==="("?l++:x===")"&&l--}const f=a.length===0?o:o.slice(c);let m=f,p=!1;f.endsWith(tr)?(m=f.slice(0,-1),p=!0):f.startsWith(tr)&&(m=f.slice(1),p=!0);const g=u&&u>c?u-c:void 0;return Ur(a,p,m,g)};if(n){const o=n+Wr,a=r;r=i=>i.startsWith(o)?a(i.slice(o.length)):Ur(pa,!1,i,void 0,!0)}if(s){const o=r;r=a=>s({className:a,parseClassName:o})}return r},xa=t=>{const n=new Map;return t.orderSensitiveModifiers.forEach((s,r)=>{n.set(s,1e6+r)}),s=>{const r=[];let o=[];for(let a=0;a<s.length;a++){const i=s[a],l=i[0]==="[",c=n.has(i);l||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},ga=t=>({cache:ma(t.cacheSize),parseClassName:ha(t),sortModifiers:xa(t),...sa(t)}),ba=/\s+/,va=(t,n)=>{const{parseClassName:s,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=n,i=[],l=t.trim().split(ba);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:m,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:h}=s(d);if(f){c=d+(c.length>0?" "+c:c);continue}let x=!!h,v=r(x?g.substring(0,h):g);if(!v){if(!x){c=d+(c.length>0?" "+c:c);continue}if(v=r(g),!v){c=d+(c.length>0?" "+c:c);continue}x=!1}const w=m.length===0?"":m.length===1?m[0]:a(m).join(":"),j=p?w+tr:w,C=j+v;if(i.indexOf(C)>-1)continue;i.push(C);const k=o(v,x);for(let N=0;N<k.length;++N){const A=k[N];i.push(j+A)}c=d+(c.length>0?" "+c:c)}return c},ka=(...t)=>{let n=0,s,r,o="";for(;n<t.length;)(s=t[n++])&&(r=zn(s))&&(o&&(o+=" "),o+=r);return o},zn=t=>{if(typeof t=="string")return t;let n,s="";for(let r=0;r<t.length;r++)t[r]&&(n=zn(t[r]))&&(s&&(s+=" "),s+=n);return s},ya=(t,...n)=>{let s,r,o,a;const i=c=>{const u=n.reduce((d,f)=>f(d),t());return s=ga(u),r=s.cache.get,o=s.cache.set,a=l,l(c)},l=c=>{const u=r(c);if(u)return u;const d=va(c,s);return o(c,d),d};return a=i,(...c)=>a(ka(...c))},wa=[],ee=t=>{const n=s=>s[t]||wa;return n.isThemeGetter=!0,n},Dn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_n=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ja=/^\d+\/\d+$/,Na=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ca=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Sa=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ra=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ea=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pe=t=>ja.test(t),H=t=>!!t&&!Number.isNaN(Number(t)),Re=t=>!!t&&Number.isInteger(Number(t)),qt=t=>t.endsWith("%")&&H(t.slice(0,-1)),we=t=>Na.test(t),Ia=()=>!0,Aa=t=>Ca.test(t)&&!Sa.test(t),Pn=()=>!1,Ma=t=>Ra.test(t),La=t=>Ea.test(t),$a=t=>!L(t)&&!$(t),Oa=t=>He(t,Zn,Pn),L=t=>Dn.test(t),Le=t=>He(t,Hn,Aa),Kt=t=>He(t,_a,H),Gr=t=>He(t,Vn,Pn),Ba=t=>He(t,Fn,La),xt=t=>He(t,Wn,Ma),$=t=>_n.test(t),Ye=t=>We(t,Hn),Ta=t=>We(t,Pa),qr=t=>We(t,Vn),za=t=>We(t,Zn),Da=t=>We(t,Fn),gt=t=>We(t,Wn,!0),He=(t,n,s)=>{const r=Dn.exec(t);return r?r[1]?n(r[1]):s(r[2]):!1},We=(t,n,s=!1)=>{const r=_n.exec(t);return r?r[1]?n(r[1]):s:!1},Vn=t=>t==="position"||t==="percentage",Fn=t=>t==="image"||t==="url",Zn=t=>t==="length"||t==="size"||t==="bg-size",Hn=t=>t==="length",_a=t=>t==="number",Pa=t=>t==="family-name",Wn=t=>t==="shadow",Va=()=>{const t=ee("color"),n=ee("font"),s=ee("text"),r=ee("font-weight"),o=ee("tracking"),a=ee("leading"),i=ee("breakpoint"),l=ee("container"),c=ee("spacing"),u=ee("radius"),d=ee("shadow"),f=ee("inset-shadow"),m=ee("text-shadow"),p=ee("drop-shadow"),g=ee("blur"),h=ee("perspective"),x=ee("aspect"),v=ee("ease"),w=ee("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...C(),$,L],N=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],E=()=>[$,L,c],S=()=>[Pe,"full","auto",...E()],y=()=>[Re,"none","subgrid",$,L],O=()=>["auto",{span:["full",Re,$,L]},Re,$,L],D=()=>[Re,"auto",$,L],P=()=>["auto","min","max","fr",$,L],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...E()],W=()=>[Pe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],R=()=>[t,$,L],B=()=>[...C(),qr,Gr,{position:[$,L]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],J=()=>["auto","cover","contain",za,Oa,{size:[$,L]}],T=()=>[qt,Ye,Le],z=()=>["","none","full",u,$,L],q=()=>["",H,Ye,Le],te=()=>["solid","dashed","dotted","double"],Ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[H,qt,qr,Gr],oe=()=>["","none",g,$,L],ue=()=>["none",H,$,L],re=()=>["none",H,$,L],ae=()=>[H,$,L],je=()=>[Pe,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[we],breakpoint:[we],color:[Ia],container:[we],"drop-shadow":[we],ease:["in","out","in-out"],font:[$a],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[we],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[we],shadow:[we],spacing:["px",H],text:[we],"text-shadow":[we],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pe,L,$,x]}],container:["container"],columns:[{columns:[H,L,$,l]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:S()}],"inset-x":[{"inset-x":S()}],"inset-y":[{"inset-y":S()}],start:[{start:S()}],end:[{end:S()}],top:[{top:S()}],right:[{right:S()}],bottom:[{bottom:S()}],left:[{left:S()}],visibility:["visible","invisible","collapse"],z:[{z:[Re,"auto",$,L]}],basis:[{basis:[Pe,"full","auto",l,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[H,Pe,"auto","initial","none",L]}],grow:[{grow:["",H,$,L]}],shrink:[{shrink:["",H,$,L]}],order:[{order:[Re,"first","last","none",$,L]}],"grid-cols":[{"grid-cols":y()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":y()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[l,"screen",...W()]}],"min-w":[{"min-w":[l,"screen","none",...W()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",s,Ye,Le]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,$,Kt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qt,L]}],"font-family":[{font:[Ta,L,n]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,$,L]}],"line-clamp":[{"line-clamp":[H,"none",$,Kt]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",$,L]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",$,L]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[H,"from-font","auto",$,Le]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[H,"auto",$,L]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$,L]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$,L]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:J()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Re,$,L],radial:["",$,L],conic:[Re,$,L]},Da,Ba]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[H,$,L]}],"outline-w":[{outline:["",H,Ye,Le]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",d,gt,xt]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",f,gt,xt]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[H,Le]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",m,gt,xt]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[H,$,L]}],"mix-blend":[{"mix-blend":[...Ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[$,L]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:J()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",$,L]}],filter:[{filter:["","none",$,L]}],blur:[{blur:oe()}],brightness:[{brightness:[H,$,L]}],contrast:[{contrast:[H,$,L]}],"drop-shadow":[{"drop-shadow":["","none",p,gt,xt]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",H,$,L]}],"hue-rotate":[{"hue-rotate":[H,$,L]}],invert:[{invert:["",H,$,L]}],saturate:[{saturate:[H,$,L]}],sepia:[{sepia:["",H,$,L]}],"backdrop-filter":[{"backdrop-filter":["","none",$,L]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[H,$,L]}],"backdrop-contrast":[{"backdrop-contrast":[H,$,L]}],"backdrop-grayscale":[{"backdrop-grayscale":["",H,$,L]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,$,L]}],"backdrop-invert":[{"backdrop-invert":["",H,$,L]}],"backdrop-opacity":[{"backdrop-opacity":[H,$,L]}],"backdrop-saturate":[{"backdrop-saturate":[H,$,L]}],"backdrop-sepia":[{"backdrop-sepia":["",H,$,L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",$,L]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[H,"initial",$,L]}],ease:[{ease:["linear","initial",v,$,L]}],delay:[{delay:[H,$,L]}],animate:[{animate:["none",w,$,L]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,$,L]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[$,L,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:je()}],"translate-x":[{"translate-x":je()}],"translate-y":[{"translate-y":je()}],"translate-z":[{"translate-z":je()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$,L]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$,L]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[H,Ye,Le,Kt]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Fa=ya(Va);function et(...t){return Fa(ea(t))}function Za(t,n){return t.replace(/\{(\w+)\}/g,(s,r)=>{const o=n[r];return o!=null?String(o):""})}function Ha(t){return Array.isArray(t)&&t.every(Array.isArray)}function Un(t){return Object.entries(t).map(([n,s])=>[{[n]:s}])}function rr(t){if(t)return Ha(t)?t:Un(t)}function Wa(...t){return t.filter(Boolean).flat()}const Ua=300;function Ga(t,n=Ua){const[s,r]=b.useState(t);return b.useEffect(()=>{const o=setTimeout(()=>{r(t)},n);return()=>{clearTimeout(o)}},[t,n]),s}function qa(t){const{records:n,isOpen:s,onSelect:r,onClose:o,onEscape:a,onClear:i,searchQuery:l}=t,[c,u]=b.useState(-1),d=b.useCallback(f=>{if(s)switch(f.key){case"ArrowDown":{if(f.preventDefault(),n.length===0)return;u(m=>m>=n.length-1?0:m+1);break}case"ArrowUp":{if(f.preventDefault(),n.length===0)return;u(m=>m<=0?n.length-1:m-1);break}case"Home":{if(f.preventDefault(),n.length===0)return;u(0);break}case"End":{if(f.preventDefault(),n.length===0)return;u(n.length-1);break}case"Enter":{f.preventDefault(),c>=0&&c<n.length&&r(n[c]);break}case"Escape":{f.preventDefault(),a();break}case"Backspace":{l===""&&i();break}case"Tab":{o();break}}},[s,n,c,r,o,a,i,l]);return{highlightedIndex:c,setHighlightedIndex:u,handleKeyDown:d}}const Ka=(t,n,s,r)=>{const o=[s,{code:n,...r||{}}];if(t?.services?.logger?.forward)return t.services.logger.forward(o,"warn","react-i18next::",!0);Oe(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...o):console?.warn&&console.warn(...o)},Kr={},Gn=(t,n,s,r)=>{Oe(s)&&Kr[s]||(Oe(s)&&(Kr[s]=new Date),Ka(t,n,s,r))},qn=(t,n)=>()=>{if(t.isInitialized)n();else{const s=()=>{setTimeout(()=>{t.off("initialized",s)},0),n()};t.on("initialized",s)}},nr=(t,n,s)=>{t.loadNamespaces(n,qn(t,s))},Xr=(t,n,s,r)=>{if(Oe(s)&&(s=[s]),t.options.preload&&t.options.preload.indexOf(n)>-1)return nr(t,s,r);s.forEach(o=>{t.options.ns.indexOf(o)<0&&t.options.ns.push(o)}),t.loadLanguages(n,qn(t,r))},Xa=(t,n,s={})=>!n.languages||!n.languages.length?(Gn(n,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:n.languages}),!0):n.hasLoadedNamespace(t,{lng:s.lng,precheck:(r,o)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!o(r.isLanguageChangingTo,t))return!1}}),Oe=t=>typeof t=="string",Ya=t=>typeof t=="object"&&t!==null,Qa=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ja={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ei=t=>Ja[t],ti=t=>t.replace(Qa,ei);let ri={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ti,transDefaultProps:void 0};const ni=()=>ri;let si;const oi=()=>si,ai=b.createContext();class ii{constructor(){this.usedNamespaces={}}addUsedNamespaces(n){n.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var bt={exports:{}},Xt={};var Yr;function li(){if(Yr)return Xt;Yr=1;var t=b;function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var s=typeof Object.is=="function"?Object.is:n,r=t.useState,o=t.useEffect,a=t.useLayoutEffect,i=t.useDebugValue;function l(f,m){var p=m(),g=r({inst:{value:p,getSnapshot:m}}),h=g[0].inst,x=g[1];return a(function(){h.value=p,h.getSnapshot=m,c(h)&&x({inst:h})},[f,p,m]),o(function(){return c(h)&&x({inst:h}),f(function(){c(h)&&x({inst:h})})},[f]),i(p),p}function c(f){var m=f.getSnapshot;f=f.value;try{var p=m();return!s(f,p)}catch{return!0}}function u(f,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return Xt.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,Xt}var Yt={};var Qr;function ci(){return Qr||(Qr=1,process.env.NODE_ENV!=="production"&&(function(){function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function n(p,g){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=g();if(!f){var x=g();a(h,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}x=i({inst:{value:h,getSnapshot:g}});var v=x[0].inst,w=x[1];return c(function(){v.value=h,v.getSnapshot=g,s(v)&&w({inst:v})},[p,h,g]),l(function(){return s(v)&&w({inst:v}),p(function(){s(v)&&w({inst:v})})},[p]),u(h),h}function s(p){var g=p.getSnapshot;p=p.value;try{var h=g();return!a(p,h)}catch{return!0}}function r(p,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=b,a=typeof Object.is=="function"?Object.is:t,i=o.useState,l=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:n;Yt.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Yt}var Jr;function di(){return Jr||(Jr=1,process.env.NODE_ENV==="production"?bt.exports=li():bt.exports=ci()),bt.exports}var ui=di();const fi=(t,n)=>Oe(n)?n:Ya(n)&&Oe(n.defaultValue)?n.defaultValue:Array.isArray(t)?t[t.length-1]:t,mi={t:fi,ready:!1},pi=()=>()=>{},hi=(t,n={})=>{const{i18n:s}=n,{i18n:r,defaultNS:o}=b.useContext(ai)||{},a=s||r||oi();a&&!a.reportNamespaces&&(a.reportNamespaces=new ii),a||Gn(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const i=b.useMemo(()=>({...ni(),...a?.options?.react,...n}),[a,n]),{useSuspense:l,keyPrefix:c}=i,u=t,d=Oe(u)?[u]:u,f=b.useMemo(()=>d,d);a?.reportNamespaces?.addUsedNamespaces?.(f);const m=b.useRef(0),p=b.useCallback(S=>{if(!a)return pi;const{bindI18n:y,bindI18nStore:O}=i,D=()=>{m.current+=1,S()};return y&&a.on(y,D),O&&a.store.on(O,D),()=>{y&&y.split(" ").forEach(P=>a.off(P,D)),O&&O.split(" ").forEach(P=>a.store.off(P,D))}},[a,i]),g=b.useRef(),h=b.useCallback(()=>{if(!a)return mi;const S=!!(a.isInitialized||a.initializedStoreOnce)&&f.every(_=>Xa(_,a,i)),y=n.lng||a.language,O=m.current,D=g.current;if(D&&D.ready===S&&D.lng===y&&D.keyPrefix===c&&D.revision===O)return D;const Z={t:a.getFixedT(y,i.nsMode==="fallback"?f:f[0],c),ready:S,lng:y,keyPrefix:c,revision:O};return g.current=Z,Z},[a,f,c,i,n.lng]),[x,v]=b.useState(0),{t:w,ready:j}=ui.useSyncExternalStore(p,h,h);b.useEffect(()=>{if(a&&!j&&!l){const S=()=>v(y=>y+1);n.lng?Xr(a,n.lng,f,S):nr(a,f,S)}},[a,n.lng,f,j,l,x]);const C=a||{},k=b.useRef(null),N=b.useRef(),A=S=>{const y=Object.getOwnPropertyDescriptors(S);y.__original&&delete y.__original;const O=Object.create(Object.getPrototypeOf(S),y);if(!Object.prototype.hasOwnProperty.call(O,"__original"))try{Object.defineProperty(O,"__original",{value:S,writable:!1,enumerable:!1,configurable:!1})}catch{}return O},E=b.useMemo(()=>{const S=C,y=S?.language;let O=S;S&&(k.current&&k.current.__original===S?N.current!==y?(O=A(S),k.current=O,N.current=y):O=k.current:(O=A(S),k.current=O,N.current=y));const D=[w,O,j];return D.t=w,D.i18n=O,D.ready=j,D},[w,C,j,C.resolvedLanguage,C.language,C.languages]);if(a&&l&&!j)throw new Promise(S=>{const y=()=>S();n.lng?Xr(a,n.lng,f,y):nr(a,f,y)});return E},xi={placeholder:"Select...",searchPlaceholder:"Search...",noResults:"No results found",loading:"Loading...",minChars:"Type at least {{count}} characters",error:"An error occurred",notFound:"[Record not found]",clear:"Clear selection",open:"Open dropdown",close:"Close dropdown","announcements.loading":"Loading results","announcements.noResults":"No results found","announcements.cleared":"Selection cleared","announcements.opened":"Dropdown opened, {{count}} results available","announcements.closed":"Dropdown closed","announcements.selected":"{{value}} selected","announcements.resultsLoaded":"{{count}} results loaded","validation.required":"This field is required","validation.requiredIndicator":"*"};function gi(t,n){return n?t.replace(/\{\{(\w+)\}\}/g,(s,r)=>String(n[r]??"")):t}function bi(){try{const{t,i18n:n}=hi("lookupField");if(!n.isInitialized)throw new Error("i18n not initialized");return{t:(s,r)=>r?t(s,r):t(s),i18n:n}}catch{return{t:(n,s)=>{const r=xi[n]??n;return gi(r,s)},i18n:null}}}function vi(t,n,s=!0){const r=b.useCallback(o=>{t.current&&!t.current.contains(o.target)&&n(o)},[t,n]);b.useEffect(()=>{if(s)return document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[r,s])}function At(){return typeof window<"u"}function Ue(t){return Kn(t)?(t.nodeName||"").toLowerCase():"#document"}function de(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function be(t){var n;return(n=(Kn(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function Kn(t){return At()?t instanceof Node||t instanceof de(t).Node:!1}function se(t){return At()?t instanceof Element||t instanceof de(t).Element:!1}function ge(t){return At()?t instanceof HTMLElement||t instanceof de(t).HTMLElement:!1}function en(t){return!At()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof de(t).ShadowRoot}const ki=new Set(["inline","contents"]);function ot(t){const{overflow:n,overflowX:s,overflowY:r,display:o}=he(t);return/auto|scroll|overlay|hidden|clip/.test(n+r+s)&&!ki.has(o)}const yi=new Set(["table","td","th"]);function wi(t){return yi.has(Ue(t))}const ji=[":popover-open",":modal"];function Mt(t){return ji.some(n=>{try{return t.matches(n)}catch{return!1}})}const Ni=["transform","translate","scale","rotate","perspective"],Ci=["transform","translate","scale","rotate","perspective","filter"],Si=["paint","layout","strict","content"];function pr(t){const n=hr(),s=se(t)?he(t):t;return Ni.some(r=>s[r]?s[r]!=="none":!1)||(s.containerType?s.containerType!=="normal":!1)||!n&&(s.backdropFilter?s.backdropFilter!=="none":!1)||!n&&(s.filter?s.filter!=="none":!1)||Ci.some(r=>(s.willChange||"").includes(r))||Si.some(r=>(s.contain||"").includes(r))}function Ri(t){let n=Ae(t);for(;ge(n)&&!Ze(n);){if(pr(n))return n;if(Mt(n))return null;n=Ae(n)}return null}function hr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ei=new Set(["html","body","#document"]);function Ze(t){return Ei.has(Ue(t))}function he(t){return de(t).getComputedStyle(t)}function Lt(t){return se(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ae(t){if(Ue(t)==="html")return t;const n=t.assignedSlot||t.parentNode||en(t)&&t.host||be(t);return en(n)?n.host:n}function Xn(t){const n=Ae(t);return Ze(n)?t.ownerDocument?t.ownerDocument.body:t.body:ge(n)&&ot(n)?n:Xn(n)}function tt(t,n,s){var r;n===void 0&&(n=[]),s===void 0&&(s=!0);const o=Xn(t),a=o===((r=t.ownerDocument)==null?void 0:r.body),i=de(o);if(a){const l=sr(i);return n.concat(i,i.visualViewport||[],ot(o)?o:[],l&&s?tt(l):[])}return n.concat(o,tt(o,[],s))}function sr(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const rt=Math.min,me=Math.max,Nt=Math.round,vt=Math.floor,xe=t=>({x:t,y:t}),Ii={left:"right",right:"left",bottom:"top",top:"bottom"},Ai={start:"end",end:"start"};function $t(t,n){return typeof t=="function"?t(n):t}function Be(t){return t.split("-")[0]}function at(t){return t.split("-")[1]}function Mi(t){return t==="x"?"y":"x"}function Yn(t){return t==="y"?"height":"width"}const Li=new Set(["top","bottom"]);function Ee(t){return Li.has(Be(t))?"y":"x"}function Qn(t){return Mi(Ee(t))}function $i(t,n,s){s===void 0&&(s=!1);const r=at(t),o=Qn(t),a=Yn(o);let i=o==="x"?r===(s?"end":"start")?"right":"left":r==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(i=Ct(i)),[i,Ct(i)]}function Oi(t){const n=Ct(t);return[or(t),n,or(n)]}function or(t){return t.replace(/start|end/g,n=>Ai[n])}const tn=["left","right"],rn=["right","left"],Bi=["top","bottom"],Ti=["bottom","top"];function zi(t,n,s){switch(t){case"top":case"bottom":return s?n?rn:tn:n?tn:rn;case"left":case"right":return n?Bi:Ti;default:return[]}}function Di(t,n,s,r){const o=at(t);let a=zi(Be(t),s==="start",r);return o&&(a=a.map(i=>i+"-"+o),n&&(a=a.concat(a.map(or)))),a}function Ct(t){return t.replace(/left|right|bottom|top/g,n=>Ii[n])}function _i(t){return{top:0,right:0,bottom:0,left:0,...t}}function Pi(t){return typeof t!="number"?_i(t):{top:t,right:t,bottom:t,left:t}}function St(t){const{x:n,y:s,width:r,height:o}=t;return{width:r,height:o,top:s,left:n,right:n+r,bottom:s+o,x:n,y:s}}var Vi=typeof document<"u",Fi=function(){},ar=Vi?b.useLayoutEffect:Fi;const Zi={...M},Hi=Zi.useInsertionEffect,Wi=Hi||(t=>t());function Ui(t){const n=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Wi(()=>{n.current=t}),M.useCallback(function(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return n.current==null?void 0:n.current(...r)},[])}function nn(t,n,s){let{reference:r,floating:o}=t;const a=Ee(n),i=Qn(n),l=Yn(i),c=Be(n),u=a==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=r[l]/2-o[l]/2;let p;switch(c){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(at(n)){case"start":p[i]-=m*(s&&u?-1:1);break;case"end":p[i]+=m*(s&&u?-1:1);break}return p}const Gi=async(t,n,s)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=s,l=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(n));let u=await i.getElementRects({reference:t,floating:n,strategy:o}),{x:d,y:f}=nn(u,r,c),m=r,p={},g=0;for(let h=0;h<l.length;h++){const{name:x,fn:v}=l[h],{x:w,y:j,data:C,reset:k}=await v({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:p,rects:u,platform:i,elements:{reference:t,floating:n}});d=w??d,f=j??f,p={...p,[x]:{...p[x],...C}},k&&g<=50&&(g++,typeof k=="object"&&(k.placement&&(m=k.placement),k.rects&&(u=k.rects===!0?await i.getElementRects({reference:t,floating:n,strategy:o}):k.rects),{x:d,y:f}=nn(u,m,c)),h=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:p}};async function Jn(t,n){var s;n===void 0&&(n={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=$t(n,t),g=Pi(p),x=l[m?f==="floating"?"reference":"floating":f],v=St(await a.getClippingRect({element:(s=await(a.isElement==null?void 0:a.isElement(x)))==null||s?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),w=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,j=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),C=await(a.isElement==null?void 0:a.isElement(j))?await(a.getScale==null?void 0:a.getScale(j))||{x:1,y:1}:{x:1,y:1},k=St(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:j,strategy:c}):w);return{top:(v.top-k.top+g.top)/C.y,bottom:(k.bottom-v.bottom+g.bottom)/C.y,left:(v.left-k.left+g.left)/C.x,right:(k.right-v.right+g.right)/C.x}}const qi=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var s,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:c,elements:u}=n,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...x}=$t(t,n);if((s=a.arrow)!=null&&s.alignmentOffset)return{};const v=Be(o),w=Ee(l),j=Be(l)===l,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=m||(j||!h?[Ct(l)]:Oi(l)),N=g!=="none";!m&&N&&k.push(...Di(l,h,g,C));const A=[l,...k],E=await Jn(n,x),S=[];let y=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&S.push(E[v]),f){const Z=$i(o,i,C);S.push(E[Z[0]],E[Z[1]])}if(y=[...y,{placement:o,overflows:S}],!S.every(Z=>Z<=0)){var O,D;const Z=(((O=a.flip)==null?void 0:O.index)||0)+1,_=A[Z];if(_&&(!(f==="alignment"?w!==Ee(_):!1)||y.every(R=>Ee(R.placement)===w?R.overflows[0]>0:!0)))return{data:{index:Z,overflows:y},reset:{placement:_}};let I=(D=y.filter(W=>W.overflows[0]<=0).sort((W,R)=>W.overflows[1]-R.overflows[1])[0])==null?void 0:D.placement;if(!I)switch(p){case"bestFit":{var P;const W=(P=y.filter(R=>{if(N){const B=Ee(R.placement);return B===w||B==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(B=>B>0).reduce((B,K)=>B+K,0)]).sort((R,B)=>R[1]-B[1])[0])==null?void 0:P[0];W&&(I=W);break}case"initialPlacement":I=l;break}if(o!==I)return{reset:{placement:I}}}return{}}}},Ki=new Set(["left","top"]);async function Xi(t,n){const{placement:s,platform:r,elements:o}=t,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Be(s),l=at(s),c=Ee(s)==="y",u=Ki.has(i)?-1:1,d=a&&c?-1:1,f=$t(n,t);let{mainAxis:m,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(p=l==="end"?g*-1:g),c?{x:p*d,y:m*u}:{x:m*u,y:p*d}}const Yi=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(n){var s,r;const{x:o,y:a,placement:i,middlewareData:l}=n,c=await Xi(n,t);return i===((s=l.offset)==null?void 0:s.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},Qi=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(n){var s,r;const{placement:o,rects:a,platform:i,elements:l}=n,{apply:c=()=>{},...u}=$t(t,n),d=await Jn(n,u),f=Be(o),m=at(o),p=Ee(o)==="y",{width:g,height:h}=a.floating;let x,v;f==="top"||f==="bottom"?(x=f,v=m===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(v=f,x=m==="end"?"top":"bottom");const w=h-d.top-d.bottom,j=g-d.left-d.right,C=rt(h-d[x],w),k=rt(g-d[v],j),N=!n.middlewareData.shift;let A=C,E=k;if((s=n.middlewareData.shift)!=null&&s.enabled.x&&(E=j),(r=n.middlewareData.shift)!=null&&r.enabled.y&&(A=w),N&&!m){const y=me(d.left,0),O=me(d.right,0),D=me(d.top,0),P=me(d.bottom,0);p?E=g-2*(y!==0||O!==0?y+O:me(d.left,d.right)):A=h-2*(D!==0||P!==0?D+P:me(d.top,d.bottom))}await c({...n,availableWidth:E,availableHeight:A});const S=await i.getDimensions(l.floating);return g!==S.width||h!==S.height?{reset:{rects:!0}}:{}}}};function es(t){const n=he(t);let s=parseFloat(n.width)||0,r=parseFloat(n.height)||0;const o=ge(t),a=o?t.offsetWidth:s,i=o?t.offsetHeight:r,l=Nt(s)!==a||Nt(r)!==i;return l&&(s=a,r=i),{width:s,height:r,$:l}}function xr(t){return se(t)?t:t.contextElement}function Fe(t){const n=xr(t);if(!ge(n))return xe(1);const s=n.getBoundingClientRect(),{width:r,height:o,$:a}=es(n);let i=(a?Nt(s.width):s.width)/r,l=(a?Nt(s.height):s.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Ji=xe(0);function ts(t){const n=de(t);return!hr()||!n.visualViewport?Ji:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function el(t,n,s){return n===void 0&&(n=!1),!s||n&&s!==de(t)?!1:n}function Te(t,n,s,r){n===void 0&&(n=!1),s===void 0&&(s=!1);const o=t.getBoundingClientRect(),a=xr(t);let i=xe(1);n&&(r?se(r)&&(i=Fe(r)):i=Fe(t));const l=el(a,s,r)?ts(a):xe(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(a){const m=de(a),p=r&&se(r)?de(r):r;let g=m,h=sr(g);for(;h&&r&&p!==g;){const x=Fe(h),v=h.getBoundingClientRect(),w=he(h),j=v.left+(h.clientLeft+parseFloat(w.paddingLeft))*x.x,C=v.top+(h.clientTop+parseFloat(w.paddingTop))*x.y;c*=x.x,u*=x.y,d*=x.x,f*=x.y,c+=j,u+=C,g=de(h),h=sr(g)}}return St({width:d,height:f,x:c,y:u})}function Ot(t,n){const s=Lt(t).scrollLeft;return n?n.left+s:Te(be(t)).left+s}function rs(t,n){const s=t.getBoundingClientRect(),r=s.left+n.scrollLeft-Ot(t,s),o=s.top+n.scrollTop;return{x:r,y:o}}function tl(t){let{elements:n,rect:s,offsetParent:r,strategy:o}=t;const a=o==="fixed",i=be(r),l=n?Mt(n.floating):!1;if(r===i||l&&a)return s;let c={scrollLeft:0,scrollTop:0},u=xe(1);const d=xe(0),f=ge(r);if((f||!f&&!a)&&((Ue(r)!=="body"||ot(i))&&(c=Lt(r)),ge(r))){const p=Te(r);u=Fe(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const m=i&&!f&&!a?rs(i,c):xe(0);return{width:s.width*u.x,height:s.height*u.y,x:s.x*u.x-c.scrollLeft*u.x+d.x+m.x,y:s.y*u.y-c.scrollTop*u.y+d.y+m.y}}function rl(t){return Array.from(t.getClientRects())}function nl(t){const n=be(t),s=Lt(t),r=t.ownerDocument.body,o=me(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),a=me(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight);let i=-s.scrollLeft+Ot(t);const l=-s.scrollTop;return he(r).direction==="rtl"&&(i+=me(n.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}}const sn=25;function sl(t,n){const s=de(t),r=be(t),o=s.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,c=0;if(o){a=o.width,i=o.height;const d=hr();(!d||d&&n==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}const u=Ot(r);if(u<=0){const d=r.ownerDocument,f=d.body,m=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-p);g<=sn&&(a-=g)}else u<=sn&&(a+=u);return{width:a,height:i,x:l,y:c}}const ol=new Set(["absolute","fixed"]);function al(t,n){const s=Te(t,!0,n==="fixed"),r=s.top+t.clientTop,o=s.left+t.clientLeft,a=ge(t)?Fe(t):xe(1),i=t.clientWidth*a.x,l=t.clientHeight*a.y,c=o*a.x,u=r*a.y;return{width:i,height:l,x:c,y:u}}function on(t,n,s){let r;if(n==="viewport")r=sl(t,s);else if(n==="document")r=nl(be(t));else if(se(n))r=al(n,s);else{const o=ts(t);r={x:n.x-o.x,y:n.y-o.y,width:n.width,height:n.height}}return St(r)}function ns(t,n){const s=Ae(t);return s===n||!se(s)||Ze(s)?!1:he(s).position==="fixed"||ns(s,n)}function il(t,n){const s=n.get(t);if(s)return s;let r=tt(t,[],!1).filter(l=>se(l)&&Ue(l)!=="body"),o=null;const a=he(t).position==="fixed";let i=a?Ae(t):t;for(;se(i)&&!Ze(i);){const l=he(i),c=pr(i);!c&&l.position==="fixed"&&(o=null),(a?!c&&!o:!c&&l.position==="static"&&!!o&&ol.has(o.position)||ot(i)&&!c&&ns(t,i))?r=r.filter(d=>d!==i):o=l,i=Ae(i)}return n.set(t,r),r}function ll(t){let{element:n,boundary:s,rootBoundary:r,strategy:o}=t;const i=[...s==="clippingAncestors"?Mt(n)?[]:il(n,this._c):[].concat(s),r],l=i[0],c=i.reduce((u,d)=>{const f=on(n,d,o);return u.top=me(f.top,u.top),u.right=rt(f.right,u.right),u.bottom=rt(f.bottom,u.bottom),u.left=me(f.left,u.left),u},on(n,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function cl(t){const{width:n,height:s}=es(t);return{width:n,height:s}}function dl(t,n,s){const r=ge(n),o=be(n),a=s==="fixed",i=Te(t,!0,a,n);let l={scrollLeft:0,scrollTop:0};const c=xe(0);function u(){c.x=Ot(o)}if(r||!r&&!a)if((Ue(n)!=="body"||ot(o))&&(l=Lt(n)),r){const p=Te(n,!0,a,n);c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}else o&&u();a&&!r&&o&&u();const d=o&&!r&&!a?rs(o,l):xe(0),f=i.left+l.scrollLeft-c.x-d.x,m=i.top+l.scrollTop-c.y-d.y;return{x:f,y:m,width:i.width,height:i.height}}function Qt(t){return he(t).position==="static"}function an(t,n){if(!ge(t)||he(t).position==="fixed")return null;if(n)return n(t);let s=t.offsetParent;return be(t)===s&&(s=s.ownerDocument.body),s}function ss(t,n){const s=de(t);if(Mt(t))return s;if(!ge(t)){let o=Ae(t);for(;o&&!Ze(o);){if(se(o)&&!Qt(o))return o;o=Ae(o)}return s}let r=an(t,n);for(;r&&wi(r)&&Qt(r);)r=an(r,n);return r&&Ze(r)&&Qt(r)&&!pr(r)?s:r||Ri(t)||s}const ul=async function(t){const n=this.getOffsetParent||ss,s=this.getDimensions,r=await s(t.floating);return{reference:dl(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function fl(t){return he(t).direction==="rtl"}const ml={convertOffsetParentRelativeRectToViewportRelativeRect:tl,getDocumentElement:be,getClippingRect:ll,getOffsetParent:ss,getElementRects:ul,getClientRects:rl,getDimensions:cl,getScale:Fe,isElement:se,isRTL:fl};function os(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function pl(t,n){let s=null,r;const o=be(t);function a(){var l;clearTimeout(r),(l=s)==null||l.disconnect(),s=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=t.getBoundingClientRect(),{left:d,top:f,width:m,height:p}=u;if(l||n(),!m||!p)return;const g=vt(f),h=vt(o.clientWidth-(d+m)),x=vt(o.clientHeight-(f+p)),v=vt(d),j={rootMargin:-g+"px "+-h+"px "+-x+"px "+-v+"px",threshold:me(0,rt(1,c))||1};let C=!0;function k(N){const A=N[0].intersectionRatio;if(A!==c){if(!C)return i();A?i(!1,A):r=setTimeout(()=>{i(!1,1e-7)},1e3)}A===1&&!os(u,t.getBoundingClientRect())&&i(),C=!1}try{s=new IntersectionObserver(k,{...j,root:o.ownerDocument})}catch{s=new IntersectionObserver(k,j)}s.observe(t)}return i(!0),a}function hl(t,n,s,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=xr(t),d=o||a?[...u?tt(u):[],...tt(n)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",s,{passive:!0}),a&&v.addEventListener("resize",s)});const f=u&&l?pl(u,s):null;let m=-1,p=null;i&&(p=new ResizeObserver(v=>{let[w]=v;w&&w.target===u&&p&&(p.unobserve(n),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var j;(j=p)==null||j.observe(n)})),s()}),u&&!c&&p.observe(u),p.observe(n));let g,h=c?Te(t):null;c&&x();function x(){const v=Te(t);h&&!os(h,v)&&s(),h=v,g=requestAnimationFrame(x)}return s(),()=>{var v;d.forEach(w=>{o&&w.removeEventListener("scroll",s),a&&w.removeEventListener("resize",s)}),f?.(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const xl=Yi,gl=qi,bl=Qi,vl=(t,n,s)=>{const r=new Map,o={platform:ml,...s},a={...o.platform,_c:r};return Gi(t,n,{...o,platform:a})};var kl=typeof document<"u",yl=function(){},kt=kl?b.useLayoutEffect:yl;function Rt(t,n){if(t===n)return!0;if(typeof t!=typeof n)return!1;if(typeof t=="function"&&t.toString()===n.toString())return!0;let s,r,o;if(t&&n&&typeof t=="object"){if(Array.isArray(t)){if(s=t.length,s!==n.length)return!1;for(r=s;r--!==0;)if(!Rt(t[r],n[r]))return!1;return!0}if(o=Object.keys(t),s=o.length,s!==Object.keys(n).length)return!1;for(r=s;r--!==0;)if(!{}.hasOwnProperty.call(n,o[r]))return!1;for(r=s;r--!==0;){const a=o[r];if(!(a==="_owner"&&t.$$typeof)&&!Rt(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}function as(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ln(t,n){const s=as(t);return Math.round(n*s)/s}function Jt(t){const n=M.useRef(t);return kt(()=>{n.current=t}),n}function wl(t){t===void 0&&(t={});const{placement:n="bottom",strategy:s="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,f]=M.useState({x:0,y:0,strategy:s,placement:n,middlewareData:{},isPositioned:!1}),[m,p]=M.useState(r);Rt(m,r)||p(r);const[g,h]=M.useState(null),[x,v]=M.useState(null),w=M.useCallback(R=>{R!==N.current&&(N.current=R,h(R))},[]),j=M.useCallback(R=>{R!==A.current&&(A.current=R,v(R))},[]),C=a||g,k=i||x,N=M.useRef(null),A=M.useRef(null),E=M.useRef(d),S=c!=null,y=Jt(c),O=Jt(o),D=Jt(u),P=M.useCallback(()=>{if(!N.current||!A.current)return;const R={placement:n,strategy:s,middleware:m};O.current&&(R.platform=O.current),vl(N.current,A.current,R).then(B=>{const K={...B,isPositioned:D.current!==!1};Z.current&&!Rt(E.current,K)&&(E.current=K,Ls.flushSync(()=>{f(K)}))})},[m,n,s,O,D]);kt(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[u]);const Z=M.useRef(!1);kt(()=>(Z.current=!0,()=>{Z.current=!1}),[]),kt(()=>{if(C&&(N.current=C),k&&(A.current=k),C&&k){if(y.current)return y.current(C,k,P);P()}},[C,k,P,y,S]);const _=M.useMemo(()=>({reference:N,floating:A,setReference:w,setFloating:j}),[w,j]),I=M.useMemo(()=>({reference:C,floating:k}),[C,k]),W=M.useMemo(()=>{const R={position:s,left:0,top:0};if(!I.floating)return R;const B=ln(I.floating,d.x),K=ln(I.floating,d.y);return l?{...R,transform:"translate("+B+"px, "+K+"px)",...as(I.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:B,top:K}},[s,l,I.floating,d.x,d.y]);return M.useMemo(()=>({...d,update:P,refs:_,elements:I,floatingStyles:W}),[d,P,_,I,W])}const jl=(t,n)=>({...xl(t),options:[t,n]}),Nl=(t,n)=>({...gl(t),options:[t,n]}),Cl=(t,n)=>({...bl(t),options:[t,n]}),Sl={...M};let cn=!1,Rl=0;const dn=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Rl++;function El(){const[t,n]=M.useState(()=>cn?dn():void 0);return ar(()=>{t==null&&n(dn())},[]),M.useEffect(()=>{cn=!0},[]),t}const Il=Sl.useId,Al=Il||El;let ir;process.env.NODE_ENV!=="production"&&(ir=new Set);function Ml(){for(var t,n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];const o="Floating UI: "+s.join(" ");if(!((t=ir)!=null&&t.has(o))){var a;(a=ir)==null||a.add(o),console.error(o)}}function Ll(){const t=new Map;return{emit(n,s){var r;(r=t.get(n))==null||r.forEach(o=>o(s))},on(n,s){t.has(n)||t.set(n,new Set),t.get(n).add(s)},off(n,s){var r;(r=t.get(n))==null||r.delete(s)}}}const $l=M.createContext(null),Ol=M.createContext(null),Bl=()=>{var t;return((t=M.useContext($l))==null?void 0:t.id)||null},Tl=()=>M.useContext(Ol);function zl(t){const{open:n=!1,onOpenChange:s,elements:r}=t,o=Al(),a=M.useRef({}),[i]=M.useState(()=>Ll()),l=Bl()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!se(p)&&Ml("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,u]=M.useState(r.reference),d=Ui((p,g,h)=>{a.current.openEvent=p?g:void 0,i.emit("openchange",{open:p,event:g,reason:h,nested:l}),s?.(p,g,h)}),f=M.useMemo(()=>({setPositionReference:u}),[]),m=M.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return M.useMemo(()=>({dataRef:a,open:n,onOpenChange:d,elements:m,events:i,floatingId:o,refs:f}),[n,d,m,i,o,f])}function Dl(t){t===void 0&&(t={});const{nodeId:n}=t,s=zl({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||s,o=r.elements,[a,i]=M.useState(null),[l,c]=M.useState(null),d=o?.domReference||a,f=M.useRef(null),m=Tl();ar(()=>{d&&(f.current=d)},[d]);const p=wl({...t,elements:{...o,...l&&{reference:l}}}),g=M.useCallback(j=>{const C=se(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),getClientRects:()=>j.getClientRects(),contextElement:j}:j;c(C),p.refs.setReference(C)},[p.refs]),h=M.useCallback(j=>{(se(j)||j===null)&&(f.current=j,i(j)),(se(p.refs.reference.current)||p.refs.reference.current===null||j!==null&&!se(j))&&p.refs.setReference(j)},[p.refs]),x=M.useMemo(()=>({...p.refs,setReference:h,setPositionReference:g,domReference:f}),[p.refs,h,g]),v=M.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),w=M.useMemo(()=>({...p,...r,refs:x,elements:v,nodeId:n}),[p,x,v,n,r]);return ar(()=>{r.dataRef.current.floatingContext=w;const j=m?.nodesRef.current.find(C=>C.id===n);j&&(j.context=w)}),M.useMemo(()=>({...p,context:w,refs:x,elements:v}),[p,x,v,w])}function _l({placement:t="bottom-start",offsetPx:n=4,enabled:s=!0}={}){const{refs:r,floatingStyles:o,context:a}=Dl({placement:t,middleware:[jl(n),Nl({fallbackAxisSideDirection:"end",padding:8}),Cl({apply({rects:i,elements:l}){Object.assign(l.floating.style,{minWidth:`${i.reference.width}px`})},padding:8})],whileElementsMounted:s?hl:void 0});return{refs:r,floatingStyles:o,context:a}}function Ve(t,n,s){let r=s.initialDeps??[],o,a=!0;function i(){var l,c,u;let d;s.key&&((l=s.debug)!=null&&l.call(s))&&(d=Date.now());const f=t();if(!(f.length!==r.length||f.some((g,h)=>r[h]!==g)))return o;r=f;let p;if(s.key&&((c=s.debug)!=null&&c.call(s))&&(p=Date.now()),o=n(...f),s.key&&((u=s.debug)!=null&&u.call(s))){const g=Math.round((Date.now()-d)*100)/100,h=Math.round((Date.now()-p)*100)/100,x=h/16,v=(w,j)=>{for(w=String(w);w.length<j;)w=" "+w;return w};console.info(`%c⏱ ${v(h,5)} /${v(g,5)} ms`,`
|
|
1451
|
+
font-size: .6rem;
|
|
1452
|
+
font-weight: bold;
|
|
1453
|
+
color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,s?.key)}return s?.onChange&&!(a&&s.skipInitialOnChange)&&s.onChange(o),a=!1,o}return i.updateDeps=l=>{r=l},i}function un(t,n){if(t===void 0)throw new Error("Unexpected undefined");return t}const Pl=(t,n)=>Math.abs(t-n)<1.01,Vl=(t,n,s)=>{let r;return function(...o){t.clearTimeout(r),r=t.setTimeout(()=>n.apply(this,o),s)}},fn=t=>{const{offsetWidth:n,offsetHeight:s}=t;return{width:n,height:s}},Fl=t=>t,Zl=t=>{const n=Math.max(t.startIndex-t.overscan,0),s=Math.min(t.endIndex+t.overscan,t.count-1),r=[];for(let o=n;o<=s;o++)r.push(o);return r},Hl=(t,n)=>{const s=t.scrollElement;if(!s)return;const r=t.targetWindow;if(!r)return;const o=i=>{const{width:l,height:c}=i;n({width:Math.round(l),height:Math.round(c)})};if(o(fn(s)),!r.ResizeObserver)return()=>{};const a=new r.ResizeObserver(i=>{const l=()=>{const c=i[0];if(c?.borderBoxSize){const u=c.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(fn(s))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return a.observe(s,{box:"border-box"}),()=>{a.unobserve(s)}},mn={passive:!0},pn=typeof window>"u"?!0:"onscrollend"in window,Wl=(t,n)=>{const s=t.scrollElement;if(!s)return;const r=t.targetWindow;if(!r)return;let o=0;const a=t.options.useScrollendEvent&&pn?()=>{}:Vl(r,()=>{n(o,!1)},t.options.isScrollingResetDelay),i=d=>()=>{const{horizontal:f,isRtl:m}=t.options;o=f?s.scrollLeft*(m&&-1||1):s.scrollTop,a(),n(o,d)},l=i(!0),c=i(!1);s.addEventListener("scroll",l,mn);const u=t.options.useScrollendEvent&&pn;return u&&s.addEventListener("scrollend",c,mn),()=>{s.removeEventListener("scroll",l),u&&s.removeEventListener("scrollend",c)}},Ul=(t,n,s)=>{if(n?.borderBoxSize){const r=n.borderBoxSize[0];if(r)return Math.round(r[s.options.horizontal?"inlineSize":"blockSize"])}return t[s.options.horizontal?"offsetWidth":"offsetHeight"]},Gl=(t,{adjustments:n=0,behavior:s},r)=>{var o,a;const i=t+n;(a=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[r.options.horizontal?"left":"top"]:i,behavior:s})};class ql{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let s=null;const r=()=>s||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:s=new this.targetWindow.ResizeObserver(o=>{o.forEach(a=>{const i=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var o;(o=r())==null||o.disconnect(),s=null},observe:o=>{var a;return(a=r())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=r())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=s=>{Object.entries(s).forEach(([r,o])=>{typeof o>"u"&&delete s[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Fl,rangeExtractor:Zl,onChange:()=>{},measureElement:Ul,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...s}},this.notify=s=>{var r,o;(o=(r=this.options).onChange)==null||o.call(r,this,s)},this.maybeNotify=Ve(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),s=>{this.notify(s)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(s=>s()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var s;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((s=this.scrollElement)==null?void 0:s.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=a,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(s,r)=>{const o=new Map,a=new Map;for(let i=r-1;i>=0;i--){const l=s[i];if(o.has(l.lane))continue;const c=a.get(l.lane);if(c==null||l.end>c.end?a.set(l.lane,l):l.end<c.end&&o.set(l.lane,!0),o.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,l)=>i.end===l.end?i.index-l.index:i.end-l.end)[0]:void 0},this.getMeasurementOptions=Ve(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(s,r,o,a,i,l)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMeasuredCacheIndexes=[],{count:s,paddingStart:r,scrollMargin:o,getItemKey:a,enabled:i,lanes:l}),{key:!1}),this.getMeasurements=Ve(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:s,paddingStart:r,scrollMargin:o,getItemKey:a,enabled:i,lanes:l},c)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>s)for(const m of this.laneAssignments.keys())m>=s&&this.laneAssignments.delete(m);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(m=>{this.itemSizeCache.set(m.key,m.size)}));const u=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===s&&(this.lanesSettling=!1);const d=this.measurementsCache.slice(0,u),f=new Array(l).fill(void 0);for(let m=0;m<u;m++){const p=d[m];p&&(f[p.lane]=m)}for(let m=u;m<s;m++){const p=a(m),g=this.laneAssignments.get(m);let h,x;if(g!==void 0&&this.options.lanes>1){h=g;const C=f[h],k=C!==void 0?d[C]:void 0;x=k?k.end+this.options.gap:r+o}else{const C=this.options.lanes===1?d[m-1]:this.getFurthestMeasurement(d,m);x=C?C.end+this.options.gap:r+o,h=C?C.lane:m%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(m,h)}const v=c.get(p),w=typeof v=="number"?v:this.options.estimateSize(m),j=x+w;d[m]={index:m,start:x,size:w,end:j,key:p,lane:h},f[h]=m}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Ve(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(s,r,o,a)=>this.range=s.length>0&&r>0?Kl({measurements:s,outerSize:r,scrollOffset:o,lanes:a}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Ve(()=>{let s=null,r=null;const o=this.calculateRange();return o&&(s=o.startIndex,r=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,s,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,s,r]},(s,r,o,a,i)=>a===null||i===null?[]:s({startIndex:a,endIndex:i,overscan:r,count:o}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=s=>{const r=this.options.indexAttribute,o=s.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(s,r)=>{const o=this.indexFromElement(s),a=this.measurementsCache[o];if(!a)return;const i=a.key,l=this.elementsCache.get(i);l!==s&&(l&&this.observer.unobserve(l),this.observer.observe(s),this.elementsCache.set(i,s)),s.isConnected&&this.resizeItem(o,this.options.measureElement(s,r,this))},this.resizeItem=(s,r)=>{const o=this.measurementsCache[s];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,i=r-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!1))},this.measureElement=s=>{if(!s){this.elementsCache.forEach((r,o)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(o))});return}this._measureElement(s,void 0)},this.getVirtualItems=Ve(()=>[this.getVirtualIndexes(),this.getMeasurements()],(s,r)=>{const o=[];for(let a=0,i=s.length;a<i;a++){const l=s[a],c=r[l];o.push(c)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=s=>{const r=this.getMeasurements();if(r.length!==0)return un(r[is(0,r.length-1,o=>un(r[o]).start,s)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const s=this.scrollElement.document.documentElement;return this.options.horizontal?s.scrollWidth-this.scrollElement.innerWidth:s.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(s,r,o=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),i=this.getScrollOffset();r==="auto"&&(r=s>=i+a?"end":"start"),r==="center"?s+=(o-a)/2:r==="end"&&(s-=a);const l=this.getMaxScrollOffset();return Math.max(Math.min(l,s),0)},this.getOffsetForIndex=(s,r="auto")=>{s=Math.max(0,Math.min(s,this.options.count-1));const o=this.measurementsCache[s];if(!o)return;const a=this.getSize(),i=this.getScrollOffset();if(r==="auto")if(o.end>=i+a-this.options.scrollPaddingEnd)r="end";else if(o.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];if(r==="end"&&s===this.options.count-1)return[this.getMaxScrollOffset(),r];const l=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,r,o.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(s,{align:r="start",behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(s,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(s,{align:r="auto",behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),s=Math.max(0,Math.min(s,this.options.count-1)),this.currentScrollToIndex=s;let a=0;const i=10,l=u=>{if(!this.targetWindow)return;const d=this.getOffsetForIndex(s,u);if(!d){console.warn("Failed to get offset for index:",s);return}const[f,m]=d;this._scrollToOffset(f,{adjustments:void 0,behavior:o}),this.targetWindow.requestAnimationFrame(()=>{const p=()=>{if(this.currentScrollToIndex!==s)return;const g=this.getScrollOffset(),h=this.getOffsetForIndex(s,m);if(!h){console.warn("Failed to get offset for index:",s);return}Pl(h[0],g)||c(m)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(p):p()})},c=u=>{this.targetWindow&&this.currentScrollToIndex===s&&(a++,a<i?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",a,i),this.targetWindow.requestAnimationFrame(()=>l(u))):console.warn(`Failed to scroll to index ${s} after ${i} attempts.`))};l(r)},this.scrollBy=(s,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+s,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var s;const r=this.getMeasurements();let o;if(r.length===0)o=this.options.paddingStart;else if(this.options.lanes===1)o=((s=r[r.length-1])==null?void 0:s.end)??0;else{const a=Array(this.options.lanes).fill(null);let i=r.length-1;for(;i>=0&&a.some(l=>l===null);){const l=r[i];a[l.lane]===null&&(a[l.lane]=l.end),i--}o=Math.max(...a.filter(l=>l!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(s,{adjustments:r,behavior:o})=>{this.options.scrollToFn(s,{behavior:o,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(n)}}const is=(t,n,s,r)=>{for(;t<=n;){const o=(t+n)/2|0,a=s(o);if(a<r)t=o+1;else if(a>r)n=o-1;else return o}return t>0?t-1:0};function Kl({measurements:t,outerSize:n,scrollOffset:s,lanes:r}){const o=t.length-1,a=c=>t[c].start;if(t.length<=r)return{startIndex:0,endIndex:o};let i=is(0,o,a,s),l=i;if(r===1)for(;l<o&&t[l].end<s+n;)l++;else if(r>1){const c=Array(r).fill(0);for(;l<o&&c.some(d=>d<s+n);){const d=t[l];c[d.lane]=d.end,l++}const u=Array(r).fill(s+n);for(;i>=0&&u.some(d=>d>=s);){const d=t[i];u[d.lane]=d.start,i--}i=Math.max(0,i-i%r),l=Math.min(o,l+(r-1-l%r))}return{startIndex:i,endIndex:l}}const hn=typeof document<"u"?M.useLayoutEffect:M.useEffect;function Xl({useFlushSync:t=!0,...n}){const s=M.useReducer(()=>({}),{})[1],r={...n,onChange:(a,i)=>{var l;t&&i?xn.flushSync(s):s(),(l=n.onChange)==null||l.call(n,a,i)}},[o]=M.useState(()=>new ql(r));return o.setOptions(r),hn(()=>o._didMount(),[]),hn(()=>o._willUpdate()),o}function Yl(t){return Xl({observeElementRect:Hl,observeElementOffset:Wl,scrollToFn:Gl,...t})}const Ql=36,Jl=5;function ec({count:t,parentRef:n,estimateSize:s=Ql,overscan:r=Jl,enabled:o=!0}){const a=Yl({count:o?t:0,getScrollElement:()=>n.current,estimateSize:b.useCallback(()=>s,[s]),overscan:r});return{virtualItems:a.getVirtualItems(),totalSize:a.getTotalSize(),scrollToIndex:a.scrollToIndex,measureElement:a.measureElement}}const tc=b.forwardRef(function({value:n,onChange:s,placeholder:r="Search...",className:o,listboxId:a,activeDescendantId:i},l){const c=b.useCallback(()=>{s("")},[s]);return e.jsxs("div",{className:et("lookup-field__search-container",o),children:[e.jsx(Qo,{className:"lookup-field__search-icon"}),e.jsx("input",{ref:l,type:"text",className:"lookup-field__search",value:n,onChange:u=>s(u.target.value),placeholder:r,"aria-label":r,"aria-autocomplete":"list","aria-controls":a,"aria-activedescendant":i}),n&&e.jsx("button",{type:"button",className:"lookup-field__search-clear",onClick:c,"aria-label":"Clear search",tabIndex:-1,children:e.jsx(Ln,{className:"h-4 w-4"})})]})});function rc({message:t}){return e.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"lookup-field__live-region",children:t})}const nc=10,sc=50,oc=1;function ac({entity:t,label:n,displayFields:s,value:r,onChange:o,fetcher:a,clearable:i=!0,placeholder:l,className:c,pageSize:u=nc,onError:d,searchFields:f,minChars:m=oc,displayValue:p,displayTemplate:g,renderSelected:h,filters:x,getFilters:v,dependencies:w,orderBy:j,bindFields:C,readOnly:k=!1,disabled:N=!1,error:A=!1,onFocus:E,onBlur:S,onReady:y,onInvalidValue:O,noResultsText:D,searchPlaceholder:P,required:Z=!1,showRequiredIndicator:_,validateOnBlur:I=!0,onValidationChange:W},R){const{t:B}=bi(),K=b.useMemo(()=>j??{field:s[0],direction:"asc"},[j,s]),J=b.useId(),[T,z]=b.useState(!1),[q,te]=b.useState(!1),[Ge,X]=b.useState(null),[oe,ue]=b.useState([]),[re,ae]=b.useState(null),[je,G]=b.useState(1),[ne,le]=b.useState(!0),[Ne,qe]=b.useState(!1),ve=b.useRef(null),fe=b.useRef(null),gr=b.useRef(JSON.stringify(w??[])),Ce=b.useRef(null),Bt=b.useRef(null),it=b.useRef(null),[ze,Me]=b.useState(""),ke=Ga(ze),[us,pe]=b.useState(""),br=b.useRef(!1),ce=b.useRef(null);ce.current=re;const De=b.useRef(null),Ke=b.useRef(!1),vr=b.useRef(O);b.useEffect(()=>{vr.current=O},[O]);const fs=b.useCallback(()=>{T&&(Ke.current&&(Ke.current=!1,S?.(ce.current)),z(!1),Me(""))},[T,S]);vi(De,fs,T);const{refs:kr,floatingStyles:ms}=_l({enabled:T}),{virtualItems:yr,totalSize:ps}=ec({count:oe.length,parentRef:Ce,enabled:T&&oe.length>0}),[lt,ye]=b.useState(!1),[wr,ct]=b.useState(!1),[Tt,hs]=b.useState([]),[jr,xs]=b.useState(0),[zt,gs]=b.useState(1),[Nr,Dt]=b.useState(!1),Cr=b.useRef(""),_t=b.useRef(!1),_e=b.useRef(1),Sr=A||wr,bs=_??Z,Xe=b.useRef(W);b.useEffect(()=>{Xe.current=W},[W]);const dt=b.useCallback(()=>rr(v?v():x),[x,v]),ut=b.useCallback(async(V="")=>{ve.current&&ve.current.abort();const F=new AbortController;ve.current=F;try{te(!0),X(null),pe(B("announcements.loading"));const U=dt(),Y=[...new Set(["Id",...s,...C??[]])],ie=await a(t,{fields:Y,search:V.length>=m?V:"",searchFields:f??s,page:1,pageSize:u,filters:U,orderBy:K});if(F.signal.aborted)return;ue(ie.data),!br.current&&y&&(br.current=!0,setTimeout(()=>{y({firstPageLoaded:!0},Zt)},0)),ie.data.length===0?pe(B("announcements.noResults")):pe(B("announcements.opened",{count:ie.data.length})),ie.data.length<u&&le(!1)}catch(U){if(U instanceof Error&&U.name==="AbortError")return;const Y=U instanceof Error?U:new Error("Unknown error");X(Y),d?.(Y)}finally{F.signal.aborted||te(!1)}},[t,s,C,f,u,m,d,y,dt,K,a]),Rr=b.useCallback(async(V="")=>{if(_t.current||Ne||!ne)return;const F=_e.current;try{qe(!0),pe(B("announcements.loadingMore"));const U=dt(),Y=F+1,ie=[...new Set(["Id",...s,...C??[]])],Gt=await a(t,{fields:ie,search:V.length>=m?V:"",searchFields:f??s,page:Y,pageSize:u,filters:U,orderBy:K});ue(Ms=>[...Ms,...Gt.data]),_e.current=Y,G(Y),pe(B("announcements.resultsLoaded",{count:Gt.data.length})),Gt.data.length<u&&le(!1)}catch(U){if(U instanceof Error&&U.name==="AbortError")return;const Y=U instanceof Error?U:new Error("Unknown error");d?.(Y)}finally{qe(!1)}},[t,s,C,f,u,m,Ne,ne,d,dt,K,a,B]),ft=b.useCallback(async V=>{try{const F=[...new Set(["Id",...s,...C??[]])];console.log("[LookupField] fetchAndSetRecordById:",{recordId:V,entity:t,allFields:F});const U=await a(t,{fields:F,filters:[[{Id:V}]],page:1,pageSize:1});return console.log("[LookupField] fetchAndSetRecordById response:",U),U.data[0]??null}catch(F){return console.error("[LookupField] fetchAndSetRecordById error:",F),null}},[t,s,C,a]),mt=b.useCallback(()=>N||k?(ct(!1),Xe.current?.(!0),!0):Z&&!ce.current?(ct(!0),Xe.current?.(!1),!1):(ct(!1),Xe.current?.(!0),!0),[Z,k,N]),vs=b.useCallback(()=>{const V=Ce.current;if(!V||Ne||!ne)return;const{scrollTop:F,scrollHeight:U,clientHeight:Y}=V;U-F-Y<sc&&Rr(ke)},[Ne,ne,Rr,ke]);b.useEffect(()=>{T&&Bt.current&&Bt.current.focus()},[T]),b.useEffect(()=>{T&&(ke.length===0||ke.length>=m)&&(Nr&&Cr.current===ke&&Tt.length>0?(_t.current=!0,ue(Tt),_e.current=zt,G(zt),le(!0),requestAnimationFrame(()=>{Ce.current&&(Ce.current.scrollTop=jr),setTimeout(()=>{_t.current=!1},0)})):(_e.current=1,G(1),le(!0),ue([]),ut(ke)))},[T,ke,ut,m,Nr,Tt,zt,jr]),b.useEffect(()=>(T||(Me(""),_e.current=1,G(1),le(!0),qe(!1)),()=>{ve.current&&ve.current.abort()}),[T]);const Pt=b.useRef(void 0),Er=b.useRef(ft);Er.current=ft;const Ir=b.useRef(0);b.useEffect(()=>{const F=Pt.current===void 0||Pt.current!==r;if(Pt.current=r,r===null){ye(!1);return}if(!F)return;const U=++Ir.current;Er.current(r).then(Y=>{Ir.current===U&&(Y?(ae(Y),ye(!1)):(ye(!0),ae(null),vr.current?.(r)))})},[r]);const Vt=JSON.stringify(w??[]);b.useEffect(()=>{gr.current!==Vt&&(gr.current=Vt,ve.current&&ve.current.abort(),Dt(!1),ue([]),ae(null),_e.current=1,G(1),le(!0),z(!1),Me(""))},[Vt]);const pt=JSON.stringify(x??[]),Ar=b.useRef(pt);b.useEffect(()=>{Ar.current!==pt&&(Ar.current=pt,Dt(!1))},[pt]);const Mr=b.useCallback(V=>{if(h)return h(V);if(g)return Za(g,V);if(p){const F=V[p];return F!=null?String(F):""}return s.map(F=>{const U=V[F];return U!=null?String(U):""}).join(" - ")},[h,g,p,s]),ks=()=>{N||k||z(V=>!V)},Lr=V=>s.map(F=>String(V[F]??"")).join(" - "),Ft=V=>{fe.current=re,ae(V),ce.current=V,ye(!1),wr&&(ct(!1),Xe.current?.(!0)),hs(oe),xs(Ce.current?.scrollTop??0),gs(je),Cr.current=ze,Dt(!0),o(V,fe.current),Me(""),z(!1),X(null),Wt.current=!0,it.current?.focus();const F=Mr(V);pe(B("announcements.selected",{value:F}))},ys=V=>{V.stopPropagation(),fe.current=re,ae(null),ce.current=null,ye(!1),o(null,fe.current),pe(B("announcements.cleared"))},$r=b.useCallback(()=>{!ce.current&&!lt||(fe.current=ce.current,ae(null),ce.current=null,ye(!1),o(null,fe.current),pe(B("announcements.cleared")))},[lt,o,B]),ws=b.useCallback(()=>{Ut.current=!0,z(!1),Me(""),pe(B("announcements.closed")),setTimeout(()=>{if(!De.current)return;const F=Array.from(document.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')),U=F.findIndex(ie=>De.current?.contains(ie));let Y=null;for(let ie=U+1;ie<F.length;ie++)if(!De.current?.contains(F[ie])){Y=F[ie];break}Y&&Y.focus()},0)},[B]),js=b.useCallback(()=>{z(!1),Me(""),pe(B("announcements.closed")),it.current?.focus()},[B]),Or=b.useCallback(()=>{fe.current=ce.current,ae(null),ye(!1),o(null,fe.current),pe(B("announcements.cleared"))},[o,B]),Zt=b.useMemo(()=>({clear:Or,focus:()=>it.current?.focus(),reload:()=>ut(ke),getValue:()=>ce.current,setValue:async V=>{const F=await ft(V);F?(fe.current=ce.current,ae(F),ye(!1),o(F,fe.current)):(ye(!0),ae(null),O?.(V))},open:()=>z(!0),close:()=>z(!1),validate:mt}),[Or,ut,ke,ft,o,O,mt]);b.useImperativeHandle(R,()=>Zt,[Zt]);const{highlightedIndex:Se,setHighlightedIndex:Br,handleKeyDown:Ns}=qa({records:oe,isOpen:T,onSelect:Ft,onClose:ws,onEscape:js,onClear:$r,searchQuery:ze});b.useEffect(()=>{T&&Br(-1)},[T,oe,Br]),b.useEffect(()=>{if(Se>=0&&Ce.current){const V=Ce.current.querySelector(`[data-index="${Se}"]`);V?.scrollIntoView&&V.scrollIntoView({block:"nearest",behavior:"smooth"})}},[Se]);const Ht=b.useRef(!1),Wt=b.useRef(!1),Ut=b.useRef(!1),Cs=()=>{Ht.current=!0},Ss=V=>{N||T||V.key==="Backspace"&&i&&!k&&(re||lt)&&(V.preventDefault(),$r())},Rs=()=>{if(!N&&!k){if(Wt.current){Wt.current=!1;return}if(Ut.current){Ut.current=!1;return}if(Ht.current){Ht.current=!1;return}T||z(!0)}},Es=b.useCallback(()=>{N||Ke.current||(Ke.current=!0,E?.(ce.current))},[E,N]),Is=b.useCallback(V=>{if(N)return;const F=V.relatedTarget;!De.current?.contains(F)&&(Ke.current=!1,I&&!k&&mt(),S?.(ce.current))},[S,I,k,N,mt]),As=()=>{if(ze.length>0&&ze.length<m)return e.jsx("div",{className:"lookup-field__empty",children:B("minChars",{count:m})});if(q)return e.jsxs("div",{className:"lookup-field__loading",children:[e.jsx(Zr,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{children:B("loading")})]});if(Ge)return e.jsx("div",{className:"lookup-field__error",children:B("error")});if(oe.length===0)return e.jsx("div",{className:"lookup-field__empty",children:D??B("noResults")});const V=yr.length>0;return e.jsxs("div",{ref:Ce,className:"lookup-field__options",onScroll:vs,children:[V?e.jsx("div",{style:{height:`${ps}px`,width:"100%",position:"relative"},children:yr.map(F=>{const U=oe[F.index],Y=F.index;return e.jsx("div",{id:`${J}-option-${U.Id}`,"data-index":Y,className:et("lookup-field__option",Y===Se&&"lookup-field__option--highlighted"),role:"option","aria-selected":re?.Id===U.Id,onClick:()=>Ft(U),style:{position:"absolute",top:0,left:0,width:"100%",height:`${F.size}px`,transform:`translateY(${F.start}px)`},children:Lr(U)},U.Id)})}):oe.map((F,U)=>e.jsx("div",{id:`${J}-option-${F.Id}`,"data-index":U,className:et("lookup-field__option",U===Se&&"lookup-field__option--highlighted"),role:"option","aria-selected":re?.Id===F.Id,onClick:()=>Ft(F),children:Lr(F)},F.Id)),Ne&&e.jsx("div",{className:"lookup-field__loading-more",children:e.jsx(Zr,{className:"h-4 w-4 animate-spin"})})]})};return e.jsxs("div",{ref:De,className:et("lookup-field",N&&"lookup-field--disabled",k&&"lookup-field--readonly",Sr&&"lookup-field--error",c),role:"combobox","aria-expanded":!N&&T,"aria-haspopup":"listbox","aria-labelledby":`${J}-label`,"aria-controls":T?`${J}-listbox`:void 0,"aria-disabled":N||void 0,"aria-readonly":!N&&k||void 0,"aria-invalid":Sr||void 0,"aria-required":Z||void 0,onKeyDown:N?void 0:Ns,onFocus:Es,onBlur:Is,children:[e.jsx(rc,{message:us}),e.jsxs("label",{id:`${J}-label`,htmlFor:J,className:"lookup-field__label",children:[n,bs&&e.jsx("span",{className:"lookup-field__required-indicator",children:B("validation.requiredIndicator")})]}),e.jsxs("button",{ref:V=>{it.current=V,kr.setReference(V)},id:J,type:"button",className:"lookup-field__trigger",onClick:ks,onMouseDown:Cs,onKeyDown:Ss,onFocus:Rs,disabled:N,tabIndex:N?-1:0,children:[e.jsx("span",{className:"lookup-field__selected-text",children:lt?B("notFound"):re?Mr(re):l??B("placeholder")}),e.jsx(Ko,{className:et("lookup-field__chevron",T&&"lookup-field__chevron--open"),"aria-hidden":"true"}),i&&re&&!k&&!N&&e.jsx(Ln,{className:"lookup-field__clear",onClick:ys,"aria-label":"Clear selection"})]}),T&&e.jsxs("div",{ref:kr.setFloating,style:ms,className:"lookup-field__dropdown",children:[e.jsx(tc,{ref:Bt,value:ze,onChange:Me,placeholder:P??B("searchPlaceholder"),listboxId:`${J}-listbox`,activeDescendantId:Se>=0&&oe[Se]?`${J}-option-${oe[Se].Id}`:void 0}),e.jsx("div",{id:`${J}-listbox`,role:"listbox","aria-label":n,children:As()})]})]})}const ls=b.forwardRef(ac);ls.displayName="LookupField";class ic extends Error{constructor(n,s,r){super(n),this.status=s,this.statusText=r,this.name="ApiError"}}const lc={"Content-Type":"application/json"};function cc(t,n){const s={...lc,...n?.headers};return async(r,o)=>{const a=`${t}/${r}/search`,i=o.fields.includes("Id")?o.fields:["Id",...o.fields],l=await fetch(a,{method:"POST",headers:s,body:JSON.stringify({...o,fields:i})});if(!l.ok)throw new ic(`API Error: ${l.status} ${l.statusText}`,l.status,l.statusText);return l.json()}}const dc=({productName:t="Mi Aplicación",siesaLogoPath:n,siesaLogoWidth:s,siesaLogoHeight:r,userDropdown:o,navigationItems:a,children:i,className:l="",contentClassName:c="",navbarProps:u={},navigationRailProps:d={}})=>{const[f,m]=b.useState("collapsed"),p=g=>{g&&m(g)};return e.jsxs("div",{className:["h-screen","w-full","bg-white","dark:bg-dark-bg-primary","flex","flex-col","overflow-hidden",l].join(" ").replace(/\s+/g," ").trim(),children:[e.jsx(st,{productName:t,userDropdown:o,hideActionButtons:!0,showSiesaLogoLeading:!0,showBusinessLogo:!1,siesaLogo:n?e.jsx("img",{src:n,alt:"Siesa",className:"object-contain",style:{width:s||"100%",height:r||"100%"}}):void 0,className:"bg-white dark:bg-dark-bg-primary",...u}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[e.jsx(Et,{state:f,items:a,showSearchButton:!1,onStateChange:p,...d}),e.jsx("div",{className:["flex-1","overflow-y-auto","bg-gray-50","dark:bg-dark-bg-primary",c].join(" ").replace(/\s+/g," ").trim(),children:i})]})]})},uc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),fc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),mc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),pc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),hc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),xc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),gc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),bc=({className:t=""})=>e.jsxs("svg",{className:t,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"})]}),vc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),kc=({className:t=""})=>e.jsxs("svg",{className:t,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"})]}),yc=({title:t="List View",navbarProductName:n="SB Commercial",tableTitle:s="Usuarios",columns:r,data:o,navigationItems:a,quickFilters:i,actionButtons:l,userDropdown:c,notifications:u,environmentBadge:d,showNavigationRail:f=!0,navigationRailState:m="collapsed",onNavigationRailStateChange:p,onNavItemClick:g,onSearch:h,searchPlaceholder:x="Buscar",onSort:v,sortColumn:w,sortDirection:j,pagination:C,loading:k=!1,loadingRows:N=5,emptyMessage:A="No hay datos disponibles",className:E="",onNotificationsClick:S,viewOptions:y,selectedViewOption:O,onViewOptionChange:D})=>{const[P,Z]=b.useState(""),[_,I]=b.useState(!1),W=a||[{id:"home",icon:e.jsx(uc,{className:"w-4 h-4"}),label:"Inicio",active:!0},{id:"option1",icon:e.jsx(fc,{className:"w-4 h-4"}),label:"Opción 1"},{id:"option2",icon:e.jsx(mc,{className:"w-4 h-4"}),label:"Opción 2"},{id:"option3",icon:e.jsx(pc,{className:"w-4 h-4"}),label:"Opción 3"},{id:"more",icon:e.jsx(hc,{className:"w-4 h-4"}),label:"Ver más..."}],R=i||[{id:"paid",label:"Facturas Pagadas",color:"lime"},{id:"pending",label:"Facturas Pendientes por Pago",color:"rose"},{id:"orders",label:"Órdenes de Compra",color:"sky"}],B=l||[{id:"audit",label:"Auditoría",leftIcon:e.jsx(gc,{className:"w-4 h-4"}),type:"default",onClick:()=>{}},{id:"filter",label:"Filtrar",leftIcon:e.jsx(bc,{className:"w-4 h-4"}),type:"default",onClick:()=>{}},{id:"create",label:"Crear",leftIcon:e.jsx(xc,{className:"w-4 h-4"}),type:"default",onClick:()=>{}}],K=T=>{Z(T.target.value),h?.(T.target.value)},J=r.map(T=>({header:T.header,accessor:T.accessor,sortable:T.sortable,render:T.render,align:T.align,width:T.width}));return e.jsxs("div",{className:["bg-background-secondary","dark:bg-dark-bg-primary","flex","w-full","h-full","min-h-screen",E].join(" "),children:[f&&e.jsx(Et,{state:m,items:W,onStateChange:p,onItemClick:g,showSearchButton:!0}),e.jsxs("div",{className:"flex flex-col flex-1 overflow-hidden",children:[e.jsx(st,{productName:n,environmentBadge:d,userDropdown:c,notifications:u,hideActionButtons:!1,onNotificationsClick:S,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:R.map(T=>e.jsx($e,{color:T.color,label:T.label,leftIcon:T.icon},T.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:t}),e.jsx("div",{className:"flex items-center gap-2",children:B.map(T=>e.jsx(Q,{type:T.type,size:"sm",leftIcon:T.leftIcon,onClick:T.onClick,children:T.label},T.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:s}),e.jsx(nt,{placeholder:x,leftIcon:e.jsx(kc,{className:"w-4 h-4"}),value:P,onChange:K,className:"w-[200px]"}),y&&e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>I(!_),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(vc,{className:"w-5 h-5 text-content-secondary dark:text-content-secondary"})]}),_&&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:y.map(T=>e.jsx("button",{onClick:()=>{D?.(T.id),I(!1)},className:["block","w-full","px-4","py-2","text-left","text-sm","hover:bg-background-secondary","dark:hover:bg-dark-bg-secondary",O===T.id?"bg-primary-custom-100 dark:bg-primary-custom-600/20":""].join(" "),children:T.label},T.id))})]})]}),e.jsx(Sn,{columns:J,data:o,variant:"grid",showBorder:!1,showShadow:!1,loading:k,loadingRows:N,emptyMessage:A,onSort:v,sortColumn:w,sortDirection:j,pagination:C,className:"flex-1"})]})]})})]})]})},wc=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,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"})]}),jc=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,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"})}),Nc=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,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"})]}),Cc=({onSubmit:t,onForgotPassword:n,onSignUp:s,isLoading:r=!1,errorMessage:o,className:a="",showBackground:i=!0,variant:l="responsive"})=>{const[c,u]=b.useState(""),[d,f]=b.useState(""),[m,p]=b.useState(!1),[g,h]=b.useState(""),x=j=>{if(j.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){h("Por favor ingresa un email válido");return}h(""),t?.(c,d)},v=j=>{u(j.target.value),g&&h("")},w=()=>{p(!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",a].join(" "),children:[i&&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",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="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."})]}),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:x,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(wc,{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:c,onChange:v,disabled:r,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",g?"border-error-border!":""].filter(Boolean).join(" ")})]}),g&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:g})]}),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:n,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(jc,{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:d,onChange:j=>f(j.target.value),disabled:r,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":m?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(Nc,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:r||!c||!d,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:r?"Iniciando sesión...":"Iniciar Sesión"})]}),e.jsx("button",{type:"button",onClick:s,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?"})]})]})},Sc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),Rc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),cs=({tableTitle:t="Mesa 1",changeTableLabel:n="Cambiar Mesa",menusTitle:s="Menús",menus:r=[{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:o="1",onMenuSelect:a,onChangeTable:i,categoryTitle:l="Categoría",categories:c=[],selectedCategoryId:u,onCategorySelect:d,productsTitle:f="Productos",products:m=[],onAddProduct:p,activeTab:g="products",onTabChange:h,orderItems:x=[],onOrderItemQuantityChange:v,onOrderItemDelete:w,subtotal:j="40,000.00",taxes:C="40,000.00",total:k="40,000.00",confirmLabel:N="Confirmar Pedido",onConfirmOrder:A,isLoading:E=!1,errorMessage:S,userAvatar:y,userName:O="Jhonnatan Diaz",userRole:D="Administrador",businessLogo:P,siesaLogo:Z,className:_=""})=>e.jsxs("div",{className:`
|
|
1454
|
+
min-h-screen
|
|
1455
|
+
w-full
|
|
1456
|
+
bg-background-secondary
|
|
1457
|
+
dark:bg-dark-bg-primary
|
|
1458
|
+
flex
|
|
1459
|
+
flex-col
|
|
1460
|
+
${_}
|
|
1461
|
+
`.trim().replace(/\s+/g," "),children:[e.jsx(st,{logo:P&&e.jsx("div",{className:"h-[30px] w-[168px] overflow-hidden",children:typeof P=="string"?e.jsx("img",{src:P,alt:"Business Logo",className:"h-full w-full object-contain"}):P}),productName:"",userDropdown:y?{avatar:y,name:O,role:D}:void 0,hideActionButtons:!0,siesaLogo:Z&&e.jsx("div",{className:"h-[30px] w-[120px] overflow-hidden",children:typeof Z=="string"?e.jsx("img",{src:Z,alt:"Siesa Logo",className:"h-full w-full object-contain"}):Z}),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:`
|
|
1462
|
+
flex-1
|
|
1463
|
+
flex
|
|
1464
|
+
flex-col
|
|
1465
|
+
gap-4
|
|
1466
|
+
p-4
|
|
1467
|
+
bg-white
|
|
1468
|
+
dark:bg-dark-bg-primary
|
|
1469
|
+
rounded-tl-3xl
|
|
1470
|
+
rounded-tr-3xl
|
|
1471
|
+
overflow-hidden
|
|
1472
|
+
`,children:[e.jsxs("div",{className:"flex items-center gap-4 w-full",children:[e.jsx("div",{className:"shrink-0",children:e.jsx(Q,{type:"default",leftIcon:e.jsx(Sc,{className:"w-4 h-4"}),onClick:i,ariaLabel:n,children:n})}),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:s})}),e.jsx("div",{className:"flex-1 flex gap-2 overflow-x-auto overflow-y-hidden",children:r.map(I=>e.jsx(Q,{type:o===I.id?"default":"outline-solid",onClick:()=>a?.(I.id),children:I.label},I.id))})]}),e.jsxs("div",{className:`
|
|
1473
|
+
flex-1
|
|
1474
|
+
flex
|
|
1475
|
+
gap-0
|
|
1476
|
+
bg-background-secondary
|
|
1477
|
+
dark:bg-dark-bg-primary/50
|
|
1478
|
+
rounded-xl
|
|
1479
|
+
overflow-hidden
|
|
1480
|
+
`,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:l})}),e.jsx("div",{className:"flex-1 flex flex-col gap-2 overflow-x-hidden overflow-y-auto",children:c.map(I=>e.jsx(In,{image:I.image,label:I.label,active:u===I.id,onClick:()=>d?.(I.id)},I.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:f})}),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:m.map(I=>e.jsx(An,{image:I.image,productName:I.name,price:I.price,onAddClick:()=>p?.(I.id)},I.id))})}),m.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"})}),E&&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..."})}),S&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx("p",{className:"text-red-600 dark:text-red-400",children:S})})]})]})})]})]}),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:t})}),e.jsxs("div",{className:"flex items-start py-2.5 z-10",children:[e.jsxs("button",{className:`
|
|
1481
|
+
flex-1
|
|
1482
|
+
flex
|
|
1483
|
+
flex-col
|
|
1484
|
+
items-center
|
|
1485
|
+
p-2
|
|
1486
|
+
rounded-lg
|
|
1487
|
+
transition-colors
|
|
1488
|
+
duration-150
|
|
1489
|
+
${g==="products"?"relative":""}
|
|
1490
|
+
`,onClick:()=>h?.("products"),children:[e.jsx("span",{className:`
|
|
1491
|
+
text-sm
|
|
1492
|
+
font-bold
|
|
1493
|
+
leading-5
|
|
1494
|
+
${g==="products"?"text-primary-custom-600 dark:text-primary-custom-600":"text-content-primary dark:text-dark-content-primary"}
|
|
1495
|
+
`,children:"Productos"}),g==="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:`
|
|
1496
|
+
flex-1
|
|
1497
|
+
flex
|
|
1498
|
+
flex-col
|
|
1499
|
+
items-center
|
|
1500
|
+
p-2
|
|
1501
|
+
rounded-lg
|
|
1502
|
+
transition-colors
|
|
1503
|
+
duration-150
|
|
1504
|
+
${g==="client"?"relative":""}
|
|
1505
|
+
`,onClick:()=>h?.("client"),children:[e.jsx("span",{className:`
|
|
1506
|
+
text-sm
|
|
1507
|
+
font-bold
|
|
1508
|
+
leading-5
|
|
1509
|
+
${g==="client"?"text-primary-custom-600 dark:text-primary-custom-600":"text-content-primary dark:text-dark-content-primary"}
|
|
1510
|
+
`,children:"Cliente"}),g==="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:`
|
|
1511
|
+
flex-1
|
|
1512
|
+
flex
|
|
1513
|
+
flex-col
|
|
1514
|
+
gap-2
|
|
1515
|
+
p-4
|
|
1516
|
+
bg-white
|
|
1517
|
+
dark:bg-dark-bg-primary
|
|
1518
|
+
rounded-bl-lg
|
|
1519
|
+
rounded-br-lg
|
|
1520
|
+
overflow-x-hidden
|
|
1521
|
+
overflow-y-auto
|
|
1522
|
+
z-10
|
|
1523
|
+
`,children:[x.map((I,W)=>e.jsxs(b.Fragment,{children:[e.jsx(fr,{categoryLabel:I.categoryLabel,categoryColor:I.categoryColor,productRef:I.productRef,price:I.price,productName:I.productName,descriptionItems:I.descriptionItems,showDescription:!!I.descriptionItems&&I.descriptionItems.length>0,quantity:I.quantity,onQuantityChange:R=>v?.(I.productId,R),onDelete:()=>w?.(I.productId)}),W<x.length-1&&e.jsx(Ie,{})]},I.productId)),x.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:j})]}),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:C})]}),e.jsx(Ie,{}),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(Q,{type:"default",leftIcon:e.jsx(Rc,{className:"w-4 h-4"}),onClick:A,fullWidth:!0,disabled:x.length===0||E,children:N})})]})]})})]})})]});cs.displayName="ProductsView";const Ec=({className:t="w-4 h-4"})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,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"})]}),Ic=({onSubmit:t,onBackToLogin:n,isLoading:s=!1,errorMessage:r,successMessage:o,className:a="",showBackground:i=!0,variant:l="responsive"})=>{const[c,u]=b.useState(""),[d,f]=b.useState(""),m=g=>{if(g.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){f("Por favor ingresa un email válido");return}f(""),t?.(c)},p=g=>{u(g.target.value),d&&f("")};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",a].join(" "),children:[i&&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",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="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."})]}),r&&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:r}),o&&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:o}),e.jsxs("form",{onSubmit:m,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(Ec,{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:c,onChange:p,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-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",d?"border-error-border!":""].filter(Boolean).join(" ")})]}),d&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:d})]}),e.jsx("button",{type:"submit",disabled:s||!c,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?"Enviando...":"Reestablecer Contraseña"})]}),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]","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"})]})]})},Ac=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,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"})}),Mc=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,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"})]}),Lc=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,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"})}),$c=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,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"})]}),Oc=({onSubmit:t,onSignIn:n,onTermsClick:s,onPrivacyClick:r,isLoading:o=!1,errorMessage:a,className:i="",showBackground:l=!0,variant:c="responsive"})=>{const[u,d]=b.useState(""),[f,m]=b.useState(""),[p,g]=b.useState(""),[h,x]=b.useState(!1),[v,w]=b.useState(""),j=N=>{if(N.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f)){w("Por favor ingresa un email válido");return}w(""),t?.(u,f,p)},C=N=>{m(N.target.value),v&&w("")},k=()=>{x(!h)};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",i].join(" "),children:[l&&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",...c==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:c==="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."})]}),a&&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:a}),e.jsxs("form",{onSubmit:j,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(Ac,{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:u,onChange:N=>d(N.target.value),disabled:o,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(Mc,{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:f,onChange:C,disabled:o,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",v?"border-error-border!":""].filter(Boolean).join(" ")})]}),v&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:v})]}),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(Lc,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:h?"text":"password",placeholder:"••••••••",value:p,onChange:N=>g(N.target.value),disabled:o,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":h?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx($c,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:o||!u||!f||!p,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:o?"Registrando...":"Registrarse"})]}),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:"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:s,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:r,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"}),"."]})})]})]})},Bc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),Tc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),zc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),Dc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),_c=({className:t=""})=>e.jsx("svg",{className:t,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"})}),Pc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),Vc=({className:t=""})=>e.jsx("svg",{className:t,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"})}),Fc=({locations:t=[],activeLocationId:n,tables:s=[],tablesTitle:r="Mesas de Antejardín",showPeopleCountPanel:o=!1,selectedTable:a,onLocationSelect:i,onTableSelect:l,onCreateTables:c,onMergeTables:u,onSplitTables:d,onPeopleCountSelect:f,onAssignTable:m,onTransferTable:p,onSetCutlery:g,onClosePeoplePanel:h,onTableSwitchChange:x,isLoading:v=!1,errorMessage:w,tableLayout:j="grid",className:C="",userInfo:k})=>{const N=()=>e.jsx("div",{className:"w-full shrink-0",children:e.jsx(st,{variant:"desktop",productName:"",userDropdown:k?{avatar:k.avatar,name:k.name,email:k.role,onMenuClick:()=>{}}:void 0})}),A=()=>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:v?e.jsx("div",{className:"text-content-secondary dark:text-content-secondary text-sm",children:"Cargando salones..."}):t.length===0?e.jsx("div",{className:"text-content-secondary dark:text-content-secondary text-sm",children:"No hay salones disponibles"}):t.map(y=>e.jsx(Rn,{locationName:y.name,status:y.status,state:y.id===n?"actived":"enabled",capacity:y.capacity,onClick:()=>i?.(y.id)},y.id))})]}),E=()=>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:r}),e.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.jsx(Q,{type:"default",size:"sm",leftIcon:e.jsx(Bc,{}),onClick:c,children:"Crear Mesas"}),e.jsx(Q,{type:"default",size:"sm",leftIcon:e.jsx(Tc,{}),onClick:u,children:"Unir Mesas"}),e.jsx(Q,{type:"default",size:"sm",leftIcon:e.jsx(zc,{}),onClick:d,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:v?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}):s.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"}):j==="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:s.map(y=>e.jsx(er,{tableNumber:y.tableNumber,status:y.status,shape:y.shape,chairs:y.chairs,isActive:y.isActive,onClick:()=>l?.(y.tableNumber)},y.tableNumber))})}):e.jsx("div",{className:"relative w-full h-full min-h-[400px]",children:s.map(y=>e.jsx("div",{className:"absolute",style:y.position?{left:`${y.position.x}%`,top:`${y.position.y}%`,transform:"translate(-50%, -50%)"}:void 0,children:e.jsx(er,{tableNumber:y.tableNumber,status:y.status,shape:y.shape,chairs:y.chairs,isActive:y.isActive,onClick:()=>l?.(y.tableNumber)})},y.tableNumber))})}),e.jsxs("div",{className:"flex flex-wrap gap-4 items-center w-full",children:[e.jsx(Je,{status:"available"}),e.jsx(Je,{status:"occupied"}),e.jsx(Je,{status:"reserved"}),e.jsx(Je,{status:"outOfService"})]})]}),S=()=>o?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(lr,{label:a?.locationName||"Ubicación",description:a?.tableName||"Mesa",labelPosition:"trailing",checked:!1,onChange:y=>x?.(y.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:h,"aria-label":"Cerrar panel",children:e.jsx(Vc,{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(y=>e.jsx(En,{size:"l",border:!0,onClick:()=>f?.(y),children:y},y))})]}),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(Q,{type:"default",size:"sm",fullWidth:!0,leftIcon:e.jsx(Dc,{}),onClick:m,children:"Asignar"}),e.jsxs("div",{className:"flex gap-2 w-full",children:[e.jsx(Q,{type:"outline",size:"sm",fullWidth:!0,leftIcon:e.jsx(_c,{}),onClick:p,children:"Transferir"}),e.jsx(Q,{type:"outline",size:"sm",fullWidth:!0,leftIcon:e.jsx(Pc,{}),onClick:g,children:"Cubiertos"})]})]})]}):null;return e.jsxs("div",{className:["flex","flex-col","w-full","min-h-screen","bg-background-secondary","dark:bg-dark-bg-primary",C].join(" "),children:[N(),e.jsxs("div",{className:"flex flex-1 w-full overflow-hidden",children:[A(),E(),S()]})]})},ds=b.createContext(void 0),Zc=({children:t,defaultTheme:n="light"})=>{const[s,r]=b.useState(()=>typeof window<"u"&&localStorage.getItem("siesa-ui-theme")||n);b.useEffect(()=>{const i=window.document.documentElement;s==="dark"?i.classList.add("dark"):i.classList.remove("dark"),localStorage.setItem("siesa-ui-theme",s)},[s]);const o=()=>{r(i=>i==="light"?"dark":"light")},a=i=>{r(i)};return e.jsx(ds.Provider,{value:{theme:s,toggleTheme:o,setTheme:a},children:t})},Hc=()=>{const t=b.useContext(ds);if(t===void 0)throw new Error("useTheme debe ser usado dentro de un ThemeProvider");return t};exports.Alert=jn;exports.Avatar=yn;exports.Badge=$e;exports.Button=Q;exports.Checkbox=vn;exports.DescriptionList=wn;exports.Divider=Ie;exports.Dropdown=Qe;exports.DropdownItemCollapsible=wt;exports.DropdownItemHeading=dr;exports.Input=nt;exports.LayoutBase=dc;exports.ListView=yc;exports.LoginView=zo;exports.LoginViewPage=Cc;exports.LookupField=ls;exports.Navbar=st;exports.NavigationBar=Co;exports.NavigationRail=so;exports.NavigationRailGroup=Et;exports.NavigationRailItem=yt;exports.NavigationRailPanel=Nn;exports.NavigationRailTypes=ur;exports.Notification=Hs;exports.POSConvention=Je;exports.POSLocationButton=Rn;exports.POSNumberButton=En;exports.POSProductButton=In;exports.POSProductCard=An;exports.POSProductSidebarItems=fr;exports.POSTable=er;exports.Pagination=Gs;exports.ProductsView=cs;exports.Quantity=cr;exports.Radio=kn;exports.RecoverPasswordView=Ic;exports.Select=ro;exports.SignUpView=Fo;exports.SignUpViewPage=Oc;exports.Switch=lr;exports.Table=Sn;exports.TableLayoutView=Fc;exports.Tabs=yo;exports.Textarea=bn;exports.ThemeProvider=Zc;exports.buildExpressiveFilter=Un;exports.createFetcher=cc;exports.mergeFilters=Wa;exports.normalizeFilters=rr;exports.useTheme=Hc;
|
|
1273
1524
|
//# sourceMappingURL=siesa-ui-kit.cjs.map
|