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