@msqd/lydia 0.0.0-stage → 0.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/LICENSE +373 -0
- package/README.md +151 -2
- package/THIRD_PARTY_NOTICES.md +29 -0
- package/dist/Components/Badges/Badge.d.ts +20 -0
- package/dist/Components/Badges/Badge.js +33 -0
- package/dist/Components/Badges/index.d.ts +1 -0
- package/dist/Components/Badges/index.js +4 -0
- package/dist/Components/Buttons/Button.d.ts +8 -0
- package/dist/Components/Buttons/Button.js +30 -0
- package/dist/Components/Buttons/ButtonGroup.d.ts +13 -0
- package/dist/Components/Buttons/ButtonGroup.js +61 -0
- package/dist/Components/Buttons/index.d.ts +2 -0
- package/dist/Components/Buttons/index.js +6 -0
- package/dist/Components/Cards/Card.d.ts +38 -0
- package/dist/Components/Cards/Card.js +31 -0
- package/dist/Components/Cards/StatCard.d.ts +14 -0
- package/dist/Components/Cards/StatCard.js +27 -0
- package/dist/Components/Cards/index.d.ts +2 -0
- package/dist/Components/Cards/index.js +7 -0
- package/dist/Components/Charts/Components/ThinBarChart.d.ts +35 -0
- package/dist/Components/Charts/Components/ThinBarChart.js +41 -0
- package/dist/Components/Charts/Components/WideBarChart.d.ts +48 -0
- package/dist/Components/Charts/Components/WideBarChart.js +50 -0
- package/dist/Components/Charts/Components/index.d.ts +2 -0
- package/dist/Components/Charts/Components/index.js +6 -0
- package/dist/Components/Charts/Hooks/index.d.ts +2 -0
- package/dist/Components/Charts/Hooks/index.js +7 -0
- package/dist/Components/Charts/Hooks/useChartDimensions.d.ts +24 -0
- package/dist/Components/Charts/Hooks/useChartDimensions.js +42 -0
- package/dist/Components/Charts/Hooks/useThemeColors.d.ts +10 -0
- package/dist/Components/Charts/Hooks/useThemeColors.js +51 -0
- package/dist/Components/Charts/SummaryPerformancesChart.d.ts +7 -0
- package/dist/Components/Charts/SummaryPerformancesChart.js +93 -0
- package/dist/Components/Charts/SummaryRateChart.d.ts +9 -0
- package/dist/Components/Charts/SummaryRateChart.js +81 -0
- package/dist/Components/Charts/TransactionsChart.d.ts +6 -0
- package/dist/Components/Charts/TransactionsChart.js +70 -0
- package/dist/Components/Charts/Utils/ChartBarCalculator.d.ts +48 -0
- package/dist/Components/Charts/Utils/ChartBarCalculator.js +66 -0
- package/dist/Components/Charts/Utils/ChartColors.d.ts +13 -0
- package/dist/Components/Charts/Utils/ChartColors.js +10 -0
- package/dist/Components/Charts/Utils/ChartTooltipFormatter.d.ts +43 -0
- package/dist/Components/Charts/Utils/ChartTooltipFormatter.js +57 -0
- package/dist/Components/Charts/Utils/ReactEChartsCore.d.ts +4 -0
- package/dist/Components/Charts/Utils/ReactEChartsCore.js +5 -0
- package/dist/Components/Charts/Utils/ThemeColor.d.ts +21 -0
- package/dist/Components/Charts/Utils/ThemeColor.js +54 -0
- package/dist/Components/Charts/Utils/TimeFormatter.d.ts +9 -0
- package/dist/Components/Charts/Utils/TimeFormatter.js +25 -0
- package/dist/Components/Charts/Utils/escapeTooltipHtml.d.ts +6 -0
- package/dist/Components/Charts/Utils/escapeTooltipHtml.js +5 -0
- package/dist/Components/Charts/Utils/index.d.ts +5 -0
- package/dist/Components/Charts/Utils/index.js +14 -0
- package/dist/Components/Charts/index.d.ts +6 -0
- package/dist/Components/Charts/index.js +29 -0
- package/dist/Components/Colors/Colors.d.ts +19 -0
- package/dist/Components/Colors/Colors.js +154 -0
- package/dist/Components/Colors/index.d.ts +1 -0
- package/dist/Components/Colors/index.js +4 -0
- package/dist/Components/DataTable/DataTable.d.ts +86 -0
- package/dist/Components/DataTable/DataTable.js +122 -0
- package/dist/Components/DataTable/Paginator.d.ts +41 -0
- package/dist/Components/DataTable/Paginator.js +122 -0
- package/dist/Components/DataTable/ProportionBar.d.ts +48 -0
- package/dist/Components/DataTable/ProportionBar.js +20 -0
- package/dist/Components/DataTable/index.d.ts +3 -0
- package/dist/Components/DataTable/index.js +9 -0
- package/dist/Components/Dialog/Dialog.d.ts +49 -0
- package/dist/Components/Dialog/Dialog.js +83 -0
- package/dist/Components/Dialog/Drawer.d.ts +45 -0
- package/dist/Components/Dialog/Drawer.js +120 -0
- package/dist/Components/Dialog/index.d.ts +3 -0
- package/dist/Components/Dialog/index.js +12 -0
- package/dist/Components/Dialog/modal.types.d.ts +47 -0
- package/dist/Components/Dialog/modal.types.js +8 -0
- package/dist/Components/Facets/FacetCount.d.ts +11 -0
- package/dist/Components/Facets/FacetCount.js +8 -0
- package/dist/Components/Facets/FacetCountsCaption.d.ts +16 -0
- package/dist/Components/Facets/FacetCountsCaption.js +14 -0
- package/dist/Components/Facets/FacetInnerLightButton.d.ts +10 -0
- package/dist/Components/Facets/FacetInnerLightButton.js +17 -0
- package/dist/Components/Facets/FacetLabel.d.ts +13 -0
- package/dist/Components/Facets/FacetLabel.js +15 -0
- package/dist/Components/Facets/FacetList.d.ts +40 -0
- package/dist/Components/Facets/FacetList.js +37 -0
- package/dist/Components/Facets/FacetListCard.d.ts +38 -0
- package/dist/Components/Facets/FacetListCard.js +47 -0
- package/dist/Components/Facets/FacetResetLink.d.ts +13 -0
- package/dist/Components/Facets/FacetResetLink.js +23 -0
- package/dist/Components/Facets/Variants/DateRangeFacet.d.ts +47 -0
- package/dist/Components/Facets/Variants/DateRangeFacet.js +51 -0
- package/dist/Components/Facets/Variants/MultipleChoiceFacet.d.ts +67 -0
- package/dist/Components/Facets/Variants/MultipleChoiceFacet.js +200 -0
- package/dist/Components/Facets/Variants/PerformanceFacet.d.ts +61 -0
- package/dist/Components/Facets/Variants/PerformanceFacet.js +77 -0
- package/dist/Components/Facets/Variants/SingleChoiceFacet.d.ts +56 -0
- package/dist/Components/Facets/Variants/SingleChoiceFacet.js +54 -0
- package/dist/Components/Facets/Variants/index.d.ts +8 -0
- package/dist/Components/Facets/Variants/index.js +10 -0
- package/dist/Components/Facets/Variants/nestedValues.d.ts +33 -0
- package/dist/Components/Facets/Variants/nestedValues.js +87 -0
- package/dist/Components/Facets/index.d.ts +15 -0
- package/dist/Components/Facets/index.js +27 -0
- package/dist/Components/Formatter/BodyNotice.d.ts +9 -0
- package/dist/Components/Formatter/BodyNotice.js +21 -0
- package/dist/Components/Formatter/CodeFormatter.d.ts +47 -0
- package/dist/Components/Formatter/CodeFormatter.js +47 -0
- package/dist/Components/Formatter/HeadersDisplay.d.ts +9 -0
- package/dist/Components/Formatter/HeadersDisplay.js +18 -0
- package/dist/Components/Formatter/JsonTreeView.d.ts +27 -0
- package/dist/Components/Formatter/JsonTreeView.js +145 -0
- package/dist/Components/Formatter/PerformanceMetrics.d.ts +27 -0
- package/dist/Components/Formatter/PerformanceMetrics.js +29 -0
- package/dist/Components/Formatter/SyntaxHighlighter.d.ts +11 -0
- package/dist/Components/Formatter/SyntaxHighlighter.js +16 -0
- package/dist/Components/Formatter/VirtualizedCodeView.d.ts +24 -0
- package/dist/Components/Formatter/VirtualizedCodeView.js +47 -0
- package/dist/Components/Formatter/bodyLimits.d.ts +6 -0
- package/dist/Components/Formatter/bodyLimits.js +6 -0
- package/dist/Components/Formatter/index.d.ts +8 -0
- package/dist/Components/Formatter/index.js +16 -0
- package/dist/Components/Formatter/syntaxTheme.d.ts +8 -0
- package/dist/Components/Formatter/syntaxTheme.js +15 -0
- package/dist/Components/Formatter/useCodeHighlighting.d.ts +15 -0
- package/dist/Components/Formatter/useCodeHighlighting.js +47 -0
- package/dist/Components/Formatter/useVirtualization.d.ts +29 -0
- package/dist/Components/Formatter/useVirtualization.js +18 -0
- package/dist/Components/Inputs/Checkbox/Checkbox.d.ts +6 -0
- package/dist/Components/Inputs/Checkbox/Checkbox.js +75 -0
- package/dist/Components/Inputs/Checkbox/index.d.ts +1 -0
- package/dist/Components/Inputs/Checkbox/index.js +4 -0
- package/dist/Components/Inputs/DateRangeSelector/DateRangeSelector.d.ts +48 -0
- package/dist/Components/Inputs/DateRangeSelector/DateRangeSelector.js +71 -0
- package/dist/Components/Inputs/DateRangeSelector/index.d.ts +1 -0
- package/dist/Components/Inputs/DateRangeSelector/index.js +4 -0
- package/dist/Components/Inputs/Field/Field.d.ts +19 -0
- package/dist/Components/Inputs/Field/Field.js +35 -0
- package/dist/Components/Inputs/Field/index.d.ts +2 -0
- package/dist/Components/Inputs/Field/index.js +7 -0
- package/dist/Components/Inputs/Field/useField.d.ts +33 -0
- package/dist/Components/Inputs/Field/useField.js +36 -0
- package/dist/Components/Inputs/Input/Input.d.ts +85 -0
- package/dist/Components/Inputs/Input/Input.js +146 -0
- package/dist/Components/Inputs/Input/index.d.ts +1 -0
- package/dist/Components/Inputs/Input/index.js +4 -0
- package/dist/Components/Inputs/InputAddon/InputAddon.d.ts +21 -0
- package/dist/Components/Inputs/InputAddon/InputAddon.js +18 -0
- package/dist/Components/Inputs/InputAddon/index.d.ts +1 -0
- package/dist/Components/Inputs/InputAddon/index.js +4 -0
- package/dist/Components/Inputs/InputButton/InputButton.d.ts +21 -0
- package/dist/Components/Inputs/InputButton/InputButton.js +29 -0
- package/dist/Components/Inputs/InputButton/index.d.ts +1 -0
- package/dist/Components/Inputs/InputButton/index.js +4 -0
- package/dist/Components/Inputs/InputIcon/InputIcon.d.ts +20 -0
- package/dist/Components/Inputs/InputIcon/InputIcon.js +16 -0
- package/dist/Components/Inputs/InputIcon/index.d.ts +1 -0
- package/dist/Components/Inputs/InputIcon/index.js +4 -0
- package/dist/Components/Inputs/KeyboardShortcut/KeyboardShortcut.d.ts +12 -0
- package/dist/Components/Inputs/KeyboardShortcut/KeyboardShortcut.js +18 -0
- package/dist/Components/Inputs/KeyboardShortcut/index.d.ts +1 -0
- package/dist/Components/Inputs/KeyboardShortcut/index.js +4 -0
- package/dist/Components/Inputs/Radio/Radio.d.ts +3 -0
- package/dist/Components/Inputs/Radio/Radio.js +59 -0
- package/dist/Components/Inputs/Radio/index.d.ts +1 -0
- package/dist/Components/Inputs/Radio/index.js +4 -0
- package/dist/Components/Inputs/SearchInput/SearchInput.d.ts +9 -0
- package/dist/Components/Inputs/SearchInput/SearchInput.js +48 -0
- package/dist/Components/Inputs/SearchInput/index.d.ts +2 -0
- package/dist/Components/Inputs/SearchInput/index.js +4 -0
- package/dist/Components/Inputs/Sliders/RangeSlider.d.ts +40 -0
- package/dist/Components/Inputs/Sliders/RangeSlider.js +160 -0
- package/dist/Components/Inputs/Sliders/index.d.ts +2 -0
- package/dist/Components/Inputs/Sliders/index.js +4 -0
- package/dist/Components/Inputs/Textarea/Textarea.d.ts +56 -0
- package/dist/Components/Inputs/Textarea/Textarea.js +79 -0
- package/dist/Components/Inputs/Textarea/index.d.ts +1 -0
- package/dist/Components/Inputs/Textarea/index.js +4 -0
- package/dist/Components/Inputs/choiceInput.d.ts +12 -0
- package/dist/Components/Inputs/choiceInput.js +8 -0
- package/dist/Components/Inputs/index.d.ts +11 -0
- package/dist/Components/Inputs/index.js +24 -0
- package/dist/Components/Layouts/DefaultLayout.d.ts +30 -0
- package/dist/Components/Layouts/DefaultLayout.js +25 -0
- package/dist/Components/Layouts/index.d.ts +2 -0
- package/dist/Components/Layouts/index.js +4 -0
- package/dist/Components/NavBar/Assets/defaultAvatar.d.ts +4 -0
- package/dist/Components/NavBar/Assets/defaultAvatar.js +28 -0
- package/dist/Components/NavBar/Assets/index.d.ts +2 -0
- package/dist/Components/NavBar/Assets/index.js +4 -0
- package/dist/Components/NavBar/NavBar.d.ts +58 -0
- package/dist/Components/NavBar/NavBar.js +141 -0
- package/dist/Components/NavBar/index.d.ts +1 -0
- package/dist/Components/NavBar/index.js +5 -0
- package/dist/Components/Tabs/Tabs.d.ts +24 -0
- package/dist/Components/Tabs/Tabs.js +69 -0
- package/dist/Components/Tabs/index.d.ts +2 -0
- package/dist/Components/Tabs/index.js +5 -0
- package/dist/Components/Toast/Toast.d.ts +28 -0
- package/dist/Components/Toast/Toast.js +128 -0
- package/dist/Components/Toast/ToastContainer.d.ts +29 -0
- package/dist/Components/Toast/ToastContainer.js +28 -0
- package/dist/Components/Toast/ToastContext.d.ts +103 -0
- package/dist/Components/Toast/ToastContext.js +124 -0
- package/dist/Components/Toast/index.d.ts +3 -0
- package/dist/Components/Toast/index.js +13 -0
- package/dist/Components/Typography/HeadingLevel.d.ts +28 -0
- package/dist/Components/Typography/HeadingLevel.js +20 -0
- package/dist/Components/Typography/Paragraphs.d.ts +8 -0
- package/dist/Components/Typography/Paragraphs.js +6 -0
- package/dist/Components/Typography/Section.d.ts +8 -0
- package/dist/Components/Typography/Section.js +6 -0
- package/dist/Components/Typography/Titles.d.ts +31 -0
- package/dist/Components/Typography/Titles.js +14 -0
- package/dist/Components/Typography/index.d.ts +4 -0
- package/dist/Components/Typography/index.js +17 -0
- package/dist/Components/Utilities/Foldable.d.ts +42 -0
- package/dist/Components/Utilities/Foldable.js +39 -0
- package/dist/Components/Utilities/index.d.ts +2 -0
- package/dist/Components/Utilities/index.js +6 -0
- package/dist/Components/Utilities/useClickOutside.d.ts +21 -0
- package/dist/Components/Utilities/useClickOutside.js +23 -0
- package/dist/Components/index.d.ts +16 -0
- package/dist/Components/index.js +158 -0
- package/dist/Elements/Http/CacheBadge.d.ts +13 -0
- package/dist/Elements/Http/CacheBadge.js +34 -0
- package/dist/Elements/Http/CacheIndicator.d.ts +17 -0
- package/dist/Elements/Http/CacheIndicator.js +47 -0
- package/dist/Elements/Http/RequestMethodBadge.d.ts +5 -0
- package/dist/Elements/Http/RequestMethodBadge.js +13 -0
- package/dist/Elements/Http/ResponseStatusBadge.d.ts +19 -0
- package/dist/Elements/Http/ResponseStatusBadge.js +20 -0
- package/dist/Elements/Http/index.d.ts +4 -0
- package/dist/Elements/Http/index.js +10 -0
- package/dist/Elements/System/CircuitBreakerStatus.d.ts +11 -0
- package/dist/Elements/System/CircuitBreakerStatus.js +98 -0
- package/dist/Elements/System/EndpointNode.d.ts +10 -0
- package/dist/Elements/System/EndpointNode.js +19 -0
- package/dist/Elements/System/EntrypointNode.d.ts +9 -0
- package/dist/Elements/System/EntrypointNode.js +17 -0
- package/dist/Elements/System/NetworkEdges.d.ts +37 -0
- package/dist/Elements/System/NetworkEdges.js +52 -0
- package/dist/Elements/System/NetworkMap.d.ts +33 -0
- package/dist/Elements/System/NetworkMap.js +121 -0
- package/dist/Elements/System/NetworkNode.d.ts +29 -0
- package/dist/Elements/System/NetworkNode.js +31 -0
- package/dist/Elements/System/ProxyNode.d.ts +8 -0
- package/dist/Elements/System/ProxyNode.js +10 -0
- package/dist/Elements/System/index.d.ts +9 -0
- package/dist/Elements/System/index.js +17 -0
- package/dist/Elements/Tpdex/TpdexBadge.d.ts +26 -0
- package/dist/Elements/Tpdex/TpdexBadge.js +36 -0
- package/dist/Elements/Tpdex/index.d.ts +4 -0
- package/dist/Elements/Tpdex/index.js +8 -0
- package/dist/Elements/Transactions/TransactionFiltersCard.d.ts +41 -0
- package/dist/Elements/Transactions/TransactionFiltersCard.js +121 -0
- package/dist/Elements/Transactions/TransactionsExplorerSidebar.d.ts +37 -0
- package/dist/Elements/Transactions/TransactionsExplorerSidebar.js +154 -0
- package/dist/Elements/Transactions/TransactionsFiltersSidebar.d.ts +22 -0
- package/dist/Elements/Transactions/TransactionsFiltersSidebar.js +39 -0
- package/dist/Elements/Transactions/index.d.ts +13 -0
- package/dist/Elements/Transactions/index.js +9 -0
- package/dist/Elements/index.d.ts +18 -0
- package/dist/Elements/index.js +38 -0
- package/dist/Models/Filters/active.d.ts +12 -0
- package/dist/Models/Filters/active.js +10 -0
- package/dist/Models/Filters/dates.d.ts +8 -0
- package/dist/Models/Filters/dates.js +16 -0
- package/dist/Models/Filters/index.d.ts +4 -0
- package/dist/Models/Filters/index.js +13 -0
- package/dist/Models/Filters/read.d.ts +9 -0
- package/dist/Models/Filters/read.js +22 -0
- package/dist/Models/Filters/types.d.ts +50 -0
- package/dist/Models/Filters/types.js +1 -0
- package/dist/Models/Http/body.d.ts +7 -0
- package/dist/Models/Http/body.js +6 -0
- package/dist/Models/Http/contentDisposition.d.ts +7 -0
- package/dist/Models/Http/contentDisposition.js +51 -0
- package/dist/Models/Http/dataUrl.d.ts +12 -0
- package/dist/Models/Http/dataUrl.js +21 -0
- package/dist/Models/Http/headers.d.ts +18 -0
- package/dist/Models/Http/headers.js +7 -0
- package/dist/Models/Http/index.d.ts +2 -0
- package/dist/Models/Http/index.js +6 -0
- package/dist/Models/Http/percent.d.ts +5 -0
- package/dist/Models/Http/percent.js +17 -0
- package/dist/Models/Http/requestTarget.d.ts +11 -0
- package/dist/Models/Http/requestTarget.js +7 -0
- package/dist/Models/System/index.d.ts +1 -0
- package/dist/Models/System/index.js +7 -0
- package/dist/Models/System/types.d.ts +20 -0
- package/dist/Models/System/types.js +48 -0
- package/dist/Models/Tpdex.d.ts +36 -0
- package/dist/Models/Tpdex.js +38 -0
- package/dist/Models/Transactions/Overview.d.ts +19 -0
- package/dist/Models/Transactions/Overview.js +1 -0
- package/dist/Models/Transactions/encoding.d.ts +49 -0
- package/dist/Models/Transactions/encoding.js +26 -0
- package/dist/Models/Transactions/endpoints.d.ts +15 -0
- package/dist/Models/Transactions/endpoints.js +21 -0
- package/dist/Models/Transactions/facets.d.ts +25 -0
- package/dist/Models/Transactions/facets.js +40 -0
- package/dist/Models/Transactions/filtering.d.ts +20 -0
- package/dist/Models/Transactions/filtering.js +34 -0
- package/dist/Models/Transactions/treeDepth.d.ts +2 -0
- package/dist/Models/Transactions/treeDepth.js +4 -0
- package/dist/Models/Transactions/types.d.ts +58 -0
- package/dist/Models/Transactions/types.js +1 -0
- package/dist/Models/index.d.ts +10 -0
- package/dist/Models/index.js +46 -0
- package/dist/Pages/Alerts/AlertsPage.d.ts +18 -0
- package/dist/Pages/Alerts/AlertsPage.js +104 -0
- package/dist/Pages/Alerts/index.d.ts +1 -0
- package/dist/Pages/Alerts/index.js +4 -0
- package/dist/Pages/Explorer/ExplorerPage.d.ts +6 -0
- package/dist/Pages/Explorer/ExplorerPage.js +55 -0
- package/dist/Pages/Explorer/index.d.ts +1 -0
- package/dist/Pages/Explorer/index.js +4 -0
- package/dist/Pages/Overview/OverviewPage.d.ts +11 -0
- package/dist/Pages/Overview/OverviewPage.js +10 -0
- package/dist/Pages/Overview/Sections/Components/TransactionsHistoryView.d.ts +7 -0
- package/dist/Pages/Overview/Sections/Components/TransactionsHistoryView.js +32 -0
- package/dist/Pages/Overview/Sections/Components/index.d.ts +1 -0
- package/dist/Pages/Overview/Sections/Components/index.js +4 -0
- package/dist/Pages/Overview/Sections/HistorySection.d.ts +18 -0
- package/dist/Pages/Overview/Sections/HistorySection.js +21 -0
- package/dist/Pages/Overview/Sections/SummarySection.d.ts +44 -0
- package/dist/Pages/Overview/Sections/SummarySection.js +127 -0
- package/dist/Pages/Overview/index.d.ts +4 -0
- package/dist/Pages/Overview/index.js +8 -0
- package/dist/Pages/SystemPage/SystemPage.d.ts +8 -0
- package/dist/Pages/SystemPage/SystemPage.js +16 -0
- package/dist/Pages/SystemPage/index.d.ts +1 -0
- package/dist/Pages/SystemPage/index.js +4 -0
- package/dist/Pages/Transactions/Detail/Components/DownloadButton.d.ts +33 -0
- package/dist/Pages/Transactions/Detail/Components/DownloadButton.js +62 -0
- package/dist/Pages/Transactions/Detail/Components/TransactionMessage.d.ts +16 -0
- package/dist/Pages/Transactions/Detail/Components/TransactionMessage.js +44 -0
- package/dist/Pages/Transactions/Detail/Components/TransactionMetadata.d.ts +21 -0
- package/dist/Pages/Transactions/Detail/Components/TransactionMetadata.js +127 -0
- package/dist/Pages/Transactions/Detail/Components/index.d.ts +6 -0
- package/dist/Pages/Transactions/Detail/Components/index.js +8 -0
- package/dist/Pages/Transactions/Detail/TransactionsDetailPage.d.ts +8 -0
- package/dist/Pages/Transactions/Detail/TransactionsDetailPage.js +15 -0
- package/dist/Pages/Transactions/Detail/Utils/BodyPreview.d.ts +15 -0
- package/dist/Pages/Transactions/Detail/Utils/BodyPreview.js +30 -0
- package/dist/Pages/Transactions/Detail/Utils/ContentRenderer.d.ts +28 -0
- package/dist/Pages/Transactions/Detail/Utils/ContentRenderer.js +115 -0
- package/dist/Pages/Transactions/Detail/Utils/index.d.ts +4 -0
- package/dist/Pages/Transactions/Detail/Utils/index.js +9 -0
- package/dist/Pages/Transactions/Detail/index.d.ts +4 -0
- package/dist/Pages/Transactions/Detail/index.js +8 -0
- package/dist/Pages/Transactions/List/TransactionsListPage.d.ts +80 -0
- package/dist/Pages/Transactions/List/TransactionsListPage.js +220 -0
- package/dist/Pages/Transactions/List/index.d.ts +4 -0
- package/dist/Pages/Transactions/List/index.js +6 -0
- package/dist/Pages/Transactions/List/useClientSideTransactions.d.ts +38 -0
- package/dist/Pages/Transactions/List/useClientSideTransactions.js +32 -0
- package/dist/Pages/Transactions/index.d.ts +4 -0
- package/dist/Pages/Transactions/index.js +6 -0
- package/dist/Pages/index.d.ts +5 -0
- package/dist/Pages/index.js +18 -0
- package/dist/Settings.d.ts +13 -0
- package/dist/Settings.js +16 -0
- package/dist/css/Components/Formatter/prism.css +79 -0
- package/dist/css/Components/Inputs/Input/Input.css +73 -0
- package/dist/css/Components/Inputs/Sliders/RangeSliderStyles.css +92 -0
- package/dist/css/components.css +6 -0
- package/dist/css/fonts/Lato-Bold.woff2 +0 -0
- package/dist/css/fonts/Lato-BoldItalic.woff2 +0 -0
- package/dist/css/fonts/Lato-Italic.woff2 +0 -0
- package/dist/css/fonts/Lato-Regular.woff2 +0 -0
- package/dist/css/fonts/OFL.txt +93 -0
- package/dist/css/theme.css +109 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +250 -0
- package/dist/logo.svg +1 -0
- package/dist/styles/styles.css +1 -0
- package/package.json +367 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps language aliases to their canonical forms for the syntax highlighter
|
|
3
|
+
*/
|
|
4
|
+
export declare const languageMap: Record<string, string>;
|
|
5
|
+
/**
|
|
6
|
+
* Normalizes language name for syntax highlighting
|
|
7
|
+
*/
|
|
8
|
+
export declare function normalizeLanguage(language: string): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SyntaxTree } from "./SyntaxHighlighter.js";
|
|
2
|
+
export type CodeLanguage = "json" | "javascript" | "typescript" | "html" | "css" | "sql" | "text";
|
|
3
|
+
/**
|
|
4
|
+
* Formats a body, splits it into lines once, and highlights lines on demand.
|
|
5
|
+
*
|
|
6
|
+
* The view highlights only the lines it draws, so the cost follows the window
|
|
7
|
+
* and not the size of the body. Results are cached per line text.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useCodeHighlighting(content: string, language: CodeLanguage): {
|
|
10
|
+
formattedContent: string;
|
|
11
|
+
lines: string[];
|
|
12
|
+
highlightLine: (line: string) => SyntaxTree | null;
|
|
13
|
+
/** Whether the body is too large to be highlighted, so the view draws it as plain text. */
|
|
14
|
+
tooLargeToHighlight: boolean;
|
|
15
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useMemo as s, useDeferredValue as u } from "react";
|
|
2
|
+
import { refractor as o } from "refractor/core";
|
|
3
|
+
import { HIGHLIGHT_CAP as c, FORMAT_CAP as p } from "./bodyLimits.js";
|
|
4
|
+
import { normalizeLanguage as l } from "./syntaxTheme.js";
|
|
5
|
+
import a from "refractor/css";
|
|
6
|
+
import d from "refractor/javascript";
|
|
7
|
+
import C from "refractor/json";
|
|
8
|
+
import x from "refractor/markup";
|
|
9
|
+
import y from "refractor/sql";
|
|
10
|
+
import H from "refractor/typescript";
|
|
11
|
+
o.register(d);
|
|
12
|
+
o.register(H);
|
|
13
|
+
o.register(C);
|
|
14
|
+
o.register(a);
|
|
15
|
+
o.register(y);
|
|
16
|
+
o.register(x);
|
|
17
|
+
function L(t) {
|
|
18
|
+
try {
|
|
19
|
+
const r = JSON.parse(t);
|
|
20
|
+
return JSON.stringify(r, null, 2);
|
|
21
|
+
} catch {
|
|
22
|
+
return t;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function j(t, r) {
|
|
26
|
+
return r === "json" && t.length <= p ? L(t) : t;
|
|
27
|
+
}
|
|
28
|
+
function A(t, r) {
|
|
29
|
+
if (r === "text")
|
|
30
|
+
return null;
|
|
31
|
+
try {
|
|
32
|
+
return o.highlight(t, l(r));
|
|
33
|
+
} catch (e) {
|
|
34
|
+
return console.warn(`Failed to highlight code for language "${r}":`, e), null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function S(t, r) {
|
|
38
|
+
const e = s(() => j(t, r), [t, r]), f = s(() => e.split(`
|
|
39
|
+
`), [e]), m = r !== "text" && e.length > c, h = u(m ? "text" : r, "text"), g = s(() => {
|
|
40
|
+
const n = /* @__PURE__ */ new Map();
|
|
41
|
+
return (i) => (n.has(i) || n.set(i, A(i, h)), n.get(i) ?? null);
|
|
42
|
+
}, [h]);
|
|
43
|
+
return { formattedContent: e, lines: f, highlightLine: g, tooLargeToHighlight: m };
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
S as useCodeHighlighting
|
|
47
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface VirtualizationConfig {
|
|
2
|
+
/** Item height in pixels */
|
|
3
|
+
itemHeight: number;
|
|
4
|
+
/** Container height in pixels */
|
|
5
|
+
containerHeight: number;
|
|
6
|
+
/** Number of items to render outside visible area for smooth scrolling */
|
|
7
|
+
overscan?: number;
|
|
8
|
+
/** Threshold for enabling virtualization */
|
|
9
|
+
virtualizationThreshold?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface VirtualizationResult {
|
|
12
|
+
/** Whether virtualization is enabled */
|
|
13
|
+
isVirtualized: boolean;
|
|
14
|
+
/** Start index of visible items */
|
|
15
|
+
startIndex: number;
|
|
16
|
+
/** End index of visible items */
|
|
17
|
+
endIndex: number;
|
|
18
|
+
/** Total height of virtual content */
|
|
19
|
+
totalHeight: number;
|
|
20
|
+
/** Offset from top for positioning */
|
|
21
|
+
offsetY: number;
|
|
22
|
+
/** Scroll handler for the scrolling container */
|
|
23
|
+
onScroll: (e: React.UIEvent<HTMLElement>) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Custom hook for virtualizing long lists of items
|
|
27
|
+
* Improves performance when rendering large amounts of content
|
|
28
|
+
*/
|
|
29
|
+
export declare function useVirtualization(totalItems: number, config: VirtualizationConfig): VirtualizationResult;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useState as H, useCallback as m } from "react";
|
|
2
|
+
function v(t, s) {
|
|
3
|
+
const { itemHeight: n, containerHeight: e, overscan: i = 5, virtualizationThreshold: a = 100 } = s, [l, h] = H(0), r = Math.min(l, Math.max(0, t - 1)), o = t > a, d = Math.min(t - 1, r + Math.ceil(e / n)), c = Math.max(0, r - i), u = Math.min(t - 1, d + i), f = t * n, x = c * n, M = m(
|
|
4
|
+
(g) => h(Math.floor(g.currentTarget.scrollTop / n)),
|
|
5
|
+
[n]
|
|
6
|
+
);
|
|
7
|
+
return {
|
|
8
|
+
isVirtualized: o,
|
|
9
|
+
startIndex: o ? c : 0,
|
|
10
|
+
endIndex: o ? u : t - 1,
|
|
11
|
+
totalHeight: o ? f : e,
|
|
12
|
+
offsetY: o ? x : 0,
|
|
13
|
+
onScroll: M
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
v as useVirtualization
|
|
18
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ChoiceInputProps } from "../choiceInput.js";
|
|
2
|
+
export interface CheckboxProps extends ChoiceInputProps {
|
|
3
|
+
/** Draws a partial tick: some, not all, of what the box stands for. Not an HTML attribute, so set on the DOM node. */
|
|
4
|
+
indeterminate?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function Checkbox({ name, label, checked, containerProps, labelProps, disabled, indeterminate, ref: consumerRef, ...inputProps }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsxs as d, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as g, useCallback as h, useEffect as k } from "react";
|
|
3
|
+
import { twMerge as s } from "tailwind-merge";
|
|
4
|
+
import { useChoiceInputId as v } from "../choiceInput.js";
|
|
5
|
+
function j({
|
|
6
|
+
name: e,
|
|
7
|
+
label: c = void 0,
|
|
8
|
+
checked: p = void 0,
|
|
9
|
+
containerProps: l = {},
|
|
10
|
+
labelProps: o = {},
|
|
11
|
+
disabled: i = !1,
|
|
12
|
+
indeterminate: u = !1,
|
|
13
|
+
ref: f,
|
|
14
|
+
...a
|
|
15
|
+
}) {
|
|
16
|
+
const t = g(null), m = v(a.id), x = h(
|
|
17
|
+
(r) => (t.current = r, y(f, r)),
|
|
18
|
+
[f]
|
|
19
|
+
);
|
|
20
|
+
k(() => {
|
|
21
|
+
t.current && (t.current.indeterminate = u);
|
|
22
|
+
}, [u]);
|
|
23
|
+
const N = (r) => {
|
|
24
|
+
r.target.tagName !== "INPUT" && t.current && (t.current.click(), t.current.focus());
|
|
25
|
+
};
|
|
26
|
+
return /* @__PURE__ */ d(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
...l,
|
|
30
|
+
className: s(
|
|
31
|
+
"relative flex gap-x-3 select-none w-full",
|
|
32
|
+
l.className,
|
|
33
|
+
i ? "" : "cursor-pointer"
|
|
34
|
+
),
|
|
35
|
+
onClick: N,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ n("div", { className: "flex h-6 items-center", children: /* @__PURE__ */ n(
|
|
38
|
+
"input",
|
|
39
|
+
{
|
|
40
|
+
name: e,
|
|
41
|
+
type: "checkbox",
|
|
42
|
+
checked: p,
|
|
43
|
+
...a,
|
|
44
|
+
id: m,
|
|
45
|
+
ref: x,
|
|
46
|
+
className: s(
|
|
47
|
+
"lydia-input h-4 w-4 border-gray-300 text-primary-600 focus:ring-primary-600 cursor-pointer",
|
|
48
|
+
a.className
|
|
49
|
+
),
|
|
50
|
+
disabled: i
|
|
51
|
+
}
|
|
52
|
+
) }),
|
|
53
|
+
/* @__PURE__ */ n("div", { className: "text-sm leading-6 flex-1 min-w-0", children: /* @__PURE__ */ n(
|
|
54
|
+
"label",
|
|
55
|
+
{
|
|
56
|
+
htmlFor: m,
|
|
57
|
+
...o,
|
|
58
|
+
className: s("font-medium text-gray-900 block", o.className, i ? "" : "cursor-pointer"),
|
|
59
|
+
onClick: (r) => {
|
|
60
|
+
r.preventDefault();
|
|
61
|
+
},
|
|
62
|
+
children: c ?? e
|
|
63
|
+
}
|
|
64
|
+
) })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
function y(e, c) {
|
|
70
|
+
if (typeof e == "function") return e(c);
|
|
71
|
+
e && (e.current = c);
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
j as Checkbox
|
|
75
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Checkbox.js";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
export interface DateRange {
|
|
3
|
+
startDate: string;
|
|
4
|
+
endDate: string;
|
|
5
|
+
}
|
|
6
|
+
export interface DateRangeSelectorProps extends Omit<ComponentProps<"div">, "onChange"> {
|
|
7
|
+
/**
|
|
8
|
+
* The label for the date range selector
|
|
9
|
+
*/
|
|
10
|
+
label?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The current date range
|
|
13
|
+
*/
|
|
14
|
+
value?: DateRange;
|
|
15
|
+
/**
|
|
16
|
+
* Placeholder for the start date input
|
|
17
|
+
*/
|
|
18
|
+
startDatePlaceholder?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Placeholder for the end date input
|
|
21
|
+
*/
|
|
22
|
+
endDatePlaceholder?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Callback when date range changes
|
|
25
|
+
*/
|
|
26
|
+
onChange?: (range: DateRange) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Additional CSS class for the component
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Minimum allowed date (ISO format: YYYY-MM-DD)
|
|
33
|
+
*/
|
|
34
|
+
minDate?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Maximum allowed date (ISO format: YYYY-MM-DD)
|
|
37
|
+
*/
|
|
38
|
+
maxDate?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to disable past dates
|
|
41
|
+
*/
|
|
42
|
+
disablePastDates?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to disable future dates
|
|
45
|
+
*/
|
|
46
|
+
disableFutureDates?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export declare function DateRangeSelector({ label, value, startDatePlaceholder, endDatePlaceholder, onChange, className, minDate, maxDate, disablePastDates, disableFutureDates, ...props }: DateRangeSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsxs as D, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useId as x } from "react";
|
|
3
|
+
import { twMerge as B } from "tailwind-merge";
|
|
4
|
+
import { Input as b } from "../Input/Input.js";
|
|
5
|
+
import { localToday as E } from "../../../Models/Filters/dates.js";
|
|
6
|
+
function T({
|
|
7
|
+
label: a,
|
|
8
|
+
value: t = { startDate: "", endDate: "" },
|
|
9
|
+
startDatePlaceholder: p = "Start date",
|
|
10
|
+
endDatePlaceholder: g = "End date",
|
|
11
|
+
onChange: r,
|
|
12
|
+
className: y,
|
|
13
|
+
minDate: o,
|
|
14
|
+
maxDate: c,
|
|
15
|
+
disablePastDates: w = !1,
|
|
16
|
+
disableFutureDates: N = !1,
|
|
17
|
+
...S
|
|
18
|
+
}) {
|
|
19
|
+
const h = x(), m = x(), n = E(), d = w && !(o && o > n) ? n : o, s = N && !(c && c < n) ? n : c, e = !!(t.startDate?.trim() && t.endDate?.trim()) && t.startDate > t.endDate ? "Start date cannot be after end date" : null, I = (l) => {
|
|
20
|
+
const f = l.target.value;
|
|
21
|
+
r && r({
|
|
22
|
+
...t,
|
|
23
|
+
startDate: f
|
|
24
|
+
});
|
|
25
|
+
}, j = (l) => {
|
|
26
|
+
const f = l.target.value;
|
|
27
|
+
r && r({
|
|
28
|
+
...t,
|
|
29
|
+
endDate: f
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ D("div", { role: "group", "aria-labelledby": a ? h : void 0, className: B("w-full", y), ...S, children: [
|
|
33
|
+
(a || e) && /* @__PURE__ */ D("div", { className: "flex justify-between items-center mb-1", children: [
|
|
34
|
+
a && /* @__PURE__ */ i("span", { id: h, className: "block text-sm font-medium leading-6 text-gray-900", children: a }),
|
|
35
|
+
e && /* @__PURE__ */ i("span", { id: m, className: "text-xs text-danger-600", children: e })
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ D("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
38
|
+
/* @__PURE__ */ i(
|
|
39
|
+
b,
|
|
40
|
+
{
|
|
41
|
+
type: "date",
|
|
42
|
+
value: t.startDate,
|
|
43
|
+
onChange: I,
|
|
44
|
+
placeholder: p,
|
|
45
|
+
"aria-label": p,
|
|
46
|
+
variant: e ? "error" : "default",
|
|
47
|
+
"aria-describedby": e ? m : void 0,
|
|
48
|
+
...d ? { min: d } : {},
|
|
49
|
+
...t.endDate && t.endDate.trim() ? { max: t.endDate } : s ? { max: s } : {}
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ i(
|
|
53
|
+
b,
|
|
54
|
+
{
|
|
55
|
+
type: "date",
|
|
56
|
+
value: t.endDate,
|
|
57
|
+
onChange: j,
|
|
58
|
+
placeholder: g,
|
|
59
|
+
"aria-label": g,
|
|
60
|
+
variant: e ? "error" : "default",
|
|
61
|
+
"aria-describedby": e ? m : void 0,
|
|
62
|
+
...t.startDate && t.startDate.trim() ? { min: t.startDate } : d ? { min: d } : {},
|
|
63
|
+
...s ? { max: s } : {}
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] })
|
|
67
|
+
] });
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
T as DateRangeSelector
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DateRangeSelector.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export declare const fieldWrapperClassName = "mt-2 flex rounded-sm bg-white outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus-within:outline-2 focus-within:-outline-offset-2 focus-within:outline-primary-600";
|
|
3
|
+
export interface FieldProps {
|
|
4
|
+
controlId: string;
|
|
5
|
+
helpTextId: string;
|
|
6
|
+
errorId: string;
|
|
7
|
+
cornerHintId: string;
|
|
8
|
+
label?: ReactNode;
|
|
9
|
+
labelClassName?: string;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
cornerHint?: ReactNode;
|
|
12
|
+
helpText?: ReactNode;
|
|
13
|
+
errorMessage?: ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
/** The control. Its wrapper owns the gap under the label. */
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/** The label, corner hint, help text and error shared by every text field. */
|
|
19
|
+
export declare function Field({ controlId, helpTextId, errorId, cornerHintId, label, labelClassName, required, cornerHint, helpText, errorMessage, className, children, }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { twMerge as m } from "tailwind-merge";
|
|
3
|
+
const y = "mt-2 flex rounded-sm bg-white outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus-within:outline-2 focus-within:-outline-offset-2 focus-within:outline-primary-600", h = "block text-sm/6 font-medium text-gray-900", p = "mt-2 text-sm text-gray-500", N = "mt-2 text-sm text-danger-600";
|
|
4
|
+
function b({
|
|
5
|
+
controlId: n,
|
|
6
|
+
helpTextId: o,
|
|
7
|
+
errorId: d,
|
|
8
|
+
cornerHintId: c,
|
|
9
|
+
label: s,
|
|
10
|
+
labelClassName: r,
|
|
11
|
+
required: f,
|
|
12
|
+
cornerHint: e,
|
|
13
|
+
helpText: i,
|
|
14
|
+
errorMessage: l,
|
|
15
|
+
className: u,
|
|
16
|
+
children: x
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ a("div", { className: m("w-full", u), children: [
|
|
19
|
+
(s || e) && /* @__PURE__ */ a("div", { className: e ? "flex justify-between items-baseline" : void 0, children: [
|
|
20
|
+
s && /* @__PURE__ */ a("label", { htmlFor: n, className: m(h, r), children: [
|
|
21
|
+
s,
|
|
22
|
+
" ",
|
|
23
|
+
f && /* @__PURE__ */ t("span", { className: "text-danger-500", children: "*" })
|
|
24
|
+
] }),
|
|
25
|
+
e && /* @__PURE__ */ t("span", { id: c, className: "text-sm/6 text-gray-500", children: e })
|
|
26
|
+
] }),
|
|
27
|
+
x,
|
|
28
|
+
i && !l && /* @__PURE__ */ t("p", { id: o, className: p, children: i }),
|
|
29
|
+
l && /* @__PURE__ */ t("p", { id: d, className: N, children: l })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
b as Field,
|
|
34
|
+
y as fieldWrapperClassName
|
|
35
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface FieldOptions {
|
|
3
|
+
id?: string;
|
|
4
|
+
helpTextId?: string;
|
|
5
|
+
errorId?: string;
|
|
6
|
+
cornerHintId?: string;
|
|
7
|
+
helpText?: ReactNode;
|
|
8
|
+
errorMessage?: ReactNode;
|
|
9
|
+
cornerHint?: ReactNode;
|
|
10
|
+
/** True when the variant alone marks the control invalid, with or without a message. */
|
|
11
|
+
invalid?: boolean;
|
|
12
|
+
/** The consumer's own `aria-describedby`, kept after the ones the field generates. */
|
|
13
|
+
describedBy?: string;
|
|
14
|
+
/** False when the frame is not rendered, so no description exists to point at. */
|
|
15
|
+
framed?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Generates the ids of a field (control, help text, error, corner hint) unless the consumer passes
|
|
19
|
+
* them, and derives the ARIA attributes of its control from the descriptions actually rendered.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useField({ id, helpTextId, errorId, cornerHintId, helpText, errorMessage, cornerHint, invalid, describedBy, framed, }: FieldOptions): {
|
|
22
|
+
ids: {
|
|
23
|
+
control: string;
|
|
24
|
+
help: string;
|
|
25
|
+
error: string;
|
|
26
|
+
cornerHint: string;
|
|
27
|
+
};
|
|
28
|
+
controlProps: {
|
|
29
|
+
id: string;
|
|
30
|
+
"aria-describedby": string | undefined;
|
|
31
|
+
"aria-invalid": true | undefined;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useId as h } from "react";
|
|
2
|
+
function $({
|
|
3
|
+
id: t,
|
|
4
|
+
helpTextId: e,
|
|
5
|
+
errorId: c,
|
|
6
|
+
cornerHintId: d,
|
|
7
|
+
helpText: u,
|
|
8
|
+
errorMessage: r,
|
|
9
|
+
cornerHint: p,
|
|
10
|
+
invalid: s = !1,
|
|
11
|
+
describedBy: a,
|
|
12
|
+
framed: i = !0
|
|
13
|
+
}) {
|
|
14
|
+
const n = h(), o = {
|
|
15
|
+
control: t ?? n,
|
|
16
|
+
help: e ?? `${n}-help`,
|
|
17
|
+
error: c ?? `${n}-error`,
|
|
18
|
+
cornerHint: d ?? `${n}-hint`
|
|
19
|
+
}, l = [
|
|
20
|
+
i && r ? o.error : null,
|
|
21
|
+
i && u && !r ? o.help : null,
|
|
22
|
+
i && p ? o.cornerHint : null,
|
|
23
|
+
a
|
|
24
|
+
].filter(Boolean);
|
|
25
|
+
return {
|
|
26
|
+
ids: o,
|
|
27
|
+
controlProps: {
|
|
28
|
+
id: o.control,
|
|
29
|
+
"aria-describedby": l.length > 0 ? l.join(" ") : void 0,
|
|
30
|
+
"aria-invalid": s || r ? !0 : void 0
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
$ as useField
|
|
36
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
import { type InputButtonProps } from "../InputButton/index.js";
|
|
3
|
+
export interface InputProps extends ComponentProps<"input"> {
|
|
4
|
+
/**
|
|
5
|
+
* The label for the input field
|
|
6
|
+
*/
|
|
7
|
+
label?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Optional help text displayed below the input
|
|
10
|
+
*/
|
|
11
|
+
helpText?: string;
|
|
12
|
+
/**
|
|
13
|
+
* ID for the help text element
|
|
14
|
+
*/
|
|
15
|
+
helpTextId?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Optional error message
|
|
18
|
+
*/
|
|
19
|
+
errorMessage?: string;
|
|
20
|
+
/**
|
|
21
|
+
* ID for the error message element
|
|
22
|
+
*/
|
|
23
|
+
errorId?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional corner hint text (shown on the right side of the label)
|
|
26
|
+
*/
|
|
27
|
+
cornerHint?: string;
|
|
28
|
+
/**
|
|
29
|
+
* ID for the corner hint element
|
|
30
|
+
*/
|
|
31
|
+
cornerHintId?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Optional CSS classes to add to the input wrapper
|
|
34
|
+
*/
|
|
35
|
+
wrapperClassName?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Optional CSS classes to add to the label
|
|
38
|
+
*/
|
|
39
|
+
labelClassName?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Optional CSS classes to add directly to the input element
|
|
42
|
+
*/
|
|
43
|
+
inputClassName?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Visual state variant of the input.
|
|
46
|
+
*/
|
|
47
|
+
variant?: "default" | "error" | "success";
|
|
48
|
+
/**
|
|
49
|
+
* Leading icon (ReactNode for flexibility)
|
|
50
|
+
*/
|
|
51
|
+
leadingIcon?: ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* Trailing icon (ReactNode for flexibility)
|
|
54
|
+
*/
|
|
55
|
+
trailingIcon?: ReactNode;
|
|
56
|
+
/**
|
|
57
|
+
* Leading button configuration
|
|
58
|
+
*/
|
|
59
|
+
leadingButton?: Omit<InputButtonProps, "position">;
|
|
60
|
+
/**
|
|
61
|
+
* Trailing button configuration
|
|
62
|
+
*/
|
|
63
|
+
trailingButton?: Omit<InputButtonProps, "position">;
|
|
64
|
+
/**
|
|
65
|
+
* Keyboard shortcut to display
|
|
66
|
+
*/
|
|
67
|
+
keyboardShortcut?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Custom leading element (overrides leadingIcon and leadingButton)
|
|
70
|
+
*/
|
|
71
|
+
leadingElement?: ReactNode;
|
|
72
|
+
/**
|
|
73
|
+
* Custom trailing element (overrides trailingIcon, trailingButton, and keyboardShortcut)
|
|
74
|
+
*/
|
|
75
|
+
trailingElement?: ReactNode;
|
|
76
|
+
/**
|
|
77
|
+
* Hide container div (creates inline input)
|
|
78
|
+
*/
|
|
79
|
+
hideContainer?: boolean;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Input component with cleaner props interface
|
|
83
|
+
* Provides simplified props for common use cases while maintaining flexibility
|
|
84
|
+
*/
|
|
85
|
+
export declare const Input: import("react").ForwardRefExoticComponent<Omit<InputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|