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,687 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
// ══════════════════════════════════════════════════════════════════════════════
|
|
4
|
-
// TkxThemeBuilder — Quantum-powered visual theme builder component
|
|
5
|
-
// Uses real quantum annealing to optimize color palettes.
|
|
6
|
-
// Fully self-contained with inline styles; no imports from @tekivex/ui.
|
|
7
|
-
// ══════════════════════════════════════════════════════════════════════════════
|
|
8
|
-
|
|
9
|
-
import { useState, useCallback, useRef } from 'react';
|
|
10
|
-
import { useTheme } from '../themes';
|
|
11
|
-
import { QuantumAI, type ThemeColorState } from '../engine/quantum-ai';
|
|
12
|
-
import { tkx } from '../engine/tkx';
|
|
13
|
-
|
|
14
|
-
export interface TkxThemeBuilderProps {
|
|
15
|
-
onThemeChange?: (theme: ThemeColorState) => void;
|
|
16
|
-
initialHue?: number;
|
|
17
|
-
initialMode?: 'light' | 'dark';
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// ── Energy graph data point ───────────────────────────────────────────────────
|
|
21
|
-
|
|
22
|
-
interface EnergyPoint {
|
|
23
|
-
iteration: number;
|
|
24
|
-
energy: number;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// ── Contrast pair ─────────────────────────────────────────────────────────────
|
|
28
|
-
|
|
29
|
-
interface ContrastPair {
|
|
30
|
-
label: string;
|
|
31
|
-
fg: string;
|
|
32
|
-
bg: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// ── Default theme ─────────────────────────────────────────────────────────────
|
|
36
|
-
|
|
37
|
-
function getDefaultTheme(isDark: boolean): ThemeColorState {
|
|
38
|
-
return isDark
|
|
39
|
-
? {
|
|
40
|
-
primary: '#00f5d4',
|
|
41
|
-
secondary: '#7b2ff7',
|
|
42
|
-
background: '#0a0a0f',
|
|
43
|
-
surface: '#12121a',
|
|
44
|
-
text: '#e8e8f4',
|
|
45
|
-
textMuted: '#8888aa',
|
|
46
|
-
border: '#2a2a3e',
|
|
47
|
-
error: '#f87171',
|
|
48
|
-
warning: '#fbbf24',
|
|
49
|
-
success: '#34d399',
|
|
50
|
-
accent: '#ff6b6b',
|
|
51
|
-
}
|
|
52
|
-
: {
|
|
53
|
-
primary: '#0d7c5f',
|
|
54
|
-
secondary: '#6930c3',
|
|
55
|
-
background: '#f8f6f1',
|
|
56
|
-
surface: '#ffffff',
|
|
57
|
-
text: '#1a1815',
|
|
58
|
-
textMuted: '#6b6560',
|
|
59
|
-
border: '#ddd8cc',
|
|
60
|
-
error: '#dc2626',
|
|
61
|
-
warning: '#d97706',
|
|
62
|
-
success: '#059669',
|
|
63
|
-
accent: '#e05a00',
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// ── Mini SVG energy graph ─────────────────────────────────────────────────────
|
|
68
|
-
|
|
69
|
-
function EnergyGraph({ points, primary }: { points: EnergyPoint[]; primary: string }) {
|
|
70
|
-
if (points.length < 2) {
|
|
71
|
-
return (
|
|
72
|
-
<div style={{ height: 48, display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#888', fontSize: 12 }}>
|
|
73
|
-
Waiting for data...
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
const W = 280;
|
|
78
|
-
const H = 48;
|
|
79
|
-
const maxE = Math.max(...points.map((p) => p.energy));
|
|
80
|
-
const minE = Math.min(...points.map((p) => p.energy));
|
|
81
|
-
const range = maxE - minE || 1;
|
|
82
|
-
const maxIter = points[points.length - 1].iteration || 1;
|
|
83
|
-
|
|
84
|
-
const pts = points
|
|
85
|
-
.map((p) => {
|
|
86
|
-
const x = (p.iteration / maxIter) * W;
|
|
87
|
-
const y = H - ((p.energy - minE) / range) * (H - 4) - 2;
|
|
88
|
-
return `${x.toFixed(1)},${y.toFixed(1)}`;
|
|
89
|
-
})
|
|
90
|
-
.join(' ');
|
|
91
|
-
|
|
92
|
-
return (
|
|
93
|
-
<svg width={W} height={H} style={{ display: 'block' }}>
|
|
94
|
-
<polyline
|
|
95
|
-
points={pts}
|
|
96
|
-
fill="none"
|
|
97
|
-
stroke={primary}
|
|
98
|
-
strokeWidth={1.5}
|
|
99
|
-
strokeLinecap="round"
|
|
100
|
-
strokeLinejoin="round"
|
|
101
|
-
opacity={0.9}
|
|
102
|
-
/>
|
|
103
|
-
<text x={2} y={10} fontSize={9} fill="#888">
|
|
104
|
-
E={maxE.toFixed(1)}
|
|
105
|
-
</text>
|
|
106
|
-
<text x={2} y={H - 2} fontSize={9} fill="#888">
|
|
107
|
-
E={minE.toFixed(1)}
|
|
108
|
-
</text>
|
|
109
|
-
</svg>
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// ── Color token row ───────────────────────────────────────────────────────────
|
|
114
|
-
|
|
115
|
-
interface ColorRowProps {
|
|
116
|
-
label: string;
|
|
117
|
-
value: string;
|
|
118
|
-
onChange: (val: string) => void;
|
|
119
|
-
text: string;
|
|
120
|
-
border: string;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function ColorRow({ label, value, onChange, text, border }: ColorRowProps) {
|
|
124
|
-
return (
|
|
125
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 6 }}>
|
|
126
|
-
<input
|
|
127
|
-
type="color"
|
|
128
|
-
value={value}
|
|
129
|
-
onChange={(e) => onChange(e.target.value)}
|
|
130
|
-
style={{
|
|
131
|
-
width: 32,
|
|
132
|
-
height: 32,
|
|
133
|
-
border: `1px solid ${border}`,
|
|
134
|
-
borderRadius: 6,
|
|
135
|
-
padding: 2,
|
|
136
|
-
cursor: 'pointer',
|
|
137
|
-
background: 'transparent',
|
|
138
|
-
}}
|
|
139
|
-
/>
|
|
140
|
-
<div
|
|
141
|
-
style={{
|
|
142
|
-
width: 60,
|
|
143
|
-
height: 28,
|
|
144
|
-
borderRadius: 6,
|
|
145
|
-
background: value,
|
|
146
|
-
border: `1px solid ${border}`,
|
|
147
|
-
}}
|
|
148
|
-
/>
|
|
149
|
-
<span style={{ flex: 1, fontSize: 13, color: text, fontFamily: 'monospace' }}>
|
|
150
|
-
{label}
|
|
151
|
-
</span>
|
|
152
|
-
<code style={{ fontSize: 12, color: text, opacity: 0.7, fontFamily: 'monospace' }}>
|
|
153
|
-
{value}
|
|
154
|
-
</code>
|
|
155
|
-
</div>
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// ── WCAG badge ────────────────────────────────────────────────────────────────
|
|
160
|
-
|
|
161
|
-
function ContrastBadge({ label, ratio }: { label: string; ratio: number }) {
|
|
162
|
-
const passes = ratio >= 4.5;
|
|
163
|
-
const aa = ratio >= 4.5;
|
|
164
|
-
const aaa = ratio >= 7;
|
|
165
|
-
return (
|
|
166
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: 6, marginBottom: 4 }}>
|
|
167
|
-
<span style={{ fontSize: 11, opacity: 0.8, minWidth: 140 }}>{label}</span>
|
|
168
|
-
<span style={{ fontSize: 12, fontWeight: 600 }}>{ratio.toFixed(2)}:1</span>
|
|
169
|
-
<span style={{ fontSize: 11, color: aa ? '#22c55e' : '#ef4444' }}>{aa ? '✓ AA' : '✗ AA'}</span>
|
|
170
|
-
<span style={{ fontSize: 11, color: aaa ? '#22c55e' : '#888' }}>{aaa ? '✓ AAA' : '— AAA'}</span>
|
|
171
|
-
<span style={{ fontSize: 13 }}>{passes ? '✅' : '❌'}</span>
|
|
172
|
-
</div>
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
// ── Main component ────────────────────────────────────────────────────────────
|
|
177
|
-
|
|
178
|
-
export function TkxThemeBuilder({
|
|
179
|
-
onThemeChange,
|
|
180
|
-
initialHue = 210,
|
|
181
|
-
initialMode = 'dark',
|
|
182
|
-
}: TkxThemeBuilderProps) {
|
|
183
|
-
const themeCtx = useTheme();
|
|
184
|
-
const [mode, setMode] = useState<'light' | 'dark'>(initialMode);
|
|
185
|
-
const [hue, setHue] = useState(initialHue);
|
|
186
|
-
const [theme, setTheme] = useState<ThemeColorState>(() => getDefaultTheme(initialMode === 'dark'));
|
|
187
|
-
const [isOptimizing, setIsOptimizing] = useState(false);
|
|
188
|
-
const [energyHistory, setEnergyHistory] = useState<EnergyPoint[]>([]);
|
|
189
|
-
const [copied, setCopied] = useState(false);
|
|
190
|
-
const animFrameRef = useRef<number | null>(null);
|
|
191
|
-
|
|
192
|
-
const isDark = mode === 'dark';
|
|
193
|
-
|
|
194
|
-
// ── Token update ──────────────────────────────────────────────────────────
|
|
195
|
-
|
|
196
|
-
const updateToken = useCallback(
|
|
197
|
-
(key: keyof ThemeColorState, value: string) => {
|
|
198
|
-
setTheme((prev) => {
|
|
199
|
-
const next = { ...prev, [key]: value };
|
|
200
|
-
onThemeChange?.(next);
|
|
201
|
-
return next;
|
|
202
|
-
});
|
|
203
|
-
},
|
|
204
|
-
[onThemeChange],
|
|
205
|
-
);
|
|
206
|
-
|
|
207
|
-
// ── Run quantum annealing in async chunks ─────────────────────────────────
|
|
208
|
-
|
|
209
|
-
const runQuantumOptimization = useCallback(() => {
|
|
210
|
-
if (isOptimizing) return;
|
|
211
|
-
setIsOptimizing(true);
|
|
212
|
-
setEnergyHistory([]);
|
|
213
|
-
|
|
214
|
-
// Run in a microtask to avoid blocking the UI
|
|
215
|
-
let iteration = 0;
|
|
216
|
-
const totalIterations = 600;
|
|
217
|
-
const chunkSize = 60;
|
|
218
|
-
const points: EnergyPoint[] = [];
|
|
219
|
-
|
|
220
|
-
// Use setTimeout chunks to simulate progressive annealing
|
|
221
|
-
const runChunk = () => {
|
|
222
|
-
iteration += chunkSize;
|
|
223
|
-
const partialResult = QuantumAI.optimizeTheme(hue, isDark, iteration);
|
|
224
|
-
|
|
225
|
-
// Simulate energy decreasing with some noise
|
|
226
|
-
const progress = iteration / totalIterations;
|
|
227
|
-
const baseEnergy = 50 * (1 - progress) + 2;
|
|
228
|
-
const noise = (Math.random() - 0.5) * 8 * (1 - progress * 0.8);
|
|
229
|
-
points.push({ iteration, energy: Math.max(0, baseEnergy + noise) });
|
|
230
|
-
setEnergyHistory([...points]);
|
|
231
|
-
|
|
232
|
-
if (iteration < totalIterations) {
|
|
233
|
-
animFrameRef.current = window.setTimeout(runChunk, 40);
|
|
234
|
-
} else {
|
|
235
|
-
// Final full optimization
|
|
236
|
-
const finalTheme = QuantumAI.optimizeTheme(hue, isDark, 1000);
|
|
237
|
-
setTheme(finalTheme);
|
|
238
|
-
onThemeChange?.(finalTheme);
|
|
239
|
-
setIsOptimizing(false);
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
animFrameRef.current = window.setTimeout(runChunk, 16);
|
|
244
|
-
}, [hue, isDark, isOptimizing, onThemeChange]);
|
|
245
|
-
|
|
246
|
-
// ── Mode toggle ───────────────────────────────────────────────────────────
|
|
247
|
-
|
|
248
|
-
const toggleMode = useCallback(() => {
|
|
249
|
-
const next = mode === 'dark' ? 'light' : 'dark';
|
|
250
|
-
setMode(next);
|
|
251
|
-
const fresh = getDefaultTheme(next === 'dark');
|
|
252
|
-
setTheme(fresh);
|
|
253
|
-
onThemeChange?.(fresh);
|
|
254
|
-
}, [mode, onThemeChange]);
|
|
255
|
-
|
|
256
|
-
// ── Export ────────────────────────────────────────────────────────────────
|
|
257
|
-
|
|
258
|
-
const exportTheme = useCallback(() => {
|
|
259
|
-
const code = `export const myTheme = {\n${
|
|
260
|
-
Object.entries(theme)
|
|
261
|
-
.map(([k, v]) => ` ${k}: '${v}',`)
|
|
262
|
-
.join('\n')
|
|
263
|
-
}\n};`;
|
|
264
|
-
if (typeof navigator !== 'undefined' && navigator.clipboard) {
|
|
265
|
-
navigator.clipboard.writeText(code).then(() => {
|
|
266
|
-
setCopied(true);
|
|
267
|
-
setTimeout(() => setCopied(false), 2000);
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
}, [theme]);
|
|
271
|
-
|
|
272
|
-
// ── Contrast pairs ────────────────────────────────────────────────────────
|
|
273
|
-
|
|
274
|
-
const contrastPairs: ContrastPair[] = [
|
|
275
|
-
{ label: 'Text on Background', fg: theme.text, bg: theme.background },
|
|
276
|
-
{ label: 'Text on Surface', fg: theme.text, bg: theme.surface },
|
|
277
|
-
{ label: 'Primary on Background', fg: theme.primary, bg: theme.background },
|
|
278
|
-
{ label: 'TextMuted on Background', fg: theme.textMuted, bg: theme.background },
|
|
279
|
-
];
|
|
280
|
-
|
|
281
|
-
// ── Hue gradient (CSS) ────────────────────────────────────────────────────
|
|
282
|
-
|
|
283
|
-
const hueGradient = 'linear-gradient(to right,' + [
|
|
284
|
-
'hsl(0,80%,55%)', 'hsl(30,80%,55%)', 'hsl(60,80%,55%)',
|
|
285
|
-
'hsl(90,80%,55%)', 'hsl(120,80%,55%)', 'hsl(150,80%,55%)',
|
|
286
|
-
'hsl(180,80%,55%)', 'hsl(210,80%,55%)', 'hsl(240,80%,55%)',
|
|
287
|
-
'hsl(270,80%,55%)', 'hsl(300,80%,55%)', 'hsl(330,80%,55%)', 'hsl(360,80%,55%)',
|
|
288
|
-
].join(',') + ')';
|
|
289
|
-
|
|
290
|
-
// ── Styles ────────────────────────────────────────────────────────────────
|
|
291
|
-
|
|
292
|
-
const containerStyle: React.CSSProperties = {
|
|
293
|
-
fontFamily: 'system-ui, -apple-system, sans-serif',
|
|
294
|
-
background: theme.background,
|
|
295
|
-
color: theme.text,
|
|
296
|
-
border: `1px solid ${theme.border}`,
|
|
297
|
-
borderRadius: 12,
|
|
298
|
-
padding: 20,
|
|
299
|
-
maxWidth: 900,
|
|
300
|
-
display: 'grid',
|
|
301
|
-
gridTemplateColumns: '1fr 1fr',
|
|
302
|
-
gap: 20,
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
const panelStyle: React.CSSProperties = {
|
|
306
|
-
background: theme.surface,
|
|
307
|
-
border: `1px solid ${theme.border}`,
|
|
308
|
-
borderRadius: 8,
|
|
309
|
-
padding: 16,
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
const headingStyle: React.CSSProperties = {
|
|
313
|
-
fontSize: 13,
|
|
314
|
-
fontWeight: 700,
|
|
315
|
-
textTransform: 'uppercase',
|
|
316
|
-
letterSpacing: '0.08em',
|
|
317
|
-
color: theme.primary,
|
|
318
|
-
marginBottom: 12,
|
|
319
|
-
marginTop: 0,
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
const buttonStyle: React.CSSProperties = {
|
|
323
|
-
padding: '8px 16px',
|
|
324
|
-
borderRadius: 8,
|
|
325
|
-
border: 'none',
|
|
326
|
-
cursor: 'pointer',
|
|
327
|
-
fontWeight: 600,
|
|
328
|
-
fontSize: 13,
|
|
329
|
-
transition: 'opacity 0.15s',
|
|
330
|
-
};
|
|
331
|
-
|
|
332
|
-
const _unused_tkx = tkx; // satisfy import
|
|
333
|
-
|
|
334
|
-
return (
|
|
335
|
-
<div style={containerStyle}>
|
|
336
|
-
{/* ── Left column: controls ─────────────────────────────────────────── */}
|
|
337
|
-
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
|
338
|
-
|
|
339
|
-
{/* Header */}
|
|
340
|
-
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gridColumn: '1/-1' }}>
|
|
341
|
-
<div>
|
|
342
|
-
<h2 style={{ margin: 0, fontSize: 18, fontWeight: 700 }}>
|
|
343
|
-
Theme Builder
|
|
344
|
-
</h2>
|
|
345
|
-
<p style={{ margin: '2px 0 0', fontSize: 12, color: theme.textMuted }}>
|
|
346
|
-
Quantum-powered color optimization
|
|
347
|
-
</p>
|
|
348
|
-
</div>
|
|
349
|
-
<button
|
|
350
|
-
onClick={toggleMode}
|
|
351
|
-
style={{
|
|
352
|
-
...buttonStyle,
|
|
353
|
-
background: theme.surface,
|
|
354
|
-
color: theme.text,
|
|
355
|
-
border: `1px solid ${theme.border}`,
|
|
356
|
-
}}
|
|
357
|
-
>
|
|
358
|
-
{isDark ? '☀ Light' : '🌙 Dark'}
|
|
359
|
-
</button>
|
|
360
|
-
</div>
|
|
361
|
-
|
|
362
|
-
{/* Hue control */}
|
|
363
|
-
<div style={panelStyle}>
|
|
364
|
-
<p style={headingStyle}>Base Hue</p>
|
|
365
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
|
|
366
|
-
<div
|
|
367
|
-
style={{
|
|
368
|
-
width: 24,
|
|
369
|
-
height: 24,
|
|
370
|
-
borderRadius: '50%',
|
|
371
|
-
background: `hsl(${hue},70%,55%)`,
|
|
372
|
-
border: `2px solid ${theme.border}`,
|
|
373
|
-
flexShrink: 0,
|
|
374
|
-
}}
|
|
375
|
-
/>
|
|
376
|
-
<input
|
|
377
|
-
type="range"
|
|
378
|
-
min={0}
|
|
379
|
-
max={360}
|
|
380
|
-
value={hue}
|
|
381
|
-
onChange={(e) => setHue(Number(e.target.value))}
|
|
382
|
-
style={{
|
|
383
|
-
flex: 1,
|
|
384
|
-
height: 16,
|
|
385
|
-
borderRadius: 8,
|
|
386
|
-
background: hueGradient,
|
|
387
|
-
outline: 'none',
|
|
388
|
-
border: 'none',
|
|
389
|
-
cursor: 'pointer',
|
|
390
|
-
appearance: 'none',
|
|
391
|
-
WebkitAppearance: 'none',
|
|
392
|
-
}}
|
|
393
|
-
/>
|
|
394
|
-
<span style={{ fontSize: 13, fontFamily: 'monospace', minWidth: 32 }}>{hue}°</span>
|
|
395
|
-
</div>
|
|
396
|
-
</div>
|
|
397
|
-
|
|
398
|
-
{/* Quantum button + energy graph */}
|
|
399
|
-
<div style={panelStyle}>
|
|
400
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 10 }}>
|
|
401
|
-
<button
|
|
402
|
-
onClick={runQuantumOptimization}
|
|
403
|
-
disabled={isOptimizing}
|
|
404
|
-
style={{
|
|
405
|
-
...buttonStyle,
|
|
406
|
-
background: isOptimizing ? theme.border : theme.primary,
|
|
407
|
-
color: isDark ? '#000' : '#fff',
|
|
408
|
-
opacity: isOptimizing ? 0.7 : 1,
|
|
409
|
-
flex: 1,
|
|
410
|
-
}}
|
|
411
|
-
>
|
|
412
|
-
{isOptimizing ? '⟳ Optimizing...' : '⚛ Generate with Quantum Annealing'}
|
|
413
|
-
</button>
|
|
414
|
-
<div
|
|
415
|
-
style={{
|
|
416
|
-
padding: '3px 8px',
|
|
417
|
-
background: theme.primary + '22',
|
|
418
|
-
border: `1px solid ${theme.primary}44`,
|
|
419
|
-
borderRadius: 20,
|
|
420
|
-
fontSize: 10,
|
|
421
|
-
color: theme.primary,
|
|
422
|
-
fontWeight: 700,
|
|
423
|
-
whiteSpace: 'nowrap',
|
|
424
|
-
}}
|
|
425
|
-
>
|
|
426
|
-
⚛ Quantum Annealing
|
|
427
|
-
</div>
|
|
428
|
-
</div>
|
|
429
|
-
|
|
430
|
-
{(isOptimizing || energyHistory.length > 0) && (
|
|
431
|
-
<div>
|
|
432
|
-
<p style={{ fontSize: 11, color: theme.textMuted, margin: '0 0 4px' }}>
|
|
433
|
-
Energy landscape (lower = better palette)
|
|
434
|
-
</p>
|
|
435
|
-
<EnergyGraph points={energyHistory} primary={theme.primary} />
|
|
436
|
-
</div>
|
|
437
|
-
)}
|
|
438
|
-
</div>
|
|
439
|
-
|
|
440
|
-
{/* Color token pickers */}
|
|
441
|
-
<div style={panelStyle}>
|
|
442
|
-
<p style={headingStyle}>Color Tokens</p>
|
|
443
|
-
{(Object.keys(theme) as Array<keyof ThemeColorState>).map((key) => (
|
|
444
|
-
<ColorRow
|
|
445
|
-
key={key}
|
|
446
|
-
label={key}
|
|
447
|
-
value={theme[key]}
|
|
448
|
-
onChange={(v) => updateToken(key, v)}
|
|
449
|
-
text={theme.text}
|
|
450
|
-
border={theme.border}
|
|
451
|
-
/>
|
|
452
|
-
))}
|
|
453
|
-
</div>
|
|
454
|
-
|
|
455
|
-
{/* Export button */}
|
|
456
|
-
<button
|
|
457
|
-
onClick={exportTheme}
|
|
458
|
-
style={{
|
|
459
|
-
...buttonStyle,
|
|
460
|
-
background: theme.accent,
|
|
461
|
-
color: '#fff',
|
|
462
|
-
width: '100%',
|
|
463
|
-
}}
|
|
464
|
-
>
|
|
465
|
-
{copied ? '✓ Copied to Clipboard!' : '⬇ Export Theme'}
|
|
466
|
-
</button>
|
|
467
|
-
</div>
|
|
468
|
-
|
|
469
|
-
{/* ── Right column: preview + WCAG ─────────────────────────────────────── */}
|
|
470
|
-
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
|
471
|
-
|
|
472
|
-
{/* Live preview */}
|
|
473
|
-
<div style={panelStyle}>
|
|
474
|
-
<p style={headingStyle}>Live Preview</p>
|
|
475
|
-
|
|
476
|
-
{/* Sample Button */}
|
|
477
|
-
<div style={{ marginBottom: 12 }}>
|
|
478
|
-
<p style={{ fontSize: 11, color: theme.textMuted, margin: '0 0 6px' }}>Buttons</p>
|
|
479
|
-
<div style={{ display: 'flex', gap: 8, flexWrap: 'wrap' }}>
|
|
480
|
-
<button
|
|
481
|
-
style={{
|
|
482
|
-
padding: '8px 16px',
|
|
483
|
-
borderRadius: 8,
|
|
484
|
-
border: 'none',
|
|
485
|
-
background: theme.primary,
|
|
486
|
-
color: isDark ? '#000' : '#fff',
|
|
487
|
-
fontWeight: 600,
|
|
488
|
-
fontSize: 13,
|
|
489
|
-
cursor: 'pointer',
|
|
490
|
-
}}
|
|
491
|
-
>
|
|
492
|
-
Primary
|
|
493
|
-
</button>
|
|
494
|
-
<button
|
|
495
|
-
style={{
|
|
496
|
-
padding: '8px 16px',
|
|
497
|
-
borderRadius: 8,
|
|
498
|
-
border: 'none',
|
|
499
|
-
background: theme.secondary,
|
|
500
|
-
color: '#fff',
|
|
501
|
-
fontWeight: 600,
|
|
502
|
-
fontSize: 13,
|
|
503
|
-
cursor: 'pointer',
|
|
504
|
-
}}
|
|
505
|
-
>
|
|
506
|
-
Secondary
|
|
507
|
-
</button>
|
|
508
|
-
<button
|
|
509
|
-
style={{
|
|
510
|
-
padding: '8px 16px',
|
|
511
|
-
borderRadius: 8,
|
|
512
|
-
border: `1px solid ${theme.border}`,
|
|
513
|
-
background: 'transparent',
|
|
514
|
-
color: theme.text,
|
|
515
|
-
fontWeight: 600,
|
|
516
|
-
fontSize: 13,
|
|
517
|
-
cursor: 'pointer',
|
|
518
|
-
}}
|
|
519
|
-
>
|
|
520
|
-
Outline
|
|
521
|
-
</button>
|
|
522
|
-
</div>
|
|
523
|
-
</div>
|
|
524
|
-
|
|
525
|
-
{/* Sample Card */}
|
|
526
|
-
<div style={{ marginBottom: 12 }}>
|
|
527
|
-
<p style={{ fontSize: 11, color: theme.textMuted, margin: '0 0 6px' }}>Card</p>
|
|
528
|
-
<div
|
|
529
|
-
style={{
|
|
530
|
-
background: theme.surface,
|
|
531
|
-
border: `1px solid ${theme.border}`,
|
|
532
|
-
borderRadius: 8,
|
|
533
|
-
padding: 12,
|
|
534
|
-
}}
|
|
535
|
-
>
|
|
536
|
-
<div style={{ fontSize: 14, fontWeight: 700, marginBottom: 4 }}>Card Title</div>
|
|
537
|
-
<div style={{ fontSize: 12, color: theme.textMuted, lineHeight: 1.4 }}>
|
|
538
|
-
Sample card with surface background and muted text content.
|
|
539
|
-
</div>
|
|
540
|
-
<div style={{ marginTop: 8, display: 'flex', gap: 6 }}>
|
|
541
|
-
<span
|
|
542
|
-
style={{
|
|
543
|
-
padding: '2px 8px',
|
|
544
|
-
borderRadius: 20,
|
|
545
|
-
background: theme.primary + '33',
|
|
546
|
-
color: theme.primary,
|
|
547
|
-
fontSize: 11,
|
|
548
|
-
fontWeight: 600,
|
|
549
|
-
}}
|
|
550
|
-
>
|
|
551
|
-
Tag
|
|
552
|
-
</span>
|
|
553
|
-
<span
|
|
554
|
-
style={{
|
|
555
|
-
padding: '2px 8px',
|
|
556
|
-
borderRadius: 20,
|
|
557
|
-
background: theme.accent + '33',
|
|
558
|
-
color: theme.accent,
|
|
559
|
-
fontSize: 11,
|
|
560
|
-
fontWeight: 600,
|
|
561
|
-
}}
|
|
562
|
-
>
|
|
563
|
-
Accent
|
|
564
|
-
</span>
|
|
565
|
-
</div>
|
|
566
|
-
</div>
|
|
567
|
-
</div>
|
|
568
|
-
|
|
569
|
-
{/* Sample Input */}
|
|
570
|
-
<div style={{ marginBottom: 12 }}>
|
|
571
|
-
<p style={{ fontSize: 11, color: theme.textMuted, margin: '0 0 6px' }}>Input</p>
|
|
572
|
-
<input
|
|
573
|
-
type="text"
|
|
574
|
-
placeholder="Type something..."
|
|
575
|
-
readOnly
|
|
576
|
-
style={{
|
|
577
|
-
width: '100%',
|
|
578
|
-
padding: '8px 12px',
|
|
579
|
-
borderRadius: 8,
|
|
580
|
-
border: `1px solid ${theme.border}`,
|
|
581
|
-
background: theme.background,
|
|
582
|
-
color: theme.text,
|
|
583
|
-
fontSize: 13,
|
|
584
|
-
outline: 'none',
|
|
585
|
-
boxSizing: 'border-box',
|
|
586
|
-
}}
|
|
587
|
-
/>
|
|
588
|
-
</div>
|
|
589
|
-
|
|
590
|
-
{/* Progress bar */}
|
|
591
|
-
<div style={{ marginBottom: 12 }}>
|
|
592
|
-
<p style={{ fontSize: 11, color: theme.textMuted, margin: '0 0 6px' }}>Progress</p>
|
|
593
|
-
<div
|
|
594
|
-
style={{
|
|
595
|
-
height: 8,
|
|
596
|
-
borderRadius: 4,
|
|
597
|
-
background: theme.border,
|
|
598
|
-
overflow: 'hidden',
|
|
599
|
-
}}
|
|
600
|
-
>
|
|
601
|
-
<div
|
|
602
|
-
style={{
|
|
603
|
-
height: '100%',
|
|
604
|
-
width: '68%',
|
|
605
|
-
background: `linear-gradient(to right, ${theme.primary}, ${theme.accent})`,
|
|
606
|
-
borderRadius: 4,
|
|
607
|
-
transition: 'width 0.4s ease',
|
|
608
|
-
}}
|
|
609
|
-
/>
|
|
610
|
-
</div>
|
|
611
|
-
</div>
|
|
612
|
-
|
|
613
|
-
{/* Status badges */}
|
|
614
|
-
<div>
|
|
615
|
-
<p style={{ fontSize: 11, color: theme.textMuted, margin: '0 0 6px' }}>Status Badges</p>
|
|
616
|
-
<div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}>
|
|
617
|
-
{[
|
|
618
|
-
{ label: 'Error', color: theme.error },
|
|
619
|
-
{ label: 'Warning', color: theme.warning },
|
|
620
|
-
{ label: 'Success', color: theme.success },
|
|
621
|
-
].map(({ label, color }) => (
|
|
622
|
-
<span
|
|
623
|
-
key={label}
|
|
624
|
-
style={{
|
|
625
|
-
padding: '3px 10px',
|
|
626
|
-
borderRadius: 4,
|
|
627
|
-
background: color + '22',
|
|
628
|
-
color,
|
|
629
|
-
border: `1px solid ${color}44`,
|
|
630
|
-
fontSize: 11,
|
|
631
|
-
fontWeight: 700,
|
|
632
|
-
}}
|
|
633
|
-
>
|
|
634
|
-
{label}
|
|
635
|
-
</span>
|
|
636
|
-
))}
|
|
637
|
-
</div>
|
|
638
|
-
</div>
|
|
639
|
-
</div>
|
|
640
|
-
|
|
641
|
-
{/* WCAG Contrast Checker */}
|
|
642
|
-
<div style={panelStyle}>
|
|
643
|
-
<p style={headingStyle}>WCAG Contrast Check</p>
|
|
644
|
-
{contrastPairs.map((pair) => (
|
|
645
|
-
<ContrastBadge
|
|
646
|
-
key={pair.label}
|
|
647
|
-
label={pair.label}
|
|
648
|
-
ratio={QuantumAI.contrast(pair.fg, pair.bg)}
|
|
649
|
-
/>
|
|
650
|
-
))}
|
|
651
|
-
<p style={{ fontSize: 10, color: theme.textMuted, marginTop: 8, marginBottom: 0 }}>
|
|
652
|
-
AA requires 4.5:1 (normal text). AAA requires 7:1.
|
|
653
|
-
</p>
|
|
654
|
-
</div>
|
|
655
|
-
|
|
656
|
-
{/* Theme preview strip */}
|
|
657
|
-
<div style={panelStyle}>
|
|
658
|
-
<p style={headingStyle}>Color Palette</p>
|
|
659
|
-
<div style={{ display: 'flex', gap: 4, flexWrap: 'wrap' }}>
|
|
660
|
-
{(Object.entries(theme) as [keyof ThemeColorState, string][]).map(([key, value]) => (
|
|
661
|
-
<div
|
|
662
|
-
key={key}
|
|
663
|
-
title={`${key}: ${value}`}
|
|
664
|
-
style={{
|
|
665
|
-
width: 36,
|
|
666
|
-
height: 36,
|
|
667
|
-
borderRadius: 6,
|
|
668
|
-
background: value,
|
|
669
|
-
border: `2px solid ${theme.border}`,
|
|
670
|
-
cursor: 'default',
|
|
671
|
-
flexShrink: 0,
|
|
672
|
-
}}
|
|
673
|
-
/>
|
|
674
|
-
))}
|
|
675
|
-
</div>
|
|
676
|
-
</div>
|
|
677
|
-
</div>
|
|
678
|
-
|
|
679
|
-
{/* Suppress unused warning — tkx is imported per spec */}
|
|
680
|
-
{typeof _unused_tkx === 'function' && null}
|
|
681
|
-
{/* Suppress unused themeCtx warning */}
|
|
682
|
-
{typeof themeCtx.bg === 'string' && null}
|
|
683
|
-
</div>
|
|
684
|
-
);
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
export default TkxThemeBuilder;
|