tekivex-ui 2.5.15 → 2.5.16
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-BiHAhNbu.js +3 -0
- package/dist/chunk-CVRuGUFA.js +1 -0
- package/dist/chunk-Dc4_ud5s.js +1 -0
- package/dist/chunk-Dj40UFcz.js +1 -0
- package/dist/chunk-DjxOP8W4.js +1 -0
- package/dist/chunk-DmRB1Blb.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 +0 -1
- package/dist/index.js +419 -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 +0 -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/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 +0 -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 +0 -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,20 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unified controlled/uncontrolled state management.
|
|
3
|
-
* The component accepts both a controlled `value` + `onChange` pair
|
|
4
|
-
* OR works standalone with internal state when they're not provided.
|
|
5
|
-
*
|
|
6
|
-
* This is the same pattern used by Radix UI, Mantine, and Ant Design internally.
|
|
7
|
-
*
|
|
8
|
-
* @example — in a custom Select component:
|
|
9
|
-
* const [currentValue, setCurrentValue] = useControllable({
|
|
10
|
-
* value: props.value, // may be undefined (uncontrolled)
|
|
11
|
-
* onChange: props.onChange, // may be undefined
|
|
12
|
-
* defaultValue: '',
|
|
13
|
-
* });
|
|
14
|
-
*/
|
|
15
1
|
export declare function useControllable<T>({ value, onChange, defaultValue, }: {
|
|
16
2
|
value?: T;
|
|
17
3
|
onChange?: (value: T) => void;
|
|
18
4
|
defaultValue: T;
|
|
19
5
|
}): [T, (next: T) => void];
|
|
20
|
-
//# sourceMappingURL=useControllable.d.ts.map
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns a debounced version of the value that only updates after the
|
|
3
|
-
* specified delay has passed without changes.
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* const debouncedSearch = useDebounce(searchQuery, 300);
|
|
7
|
-
* useEffect(() => { fetchResults(debouncedSearch); }, [debouncedSearch]);
|
|
8
|
-
*/
|
|
9
1
|
export declare function useDebounce<T>(value: T, delay: number): T;
|
|
10
|
-
/**
|
|
11
|
-
* Returns a debounced callback that only fires after the delay.
|
|
12
|
-
*/
|
|
13
2
|
export declare function useDebouncedCallback<T extends (...args: any[]) => any>(fn: T, delay: number): (...args: Parameters<T>) => void;
|
|
14
|
-
//# sourceMappingURL=useDebounce.d.ts.map
|
|
@@ -4,17 +4,4 @@ export interface UseDisclosureReturn {
|
|
|
4
4
|
close: () => void;
|
|
5
5
|
toggle: () => void;
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
* Manages boolean open/close state for modals, drawers, popovers, dropdowns, etc.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* const { isOpen, open, close, toggle } = useDisclosure();
|
|
12
|
-
* return (
|
|
13
|
-
* <>
|
|
14
|
-
* <button onClick={open}>Open</button>
|
|
15
|
-
* {isOpen && <MyModal onClose={close} />}
|
|
16
|
-
* </>
|
|
17
|
-
* );
|
|
18
|
-
*/
|
|
19
7
|
export declare function useDisclosure(initialState?: boolean): UseDisclosureReturn;
|
|
20
|
-
//# sourceMappingURL=useDisclosure.d.ts.map
|
|
@@ -28,17 +28,4 @@ export interface UseFormStateReturn<T extends Record<string, FormFieldValue>> {
|
|
|
28
28
|
'aria-describedby': string | undefined;
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Headless form state manager — no components, no context, no validation library required.
|
|
33
|
-
* Works with any input elements.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* const { values, errors, getFieldProps, validate } = useFormState({
|
|
37
|
-
* initialValues: { email: '', password: '' },
|
|
38
|
-
* validate: ({ email }) => ({
|
|
39
|
-
* email: !email.includes('@') ? 'Invalid email' : undefined,
|
|
40
|
-
* }),
|
|
41
|
-
* });
|
|
42
|
-
*/
|
|
43
31
|
export declare function useFormState<T extends Record<string, FormFieldValue>>({ initialValues, validate: validateFn, }: UseFormStateOptions<T>): UseFormStateReturn<T>;
|
|
44
|
-
//# sourceMappingURL=useFormState.d.ts.map
|
|
@@ -21,15 +21,4 @@ export interface InfiniteQueryState<T, C = unknown> {
|
|
|
21
21
|
pageIndex: number;
|
|
22
22
|
totalLoaded: number;
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Headless infinite-scroll / pagination hook with cursor-based querying,
|
|
26
|
-
* dedup protection, and safe unmount cleanup.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* const query = useInfiniteQuery({
|
|
30
|
-
* queryFn: async (cursor) => fetchPosts({ cursor }),
|
|
31
|
-
* });
|
|
32
|
-
* // In your component: query.data, query.fetchMore(), query.hasMore
|
|
33
|
-
*/
|
|
34
24
|
export declare function useInfiniteQuery<T, C = unknown>(options: InfiniteQueryOptions<T, C>): InfiniteQueryState<T, C>;
|
|
35
|
-
//# sourceMappingURL=useInfiniteQuery.d.ts.map
|
|
@@ -3,7 +3,6 @@ export interface UseIntersectionObserverOptions {
|
|
|
3
3
|
threshold?: number | number[];
|
|
4
4
|
rootMargin?: string;
|
|
5
5
|
root?: Element | null;
|
|
6
|
-
/** Unobserve after first intersection (useful for lazy-load). Default: false */
|
|
7
6
|
once?: boolean;
|
|
8
7
|
}
|
|
9
8
|
export interface UseIntersectionObserverReturn {
|
|
@@ -11,13 +10,4 @@ export interface UseIntersectionObserverReturn {
|
|
|
11
10
|
isIntersecting: boolean;
|
|
12
11
|
entry: IntersectionObserverEntry | null;
|
|
13
12
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Observe when an element enters or leaves the viewport.
|
|
16
|
-
* Perfect for lazy loading, infinite scroll, and scroll-triggered animations.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* const { ref, isIntersecting } = useIntersectionObserver({ threshold: 0.1 });
|
|
20
|
-
* return <div ref={ref} style={{ opacity: isIntersecting ? 1 : 0 }}>Animated content</div>;
|
|
21
|
-
*/
|
|
22
13
|
export declare function useIntersectionObserver({ threshold, rootMargin, root, once, }?: UseIntersectionObserverOptions): UseIntersectionObserverReturn;
|
|
23
|
-
//# sourceMappingURL=useIntersectionObserver.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export interface UseListSelectionOptions {
|
|
2
2
|
items: string[];
|
|
3
3
|
initialSelected?: string[];
|
|
4
|
-
/** Allow selecting multiple items. Default: true */
|
|
5
4
|
multiple?: boolean;
|
|
6
5
|
}
|
|
7
6
|
export interface UseListSelectionReturn {
|
|
@@ -18,12 +17,4 @@ export interface UseListSelectionReturn {
|
|
|
18
17
|
selectedCount: number;
|
|
19
18
|
selectedArray: string[];
|
|
20
19
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Manages selection state for lists, tables, and grids.
|
|
23
|
-
* Supports single and multi-select modes.
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* const { isSelected, toggle, selectedArray } = useListSelection({ items: rows.map(r => r.id) });
|
|
27
|
-
*/
|
|
28
20
|
export declare function useListSelection({ items, initialSelected, multiple, }: UseListSelectionOptions): UseListSelectionReturn;
|
|
29
|
-
//# sourceMappingURL=useListSelection.d.ts.map
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Persists state to localStorage. Falls back to in-memory on parse errors or
|
|
3
|
-
* SSR (where localStorage is unavailable).
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* const [theme, setTheme] = useLocalStorage('theme', 'dark');
|
|
7
|
-
*/
|
|
8
1
|
export declare function useLocalStorage<T>(key: string, initialValue: T): [T, (value: T | ((prev: T) => T)) => void, () => void];
|
|
9
|
-
//# sourceMappingURL=useLocalStorage.d.ts.map
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reactive media query hook. Returns true while the query matches.
|
|
3
|
-
*
|
|
4
|
-
* @example
|
|
5
|
-
* const isMobile = useMediaQuery('(max-width: 767px)');
|
|
6
|
-
* const isDark = useMediaQuery('(prefers-color-scheme: dark)');
|
|
7
|
-
* const isTouch = useMediaQuery('(hover: none) and (pointer: coarse)');
|
|
8
|
-
*/
|
|
9
1
|
export declare function useMediaQuery(query: string): boolean;
|
|
10
|
-
/** Preset breakpoint hooks matching TekiVex's breakpoint scale. */
|
|
11
2
|
export declare function useBreakpoint(): {
|
|
12
3
|
sm: boolean;
|
|
13
4
|
md: boolean;
|
|
@@ -18,4 +9,3 @@ export declare function useBreakpoint(): {
|
|
|
18
9
|
isTablet: boolean;
|
|
19
10
|
isDesktop: boolean;
|
|
20
11
|
};
|
|
21
|
-
//# sourceMappingURL=useMediaQuery.d.ts.map
|
|
@@ -3,7 +3,6 @@ export interface UseRovingTabIndexOptions {
|
|
|
3
3
|
count: number;
|
|
4
4
|
initialIndex?: number;
|
|
5
5
|
orientation?: 'horizontal' | 'vertical' | 'both';
|
|
6
|
-
/** Wrap around at boundaries. Default: true */
|
|
7
6
|
loop?: boolean;
|
|
8
7
|
}
|
|
9
8
|
export interface UseRovingTabIndexReturn {
|
|
@@ -16,18 +15,4 @@ export interface UseRovingTabIndexReturn {
|
|
|
16
15
|
'data-focused': boolean;
|
|
17
16
|
};
|
|
18
17
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Implements the WAI-ARIA roving tabIndex pattern for composite widgets
|
|
21
|
-
* (toolbars, tab lists, radio groups, menu items, etc.)
|
|
22
|
-
*
|
|
23
|
-
* Only one item in the group is in the tab sequence at a time.
|
|
24
|
-
* Arrow keys move focus within the group.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* const { getItemProps } = useRovingTabIndex({ count: tabs.length });
|
|
28
|
-
* return tabs.map((tab, i) => (
|
|
29
|
-
* <button key={tab.id} {...getItemProps(i)}>{tab.label}</button>
|
|
30
|
-
* ));
|
|
31
|
-
*/
|
|
32
18
|
export declare function useRovingTabIndex({ count, initialIndex, orientation, loop, }: UseRovingTabIndexOptions): UseRovingTabIndexReturn;
|
|
33
|
-
//# sourceMappingURL=useRovingTabIndex.d.ts.map
|
|
@@ -24,13 +24,4 @@ export interface SSEState<T = unknown> {
|
|
|
24
24
|
disconnect: () => void;
|
|
25
25
|
eventCount: number;
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
28
|
-
* Headless Server-Sent Events hook supporting multiple named event types,
|
|
29
|
-
* auto-reconnect, and JSON auto-parsing.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* const sse = useSSE({ url: '/api/stream', events: ['update', 'notification'] });
|
|
33
|
-
* console.log(sse.lastEvent);
|
|
34
|
-
*/
|
|
35
27
|
export declare function useSSE<T = unknown>(options: SSEOptions): SSEState<T>;
|
|
36
|
-
//# sourceMappingURL=useSSE.d.ts.map
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns a throttled version of the value — updates at most once per interval.
|
|
3
|
-
*/
|
|
4
1
|
export declare function useThrottle<T>(value: T, interval: number): T;
|
|
5
|
-
/**
|
|
6
|
-
* Returns a throttled callback — executes at most once per interval.
|
|
7
|
-
*/
|
|
8
2
|
export declare function useThrottledCallback<T extends (...args: any[]) => any>(fn: T, interval: number): (...args: Parameters<T>) => void;
|
|
9
|
-
//# sourceMappingURL=useThrottle.d.ts.map
|
|
@@ -21,13 +21,4 @@ export interface WebSocketState<T = unknown> {
|
|
|
21
21
|
reconnectCount: number;
|
|
22
22
|
latency: number | null;
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Headless WebSocket hook with auto-reconnect, heartbeat, latency tracking,
|
|
26
|
-
* and a send queue that flushes on connect.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* const ws = useWebSocket({ url: 'wss://example.com/ws' });
|
|
30
|
-
* ws.send({ type: 'subscribe', channel: 'updates' });
|
|
31
|
-
*/
|
|
32
24
|
export declare function useWebSocket<T = unknown>(options: WebSocketOptions): WebSocketState<T>;
|
|
33
|
-
//# sourceMappingURL=useWebSocket.d.ts.map
|
|
@@ -5,4 +5,3 @@ export declare function useFocusTrap(active: boolean): RefObject<HTMLElement | n
|
|
|
5
5
|
export declare function useAnnounce(): (message: string, politeness?: 'polite' | 'assertive') => void;
|
|
6
6
|
export declare function useEscapeKey(handler: () => void, active?: boolean): void;
|
|
7
7
|
export declare function useClickOutside(ref: RefObject<HTMLElement | null>, handler: () => void): void;
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/i18n/index.d.ts
CHANGED
|
@@ -92,4 +92,3 @@ export declare const I18nContext: import("react").Context<I18nContextValue>;
|
|
|
92
92
|
export declare function useI18n(): I18nContextValue;
|
|
93
93
|
export declare function useLocale(): LocaleStrings;
|
|
94
94
|
export declare function useDirection(): Direction;
|
|
95
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -6,4 +6,3 @@ export { TkxPlayground } from '../components/TkxPlayground';
|
|
|
6
6
|
export type { TkxPlaygroundProps, PlaygroundExample } from '../components/TkxPlayground';
|
|
7
7
|
export { QuantumAI, inferFieldIntelligence, optimizeThemeColors, hslToHex, Qubit, QuantumRegister, QuantumAnnealer, QuantumBoltzmannMachine, AmplitudeAmplifier, } from '../engine/quantum-ai';
|
|
8
8
|
export type { FieldIntelligence, ValidationSuggestion, ThemeColorState, AnnealerResult, QBMInference, AmplifiedResult, } from '../engine/quantum-ai';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -6,4 +6,3 @@ export { TkxRealTimeChart } from '../components/TkxRealTimeChart';
|
|
|
6
6
|
export type { TkxRealTimeChartProps, ChartDataPoint } from '../components/TkxRealTimeChart';
|
|
7
7
|
export { TkxLiveLog } from '../components/TkxLiveLog';
|
|
8
8
|
export type { TkxLiveLogProps, LogEntry, LogLevel } from '../components/TkxLiveLog';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tekivex-ui",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.16",
|
|
4
4
|
"description": "Production-grade React component library — 70+ components, WCAG 2.1 AAA, WAI-ARIA 1.2, built-in charts, headless primitives, zero-runtime CSS engine, TypeScript-first.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -46,11 +46,12 @@
|
|
|
46
46
|
},
|
|
47
47
|
"sideEffects": [
|
|
48
48
|
"*.css",
|
|
49
|
-
"./
|
|
49
|
+
"./dist/style.css"
|
|
50
50
|
],
|
|
51
51
|
"files": [
|
|
52
52
|
"dist",
|
|
53
|
-
"
|
|
53
|
+
"README.md",
|
|
54
|
+
"LICENSE"
|
|
54
55
|
],
|
|
55
56
|
"scripts": {
|
|
56
57
|
"build": "vite build && tsc --emitDeclarationOnly",
|
|
@@ -94,6 +95,7 @@
|
|
|
94
95
|
"react": "^19.2.5",
|
|
95
96
|
"react-dom": "^19.2.5",
|
|
96
97
|
"recharts": "^3.8.1",
|
|
98
|
+
"terser": "^5.46.1",
|
|
97
99
|
"typescript": "^5.9.3",
|
|
98
100
|
"vite": "^8.0.9",
|
|
99
101
|
"vitest": "^4.1.4"
|
package/dist/TkxForm-BaO4wvXt.js
DELETED
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
import { f as e } from "./themes-BbJanqiC.js";
|
|
2
|
-
import { a as t, m as n, t as r } from "./tkx-mOKMzvUK.js";
|
|
3
|
-
import { cloneElement as i, createContext as a, useCallback as o, useContext as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
4
|
-
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/TkxForm.tsx
|
|
6
|
-
var h = a(null);
|
|
7
|
-
function g() {
|
|
8
|
-
let e = s(h);
|
|
9
|
-
if (!e) throw Error("TkxFormField must be used inside a <TkxForm>. Wrap your fields in a TkxForm component.");
|
|
10
|
-
return e;
|
|
11
|
-
}
|
|
12
|
-
async function _(e, t) {
|
|
13
|
-
for (let n of t) {
|
|
14
|
-
if (n.required && (e == null || e === "" || Array.isArray(e) && e.length === 0)) return n.message ?? "This field is required";
|
|
15
|
-
if (!(e == null || e === "")) {
|
|
16
|
-
if (n.min !== void 0) {
|
|
17
|
-
if (typeof e == "string" && e.length < n.min) return n.message ?? `Must be at least ${n.min} characters`;
|
|
18
|
-
if (typeof e == "number" && e < n.min) return n.message ?? `Must be at least ${n.min}`;
|
|
19
|
-
}
|
|
20
|
-
if (n.max !== void 0) {
|
|
21
|
-
if (typeof e == "string" && e.length > n.max) return n.message ?? `Must be no more than ${n.max} characters`;
|
|
22
|
-
if (typeof e == "number" && e > n.max) return n.message ?? `Must be no more than ${n.max}`;
|
|
23
|
-
}
|
|
24
|
-
if (n.pattern && typeof e == "string" && !n.pattern.test(e)) return n.message ?? "Invalid format";
|
|
25
|
-
if (n.validator) {
|
|
26
|
-
let t = await n.validator(e);
|
|
27
|
-
if (t) return t;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
function v(e, t) {
|
|
34
|
-
let n = e ? [...e] : [];
|
|
35
|
-
return t && !n.some((e) => e.required) && n.unshift({
|
|
36
|
-
required: !0,
|
|
37
|
-
message: "This field is required"
|
|
38
|
-
}), n;
|
|
39
|
-
}
|
|
40
|
-
function y(e) {
|
|
41
|
-
return e.some((e) => e.required);
|
|
42
|
-
}
|
|
43
|
-
function b() {
|
|
44
|
-
let e = s(h), t = u({}), n = u({}), r = u({}), i = l(() => ({
|
|
45
|
-
getFieldValue: (e) => t.current[e],
|
|
46
|
-
setFieldValue: (e, n) => {
|
|
47
|
-
t.current[e] = n;
|
|
48
|
-
},
|
|
49
|
-
getFieldsValue: () => ({ ...t.current }),
|
|
50
|
-
setFieldsValue: (e) => {
|
|
51
|
-
Object.assign(t.current, e);
|
|
52
|
-
},
|
|
53
|
-
validateFields: () => Promise.resolve({ ...t.current }),
|
|
54
|
-
validateField: (e) => Promise.resolve(!0),
|
|
55
|
-
resetFields: () => {
|
|
56
|
-
t.current = {}, n.current = {}, r.current = {};
|
|
57
|
-
},
|
|
58
|
-
getFieldError: (e) => n.current[e] ?? null,
|
|
59
|
-
isFieldTouched: (e) => r.current[e] ?? !1
|
|
60
|
-
}), []);
|
|
61
|
-
return e ? e.instance : i;
|
|
62
|
-
}
|
|
63
|
-
function x({ onSubmit: n, onValuesChange: i, initialValues: a = {}, layout: s = "vertical", disabled: f = !1, children: m, className: g, style: v, form: y }) {
|
|
64
|
-
let b = e(), [x, S] = d({
|
|
65
|
-
values: { ...a },
|
|
66
|
-
errors: {},
|
|
67
|
-
touched: {}
|
|
68
|
-
}), C = u(a), w = u({}), T = u(x);
|
|
69
|
-
T.current = x;
|
|
70
|
-
let E = o((e, t) => {
|
|
71
|
-
w.current[e] = t;
|
|
72
|
-
}, []), D = o((e) => {
|
|
73
|
-
delete w.current[e];
|
|
74
|
-
}, []), O = o((e, t) => {
|
|
75
|
-
S((n) => {
|
|
76
|
-
let r = {
|
|
77
|
-
...n,
|
|
78
|
-
values: {
|
|
79
|
-
...n.values,
|
|
80
|
-
[e]: t
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
return i?.({ [e]: t }, r.values), r;
|
|
84
|
-
});
|
|
85
|
-
}, [i]), k = o((e, t) => {
|
|
86
|
-
S((n) => ({
|
|
87
|
-
...n,
|
|
88
|
-
errors: {
|
|
89
|
-
...n.errors,
|
|
90
|
-
[e]: t
|
|
91
|
-
}
|
|
92
|
-
}));
|
|
93
|
-
}, []), A = o((e) => {
|
|
94
|
-
S((t) => ({
|
|
95
|
-
...t,
|
|
96
|
-
touched: {
|
|
97
|
-
...t.touched,
|
|
98
|
-
[e]: !0
|
|
99
|
-
}
|
|
100
|
-
}));
|
|
101
|
-
}, []), j = o(async (e) => {
|
|
102
|
-
let t = w.current[e];
|
|
103
|
-
if (!t) return !0;
|
|
104
|
-
let n = T.current.values[e], r = await _(n, t.rules);
|
|
105
|
-
return S((t) => ({
|
|
106
|
-
...t,
|
|
107
|
-
errors: {
|
|
108
|
-
...t.errors,
|
|
109
|
-
[e]: r
|
|
110
|
-
},
|
|
111
|
-
touched: {
|
|
112
|
-
...t.touched,
|
|
113
|
-
[e]: !0
|
|
114
|
-
}
|
|
115
|
-
})), r === null;
|
|
116
|
-
}, []), M = o(async () => {
|
|
117
|
-
let e = Object.keys(w.current), t = await Promise.all(e.map(async (e) => {
|
|
118
|
-
let t = w.current[e], n = T.current.values[e];
|
|
119
|
-
return {
|
|
120
|
-
name: e,
|
|
121
|
-
error: await _(n, t.rules)
|
|
122
|
-
};
|
|
123
|
-
})), n = {}, r = {}, i = !1;
|
|
124
|
-
for (let { name: e, error: a } of t) n[e] = a, r[e] = !0, a && (i = !0);
|
|
125
|
-
if (S((e) => ({
|
|
126
|
-
...e,
|
|
127
|
-
errors: {
|
|
128
|
-
...e.errors,
|
|
129
|
-
...n
|
|
130
|
-
},
|
|
131
|
-
touched: {
|
|
132
|
-
...e.touched,
|
|
133
|
-
...r
|
|
134
|
-
}
|
|
135
|
-
})), i) {
|
|
136
|
-
let e = Object.fromEntries(t.filter((e) => e.error).map((e) => [e.name, e.error]));
|
|
137
|
-
return Promise.reject(e);
|
|
138
|
-
}
|
|
139
|
-
return { ...T.current.values };
|
|
140
|
-
}, []), N = o(() => {
|
|
141
|
-
S({
|
|
142
|
-
values: { ...C.current },
|
|
143
|
-
errors: {},
|
|
144
|
-
touched: {}
|
|
145
|
-
});
|
|
146
|
-
}, []), P = l(() => ({
|
|
147
|
-
getFieldValue: (e) => T.current.values[e],
|
|
148
|
-
setFieldValue: O,
|
|
149
|
-
getFieldsValue: () => ({ ...T.current.values }),
|
|
150
|
-
setFieldsValue: (e) => {
|
|
151
|
-
S((t) => {
|
|
152
|
-
let n = {
|
|
153
|
-
...t.values,
|
|
154
|
-
...e
|
|
155
|
-
};
|
|
156
|
-
return i?.(e, n), {
|
|
157
|
-
...t,
|
|
158
|
-
values: n
|
|
159
|
-
};
|
|
160
|
-
});
|
|
161
|
-
},
|
|
162
|
-
validateFields: M,
|
|
163
|
-
validateField: j,
|
|
164
|
-
resetFields: N,
|
|
165
|
-
getFieldError: (e) => T.current.errors[e] ?? null,
|
|
166
|
-
isFieldTouched: (e) => !!T.current.touched[e]
|
|
167
|
-
}), [
|
|
168
|
-
O,
|
|
169
|
-
M,
|
|
170
|
-
j,
|
|
171
|
-
N,
|
|
172
|
-
i
|
|
173
|
-
]), F = o(async (e) => {
|
|
174
|
-
e.preventDefault();
|
|
175
|
-
try {
|
|
176
|
-
let e = await M();
|
|
177
|
-
await n?.(e);
|
|
178
|
-
} catch {}
|
|
179
|
-
}, [M, n]), I = t(s === "inline" ? "flex flex-row flex-wrap items-end gap-4" : "flex flex-col gap-5");
|
|
180
|
-
c(() => {
|
|
181
|
-
if (!y) return;
|
|
182
|
-
let e = y;
|
|
183
|
-
e.getFieldValue = P.getFieldValue, e.setFieldValue = P.setFieldValue, e.getFieldsValue = P.getFieldsValue, e.setFieldsValue = P.setFieldsValue, e.validateFields = P.validateFields, e.validateField = P.validateField, e.resetFields = P.resetFields, e.getFieldError = P.getFieldError, e.isFieldTouched = P.isFieldTouched;
|
|
184
|
-
}, [y, P]);
|
|
185
|
-
let L = y ?? P, R = l(() => ({
|
|
186
|
-
state: x,
|
|
187
|
-
initialValues: C.current,
|
|
188
|
-
layout: s,
|
|
189
|
-
disabled: f,
|
|
190
|
-
fieldMeta: w,
|
|
191
|
-
setFieldValue: O,
|
|
192
|
-
setFieldError: k,
|
|
193
|
-
setFieldTouched: A,
|
|
194
|
-
registerField: E,
|
|
195
|
-
unregisterField: D,
|
|
196
|
-
validateField: j,
|
|
197
|
-
instance: L
|
|
198
|
-
}), [
|
|
199
|
-
x,
|
|
200
|
-
s,
|
|
201
|
-
f,
|
|
202
|
-
O,
|
|
203
|
-
k,
|
|
204
|
-
A,
|
|
205
|
-
E,
|
|
206
|
-
D,
|
|
207
|
-
j,
|
|
208
|
-
L
|
|
209
|
-
]);
|
|
210
|
-
return /* @__PURE__ */ p(h.Provider, {
|
|
211
|
-
value: R,
|
|
212
|
-
children: /* @__PURE__ */ p("form", {
|
|
213
|
-
noValidate: !0,
|
|
214
|
-
role: "form",
|
|
215
|
-
"aria-label": "Form",
|
|
216
|
-
onSubmit: F,
|
|
217
|
-
className: r(I, g),
|
|
218
|
-
style: {
|
|
219
|
-
color: b.text,
|
|
220
|
-
...v
|
|
221
|
-
},
|
|
222
|
-
children: m
|
|
223
|
-
})
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
x.displayName = "TkxForm";
|
|
227
|
-
function S({ name: a, label: s, rules: c, help: d, required: h, children: _, className: b, style: x }) {
|
|
228
|
-
let S = e(), C = g(), { state: w, layout: T, disabled: E } = C, D = l(() => v(c, h), [c, h]), O = y(D), k = u({ rules: D });
|
|
229
|
-
k.current.rules = D;
|
|
230
|
-
let A = u(!1);
|
|
231
|
-
A.current ||= (C.registerField(a, k.current), !0), l(() => {
|
|
232
|
-
C.registerField(a, k.current);
|
|
233
|
-
}, [
|
|
234
|
-
D,
|
|
235
|
-
a,
|
|
236
|
-
C
|
|
237
|
-
]);
|
|
238
|
-
let j = w.values[a], M = w.touched[a] ? w.errors[a] ?? null : null, N = M ? n(M) : null, P = s ? n(s) : void 0, F = d ? n(d) : void 0, I = o((e) => {
|
|
239
|
-
let t;
|
|
240
|
-
if (typeof e == "object" && e && "target" in e) {
|
|
241
|
-
let n = e.target;
|
|
242
|
-
t = n.type === "checkbox" ? n.checked : n.value;
|
|
243
|
-
} else t = e;
|
|
244
|
-
C.setFieldValue(a, t);
|
|
245
|
-
}, [C, a]), L = o(() => {
|
|
246
|
-
C.setFieldTouched(a), C.validateField(a);
|
|
247
|
-
}, [C, a]), R = _, z = i(R, {
|
|
248
|
-
value: j ?? "",
|
|
249
|
-
onChange: I,
|
|
250
|
-
onBlur: L,
|
|
251
|
-
error: N ?? void 0,
|
|
252
|
-
isInvalid: !!N,
|
|
253
|
-
isRequired: O,
|
|
254
|
-
disabled: E || R.props.disabled,
|
|
255
|
-
name: a
|
|
256
|
-
}), B = T === "horizontal", V = T === "inline", H = /* @__PURE__ */ p("svg", {
|
|
257
|
-
width: "12",
|
|
258
|
-
height: "12",
|
|
259
|
-
viewBox: "0 0 24 24",
|
|
260
|
-
fill: "currentColor",
|
|
261
|
-
"aria-hidden": "true",
|
|
262
|
-
children: /* @__PURE__ */ p("path", { d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" })
|
|
263
|
-
}), U = P ? /* @__PURE__ */ m("label", {
|
|
264
|
-
className: t("text-sm font-medium font-sans", B ? "min-w-[140px] pt-2.5" : ""),
|
|
265
|
-
style: { color: S.text },
|
|
266
|
-
children: [P, O && /* @__PURE__ */ p("span", {
|
|
267
|
-
"aria-hidden": "true",
|
|
268
|
-
className: t("ml-1"),
|
|
269
|
-
style: { color: S.danger },
|
|
270
|
-
children: "*"
|
|
271
|
-
})]
|
|
272
|
-
}) : null, W = /* @__PURE__ */ m(f, { children: [F && !N && /* @__PURE__ */ p("span", {
|
|
273
|
-
className: t("text-xs mt-0.5"),
|
|
274
|
-
style: { color: S.textMuted },
|
|
275
|
-
children: F
|
|
276
|
-
}), N && /* @__PURE__ */ m("span", {
|
|
277
|
-
role: "alert",
|
|
278
|
-
className: t("text-xs flex items-center gap-1 mt-0.5"),
|
|
279
|
-
style: {
|
|
280
|
-
color: S.danger,
|
|
281
|
-
animation: "tkxFormErrorReveal 200ms ease-out"
|
|
282
|
-
},
|
|
283
|
-
children: [H, N]
|
|
284
|
-
})] });
|
|
285
|
-
return V ? /* @__PURE__ */ m("div", {
|
|
286
|
-
className: r(t("flex flex-col gap-1"), b),
|
|
287
|
-
style: x,
|
|
288
|
-
children: [
|
|
289
|
-
U,
|
|
290
|
-
z,
|
|
291
|
-
W
|
|
292
|
-
]
|
|
293
|
-
}) : B ? /* @__PURE__ */ m("div", {
|
|
294
|
-
className: r(t("flex flex-row gap-4 items-start"), b),
|
|
295
|
-
style: x,
|
|
296
|
-
children: [U, /* @__PURE__ */ m("div", {
|
|
297
|
-
className: t("flex flex-col gap-1 flex-1 min-w-0"),
|
|
298
|
-
children: [z, W]
|
|
299
|
-
})]
|
|
300
|
-
}) : /* @__PURE__ */ m("div", {
|
|
301
|
-
className: r(t("flex flex-col gap-1"), b),
|
|
302
|
-
style: x,
|
|
303
|
-
children: [
|
|
304
|
-
U,
|
|
305
|
-
z,
|
|
306
|
-
W
|
|
307
|
-
]
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
S.displayName = "TkxFormField";
|
|
311
|
-
var C = !1;
|
|
312
|
-
function w() {
|
|
313
|
-
if (C || typeof document > "u") return;
|
|
314
|
-
C = !0;
|
|
315
|
-
let e = document.createElement("style");
|
|
316
|
-
e.setAttribute("data-tkx-form", ""), e.textContent = "\n @keyframes tkxFormErrorReveal {\n from {\n opacity: 0;\n transform: translateY(-4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n ", document.head.appendChild(e);
|
|
317
|
-
}
|
|
318
|
-
w();
|
|
319
|
-
//#endregion
|
|
320
|
-
export { S as n, b as r, x as t };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
require(`./chunk-Bmb41Sf3.cjs`);const e=require(`./themes-CMq2vWXj.cjs`),t=require(`./tkx-BoP5V5zy.cjs`);let n=require(`react`),r=require(`react/jsx-runtime`);var i=(0,n.createContext)(null);function a(){let e=(0,n.useContext)(i);if(!e)throw Error(`TkxFormField must be used inside a <TkxForm>. Wrap your fields in a TkxForm component.`);return e}async function o(e,t){for(let n of t){if(n.required&&(e==null||e===``||Array.isArray(e)&&e.length===0))return n.message??`This field is required`;if(!(e==null||e===``)){if(n.min!==void 0){if(typeof e==`string`&&e.length<n.min)return n.message??`Must be at least ${n.min} characters`;if(typeof e==`number`&&e<n.min)return n.message??`Must be at least ${n.min}`}if(n.max!==void 0){if(typeof e==`string`&&e.length>n.max)return n.message??`Must be no more than ${n.max} characters`;if(typeof e==`number`&&e>n.max)return n.message??`Must be no more than ${n.max}`}if(n.pattern&&typeof e==`string`&&!n.pattern.test(e))return n.message??`Invalid format`;if(n.validator){let t=await n.validator(e);if(t)return t}}}return null}function s(e,t){let n=e?[...e]:[];return t&&!n.some(e=>e.required)&&n.unshift({required:!0,message:`This field is required`}),n}function c(e){return e.some(e=>e.required)}function l(){let e=(0,n.useContext)(i),t=(0,n.useRef)({}),r=(0,n.useRef)({}),a=(0,n.useRef)({}),o=(0,n.useMemo)(()=>({getFieldValue:e=>t.current[e],setFieldValue:(e,n)=>{t.current[e]=n},getFieldsValue:()=>({...t.current}),setFieldsValue:e=>{Object.assign(t.current,e)},validateFields:()=>Promise.resolve({...t.current}),validateField:e=>Promise.resolve(!0),resetFields:()=>{t.current={},r.current={},a.current={}},getFieldError:e=>r.current[e]??null,isFieldTouched:e=>a.current[e]??!1}),[]);return e?e.instance:o}function u({onSubmit:a,onValuesChange:s,initialValues:c={},layout:l=`vertical`,disabled:u=!1,children:d,className:f,style:p,form:m}){let h=e.f(),[g,_]=(0,n.useState)({values:{...c},errors:{},touched:{}}),v=(0,n.useRef)(c),y=(0,n.useRef)({}),b=(0,n.useRef)(g);b.current=g;let x=(0,n.useCallback)((e,t)=>{y.current[e]=t},[]),S=(0,n.useCallback)(e=>{delete y.current[e]},[]),C=(0,n.useCallback)((e,t)=>{_(n=>{let r={...n,values:{...n.values,[e]:t}};return s?.({[e]:t},r.values),r})},[s]),w=(0,n.useCallback)((e,t)=>{_(n=>({...n,errors:{...n.errors,[e]:t}}))},[]),T=(0,n.useCallback)(e=>{_(t=>({...t,touched:{...t.touched,[e]:!0}}))},[]),E=(0,n.useCallback)(async e=>{let t=y.current[e];if(!t)return!0;let n=b.current.values[e],r=await o(n,t.rules);return _(t=>({...t,errors:{...t.errors,[e]:r},touched:{...t.touched,[e]:!0}})),r===null},[]),D=(0,n.useCallback)(async()=>{let e=Object.keys(y.current),t=await Promise.all(e.map(async e=>{let t=y.current[e],n=b.current.values[e];return{name:e,error:await o(n,t.rules)}})),n={},r={},i=!1;for(let{name:e,error:a}of t)n[e]=a,r[e]=!0,a&&(i=!0);if(_(e=>({...e,errors:{...e.errors,...n},touched:{...e.touched,...r}})),i){let e=Object.fromEntries(t.filter(e=>e.error).map(e=>[e.name,e.error]));return Promise.reject(e)}return{...b.current.values}},[]),O=(0,n.useCallback)(()=>{_({values:{...v.current},errors:{},touched:{}})},[]),k=(0,n.useMemo)(()=>({getFieldValue:e=>b.current.values[e],setFieldValue:C,getFieldsValue:()=>({...b.current.values}),setFieldsValue:e=>{_(t=>{let n={...t.values,...e};return s?.(e,n),{...t,values:n}})},validateFields:D,validateField:E,resetFields:O,getFieldError:e=>b.current.errors[e]??null,isFieldTouched:e=>!!b.current.touched[e]}),[C,D,E,O,s]),A=(0,n.useCallback)(async e=>{e.preventDefault();try{let e=await D();await a?.(e)}catch{}},[D,a]),j=l===`inline`?t.a(`flex flex-row flex-wrap items-end gap-4`):t.a(`flex flex-col gap-5`);(0,n.useEffect)(()=>{if(!m)return;let e=m;e.getFieldValue=k.getFieldValue,e.setFieldValue=k.setFieldValue,e.getFieldsValue=k.getFieldsValue,e.setFieldsValue=k.setFieldsValue,e.validateFields=k.validateFields,e.validateField=k.validateField,e.resetFields=k.resetFields,e.getFieldError=k.getFieldError,e.isFieldTouched=k.isFieldTouched},[m,k]);let M=m??k,N=(0,n.useMemo)(()=>({state:g,initialValues:v.current,layout:l,disabled:u,fieldMeta:y,setFieldValue:C,setFieldError:w,setFieldTouched:T,registerField:x,unregisterField:S,validateField:E,instance:M}),[g,l,u,C,w,T,x,S,E,M]);return(0,r.jsx)(i.Provider,{value:N,children:(0,r.jsx)(`form`,{noValidate:!0,role:`form`,"aria-label":`Form`,onSubmit:A,className:t.t(j,f),style:{color:h.text,...p},children:d})})}u.displayName=`TkxForm`;function d({name:i,label:o,rules:l,help:u,required:d,children:f,className:p,style:m}){let h=e.f(),g=a(),{state:_,layout:v,disabled:y}=g,b=(0,n.useMemo)(()=>s(l,d),[l,d]),x=c(b),S=(0,n.useRef)({rules:b});S.current.rules=b;let C=(0,n.useRef)(!1);C.current||=(g.registerField(i,S.current),!0),(0,n.useMemo)(()=>{g.registerField(i,S.current)},[b,i,g]);let w=_.values[i],T=_.touched[i]?_.errors[i]??null:null,E=T?t.m(T):null,D=o?t.m(o):void 0,O=u?t.m(u):void 0,k=(0,n.useCallback)(e=>{let t;if(typeof e==`object`&&e&&`target`in e){let n=e.target;t=n.type===`checkbox`?n.checked:n.value}else t=e;g.setFieldValue(i,t)},[g,i]),A=(0,n.useCallback)(()=>{g.setFieldTouched(i),g.validateField(i)},[g,i]),j=f,M=(0,n.cloneElement)(j,{value:w??``,onChange:k,onBlur:A,error:E??void 0,isInvalid:!!E,isRequired:x,disabled:y||j.props.disabled,name:i}),N=v===`horizontal`,P=v===`inline`,F=(0,r.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,r.jsx)(`path`,{d:`M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z`})}),I=D?(0,r.jsxs)(`label`,{className:t.a(`text-sm font-medium font-sans`,N?`min-w-[140px] pt-2.5`:``),style:{color:h.text},children:[D,x&&(0,r.jsx)(`span`,{"aria-hidden":`true`,className:t.a(`ml-1`),style:{color:h.danger},children:`*`})]}):null,L=(0,r.jsxs)(r.Fragment,{children:[O&&!E&&(0,r.jsx)(`span`,{className:t.a(`text-xs mt-0.5`),style:{color:h.textMuted},children:O}),E&&(0,r.jsxs)(`span`,{role:`alert`,className:t.a(`text-xs flex items-center gap-1 mt-0.5`),style:{color:h.danger,animation:`tkxFormErrorReveal 200ms ease-out`},children:[F,E]})]});return P?(0,r.jsxs)(`div`,{className:t.t(t.a(`flex flex-col gap-1`),p),style:m,children:[I,M,L]}):N?(0,r.jsxs)(`div`,{className:t.t(t.a(`flex flex-row gap-4 items-start`),p),style:m,children:[I,(0,r.jsxs)(`div`,{className:t.a(`flex flex-col gap-1 flex-1 min-w-0`),children:[M,L]})]}):(0,r.jsxs)(`div`,{className:t.t(t.a(`flex flex-col gap-1`),p),style:m,children:[I,M,L]})}d.displayName=`TkxFormField`;var f=!1;function p(){if(f||typeof document>`u`)return;f=!0;let e=document.createElement(`style`);e.setAttribute(`data-tkx-form`,``),e.textContent=`
|
|
2
|
-
@keyframes tkxFormErrorReveal {
|
|
3
|
-
from {
|
|
4
|
-
opacity: 0;
|
|
5
|
-
transform: translateY(-4px);
|
|
6
|
-
}
|
|
7
|
-
to {
|
|
8
|
-
opacity: 1;
|
|
9
|
-
transform: translateY(0);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
`,document.head.appendChild(e)}p(),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return u}});
|
package/dist/chunk-Bmb41Sf3.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|