tekivex-ui 2.0.0
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/LICENSE +21 -0
- package/README.md +201 -0
- package/dist/index.cjs +70 -0
- package/dist/index.d.ts +89 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11002 -0
- package/dist/src/a11y/index.d.ts +24 -0
- package/dist/src/a11y/index.d.ts.map +1 -0
- package/dist/src/components/TkxAccordion.d.ts +32 -0
- package/dist/src/components/TkxAccordion.d.ts.map +1 -0
- package/dist/src/components/TkxAlert.d.ts +14 -0
- package/dist/src/components/TkxAlert.d.ts.map +1 -0
- package/dist/src/components/TkxAvatar.d.ts +14 -0
- package/dist/src/components/TkxAvatar.d.ts.map +1 -0
- package/dist/src/components/TkxBadge.d.ts +12 -0
- package/dist/src/components/TkxBadge.d.ts.map +1 -0
- package/dist/src/components/TkxButton.d.ts +17 -0
- package/dist/src/components/TkxButton.d.ts.map +1 -0
- package/dist/src/components/TkxCard.d.ts +20 -0
- package/dist/src/components/TkxCard.d.ts.map +1 -0
- package/dist/src/components/TkxCarousel.d.ts +32 -0
- package/dist/src/components/TkxCarousel.d.ts.map +1 -0
- package/dist/src/components/TkxChat.d.ts +32 -0
- package/dist/src/components/TkxChat.d.ts.map +1 -0
- package/dist/src/components/TkxCheckbox.d.ts +13 -0
- package/dist/src/components/TkxCheckbox.d.ts.map +1 -0
- package/dist/src/components/TkxClock.d.ts +23 -0
- package/dist/src/components/TkxClock.d.ts.map +1 -0
- package/dist/src/components/TkxColorPicker.d.ts +18 -0
- package/dist/src/components/TkxColorPicker.d.ts.map +1 -0
- package/dist/src/components/TkxCommand.d.ts +34 -0
- package/dist/src/components/TkxCommand.d.ts.map +1 -0
- package/dist/src/components/TkxDatePicker.d.ts +47 -0
- package/dist/src/components/TkxDatePicker.d.ts.map +1 -0
- package/dist/src/components/TkxDivider.d.ts +8 -0
- package/dist/src/components/TkxDivider.d.ts.map +1 -0
- package/dist/src/components/TkxDrawer.d.ts +16 -0
- package/dist/src/components/TkxDrawer.d.ts.map +1 -0
- package/dist/src/components/TkxFileUpload.d.ts +16 -0
- package/dist/src/components/TkxFileUpload.d.ts.map +1 -0
- package/dist/src/components/TkxIcon.d.ts +16 -0
- package/dist/src/components/TkxIcon.d.ts.map +1 -0
- package/dist/src/components/TkxImage.d.ts +16 -0
- package/dist/src/components/TkxImage.d.ts.map +1 -0
- package/dist/src/components/TkxInput.d.ts +13 -0
- package/dist/src/components/TkxInput.d.ts.map +1 -0
- package/dist/src/components/TkxLogo.d.ts +21 -0
- package/dist/src/components/TkxLogo.d.ts.map +1 -0
- package/dist/src/components/TkxMenu.d.ts +64 -0
- package/dist/src/components/TkxMenu.d.ts.map +1 -0
- package/dist/src/components/TkxModal.d.ts +14 -0
- package/dist/src/components/TkxModal.d.ts.map +1 -0
- package/dist/src/components/TkxNumberInput.d.ts +32 -0
- package/dist/src/components/TkxNumberInput.d.ts.map +1 -0
- package/dist/src/components/TkxOTP.d.ts +24 -0
- package/dist/src/components/TkxOTP.d.ts.map +1 -0
- package/dist/src/components/TkxPagination.d.ts +19 -0
- package/dist/src/components/TkxPagination.d.ts.map +1 -0
- package/dist/src/components/TkxProgress.d.ts +13 -0
- package/dist/src/components/TkxProgress.d.ts.map +1 -0
- package/dist/src/components/TkxRadio.d.ts +22 -0
- package/dist/src/components/TkxRadio.d.ts.map +1 -0
- package/dist/src/components/TkxRating.d.ts +18 -0
- package/dist/src/components/TkxRating.d.ts.map +1 -0
- package/dist/src/components/TkxSelect.d.ts +37 -0
- package/dist/src/components/TkxSelect.d.ts.map +1 -0
- package/dist/src/components/TkxSkeleton.d.ts +12 -0
- package/dist/src/components/TkxSkeleton.d.ts.map +1 -0
- package/dist/src/components/TkxSlider.d.ts +33 -0
- package/dist/src/components/TkxSlider.d.ts.map +1 -0
- package/dist/src/components/TkxStepper.d.ts +31 -0
- package/dist/src/components/TkxStepper.d.ts.map +1 -0
- package/dist/src/components/TkxTable.d.ts +23 -0
- package/dist/src/components/TkxTable.d.ts.map +1 -0
- package/dist/src/components/TkxTabs.d.ts +32 -0
- package/dist/src/components/TkxTabs.d.ts.map +1 -0
- package/dist/src/components/TkxTag.d.ts +30 -0
- package/dist/src/components/TkxTag.d.ts.map +1 -0
- package/dist/src/components/TkxTimeline.d.ts +20 -0
- package/dist/src/components/TkxTimeline.d.ts.map +1 -0
- package/dist/src/components/TkxToast.d.ts +23 -0
- package/dist/src/components/TkxToast.d.ts.map +1 -0
- package/dist/src/components/TkxToggle.d.ts +11 -0
- package/dist/src/components/TkxToggle.d.ts.map +1 -0
- package/dist/src/components/TkxTooltip.d.ts +10 -0
- package/dist/src/components/TkxTooltip.d.ts.map +1 -0
- package/dist/src/components/TkxVideoPlayer.d.ts +43 -0
- package/dist/src/components/TkxVideoPlayer.d.ts.map +1 -0
- package/dist/src/components/index.d.ts +41 -0
- package/dist/src/components/index.d.ts.map +1 -0
- package/dist/src/engine/css.d.ts +24 -0
- package/dist/src/engine/css.d.ts.map +1 -0
- package/dist/src/engine/index.d.ts +10 -0
- package/dist/src/engine/index.d.ts.map +1 -0
- package/dist/src/engine/quantum.d.ts +47 -0
- package/dist/src/engine/quantum.d.ts.map +1 -0
- package/dist/src/engine/security.d.ts +54 -0
- package/dist/src/engine/security.d.ts.map +1 -0
- package/dist/src/engine/tkx.d.ts +29 -0
- package/dist/src/engine/tkx.d.ts.map +1 -0
- package/dist/src/engine/wcag.d.ts +34 -0
- package/dist/src/engine/wcag.d.ts.map +1 -0
- package/dist/src/hooks/index.d.ts +8 -0
- package/dist/src/hooks/index.d.ts.map +1 -0
- package/dist/src/themes/index.d.ts +26 -0
- package/dist/src/themes/index.d.ts.map +1 -0
- package/dist/style.css +1 -0
- package/dist/tests/TkxButton.test.d.ts +2 -0
- package/dist/tests/TkxButton.test.d.ts.map +1 -0
- package/dist/tests/a11y/components.test.d.ts +2 -0
- package/dist/tests/a11y/components.test.d.ts.map +1 -0
- package/dist/tests/quantum.test.d.ts +2 -0
- package/dist/tests/quantum.test.d.ts.map +1 -0
- package/dist/tests/security.test.d.ts +2 -0
- package/dist/tests/security.test.d.ts.map +1 -0
- package/dist/tests/setup.d.ts +2 -0
- package/dist/tests/setup.d.ts.map +1 -0
- package/dist/tests/tkx.test.d.ts +2 -0
- package/dist/tests/tkx.test.d.ts.map +1 -0
- package/dist/tests/wcag.test.d.ts +2 -0
- package/dist/tests/wcag.test.d.ts.map +1 -0
- package/package.json +78 -0
- package/src/a11y/index.tsx +87 -0
- package/src/components/TkxAccordion.tsx +588 -0
- package/src/components/TkxAlert.tsx +91 -0
- package/src/components/TkxAvatar.tsx +101 -0
- package/src/components/TkxBadge.tsx +73 -0
- package/src/components/TkxButton.tsx +153 -0
- package/src/components/TkxCard.tsx +92 -0
- package/src/components/TkxCarousel.tsx +552 -0
- package/src/components/TkxChat.tsx +354 -0
- package/src/components/TkxCheckbox.tsx +218 -0
- package/src/components/TkxClock.tsx +601 -0
- package/src/components/TkxColorPicker.tsx +633 -0
- package/src/components/TkxCommand.tsx +644 -0
- package/src/components/TkxDatePicker.tsx +1567 -0
- package/src/components/TkxDivider.tsx +49 -0
- package/src/components/TkxDrawer.tsx +234 -0
- package/src/components/TkxFileUpload.tsx +371 -0
- package/src/components/TkxIcon.tsx +683 -0
- package/src/components/TkxImage.tsx +277 -0
- package/src/components/TkxInput.tsx +101 -0
- package/src/components/TkxLogo.tsx +297 -0
- package/src/components/TkxMenu.tsx +1042 -0
- package/src/components/TkxModal.tsx +119 -0
- package/src/components/TkxNumberInput.tsx +408 -0
- package/src/components/TkxOTP.tsx +295 -0
- package/src/components/TkxPagination.tsx +388 -0
- package/src/components/TkxProgress.tsx +114 -0
- package/src/components/TkxRadio.tsx +284 -0
- package/src/components/TkxRating.tsx +286 -0
- package/src/components/TkxSelect.tsx +923 -0
- package/src/components/TkxSkeleton.tsx +105 -0
- package/src/components/TkxSlider.tsx +492 -0
- package/src/components/TkxStepper.tsx +485 -0
- package/src/components/TkxTable.tsx +148 -0
- package/src/components/TkxTabs.tsx +124 -0
- package/src/components/TkxTag.tsx +319 -0
- package/src/components/TkxTimeline.tsx +303 -0
- package/src/components/TkxToast.tsx +284 -0
- package/src/components/TkxToggle.tsx +93 -0
- package/src/components/TkxTooltip.tsx +69 -0
- package/src/components/TkxVideoPlayer.tsx +1013 -0
- package/src/components/index.ts +40 -0
- package/src/engine/css.ts +126 -0
- package/src/engine/index.ts +10 -0
- package/src/engine/quantum.ts +207 -0
- package/src/engine/security.ts +217 -0
- package/src/engine/tkx.ts +874 -0
- package/src/engine/wcag.ts +275 -0
- package/src/hooks/index.ts +120 -0
- package/src/styles/global.css +167 -0
- package/src/themes/index.ts +111 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TkxVideoPlayer.d.ts","sourceRoot":"","sources":["../../../src/components/TkxVideoPlayer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,aAAa,EAEnB,MAAM,OAAO,CAAC;AAOf,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAmGD,wBAAgB,cAAc,CAAC,EAC7B,GAAG,EACH,MAAM,EACN,KAAK,EACL,KAAc,EACd,MAAM,EACN,QAAgB,EAChB,IAAY,EACZ,KAAK,EAAE,YAAoB,EAC3B,QAAe,EACf,SAAgB,EAChB,eAAsB,EACtB,QAAe,EACf,aAAqB,EACrB,QAAa,EACb,SAAc,EACd,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,YAAY,EACZ,SAAS,EACT,KAAK,GACN,EAAE,mBAAmB,2CAu0BrB;yBA91Be,cAAc"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export * from './TkxButton';
|
|
2
|
+
export * from './TkxCard';
|
|
3
|
+
export * from './TkxInput';
|
|
4
|
+
export * from './TkxBadge';
|
|
5
|
+
export * from './TkxProgress';
|
|
6
|
+
export * from './TkxToggle';
|
|
7
|
+
export * from './TkxAlert';
|
|
8
|
+
export * from './TkxModal';
|
|
9
|
+
export * from './TkxTabs';
|
|
10
|
+
export * from './TkxTooltip';
|
|
11
|
+
export * from './TkxSkeleton';
|
|
12
|
+
export * from './TkxAvatar';
|
|
13
|
+
export * from './TkxTable';
|
|
14
|
+
export * from './TkxDivider';
|
|
15
|
+
export * from './TkxIcon';
|
|
16
|
+
export * from './TkxLogo';
|
|
17
|
+
export * from './TkxSelect';
|
|
18
|
+
export * from './TkxCheckbox';
|
|
19
|
+
export * from './TkxRadio';
|
|
20
|
+
export * from './TkxToast';
|
|
21
|
+
export * from './TkxAccordion';
|
|
22
|
+
export * from './TkxDrawer';
|
|
23
|
+
export * from './TkxChat';
|
|
24
|
+
export * from './TkxTag';
|
|
25
|
+
export * from './TkxTimeline';
|
|
26
|
+
export * from './TkxDatePicker';
|
|
27
|
+
export * from './TkxSlider';
|
|
28
|
+
export * from './TkxPagination';
|
|
29
|
+
export * from './TkxImage';
|
|
30
|
+
export * from './TkxFileUpload';
|
|
31
|
+
export * from './TkxRating';
|
|
32
|
+
export * from './TkxMenu';
|
|
33
|
+
export * from './TkxClock';
|
|
34
|
+
export * from './TkxVideoPlayer';
|
|
35
|
+
export * from './TkxStepper';
|
|
36
|
+
export * from './TkxColorPicker';
|
|
37
|
+
export * from './TkxNumberInput';
|
|
38
|
+
export * from './TkxOTP';
|
|
39
|
+
export * from './TkxCommand';
|
|
40
|
+
export * from './TkxCarousel';
|
|
41
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ProcessedCSS {
|
|
2
|
+
className: string;
|
|
3
|
+
styles: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function css(strings: TemplateStringsArray, ...values: unknown[]): ProcessedCSS;
|
|
6
|
+
export declare function fromObject(styleObject: Record<string, unknown>): ProcessedCSS;
|
|
7
|
+
export type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
8
|
+
export declare function responsive(breakpoint: Breakpoint, styles: string): string;
|
|
9
|
+
export declare function keyframes(name: string, frames: Record<string, Record<string, unknown>>): string;
|
|
10
|
+
export declare function cssVar(name: string, value?: string): string;
|
|
11
|
+
export declare function extractCSS(): string;
|
|
12
|
+
export declare function resetStyles(): void;
|
|
13
|
+
export declare function injectStyles(): void;
|
|
14
|
+
export declare const TKX: {
|
|
15
|
+
css: typeof css;
|
|
16
|
+
fromObject: typeof fromObject;
|
|
17
|
+
responsive: typeof responsive;
|
|
18
|
+
keyframes: typeof keyframes;
|
|
19
|
+
cssVar: typeof cssVar;
|
|
20
|
+
extractCSS: typeof extractCSS;
|
|
21
|
+
injectStyles: typeof injectStyles;
|
|
22
|
+
resetStyles: typeof resetStyles;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../src/engine/css.ts"],"names":[],"mappings":"AA2BA,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,GAAG,CAAC,OAAO,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,CAMrF;AAID,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAM7E;AAID,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAWlE,wBAAgB,UAAU,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEzE;AAID,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAC9C,MAAM,CAUR;AAID,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAK3D;AAID,wBAAgB,UAAU,IAAI,MAAM,CAInC;AAED,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED,wBAAgB,YAAY,IAAI,IAAI,CASnC;AAED,eAAO,MAAM,GAAG;;;;;;;;;CASf,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './quantum';
|
|
2
|
+
export * from './security';
|
|
3
|
+
export * from './wcag';
|
|
4
|
+
export * from './css';
|
|
5
|
+
export * from './tkx';
|
|
6
|
+
export { Quantum } from './quantum';
|
|
7
|
+
export { Shield } from './security';
|
|
8
|
+
export { WCAGEngine } from './wcag';
|
|
9
|
+
export { TKX } from './css';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/engine/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AAEtB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare function fnv1aHash(input: string): string;
|
|
2
|
+
export declare class LRUCache<K, V> {
|
|
3
|
+
private cache;
|
|
4
|
+
private hits;
|
|
5
|
+
private misses;
|
|
6
|
+
readonly ceiling: number;
|
|
7
|
+
constructor(ceiling?: number);
|
|
8
|
+
get(key: K): V | undefined;
|
|
9
|
+
set(key: K, value: V): void;
|
|
10
|
+
has(key: K): boolean;
|
|
11
|
+
invalidate(key?: K): void;
|
|
12
|
+
get size(): number;
|
|
13
|
+
get cacheHitRate(): number;
|
|
14
|
+
}
|
|
15
|
+
export declare function memoize<T>(key: string, fn: () => T): T;
|
|
16
|
+
export type Priority = 'critical' | 'normal' | 'low';
|
|
17
|
+
export declare class RenderQueue {
|
|
18
|
+
private queue;
|
|
19
|
+
enqueue(id: string, task: () => void, priority?: Priority): void;
|
|
20
|
+
flush(): void;
|
|
21
|
+
get depth(): number;
|
|
22
|
+
}
|
|
23
|
+
interface RenderMetric {
|
|
24
|
+
duration: number;
|
|
25
|
+
timestamp: number;
|
|
26
|
+
}
|
|
27
|
+
export declare function batchUpdate(fn: () => void): void;
|
|
28
|
+
export interface Metrics {
|
|
29
|
+
avgRenderTime: number;
|
|
30
|
+
cacheHitRate: number;
|
|
31
|
+
renderCount: number;
|
|
32
|
+
}
|
|
33
|
+
export declare function getMetrics(n?: number): Metrics & {
|
|
34
|
+
recent: RenderMetric[];
|
|
35
|
+
};
|
|
36
|
+
export declare function invalidateCache(key?: string): void;
|
|
37
|
+
export declare const Quantum: {
|
|
38
|
+
hash: typeof fnv1aHash;
|
|
39
|
+
memoize: typeof memoize;
|
|
40
|
+
batchUpdate: typeof batchUpdate;
|
|
41
|
+
invalidate: typeof invalidateCache;
|
|
42
|
+
readonly avgRenderTime: number;
|
|
43
|
+
readonly cacheHitRate: number;
|
|
44
|
+
getMetrics: typeof getMetrics;
|
|
45
|
+
};
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=quantum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quantum.d.ts","sourceRoot":"","sources":["../../../src/engine/quantum.ts"],"names":[],"mappings":"AAQA,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAO/C;AAID,qBAAa,QAAQ,CAAC,CAAC,EAAE,CAAC;IACxB,OAAO,CAAC,KAAK,CAAmB;IAChC,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,MAAM,CAAK;IACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEb,OAAO,SAAM;IAIzB,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAa1B,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAU3B,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO;IAIpB,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI;IAQzB,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,YAAY,IAAI,MAAM,CAGzB;CACF;AAMD,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAMtD;AAID,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,CAAC;AAerD,qBAAa,WAAW;IACtB,OAAO,CAAC,KAAK,CAAoB;IAEjC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,IAAI,EAAE,QAAQ,GAAE,QAAmB,GAAG,IAAI;IAI1E,KAAK,IAAI,IAAI;IAYb,IAAI,KAAK,IAAI,MAAM,CAElB;CACF;AAID,UAAU,YAAY;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAyBD,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAShD;AAID,MAAM,WAAW,OAAO;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,UAAU,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG;IAAE,MAAM,EAAE,YAAY,EAAE,CAAA;CAAE,CAQ3E;AAED,wBAAgB,eAAe,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAMlD;AAED,eAAO,MAAM,OAAO;;;;;;;;CAYnB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export declare function sanitizeString(input: unknown): string;
|
|
2
|
+
export declare function sanitizeProps<T extends Record<string, unknown>>(props: T): T;
|
|
3
|
+
export interface PropSchema {
|
|
4
|
+
type: 'string' | 'number' | 'boolean' | 'function' | 'object';
|
|
5
|
+
required?: boolean;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
pattern?: RegExp;
|
|
9
|
+
enum?: unknown[];
|
|
10
|
+
}
|
|
11
|
+
export interface ValidationResult {
|
|
12
|
+
valid: boolean;
|
|
13
|
+
errors: string[];
|
|
14
|
+
}
|
|
15
|
+
export declare function validateProps(props: Record<string, unknown>, schema: Record<string, PropSchema>): ValidationResult;
|
|
16
|
+
export interface ComponentPermissions {
|
|
17
|
+
allowInlineStyles?: boolean;
|
|
18
|
+
allowDataUrls?: boolean;
|
|
19
|
+
allowExternalSrc?: boolean;
|
|
20
|
+
allowScripts?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface CSPDirectives {
|
|
23
|
+
componentId: string;
|
|
24
|
+
permissions: ComponentPermissions;
|
|
25
|
+
directives: Record<string, string[]>;
|
|
26
|
+
}
|
|
27
|
+
export declare function createCSP(componentId: string, permissions: ComponentPermissions): CSPDirectives;
|
|
28
|
+
export declare function hasPermission(componentId: string, permission: keyof ComponentPermissions): boolean;
|
|
29
|
+
export interface AuditEntry {
|
|
30
|
+
readonly timestamp: number;
|
|
31
|
+
readonly component: string;
|
|
32
|
+
readonly action: string;
|
|
33
|
+
readonly propsHash: string;
|
|
34
|
+
readonly chainHash: string;
|
|
35
|
+
}
|
|
36
|
+
export interface AuditFilter {
|
|
37
|
+
component?: string;
|
|
38
|
+
action?: string;
|
|
39
|
+
limit?: number;
|
|
40
|
+
}
|
|
41
|
+
export declare function audit(action: string, component: string, meta?: Record<string, unknown>): AuditEntry;
|
|
42
|
+
export declare function getAuditLog(filter?: AuditFilter): readonly AuditEntry[];
|
|
43
|
+
export declare function verifyAuditIntegrity(): boolean;
|
|
44
|
+
export declare const Shield: {
|
|
45
|
+
sanitize: typeof sanitizeString;
|
|
46
|
+
sanitizeProps: typeof sanitizeProps;
|
|
47
|
+
validateProps: typeof validateProps;
|
|
48
|
+
createCSP: typeof createCSP;
|
|
49
|
+
hasPermission: typeof hasPermission;
|
|
50
|
+
audit: typeof audit;
|
|
51
|
+
getAuditLog: typeof getAuditLog;
|
|
52
|
+
verifyAuditIntegrity: typeof verifyAuditIntegrity;
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=security.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../../src/engine/security.ts"],"names":[],"mappings":"AAeA,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAErD;AAED,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAM5E;AAiBD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GACjC,gBAAgB,CAwClB;AAID,MAAM,WAAW,oBAAoB;IACnC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,oBAAoB,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACtC;AAID,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,oBAAoB,GAAG,aAAa,CAe/F;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,GAAG,OAAO,CAGlG;AAID,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAID,wBAAgB,KAAK,CACnB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,UAAU,CAeZ;AAED,wBAAgB,WAAW,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,UAAU,EAAE,CAcvE;AAED,wBAAgB,oBAAoB,IAAI,OAAO,CAU9C;AAED,eAAO,MAAM,MAAM;;;;;;;;;CASlB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type TkxInput = string | false | null | undefined | TkxInput[] | Record<string, boolean>;
|
|
2
|
+
/**
|
|
3
|
+
* TKX — The utility class engine.
|
|
4
|
+
*
|
|
5
|
+
* Better than Tailwind because:
|
|
6
|
+
* - TRUE conflict resolution (p-4 p-8 → one class with padding:32px, no cascade hacks)
|
|
7
|
+
* - Theme-aware tokens read from CSS variables automatically
|
|
8
|
+
* - Single merged class per call — cleaner DOM
|
|
9
|
+
* - No config, no plugins, no PostCSS, no purge
|
|
10
|
+
* - Works SSR-first
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* tkx('flex items-center gap-4 p-4 bg-surface rounded-lg')
|
|
14
|
+
* tkx('flex', { 'bg-primary': isActive, 'bg-surface': !isActive }, ['p-4', '@md:p-8'])
|
|
15
|
+
* tkx('text-primary hover:text-secondary transition-colors duration-200')
|
|
16
|
+
*/
|
|
17
|
+
export declare function tkx(...inputs: TkxInput[]): string;
|
|
18
|
+
/** Alias — shorter to type in JSX */
|
|
19
|
+
export declare const tx: typeof tkx;
|
|
20
|
+
/** Extract all registered CSS for server-side rendering injection */
|
|
21
|
+
export declare function extractAtomicCSS(): string;
|
|
22
|
+
/** Reset registry (useful for per-request SSR isolation) */
|
|
23
|
+
export declare function resetAtomicCSS(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Merge existing class name strings without generating new CSS.
|
|
26
|
+
* Use this to combine a tkx() result with a consumer-provided className prop.
|
|
27
|
+
*/
|
|
28
|
+
export declare function cx(...classes: (string | false | null | undefined)[]): string;
|
|
29
|
+
//# sourceMappingURL=tkx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tkx.d.ts","sourceRoot":"","sources":["../../../src/engine/tkx.ts"],"names":[],"mappings":"AA2tBA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAmBhG;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,GAAG,CAAC,GAAG,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAmFjD;AAED,qCAAqC;AACrC,eAAO,MAAM,EAAE,YAAM,CAAC;AAItB,qEAAqE;AACrE,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,4DAA4D;AAC5D,wBAAgB,cAAc,IAAI,IAAI,CAGrC;AAGD;;;GAGG;AACH,wBAAgB,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM,CAE5E"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare function relativeLuminance(hex: string): number;
|
|
2
|
+
export declare function contrastRatio(fg: string, bg: string): number;
|
|
3
|
+
export declare function meetsAA(fg: string, bg: string, largeText?: boolean): boolean;
|
|
4
|
+
export declare function meetsAAA(fg: string, bg: string, largeText?: boolean): boolean;
|
|
5
|
+
export declare function getAccessibleForeground(bg: string, candidates?: string[]): string;
|
|
6
|
+
export interface Announcer {
|
|
7
|
+
announce(message: string, politeness?: 'polite' | 'assertive'): void;
|
|
8
|
+
destroy(): void;
|
|
9
|
+
}
|
|
10
|
+
export declare function createAnnouncer(): Announcer;
|
|
11
|
+
export interface FocusTrap {
|
|
12
|
+
activate(): void;
|
|
13
|
+
deactivate(): void;
|
|
14
|
+
}
|
|
15
|
+
export declare function createFocusTrap(container: HTMLElement): FocusTrap;
|
|
16
|
+
export declare function handleTabsKeyboard(e: KeyboardEvent, currentIndex: number, tabCount: number, onSelect: (index: number) => void): void;
|
|
17
|
+
export declare function handleMenuKeyboard(e: KeyboardEvent, currentIndex: number, itemCount: number, onSelect: (index: number) => void, onClose?: () => void): void;
|
|
18
|
+
export declare function prefersReducedMotion(): boolean;
|
|
19
|
+
export declare function prefersHighContrast(): boolean;
|
|
20
|
+
export declare function announceToScreenReader(message: string, politeness?: 'polite' | 'assertive'): void;
|
|
21
|
+
export declare const WCAGEngine: {
|
|
22
|
+
contrastRatio: typeof contrastRatio;
|
|
23
|
+
meetsAA: typeof meetsAA;
|
|
24
|
+
meetsAAA: typeof meetsAAA;
|
|
25
|
+
getAccessibleForeground: typeof getAccessibleForeground;
|
|
26
|
+
createAnnouncer: typeof createAnnouncer;
|
|
27
|
+
createFocusTrap: typeof createFocusTrap;
|
|
28
|
+
handleTabsKeyboard: typeof handleTabsKeyboard;
|
|
29
|
+
handleMenuKeyboard: typeof handleMenuKeyboard;
|
|
30
|
+
prefersReducedMotion: typeof prefersReducedMotion;
|
|
31
|
+
prefersHighContrast: typeof prefersHighContrast;
|
|
32
|
+
announce: typeof announceToScreenReader;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=wcag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wcag.d.ts","sourceRoot":"","sources":["../../../src/engine/wcag.ts"],"names":[],"mappings":"AAgBA,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMrD;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAM5D;AAED,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAG,OAAO,CAE1E;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAG,OAAO,CAE3E;AAED,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAMjF;AAID,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,IAAI,CAAC;IACrE,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,wBAAgB,eAAe,IAAI,SAAS,CA2B3C;AAcD,MAAM,WAAW,SAAS;IACxB,QAAQ,IAAI,IAAI,CAAC;IACjB,UAAU,IAAI,IAAI,CAAC;CACpB;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,WAAW,GAAG,SAAS,CA8CjE;AAID,wBAAgB,kBAAkB,CAChC,CAAC,EAAE,aAAa,EAChB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAChC,IAAI,CAgCN;AAED,wBAAgB,kBAAkB,CAChC,CAAC,EAAE,aAAa,EAChB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,EACjC,OAAO,CAAC,EAAE,MAAM,IAAI,GACnB,IAAI,CAkCN;AAID,wBAAgB,oBAAoB,IAAI,OAAO,CAG9C;AAED,wBAAgB,mBAAmB,IAAI,OAAO,CAG7C;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,GAAE,QAAQ,GAAG,WAAsB,GAAG,IAAI,CAgB3G;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;CAYtB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
export declare function useReducedMotion(): boolean;
|
|
3
|
+
export declare function useHighContrast(): boolean;
|
|
4
|
+
export declare function useFocusTrap(active: boolean): RefObject<HTMLElement | null>;
|
|
5
|
+
export declare function useAnnounce(): (message: string, politeness?: 'polite' | 'assertive') => void;
|
|
6
|
+
export declare function useEscapeKey(handler: () => void, active?: boolean): void;
|
|
7
|
+
export declare function useClickOutside(ref: RefObject<HTMLElement | null>, handler: () => void): void;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAWf,wBAAgB,gBAAgB,IAAI,OAAO,CAe1C;AAID,wBAAgB,eAAe,IAAI,OAAO,CAezC;AAID,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAW3E;AAID,wBAAgB,WAAW,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,QAAQ,GAAG,WAAW,KAAK,IAAI,CAc5F;AAID,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,MAAM,UAAO,GAAG,IAAI,CAYrE;AAID,wBAAgB,eAAe,CAC7B,GAAG,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAClC,OAAO,EAAE,MAAM,IAAI,GAClB,IAAI,CAYN"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface ThemeTokens {
|
|
3
|
+
bg: string;
|
|
4
|
+
surface: string;
|
|
5
|
+
surfaceAlt: string;
|
|
6
|
+
border: string;
|
|
7
|
+
text: string;
|
|
8
|
+
textMuted: string;
|
|
9
|
+
primary: string;
|
|
10
|
+
secondary: string;
|
|
11
|
+
danger: string;
|
|
12
|
+
warning: string;
|
|
13
|
+
success: string;
|
|
14
|
+
info: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const quantumDark: ThemeTokens;
|
|
17
|
+
export declare const auroraLight: ThemeTokens;
|
|
18
|
+
export declare function createTheme(base: ThemeTokens, overrides?: Partial<ThemeTokens>): ThemeTokens;
|
|
19
|
+
export declare const ThemeContext: import("react").Context<ThemeTokens>;
|
|
20
|
+
export interface ThemeProviderProps {
|
|
21
|
+
theme?: ThemeTokens;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export declare function ThemeProvider({ theme, children }: ThemeProviderProps): import("react").FunctionComponentElement<import("react").ProviderProps<ThemeTokens>>;
|
|
25
|
+
export declare function useTheme(): ThemeTokens;
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/themes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,SAAS,EAAiB,MAAM,OAAO,CAAC;AAM5F,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAID,eAAO,MAAM,WAAW,EAAE,WAazB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAazB,CAAC;AAMF,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,CAuB5F;AAID,eAAO,MAAM,YAAY,sCAA0C,CAAC;AAEpE,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAmB,EAAE,QAAQ,EAAE,EAAE,kBAAkB,wFAelF;AAED,wBAAgB,QAAQ,IAAI,WAAW,CAEtC"}
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,*:before,*:after{box-sizing:border-box}:root{--tkx-bg: #0a0a0f;--tkx-surface: #12121a;--tkx-surfaceAlt: #1a1a2e;--tkx-border: #2a2a3e;--tkx-text: #e8e8f4;--tkx-textMuted: #8888aa;--tkx-primary: #00f5d4;--tkx-secondary: #7b2ff7;--tkx-danger: #f72585;--tkx-warning: #ffbe0b;--tkx-success: #06d6a0;--tkx-info: #3a86ff;--tkx-space-xs: 4px;--tkx-space-sm: 8px;--tkx-space-md: 16px;--tkx-space-lg: 24px;--tkx-space-xl: 32px;--tkx-radius-sm: 4px;--tkx-radius-md: 8px;--tkx-radius-lg: 12px;--tkx-radius-full: 9999px;--tkx-font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--tkx-font-mono: "Cascadia Code", "Fira Code", "Consolas", monospace;--tkx-transition: .2s ease;--tkx-transition-fast: .1s ease}.tkx-focus-ring:focus-visible{outline:2px solid var(--tkx-primary);outline-offset:2px;border-radius:2px}:focus:not(:focus-visible){outline:none}.tkx-skip-nav{position:absolute;top:-9999px;left:0;z-index:9999;padding:8px 16px;background:var(--tkx-primary);color:var(--tkx-bg);font-weight:600;text-decoration:none;border-radius:0 0 4px;transition:top var(--tkx-transition-fast)}.tkx-skip-nav:focus{top:0;outline:2px solid var(--tkx-bg);outline-offset:2px}.tkx-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes tkx-fade-in{0%{opacity:0}to{opacity:1}}@keyframes tkx-slide-up{0%{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes tkx-pulse{0%,to{opacity:1}50%{opacity:.4}}@keyframes tkx-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes tkx-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@keyframes tkx-ripple{0%{transform:scale(0);opacity:.6}to{transform:scale(4);opacity:0}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}@media (prefers-contrast: more){:root{--tkx-border: currentColor}.tkx-focus-ring:focus-visible{outline-width:3px}}@media (forced-colors: active){.tkx-button,.tkx-badge,.tkx-toggle,.tkx-input,.tkx-card{forced-color-adjust:none}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TkxButton.test.d.ts","sourceRoot":"","sources":["../../tests/TkxButton.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.test.d.ts","sourceRoot":"","sources":["../../../tests/a11y/components.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quantum.test.d.ts","sourceRoot":"","sources":["../../tests/quantum.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security.test.d.ts","sourceRoot":"","sources":["../../tests/security.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../tests/setup.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tkx.test.d.ts","sourceRoot":"","sources":["../../tests/tkx.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wcag.test.d.ts","sourceRoot":"","sources":["../../tests/wcag.test.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tekivex-ui",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Quantum-Class Component Framework — WCAG 2.1 AAA, WAI-ARIA 1.2, Zero-Trust Security",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.cjs",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"./styles": "./dist/index.css",
|
|
16
|
+
"./themes": {
|
|
17
|
+
"import": "./dist/themes.js",
|
|
18
|
+
"require": "./dist/themes.cjs"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"sideEffects": ["*.css"],
|
|
22
|
+
"files": ["dist", "src"],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "vite build && tsc --emitDeclarationOnly",
|
|
25
|
+
"dev": "vite",
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test:watch": "vitest",
|
|
28
|
+
"test:coverage": "vitest run --coverage",
|
|
29
|
+
"lint": "eslint src --ext .ts,.tsx --max-warnings 0",
|
|
30
|
+
"typecheck": "tsc --noEmit",
|
|
31
|
+
"a11y:audit": "node scripts/a11y-audit.mjs",
|
|
32
|
+
"security:audit": "node scripts/security-audit.mjs",
|
|
33
|
+
"css:build": "node scripts/css-build.mjs",
|
|
34
|
+
"build:demo": "vite build --config ./demo/vite.config.ts",
|
|
35
|
+
"prepublishOnly": "npm run build",
|
|
36
|
+
"pack:check": "npm pack --dry-run"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"react": ">=18.0.0",
|
|
40
|
+
"react-dom": ">=18.0.0"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
44
|
+
"@testing-library/react": "^16.1.0",
|
|
45
|
+
"@testing-library/user-event": "^14.5.2",
|
|
46
|
+
"@types/react": "^18.3.12",
|
|
47
|
+
"@types/react-dom": "^18.3.1",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
|
49
|
+
"@typescript-eslint/parser": "^8.15.0",
|
|
50
|
+
"@vitejs/plugin-react": "^4.3.3",
|
|
51
|
+
"@vitest/coverage-v8": "^2.1.6",
|
|
52
|
+
"eslint": "^9.15.0",
|
|
53
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
54
|
+
"jsdom": "^25.0.1",
|
|
55
|
+
"prettier": "^3.3.3",
|
|
56
|
+
"react": "^18.3.1",
|
|
57
|
+
"react-dom": "^18.3.1",
|
|
58
|
+
"typescript": "^5.6.3",
|
|
59
|
+
"vite": "^5.4.11",
|
|
60
|
+
"vitest": "^2.1.6"
|
|
61
|
+
},
|
|
62
|
+
"keywords": [
|
|
63
|
+
"react",
|
|
64
|
+
"component-library",
|
|
65
|
+
"wcag",
|
|
66
|
+
"accessibility",
|
|
67
|
+
"aria",
|
|
68
|
+
"security",
|
|
69
|
+
"typescript",
|
|
70
|
+
"tekivex"
|
|
71
|
+
],
|
|
72
|
+
"author": "007krcs",
|
|
73
|
+
"license": "MIT",
|
|
74
|
+
"repository": {
|
|
75
|
+
"type": "git",
|
|
76
|
+
"url": "https://github.com/007krcs/tekivex-ui.git"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ReactNode,
|
|
3
|
+
type ElementType,
|
|
4
|
+
type ComponentPropsWithoutRef,
|
|
5
|
+
} from 'react';
|
|
6
|
+
import { useFocusTrap } from '../hooks';
|
|
7
|
+
|
|
8
|
+
// ── SkipNav ──────────────────────────────────────────────────────────────────
|
|
9
|
+
|
|
10
|
+
export interface SkipNavProps {
|
|
11
|
+
contentId?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function SkipNav({
|
|
16
|
+
contentId = 'tkx-main-content',
|
|
17
|
+
label = 'Skip to main content',
|
|
18
|
+
}: SkipNavProps) {
|
|
19
|
+
return (
|
|
20
|
+
<a href={`#${contentId}`} className="tkx-skip-nav">
|
|
21
|
+
{label}
|
|
22
|
+
</a>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// ── LiveRegion ───────────────────────────────────────────────────────────────
|
|
27
|
+
|
|
28
|
+
export interface LiveRegionProps {
|
|
29
|
+
politeness?: 'polite' | 'assertive';
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
atomic?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function LiveRegion({
|
|
35
|
+
politeness = 'polite',
|
|
36
|
+
children,
|
|
37
|
+
atomic = true,
|
|
38
|
+
}: LiveRegionProps) {
|
|
39
|
+
return (
|
|
40
|
+
<div
|
|
41
|
+
role="status"
|
|
42
|
+
aria-live={politeness}
|
|
43
|
+
aria-atomic={atomic}
|
|
44
|
+
className="tkx-sr-only"
|
|
45
|
+
>
|
|
46
|
+
{children}
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// ── FocusTrap ────────────────────────────────────────────────────────────────
|
|
52
|
+
|
|
53
|
+
export interface FocusTrapProps {
|
|
54
|
+
active: boolean;
|
|
55
|
+
children: ReactNode;
|
|
56
|
+
as?: ElementType;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function FocusTrap({ active, children, as: Tag = 'div' }: FocusTrapProps) {
|
|
60
|
+
const ref = useFocusTrap(active);
|
|
61
|
+
return (
|
|
62
|
+
<Tag ref={ref as React.Ref<HTMLElement>}>
|
|
63
|
+
{children}
|
|
64
|
+
</Tag>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// ── VisuallyHidden ────────────────────────────────────────────────────────────
|
|
69
|
+
|
|
70
|
+
export type VisuallyHiddenProps<T extends ElementType = 'span'> = {
|
|
71
|
+
as?: T;
|
|
72
|
+
children: ReactNode;
|
|
73
|
+
} & Omit<ComponentPropsWithoutRef<T>, 'as' | 'children'>;
|
|
74
|
+
|
|
75
|
+
export function VisuallyHidden<T extends ElementType = 'span'>({
|
|
76
|
+
as,
|
|
77
|
+
children,
|
|
78
|
+
...rest
|
|
79
|
+
}: VisuallyHiddenProps<T>) {
|
|
80
|
+
const Tag = (as ?? 'span') as ElementType;
|
|
81
|
+
return (
|
|
82
|
+
<Tag className="tkx-sr-only" {...rest}>
|
|
83
|
+
{children}
|
|
84
|
+
</Tag>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|