@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,141 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { Disclosure as x, Menu as N, MenuButton as g, MenuItems as b, MenuItem as y, DisclosureButton as c, DisclosurePanel as v } from "@headlessui/react";
|
|
3
|
+
import { Cog6ToothIcon as h, Bars3Icon as w, XMarkIcon as k } from "@heroicons/react/24/outline";
|
|
4
|
+
import { twMerge as u } from "tailwind-merge";
|
|
5
|
+
import { DefaultAvatar as p } from "./Assets/defaultAvatar.js";
|
|
6
|
+
const f = ({ text: s = "lydia" }) => /* @__PURE__ */ e("span", { className: "ml-2 text-white text-xl font-semibold", children: s }), C = (s) => /* @__PURE__ */ e("a", { ...s });
|
|
7
|
+
function j({
|
|
8
|
+
navigation: s = [],
|
|
9
|
+
userNavigation: d = [],
|
|
10
|
+
user: i,
|
|
11
|
+
logo: o,
|
|
12
|
+
brand: l,
|
|
13
|
+
onSettings: n,
|
|
14
|
+
linkComponent: t = C
|
|
15
|
+
}) {
|
|
16
|
+
const m = s.length > 0 || !!i;
|
|
17
|
+
return /* @__PURE__ */ r(x, { as: "nav", "data-testid": "navbar", className: "bg-primary-900 shadow", children: [
|
|
18
|
+
/* @__PURE__ */ e("div", { className: "mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ r("div", { className: "flex h-16 items-center justify-between", children: [
|
|
19
|
+
/* @__PURE__ */ r("div", { className: "flex items-center", children: [
|
|
20
|
+
/* @__PURE__ */ r(t, { href: "/", className: "flex items-center shrink-0 cursor-pointer", children: [
|
|
21
|
+
o && /* The mark is decoration: the brand beside it names the link, and
|
|
22
|
+
an alt saying the brand again was read twice. */
|
|
23
|
+
/* @__PURE__ */ e("span", { "aria-hidden": "true", className: "contents", children: o }),
|
|
24
|
+
typeof l == "string" ? /* @__PURE__ */ e(f, { text: l }) : l || /* @__PURE__ */ e(f, {})
|
|
25
|
+
] }),
|
|
26
|
+
/* @__PURE__ */ e("div", { className: "hidden md:block", children: /* @__PURE__ */ e("div", { className: "ml-10 flex items-baseline space-x-4", children: s.map((a) => /* @__PURE__ */ e(
|
|
27
|
+
t,
|
|
28
|
+
{
|
|
29
|
+
href: a.href,
|
|
30
|
+
onClick: a.onClick,
|
|
31
|
+
"aria-current": a.current ? "page" : void 0,
|
|
32
|
+
className: u(
|
|
33
|
+
a.current ? "bg-primary-500 text-white" : "text-white hover:bg-primary-500/75",
|
|
34
|
+
"rounded-md px-3 py-2 text-sm font-medium cursor-pointer"
|
|
35
|
+
),
|
|
36
|
+
children: a.name
|
|
37
|
+
},
|
|
38
|
+
a.name
|
|
39
|
+
)) }) })
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ e("div", { className: "hidden md:block", children: /* @__PURE__ */ r("div", { className: "ml-4 flex items-center md:ml-6", children: [
|
|
42
|
+
n && /* @__PURE__ */ r(
|
|
43
|
+
"button",
|
|
44
|
+
{
|
|
45
|
+
type: "button",
|
|
46
|
+
onClick: n,
|
|
47
|
+
className: "relative rounded-full bg-primary-500 p-1 text-primary-200 hover:text-white focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-primary-500 focus:outline-hidden cursor-pointer",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ e("span", { className: "absolute -inset-1.5" }),
|
|
50
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Settings" }),
|
|
51
|
+
/* @__PURE__ */ e(h, { "aria-hidden": "true", className: "size-6" })
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
i && /* @__PURE__ */ r(N, { as: "div", className: "relative ml-3", children: [
|
|
56
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ r(g, { className: "relative flex max-w-xs items-center rounded-full bg-primary-500 text-sm text-white focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-primary-500 focus:outline-hidden cursor-pointer", children: [
|
|
57
|
+
/* @__PURE__ */ e("span", { className: "absolute -inset-1.5" }),
|
|
58
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Open user menu" }),
|
|
59
|
+
i.avatar ?? /* @__PURE__ */ e(p, {})
|
|
60
|
+
] }) }),
|
|
61
|
+
/* @__PURE__ */ e(
|
|
62
|
+
b,
|
|
63
|
+
{
|
|
64
|
+
transition: !0,
|
|
65
|
+
className: "absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 transition focus:outline-hidden data-closed:scale-95 data-closed:transform data-closed:opacity-0 data-enter:duration-100 data-enter:ease-out data-leave:duration-75 data-leave:ease-in",
|
|
66
|
+
children: d.map((a) => /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
|
|
67
|
+
t,
|
|
68
|
+
{
|
|
69
|
+
href: a.href,
|
|
70
|
+
onClick: a.onClick,
|
|
71
|
+
className: "block px-4 py-2 text-sm text-gray-500 data-focus:bg-gray-100 data-focus:outline-hidden",
|
|
72
|
+
children: a.name
|
|
73
|
+
}
|
|
74
|
+
) }, a.name))
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
] })
|
|
78
|
+
] }) }),
|
|
79
|
+
m && /* @__PURE__ */ e("div", { className: "-mr-2 flex md:hidden", children: /* @__PURE__ */ r(c, { className: "group relative inline-flex items-center justify-center rounded-md bg-primary-500 p-2 text-primary-200 hover:bg-primary-500/75 hover:text-white focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-primary-500 focus:outline-hidden", children: [
|
|
80
|
+
/* @__PURE__ */ e("span", { className: "absolute -inset-0.5" }),
|
|
81
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Open main menu" }),
|
|
82
|
+
/* @__PURE__ */ e(w, { "aria-hidden": "true", className: "block size-6 group-data-open:hidden" }),
|
|
83
|
+
/* @__PURE__ */ e(k, { "aria-hidden": "true", className: "hidden size-6 group-data-open:block" })
|
|
84
|
+
] }) })
|
|
85
|
+
] }) }),
|
|
86
|
+
m && /* @__PURE__ */ r(v, { className: "md:hidden", children: [
|
|
87
|
+
/* @__PURE__ */ e("div", { className: "space-y-1 px-2 pt-2 pb-3 sm:px-3", children: s.map((a) => /* @__PURE__ */ e(
|
|
88
|
+
c,
|
|
89
|
+
{
|
|
90
|
+
as: t,
|
|
91
|
+
href: a.href,
|
|
92
|
+
onClick: a.onClick,
|
|
93
|
+
"aria-current": a.current ? "page" : void 0,
|
|
94
|
+
className: u(
|
|
95
|
+
a.current ? "bg-primary-500 text-white" : "text-white hover:bg-primary-500/75",
|
|
96
|
+
"block rounded-md px-3 py-2 text-base font-medium cursor-pointer"
|
|
97
|
+
),
|
|
98
|
+
children: a.name
|
|
99
|
+
},
|
|
100
|
+
a.name
|
|
101
|
+
)) }),
|
|
102
|
+
i && /* @__PURE__ */ r("div", { className: "border-t border-primary-500 pt-4 pb-3", children: [
|
|
103
|
+
/* @__PURE__ */ r("div", { className: "flex items-center px-5", children: [
|
|
104
|
+
/* @__PURE__ */ e("div", { className: "shrink-0", children: i.avatar ?? /* @__PURE__ */ e(p, { className: "size-10 rounded-full" }) }),
|
|
105
|
+
/* @__PURE__ */ r("div", { className: "ml-3", children: [
|
|
106
|
+
/* @__PURE__ */ e("div", { className: "text-base font-medium text-white", children: i.name }),
|
|
107
|
+
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-primary-300", children: i.email })
|
|
108
|
+
] }),
|
|
109
|
+
/* @__PURE__ */ e("div", { className: "ml-auto flex space-x-2", children: n && /* @__PURE__ */ r(
|
|
110
|
+
"button",
|
|
111
|
+
{
|
|
112
|
+
type: "button",
|
|
113
|
+
onClick: n,
|
|
114
|
+
className: "relative shrink-0 rounded-full border-2 border-transparent bg-primary-500 p-1 text-primary-200 hover:text-white focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-primary-500 focus:outline-hidden cursor-pointer",
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ e("span", { className: "absolute -inset-1.5" }),
|
|
117
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Settings" }),
|
|
118
|
+
/* @__PURE__ */ e(h, { "aria-hidden": "true", className: "size-6" })
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
) })
|
|
122
|
+
] }),
|
|
123
|
+
/* @__PURE__ */ e("div", { className: "mt-3 space-y-1 px-2", children: d.map((a) => /* @__PURE__ */ e(
|
|
124
|
+
c,
|
|
125
|
+
{
|
|
126
|
+
as: t,
|
|
127
|
+
href: a.href,
|
|
128
|
+
onClick: a.onClick,
|
|
129
|
+
className: "block rounded-md px-3 py-2 text-base font-medium text-white hover:bg-primary-500/75",
|
|
130
|
+
children: a.name
|
|
131
|
+
},
|
|
132
|
+
a.name
|
|
133
|
+
)) })
|
|
134
|
+
] })
|
|
135
|
+
] })
|
|
136
|
+
] });
|
|
137
|
+
}
|
|
138
|
+
export {
|
|
139
|
+
f as DefaultBrand,
|
|
140
|
+
j as NavBar
|
|
141
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NavBar, DefaultBrand, type DefaultBrandProps, type LinkComponentType, type NavBarProps, type User, type NavigationItem, } from "./NavBar.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TabPanel as HeadlessTabPanel, TabGroup } from "@headlessui/react";
|
|
2
|
+
import { type ComponentProps, type FC, type ReactNode } from "react";
|
|
3
|
+
export interface TabItem {
|
|
4
|
+
name: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
id: string;
|
|
8
|
+
}
|
|
9
|
+
export interface TabsProps extends Omit<ComponentProps<typeof TabGroup>, "children" | "defaultIndex" | "selectedIndex"> {
|
|
10
|
+
tabs: TabItem[];
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
defaultIndex?: number;
|
|
13
|
+
selectedIndex?: number;
|
|
14
|
+
onChange?: (index: number) => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
tabListClassName?: string;
|
|
17
|
+
tabClassName?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const Tabs: FC<TabsProps>;
|
|
20
|
+
export interface TabPanelProps extends ComponentProps<typeof HeadlessTabPanel> {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const TabPanel: FC<TabPanelProps>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { TabPanel as y, TabGroup as v, TabList as w, Tab as N, TabPanels as T } from "@headlessui/react";
|
|
3
|
+
import { ChevronDownIcon as C } from "@heroicons/react/16/solid";
|
|
4
|
+
import { useState as I, Fragment as P } from "react";
|
|
5
|
+
import { twMerge as i } from "tailwind-merge";
|
|
6
|
+
const F = ({
|
|
7
|
+
tabs: a,
|
|
8
|
+
children: n,
|
|
9
|
+
defaultIndex: o = 0,
|
|
10
|
+
selectedIndex: l,
|
|
11
|
+
onChange: u,
|
|
12
|
+
className: p,
|
|
13
|
+
tabListClassName: b,
|
|
14
|
+
tabClassName: f,
|
|
15
|
+
...h
|
|
16
|
+
}) => {
|
|
17
|
+
const [x, g] = I(o), s = l !== void 0, d = s ? l : x, c = (e) => {
|
|
18
|
+
s || g(e), u?.(e);
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ r("div", { className: i("w-full max-w-3xl mx-auto", p), children: /* @__PURE__ */ m(v, { selectedIndex: d, onChange: c, ...h, children: [
|
|
21
|
+
/* @__PURE__ */ r("div", { className: "grid grid-cols-1 sm:hidden", children: /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
22
|
+
/* @__PURE__ */ r(
|
|
23
|
+
"select",
|
|
24
|
+
{
|
|
25
|
+
"aria-label": "Select a tab",
|
|
26
|
+
className: "col-start-1 row-start-1 w-full appearance-none rounded-md bg-white py-2 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus:outline-2 focus:-outline-offset-2 focus:outline-primary-600 focus-visible:outline-primary-600 focus:outline-none",
|
|
27
|
+
value: d,
|
|
28
|
+
onChange: (e) => c(Number(e.target.value)),
|
|
29
|
+
children: a.map((e, t) => /* @__PURE__ */ r("option", { value: t, disabled: e.disabled, children: e.name }, e.id))
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ r(
|
|
33
|
+
C,
|
|
34
|
+
{
|
|
35
|
+
"aria-hidden": "true",
|
|
36
|
+
className: "pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 size-5 fill-gray-500"
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
] }) }),
|
|
40
|
+
/* @__PURE__ */ r("div", { className: "hidden sm:block", children: /* @__PURE__ */ r(
|
|
41
|
+
w,
|
|
42
|
+
{
|
|
43
|
+
className: i(
|
|
44
|
+
"border-b border-gray-200 -mb-px flex space-x-8 w-full justify-center",
|
|
45
|
+
b
|
|
46
|
+
),
|
|
47
|
+
children: a.map((e) => /* @__PURE__ */ r(N, { disabled: e.disabled, as: P, children: ({ selected: t }) => /* @__PURE__ */ r(
|
|
48
|
+
"a",
|
|
49
|
+
{
|
|
50
|
+
href: e.href || "#",
|
|
51
|
+
className: i(
|
|
52
|
+
t ? "border-primary-500 text-primary-600" : "border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",
|
|
53
|
+
e.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
54
|
+
"border-b-2 px-4 py-4 text-sm font-medium whitespace-nowrap min-w-[100px] text-center outline-none focus-visible:outline-2 focus-visible:outline-primary-600",
|
|
55
|
+
f
|
|
56
|
+
),
|
|
57
|
+
"aria-disabled": e.disabled,
|
|
58
|
+
children: e.name
|
|
59
|
+
}
|
|
60
|
+
) }, e.id))
|
|
61
|
+
}
|
|
62
|
+
) }),
|
|
63
|
+
n && /* @__PURE__ */ r(T, { className: "mt-4", children: n })
|
|
64
|
+
] }) });
|
|
65
|
+
}, G = ({ children: a, className: n, ...o }) => /* @__PURE__ */ r(y, { className: n, ...o, children: a });
|
|
66
|
+
export {
|
|
67
|
+
G as TabPanel,
|
|
68
|
+
F as Tabs
|
|
69
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
export type ToastType = "success" | "error" | "warning" | "info";
|
|
3
|
+
export type ToastPosition = "top-right" | "top-left" | "bottom-right" | "bottom-left" | "top-center" | "bottom-center";
|
|
4
|
+
export interface ToastProps extends ComponentProps<"div"> {
|
|
5
|
+
id: string;
|
|
6
|
+
type: ToastType;
|
|
7
|
+
title: string;
|
|
8
|
+
message?: string;
|
|
9
|
+
duration?: number;
|
|
10
|
+
onClose: (id: string) => void;
|
|
11
|
+
show: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Toast component for displaying notifications.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <Toast
|
|
19
|
+
* id="toast-1"
|
|
20
|
+
* type="success"
|
|
21
|
+
* title="Operation successful"
|
|
22
|
+
* message="Your changes have been saved"
|
|
23
|
+
* show={true}
|
|
24
|
+
* onClose={(id) => removeToast(id)}
|
|
25
|
+
* />
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function Toast({ id, type, title, message, duration, onClose, show, className, ...props }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { Transition as v } from "@headlessui/react";
|
|
3
|
+
import { XMarkIcon as x } from "@heroicons/react/20/solid";
|
|
4
|
+
import { useState as p, useEffect as c, Fragment as b } from "react";
|
|
5
|
+
import { twMerge as d } from "tailwind-merge";
|
|
6
|
+
const N = {
|
|
7
|
+
success: "bg-success-50 border-success-200 text-success-800",
|
|
8
|
+
error: "bg-danger-50 border-danger-200 text-danger-800",
|
|
9
|
+
warning: "bg-warning-50 border-warning-200 text-warning-800",
|
|
10
|
+
info: "bg-blue-50 border-blue-200 text-blue-800"
|
|
11
|
+
}, y = {
|
|
12
|
+
success: "text-success-500",
|
|
13
|
+
error: "text-danger-500",
|
|
14
|
+
warning: "text-warning-500",
|
|
15
|
+
info: "text-blue-500"
|
|
16
|
+
}, z = {
|
|
17
|
+
success: /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ e(
|
|
18
|
+
"path",
|
|
19
|
+
{
|
|
20
|
+
fillRule: "evenodd",
|
|
21
|
+
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
|
|
22
|
+
clipRule: "evenodd"
|
|
23
|
+
}
|
|
24
|
+
) }),
|
|
25
|
+
error: /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ e(
|
|
26
|
+
"path",
|
|
27
|
+
{
|
|
28
|
+
fillRule: "evenodd",
|
|
29
|
+
d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",
|
|
30
|
+
clipRule: "evenodd"
|
|
31
|
+
}
|
|
32
|
+
) }),
|
|
33
|
+
warning: /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ e(
|
|
34
|
+
"path",
|
|
35
|
+
{
|
|
36
|
+
fillRule: "evenodd",
|
|
37
|
+
d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
|
|
38
|
+
clipRule: "evenodd"
|
|
39
|
+
}
|
|
40
|
+
) }),
|
|
41
|
+
info: /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ e(
|
|
42
|
+
"path",
|
|
43
|
+
{
|
|
44
|
+
fillRule: "evenodd",
|
|
45
|
+
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2h-1V9a1 1 0 00-1-1z",
|
|
46
|
+
clipRule: "evenodd"
|
|
47
|
+
}
|
|
48
|
+
) })
|
|
49
|
+
};
|
|
50
|
+
function T({
|
|
51
|
+
id: m,
|
|
52
|
+
type: r = "info",
|
|
53
|
+
title: u,
|
|
54
|
+
message: l,
|
|
55
|
+
duration: a = 5e3,
|
|
56
|
+
onClose: w,
|
|
57
|
+
show: s,
|
|
58
|
+
className: f,
|
|
59
|
+
...g
|
|
60
|
+
}) {
|
|
61
|
+
const [t, o] = p(s);
|
|
62
|
+
c(() => {
|
|
63
|
+
o(s);
|
|
64
|
+
}, [s]), c(() => {
|
|
65
|
+
if (!t || !a) return;
|
|
66
|
+
const h = setTimeout(() => {
|
|
67
|
+
i();
|
|
68
|
+
}, a);
|
|
69
|
+
return () => {
|
|
70
|
+
clearTimeout(h);
|
|
71
|
+
};
|
|
72
|
+
}, [t, a]);
|
|
73
|
+
const i = () => {
|
|
74
|
+
o(!1);
|
|
75
|
+
};
|
|
76
|
+
return /* @__PURE__ */ e(
|
|
77
|
+
v,
|
|
78
|
+
{
|
|
79
|
+
show: t,
|
|
80
|
+
as: b,
|
|
81
|
+
appear: !0,
|
|
82
|
+
enter: "transform ease-out duration-300 transition",
|
|
83
|
+
enterFrom: "translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",
|
|
84
|
+
enterTo: "translate-y-0 opacity-100 sm:translate-x-0",
|
|
85
|
+
leave: "transition ease-in duration-200",
|
|
86
|
+
leaveFrom: "opacity-100",
|
|
87
|
+
leaveTo: "opacity-0",
|
|
88
|
+
afterLeave: () => w(m),
|
|
89
|
+
children: /* @__PURE__ */ e(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
className: d(
|
|
93
|
+
"w-full min-w-[300px] max-w-md shadow-lg rounded-lg pointer-events-auto border",
|
|
94
|
+
N[r],
|
|
95
|
+
f
|
|
96
|
+
),
|
|
97
|
+
role: "alert",
|
|
98
|
+
"aria-live": "assertive",
|
|
99
|
+
"aria-atomic": "true",
|
|
100
|
+
...g,
|
|
101
|
+
children: /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ n("div", { className: "flex items-start", children: [
|
|
102
|
+
/* @__PURE__ */ e("div", { className: d("flex-shrink-0", y[r]), children: z[r] }),
|
|
103
|
+
/* @__PURE__ */ n("div", { className: "ml-3 flex-1 mr-2", children: [
|
|
104
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-medium break-words", children: u }),
|
|
105
|
+
l && /* @__PURE__ */ e("p", { className: "mt-1 text-sm opacity-90 break-words", children: l })
|
|
106
|
+
] }),
|
|
107
|
+
/* @__PURE__ */ e("div", { className: "flex-shrink-0 flex", children: /* @__PURE__ */ n(
|
|
108
|
+
"button",
|
|
109
|
+
{
|
|
110
|
+
type: "button",
|
|
111
|
+
className: "bg-transparent rounded-md inline-flex text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",
|
|
112
|
+
onClick: i,
|
|
113
|
+
"aria-label": "Close notification",
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Close" }),
|
|
116
|
+
/* @__PURE__ */ e(x, { className: "h-5 w-5", "aria-hidden": "true" })
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
) })
|
|
120
|
+
] }) })
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
export {
|
|
127
|
+
T as Toast
|
|
128
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ToastPosition } from "./Toast.js";
|
|
3
|
+
export interface ToastContainerProps {
|
|
4
|
+
/**
|
|
5
|
+
* Where to display the toasts on the screen
|
|
6
|
+
*/
|
|
7
|
+
position?: ToastPosition;
|
|
8
|
+
/**
|
|
9
|
+
* CSS class for the container
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Children elements (toast notifications)
|
|
14
|
+
*/
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Container component for toast notifications.
|
|
19
|
+
* Use to position and organize toast notifications on the screen.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* <ToastContainer position="top-right">
|
|
24
|
+
* <Toast id="toast-1" type="success" title="Success!" show={true} onClose={() => {}} />
|
|
25
|
+
* <Toast id="toast-2" type="error" title="Error!" show={true} onClose={() => {}} />
|
|
26
|
+
* </ToastContainer>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function ToastContainer({ position, className, children }: ToastContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { twMerge as i } from "tailwind-merge";
|
|
3
|
+
const n = {
|
|
4
|
+
"top-right": "top-0 right-0",
|
|
5
|
+
"top-left": "top-0 left-0",
|
|
6
|
+
"bottom-right": "bottom-0 right-0",
|
|
7
|
+
"bottom-left": "bottom-0 left-0",
|
|
8
|
+
"top-center": "top-0 left-1/2 -translate-x-1/2",
|
|
9
|
+
"bottom-center": "bottom-0 left-1/2 -translate-x-1/2"
|
|
10
|
+
};
|
|
11
|
+
function p({ position: t = "top-right", className: o, children: e }) {
|
|
12
|
+
return /* @__PURE__ */ r(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
"data-testid": "toast-container",
|
|
16
|
+
className: i(
|
|
17
|
+
"fixed z-50 p-4 flex flex-col space-y-4 pointer-events-none max-h-screen overflow-hidden",
|
|
18
|
+
n[t],
|
|
19
|
+
o
|
|
20
|
+
),
|
|
21
|
+
"aria-live": "polite",
|
|
22
|
+
children: e
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
p as ToastContainer
|
|
28
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ToastPosition, ToastType } from "./Toast.js";
|
|
3
|
+
export interface ToastItem {
|
|
4
|
+
id: string;
|
|
5
|
+
type: ToastType;
|
|
6
|
+
title: string;
|
|
7
|
+
message?: string;
|
|
8
|
+
duration?: number;
|
|
9
|
+
show: boolean;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
}
|
|
12
|
+
interface ToastContextValue {
|
|
13
|
+
toasts: ToastItem[];
|
|
14
|
+
addToast: (toast: Omit<ToastItem, "id" | "show">) => string;
|
|
15
|
+
updateToast: (id: string, toast: Partial<Omit<ToastItem, "id">>) => void;
|
|
16
|
+
removeToast: (id: string) => void;
|
|
17
|
+
clearAllToasts: () => void;
|
|
18
|
+
}
|
|
19
|
+
export interface ToastProviderProps {
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
defaultDuration?: number;
|
|
22
|
+
maxToasts?: number;
|
|
23
|
+
position?: ToastPosition;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Provider component that manages toast notifications.
|
|
27
|
+
* Use with the useToast hook to add, remove, and manage toasts.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* // In your app root component:
|
|
32
|
+
* <ToastProvider>
|
|
33
|
+
* <App />
|
|
34
|
+
* </ToastProvider>
|
|
35
|
+
*
|
|
36
|
+
* // In any component:
|
|
37
|
+
* const { addToast } = useToast();
|
|
38
|
+
*
|
|
39
|
+
* // Show a success notification
|
|
40
|
+
* addToast({
|
|
41
|
+
* type: "success",
|
|
42
|
+
* title: "Success!",
|
|
43
|
+
* message: "Operation completed successfully",
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare function ToastProvider({ children, defaultDuration, maxToasts, position, }: ToastProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
/**
|
|
49
|
+
* Hook to access the toast context.
|
|
50
|
+
* Returns methods for adding, removing, and managing toasts.
|
|
51
|
+
*
|
|
52
|
+
* @returns ToastContextValue
|
|
53
|
+
*/
|
|
54
|
+
export declare function useToast(): ToastContextValue;
|
|
55
|
+
/**
|
|
56
|
+
* Hook to show success toasts.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* const success = useSuccessToast();
|
|
61
|
+
*
|
|
62
|
+
* // Show a success toast
|
|
63
|
+
* success("Operation successful", "Your changes have been saved");
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export declare function useSuccessToast(): (title: string, message?: string, options?: Omit<ToastItem, "id" | "show" | "type" | "title" | "message">) => string;
|
|
67
|
+
/**
|
|
68
|
+
* Hook to show error toasts.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```tsx
|
|
72
|
+
* const error = useErrorToast();
|
|
73
|
+
*
|
|
74
|
+
* // Show an error toast
|
|
75
|
+
* error("Error", "Something went wrong");
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
export declare function useErrorToast(): (title: string, message?: string, options?: Omit<ToastItem, "id" | "show" | "type" | "title" | "message">) => string;
|
|
79
|
+
/**
|
|
80
|
+
* Hook to show warning toasts.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```tsx
|
|
84
|
+
* const warning = useWarningToast();
|
|
85
|
+
*
|
|
86
|
+
* // Show a warning toast
|
|
87
|
+
* warning("Warning", "This action cannot be undone");
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
export declare function useWarningToast(): (title: string, message?: string, options?: Omit<ToastItem, "id" | "show" | "type" | "title" | "message">) => string;
|
|
91
|
+
/**
|
|
92
|
+
* Hook to show info toasts.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```tsx
|
|
96
|
+
* const info = useInfoToast();
|
|
97
|
+
*
|
|
98
|
+
* // Show an info toast
|
|
99
|
+
* info("Information", "Your session will expire in 5 minutes");
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
export declare function useInfoToast(): (title: string, message?: string, options?: Omit<ToastItem, "id" | "show" | "type" | "title" | "message">) => string;
|
|
103
|
+
export {};
|