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
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)
|
|
6
|
+
[](https://www.typescriptlang.org/)
|
|
7
|
+
[](https://react.dev/)
|
|
8
|
+
[](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)
|