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.
Files changed (173) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +201 -0
  3. package/dist/index.cjs +70 -0
  4. package/dist/index.d.ts +89 -0
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +11002 -0
  7. package/dist/src/a11y/index.d.ts +24 -0
  8. package/dist/src/a11y/index.d.ts.map +1 -0
  9. package/dist/src/components/TkxAccordion.d.ts +32 -0
  10. package/dist/src/components/TkxAccordion.d.ts.map +1 -0
  11. package/dist/src/components/TkxAlert.d.ts +14 -0
  12. package/dist/src/components/TkxAlert.d.ts.map +1 -0
  13. package/dist/src/components/TkxAvatar.d.ts +14 -0
  14. package/dist/src/components/TkxAvatar.d.ts.map +1 -0
  15. package/dist/src/components/TkxBadge.d.ts +12 -0
  16. package/dist/src/components/TkxBadge.d.ts.map +1 -0
  17. package/dist/src/components/TkxButton.d.ts +17 -0
  18. package/dist/src/components/TkxButton.d.ts.map +1 -0
  19. package/dist/src/components/TkxCard.d.ts +20 -0
  20. package/dist/src/components/TkxCard.d.ts.map +1 -0
  21. package/dist/src/components/TkxCarousel.d.ts +32 -0
  22. package/dist/src/components/TkxCarousel.d.ts.map +1 -0
  23. package/dist/src/components/TkxChat.d.ts +32 -0
  24. package/dist/src/components/TkxChat.d.ts.map +1 -0
  25. package/dist/src/components/TkxCheckbox.d.ts +13 -0
  26. package/dist/src/components/TkxCheckbox.d.ts.map +1 -0
  27. package/dist/src/components/TkxClock.d.ts +23 -0
  28. package/dist/src/components/TkxClock.d.ts.map +1 -0
  29. package/dist/src/components/TkxColorPicker.d.ts +18 -0
  30. package/dist/src/components/TkxColorPicker.d.ts.map +1 -0
  31. package/dist/src/components/TkxCommand.d.ts +34 -0
  32. package/dist/src/components/TkxCommand.d.ts.map +1 -0
  33. package/dist/src/components/TkxDatePicker.d.ts +47 -0
  34. package/dist/src/components/TkxDatePicker.d.ts.map +1 -0
  35. package/dist/src/components/TkxDivider.d.ts +8 -0
  36. package/dist/src/components/TkxDivider.d.ts.map +1 -0
  37. package/dist/src/components/TkxDrawer.d.ts +16 -0
  38. package/dist/src/components/TkxDrawer.d.ts.map +1 -0
  39. package/dist/src/components/TkxFileUpload.d.ts +16 -0
  40. package/dist/src/components/TkxFileUpload.d.ts.map +1 -0
  41. package/dist/src/components/TkxIcon.d.ts +16 -0
  42. package/dist/src/components/TkxIcon.d.ts.map +1 -0
  43. package/dist/src/components/TkxImage.d.ts +16 -0
  44. package/dist/src/components/TkxImage.d.ts.map +1 -0
  45. package/dist/src/components/TkxInput.d.ts +13 -0
  46. package/dist/src/components/TkxInput.d.ts.map +1 -0
  47. package/dist/src/components/TkxLogo.d.ts +21 -0
  48. package/dist/src/components/TkxLogo.d.ts.map +1 -0
  49. package/dist/src/components/TkxMenu.d.ts +64 -0
  50. package/dist/src/components/TkxMenu.d.ts.map +1 -0
  51. package/dist/src/components/TkxModal.d.ts +14 -0
  52. package/dist/src/components/TkxModal.d.ts.map +1 -0
  53. package/dist/src/components/TkxNumberInput.d.ts +32 -0
  54. package/dist/src/components/TkxNumberInput.d.ts.map +1 -0
  55. package/dist/src/components/TkxOTP.d.ts +24 -0
  56. package/dist/src/components/TkxOTP.d.ts.map +1 -0
  57. package/dist/src/components/TkxPagination.d.ts +19 -0
  58. package/dist/src/components/TkxPagination.d.ts.map +1 -0
  59. package/dist/src/components/TkxProgress.d.ts +13 -0
  60. package/dist/src/components/TkxProgress.d.ts.map +1 -0
  61. package/dist/src/components/TkxRadio.d.ts +22 -0
  62. package/dist/src/components/TkxRadio.d.ts.map +1 -0
  63. package/dist/src/components/TkxRating.d.ts +18 -0
  64. package/dist/src/components/TkxRating.d.ts.map +1 -0
  65. package/dist/src/components/TkxSelect.d.ts +37 -0
  66. package/dist/src/components/TkxSelect.d.ts.map +1 -0
  67. package/dist/src/components/TkxSkeleton.d.ts +12 -0
  68. package/dist/src/components/TkxSkeleton.d.ts.map +1 -0
  69. package/dist/src/components/TkxSlider.d.ts +33 -0
  70. package/dist/src/components/TkxSlider.d.ts.map +1 -0
  71. package/dist/src/components/TkxStepper.d.ts +31 -0
  72. package/dist/src/components/TkxStepper.d.ts.map +1 -0
  73. package/dist/src/components/TkxTable.d.ts +23 -0
  74. package/dist/src/components/TkxTable.d.ts.map +1 -0
  75. package/dist/src/components/TkxTabs.d.ts +32 -0
  76. package/dist/src/components/TkxTabs.d.ts.map +1 -0
  77. package/dist/src/components/TkxTag.d.ts +30 -0
  78. package/dist/src/components/TkxTag.d.ts.map +1 -0
  79. package/dist/src/components/TkxTimeline.d.ts +20 -0
  80. package/dist/src/components/TkxTimeline.d.ts.map +1 -0
  81. package/dist/src/components/TkxToast.d.ts +23 -0
  82. package/dist/src/components/TkxToast.d.ts.map +1 -0
  83. package/dist/src/components/TkxToggle.d.ts +11 -0
  84. package/dist/src/components/TkxToggle.d.ts.map +1 -0
  85. package/dist/src/components/TkxTooltip.d.ts +10 -0
  86. package/dist/src/components/TkxTooltip.d.ts.map +1 -0
  87. package/dist/src/components/TkxVideoPlayer.d.ts +43 -0
  88. package/dist/src/components/TkxVideoPlayer.d.ts.map +1 -0
  89. package/dist/src/components/index.d.ts +41 -0
  90. package/dist/src/components/index.d.ts.map +1 -0
  91. package/dist/src/engine/css.d.ts +24 -0
  92. package/dist/src/engine/css.d.ts.map +1 -0
  93. package/dist/src/engine/index.d.ts +10 -0
  94. package/dist/src/engine/index.d.ts.map +1 -0
  95. package/dist/src/engine/quantum.d.ts +47 -0
  96. package/dist/src/engine/quantum.d.ts.map +1 -0
  97. package/dist/src/engine/security.d.ts +54 -0
  98. package/dist/src/engine/security.d.ts.map +1 -0
  99. package/dist/src/engine/tkx.d.ts +29 -0
  100. package/dist/src/engine/tkx.d.ts.map +1 -0
  101. package/dist/src/engine/wcag.d.ts +34 -0
  102. package/dist/src/engine/wcag.d.ts.map +1 -0
  103. package/dist/src/hooks/index.d.ts +8 -0
  104. package/dist/src/hooks/index.d.ts.map +1 -0
  105. package/dist/src/themes/index.d.ts +26 -0
  106. package/dist/src/themes/index.d.ts.map +1 -0
  107. package/dist/style.css +1 -0
  108. package/dist/tests/TkxButton.test.d.ts +2 -0
  109. package/dist/tests/TkxButton.test.d.ts.map +1 -0
  110. package/dist/tests/a11y/components.test.d.ts +2 -0
  111. package/dist/tests/a11y/components.test.d.ts.map +1 -0
  112. package/dist/tests/quantum.test.d.ts +2 -0
  113. package/dist/tests/quantum.test.d.ts.map +1 -0
  114. package/dist/tests/security.test.d.ts +2 -0
  115. package/dist/tests/security.test.d.ts.map +1 -0
  116. package/dist/tests/setup.d.ts +2 -0
  117. package/dist/tests/setup.d.ts.map +1 -0
  118. package/dist/tests/tkx.test.d.ts +2 -0
  119. package/dist/tests/tkx.test.d.ts.map +1 -0
  120. package/dist/tests/wcag.test.d.ts +2 -0
  121. package/dist/tests/wcag.test.d.ts.map +1 -0
  122. package/package.json +78 -0
  123. package/src/a11y/index.tsx +87 -0
  124. package/src/components/TkxAccordion.tsx +588 -0
  125. package/src/components/TkxAlert.tsx +91 -0
  126. package/src/components/TkxAvatar.tsx +101 -0
  127. package/src/components/TkxBadge.tsx +73 -0
  128. package/src/components/TkxButton.tsx +153 -0
  129. package/src/components/TkxCard.tsx +92 -0
  130. package/src/components/TkxCarousel.tsx +552 -0
  131. package/src/components/TkxChat.tsx +354 -0
  132. package/src/components/TkxCheckbox.tsx +218 -0
  133. package/src/components/TkxClock.tsx +601 -0
  134. package/src/components/TkxColorPicker.tsx +633 -0
  135. package/src/components/TkxCommand.tsx +644 -0
  136. package/src/components/TkxDatePicker.tsx +1567 -0
  137. package/src/components/TkxDivider.tsx +49 -0
  138. package/src/components/TkxDrawer.tsx +234 -0
  139. package/src/components/TkxFileUpload.tsx +371 -0
  140. package/src/components/TkxIcon.tsx +683 -0
  141. package/src/components/TkxImage.tsx +277 -0
  142. package/src/components/TkxInput.tsx +101 -0
  143. package/src/components/TkxLogo.tsx +297 -0
  144. package/src/components/TkxMenu.tsx +1042 -0
  145. package/src/components/TkxModal.tsx +119 -0
  146. package/src/components/TkxNumberInput.tsx +408 -0
  147. package/src/components/TkxOTP.tsx +295 -0
  148. package/src/components/TkxPagination.tsx +388 -0
  149. package/src/components/TkxProgress.tsx +114 -0
  150. package/src/components/TkxRadio.tsx +284 -0
  151. package/src/components/TkxRating.tsx +286 -0
  152. package/src/components/TkxSelect.tsx +923 -0
  153. package/src/components/TkxSkeleton.tsx +105 -0
  154. package/src/components/TkxSlider.tsx +492 -0
  155. package/src/components/TkxStepper.tsx +485 -0
  156. package/src/components/TkxTable.tsx +148 -0
  157. package/src/components/TkxTabs.tsx +124 -0
  158. package/src/components/TkxTag.tsx +319 -0
  159. package/src/components/TkxTimeline.tsx +303 -0
  160. package/src/components/TkxToast.tsx +284 -0
  161. package/src/components/TkxToggle.tsx +93 -0
  162. package/src/components/TkxTooltip.tsx +69 -0
  163. package/src/components/TkxVideoPlayer.tsx +1013 -0
  164. package/src/components/index.ts +40 -0
  165. package/src/engine/css.ts +126 -0
  166. package/src/engine/index.ts +10 -0
  167. package/src/engine/quantum.ts +207 -0
  168. package/src/engine/security.ts +217 -0
  169. package/src/engine/tkx.ts +874 -0
  170. package/src/engine/wcag.ts +275 -0
  171. package/src/hooks/index.ts +120 -0
  172. package/src/styles/global.css +167 -0
  173. package/src/themes/index.ts +111 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 007krcs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,201 @@
1
+ # ⚡ TekiVex UI
2
+
3
+ > Production-ready React component library — WCAG 2.1 AAA · WAI-ARIA 1.2 · TKX Atomic CSS · Zero-Trust Security
4
+
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-00f5d4.svg)](./LICENSE)
6
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.6-blue.svg)](https://www.typescriptlang.org/)
7
+ [![React](https://img.shields.io/badge/React-18-61dafb.svg)](https://react.dev/)
8
+ [![WCAG 2.1 AAA](https://img.shields.io/badge/WCAG-2.1%20AAA-green.svg)](https://www.w3.org/TR/WCAG21/)
9
+
10
+ ---
11
+
12
+ ## What is TekiVex UI?
13
+
14
+ TekiVex UI is a fully-typed React component library built for teams that need **accessibility**, **security**, and **design consistency** without compromise. It ships with:
15
+
16
+ - **14+ production-ready components** — Button, Card, Input, Badge, Progress, Toggle, Alert, Modal, Tabs, Tooltip, Skeleton, Avatar, Table, Divider
17
+ - **TKX Atomic CSS Engine** — utility-first CSS system with conflict resolution, variants, and arbitrary values
18
+ - **WCAG 2.1 AAA Engine** — contrast ratio calculation, accessible color generation, reduced-motion support
19
+ - **Zero-Trust Security Layer** — prop sanitization, XSS prevention, audit logging with integrity verification
20
+ - **Full TypeScript** — every prop, variant, and token is typed
21
+ - **Interactive Demo** — live component docs + 4 full-page templates (Dashboard, Portfolio, E-commerce, Supply Chain)
22
+
23
+ ---
24
+
25
+ ## Installation
26
+
27
+ ```bash
28
+ npm install @tekivex/ui
29
+ ```
30
+
31
+ ---
32
+
33
+ ## Quick Start
34
+
35
+ ```tsx
36
+ import { ThemeProvider, quantumDark, TkxButton, TkxCard } from '@tekivex/ui';
37
+ import '@tekivex/ui/styles';
38
+
39
+ function App() {
40
+ return (
41
+ <ThemeProvider theme={quantumDark}>
42
+ <TkxCard variant="elevated">
43
+ <TkxButton variant="primary" size="md">
44
+ Get Started
45
+ </TkxButton>
46
+ </TkxCard>
47
+ </ThemeProvider>
48
+ );
49
+ }
50
+ ```
51
+
52
+ ---
53
+
54
+ ## Components
55
+
56
+ | Component | Description |
57
+ |-----------|-------------|
58
+ | `TkxButton` | 5 variants, 3 sizes, loading state, icon support, glow effect |
59
+ | `TkxCard` | 5 variants, sub-components (Header/Body/Footer), hoverable & clickable |
60
+ | `TkxInput` | Labels, error/hint, addons (icon/text), all input types |
61
+ | `TkxBadge` | 7 variants, dot badges, pulse animation, outlined |
62
+ | `TkxProgress` | Linear & circular, indeterminate, custom color |
63
+ | `TkxToggle` | 3 sizes, controlled & uncontrolled, `aria-checked` |
64
+ | `TkxAlert` | 4 variants, dismissible, icon slot |
65
+ | `TkxModal` | 4 sizes, focus trap, scroll lock, animated |
66
+ | `TkxTabs` | Keyboard navigation, ARIA tabs pattern |
67
+ | `TkxTooltip` | 4 placements, portal rendering, reduced-motion aware |
68
+ | `TkxSkeleton` | Text, circular, rectangular, wave/pulse animation |
69
+ | `TkxAvatar` | Image + initials fallback, 4 statuses, group stacking |
70
+ | `TkxTable` | Sortable columns, striped, bordered, responsive |
71
+ | `TkxDivider` | Horizontal/vertical, with label |
72
+
73
+ ---
74
+
75
+ ## TKX Atomic CSS Engine
76
+
77
+ ```tsx
78
+ import { tkx, tx, cx } from '@tekivex/ui';
79
+
80
+ // String, array, or object input
81
+ const cls = tkx('flex items-center p-4 hover:bg-surface @md:p-8');
82
+
83
+ // Conflict resolution — last wins
84
+ tkx('p-4 p-8'); // → padding: 32px only
85
+
86
+ // Arbitrary values
87
+ tkx('w-[42px] [--my-var:red]');
88
+
89
+ // Conditional classes
90
+ cx('base-class', isActive && 'active', hasError ? 'error' : 'ok');
91
+ ```
92
+
93
+ ---
94
+
95
+ ## Theming
96
+
97
+ ```tsx
98
+ import { ThemeProvider, createTheme, quantumDark, auroraLight } from '@tekivex/ui';
99
+
100
+ // Use built-in themes
101
+ <ThemeProvider theme={quantumDark}>...</ThemeProvider>
102
+ <ThemeProvider theme={auroraLight}>...</ThemeProvider>
103
+
104
+ // Or create your own
105
+ const brandTheme = createTheme({
106
+ primary: '#6366f1',
107
+ secondary: '#8b5cf6',
108
+ bg: '#0f0f23',
109
+ surface: '#1a1a3e',
110
+ text: '#f0f0ff',
111
+ });
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Accessibility
117
+
118
+ Every component is built against WCAG 2.1 AAA:
119
+
120
+ - Minimum **4.5:1** contrast ratio (7:1 for AAA text)
121
+ - Full **keyboard navigation** — Tab, Enter, Space, Arrow keys, Escape
122
+ - Correct **ARIA roles, states, and properties** (WAI-ARIA 1.2)
123
+ - **Focus management** — focus trap in modals, focus-visible rings
124
+ - **Reduced-motion** support — animations respect `prefers-reduced-motion`
125
+ - **Screen reader** tested — live regions, sr-only text, meaningful alt text
126
+
127
+ ```tsx
128
+ import { WCAGEngine, contrastRatio, meetsAAA } from '@tekivex/ui';
129
+
130
+ const ratio = contrastRatio('#00f5d4', '#0a0f1a'); // → 9.4
131
+ const ok = meetsAAA('#00f5d4', '#0a0f1a'); // → true
132
+ ```
133
+
134
+ ---
135
+
136
+ ## Security
137
+
138
+ ```tsx
139
+ import { Shield, sanitizeString, audit, getAuditLog } from '@tekivex/ui';
140
+
141
+ // Sanitize user input
142
+ const safe = sanitizeString(userInput); // strips XSS vectors
143
+
144
+ // Audit log with HMAC integrity
145
+ audit('user_action', { component: 'TkxButton', event: 'click' });
146
+ const log = getAuditLog(); // tamper-evident audit trail
147
+ ```
148
+
149
+ ---
150
+
151
+ ## Running the Demo
152
+
153
+ ```bash
154
+ git clone https://github.com/007krcs/tekivex-ui.git
155
+ cd tekivex-ui
156
+ npm install
157
+ cd demo && npx vite
158
+ ```
159
+
160
+ Opens at `http://localhost:5174` — full interactive docs + templates.
161
+
162
+ ---
163
+
164
+ ## Development
165
+
166
+ ```bash
167
+ # Build the library
168
+ npm run build
169
+
170
+ # Run tests
171
+ npm test
172
+
173
+ # Type check
174
+ npm run typecheck
175
+
176
+ # Lint
177
+ npm run lint
178
+
179
+ # Accessibility audit
180
+ npm run a11y:audit
181
+
182
+ # Security audit
183
+ npm run security:audit
184
+ ```
185
+
186
+ ---
187
+
188
+ ## Templates
189
+
190
+ Four full-page templates are included in the demo:
191
+
192
+ - **Dashboard** — analytics cards, charts, data tables, KPIs
193
+ - **Portfolio** — project showcase, skills, contact form
194
+ - **E-commerce** — product grid, cart, checkout flow
195
+ - **Supply Chain** — shipment tracking, inventory, status badges
196
+
197
+ ---
198
+
199
+ ## License
200
+
201
+ [MIT](./LICENSE) © 2024 [007krcs](https://github.com/007krcs)