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,683 @@
|
|
|
1
|
+
import { forwardRef, type ReactNode, type SVGAttributes } from 'react';
|
|
2
|
+
import { useTheme } from '../themes';
|
|
3
|
+
import { tkx, cx } from '../engine/tkx';
|
|
4
|
+
|
|
5
|
+
// ── Icon Name Type ─────────────────────────────────────────────────────────────
|
|
6
|
+
|
|
7
|
+
export type IconName =
|
|
8
|
+
// Navigation
|
|
9
|
+
| 'home' | 'menu' | 'x' | 'chevron-up' | 'chevron-down' | 'chevron-left' | 'chevron-right'
|
|
10
|
+
| 'arrow-up' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up-right'
|
|
11
|
+
| 'external-link' | 'link' | 'anchor'
|
|
12
|
+
// Actions
|
|
13
|
+
| 'search' | 'filter' | 'sort' | 'refresh' | 'download' | 'upload' | 'share'
|
|
14
|
+
| 'copy' | 'edit' | 'trash' | 'plus' | 'minus' | 'check' | 'x-circle'
|
|
15
|
+
| 'check-circle' | 'info-circle' | 'alert-triangle' | 'alert-circle'
|
|
16
|
+
// UI
|
|
17
|
+
| 'eye' | 'eye-off' | 'settings' | 'sliders' | 'grid' | 'list' | 'columns'
|
|
18
|
+
| 'layout' | 'sidebar' | 'maximize' | 'minimize' | 'moon' | 'sun' | 'bell' | 'bell-off'
|
|
19
|
+
// Media
|
|
20
|
+
| 'play' | 'pause' | 'stop' | 'skip-back' | 'skip-forward' | 'volume' | 'volume-off'
|
|
21
|
+
| 'image' | 'video' | 'mic' | 'mic-off' | 'camera'
|
|
22
|
+
// Data
|
|
23
|
+
| 'chart-bar' | 'chart-line' | 'chart-pie' | 'trending-up' | 'trending-down'
|
|
24
|
+
| 'activity' | 'database' | 'server' | 'cpu' | 'memory'
|
|
25
|
+
// Commerce
|
|
26
|
+
| 'shopping-cart' | 'package' | 'tag' | 'credit-card' | 'dollar' | 'percent'
|
|
27
|
+
| 'gift' | 'truck' | 'warehouse' | 'box'
|
|
28
|
+
// Communication
|
|
29
|
+
| 'mail' | 'message' | 'phone' | 'user' | 'users' | 'team' | 'star' | 'heart'
|
|
30
|
+
| 'bookmark' | 'flag' | 'globe'
|
|
31
|
+
// Files
|
|
32
|
+
| 'file' | 'file-text' | 'folder' | 'folder-open' | 'code' | 'terminal'
|
|
33
|
+
| 'lock' | 'unlock' | 'key' | 'shield';
|
|
34
|
+
|
|
35
|
+
// ── Props ──────────────────────────────────────────────────────────────────────
|
|
36
|
+
|
|
37
|
+
export interface TkxIconProps extends Omit<SVGAttributes<SVGSVGElement>, 'children'> {
|
|
38
|
+
name?: IconName;
|
|
39
|
+
size?: number | string;
|
|
40
|
+
color?: string;
|
|
41
|
+
strokeWidth?: number;
|
|
42
|
+
filled?: boolean;
|
|
43
|
+
label?: string;
|
|
44
|
+
className?: string;
|
|
45
|
+
style?: React.CSSProperties;
|
|
46
|
+
children?: ReactNode;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// ── Icon Path Definitions ──────────────────────────────────────────────────────
|
|
50
|
+
// Each entry is an array of path/shape descriptors rendered inside a 24×24 viewBox.
|
|
51
|
+
|
|
52
|
+
type PathDescriptor =
|
|
53
|
+
| { type: 'path'; d: string }
|
|
54
|
+
| { type: 'circle'; cx: number; cy: number; r: number }
|
|
55
|
+
| { type: 'rect'; x: number; y: number; width: number; height: number; rx?: number }
|
|
56
|
+
| { type: 'line'; x1: number; y1: number; x2: number; y2: number }
|
|
57
|
+
| { type: 'polyline'; points: string }
|
|
58
|
+
| { type: 'polygon'; points: string };
|
|
59
|
+
|
|
60
|
+
const ICONS: Record<IconName, PathDescriptor[]> = {
|
|
61
|
+
// ── Navigation ───────────────────────────────────────────────────────────────
|
|
62
|
+
home: [
|
|
63
|
+
{ type: 'path', d: 'M3 9.5L12 3l9 6.5V20a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9.5z' },
|
|
64
|
+
{ type: 'path', d: 'M9 21V12h6v9' },
|
|
65
|
+
],
|
|
66
|
+
menu: [
|
|
67
|
+
{ type: 'line', x1: 3, y1: 6, x2: 21, y2: 6 },
|
|
68
|
+
{ type: 'line', x1: 3, y1: 12, x2: 21, y2: 12 },
|
|
69
|
+
{ type: 'line', x1: 3, y1: 18, x2: 21, y2: 18 },
|
|
70
|
+
],
|
|
71
|
+
x: [
|
|
72
|
+
{ type: 'line', x1: 18, y1: 6, x2: 6, y2: 18 },
|
|
73
|
+
{ type: 'line', x1: 6, y1: 6, x2: 18, y2: 18 },
|
|
74
|
+
],
|
|
75
|
+
'chevron-up': [
|
|
76
|
+
{ type: 'polyline', points: '18 15 12 9 6 15' },
|
|
77
|
+
],
|
|
78
|
+
'chevron-down': [
|
|
79
|
+
{ type: 'polyline', points: '6 9 12 15 18 9' },
|
|
80
|
+
],
|
|
81
|
+
'chevron-left': [
|
|
82
|
+
{ type: 'polyline', points: '15 18 9 12 15 6' },
|
|
83
|
+
],
|
|
84
|
+
'chevron-right': [
|
|
85
|
+
{ type: 'polyline', points: '9 18 15 12 9 6' },
|
|
86
|
+
],
|
|
87
|
+
'arrow-up': [
|
|
88
|
+
{ type: 'line', x1: 12, y1: 19, x2: 12, y2: 5 },
|
|
89
|
+
{ type: 'polyline', points: '5 12 12 5 19 12' },
|
|
90
|
+
],
|
|
91
|
+
'arrow-down': [
|
|
92
|
+
{ type: 'line', x1: 12, y1: 5, x2: 12, y2: 19 },
|
|
93
|
+
{ type: 'polyline', points: '19 12 12 19 5 12' },
|
|
94
|
+
],
|
|
95
|
+
'arrow-left': [
|
|
96
|
+
{ type: 'line', x1: 19, y1: 12, x2: 5, y2: 12 },
|
|
97
|
+
{ type: 'polyline', points: '12 19 5 12 12 5' },
|
|
98
|
+
],
|
|
99
|
+
'arrow-right': [
|
|
100
|
+
{ type: 'line', x1: 5, y1: 12, x2: 19, y2: 12 },
|
|
101
|
+
{ type: 'polyline', points: '12 5 19 12 12 19' },
|
|
102
|
+
],
|
|
103
|
+
'arrow-up-right': [
|
|
104
|
+
{ type: 'line', x1: 7, y1: 17, x2: 17, y2: 7 },
|
|
105
|
+
{ type: 'polyline', points: '7 7 17 7 17 17' },
|
|
106
|
+
],
|
|
107
|
+
'external-link': [
|
|
108
|
+
{ type: 'path', d: 'M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6' },
|
|
109
|
+
{ type: 'polyline', points: '15 3 21 3 21 9' },
|
|
110
|
+
{ type: 'line', x1: 10, y1: 14, x2: 21, y2: 3 },
|
|
111
|
+
],
|
|
112
|
+
link: [
|
|
113
|
+
{ type: 'path', d: 'M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71' },
|
|
114
|
+
{ type: 'path', d: 'M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71' },
|
|
115
|
+
],
|
|
116
|
+
anchor: [
|
|
117
|
+
{ type: 'circle', cx: 12, cy: 5, r: 3 },
|
|
118
|
+
{ type: 'line', x1: 12, y1: 8, x2: 12, y2: 21 },
|
|
119
|
+
{ type: 'path', d: 'M5 12H2a10 10 0 0 0 20 0h-3' },
|
|
120
|
+
],
|
|
121
|
+
|
|
122
|
+
// ── Actions ──────────────────────────────────────────────────────────────────
|
|
123
|
+
search: [
|
|
124
|
+
{ type: 'circle', cx: 11, cy: 11, r: 8 },
|
|
125
|
+
{ type: 'line', x1: 21, y1: 21, x2: 16.65, y2: 16.65 },
|
|
126
|
+
],
|
|
127
|
+
filter: [
|
|
128
|
+
{ type: 'polygon', points: '22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3' },
|
|
129
|
+
],
|
|
130
|
+
sort: [
|
|
131
|
+
{ type: 'line', x1: 3, y1: 6, x2: 21, y2: 6 },
|
|
132
|
+
{ type: 'line', x1: 6, y1: 12, x2: 18, y2: 12 },
|
|
133
|
+
{ type: 'line', x1: 9, y1: 18, x2: 15, y2: 18 },
|
|
134
|
+
],
|
|
135
|
+
refresh: [
|
|
136
|
+
{ type: 'polyline', points: '23 4 23 10 17 10' },
|
|
137
|
+
{ type: 'polyline', points: '1 20 1 14 7 14' },
|
|
138
|
+
{ type: 'path', d: 'M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15' },
|
|
139
|
+
],
|
|
140
|
+
download: [
|
|
141
|
+
{ type: 'path', d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4' },
|
|
142
|
+
{ type: 'polyline', points: '7 10 12 15 17 10' },
|
|
143
|
+
{ type: 'line', x1: 12, y1: 15, x2: 12, y2: 3 },
|
|
144
|
+
],
|
|
145
|
+
upload: [
|
|
146
|
+
{ type: 'path', d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4' },
|
|
147
|
+
{ type: 'polyline', points: '17 8 12 3 7 8' },
|
|
148
|
+
{ type: 'line', x1: 12, y1: 3, x2: 12, y2: 15 },
|
|
149
|
+
],
|
|
150
|
+
share: [
|
|
151
|
+
{ type: 'circle', cx: 18, cy: 5, r: 3 },
|
|
152
|
+
{ type: 'circle', cx: 6, cy: 12, r: 3 },
|
|
153
|
+
{ type: 'circle', cx: 18, cy: 19, r: 3 },
|
|
154
|
+
{ type: 'line', x1: 8.59, y1: 13.51, x2: 15.42, y2: 17.49 },
|
|
155
|
+
{ type: 'line', x1: 15.41, y1: 6.51, x2: 8.59, y2: 10.49 },
|
|
156
|
+
],
|
|
157
|
+
copy: [
|
|
158
|
+
{ type: 'rect', x: 9, y: 9, width: 13, height: 13, rx: 2 },
|
|
159
|
+
{ type: 'path', d: 'M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1' },
|
|
160
|
+
],
|
|
161
|
+
edit: [
|
|
162
|
+
{ type: 'path', d: 'M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7' },
|
|
163
|
+
{ type: 'path', d: 'M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z' },
|
|
164
|
+
],
|
|
165
|
+
trash: [
|
|
166
|
+
{ type: 'polyline', points: '3 6 5 6 21 6' },
|
|
167
|
+
{ type: 'path', d: 'M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6' },
|
|
168
|
+
{ type: 'path', d: 'M10 11v6M14 11v6' },
|
|
169
|
+
{ type: 'path', d: 'M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2' },
|
|
170
|
+
],
|
|
171
|
+
plus: [
|
|
172
|
+
{ type: 'line', x1: 12, y1: 5, x2: 12, y2: 19 },
|
|
173
|
+
{ type: 'line', x1: 5, y1: 12, x2: 19, y2: 12 },
|
|
174
|
+
],
|
|
175
|
+
minus: [
|
|
176
|
+
{ type: 'line', x1: 5, y1: 12, x2: 19, y2: 12 },
|
|
177
|
+
],
|
|
178
|
+
check: [
|
|
179
|
+
{ type: 'polyline', points: '20 6 9 17 4 12' },
|
|
180
|
+
],
|
|
181
|
+
'x-circle': [
|
|
182
|
+
{ type: 'circle', cx: 12, cy: 12, r: 10 },
|
|
183
|
+
{ type: 'line', x1: 15, y1: 9, x2: 9, y2: 15 },
|
|
184
|
+
{ type: 'line', x1: 9, y1: 9, x2: 15, y2: 15 },
|
|
185
|
+
],
|
|
186
|
+
'check-circle': [
|
|
187
|
+
{ type: 'path', d: 'M22 11.08V12a10 10 0 1 1-5.93-9.14' },
|
|
188
|
+
{ type: 'polyline', points: '22 4 12 14.01 9 11.01' },
|
|
189
|
+
],
|
|
190
|
+
'info-circle': [
|
|
191
|
+
{ type: 'circle', cx: 12, cy: 12, r: 10 },
|
|
192
|
+
{ type: 'line', x1: 12, y1: 8, x2: 12, y2: 12 },
|
|
193
|
+
{ type: 'line', x1: 12, y1: 16, x2: 12.01, y2: 16 },
|
|
194
|
+
],
|
|
195
|
+
'alert-triangle': [
|
|
196
|
+
{ type: 'path', d: 'M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z' },
|
|
197
|
+
{ type: 'line', x1: 12, y1: 9, x2: 12, y2: 13 },
|
|
198
|
+
{ type: 'line', x1: 12, y1: 17, x2: 12.01, y2: 17 },
|
|
199
|
+
],
|
|
200
|
+
'alert-circle': [
|
|
201
|
+
{ type: 'circle', cx: 12, cy: 12, r: 10 },
|
|
202
|
+
{ type: 'line', x1: 12, y1: 8, x2: 12, y2: 12 },
|
|
203
|
+
{ type: 'line', x1: 12, y1: 16, x2: 12.01, y2: 16 },
|
|
204
|
+
],
|
|
205
|
+
|
|
206
|
+
// ── UI ────────────────────────────────────────────────────────────────────────
|
|
207
|
+
eye: [
|
|
208
|
+
{ type: 'path', d: 'M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z' },
|
|
209
|
+
{ type: 'circle', cx: 12, cy: 12, r: 3 },
|
|
210
|
+
],
|
|
211
|
+
'eye-off': [
|
|
212
|
+
{ type: 'path', d: 'M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94' },
|
|
213
|
+
{ type: 'path', d: 'M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19' },
|
|
214
|
+
{ type: 'line', x1: 1, y1: 1, x2: 23, y2: 23 },
|
|
215
|
+
{ type: 'path', d: 'M10.73 10.73a3 3 0 0 0 4.24 4.24' },
|
|
216
|
+
],
|
|
217
|
+
settings: [
|
|
218
|
+
{ type: 'circle', cx: 12, cy: 12, r: 3 },
|
|
219
|
+
{ type: 'path', d: 'M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z' },
|
|
220
|
+
],
|
|
221
|
+
sliders: [
|
|
222
|
+
{ type: 'line', x1: 4, y1: 21, x2: 4, y2: 14 },
|
|
223
|
+
{ type: 'line', x1: 4, y1: 10, x2: 4, y2: 3 },
|
|
224
|
+
{ type: 'line', x1: 12, y1: 21, x2: 12, y2: 12 },
|
|
225
|
+
{ type: 'line', x1: 12, y1: 8, x2: 12, y2: 3 },
|
|
226
|
+
{ type: 'line', x1: 20, y1: 21, x2: 20, y2: 16 },
|
|
227
|
+
{ type: 'line', x1: 20, y1: 12, x2: 20, y2: 3 },
|
|
228
|
+
{ type: 'line', x1: 1, y1: 14, x2: 7, y2: 14 },
|
|
229
|
+
{ type: 'line', x1: 9, y1: 8, x2: 15, y2: 8 },
|
|
230
|
+
{ type: 'line', x1: 17, y1: 16, x2: 23, y2: 16 },
|
|
231
|
+
],
|
|
232
|
+
grid: [
|
|
233
|
+
{ type: 'rect', x: 3, y: 3, width: 7, height: 7 },
|
|
234
|
+
{ type: 'rect', x: 14, y: 3, width: 7, height: 7 },
|
|
235
|
+
{ type: 'rect', x: 14, y: 14, width: 7, height: 7 },
|
|
236
|
+
{ type: 'rect', x: 3, y: 14, width: 7, height: 7 },
|
|
237
|
+
],
|
|
238
|
+
list: [
|
|
239
|
+
{ type: 'line', x1: 8, y1: 6, x2: 21, y2: 6 },
|
|
240
|
+
{ type: 'line', x1: 8, y1: 12, x2: 21, y2: 12 },
|
|
241
|
+
{ type: 'line', x1: 8, y1: 18, x2: 21, y2: 18 },
|
|
242
|
+
{ type: 'line', x1: 3, y1: 6, x2: 3.01, y2: 6 },
|
|
243
|
+
{ type: 'line', x1: 3, y1: 12, x2: 3.01, y2: 12 },
|
|
244
|
+
{ type: 'line', x1: 3, y1: 18, x2: 3.01, y2: 18 },
|
|
245
|
+
],
|
|
246
|
+
columns: [
|
|
247
|
+
{ type: 'path', d: 'M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18' },
|
|
248
|
+
],
|
|
249
|
+
layout: [
|
|
250
|
+
{ type: 'rect', x: 3, y: 3, width: 18, height: 18, rx: 2 },
|
|
251
|
+
{ type: 'line', x1: 3, y1: 9, x2: 21, y2: 9 },
|
|
252
|
+
{ type: 'line', x1: 9, y1: 21, x2: 9, y2: 9 },
|
|
253
|
+
],
|
|
254
|
+
sidebar: [
|
|
255
|
+
{ type: 'rect', x: 3, y: 3, width: 18, height: 18, rx: 2 },
|
|
256
|
+
{ type: 'line', x1: 9, y1: 3, x2: 9, y2: 21 },
|
|
257
|
+
],
|
|
258
|
+
maximize: [
|
|
259
|
+
{ type: 'path', d: 'M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3' },
|
|
260
|
+
],
|
|
261
|
+
minimize: [
|
|
262
|
+
{ type: 'path', d: 'M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3' },
|
|
263
|
+
],
|
|
264
|
+
moon: [
|
|
265
|
+
{ type: 'path', d: 'M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z' },
|
|
266
|
+
],
|
|
267
|
+
sun: [
|
|
268
|
+
{ type: 'circle', cx: 12, cy: 12, r: 5 },
|
|
269
|
+
{ type: 'line', x1: 12, y1: 1, x2: 12, y2: 3 },
|
|
270
|
+
{ type: 'line', x1: 12, y1: 21, x2: 12, y2: 23 },
|
|
271
|
+
{ type: 'line', x1: 4.22, y1: 4.22, x2: 5.64, y2: 5.64 },
|
|
272
|
+
{ type: 'line', x1: 18.36, y1: 18.36, x2: 19.78, y2: 19.78 },
|
|
273
|
+
{ type: 'line', x1: 1, y1: 12, x2: 3, y2: 12 },
|
|
274
|
+
{ type: 'line', x1: 21, y1: 12, x2: 23, y2: 12 },
|
|
275
|
+
{ type: 'line', x1: 4.22, y1: 19.78, x2: 5.64, y2: 18.36 },
|
|
276
|
+
{ type: 'line', x1: 18.36, y1: 5.64, x2: 19.78, y2: 4.22 },
|
|
277
|
+
],
|
|
278
|
+
bell: [
|
|
279
|
+
{ type: 'path', d: 'M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9' },
|
|
280
|
+
{ type: 'path', d: 'M13.73 21a2 2 0 0 1-3.46 0' },
|
|
281
|
+
],
|
|
282
|
+
'bell-off': [
|
|
283
|
+
{ type: 'path', d: 'M13.73 21a2 2 0 0 1-3.46 0' },
|
|
284
|
+
{ type: 'path', d: 'M18.63 13A17.89 17.89 0 0 1 18 8' },
|
|
285
|
+
{ type: 'path', d: 'M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14' },
|
|
286
|
+
{ type: 'path', d: 'M18 8a6 6 0 0 0-9.33-5' },
|
|
287
|
+
{ type: 'line', x1: 1, y1: 1, x2: 23, y2: 23 },
|
|
288
|
+
],
|
|
289
|
+
|
|
290
|
+
// ── Media ─────────────────────────────────────────────────────────────────────
|
|
291
|
+
play: [
|
|
292
|
+
{ type: 'polygon', points: '5 3 19 12 5 21 5 3' },
|
|
293
|
+
],
|
|
294
|
+
pause: [
|
|
295
|
+
{ type: 'rect', x: 6, y: 4, width: 4, height: 16 },
|
|
296
|
+
{ type: 'rect', x: 14, y: 4, width: 4, height: 16 },
|
|
297
|
+
],
|
|
298
|
+
stop: [
|
|
299
|
+
{ type: 'rect', x: 4, y: 4, width: 16, height: 16 },
|
|
300
|
+
],
|
|
301
|
+
'skip-back': [
|
|
302
|
+
{ type: 'polygon', points: '19 20 9 12 19 4 19 20' },
|
|
303
|
+
{ type: 'line', x1: 5, y1: 19, x2: 5, y2: 5 },
|
|
304
|
+
],
|
|
305
|
+
'skip-forward': [
|
|
306
|
+
{ type: 'polygon', points: '5 4 15 12 5 20 5 4' },
|
|
307
|
+
{ type: 'line', x1: 19, y1: 5, x2: 19, y2: 19 },
|
|
308
|
+
],
|
|
309
|
+
volume: [
|
|
310
|
+
{ type: 'polygon', points: '11 5 6 9 2 9 2 15 6 15 11 19 11 5' },
|
|
311
|
+
{ type: 'path', d: 'M15.54 8.46a5 5 0 0 1 0 7.07' },
|
|
312
|
+
{ type: 'path', d: 'M19.07 4.93a10 10 0 0 1 0 14.14' },
|
|
313
|
+
],
|
|
314
|
+
'volume-off': [
|
|
315
|
+
{ type: 'polygon', points: '11 5 6 9 2 9 2 15 6 15 11 19 11 5' },
|
|
316
|
+
{ type: 'line', x1: 23, y1: 9, x2: 17, y2: 15 },
|
|
317
|
+
{ type: 'line', x1: 17, y1: 9, x2: 23, y2: 15 },
|
|
318
|
+
],
|
|
319
|
+
image: [
|
|
320
|
+
{ type: 'rect', x: 3, y: 3, width: 18, height: 18, rx: 2 },
|
|
321
|
+
{ type: 'circle', cx: 8.5, cy: 8.5, r: 1.5 },
|
|
322
|
+
{ type: 'polyline', points: '21 15 16 10 5 21' },
|
|
323
|
+
],
|
|
324
|
+
video: [
|
|
325
|
+
{ type: 'polygon', points: '23 7 16 12 23 17 23 7' },
|
|
326
|
+
{ type: 'rect', x: 1, y: 5, width: 15, height: 14, rx: 2 },
|
|
327
|
+
],
|
|
328
|
+
mic: [
|
|
329
|
+
{ type: 'path', d: 'M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z' },
|
|
330
|
+
{ type: 'path', d: 'M19 10v2a7 7 0 0 1-14 0v-2' },
|
|
331
|
+
{ type: 'line', x1: 12, y1: 19, x2: 12, y2: 23 },
|
|
332
|
+
{ type: 'line', x1: 8, y1: 23, x2: 16, y2: 23 },
|
|
333
|
+
],
|
|
334
|
+
'mic-off': [
|
|
335
|
+
{ type: 'line', x1: 1, y1: 1, x2: 23, y2: 23 },
|
|
336
|
+
{ type: 'path', d: 'M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6' },
|
|
337
|
+
{ type: 'path', d: 'M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23' },
|
|
338
|
+
{ type: 'line', x1: 12, y1: 19, x2: 12, y2: 23 },
|
|
339
|
+
{ type: 'line', x1: 8, y1: 23, x2: 16, y2: 23 },
|
|
340
|
+
],
|
|
341
|
+
camera: [
|
|
342
|
+
{ type: 'path', d: 'M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z' },
|
|
343
|
+
{ type: 'circle', cx: 12, cy: 13, r: 4 },
|
|
344
|
+
],
|
|
345
|
+
|
|
346
|
+
// ── Data ──────────────────────────────────────────────────────────────────────
|
|
347
|
+
'chart-bar': [
|
|
348
|
+
{ type: 'line', x1: 18, y1: 20, x2: 18, y2: 10 },
|
|
349
|
+
{ type: 'line', x1: 12, y1: 20, x2: 12, y2: 4 },
|
|
350
|
+
{ type: 'line', x1: 6, y1: 20, x2: 6, y2: 14 },
|
|
351
|
+
{ type: 'line', x1: 2, y1: 20, x2: 22, y2: 20 },
|
|
352
|
+
],
|
|
353
|
+
'chart-line': [
|
|
354
|
+
{ type: 'polyline', points: '22 12 18 12 15 21 9 3 6 12 2 12' },
|
|
355
|
+
],
|
|
356
|
+
'chart-pie': [
|
|
357
|
+
{ type: 'path', d: 'M21.21 15.89A10 10 0 1 1 8 2.83' },
|
|
358
|
+
{ type: 'path', d: 'M22 12A10 10 0 0 0 12 2v10z' },
|
|
359
|
+
],
|
|
360
|
+
'trending-up': [
|
|
361
|
+
{ type: 'polyline', points: '23 6 13.5 15.5 8.5 10.5 1 18' },
|
|
362
|
+
{ type: 'polyline', points: '17 6 23 6 23 12' },
|
|
363
|
+
],
|
|
364
|
+
'trending-down': [
|
|
365
|
+
{ type: 'polyline', points: '23 18 13.5 8.5 8.5 13.5 1 6' },
|
|
366
|
+
{ type: 'polyline', points: '17 18 23 18 23 12' },
|
|
367
|
+
],
|
|
368
|
+
activity: [
|
|
369
|
+
{ type: 'polyline', points: '22 12 18 12 15 21 9 3 6 12 2 12' },
|
|
370
|
+
],
|
|
371
|
+
database: [
|
|
372
|
+
{ type: 'ellipse', cx: 12, cy: 5, rx: 9, ry: 3 } as unknown as PathDescriptor,
|
|
373
|
+
{ type: 'path', d: 'M21 12c0 1.66-4 3-9 3s-9-1.34-9-3' },
|
|
374
|
+
{ type: 'path', d: 'M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5' },
|
|
375
|
+
],
|
|
376
|
+
server: [
|
|
377
|
+
{ type: 'rect', x: 2, y: 2, width: 20, height: 8, rx: 2 },
|
|
378
|
+
{ type: 'rect', x: 2, y: 14, width: 20, height: 8, rx: 2 },
|
|
379
|
+
{ type: 'line', x1: 6, y1: 6, x2: 6.01, y2: 6 },
|
|
380
|
+
{ type: 'line', x1: 6, y1: 18, x2: 6.01, y2: 18 },
|
|
381
|
+
],
|
|
382
|
+
cpu: [
|
|
383
|
+
{ type: 'rect', x: 4, y: 4, width: 16, height: 16, rx: 2 },
|
|
384
|
+
{ type: 'rect', x: 9, y: 9, width: 6, height: 6 },
|
|
385
|
+
{ type: 'line', x1: 9, y1: 1, x2: 9, y2: 4 },
|
|
386
|
+
{ type: 'line', x1: 15, y1: 1, x2: 15, y2: 4 },
|
|
387
|
+
{ type: 'line', x1: 9, y1: 20, x2: 9, y2: 23 },
|
|
388
|
+
{ type: 'line', x1: 15, y1: 20, x2: 15, y2: 23 },
|
|
389
|
+
{ type: 'line', x1: 20, y1: 9, x2: 23, y2: 9 },
|
|
390
|
+
{ type: 'line', x1: 20, y1: 14, x2: 23, y2: 14 },
|
|
391
|
+
{ type: 'line', x1: 1, y1: 9, x2: 4, y2: 9 },
|
|
392
|
+
{ type: 'line', x1: 1, y1: 14, x2: 4, y2: 14 },
|
|
393
|
+
],
|
|
394
|
+
memory: [
|
|
395
|
+
{ type: 'path', d: 'M6 19v-3M10 19v-3M14 19v-3M18 19v-3' },
|
|
396
|
+
{ type: 'rect', x: 2, y: 6, width: 20, height: 10, rx: 2 },
|
|
397
|
+
{ type: 'path', d: 'M6 10h.01M10 10h.01M14 10h.01M18 10h.01' },
|
|
398
|
+
],
|
|
399
|
+
|
|
400
|
+
// ── Commerce ──────────────────────────────────────────────────────────────────
|
|
401
|
+
'shopping-cart': [
|
|
402
|
+
{ type: 'circle', cx: 9, cy: 21, r: 1 },
|
|
403
|
+
{ type: 'circle', cx: 20, cy: 21, r: 1 },
|
|
404
|
+
{ type: 'path', d: 'M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6' },
|
|
405
|
+
],
|
|
406
|
+
package: [
|
|
407
|
+
{ type: 'line', x1: 16.5, y1: 9.4, x2: 7.55, y2: 4.24 },
|
|
408
|
+
{ type: 'path', d: 'M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z' },
|
|
409
|
+
{ type: 'polyline', points: '3.27 6.96 12 12.01 20.73 6.96' },
|
|
410
|
+
{ type: 'line', x1: 12, y1: 22.08, x2: 12, y2: 12 },
|
|
411
|
+
],
|
|
412
|
+
tag: [
|
|
413
|
+
{ type: 'path', d: 'M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z' },
|
|
414
|
+
{ type: 'line', x1: 7, y1: 7, x2: 7.01, y2: 7 },
|
|
415
|
+
],
|
|
416
|
+
'credit-card': [
|
|
417
|
+
{ type: 'rect', x: 1, y: 4, width: 22, height: 16, rx: 2 },
|
|
418
|
+
{ type: 'line', x1: 1, y1: 10, x2: 23, y2: 10 },
|
|
419
|
+
],
|
|
420
|
+
dollar: [
|
|
421
|
+
{ type: 'line', x1: 12, y1: 1, x2: 12, y2: 23 },
|
|
422
|
+
{ type: 'path', d: 'M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6' },
|
|
423
|
+
],
|
|
424
|
+
percent: [
|
|
425
|
+
{ type: 'line', x1: 19, y1: 5, x2: 5, y2: 19 },
|
|
426
|
+
{ type: 'circle', cx: 6.5, cy: 6.5, r: 2.5 },
|
|
427
|
+
{ type: 'circle', cx: 17.5, cy: 17.5, r: 2.5 },
|
|
428
|
+
],
|
|
429
|
+
gift: [
|
|
430
|
+
{ type: 'polyline', points: '20 12 20 22 4 22 4 12' },
|
|
431
|
+
{ type: 'rect', x: 2, y: 7, width: 20, height: 5 },
|
|
432
|
+
{ type: 'line', x1: 12, y1: 22, x2: 12, y2: 7 },
|
|
433
|
+
{ type: 'path', d: 'M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z' },
|
|
434
|
+
{ type: 'path', d: 'M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z' },
|
|
435
|
+
],
|
|
436
|
+
truck: [
|
|
437
|
+
{ type: 'rect', x: 1, y: 3, width: 15, height: 13 },
|
|
438
|
+
{ type: 'polygon', points: '16 8 20 8 23 11 23 16 16 16 16 8' },
|
|
439
|
+
{ type: 'circle', cx: 5.5, cy: 18.5, r: 2.5 },
|
|
440
|
+
{ type: 'circle', cx: 18.5, cy: 18.5, r: 2.5 },
|
|
441
|
+
],
|
|
442
|
+
warehouse: [
|
|
443
|
+
{ type: 'path', d: 'M22 20v-9H2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2z' },
|
|
444
|
+
{ type: 'path', d: 'M2 11L12 2l10 9' },
|
|
445
|
+
{ type: 'path', d: 'M9 20v-5h6v5' },
|
|
446
|
+
],
|
|
447
|
+
box: [
|
|
448
|
+
{ type: 'path', d: 'M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z' },
|
|
449
|
+
{ type: 'polyline', points: '3.27 6.96 12 12.01 20.73 6.96' },
|
|
450
|
+
{ type: 'line', x1: 12, y1: 22.08, x2: 12, y2: 12 },
|
|
451
|
+
],
|
|
452
|
+
|
|
453
|
+
// ── Communication ─────────────────────────────────────────────────────────────
|
|
454
|
+
mail: [
|
|
455
|
+
{ type: 'path', d: 'M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z' },
|
|
456
|
+
{ type: 'polyline', points: '22 6 12 13 2 6' },
|
|
457
|
+
],
|
|
458
|
+
message: [
|
|
459
|
+
{ type: 'path', d: 'M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z' },
|
|
460
|
+
],
|
|
461
|
+
phone: [
|
|
462
|
+
{ type: 'path', d: 'M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.79 19.79 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z' },
|
|
463
|
+
],
|
|
464
|
+
user: [
|
|
465
|
+
{ type: 'path', d: 'M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2' },
|
|
466
|
+
{ type: 'circle', cx: 12, cy: 7, r: 4 },
|
|
467
|
+
],
|
|
468
|
+
users: [
|
|
469
|
+
{ type: 'path', d: 'M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2' },
|
|
470
|
+
{ type: 'circle', cx: 9, cy: 7, r: 4 },
|
|
471
|
+
{ type: 'path', d: 'M23 21v-2a4 4 0 0 0-3-3.87' },
|
|
472
|
+
{ type: 'path', d: 'M16 3.13a4 4 0 0 1 0 7.75' },
|
|
473
|
+
],
|
|
474
|
+
team: [
|
|
475
|
+
{ type: 'path', d: 'M12 20v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2' },
|
|
476
|
+
{ type: 'circle', cx: 9, cy: 10, r: 3 },
|
|
477
|
+
{ type: 'path', d: 'M22 20v-2a4 4 0 0 0-3-3.87' },
|
|
478
|
+
{ type: 'path', d: 'M15 6.13a4 4 0 0 1 0 7.75' },
|
|
479
|
+
{ type: 'circle', cx: 17, cy: 10, r: 3 },
|
|
480
|
+
],
|
|
481
|
+
star: [
|
|
482
|
+
{ type: 'polygon', points: '12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2' },
|
|
483
|
+
],
|
|
484
|
+
heart: [
|
|
485
|
+
{ type: 'path', d: 'M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z' },
|
|
486
|
+
],
|
|
487
|
+
bookmark: [
|
|
488
|
+
{ type: 'path', d: 'M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z' },
|
|
489
|
+
],
|
|
490
|
+
flag: [
|
|
491
|
+
{ type: 'path', d: 'M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z' },
|
|
492
|
+
{ type: 'line', x1: 4, y1: 22, x2: 4, y2: 15 },
|
|
493
|
+
],
|
|
494
|
+
globe: [
|
|
495
|
+
{ type: 'circle', cx: 12, cy: 12, r: 10 },
|
|
496
|
+
{ type: 'line', x1: 2, y1: 12, x2: 22, y2: 12 },
|
|
497
|
+
{ type: 'path', d: 'M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z' },
|
|
498
|
+
],
|
|
499
|
+
|
|
500
|
+
// ── Files ─────────────────────────────────────────────────────────────────────
|
|
501
|
+
file: [
|
|
502
|
+
{ type: 'path', d: 'M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z' },
|
|
503
|
+
{ type: 'polyline', points: '13 2 13 9 20 9' },
|
|
504
|
+
],
|
|
505
|
+
'file-text': [
|
|
506
|
+
{ type: 'path', d: 'M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z' },
|
|
507
|
+
{ type: 'polyline', points: '14 2 14 8 20 8' },
|
|
508
|
+
{ type: 'line', x1: 16, y1: 13, x2: 8, y2: 13 },
|
|
509
|
+
{ type: 'line', x1: 16, y1: 17, x2: 8, y2: 17 },
|
|
510
|
+
{ type: 'polyline', points: '10 9 9 9 8 9' },
|
|
511
|
+
],
|
|
512
|
+
folder: [
|
|
513
|
+
{ type: 'path', d: 'M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z' },
|
|
514
|
+
],
|
|
515
|
+
'folder-open': [
|
|
516
|
+
{ type: 'path', d: 'M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z' },
|
|
517
|
+
{ type: 'line', x1: 2, y1: 10, x2: 22, y2: 10 },
|
|
518
|
+
],
|
|
519
|
+
code: [
|
|
520
|
+
{ type: 'polyline', points: '16 18 22 12 16 6' },
|
|
521
|
+
{ type: 'polyline', points: '8 6 2 12 8 18' },
|
|
522
|
+
],
|
|
523
|
+
terminal: [
|
|
524
|
+
{ type: 'polyline', points: '4 17 10 11 4 5' },
|
|
525
|
+
{ type: 'line', x1: 12, y1: 19, x2: 20, y2: 19 },
|
|
526
|
+
],
|
|
527
|
+
lock: [
|
|
528
|
+
{ type: 'rect', x: 3, y: 11, width: 18, height: 11, rx: 2 },
|
|
529
|
+
{ type: 'path', d: 'M7 11V7a5 5 0 0 1 10 0v4' },
|
|
530
|
+
],
|
|
531
|
+
unlock: [
|
|
532
|
+
{ type: 'rect', x: 3, y: 11, width: 18, height: 11, rx: 2 },
|
|
533
|
+
{ type: 'path', d: 'M7 11V7a5 5 0 0 1 9.9-1' },
|
|
534
|
+
],
|
|
535
|
+
key: [
|
|
536
|
+
{ type: 'path', d: 'M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4' },
|
|
537
|
+
],
|
|
538
|
+
shield: [
|
|
539
|
+
{ type: 'path', d: 'M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z' },
|
|
540
|
+
],
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
// ── Renderer ───────────────────────────────────────────────────────────────────
|
|
544
|
+
|
|
545
|
+
function renderDescriptor(
|
|
546
|
+
desc: PathDescriptor,
|
|
547
|
+
index: number,
|
|
548
|
+
strokeProps: React.SVGProps<SVGElement>,
|
|
549
|
+
): ReactNode {
|
|
550
|
+
const key = index;
|
|
551
|
+
switch (desc.type) {
|
|
552
|
+
case 'path':
|
|
553
|
+
return <path key={key} d={desc.d} {...(strokeProps as React.SVGProps<SVGPathElement>)} />;
|
|
554
|
+
case 'circle':
|
|
555
|
+
return <circle key={key} cx={desc.cx} cy={desc.cy} r={desc.r} {...(strokeProps as React.SVGProps<SVGCircleElement>)} />;
|
|
556
|
+
case 'rect':
|
|
557
|
+
return <rect key={key} x={desc.x} y={desc.y} width={desc.width} height={desc.height} rx={desc.rx} {...(strokeProps as React.SVGProps<SVGRectElement>)} />;
|
|
558
|
+
case 'line':
|
|
559
|
+
return <line key={key} x1={desc.x1} y1={desc.y1} x2={desc.x2} y2={desc.y2} {...(strokeProps as React.SVGProps<SVGLineElement>)} />;
|
|
560
|
+
case 'polyline':
|
|
561
|
+
return <polyline key={key} points={desc.points} {...(strokeProps as React.SVGProps<SVGPolylineElement>)} />;
|
|
562
|
+
case 'polygon':
|
|
563
|
+
return <polygon key={key} points={desc.points} {...(strokeProps as React.SVGProps<SVGPolygonElement>)} />;
|
|
564
|
+
default:
|
|
565
|
+
return null;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
// ── Token resolver ─────────────────────────────────────────────────────────────
|
|
570
|
+
|
|
571
|
+
const THEME_TOKEN_KEYS = new Set([
|
|
572
|
+
'bg', 'surface', 'surfaceAlt', 'border', 'text', 'textMuted',
|
|
573
|
+
'primary', 'secondary', 'danger', 'warning', 'success', 'info',
|
|
574
|
+
]);
|
|
575
|
+
|
|
576
|
+
function resolveColor(color: string, theme: Record<string, string>): string {
|
|
577
|
+
if (THEME_TOKEN_KEYS.has(color)) {
|
|
578
|
+
return theme[color] ?? color;
|
|
579
|
+
}
|
|
580
|
+
return color;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
// ── TkxIcon Component ──────────────────────────────────────────────────────────
|
|
584
|
+
|
|
585
|
+
export const TkxIcon = forwardRef<SVGSVGElement, TkxIconProps>(
|
|
586
|
+
(
|
|
587
|
+
{
|
|
588
|
+
name,
|
|
589
|
+
size = 24,
|
|
590
|
+
color = 'currentColor',
|
|
591
|
+
strokeWidth = 2,
|
|
592
|
+
filled = false,
|
|
593
|
+
label,
|
|
594
|
+
className,
|
|
595
|
+
style,
|
|
596
|
+
children,
|
|
597
|
+
...rest
|
|
598
|
+
},
|
|
599
|
+
ref,
|
|
600
|
+
) => {
|
|
601
|
+
const theme = useTheme();
|
|
602
|
+
const resolvedColor = resolveColor(color, theme as unknown as Record<string, string>);
|
|
603
|
+
|
|
604
|
+
const descriptors = name ? ICONS[name] : null;
|
|
605
|
+
|
|
606
|
+
const strokeProps: React.SVGProps<SVGElement> = filled
|
|
607
|
+
? { fill: resolvedColor, stroke: 'none' }
|
|
608
|
+
: {
|
|
609
|
+
fill: 'none',
|
|
610
|
+
stroke: resolvedColor,
|
|
611
|
+
strokeWidth,
|
|
612
|
+
strokeLinecap: 'round' as const,
|
|
613
|
+
strokeLinejoin: 'round' as const,
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
const isDecorative = !label;
|
|
617
|
+
|
|
618
|
+
const svgClass = tkx('inline-block shrink-0', className ?? '');
|
|
619
|
+
|
|
620
|
+
return (
|
|
621
|
+
<svg
|
|
622
|
+
ref={ref}
|
|
623
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
624
|
+
viewBox="0 0 24 24"
|
|
625
|
+
width={size}
|
|
626
|
+
height={size}
|
|
627
|
+
className={cx(svgClass, className)}
|
|
628
|
+
style={style}
|
|
629
|
+
aria-hidden={isDecorative ? 'true' : undefined}
|
|
630
|
+
role={!isDecorative ? 'img' : undefined}
|
|
631
|
+
aria-label={!isDecorative ? label : undefined}
|
|
632
|
+
focusable="false"
|
|
633
|
+
{...rest}
|
|
634
|
+
>
|
|
635
|
+
{!isDecorative && <title>{label}</title>}
|
|
636
|
+
{children ?? (descriptors
|
|
637
|
+
? descriptors.map((desc, i) => renderDescriptor(desc, i, strokeProps))
|
|
638
|
+
: null)}
|
|
639
|
+
</svg>
|
|
640
|
+
);
|
|
641
|
+
},
|
|
642
|
+
);
|
|
643
|
+
|
|
644
|
+
TkxIcon.displayName = 'TkxIcon';
|
|
645
|
+
|
|
646
|
+
// ── Category Map (exported for documentation use) ──────────────────────────────
|
|
647
|
+
|
|
648
|
+
export const ICON_CATEGORIES: Record<string, IconName[]> = {
|
|
649
|
+
Navigation: [
|
|
650
|
+
'home', 'menu', 'x', 'chevron-up', 'chevron-down', 'chevron-left', 'chevron-right',
|
|
651
|
+
'arrow-up', 'arrow-down', 'arrow-left', 'arrow-right', 'arrow-up-right',
|
|
652
|
+
'external-link', 'link', 'anchor',
|
|
653
|
+
],
|
|
654
|
+
Actions: [
|
|
655
|
+
'search', 'filter', 'sort', 'refresh', 'download', 'upload', 'share',
|
|
656
|
+
'copy', 'edit', 'trash', 'plus', 'minus', 'check', 'x-circle',
|
|
657
|
+
'check-circle', 'info-circle', 'alert-triangle', 'alert-circle',
|
|
658
|
+
],
|
|
659
|
+
UI: [
|
|
660
|
+
'eye', 'eye-off', 'settings', 'sliders', 'grid', 'list', 'columns',
|
|
661
|
+
'layout', 'sidebar', 'maximize', 'minimize', 'moon', 'sun', 'bell', 'bell-off',
|
|
662
|
+
],
|
|
663
|
+
Media: [
|
|
664
|
+
'play', 'pause', 'stop', 'skip-back', 'skip-forward', 'volume', 'volume-off',
|
|
665
|
+
'image', 'video', 'mic', 'mic-off', 'camera',
|
|
666
|
+
],
|
|
667
|
+
Data: [
|
|
668
|
+
'chart-bar', 'chart-line', 'chart-pie', 'trending-up', 'trending-down',
|
|
669
|
+
'activity', 'database', 'server', 'cpu', 'memory',
|
|
670
|
+
],
|
|
671
|
+
Commerce: [
|
|
672
|
+
'shopping-cart', 'package', 'tag', 'credit-card', 'dollar', 'percent',
|
|
673
|
+
'gift', 'truck', 'warehouse', 'box',
|
|
674
|
+
],
|
|
675
|
+
Communication: [
|
|
676
|
+
'mail', 'message', 'phone', 'user', 'users', 'team', 'star', 'heart',
|
|
677
|
+
'bookmark', 'flag', 'globe',
|
|
678
|
+
],
|
|
679
|
+
Files: [
|
|
680
|
+
'file', 'file-text', 'folder', 'folder-open', 'code', 'terminal',
|
|
681
|
+
'lock', 'unlock', 'key', 'shield',
|
|
682
|
+
],
|
|
683
|
+
};
|