tekivex-ui 2.5.5 → 2.5.7

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/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **The React component library that refuses to compromise.**
6
6
 
7
- WCAG 2.1 AAA · WAI-ARIA 1.2 · Zero-Trust Security · 27 Locales · Built-in Charts · Headless Primitives
7
+ WCAG 2.1 AAA · WAI-ARIA 1.2 · Zero-Trust Security · 6 Locales + RTL · 70 Components · Zero Dependencies
8
8
 
9
9
  [![npm version](https://img.shields.io/npm/v/tekivex-ui?color=00f5d4&label=tekivex-ui&logo=npm)](https://www.npmjs.com/package/tekivex-ui)
10
10
  [![npm downloads](https://img.shields.io/npm/dw/tekivex-ui?color=00f5d4)](https://www.npmjs.com/package/tekivex-ui)
@@ -12,7 +12,7 @@ WCAG 2.1 AAA · WAI-ARIA 1.2 · Zero-Trust Security · 27 Locales · Built-in Ch
12
12
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.6-3178c6.svg?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
13
13
  [![React](https://img.shields.io/badge/React-18+-61dafb.svg?logo=react&logoColor=white)](https://react.dev/)
14
14
  [![WCAG 2.1 AAA](https://img.shields.io/badge/WCAG-2.1%20AAA-00c853.svg)](https://www.w3.org/TR/WCAG21/)
15
- [![Tests](https://img.shields.io/badge/Tests-436%20passing-00c853.svg)](#testing)
15
+ [![Tests](https://img.shields.io/badge/Tests-240%2B%20passing-00c853.svg)](#testing)
16
16
 
17
17
  <br/>
18
18
 
@@ -34,9 +34,9 @@ npm install tekivex-ui
34
34
  | Auto XSS sanitisation on every prop | ✅ | ❌ | ❌ | ❌ | ❌ |
35
35
  | Immutable security audit trail | ✅ | ❌ | ❌ | ❌ | ❌ |
36
36
  | Full-featured DataGrid — **free** | ✅ | 💰 Pro | Partial | Partial | ❌ |
37
- | Built-in charts (7 types) | ✅ | | ✅ | | |
38
- | Headless hook layer | ✅ | ❌ | ❌ | ✅ | ✅ |
39
- | i18n — 27 locales incl. RTL | ✅ | ✅ | ✅ | Partial | ❌ |
37
+ | 70 production components **free** | ✅ | | ✅ | | 30 |
38
+ | Hooks layer (a11y, theme, i18n) | ✅ | ❌ | ❌ | ✅ | ✅ |
39
+ | i18n — 6 locales incl. RTL | ✅ | ✅ | ✅ | Partial | ❌ |
40
40
  | Plugin-extensible CSS engine | ✅ | ❌ | ❌ | ❌ | ❌ |
41
41
  | Zero extra dependencies | ✅ | ❌ | ❌ | ❌ | ✅ |
42
42
 
@@ -1,4 +1,4 @@
1
- "use strict";const n=require("react"),C=require("./index-BINBzXuY.cjs"),l=require("react/jsx-runtime"),$=require("./security-C369oOWH.cjs"),d=require("./tkx-BeNyC0w7.cjs");function G(){const[e,r]=n.useState(()=>typeof window>"u"?!1:C.prefersReducedMotion());return n.useEffect(()=>{if(typeof window>"u")return;const t=window.matchMedia("(prefers-reduced-motion: reduce)"),o=i=>r(i.matches);return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[]),e}function J(){const[e,r]=n.useState(()=>typeof window>"u"?!1:C.prefersHighContrast());return n.useEffect(()=>{if(typeof window>"u")return;const t=window.matchMedia("(forced-colors: active)"),o=i=>r(i.matches);return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[]),e}function Q(e){const r=n.useRef(null);return n.useEffect(()=>{if(!e||!r.current)return;const t=C.createFocusTrap(r.current);return t.activate(),()=>t.deactivate()},[e]),r}function U(){const e=n.useRef(null);return n.useEffect(()=>{if(!(typeof document>"u"))return e.current=C.createAnnouncer(),()=>{var r;(r=e.current)==null||r.destroy()}},[]),n.useCallback((r,t="polite")=>{var o;(o=e.current)==null||o.announce(r,t)},[])}function V(e,r=!0){const t=n.useRef(e);t.current=e,n.useEffect(()=>{if(!r||typeof document>"u")return;const o=i=>{i.key==="Escape"&&t.current()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[r])}function X(e,r){const t=n.useRef(r);t.current=r,n.useEffect(()=>{const o=i=>{!e.current||e.current.contains(i.target)||t.current()};return document.addEventListener("pointerdown",o),()=>document.removeEventListener("pointerdown",o)},[e])}const B=n.createContext(null);function Z(){const e=n.useContext(B);if(!e)throw new Error("TkxFormField must be used inside a <TkxForm>. Wrap your fields in a TkxForm component.");return e}async function K(e,r){for(const t of r){if(t.required&&(e==null||e===""||Array.isArray(e)&&e.length===0))return t.message??"This field is required";if(!(e==null||e==="")){if(t.min!==void 0){if(typeof e=="string"&&e.length<t.min)return t.message??`Must be at least ${t.min} characters`;if(typeof e=="number"&&e<t.min)return t.message??`Must be at least ${t.min}`}if(t.max!==void 0){if(typeof e=="string"&&e.length>t.max)return t.message??`Must be no more than ${t.max} characters`;if(typeof e=="number"&&e>t.max)return t.message??`Must be no more than ${t.max}`}if(t.pattern&&typeof e=="string"&&!t.pattern.test(e))return t.message??"Invalid format";if(t.validator){const o=await t.validator(e);if(o)return o}}}return null}function ee(e,r){const t=e?[...e]:[];return r&&!t.some(o=>o.required)&&t.unshift({required:!0,message:"This field is required"}),t}function te(e){return e.some(r=>r.required)}function re(){const e=n.useContext(B),r=n.useRef({}),t=n.useRef({}),o=n.useRef({}),i=n.useMemo(()=>({getFieldValue:a=>r.current[a],setFieldValue:(a,v)=>{r.current[a]=v},getFieldsValue:()=>({...r.current}),setFieldsValue:a=>{Object.assign(r.current,a)},validateFields:()=>Promise.resolve({...r.current}),validateField:a=>Promise.resolve(!0),resetFields:()=>{r.current={},t.current={},o.current={}},getFieldError:a=>t.current[a]??null,isFieldTouched:a=>o.current[a]??!1}),[]);return e?e.instance:i}function D({onSubmit:e,onValuesChange:r,initialValues:t={},layout:o="vertical",disabled:i=!1,children:a,className:v,style:M,form:b}){const x=C.useTheme(),[y,p]=n.useState({values:{...t},errors:{},touched:{}}),z=n.useRef(t),h=n.useRef({}),F=n.useRef(y);F.current=y;const T=n.useCallback((s,c)=>{h.current[s]=c},[]),q=n.useCallback(s=>{delete h.current[s]},[]),j=n.useCallback((s,c)=>{p(u=>{const f={...u,values:{...u.values,[s]:c}};return r==null||r({[s]:c},f.values),f})},[r]),N=n.useCallback((s,c)=>{p(u=>({...u,errors:{...u.errors,[s]:c}}))},[]),R=n.useCallback(s=>{p(c=>({...c,touched:{...c.touched,[s]:!0}}))},[]),w=n.useCallback(async s=>{const c=h.current[s];if(!c)return!0;const u=F.current.values[s],f=await K(u,c.rules);return p(g=>({...g,errors:{...g.errors,[s]:f},touched:{...g.touched,[s]:!0}})),f===null},[]),E=n.useCallback(async()=>{const s=Object.keys(h.current),c=await Promise.all(s.map(async m=>{const k=h.current[m],W=F.current.values[m],_=await K(W,k.rules);return{name:m,error:_}})),u={},f={};let g=!1;for(const{name:m,error:k}of c)u[m]=k,f[m]=!0,k&&(g=!0);if(p(m=>({...m,errors:{...m.errors,...u},touched:{...m.touched,...f}})),g){const m=Object.fromEntries(c.filter(k=>k.error).map(k=>[k.name,k.error]));return Promise.reject(m)}return{...F.current.values}},[]),I=n.useCallback(()=>{p({values:{...z.current},errors:{},touched:{}})},[]),S=n.useMemo(()=>({getFieldValue:s=>F.current.values[s],setFieldValue:j,getFieldsValue:()=>({...F.current.values}),setFieldsValue:s=>{p(c=>{const u={...c.values,...s};return r==null||r(s,u),{...c,values:u}})},validateFields:E,validateField:w,resetFields:I,getFieldError:s=>F.current.errors[s]??null,isFieldTouched:s=>!!F.current.touched[s]}),[j,E,w,I,r]),L=n.useCallback(async s=>{s.preventDefault();try{const c=await E();await(e==null?void 0:e(c))}catch{}},[E,e]),A=o==="inline"?d.tkx("flex flex-row flex-wrap items-end gap-4"):d.tkx("flex flex-col gap-5"),H=b??S,P=n.useMemo(()=>({state:y,initialValues:z.current,layout:o,disabled:i,fieldMeta:h,setFieldValue:j,setFieldError:N,setFieldTouched:R,registerField:T,unregisterField:q,validateField:w,instance:H}),[y,o,i,j,N,R,T,q,w,H]);return l.jsx(B.Provider,{value:P,children:l.jsx("form",{noValidate:!0,role:"form","aria-label":"Form",onSubmit:L,className:d.cx(A,v),style:{color:x.text,...M},children:a})})}D.displayName="TkxForm";function O({name:e,label:r,rules:t,help:o,required:i,children:a,className:v,style:M}){const b=C.useTheme(),x=Z(),{state:y,layout:p,disabled:z}=x,h=n.useMemo(()=>ee(t,i),[t,i]),F=te(h),T=n.useRef({rules:h});T.current.rules=h;const q=n.useRef(!1);q.current||(x.registerField(e,T.current),q.current=!0),n.useMemo(()=>{x.registerField(e,T.current)},[h,e,x]);const j=y.values[e],N=y.touched[e]?y.errors[e]??null:null,R=N?$.sanitizeString(N):null,w=r?$.sanitizeString(r):void 0,E=o?$.sanitizeString(o):void 0,I=n.useCallback(u=>{let f;if(u!==null&&typeof u=="object"&&"target"in u){const g=u.target;f=g.type==="checkbox"?g.checked:g.value}else f=u;x.setFieldValue(e,f)},[x,e]),S=n.useCallback(()=>{x.setFieldTouched(e),x.validateField(e)},[x,e]),L=n.cloneElement(a,{value:j??"",onChange:I,onBlur:S,error:R??void 0,isInvalid:!!R,isRequired:F,disabled:z||a.props.disabled,name:e}),A=p==="horizontal",H=p==="inline",P=l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:l.jsx("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),s=w?l.jsxs("label",{className:d.tkx("text-sm font-medium font-sans",A?"min-w-[140px] pt-2.5":""),style:{color:b.text},children:[w,F&&l.jsx("span",{"aria-hidden":"true",className:d.tkx("ml-1"),style:{color:b.danger},children:"*"})]}):null,c=l.jsxs(l.Fragment,{children:[E&&!R&&l.jsx("span",{className:d.tkx("text-xs mt-0.5"),style:{color:b.textMuted},children:E}),R&&l.jsxs("span",{role:"alert",className:d.tkx("text-xs flex items-center gap-1 mt-0.5"),style:{color:b.danger,animation:"tkxFormErrorReveal 200ms ease-out"},children:[P,R]})]});return H?l.jsxs("div",{className:d.cx(d.tkx("flex flex-col gap-1"),v),style:M,children:[s,L,c]}):A?l.jsxs("div",{className:d.cx(d.tkx("flex flex-row gap-4 items-start"),v),style:M,children:[s,l.jsxs("div",{className:d.tkx("flex flex-col gap-1 flex-1 min-w-0"),children:[L,c]})]}):l.jsxs("div",{className:d.cx(d.tkx("flex flex-col gap-1"),v),style:M,children:[s,L,c]})}O.displayName="TkxFormField";let Y=!1;function ne(){if(Y||typeof document>"u")return;Y=!0;const e=document.createElement("style");e.setAttribute("data-tkx-form",""),e.textContent=`
1
+ "use strict";const n=require("react"),C=require("./index-DB_m7X7e.cjs"),l=require("react/jsx-runtime"),$=require("./security-DMqZVW5d.cjs"),d=require("./tkx-69KQ0myA.cjs");function G(){const[e,r]=n.useState(()=>typeof window>"u"?!1:C.prefersReducedMotion());return n.useEffect(()=>{if(typeof window>"u")return;const t=window.matchMedia("(prefers-reduced-motion: reduce)"),o=i=>r(i.matches);return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[]),e}function J(){const[e,r]=n.useState(()=>typeof window>"u"?!1:C.prefersHighContrast());return n.useEffect(()=>{if(typeof window>"u")return;const t=window.matchMedia("(forced-colors: active)"),o=i=>r(i.matches);return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[]),e}function Q(e){const r=n.useRef(null);return n.useEffect(()=>{if(!e||!r.current)return;const t=C.createFocusTrap(r.current);return t.activate(),()=>t.deactivate()},[e]),r}function U(){const e=n.useRef(null);return n.useEffect(()=>{if(!(typeof document>"u"))return e.current=C.createAnnouncer(),()=>{var r;(r=e.current)==null||r.destroy()}},[]),n.useCallback((r,t="polite")=>{var o;(o=e.current)==null||o.announce(r,t)},[])}function V(e,r=!0){const t=n.useRef(e);t.current=e,n.useEffect(()=>{if(!r||typeof document>"u")return;const o=i=>{i.key==="Escape"&&t.current()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[r])}function X(e,r){const t=n.useRef(r);t.current=r,n.useEffect(()=>{const o=i=>{!e.current||e.current.contains(i.target)||t.current()};return document.addEventListener("pointerdown",o),()=>document.removeEventListener("pointerdown",o)},[e])}const B=n.createContext(null);function Z(){const e=n.useContext(B);if(!e)throw new Error("TkxFormField must be used inside a <TkxForm>. Wrap your fields in a TkxForm component.");return e}async function K(e,r){for(const t of r){if(t.required&&(e==null||e===""||Array.isArray(e)&&e.length===0))return t.message??"This field is required";if(!(e==null||e==="")){if(t.min!==void 0){if(typeof e=="string"&&e.length<t.min)return t.message??`Must be at least ${t.min} characters`;if(typeof e=="number"&&e<t.min)return t.message??`Must be at least ${t.min}`}if(t.max!==void 0){if(typeof e=="string"&&e.length>t.max)return t.message??`Must be no more than ${t.max} characters`;if(typeof e=="number"&&e>t.max)return t.message??`Must be no more than ${t.max}`}if(t.pattern&&typeof e=="string"&&!t.pattern.test(e))return t.message??"Invalid format";if(t.validator){const o=await t.validator(e);if(o)return o}}}return null}function ee(e,r){const t=e?[...e]:[];return r&&!t.some(o=>o.required)&&t.unshift({required:!0,message:"This field is required"}),t}function te(e){return e.some(r=>r.required)}function re(){const e=n.useContext(B),r=n.useRef({}),t=n.useRef({}),o=n.useRef({}),i=n.useMemo(()=>({getFieldValue:a=>r.current[a],setFieldValue:(a,v)=>{r.current[a]=v},getFieldsValue:()=>({...r.current}),setFieldsValue:a=>{Object.assign(r.current,a)},validateFields:()=>Promise.resolve({...r.current}),validateField:a=>Promise.resolve(!0),resetFields:()=>{r.current={},t.current={},o.current={}},getFieldError:a=>t.current[a]??null,isFieldTouched:a=>o.current[a]??!1}),[]);return e?e.instance:i}function D({onSubmit:e,onValuesChange:r,initialValues:t={},layout:o="vertical",disabled:i=!1,children:a,className:v,style:M,form:b}){const x=C.useTheme(),[y,p]=n.useState({values:{...t},errors:{},touched:{}}),z=n.useRef(t),h=n.useRef({}),F=n.useRef(y);F.current=y;const T=n.useCallback((s,c)=>{h.current[s]=c},[]),q=n.useCallback(s=>{delete h.current[s]},[]),j=n.useCallback((s,c)=>{p(u=>{const f={...u,values:{...u.values,[s]:c}};return r==null||r({[s]:c},f.values),f})},[r]),N=n.useCallback((s,c)=>{p(u=>({...u,errors:{...u.errors,[s]:c}}))},[]),R=n.useCallback(s=>{p(c=>({...c,touched:{...c.touched,[s]:!0}}))},[]),w=n.useCallback(async s=>{const c=h.current[s];if(!c)return!0;const u=F.current.values[s],f=await K(u,c.rules);return p(g=>({...g,errors:{...g.errors,[s]:f},touched:{...g.touched,[s]:!0}})),f===null},[]),E=n.useCallback(async()=>{const s=Object.keys(h.current),c=await Promise.all(s.map(async m=>{const k=h.current[m],W=F.current.values[m],_=await K(W,k.rules);return{name:m,error:_}})),u={},f={};let g=!1;for(const{name:m,error:k}of c)u[m]=k,f[m]=!0,k&&(g=!0);if(p(m=>({...m,errors:{...m.errors,...u},touched:{...m.touched,...f}})),g){const m=Object.fromEntries(c.filter(k=>k.error).map(k=>[k.name,k.error]));return Promise.reject(m)}return{...F.current.values}},[]),I=n.useCallback(()=>{p({values:{...z.current},errors:{},touched:{}})},[]),S=n.useMemo(()=>({getFieldValue:s=>F.current.values[s],setFieldValue:j,getFieldsValue:()=>({...F.current.values}),setFieldsValue:s=>{p(c=>{const u={...c.values,...s};return r==null||r(s,u),{...c,values:u}})},validateFields:E,validateField:w,resetFields:I,getFieldError:s=>F.current.errors[s]??null,isFieldTouched:s=>!!F.current.touched[s]}),[j,E,w,I,r]),L=n.useCallback(async s=>{s.preventDefault();try{const c=await E();await(e==null?void 0:e(c))}catch{}},[E,e]),A=o==="inline"?d.tkx("flex flex-row flex-wrap items-end gap-4"):d.tkx("flex flex-col gap-5"),H=b??S,P=n.useMemo(()=>({state:y,initialValues:z.current,layout:o,disabled:i,fieldMeta:h,setFieldValue:j,setFieldError:N,setFieldTouched:R,registerField:T,unregisterField:q,validateField:w,instance:H}),[y,o,i,j,N,R,T,q,w,H]);return l.jsx(B.Provider,{value:P,children:l.jsx("form",{noValidate:!0,role:"form","aria-label":"Form",onSubmit:L,className:d.cx(A,v),style:{color:x.text,...M},children:a})})}D.displayName="TkxForm";function O({name:e,label:r,rules:t,help:o,required:i,children:a,className:v,style:M}){const b=C.useTheme(),x=Z(),{state:y,layout:p,disabled:z}=x,h=n.useMemo(()=>ee(t,i),[t,i]),F=te(h),T=n.useRef({rules:h});T.current.rules=h;const q=n.useRef(!1);q.current||(x.registerField(e,T.current),q.current=!0),n.useMemo(()=>{x.registerField(e,T.current)},[h,e,x]);const j=y.values[e],N=y.touched[e]?y.errors[e]??null:null,R=N?$.sanitizeString(N):null,w=r?$.sanitizeString(r):void 0,E=o?$.sanitizeString(o):void 0,I=n.useCallback(u=>{let f;if(u!==null&&typeof u=="object"&&"target"in u){const g=u.target;f=g.type==="checkbox"?g.checked:g.value}else f=u;x.setFieldValue(e,f)},[x,e]),S=n.useCallback(()=>{x.setFieldTouched(e),x.validateField(e)},[x,e]),L=n.cloneElement(a,{value:j??"",onChange:I,onBlur:S,error:R??void 0,isInvalid:!!R,isRequired:F,disabled:z||a.props.disabled,name:e}),A=p==="horizontal",H=p==="inline",P=l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:l.jsx("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),s=w?l.jsxs("label",{className:d.tkx("text-sm font-medium font-sans",A?"min-w-[140px] pt-2.5":""),style:{color:b.text},children:[w,F&&l.jsx("span",{"aria-hidden":"true",className:d.tkx("ml-1"),style:{color:b.danger},children:"*"})]}):null,c=l.jsxs(l.Fragment,{children:[E&&!R&&l.jsx("span",{className:d.tkx("text-xs mt-0.5"),style:{color:b.textMuted},children:E}),R&&l.jsxs("span",{role:"alert",className:d.tkx("text-xs flex items-center gap-1 mt-0.5"),style:{color:b.danger,animation:"tkxFormErrorReveal 200ms ease-out"},children:[P,R]})]});return H?l.jsxs("div",{className:d.cx(d.tkx("flex flex-col gap-1"),v),style:M,children:[s,L,c]}):A?l.jsxs("div",{className:d.cx(d.tkx("flex flex-row gap-4 items-start"),v),style:M,children:[s,l.jsxs("div",{className:d.tkx("flex flex-col gap-1 flex-1 min-w-0"),children:[L,c]})]}):l.jsxs("div",{className:d.cx(d.tkx("flex flex-col gap-1"),v),style:M,children:[s,L,c]})}O.displayName="TkxFormField";let Y=!1;function ne(){if(Y||typeof document>"u")return;Y=!0;const e=document.createElement("style");e.setAttribute("data-tkx-form",""),e.textContent=`
2
2
  @keyframes tkxFormErrorReveal {
3
3
  from {
4
4
  opacity: 0;
@@ -1,8 +1,8 @@
1
1
  import { useRef as f, useEffect as j, useCallback as d, useState as K, useMemo as A, cloneElement as X, useContext as O, createContext as Z } from "react";
2
- import { G as ee, i as te, w as re, x as ne, u as Q } from "./index-eT_U4qB2.js";
2
+ import { G as ee, i as te, w as re, x as ne, u as Q } from "./index-CAXjeKoK.js";
3
3
  import { jsx as N, jsxs as T, Fragment as se } from "react/jsx-runtime";
4
- import { s as G } from "./security-CzAmaMqa.js";
5
- import { t as g, c as S } from "./tkx-BJ10JtMv.js";
4
+ import { s as G } from "./security-loRa1HyV.js";
5
+ import { t as g, c as S } from "./tkx-C_AlpMt4.js";
6
6
  function pe() {
7
7
  const [e, r] = K(() => typeof window > "u" ? !1 : ne());
8
8
  return j(() => {
package/dist/charts.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("recharts"),g=require("./index-BINBzXuY.cjs"),L=require("react");function C(i){return[i.primary,i.secondary,i.info,i.success,i.warning,i.danger,"#a855f7","#f97316","#14b8a6","#e879f9"]}const A={top:10,right:30,bottom:10,left:0};function T(i){return{contentStyle:{backgroundColor:i.surface,border:`1px solid ${i.border}`,borderRadius:8,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",color:i.text,fontSize:13},labelStyle:{color:i.textMuted,fontWeight:600,marginBottom:4},itemStyle:{color:i.text},cursor:{fill:`${i.primary}15`}}}function z({data:i,series:m,xKey:y,height:S=300,margin:d=A,showGrid:h=!0,showLegend:f=!0,showTooltip:p=!0,smooth:l=!0,xTickFormatter:u,yTickFormatter:o,yDomain:n,ariaLabel:x="Area chart"}){const r=g.useTheme(),c=C(r),a=T(r),j={fill:r.textMuted,fontSize:12};return e.jsx("div",{role:"img","aria-label":x,style:{width:"100%",height:S},children:e.jsx(t.ResponsiveContainer,{width:"100%",height:"100%",children:e.jsxs(t.AreaChart,{data:i,margin:d,children:[h&&e.jsx(t.CartesianGrid,{strokeDasharray:"3 3",stroke:r.border,vertical:!1}),e.jsx(t.XAxis,{dataKey:y,tick:j,axisLine:{stroke:r.border},tickLine:!1,tickFormatter:u}),e.jsx(t.YAxis,{tick:j,axisLine:!1,tickLine:!1,tickFormatter:o,domain:n}),p&&e.jsx(t.Tooltip,{contentStyle:a.contentStyle,labelStyle:a.labelStyle,itemStyle:a.itemStyle,cursor:a.cursor}),f&&e.jsx(t.Legend,{wrapperStyle:{fontSize:13,color:r.textMuted,paddingTop:8}}),m.map((k,b)=>{const s=k.color??c[b%c.length];return e.jsx(t.Area,{type:l?"monotone":"linear",dataKey:k.key,name:k.label??k.key,stroke:s,strokeWidth:2,fill:s,fillOpacity:k.fillOpacity??.2,stackId:k.stacked?"stack":void 0,dot:!1,activeDot:{r:5,strokeWidth:0}},k.key)})]})})})}function M({data:i,series:m,xKey:y,height:S=300,margin:d=A,showGrid:h=!0,showLegend:f=!0,showTooltip:p=!0,layout:l="horizontal",barSize:u,xTickFormatter:o,yTickFormatter:n,ariaLabel:x="Bar chart"}){const r=g.useTheme(),c=C(r),a=T(r),j={fill:r.textMuted,fontSize:12},k=l==="vertical";return e.jsx("div",{role:"img","aria-label":x,style:{width:"100%",height:S},children:e.jsx(t.ResponsiveContainer,{width:"100%",height:"100%",children:e.jsxs(t.BarChart,{data:i,margin:d,layout:l,children:[h&&e.jsx(t.CartesianGrid,{strokeDasharray:"3 3",stroke:r.border,vertical:k,horizontal:!k}),k?e.jsxs(e.Fragment,{children:[e.jsx(t.YAxis,{dataKey:y,type:"category",tick:j,axisLine:!1,tickLine:!1,tickFormatter:o,width:100}),e.jsx(t.XAxis,{type:"number",tick:j,axisLine:{stroke:r.border},tickLine:!1,tickFormatter:n})]}):e.jsxs(e.Fragment,{children:[e.jsx(t.XAxis,{dataKey:y,tick:j,axisLine:{stroke:r.border},tickLine:!1,tickFormatter:o}),e.jsx(t.YAxis,{tick:j,axisLine:!1,tickLine:!1,tickFormatter:n})]}),p&&e.jsx(t.Tooltip,{contentStyle:a.contentStyle,labelStyle:a.labelStyle,itemStyle:a.itemStyle,cursor:{fill:`${r.surfaceAlt}`}}),f&&e.jsx(t.Legend,{wrapperStyle:{fontSize:13,color:r.textMuted,paddingTop:8}}),m.map((b,s)=>{const v=b.color??c[s%c.length];return e.jsx(t.Bar,{dataKey:b.key,name:b.label??b.key,fill:v,stackId:b.stackId,maxBarSize:u??40,radius:b.radius??[4,4,0,0]},b.key)})]})})})}function R({data:i,series:m,xKey:y,height:S=300,margin:d=A,showGrid:h=!0,showLegend:f=!0,showTooltip:p=!0,smooth:l=!0,referenceLines:u=[],xTickFormatter:o,yTickFormatter:n,yDomain:x,connectNulls:r=!1,ariaLabel:c="Line chart"}){const a=g.useTheme(),j=C(a),k=T(a),b={fill:a.textMuted,fontSize:12};return e.jsx("div",{role:"img","aria-label":c,style:{width:"100%",height:S},children:e.jsx(t.ResponsiveContainer,{width:"100%",height:"100%",children:e.jsxs(t.LineChart,{data:i,margin:d,children:[h&&e.jsx(t.CartesianGrid,{strokeDasharray:"3 3",stroke:a.border,vertical:!1}),e.jsx(t.XAxis,{dataKey:y,tick:b,axisLine:{stroke:a.border},tickLine:!1,tickFormatter:o}),e.jsx(t.YAxis,{tick:b,axisLine:!1,tickLine:!1,tickFormatter:n,domain:x}),p&&e.jsx(t.Tooltip,{contentStyle:k.contentStyle,labelStyle:k.labelStyle,itemStyle:k.itemStyle,cursor:{stroke:a.border,strokeWidth:1}}),f&&e.jsx(t.Legend,{wrapperStyle:{fontSize:13,color:a.textMuted,paddingTop:8}}),u.map((s,v)=>e.jsx(t.ReferenceLine,{y:s.y,x:s.x,label:s.label?{value:s.label,fill:a.textMuted,fontSize:11}:void 0,stroke:s.color??a.border,strokeDasharray:s.dashed?"4 4":void 0},v)),m.map((s,v)=>{const w=s.color??j[v%j.length];return e.jsx(t.Line,{type:l?"monotone":"linear",dataKey:s.key,name:s.label??s.key,stroke:w,strokeWidth:s.strokeWidth??2,strokeDasharray:s.dashed?"6 3":void 0,dot:s.dot??!1,activeDot:{r:5,strokeWidth:0,fill:w},connectNulls:r},s.key)})]})})})}function F({data:i,height:m=300,showLegend:y=!0,showTooltip:S=!0,showLabels:d=!1,outerRadius:h="70%",startAngle:f=90,ariaLabel:p="Pie chart"}){const l=g.useTheme(),u=C(l),o=T(l),[n,x]=L.useState(!1);return L.useEffect(()=>{const r=requestAnimationFrame(()=>x(!0));return()=>cancelAnimationFrame(r)},[]),e.jsx("div",{role:"img","aria-label":p,style:{width:"100%",minWidth:240,height:m,position:"relative"},children:n&&e.jsx(t.ResponsiveContainer,{width:"100%",height:"100%",debounce:50,children:e.jsxs(t.PieChart,{children:[S&&e.jsx(t.Tooltip,{contentStyle:o.contentStyle,labelStyle:o.labelStyle,itemStyle:o.itemStyle}),y&&e.jsx(t.Legend,{wrapperStyle:{fontSize:13,color:l.textMuted}}),e.jsx(t.Pie,{data:i,dataKey:"value",nameKey:"name",outerRadius:h,startAngle:f,endAngle:f-360,label:d?({name:r,percent:c})=>`${r} (${(c*100).toFixed(0)}%)`:void 0,labelLine:d,strokeWidth:2,stroke:l.bg,children:i.map((r,c)=>e.jsx(t.Cell,{fill:r.color??u[c%u.length]},r.name))})]})})})}function D({data:i,height:m=300,showLegend:y=!0,showTooltip:S=!0,centerLabel:d,centerSublabel:h,innerRadius:f="55%",outerRadius:p="75%",startAngle:l=90,ariaLabel:u="Donut chart"}){const o=g.useTheme(),n=C(o),x=T(o),[r,c]=L.useState(!1);return L.useEffect(()=>{const a=requestAnimationFrame(()=>c(!0));return()=>cancelAnimationFrame(a)},[]),e.jsxs("div",{role:"img","aria-label":u,style:{width:"100%",minWidth:240,height:m,position:"relative"},children:[r&&e.jsx(t.ResponsiveContainer,{width:"100%",height:"100%",debounce:50,children:e.jsxs(t.PieChart,{children:[S&&e.jsx(t.Tooltip,{contentStyle:x.contentStyle,labelStyle:x.labelStyle,itemStyle:x.itemStyle}),y&&e.jsx(t.Legend,{wrapperStyle:{fontSize:13,color:o.textMuted}}),e.jsx(t.Pie,{data:i,dataKey:"value",nameKey:"name",innerRadius:f,outerRadius:p,startAngle:l,endAngle:l-360,strokeWidth:3,stroke:o.bg,label:!1,labelLine:!1,children:i.map((a,j)=>e.jsx(t.Cell,{fill:a.color??n[j%n.length]},a.name))}),(d||h)&&e.jsx("text",{})]})}),(d||h)&&e.jsxs("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",pointerEvents:"none",marginTop:y?-24:0},children:[d&&e.jsx("span",{style:{fontSize:22,fontWeight:700,color:o.text,lineHeight:1},children:d}),h&&e.jsx("span",{style:{fontSize:13,color:o.textMuted,marginTop:4},children:h})]})]})}function K({series:i,height:m=300,margin:y=A,showGrid:S=!0,showLegend:d=!0,showTooltip:h=!0,xTickFormatter:f,yTickFormatter:p,zRange:l=[20,400],ariaLabel:u="Scatter chart"}){const o=g.useTheme(),n=C(o),x=T(o),r={fill:o.textMuted,fontSize:12};return e.jsx("div",{role:"img","aria-label":u,style:{width:"100%",height:m},children:e.jsx(t.ResponsiveContainer,{width:"100%",height:"100%",children:e.jsxs(t.ScatterChart,{margin:y,children:[S&&e.jsx(t.CartesianGrid,{strokeDasharray:"3 3",stroke:o.border}),e.jsx(t.XAxis,{type:"number",dataKey:"x",tick:r,axisLine:{stroke:o.border},tickLine:!1,tickFormatter:f}),e.jsx(t.YAxis,{type:"number",dataKey:"y",tick:r,axisLine:!1,tickLine:!1,tickFormatter:p}),e.jsx(t.ZAxis,{type:"number",dataKey:"z",range:l}),h&&e.jsx(t.Tooltip,{contentStyle:x.contentStyle,labelStyle:x.labelStyle,itemStyle:x.itemStyle,cursor:{strokeDasharray:"3 3"}}),d&&e.jsx(t.Legend,{wrapperStyle:{fontSize:13,color:o.textMuted,paddingTop:8}}),i.map((c,a)=>e.jsx(t.Scatter,{name:c.name,data:c.data,fill:c.color??n[a%n.length],fillOpacity:.8},c.name??a))]})})})}function W({data:i,series:m,angleKey:y,height:S=300,showLegend:d=!0,showTooltip:h=!0,outerRadius:f="70%",ariaLabel:p="Radar chart"}){const l=g.useTheme(),u=C(l),o=T(l);return e.jsx("div",{role:"img","aria-label":p,style:{width:"100%",height:S},children:e.jsx(t.ResponsiveContainer,{width:"100%",height:"100%",children:e.jsxs(t.RadarChart,{data:i,outerRadius:f,children:[e.jsx(t.PolarGrid,{stroke:l.border}),e.jsx(t.PolarAngleAxis,{dataKey:y,tick:{fill:l.textMuted,fontSize:12}}),e.jsx(t.PolarRadiusAxis,{tick:{fill:l.textMuted,fontSize:10},axisLine:!1,tickLine:!1}),h&&e.jsx(t.Tooltip,{contentStyle:o.contentStyle,labelStyle:o.labelStyle,itemStyle:o.itemStyle}),d&&e.jsx(t.Legend,{wrapperStyle:{fontSize:13,color:l.textMuted}}),m.map((n,x)=>{const r=n.color??u[x%u.length];return e.jsx(t.Radar,{name:n.label??n.key,dataKey:n.key,stroke:r,fill:r,fillOpacity:n.fillOpacity??.2,strokeWidth:2},n.key)})]})})})}exports.TkxAreaChart=z;exports.TkxBarChart=M;exports.TkxDonutChart=D;exports.TkxLineChart=R;exports.TkxPieChart=F;exports.TkxRadarChart=W;exports.TkxScatterChart=K;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("recharts"),g=require("./index-DB_m7X7e.cjs"),L=require("react");function C(i){return[i.primary,i.secondary,i.info,i.success,i.warning,i.danger,"#a855f7","#f97316","#14b8a6","#e879f9"]}const A={top:10,right:30,bottom:10,left:0};function T(i){return{contentStyle:{backgroundColor:i.surface,border:`1px solid ${i.border}`,borderRadius:8,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",color:i.text,fontSize:13},labelStyle:{color:i.textMuted,fontWeight:600,marginBottom:4},itemStyle:{color:i.text},cursor:{fill:`${i.primary}15`}}}function z({data:i,series:m,xKey:y,height:S=300,margin:d=A,showGrid:h=!0,showLegend:f=!0,showTooltip:p=!0,smooth:l=!0,xTickFormatter:u,yTickFormatter:o,yDomain:n,ariaLabel:x="Area chart"}){const r=g.useTheme(),c=C(r),a=T(r),j={fill:r.textMuted,fontSize:12};return e.jsx("div",{role:"img","aria-label":x,style:{width:"100%",height:S},children:e.jsx(t.ResponsiveContainer,{width:"100%",height:"100%",children:e.jsxs(t.AreaChart,{data:i,margin:d,children:[h&&e.jsx(t.CartesianGrid,{strokeDasharray:"3 3",stroke:r.border,vertical:!1}),e.jsx(t.XAxis,{dataKey:y,tick:j,axisLine:{stroke:r.border},tickLine:!1,tickFormatter:u}),e.jsx(t.YAxis,{tick:j,axisLine:!1,tickLine:!1,tickFormatter:o,domain:n}),p&&e.jsx(t.Tooltip,{contentStyle:a.contentStyle,labelStyle:a.labelStyle,itemStyle:a.itemStyle,cursor:a.cursor}),f&&e.jsx(t.Legend,{wrapperStyle:{fontSize:13,color:r.textMuted,paddingTop:8}}),m.map((k,b)=>{const s=k.color??c[b%c.length];return e.jsx(t.Area,{type:l?"monotone":"linear",dataKey:k.key,name:k.label??k.key,stroke:s,strokeWidth:2,fill:s,fillOpacity:k.fillOpacity??.2,stackId:k.stacked?"stack":void 0,dot:!1,activeDot:{r:5,strokeWidth:0}},k.key)})]})})})}function M({data:i,series:m,xKey:y,height:S=300,margin:d=A,showGrid:h=!0,showLegend:f=!0,showTooltip:p=!0,layout:l="horizontal",barSize:u,xTickFormatter:o,yTickFormatter:n,ariaLabel:x="Bar chart"}){const r=g.useTheme(),c=C(r),a=T(r),j={fill:r.textMuted,fontSize:12},k=l==="vertical";return e.jsx("div",{role:"img","aria-label":x,style:{width:"100%",height:S},children:e.jsx(t.ResponsiveContainer,{width:"100%",height:"100%",children:e.jsxs(t.BarChart,{data:i,margin:d,layout:l,children:[h&&e.jsx(t.CartesianGrid,{strokeDasharray:"3 3",stroke:r.border,vertical:k,horizontal:!k}),k?e.jsxs(e.Fragment,{children:[e.jsx(t.YAxis,{dataKey:y,type:"category",tick:j,axisLine:!1,tickLine:!1,tickFormatter:o,width:100}),e.jsx(t.XAxis,{type:"number",tick:j,axisLine:{stroke:r.border},tickLine:!1,tickFormatter:n})]}):e.jsxs(e.Fragment,{children:[e.jsx(t.XAxis,{dataKey:y,tick:j,axisLine:{stroke:r.border},tickLine:!1,tickFormatter:o}),e.jsx(t.YAxis,{tick:j,axisLine:!1,tickLine:!1,tickFormatter:n})]}),p&&e.jsx(t.Tooltip,{contentStyle:a.contentStyle,labelStyle:a.labelStyle,itemStyle:a.itemStyle,cursor:{fill:`${r.surfaceAlt}`}}),f&&e.jsx(t.Legend,{wrapperStyle:{fontSize:13,color:r.textMuted,paddingTop:8}}),m.map((b,s)=>{const v=b.color??c[s%c.length];return e.jsx(t.Bar,{dataKey:b.key,name:b.label??b.key,fill:v,stackId:b.stackId,maxBarSize:u??40,radius:b.radius??[4,4,0,0]},b.key)})]})})})}function R({data:i,series:m,xKey:y,height:S=300,margin:d=A,showGrid:h=!0,showLegend:f=!0,showTooltip:p=!0,smooth:l=!0,referenceLines:u=[],xTickFormatter:o,yTickFormatter:n,yDomain:x,connectNulls:r=!1,ariaLabel:c="Line chart"}){const a=g.useTheme(),j=C(a),k=T(a),b={fill:a.textMuted,fontSize:12};return e.jsx("div",{role:"img","aria-label":c,style:{width:"100%",height:S},children:e.jsx(t.ResponsiveContainer,{width:"100%",height:"100%",children:e.jsxs(t.LineChart,{data:i,margin:d,children:[h&&e.jsx(t.CartesianGrid,{strokeDasharray:"3 3",stroke:a.border,vertical:!1}),e.jsx(t.XAxis,{dataKey:y,tick:b,axisLine:{stroke:a.border},tickLine:!1,tickFormatter:o}),e.jsx(t.YAxis,{tick:b,axisLine:!1,tickLine:!1,tickFormatter:n,domain:x}),p&&e.jsx(t.Tooltip,{contentStyle:k.contentStyle,labelStyle:k.labelStyle,itemStyle:k.itemStyle,cursor:{stroke:a.border,strokeWidth:1}}),f&&e.jsx(t.Legend,{wrapperStyle:{fontSize:13,color:a.textMuted,paddingTop:8}}),u.map((s,v)=>e.jsx(t.ReferenceLine,{y:s.y,x:s.x,label:s.label?{value:s.label,fill:a.textMuted,fontSize:11}:void 0,stroke:s.color??a.border,strokeDasharray:s.dashed?"4 4":void 0},v)),m.map((s,v)=>{const w=s.color??j[v%j.length];return e.jsx(t.Line,{type:l?"monotone":"linear",dataKey:s.key,name:s.label??s.key,stroke:w,strokeWidth:s.strokeWidth??2,strokeDasharray:s.dashed?"6 3":void 0,dot:s.dot??!1,activeDot:{r:5,strokeWidth:0,fill:w},connectNulls:r},s.key)})]})})})}function F({data:i,height:m=300,showLegend:y=!0,showTooltip:S=!0,showLabels:d=!1,outerRadius:h="70%",startAngle:f=90,ariaLabel:p="Pie chart"}){const l=g.useTheme(),u=C(l),o=T(l),[n,x]=L.useState(!1);return L.useEffect(()=>{const r=requestAnimationFrame(()=>x(!0));return()=>cancelAnimationFrame(r)},[]),e.jsx("div",{role:"img","aria-label":p,style:{width:"100%",minWidth:240,height:m,position:"relative"},children:n&&e.jsx(t.ResponsiveContainer,{width:"100%",height:"100%",debounce:50,children:e.jsxs(t.PieChart,{children:[S&&e.jsx(t.Tooltip,{contentStyle:o.contentStyle,labelStyle:o.labelStyle,itemStyle:o.itemStyle}),y&&e.jsx(t.Legend,{wrapperStyle:{fontSize:13,color:l.textMuted}}),e.jsx(t.Pie,{data:i,dataKey:"value",nameKey:"name",outerRadius:h,startAngle:f,endAngle:f-360,label:d?({name:r,percent:c})=>`${r} (${(c*100).toFixed(0)}%)`:void 0,labelLine:d,strokeWidth:2,stroke:l.bg,children:i.map((r,c)=>e.jsx(t.Cell,{fill:r.color??u[c%u.length]},r.name))})]})})})}function D({data:i,height:m=300,showLegend:y=!0,showTooltip:S=!0,centerLabel:d,centerSublabel:h,innerRadius:f="55%",outerRadius:p="75%",startAngle:l=90,ariaLabel:u="Donut chart"}){const o=g.useTheme(),n=C(o),x=T(o),[r,c]=L.useState(!1);return L.useEffect(()=>{const a=requestAnimationFrame(()=>c(!0));return()=>cancelAnimationFrame(a)},[]),e.jsxs("div",{role:"img","aria-label":u,style:{width:"100%",minWidth:240,height:m,position:"relative"},children:[r&&e.jsx(t.ResponsiveContainer,{width:"100%",height:"100%",debounce:50,children:e.jsxs(t.PieChart,{children:[S&&e.jsx(t.Tooltip,{contentStyle:x.contentStyle,labelStyle:x.labelStyle,itemStyle:x.itemStyle}),y&&e.jsx(t.Legend,{wrapperStyle:{fontSize:13,color:o.textMuted}}),e.jsx(t.Pie,{data:i,dataKey:"value",nameKey:"name",innerRadius:f,outerRadius:p,startAngle:l,endAngle:l-360,strokeWidth:3,stroke:o.bg,label:!1,labelLine:!1,children:i.map((a,j)=>e.jsx(t.Cell,{fill:a.color??n[j%n.length]},a.name))}),(d||h)&&e.jsx("text",{})]})}),(d||h)&&e.jsxs("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",pointerEvents:"none",marginTop:y?-24:0},children:[d&&e.jsx("span",{style:{fontSize:22,fontWeight:700,color:o.text,lineHeight:1},children:d}),h&&e.jsx("span",{style:{fontSize:13,color:o.textMuted,marginTop:4},children:h})]})]})}function K({series:i,height:m=300,margin:y=A,showGrid:S=!0,showLegend:d=!0,showTooltip:h=!0,xTickFormatter:f,yTickFormatter:p,zRange:l=[20,400],ariaLabel:u="Scatter chart"}){const o=g.useTheme(),n=C(o),x=T(o),r={fill:o.textMuted,fontSize:12};return e.jsx("div",{role:"img","aria-label":u,style:{width:"100%",height:m},children:e.jsx(t.ResponsiveContainer,{width:"100%",height:"100%",children:e.jsxs(t.ScatterChart,{margin:y,children:[S&&e.jsx(t.CartesianGrid,{strokeDasharray:"3 3",stroke:o.border}),e.jsx(t.XAxis,{type:"number",dataKey:"x",tick:r,axisLine:{stroke:o.border},tickLine:!1,tickFormatter:f}),e.jsx(t.YAxis,{type:"number",dataKey:"y",tick:r,axisLine:!1,tickLine:!1,tickFormatter:p}),e.jsx(t.ZAxis,{type:"number",dataKey:"z",range:l}),h&&e.jsx(t.Tooltip,{contentStyle:x.contentStyle,labelStyle:x.labelStyle,itemStyle:x.itemStyle,cursor:{strokeDasharray:"3 3"}}),d&&e.jsx(t.Legend,{wrapperStyle:{fontSize:13,color:o.textMuted,paddingTop:8}}),i.map((c,a)=>e.jsx(t.Scatter,{name:c.name,data:c.data,fill:c.color??n[a%n.length],fillOpacity:.8},c.name??a))]})})})}function W({data:i,series:m,angleKey:y,height:S=300,showLegend:d=!0,showTooltip:h=!0,outerRadius:f="70%",ariaLabel:p="Radar chart"}){const l=g.useTheme(),u=C(l),o=T(l);return e.jsx("div",{role:"img","aria-label":p,style:{width:"100%",height:S},children:e.jsx(t.ResponsiveContainer,{width:"100%",height:"100%",children:e.jsxs(t.RadarChart,{data:i,outerRadius:f,children:[e.jsx(t.PolarGrid,{stroke:l.border}),e.jsx(t.PolarAngleAxis,{dataKey:y,tick:{fill:l.textMuted,fontSize:12}}),e.jsx(t.PolarRadiusAxis,{tick:{fill:l.textMuted,fontSize:10},axisLine:!1,tickLine:!1}),h&&e.jsx(t.Tooltip,{contentStyle:o.contentStyle,labelStyle:o.labelStyle,itemStyle:o.itemStyle}),d&&e.jsx(t.Legend,{wrapperStyle:{fontSize:13,color:l.textMuted}}),m.map((n,x)=>{const r=n.color??u[x%u.length];return e.jsx(t.Radar,{name:n.label??n.key,dataKey:n.key,stroke:r,fill:r,fillOpacity:n.fillOpacity??.2,strokeWidth:2},n.key)})]})})})}exports.TkxAreaChart=z;exports.TkxBarChart=M;exports.TkxDonutChart=D;exports.TkxLineChart=R;exports.TkxPieChart=F;exports.TkxRadarChart=W;exports.TkxScatterChart=K;
package/dist/charts.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as t, jsxs as g, Fragment as R } from "react/jsx-runtime";
2
2
  import { ResponsiveContainer as v, AreaChart as j, CartesianGrid as D, XAxis as F, YAxis as K, Tooltip as L, Legend as w, Area as E, BarChart as G, Bar as q, LineChart as H, ReferenceLine as N, Line as U, PieChart as P, Pie as B, Cell as I, ScatterChart as V, ZAxis as X, Scatter as Y, RadarChart as Z, PolarGrid as _, PolarAngleAxis as J, PolarRadiusAxis as Q, Radar as tt } from "recharts";
3
- import { u as z } from "./index-eT_U4qB2.js";
3
+ import { u as z } from "./index-CAXjeKoK.js";
4
4
  import { useState as O, useEffect as $ } from "react";
5
5
  function C(r) {
6
6
  return [
package/dist/headless.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./TkxForm-DwV_n-eE.cjs"),J=require("./tkx-BeNyC0w7.cjs"),q=require("./index-BINBzXuY.cjs"),B=require("./security-C369oOWH.cjs"),e=require("react");function Y(t=!1){const[c,n]=e.useState(t),s=e.useCallback(()=>n(!0),[]),r=e.useCallback(()=>n(!1),[]),o=e.useCallback(()=>n(u=>!u),[]);return{isOpen:c,open:s,close:r,toggle:o}}function Z({count:t,initialIndex:c=0,orientation:n="horizontal",loop:s=!0}){const[r,o]=e.useState(c),u=e.useRef([]),l=e.useCallback(i=>{o(d=>{let y=d+i;return s?y=(y%t+t)%t:y=Math.max(0,Math.min(t-1,y)),requestAnimationFrame(()=>{var w;(w=u.current[y])==null||w.focus()}),y})},[t,s]),S=e.useCallback(i=>({tabIndex:i===r?0:-1,"data-focused":i===r,onFocus:()=>o(i),onKeyDown:d=>{const y=n==="horizontal"||n==="both",w=n==="vertical"||n==="both";y&&d.key==="ArrowRight"&&(d.preventDefault(),l(1)),y&&d.key==="ArrowLeft"&&(d.preventDefault(),l(-1)),w&&d.key==="ArrowDown"&&(d.preventDefault(),l(1)),w&&d.key==="ArrowUp"&&(d.preventDefault(),l(-1)),d.key==="Home"&&(d.preventDefault(),o(0),requestAnimationFrame(()=>{var m;return(m=u.current[0])==null?void 0:m.focus()})),d.key==="End"&&(d.preventDefault(),o(t-1),requestAnimationFrame(()=>{var m;return(m=u.current[t-1])==null?void 0:m.focus()}))}}),[r,l,n,t]);return{focusedIndex:r,setFocusedIndex:o,getItemProps:S}}function _({initialValues:t,validate:c}){const[n,s]=e.useState({...t}),[r,o]=e.useState({}),[u,l]=e.useState({}),S=e.useRef(t),i=e.useCallback((f,b)=>{s(x=>({...x,[f]:b}))},[]),d=e.useCallback(f=>{s(b=>({...b,...f}))},[]),y=e.useCallback(f=>{l(b=>({...b,[f]:!0}))},[]),w=e.useCallback(()=>{if(!c)return!0;const f=c(n),b=Object.fromEntries(Object.entries(f).filter(([,A])=>A!=null));o(b);const x=Object.fromEntries(Object.keys(n).map(A=>[A,!0]));return l(x),Object.keys(b).length===0},[n,c]),m=e.useCallback(()=>{s({...S.current}),o({}),l({})},[]),g=Object.keys(n).some(f=>n[f]!==S.current[f]),k=Object.keys(r).length===0,a=e.useCallback(f=>({value:n[f],onChange:b=>{i(f,b.target.value)},onBlur:()=>y(f),"aria-invalid":u[f]&&r[f]?!0:void 0,"aria-describedby":r[f]?`${String(f)}-error`:void 0}),[n,r,u,i,y]);return{values:n,errors:r,touched:u,dirty:g,isValid:k,setValue:i,setValues:d,touchField:y,validate:w,reset:m,getFieldProps:a}}function ee({items:t,initialSelected:c=[],multiple:n=!0}){const[s,r]=e.useState(()=>new Set(c)),o=e.useCallback(g=>{r(k=>{const a=new Set(k);return a.has(g)?a.delete(g):(n||a.clear(),a.add(g)),a})},[n]),u=e.useCallback(g=>{r(k=>{if(k.has(g))return k;const a=n?new Set(k):new Set;return a.add(g),a})},[n]),l=e.useCallback(g=>{r(k=>{if(!k.has(g))return k;const a=new Set(k);return a.delete(g),a})},[]),S=e.useCallback(()=>{n&&r(new Set(t))},[t,n]),i=e.useCallback(()=>r(new Set),[]),d=e.useCallback(()=>{r(g=>t.every(a=>g.has(a))?new Set:new Set(t))},[t]),y=t.length>0&&t.every(g=>s.has(g)),w=t.some(g=>s.has(g)),m=e.useMemo(()=>Array.from(s),[s]);return{selected:s,isSelected:e.useCallback(g=>s.has(g),[s]),toggle:o,select:u,deselect:l,selectAll:S,deselectAll:i,toggleAll:d,allSelected:y,someSelected:w,selectedCount:s.size,selectedArray:m}}function te(t,c){const[n,s]=e.useState(t);return e.useEffect(()=>{const r=setTimeout(()=>s(t),c);return()=>clearTimeout(r)},[t,c]),n}function ne(t,c){const[n,s]=e.useState(t),r=e.useRef(Date.now());return e.useEffect(()=>{const o=Date.now(),u=c-(o-r.current);if(u<=0)r.current=o,s(t);else{const l=setTimeout(()=>{r.current=Date.now(),s(t)},u);return()=>clearTimeout(l)}},[t,c]),n}function re({value:t,onChange:c,defaultValue:n}){const s=t!==void 0,[r,o]=e.useState(n),u=e.useRef(c);u.current=c;const l=e.useCallback(S=>{var i;s||o(S),(i=u.current)==null||i.call(u,S)},[s]);return[s?t:r,l]}function se(t){const[c,n]=e.useState(()=>typeof window>"u"?!1:window.matchMedia(t).matches);return e.useEffect(()=>{if(typeof window>"u")return;const s=window.matchMedia(t);n(s.matches);const r=o=>n(o.matches);return s.addEventListener("change",r),()=>s.removeEventListener("change",r)},[t]),c}function ce(t,c){const[n,s]=e.useState(()=>{if(typeof window>"u")return c;try{const u=window.localStorage.getItem(t);return u!==null?JSON.parse(u):c}catch{return c}}),r=e.useCallback(u=>{s(l=>{const S=typeof u=="function"?u(l):u;if(typeof window<"u")try{window.localStorage.setItem(t,JSON.stringify(S))}catch{}return S})},[t]),o=e.useCallback(()=>{if(s(c),typeof window<"u")try{window.localStorage.removeItem(t)}catch{}},[t,c]);return[n,r,o]}function ue({threshold:t=0,rootMargin:c="0px",root:n=null,once:s=!1}={}){const r=e.useRef(null),[o,u]=e.useState(null),l=e.useRef(null);return e.useEffect(()=>{const S=r.current;if(!(!S||typeof IntersectionObserver>"u"))return l.current=new IntersectionObserver(([i])=>{var d;u(i),s&&i.isIntersecting&&((d=l.current)==null||d.unobserve(S))},{threshold:t,rootMargin:c,root:n}),l.current.observe(S),()=>{var i;return(i=l.current)==null?void 0:i.disconnect()}},[t,c,n,s]),{ref:r,isIntersecting:(o==null?void 0:o.isIntersecting)??!1,entry:o}}function oe(t){const{url:c,protocols:n,reconnect:s=!0,reconnectDelay:r=1e3,reconnectAttempts:o=10,heartbeatInterval:u=3e4,heartbeatMessage:l="ping",onOpen:S,onClose:i,onError:d,onMessage:y}=t,[w,m]=e.useState("disconnected"),[g,k]=e.useState(null),[a,f]=e.useState([]),[b,x]=e.useState(0),[A,F]=e.useState(null),h=e.useRef(null),O=e.useRef(0),V=e.useRef(null),D=e.useRef(null),L=e.useRef(null),p=e.useRef([]),R=e.useRef(!0),T=e.useRef(!1),C=e.useRef(S),M=e.useRef(i),P=e.useRef(d),Q=e.useRef(y);C.current=S,M.current=i,P.current=d,Q.current=y;const z=e.useCallback(()=>{V.current&&(clearTimeout(V.current),V.current=null),D.current&&(clearInterval(D.current),D.current=null)},[]),U=e.useCallback(E=>{for(;p.current.length>0;){const I=p.current.shift();I!==void 0&&E.send(typeof I=="string"?I:JSON.stringify(I))}},[]),K=e.useCallback(()=>{if(h.current&&h.current.readyState===WebSocket.OPEN)return;T.current=!1,z(),R.current&&m("connecting");const E=new WebSocket(c,n);h.current=E,E.onopen=I=>{var v;R.current&&(m("connected"),O.current=0,x(0),(v=C.current)==null||v.call(C,I),U(E),D.current=setInterval(()=>{if(E.readyState===WebSocket.OPEN){L.current=Date.now();try{E.send(JSON.stringify({type:"ping",t:L.current}))}catch{}}},u))},E.onmessage=I=>{var W;if(!R.current)return;let v;try{v=JSON.parse(I.data)}catch{v=I.data}const j=v;if(j&&typeof j=="object"&&j.type==="pong"&&typeof j.t=="number"){F(Date.now()-j.t);return}if(v===l&&L.current!==null){F(Date.now()-L.current),L.current=null;return}k(v),f(X=>{const H=[...X,v];return H.length>100?H.slice(H.length-100):H}),(W=Q.current)==null||W.call(Q,v)},E.onerror=I=>{var v;R.current&&(m("error"),(v=P.current)==null||v.call(P,I))},E.onclose=I=>{var v;if(R.current&&(z(),m("disconnected"),(v=M.current)==null||v.call(M,I),!T.current&&s&&O.current<o)){const j=O.current,W=r*Math.pow(1.5,j);O.current+=1,x(O.current),V.current=setTimeout(()=>{R.current&&K()},W)}}},[c,n,s,r,o,u,l,z,U]),$=e.useCallback(()=>{T.current=!0,z(),h.current&&(h.current.close(),h.current=null),R.current&&m("disconnected")},[z]),G=e.useCallback(E=>{h.current&&h.current.readyState===WebSocket.OPEN?h.current.send(typeof E=="string"?E:JSON.stringify(E)):p.current.push(E)},[]);return e.useEffect(()=>(R.current=!0,K(),()=>{R.current=!1,T.current=!0,z(),h.current&&(h.current.close(),h.current=null)}),[]),{status:w,lastMessage:g,messages:a,send:G,connect:K,disconnect:$,reconnectCount:b,latency:A}}function ae(t){const{url:c,events:n=["message"],withCredentials:s=!1,reconnect:r=!0,reconnectDelay:o=3e3,onOpen:u,onError:l}=t,[S,i]=e.useState("connecting"),[d,y]=e.useState(null),[w,m]=e.useState([]),[g,k]=e.useState(0),a=e.useRef(null),f=e.useRef(null),b=e.useRef(!0),x=e.useRef(!1),A=e.useRef(u),F=e.useRef(l);A.current=u,F.current=l;const h=e.useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=null)},[]),O=e.useCallback(()=>{if(typeof EventSource>"u"){b.current&&i("error");return}x.current=!1,h(),a.current&&(a.current.close(),a.current=null),b.current&&i("connecting");const D=new EventSource(c,{withCredentials:s});a.current=D,D.onopen=()=>{var p;b.current&&(i("connected"),(p=A.current)==null||p.call(A))},D.onerror=p=>{var R;b.current&&(i("error"),(R=F.current)==null||R.call(F,p),!x.current&&r&&(h(),f.current=setTimeout(()=>{b.current&&O()},o)))};const L=p=>R=>{if(!b.current)return;let T;try{T=JSON.parse(R.data)}catch{T=R.data}const C={type:p,data:T,timestamp:Date.now(),...R.lastEventId?{id:R.lastEventId}:{}};y({type:C.type,data:C.data,id:C.id}),m(M=>{const P=[...M,C];return P.length>200?P.slice(P.length-200):P}),k(M=>M+1)};for(const p of n)D.addEventListener(p,L(p))},[c,s,r,o,h]),V=e.useCallback(()=>{x.current=!0,h(),a.current&&(a.current.close(),a.current=null),b.current&&i("closed")},[h]);return e.useEffect(()=>(b.current=!0,O(),()=>{b.current=!1,x.current=!0,h(),a.current&&(a.current.close(),a.current=null)}),[]),{status:S,lastEvent:d,events:w,connect:O,disconnect:V,eventCount:g}}function le(t){const{queryFn:c,initialCursor:n=null,enabled:s=!0,dedupKey:r}=t,[o,u]=e.useState([]),[l,S]=e.useState("idle"),[i,d]=e.useState(null),[y,w]=e.useState(!1),[m,g]=e.useState(0),k=e.useRef(n??null),a=e.useRef(!1),f=e.useRef(!0),b=e.useRef(void 0),x=e.useRef(c);x.current=c;const A=e.useCallback(async(L,p,R)=>{if(a.current||r!==void 0&&r===b.current)return;a.current=!0;let T=!1;f.current&&(S(R?"loading":"fetching-more"),d(null));try{const C=await x.current(L,p);if(T||!f.current)return;r!==void 0&&(b.current=r),k.current=C.nextCursor,u(M=>R?[C.data]:[...M,C.data]),w(C.hasMore),g(p),S("success")}catch(C){if(T||!f.current)return;d(C instanceof Error?C:new Error(String(C))),S("error")}finally{T||(a.current=!1)}return()=>{T=!0}},[r]),F=e.useCallback(()=>{!y||a.current||A(k.current,m+1,!1)},[y,m,A]),h=e.useCallback(()=>{a.current=!1,b.current=void 0,k.current=n??null,u([]),S("idle"),d(null),w(!1),g(0)},[n]);e.useEffect(()=>(f.current=!0,s&&A(n??null,0,!0),()=>{f.current=!1}),[s]);const O=o.flat(),V=l==="fetching-more",D=O.length;return{data:O,pages:o,status:l,error:i,hasMore:y,isFetchingMore:V,fetchMore:F,reset:h,pageIndex:m,totalLoaded:D}}exports.useAnnounce=N.useAnnounce;exports.useClickOutside=N.useClickOutside;exports.useEscapeKey=N.useEscapeKey;exports.useFocusTrap=N.useFocusTrap;exports.useHighContrast=N.useHighContrast;exports.useReducedMotion=N.useReducedMotion;exports.useTkxForm=N.useTkxForm;exports.cx=J.cx;exports.extractAtomicCSS=J.extractAtomicCSS;exports.resetAtomicCSS=J.resetAtomicCSS;exports.tkxListPlugins=J.tkxListPlugins;exports.tkxPlugin=J.tkxPlugin;exports.tkxRemovePlugin=J.tkxRemovePlugin;exports.contrastRatio=q.contrastRatio;exports.cssVar=q.cssVar;exports.extractCSS=q.extractCSS;exports.injectStyles=q.injectStyles;exports.meetsAA=q.meetsAA;exports.meetsAAA=q.meetsAAA;exports.resetStyles=q.resetStyles;exports.sanitizeProps=B.sanitizeProps;exports.sanitizeString=B.sanitizeString;exports.useControllable=re;exports.useDebounce=te;exports.useDisclosure=Y;exports.useFormState=_;exports.useInfiniteQuery=le;exports.useIntersectionObserver=ue;exports.useListSelection=ee;exports.useLocalStorage=ce;exports.useMediaQuery=se;exports.useRovingTabIndex=Z;exports.useSSE=ae;exports.useThrottle=ne;exports.useWebSocket=oe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./TkxForm-BK5Sq7oj.cjs"),J=require("./tkx-69KQ0myA.cjs"),q=require("./index-DB_m7X7e.cjs"),B=require("./security-DMqZVW5d.cjs"),e=require("react");function Y(t=!1){const[c,n]=e.useState(t),s=e.useCallback(()=>n(!0),[]),r=e.useCallback(()=>n(!1),[]),o=e.useCallback(()=>n(u=>!u),[]);return{isOpen:c,open:s,close:r,toggle:o}}function Z({count:t,initialIndex:c=0,orientation:n="horizontal",loop:s=!0}){const[r,o]=e.useState(c),u=e.useRef([]),l=e.useCallback(i=>{o(d=>{let y=d+i;return s?y=(y%t+t)%t:y=Math.max(0,Math.min(t-1,y)),requestAnimationFrame(()=>{var w;(w=u.current[y])==null||w.focus()}),y})},[t,s]),S=e.useCallback(i=>({tabIndex:i===r?0:-1,"data-focused":i===r,onFocus:()=>o(i),onKeyDown:d=>{const y=n==="horizontal"||n==="both",w=n==="vertical"||n==="both";y&&d.key==="ArrowRight"&&(d.preventDefault(),l(1)),y&&d.key==="ArrowLeft"&&(d.preventDefault(),l(-1)),w&&d.key==="ArrowDown"&&(d.preventDefault(),l(1)),w&&d.key==="ArrowUp"&&(d.preventDefault(),l(-1)),d.key==="Home"&&(d.preventDefault(),o(0),requestAnimationFrame(()=>{var m;return(m=u.current[0])==null?void 0:m.focus()})),d.key==="End"&&(d.preventDefault(),o(t-1),requestAnimationFrame(()=>{var m;return(m=u.current[t-1])==null?void 0:m.focus()}))}}),[r,l,n,t]);return{focusedIndex:r,setFocusedIndex:o,getItemProps:S}}function _({initialValues:t,validate:c}){const[n,s]=e.useState({...t}),[r,o]=e.useState({}),[u,l]=e.useState({}),S=e.useRef(t),i=e.useCallback((f,b)=>{s(x=>({...x,[f]:b}))},[]),d=e.useCallback(f=>{s(b=>({...b,...f}))},[]),y=e.useCallback(f=>{l(b=>({...b,[f]:!0}))},[]),w=e.useCallback(()=>{if(!c)return!0;const f=c(n),b=Object.fromEntries(Object.entries(f).filter(([,A])=>A!=null));o(b);const x=Object.fromEntries(Object.keys(n).map(A=>[A,!0]));return l(x),Object.keys(b).length===0},[n,c]),m=e.useCallback(()=>{s({...S.current}),o({}),l({})},[]),g=Object.keys(n).some(f=>n[f]!==S.current[f]),k=Object.keys(r).length===0,a=e.useCallback(f=>({value:n[f],onChange:b=>{i(f,b.target.value)},onBlur:()=>y(f),"aria-invalid":u[f]&&r[f]?!0:void 0,"aria-describedby":r[f]?`${String(f)}-error`:void 0}),[n,r,u,i,y]);return{values:n,errors:r,touched:u,dirty:g,isValid:k,setValue:i,setValues:d,touchField:y,validate:w,reset:m,getFieldProps:a}}function ee({items:t,initialSelected:c=[],multiple:n=!0}){const[s,r]=e.useState(()=>new Set(c)),o=e.useCallback(g=>{r(k=>{const a=new Set(k);return a.has(g)?a.delete(g):(n||a.clear(),a.add(g)),a})},[n]),u=e.useCallback(g=>{r(k=>{if(k.has(g))return k;const a=n?new Set(k):new Set;return a.add(g),a})},[n]),l=e.useCallback(g=>{r(k=>{if(!k.has(g))return k;const a=new Set(k);return a.delete(g),a})},[]),S=e.useCallback(()=>{n&&r(new Set(t))},[t,n]),i=e.useCallback(()=>r(new Set),[]),d=e.useCallback(()=>{r(g=>t.every(a=>g.has(a))?new Set:new Set(t))},[t]),y=t.length>0&&t.every(g=>s.has(g)),w=t.some(g=>s.has(g)),m=e.useMemo(()=>Array.from(s),[s]);return{selected:s,isSelected:e.useCallback(g=>s.has(g),[s]),toggle:o,select:u,deselect:l,selectAll:S,deselectAll:i,toggleAll:d,allSelected:y,someSelected:w,selectedCount:s.size,selectedArray:m}}function te(t,c){const[n,s]=e.useState(t);return e.useEffect(()=>{const r=setTimeout(()=>s(t),c);return()=>clearTimeout(r)},[t,c]),n}function ne(t,c){const[n,s]=e.useState(t),r=e.useRef(Date.now());return e.useEffect(()=>{const o=Date.now(),u=c-(o-r.current);if(u<=0)r.current=o,s(t);else{const l=setTimeout(()=>{r.current=Date.now(),s(t)},u);return()=>clearTimeout(l)}},[t,c]),n}function re({value:t,onChange:c,defaultValue:n}){const s=t!==void 0,[r,o]=e.useState(n),u=e.useRef(c);u.current=c;const l=e.useCallback(S=>{var i;s||o(S),(i=u.current)==null||i.call(u,S)},[s]);return[s?t:r,l]}function se(t){const[c,n]=e.useState(()=>typeof window>"u"?!1:window.matchMedia(t).matches);return e.useEffect(()=>{if(typeof window>"u")return;const s=window.matchMedia(t);n(s.matches);const r=o=>n(o.matches);return s.addEventListener("change",r),()=>s.removeEventListener("change",r)},[t]),c}function ce(t,c){const[n,s]=e.useState(()=>{if(typeof window>"u")return c;try{const u=window.localStorage.getItem(t);return u!==null?JSON.parse(u):c}catch{return c}}),r=e.useCallback(u=>{s(l=>{const S=typeof u=="function"?u(l):u;if(typeof window<"u")try{window.localStorage.setItem(t,JSON.stringify(S))}catch{}return S})},[t]),o=e.useCallback(()=>{if(s(c),typeof window<"u")try{window.localStorage.removeItem(t)}catch{}},[t,c]);return[n,r,o]}function ue({threshold:t=0,rootMargin:c="0px",root:n=null,once:s=!1}={}){const r=e.useRef(null),[o,u]=e.useState(null),l=e.useRef(null);return e.useEffect(()=>{const S=r.current;if(!(!S||typeof IntersectionObserver>"u"))return l.current=new IntersectionObserver(([i])=>{var d;u(i),s&&i.isIntersecting&&((d=l.current)==null||d.unobserve(S))},{threshold:t,rootMargin:c,root:n}),l.current.observe(S),()=>{var i;return(i=l.current)==null?void 0:i.disconnect()}},[t,c,n,s]),{ref:r,isIntersecting:(o==null?void 0:o.isIntersecting)??!1,entry:o}}function oe(t){const{url:c,protocols:n,reconnect:s=!0,reconnectDelay:r=1e3,reconnectAttempts:o=10,heartbeatInterval:u=3e4,heartbeatMessage:l="ping",onOpen:S,onClose:i,onError:d,onMessage:y}=t,[w,m]=e.useState("disconnected"),[g,k]=e.useState(null),[a,f]=e.useState([]),[b,x]=e.useState(0),[A,F]=e.useState(null),h=e.useRef(null),O=e.useRef(0),V=e.useRef(null),D=e.useRef(null),L=e.useRef(null),p=e.useRef([]),R=e.useRef(!0),T=e.useRef(!1),C=e.useRef(S),M=e.useRef(i),P=e.useRef(d),Q=e.useRef(y);C.current=S,M.current=i,P.current=d,Q.current=y;const z=e.useCallback(()=>{V.current&&(clearTimeout(V.current),V.current=null),D.current&&(clearInterval(D.current),D.current=null)},[]),U=e.useCallback(E=>{for(;p.current.length>0;){const I=p.current.shift();I!==void 0&&E.send(typeof I=="string"?I:JSON.stringify(I))}},[]),K=e.useCallback(()=>{if(h.current&&h.current.readyState===WebSocket.OPEN)return;T.current=!1,z(),R.current&&m("connecting");const E=new WebSocket(c,n);h.current=E,E.onopen=I=>{var v;R.current&&(m("connected"),O.current=0,x(0),(v=C.current)==null||v.call(C,I),U(E),D.current=setInterval(()=>{if(E.readyState===WebSocket.OPEN){L.current=Date.now();try{E.send(JSON.stringify({type:"ping",t:L.current}))}catch{}}},u))},E.onmessage=I=>{var W;if(!R.current)return;let v;try{v=JSON.parse(I.data)}catch{v=I.data}const j=v;if(j&&typeof j=="object"&&j.type==="pong"&&typeof j.t=="number"){F(Date.now()-j.t);return}if(v===l&&L.current!==null){F(Date.now()-L.current),L.current=null;return}k(v),f(X=>{const H=[...X,v];return H.length>100?H.slice(H.length-100):H}),(W=Q.current)==null||W.call(Q,v)},E.onerror=I=>{var v;R.current&&(m("error"),(v=P.current)==null||v.call(P,I))},E.onclose=I=>{var v;if(R.current&&(z(),m("disconnected"),(v=M.current)==null||v.call(M,I),!T.current&&s&&O.current<o)){const j=O.current,W=r*Math.pow(1.5,j);O.current+=1,x(O.current),V.current=setTimeout(()=>{R.current&&K()},W)}}},[c,n,s,r,o,u,l,z,U]),$=e.useCallback(()=>{T.current=!0,z(),h.current&&(h.current.close(),h.current=null),R.current&&m("disconnected")},[z]),G=e.useCallback(E=>{h.current&&h.current.readyState===WebSocket.OPEN?h.current.send(typeof E=="string"?E:JSON.stringify(E)):p.current.push(E)},[]);return e.useEffect(()=>(R.current=!0,K(),()=>{R.current=!1,T.current=!0,z(),h.current&&(h.current.close(),h.current=null)}),[]),{status:w,lastMessage:g,messages:a,send:G,connect:K,disconnect:$,reconnectCount:b,latency:A}}function ae(t){const{url:c,events:n=["message"],withCredentials:s=!1,reconnect:r=!0,reconnectDelay:o=3e3,onOpen:u,onError:l}=t,[S,i]=e.useState("connecting"),[d,y]=e.useState(null),[w,m]=e.useState([]),[g,k]=e.useState(0),a=e.useRef(null),f=e.useRef(null),b=e.useRef(!0),x=e.useRef(!1),A=e.useRef(u),F=e.useRef(l);A.current=u,F.current=l;const h=e.useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=null)},[]),O=e.useCallback(()=>{if(typeof EventSource>"u"){b.current&&i("error");return}x.current=!1,h(),a.current&&(a.current.close(),a.current=null),b.current&&i("connecting");const D=new EventSource(c,{withCredentials:s});a.current=D,D.onopen=()=>{var p;b.current&&(i("connected"),(p=A.current)==null||p.call(A))},D.onerror=p=>{var R;b.current&&(i("error"),(R=F.current)==null||R.call(F,p),!x.current&&r&&(h(),f.current=setTimeout(()=>{b.current&&O()},o)))};const L=p=>R=>{if(!b.current)return;let T;try{T=JSON.parse(R.data)}catch{T=R.data}const C={type:p,data:T,timestamp:Date.now(),...R.lastEventId?{id:R.lastEventId}:{}};y({type:C.type,data:C.data,id:C.id}),m(M=>{const P=[...M,C];return P.length>200?P.slice(P.length-200):P}),k(M=>M+1)};for(const p of n)D.addEventListener(p,L(p))},[c,s,r,o,h]),V=e.useCallback(()=>{x.current=!0,h(),a.current&&(a.current.close(),a.current=null),b.current&&i("closed")},[h]);return e.useEffect(()=>(b.current=!0,O(),()=>{b.current=!1,x.current=!0,h(),a.current&&(a.current.close(),a.current=null)}),[]),{status:S,lastEvent:d,events:w,connect:O,disconnect:V,eventCount:g}}function le(t){const{queryFn:c,initialCursor:n=null,enabled:s=!0,dedupKey:r}=t,[o,u]=e.useState([]),[l,S]=e.useState("idle"),[i,d]=e.useState(null),[y,w]=e.useState(!1),[m,g]=e.useState(0),k=e.useRef(n??null),a=e.useRef(!1),f=e.useRef(!0),b=e.useRef(void 0),x=e.useRef(c);x.current=c;const A=e.useCallback(async(L,p,R)=>{if(a.current||r!==void 0&&r===b.current)return;a.current=!0;let T=!1;f.current&&(S(R?"loading":"fetching-more"),d(null));try{const C=await x.current(L,p);if(T||!f.current)return;r!==void 0&&(b.current=r),k.current=C.nextCursor,u(M=>R?[C.data]:[...M,C.data]),w(C.hasMore),g(p),S("success")}catch(C){if(T||!f.current)return;d(C instanceof Error?C:new Error(String(C))),S("error")}finally{T||(a.current=!1)}return()=>{T=!0}},[r]),F=e.useCallback(()=>{!y||a.current||A(k.current,m+1,!1)},[y,m,A]),h=e.useCallback(()=>{a.current=!1,b.current=void 0,k.current=n??null,u([]),S("idle"),d(null),w(!1),g(0)},[n]);e.useEffect(()=>(f.current=!0,s&&A(n??null,0,!0),()=>{f.current=!1}),[s]);const O=o.flat(),V=l==="fetching-more",D=O.length;return{data:O,pages:o,status:l,error:i,hasMore:y,isFetchingMore:V,fetchMore:F,reset:h,pageIndex:m,totalLoaded:D}}exports.useAnnounce=N.useAnnounce;exports.useClickOutside=N.useClickOutside;exports.useEscapeKey=N.useEscapeKey;exports.useFocusTrap=N.useFocusTrap;exports.useHighContrast=N.useHighContrast;exports.useReducedMotion=N.useReducedMotion;exports.useTkxForm=N.useTkxForm;exports.cx=J.cx;exports.extractAtomicCSS=J.extractAtomicCSS;exports.resetAtomicCSS=J.resetAtomicCSS;exports.tkxListPlugins=J.tkxListPlugins;exports.tkxPlugin=J.tkxPlugin;exports.tkxRemovePlugin=J.tkxRemovePlugin;exports.contrastRatio=q.contrastRatio;exports.cssVar=q.cssVar;exports.extractCSS=q.extractCSS;exports.injectStyles=q.injectStyles;exports.meetsAA=q.meetsAA;exports.meetsAAA=q.meetsAAA;exports.resetStyles=q.resetStyles;exports.sanitizeProps=B.sanitizeProps;exports.sanitizeString=B.sanitizeString;exports.useControllable=re;exports.useDebounce=te;exports.useDisclosure=Y;exports.useFormState=_;exports.useInfiniteQuery=le;exports.useIntersectionObserver=ue;exports.useListSelection=ee;exports.useLocalStorage=ce;exports.useMediaQuery=se;exports.useRovingTabIndex=Z;exports.useSSE=ae;exports.useThrottle=ne;exports.useWebSocket=oe;
package/dist/headless.js CHANGED
@@ -1,7 +1,7 @@
1
- import { a as ge, d as me, c as he, b as ye, f as Se, u as pe, g as we } from "./TkxForm-DSMDo2Ol.js";
2
- import { c as be, e as Ee, r as xe, b as Ie, d as Oe, f as De } from "./tkx-BJ10JtMv.js";
3
- import { f as Te, l as Ae, m as Ce, q as Me, s as ke, t as Fe, F as Le } from "./index-eT_U4qB2.js";
4
- import { b as Pe, s as Ne } from "./security-CzAmaMqa.js";
1
+ import { a as ge, d as me, c as he, b as ye, f as Se, u as pe, g as we } from "./TkxForm-br3i_vo8.js";
2
+ import { c as be, e as Ee, r as xe, b as Ie, d as Oe, f as De } from "./tkx-C_AlpMt4.js";
3
+ import { f as Te, l as Ae, m as Ce, q as Me, s as ke, t as Fe, F as Le } from "./index-CAXjeKoK.js";
4
+ import { b as Pe, s as Ne } from "./security-loRa1HyV.js";
5
5
  import { useState as S, useCallback as a, useRef as g, useMemo as X, useEffect as z } from "react";
6
6
  function Z(e = !1) {
7
7
  const [c, t] = S(e), r = a(() => t(!0), []), n = a(() => t(!1), []), o = a(() => t((s) => !s), []);
@@ -1,12 +1,12 @@
1
1
  import { createContext as C, createElement as y, useContext as D, useLayoutEffect as R, useEffect as j } from "react";
2
- const z = 2166136261, L = 16777619;
2
+ const N = 2166136261, z = 16777619;
3
3
  function E(n) {
4
- let e = z;
4
+ let e = N;
5
5
  for (let t = 0; t < n.length; t++)
6
- e ^= n.charCodeAt(t), e = Math.imul(e, L) >>> 0;
6
+ e ^= n.charCodeAt(t), e = Math.imul(e, z) >>> 0;
7
7
  return e.toString(16).padStart(8, "0");
8
8
  }
9
- class F {
9
+ class L {
10
10
  constructor(e = 512) {
11
11
  this.cache = /* @__PURE__ */ new Map(), this.hits = 0, this.misses = 0, this.ceiling = Math.min(e, 512);
12
12
  }
@@ -36,8 +36,8 @@ class F {
36
36
  return e === 0 ? 0 : this.hits / e * 100;
37
37
  }
38
38
  }
39
- const u = new F(512);
40
- function O(n, e) {
39
+ const u = new L(512);
40
+ function F(n, e) {
41
41
  const t = u.get(n);
42
42
  if (t !== void 0) return t;
43
43
  const a = e();
@@ -47,7 +47,7 @@ const A = [];
47
47
  let x = !1;
48
48
  const p = [];
49
49
  let b = 0, l = 0;
50
- function N() {
50
+ function O() {
51
51
  const n = A.splice(0), e = performance.now();
52
52
  for (const a of n)
53
53
  try {
@@ -59,7 +59,7 @@ function N() {
59
59
  }
60
60
  function B(n) {
61
61
  A.push(n), x || (x = !0, queueMicrotask(() => {
62
- N(), x = !1;
62
+ O(), x = !1;
63
63
  }));
64
64
  }
65
65
  function P(n) {
@@ -76,7 +76,7 @@ function V(n) {
76
76
  }
77
77
  const fe = {
78
78
  hash: E,
79
- memoize: O,
79
+ memoize: F,
80
80
  batchUpdate: B,
81
81
  invalidate: V,
82
82
  get avgRenderTime() {
@@ -149,8 +149,9 @@ const de = {
149
149
  resetStyles: _
150
150
  };
151
151
  function X(n) {
152
+ if (!n || typeof n != "string") return [0, 0, 0];
152
153
  const e = n.replace("#", ""), t = e.length === 3 ? e.split("").map((i) => i + i).join("") : e, a = parseInt(t.slice(0, 2), 16), s = parseInt(t.slice(2, 4), 16), r = parseInt(t.slice(4, 6), 16);
153
- return [a, s, r];
154
+ return [isNaN(a) ? 0 : a, isNaN(s) ? 0 : s, isNaN(r) ? 0 : r];
154
155
  }
155
156
  function w(n) {
156
157
  const [e, t, a] = X(n).map((s) => {
@@ -479,7 +480,7 @@ export {
479
480
  Ae as E,
480
481
  _ as F,
481
482
  Y as G,
482
- F as L,
483
+ L,
483
484
  fe as Q,
484
485
  de as T,
485
486
  pe as W,
@@ -504,7 +505,7 @@ export {
504
505
  g as s,
505
506
  Z as t,
506
507
  ge as u,
507
- O as v,
508
+ F as v,
508
509
  re as w,
509
510
  ae as x,
510
511
  S as y,
@@ -0,0 +1,2 @@
1
+ "use strict";const u=require("react"),G=2166136261,W=16777619;function v(n){let e=G;for(let t=0;t<n.length;t++)e^=n.charCodeAt(t),e=Math.imul(e,W)>>>0;return e.toString(16).padStart(8,"0")}class M{constructor(e=512){this.cache=new Map,this.hits=0,this.misses=0,this.ceiling=Math.min(e,512)}get(e){if(!this.cache.has(e)){this.misses++;return}this.hits++;const t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){this.cache.has(e)?this.cache.delete(e):this.cache.size>=this.ceiling&&this.cache.delete(this.cache.keys().next().value),this.cache.set(e,t)}has(e){return this.cache.has(e)}invalidate(e){e!==void 0?this.cache.delete(e):this.cache.clear()}get size(){return this.cache.size}get cacheHitRate(){const e=this.hits+this.misses;return e===0?0:this.hits/e*100}}const f=new M(512);function $(n,e){const t=f.get(n);if(t!==void 0)return t;const s=e();return f.set(n,s),s}const C=[];let b=!1;const m=[];let y=0,l=0;function _(){const n=C.splice(0),e=performance.now();for(const s of n)try{s()}catch{}const t=performance.now()-e;y+=t,l++,m.push({duration:t,timestamp:Date.now()}),m.length>100&&m.shift()}function H(n){C.push(n),b||(b=!0,queueMicrotask(()=>{_(),b=!1}))}function X(n){const e=n!==void 0?m.slice(-n):m.slice();return{avgRenderTime:l===0?0:y/l,cacheHitRate:f.cacheHitRate,renderCount:l,recent:e}}function Q(n){n!==void 0?f.invalidate(n):f.invalidate()}const Z={hash:v,memoize:$,batchUpdate:H,invalidate:Q,get avgRenderTime(){return l===0?0:y/l},get cacheHitRate(){return f.cacheHitRate},getMetrics:X},x=new Map;function R(n){return n.replace(/([A-Z])/g,"-$1").toLowerCase()}function J(n){return"tkx-"+v(n)}function j(n){const e=J(n);return x.has(e)||x.set(e,n),e}function D(n,...e){const t=n.reduce((r,a,i)=>r+a+(e[i]!==void 0?String(e[i]):""),"");return{className:j(t.trim()),styles:t.trim()}}function z(n){const e=Object.entries(n).map(([s,r])=>`${R(s)}: ${r};`).join(" ");return{className:j(e),styles:e}}const Y={xs:"480px",sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"};function N(n,e){return`@media (min-width: ${Y[n]}) { ${e} }`}function L(n,e){const t=Object.entries(e).map(([s,r])=>{const a=Object.entries(r).map(([i,o])=>`${R(i)}: ${o};`).join(" ");return`${s} { ${a} }`}).join(" ");return`@keyframes ${n} { ${t} }`}function w(n,e){return e!==void 0?`--tkx-${n}: ${e};`:`var(--tkx-${n})`}function A(){return Array.from(x.entries()).map(([n,e])=>`.${n} { ${e} }`).join(`
2
+ `)}function F(){x.clear()}function O(){if(typeof document>"u")return;let n=document.getElementById("tkx-styles");n||(n=document.createElement("style"),n.id="tkx-styles",document.head.appendChild(n)),n.textContent=A()}const ee={css:D,fromObject:z,responsive:N,keyframes:L,cssVar:w,extractCSS:A,injectStyles:O,resetStyles:F};function te(n){if(!n||typeof n!="string")return[0,0,0];const e=n.replace("#",""),t=e.length===3?e.split("").map(i=>i+i).join(""):e,s=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),a=parseInt(t.slice(4,6),16);return[isNaN(s)?0:s,isNaN(r)?0:r,isNaN(a)?0:a]}function S(n){const[e,t,s]=te(n).map(r=>{const a=r/255;return a<=.03928?a/12.92:((a+.055)/1.055)**2.4});return .2126*e+.7152*t+.0722*s}function d(n,e){const t=S(n),s=S(e),r=Math.max(t,s),a=Math.min(t,s);return(r+.05)/(a+.05)}function g(n,e,t=!1){return d(n,e)>=(t?3:4.5)}function B(n,e,t=!1){return d(n,e)>=(t?4.5:7)}function P(n,e){const s=e??["#ffffff","#000000"];return s.reduce((r,a)=>d(a,n)>d(r,n)?a:r,s[0])}function K(){const n=document.createElement("div"),e=document.createElement("div");for(const t of[n,e])t.setAttribute("aria-atomic","true"),t.style.cssText="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;",document.body.appendChild(t);return n.setAttribute("aria-live","polite"),e.setAttribute("aria-live","assertive"),{announce(t,s="polite"){const r=s==="assertive"?e:n;r.textContent="",setTimeout(()=>{r.textContent=t},0)},destroy(){n.remove(),e.remove()}}}const ne=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])',"details > summary"].join(", ");function U(n){let e=null,t=null;function s(){return Array.from(n.querySelectorAll(ne)).filter(r=>!r.closest("[hidden]")&&!r.closest('[aria-hidden="true"]'))}return{activate(){e=document.activeElement;const r=s();r.length>0&&r[0].focus(),t=a=>{if(a.key!=="Tab")return;const i=s();if(i.length===0)return;const o=i[0],p=i[i.length-1];a.shiftKey?document.activeElement===o&&(a.preventDefault(),p.focus()):document.activeElement===p&&(a.preventDefault(),o.focus())},n.addEventListener("keydown",t)},deactivate(){t&&n.removeEventListener("keydown",t),e instanceof HTMLElement&&e.focus(),e=null,t=null}}}function V(n,e,t,s){let r=e;switch(n.key){case"ArrowLeft":case"ArrowUp":n.preventDefault(),r=e===0?t-1:e-1;break;case"ArrowRight":case"ArrowDown":n.preventDefault(),r=e===t-1?0:e+1;break;case"Home":n.preventDefault(),r=0;break;case"End":n.preventDefault(),r=t-1;break;case"Enter":case" ":n.preventDefault(),s(e);return;default:return}s(r)}function re(n,e,t,s,r){let a=e;switch(n.key){case"ArrowUp":n.preventDefault(),a=e===0?t-1:e-1;break;case"ArrowDown":n.preventDefault(),a=e===t-1?0:e+1;break;case"Home":n.preventDefault(),a=0;break;case"End":n.preventDefault(),a=t-1;break;case"Enter":case" ":n.preventDefault(),s(e);return;case"Escape":n.preventDefault(),r==null||r();return;default:return}s(a)}function q(){return typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function I(){return typeof window>"u"?!1:window.matchMedia("(forced-colors: active)").matches}function se(n,e="polite"){if(typeof document>"u")return;let t=document.getElementById("tkx-live-region");t||(t=document.createElement("div"),t.id="tkx-live-region",t.setAttribute("aria-live",e),t.setAttribute("aria-atomic","true"),t.style.cssText="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;",document.body.appendChild(t)),t.textContent="",setTimeout(()=>{t&&(t.textContent=n)},0)}const ae={contrastRatio:d,meetsAA:g,meetsAAA:B,getAccessibleForeground:P,createAnnouncer:K,createFocusTrap:U,handleTabsKeyboard:V,handleMenuKeyboard:re,prefersReducedMotion:q,prefersHighContrast:I,announce:se},ie=typeof window<"u"?u.useLayoutEffect:u.useEffect,E={bg:"#0a0a0f",surface:"#12121a",surfaceAlt:"#1a1a2e",border:"#2a2a3e",text:"#e8e8f4",textMuted:"#8888aa",primary:"#00f5d4",secondary:"#7b2ff7",danger:"#f72585",warning:"#ffbe0b",success:"#06d6a0",info:"#3a86ff"},oe={bg:"#f8f6f1",surface:"#ffffff",surfaceAlt:"#f0ede6",border:"#ddd8cc",text:"#1a1815",textMuted:"#6b6560",primary:"#0d7c5f",secondary:"#6930c3",danger:"#c1121f",warning:"#d4a017",success:"#0d7c5f",info:"#1d4ed8"},ce=/^#[0-9a-fA-F]{3,8}$/;function le(n,e){const t={...n,...e};for(const[s,r]of Object.entries(t))if(!ce.test(r))throw new Error(`Invalid hex color for theme token '${s}': ${r}`);return g(t.text,t.bg)||console.warn(`[TekiVex] Theme contrast warning: text (${t.text}) vs bg (${t.bg}) does not meet WCAG AA minimum (4.5:1)`),g(t.primary,t.bg)||console.warn(`[TekiVex] Theme contrast warning: primary (${t.primary}) vs bg (${t.bg}) does not meet WCAG AA minimum`),t}const k=u.createContext(E);function ue({theme:n=E,children:e}){ie(()=>{const s=Object.entries(n).map(([a,i])=>w(a,i)).join(" ");let r=document.getElementById("tkx-theme");if(!r){r=document.createElement("style"),r.id="tkx-theme";const a=document.head.querySelector("style");a?document.head.insertBefore(r,a):document.head.appendChild(r)}r.textContent=`:root { ${s} }`},[n]);const t=Object.fromEntries(Object.entries(n).map(([s,r])=>[`--tkx-${s}`,r]));return u.createElement(k.Provider,{value:n},u.createElement("div",{style:{display:"contents",...t}},e))}function fe(){return u.useContext(k)}function de(n){const e=n.replace("#",""),t=parseInt(e.slice(0,2),16)/255,s=parseInt(e.slice(2,4),16)/255,r=parseInt(e.slice(4,6),16)/255,a=Math.max(t,s,r),i=Math.min(t,s,r);let o=0,p=0;const T=(a+i)/2;if(a!==i){const h=a-i;switch(p=T>.5?h/(2-a-i):h/(a+i),a){case t:o=((s-r)/h+(s<r?6:0))/6;break;case s:o=((r-t)/h+2)/6;break;case r:o=((t-s)/h+4)/6;break}}return[Math.round(o*360),Math.round(p*100),Math.round(T*100)]}function c(n,e,t){e/=100,t/=100;const s=e*Math.min(t,1-t),r=a=>{const i=(a+n/30)%12,o=t-s*Math.max(Math.min(i-3,9-i,1),-1);return Math.round(255*o).toString(16).padStart(2,"0")};return`#${r(0)}${r(8)}${r(4)}`}function pe(n){const[e,t]=de(n);return{50:c(e,Math.min(t,30),96),100:c(e,Math.min(t,40),90),200:c(e,Math.min(t,50),80),300:c(e,t,70),400:c(e,t,60),500:n,600:c(e,t,45),700:c(e,t,35),800:c(e,t,25),900:c(e,t,15)}}const he={xs:{fontSize:"0.75rem",lineHeight:"1rem"},sm:{fontSize:"0.875rem",lineHeight:"1.25rem"},base:{fontSize:"1rem",lineHeight:"1.5rem"},lg:{fontSize:"1.125rem",lineHeight:"1.75rem"},xl:{fontSize:"1.25rem",lineHeight:"1.75rem"},"2xl":{fontSize:"1.5rem",lineHeight:"2rem"},"3xl":{fontSize:"1.875rem",lineHeight:"2.25rem"},"4xl":{fontSize:"2.25rem",lineHeight:"2.5rem"},"5xl":{fontSize:"3rem",lineHeight:"1.15"}},me={0:"0px",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",4:"16px",5:"20px",6:"24px",8:"32px",10:"40px",12:"48px",16:"64px",20:"80px",24:"96px"},xe={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},ge={none:"none",xs:"0 1px 2px 0 rgba(0,0,0,0.05)",sm:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)"},be={hide:-1,base:0,dropdown:1e3,sticky:1100,fixed:1200,overlay:1300,modal:1400,popover:1500,tooltip:1600,toast:1700,max:9999},ve={none:"0",sm:"4px",md:"6px",lg:"8px",xl:"12px","2xl":"16px",full:"9999px"};exports.LRUCache=M;exports.Quantum=Z;exports.TKX=ee;exports.ThemeContext=k;exports.ThemeProvider=ue;exports.WCAGEngine=ae;exports.auroraLight=oe;exports.batchUpdate=H;exports.breakpoints=xe;exports.contrastRatio=d;exports.createAnnouncer=K;exports.createFocusTrap=U;exports.createTheme=le;exports.css=D;exports.cssVar=w;exports.extractCSS=A;exports.fnv1aHash=v;exports.fromObject=z;exports.generatePalette=pe;exports.getAccessibleForeground=P;exports.handleTabsKeyboard=V;exports.injectStyles=O;exports.keyframes=L;exports.meetsAA=g;exports.meetsAAA=B;exports.memoize=$;exports.prefersHighContrast=I;exports.prefersReducedMotion=q;exports.quantumDark=E;exports.radii=ve;exports.resetStyles=F;exports.responsive=N;exports.shadows=ge;exports.spacing=me;exports.typography=he;exports.useTheme=fe;exports.zIndex=be;