@redocly/theme 0.70.0-next.1 → 0.70.0-next.11
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/lib/components/Buttons/ConnectMCPButton.js +19 -14
- package/lib/components/Buttons/variables.d.ts +1 -0
- package/lib/components/Buttons/variables.js +4 -1
- package/lib/components/Catalog/Catalog.js +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +30 -11
- package/lib/components/Catalog/CatalogFilter/CatalogFilterDateRange.js +2 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.js +1 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.js +2 -2
- package/lib/components/CodeBlock/CodeBlockControls.js +3 -5
- package/lib/components/Consent/Consent.d.ts +2 -0
- package/lib/components/Consent/Consent.js +17 -0
- package/lib/components/Consent/ConsentBanner.d.ts +2 -0
- package/lib/components/Consent/ConsentBanner.js +120 -0
- package/lib/components/Consent/ConsentDialog.d.ts +2 -0
- package/lib/components/Consent/ConsentDialog.js +128 -0
- package/lib/components/Consent/ConsentSettingsLink.d.ts +2 -0
- package/lib/components/Consent/ConsentSettingsLink.js +35 -0
- package/lib/components/Consent/variables.d.ts +1 -0
- package/lib/components/Consent/variables.js +31 -0
- package/lib/components/Dropdown/Dropdown.d.ts +4 -2
- package/lib/components/Dropdown/Dropdown.js +31 -9
- package/lib/components/Dropdown/DropdownMenu.d.ts +1 -0
- package/lib/components/Dropdown/DropdownMenu.js +1 -1
- package/lib/components/Feedback/Reasons.js +3 -2
- package/lib/components/Filter/FilterCheckboxes.js +30 -11
- package/lib/components/Filter/FilterDateRange.js +36 -2
- package/lib/components/Footer/Footer.js +4 -1
- package/lib/components/Image/Image.js +24 -4
- package/lib/components/JsonViewer/Helpers.d.ts +10 -2
- package/lib/components/JsonViewer/Helpers.js +32 -36
- package/lib/components/JsonViewer/JsonViewer.js +15 -18
- package/lib/components/LoadProgressBar/LoadProgressBar.d.ts +8 -0
- package/lib/components/LoadProgressBar/LoadProgressBar.js +122 -0
- package/lib/components/MCP/McpConnectionTabs.js +9 -2
- package/lib/components/Markdown/Markdown.js +3 -2
- package/lib/components/Markdown/styles/base-table.js +14 -1
- package/lib/components/Markdown/variables.js +1 -0
- package/lib/components/Menu/Menu.js +4 -0
- package/lib/components/Menu/MenuSelect.d.ts +7 -0
- package/lib/components/Menu/MenuSelect.js +129 -0
- package/lib/components/Menu/variables.js +43 -4
- package/lib/components/Navbar/Navbar.js +44 -5
- package/lib/components/Navbar/variables.js +3 -0
- package/lib/components/NavigationTabs/NavigationTab.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTab.js +93 -0
- package/lib/components/NavigationTabs/NavigationTabContent.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTabContent.js +50 -0
- package/lib/components/NavigationTabs/NavigationTabMenu.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTabMenu.js +18 -0
- package/lib/components/NavigationTabs/NavigationTabs.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTabs.js +97 -0
- package/lib/components/NavigationTabs/variables.d.ts +1 -0
- package/lib/components/NavigationTabs/variables.js +37 -0
- package/lib/components/Portal/Portal.js +37 -5
- package/lib/components/Product/utils.js +1 -1
- package/lib/components/Search/SearchAiActionButtons.js +8 -3
- package/lib/components/Search/SearchAiActivity.d.ts +10 -0
- package/lib/components/Search/SearchAiActivity.js +278 -0
- package/lib/components/Search/SearchAiConversationInput.js +10 -6
- package/lib/components/Search/SearchAiDialog.js +13 -2
- package/lib/components/Search/SearchAiMessage.d.ts +2 -1
- package/lib/components/Search/SearchAiMessage.js +21 -109
- package/lib/components/Search/SearchAiResponse.js +1 -0
- package/lib/components/Search/SearchDialog.js +10 -0
- package/lib/components/Search/SearchItem.js +11 -10
- package/lib/components/Search/SearchTrigger.js +37 -6
- package/lib/components/Search/variables.js +17 -2
- package/lib/components/Segmented/Segmented.js +23 -3
- package/lib/components/Select/Select.js +10 -3
- package/lib/components/Select/SelectInput.d.ts +1 -0
- package/lib/components/Select/SelectInput.js +5 -11
- package/lib/components/Sidebar/Sidebar.js +2 -2
- package/lib/components/SplitButton/SplitButton.js +37 -3
- package/lib/components/TableOfContent/TableOfContent.js +2 -2
- package/lib/core/constants/common.d.ts +1 -0
- package/lib/core/constants/common.js +1 -0
- package/lib/core/constants/consent.d.ts +2 -0
- package/lib/core/constants/consent.js +30 -0
- package/lib/core/constants/index.d.ts +2 -0
- package/lib/core/constants/index.js +2 -0
- package/lib/core/constants/mcp.d.ts +2 -2
- package/lib/core/constants/mcp.js +3 -8
- package/lib/core/constants/prompt.d.ts +9 -0
- package/lib/core/constants/prompt.js +33 -0
- package/lib/core/constants/search.d.ts +1 -1
- package/lib/core/constants/search.js +6 -2
- package/lib/core/contexts/PortalContainerContext.d.ts +2 -0
- package/lib/core/contexts/PortalContainerContext.js +7 -0
- package/lib/core/hooks/code-walkthrough/use-code-panel.d.ts +1 -1
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-controls.d.ts +1 -1
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-controls.js +1 -1
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.d.ts +1 -1
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough.d.ts +1 -2
- package/lib/core/hooks/code-walkthrough/use-renderable-files.d.ts +1 -1
- package/lib/core/hooks/index.d.ts +9 -0
- package/lib/core/hooks/index.js +9 -0
- package/lib/core/hooks/menu/use-collapse.js +1 -1
- package/lib/core/hooks/menu/use-mobile-menu-items.js +75 -51
- package/lib/core/hooks/menu/use-mobile-menu-levels.js +12 -7
- package/lib/core/hooks/prompt/use-prompt-actions.d.ts +7 -0
- package/lib/core/hooks/prompt/use-prompt-actions.js +19 -0
- package/lib/core/hooks/prompt/use-prompt-text-limit.d.ts +19 -0
- package/lib/core/hooks/prompt/use-prompt-text-limit.js +35 -0
- package/lib/core/hooks/search/use-persisted-quick-filter.d.ts +21 -0
- package/lib/core/hooks/search/use-persisted-quick-filter.js +92 -0
- package/lib/core/hooks/search/use-search-ai-activity.d.ts +11 -0
- package/lib/core/hooks/search/use-search-ai-activity.js +15 -0
- package/lib/core/hooks/use-connect-mcp-button.js +3 -1
- package/lib/core/hooks/use-consent-dialog.d.ts +12 -0
- package/lib/core/hooks/use-consent-dialog.js +36 -0
- package/lib/core/hooks/use-consent-telemetry.d.ts +1 -0
- package/lib/core/hooks/use-consent-telemetry.js +42 -0
- package/lib/core/hooks/use-dialog-hotkeys.js +4 -2
- package/lib/core/hooks/use-full-height.d.ts +1 -1
- package/lib/core/hooks/use-full-height.js +8 -8
- package/lib/core/hooks/use-page-actions.d.ts +1 -1
- package/lib/core/hooks/use-page-actions.js +10 -8
- package/lib/core/hooks/use-pointer-border-highlight.d.ts +7 -0
- package/lib/core/hooks/use-pointer-border-highlight.js +29 -0
- package/lib/core/hooks/use-scroll-item-into-view.d.ts +2 -0
- package/lib/core/hooks/use-scroll-item-into-view.js +16 -0
- package/lib/core/hooks/use-tab-list.d.ts +31 -0
- package/lib/core/hooks/use-tab-list.js +49 -0
- package/lib/core/hooks/use-telemetry-fallback.d.ts +2 -0
- package/lib/core/hooks/use-telemetry-fallback.js +2 -0
- package/lib/core/hooks/use-theme-hooks.js +16 -0
- package/lib/core/styles/dark.js +14 -12
- package/lib/core/styles/global.d.ts +2 -0
- package/lib/core/styles/global.js +115 -136
- package/lib/core/styles/index.d.ts +1 -0
- package/lib/core/styles/index.js +3 -1
- package/lib/core/styles/search-ai-appear.d.ts +1 -0
- package/lib/core/styles/search-ai-appear.js +18 -0
- package/lib/core/types/code-walkthrough.d.ts +84 -0
- package/lib/core/types/consent.d.ts +54 -0
- package/lib/core/types/consent.js +3 -0
- package/lib/core/types/dropdown.d.ts +1 -0
- package/lib/core/types/dropdown.js +3 -0
- package/lib/core/types/hooks.d.ts +8 -1
- package/lib/core/types/index.d.ts +4 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/mcp.d.ts +3 -2
- package/lib/core/types/navigation-tabs.d.ts +49 -0
- package/lib/core/types/navigation-tabs.js +3 -0
- package/lib/core/types/prompt.d.ts +9 -0
- package/lib/core/types/prompt.js +3 -0
- package/lib/core/types/search.d.ts +25 -0
- package/lib/core/utils/Dynamic.d.ts +8 -1
- package/lib/core/utils/Dynamic.js +34 -3
- package/lib/core/utils/assign-ref.d.ts +2 -0
- package/lib/core/utils/assign-ref.js +12 -0
- package/lib/core/utils/consent-settings-link-placement.d.ts +3 -0
- package/lib/core/utils/consent-settings-link-placement.js +15 -0
- package/lib/core/utils/content-segments.d.ts +12 -1
- package/lib/core/utils/content-segments.js +90 -5
- package/lib/core/utils/download-code-walkthrough.d.ts +1 -1
- package/lib/core/utils/dropdown.d.ts +2 -0
- package/lib/core/utils/dropdown.js +12 -0
- package/lib/core/utils/get-ai-prompt-link.d.ts +15 -0
- package/lib/core/utils/get-ai-prompt-link.js +29 -0
- package/lib/core/utils/get-code-walkthrough-file-text.d.ts +1 -1
- package/lib/core/utils/index.d.ts +5 -0
- package/lib/core/utils/index.js +5 -0
- package/lib/core/utils/match-code-walkthrough-conditions.d.ts +1 -1
- package/lib/core/utils/mcp.d.ts +2 -1
- package/lib/core/utils/mcp.js +13 -3
- package/lib/core/utils/menu.d.ts +4 -0
- package/lib/core/utils/menu.js +48 -8
- package/lib/core/utils/navigation-tabs.d.ts +8 -0
- package/lib/core/utils/navigation-tabs.js +71 -0
- package/lib/core/utils/search-ai-activity.d.ts +4 -0
- package/lib/core/utils/search-ai-activity.js +83 -0
- package/lib/core/utils/urls.js +3 -1
- package/lib/core/utils/with-load-progress.d.ts +3 -0
- package/lib/core/utils/with-load-progress.js +24 -19
- package/lib/ext/configure.d.ts +1 -1
- package/lib/ext/configure.js +0 -1
- package/lib/icons/ExpandCollapseIcon/ExpandCollapseIcon.d.ts +29 -0
- package/lib/icons/ExpandCollapseIcon/ExpandCollapseIcon.js +81 -0
- package/lib/icons/LinkIcon/LinkIconSymbol.d.ts +12 -0
- package/lib/icons/LinkIcon/LinkIconSymbol.js +41 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +9 -1
- package/lib/layouts/PageLayout.js +1 -1
- package/lib/layouts/RootLayout.js +2 -2
- package/lib/markdoc/components/CodeWalkthrough/CodeFilters.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeFilters.js +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanel.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanel.js +3 -3
- package/lib/markdoc/components/CodeWalkthrough/CodePanelHeader.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanelToolbar.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeStep.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.js +1 -1
- package/lib/markdoc/components/Prompt/Prompt.d.ts +15 -0
- package/lib/markdoc/components/Prompt/Prompt.js +163 -0
- package/lib/markdoc/components/Prompt/PromptActions.d.ts +13 -0
- package/lib/markdoc/components/Prompt/PromptActions.js +43 -0
- package/lib/markdoc/components/Prompt/PromptBody.d.ts +14 -0
- package/lib/markdoc/components/Prompt/PromptBody.js +99 -0
- package/lib/markdoc/components/Prompt/PromptCopyButton.d.ts +10 -0
- package/lib/markdoc/components/Prompt/PromptCopyButton.js +28 -0
- package/lib/markdoc/components/Prompt/PromptHeader.d.ts +9 -0
- package/lib/markdoc/components/Prompt/PromptHeader.js +57 -0
- package/lib/markdoc/components/Prompt/PromptShowHideButton.d.ts +7 -0
- package/lib/markdoc/components/Prompt/PromptShowHideButton.js +21 -0
- package/lib/markdoc/components/Prompt/PromptToggleLabel.d.ts +7 -0
- package/lib/markdoc/components/Prompt/PromptToggleLabel.js +28 -0
- package/lib/markdoc/components/Prompt/variables.d.ts +1 -0
- package/lib/markdoc/components/Prompt/variables.dark.d.ts +1 -0
- package/lib/markdoc/components/Prompt/variables.dark.js +8 -0
- package/lib/markdoc/components/Prompt/variables.js +44 -0
- package/lib/markdoc/components/Tabs/TabList.js +8 -6
- package/lib/markdoc/components/default.d.ts +1 -0
- package/lib/markdoc/components/default.js +1 -0
- package/lib/markdoc/default.d.ts +2 -0
- package/lib/markdoc/default.js +2 -0
- package/lib/markdoc/tags/code-walkthrough.d.ts +1 -1
- package/lib/markdoc/tags/connect-mcp.js +15 -0
- package/lib/markdoc/tags/prompt.d.ts +2 -0
- package/lib/markdoc/tags/prompt.js +56 -0
- package/package.json +4 -8
- package/src/components/Buttons/ConnectMCPButton.tsx +21 -16
- package/src/components/Buttons/variables.ts +4 -0
- package/src/components/Catalog/Catalog.tsx +6 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.tsx +3 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +2 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -1
- package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +37 -22
- package/src/components/Catalog/CatalogFilter/CatalogFilterDateRange.tsx +3 -2
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.tsx +1 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.tsx +2 -2
- package/src/components/CodeBlock/CodeBlockControls.tsx +4 -7
- package/src/components/Consent/Consent.tsx +18 -0
- package/src/components/Consent/ConsentBanner.tsx +110 -0
- package/src/components/Consent/ConsentDialog.tsx +210 -0
- package/src/components/Consent/ConsentSettingsLink.tsx +44 -0
- package/src/components/Consent/variables.ts +28 -0
- package/src/components/Dropdown/Dropdown.tsx +32 -7
- package/src/components/Dropdown/DropdownMenu.tsx +7 -1
- package/src/components/Feedback/Reasons.tsx +3 -2
- package/src/components/Filter/FilterCheckboxes.tsx +33 -18
- package/src/components/Filter/FilterDateRange.tsx +3 -2
- package/src/components/Footer/Footer.tsx +2 -0
- package/src/components/Image/Image.tsx +26 -5
- package/src/components/JsonViewer/Helpers.tsx +51 -54
- package/src/components/JsonViewer/JsonViewer.tsx +23 -25
- package/src/components/LoadProgressBar/LoadProgressBar.tsx +113 -0
- package/src/components/MCP/McpConnectionTabs.tsx +22 -5
- package/src/components/Markdown/Markdown.tsx +3 -2
- package/src/components/Markdown/styles/base-table.ts +14 -1
- package/src/components/Markdown/variables.ts +1 -0
- package/src/components/Menu/Menu.tsx +5 -0
- package/src/components/Menu/MenuSelect.tsx +198 -0
- package/src/components/Menu/variables.ts +43 -4
- package/src/components/Navbar/Navbar.tsx +22 -5
- package/src/components/Navbar/variables.ts +3 -0
- package/src/components/NavigationTabs/NavigationTab.tsx +148 -0
- package/src/components/NavigationTabs/NavigationTabContent.tsx +66 -0
- package/src/components/NavigationTabs/NavigationTabMenu.tsx +40 -0
- package/src/components/NavigationTabs/NavigationTabs.tsx +83 -0
- package/src/components/NavigationTabs/variables.ts +34 -0
- package/src/components/Portal/Portal.tsx +4 -2
- package/src/components/Product/utils.ts +1 -1
- package/src/components/Search/SearchAiActionButtons.tsx +31 -19
- package/src/components/Search/SearchAiActivity.tsx +318 -0
- package/src/components/Search/SearchAiConversationInput.tsx +13 -7
- package/src/components/Search/SearchAiDialog.tsx +20 -4
- package/src/components/Search/SearchAiMessage.tsx +28 -136
- package/src/components/Search/SearchAiResponse.tsx +1 -0
- package/src/components/Search/SearchDialog.tsx +11 -0
- package/src/components/Search/SearchItem.tsx +19 -10
- package/src/components/Search/SearchTrigger.tsx +47 -3
- package/src/components/Search/variables.ts +17 -2
- package/src/components/Segmented/Segmented.tsx +25 -16
- package/src/components/Select/Select.tsx +12 -6
- package/src/components/Select/SelectInput.tsx +10 -18
- package/src/components/Sidebar/Sidebar.tsx +2 -2
- package/src/components/SplitButton/SplitButton.tsx +8 -2
- package/src/components/TableOfContent/TableOfContent.tsx +2 -2
- package/src/core/constants/common.ts +1 -0
- package/src/core/constants/consent.ts +29 -0
- package/src/core/constants/index.ts +2 -0
- package/src/core/constants/mcp.ts +3 -9
- package/src/core/constants/prompt.ts +34 -0
- package/src/core/constants/search.ts +6 -2
- package/src/core/contexts/PortalContainerContext.tsx +4 -0
- package/src/core/hooks/__mocks__/index.ts +5 -0
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +20 -0
- package/src/core/hooks/code-walkthrough/__mocks__/MockIntersectionObserver.ts +1 -2
- package/src/core/hooks/code-walkthrough/__mocks__/mock-intersection-observer.ts +1 -2
- package/src/core/hooks/code-walkthrough/use-code-panel.ts +1 -1
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-controls.ts +2 -2
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-steps.ts +1 -1
- package/src/core/hooks/code-walkthrough/use-code-walkthrough.ts +3 -3
- package/src/core/hooks/code-walkthrough/use-renderable-files.ts +1 -1
- package/src/core/hooks/index.ts +9 -0
- package/src/core/hooks/menu/use-collapse.ts +1 -1
- package/src/core/hooks/menu/use-mobile-menu-items.ts +91 -56
- package/src/core/hooks/menu/use-mobile-menu-levels.ts +14 -6
- package/src/core/hooks/prompt/use-prompt-actions.ts +28 -0
- package/src/core/hooks/prompt/use-prompt-text-limit.ts +59 -0
- package/src/core/hooks/search/use-persisted-quick-filter.ts +125 -0
- package/src/core/hooks/search/use-search-ai-activity.ts +31 -0
- package/src/core/hooks/use-connect-mcp-button.ts +13 -2
- package/src/core/hooks/use-consent-dialog.ts +51 -0
- package/src/core/hooks/use-consent-telemetry.ts +56 -0
- package/src/core/hooks/use-dialog-hotkeys.ts +11 -5
- package/src/core/hooks/use-full-height.ts +8 -8
- package/src/core/hooks/use-page-actions.ts +21 -9
- package/src/core/hooks/use-pointer-border-highlight.ts +46 -0
- package/src/core/hooks/use-scroll-item-into-view.ts +18 -0
- package/src/core/hooks/use-tab-list.ts +63 -0
- package/src/core/hooks/use-telemetry-fallback.ts +2 -0
- package/src/core/hooks/use-theme-hooks.ts +16 -0
- package/src/core/styles/dark.ts +2 -0
- package/src/core/styles/global.ts +96 -116
- package/src/core/styles/index.ts +2 -1
- package/src/core/styles/search-ai-appear.ts +16 -0
- package/src/core/types/code-walkthrough.ts +103 -0
- package/src/core/types/consent.ts +51 -0
- package/src/core/types/dropdown.ts +1 -0
- package/src/core/types/hooks.ts +8 -0
- package/src/core/types/index.ts +4 -0
- package/src/core/types/l10n.ts +46 -2
- package/src/core/types/mcp.ts +4 -2
- package/src/core/types/navigation-tabs.ts +54 -0
- package/src/core/types/prompt.ts +11 -0
- package/src/core/types/search.ts +23 -0
- package/src/core/utils/Dynamic.tsx +67 -35
- package/src/core/utils/assign-ref.ts +9 -0
- package/src/core/utils/consent-settings-link-placement.ts +18 -0
- package/src/core/utils/content-segments.ts +98 -6
- package/src/core/utils/download-code-walkthrough.ts +1 -1
- package/src/core/utils/dropdown.ts +14 -0
- package/src/core/utils/get-ai-prompt-link.ts +30 -0
- package/src/core/utils/get-code-walkthrough-file-text.ts +1 -1
- package/src/core/utils/index.ts +5 -0
- package/src/core/utils/match-code-walkthrough-conditions.ts +1 -1
- package/src/core/utils/mcp.ts +16 -4
- package/src/core/utils/menu.ts +54 -9
- package/src/core/utils/navigation-tabs.ts +99 -0
- package/src/core/utils/search-ai-activity.ts +110 -0
- package/src/core/utils/urls.ts +3 -1
- package/src/core/utils/with-load-progress.ts +23 -18
- package/src/ext/configure.ts +1 -1
- package/src/icons/CheckboxIcon/CheckboxIcon.tsx +1 -0
- package/src/icons/ChevronSortIcon/ChevronSortIcon.tsx +1 -0
- package/src/icons/ExpandCollapseIcon/ExpandCollapseIcon.tsx +56 -0
- package/src/icons/LinkIcon/LinkIconSymbol.tsx +51 -0
- package/src/index.ts +8 -0
- package/src/layouts/PageLayout.tsx +1 -1
- package/src/layouts/RootLayout.tsx +2 -2
- package/src/markdoc/components/CodeWalkthrough/CodeFilters.tsx +2 -2
- package/src/markdoc/components/CodeWalkthrough/CodePanel.tsx +4 -4
- package/src/markdoc/components/CodeWalkthrough/CodePanelHeader.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/CodePanelToolbar.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/CodeStep.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/CodeWalkthrough.tsx +2 -2
- package/src/markdoc/components/Prompt/Prompt.tsx +219 -0
- package/src/markdoc/components/Prompt/PromptActions.tsx +104 -0
- package/src/markdoc/components/Prompt/PromptBody.tsx +107 -0
- package/src/markdoc/components/Prompt/PromptCopyButton.tsx +73 -0
- package/src/markdoc/components/Prompt/PromptHeader.tsx +81 -0
- package/src/markdoc/components/Prompt/PromptShowHideButton.tsx +43 -0
- package/src/markdoc/components/Prompt/PromptToggleLabel.tsx +41 -0
- package/src/markdoc/components/Prompt/variables.dark.ts +5 -0
- package/src/markdoc/components/Prompt/variables.ts +41 -0
- package/src/markdoc/components/Tabs/TabList.tsx +9 -12
- package/src/markdoc/components/default.ts +1 -0
- package/src/markdoc/default.ts +2 -0
- package/src/markdoc/tags/code-walkthrough.ts +1 -1
- package/src/markdoc/tags/connect-mcp.ts +16 -1
- package/src/markdoc/tags/prompt.ts +58 -0
|
@@ -19,55 +19,57 @@ const CopyIcon_1 = require("../../icons/CopyIcon/CopyIcon");
|
|
|
19
19
|
const CheckmarkFilledIcon_1 = require("../../icons/CheckmarkFilledIcon/CheckmarkFilledIcon");
|
|
20
20
|
const hooks_1 = require("../../core/hooks");
|
|
21
21
|
const constants_1 = require("../../core/constants");
|
|
22
|
-
const MENU_OPTIONS =
|
|
23
|
-
{
|
|
24
|
-
key: 'cursor',
|
|
22
|
+
const MENU_OPTIONS = {
|
|
23
|
+
cursor: {
|
|
25
24
|
icon: CursorIcon_1.CursorIcon,
|
|
26
25
|
titleTranslationKey: 'page.actions.connectMcp.cursor',
|
|
27
26
|
titleDefault: 'Connect to Cursor',
|
|
28
27
|
descriptionTranslationKey: 'page.actions.connectMcp.cursorDescription',
|
|
29
28
|
descriptionDefault: 'Install MCP server on Cursor',
|
|
30
29
|
},
|
|
31
|
-
{
|
|
32
|
-
key: 'vscode',
|
|
30
|
+
vscode: {
|
|
33
31
|
icon: VSCodeIcon_1.VSCodeIcon,
|
|
34
32
|
titleTranslationKey: 'page.actions.connectMcp.vscode',
|
|
35
33
|
titleDefault: 'Connect to VS Code',
|
|
36
34
|
descriptionTranslationKey: 'page.actions.connectMcp.vscodeDescription',
|
|
37
35
|
descriptionDefault: 'Install MCP server on VS Code',
|
|
38
36
|
},
|
|
39
|
-
{
|
|
40
|
-
|
|
37
|
+
claude: {
|
|
38
|
+
icon: ClaudeIcon_1.ClaudeIcon,
|
|
39
|
+
titleTranslationKey: 'page.actions.connectMcp.claude',
|
|
40
|
+
titleDefault: 'Connect to Claude',
|
|
41
|
+
descriptionTranslationKey: 'page.actions.connectMcp.claudeDescription',
|
|
42
|
+
descriptionDefault: 'Add MCP server to your Claude account',
|
|
43
|
+
},
|
|
44
|
+
'claude-code': {
|
|
41
45
|
icon: ClaudeIcon_1.ClaudeIcon,
|
|
42
46
|
titleTranslationKey: 'page.actions.connectMcp.claudeCode',
|
|
43
47
|
titleDefault: 'Connect to Claude Code',
|
|
44
48
|
descriptionTranslationKey: 'page.actions.connectMcp.claudeCodeDescription',
|
|
45
49
|
descriptionDefault: 'Copy the Claude Code CLI command',
|
|
46
50
|
},
|
|
47
|
-
{
|
|
48
|
-
key: 'codex',
|
|
51
|
+
codex: {
|
|
49
52
|
icon: CodexIcon_1.CodexIcon,
|
|
50
53
|
titleTranslationKey: 'page.actions.connectMcp.codex',
|
|
51
54
|
titleDefault: 'Connect to Codex CLI',
|
|
52
55
|
descriptionTranslationKey: 'page.actions.connectMcp.codexDescription',
|
|
53
56
|
descriptionDefault: 'Copy the Codex CLI command',
|
|
54
57
|
},
|
|
55
|
-
{
|
|
56
|
-
key: 'copy',
|
|
58
|
+
copy: {
|
|
57
59
|
icon: CopyIcon_1.CopyIcon,
|
|
58
60
|
titleTranslationKey: 'page.actions.connectMcp.copyConfig',
|
|
59
61
|
titleDefault: 'Copy MCP Configuration',
|
|
60
62
|
descriptionTranslationKey: 'page.actions.connectMcp.copyConfigDescription',
|
|
61
63
|
descriptionDefault: 'Copy MCP JSON Configuration',
|
|
62
64
|
},
|
|
63
|
-
|
|
65
|
+
};
|
|
64
66
|
// Copy actions keep the dropdown open so the copied checkmark is visible.
|
|
65
67
|
const COPY_OPTIONS = ['claude-code', 'codex', 'copy'];
|
|
66
68
|
function ConnectMCPButton({ placement = 'bottom', alignment = 'end', options = constants_1.DEFAULT_MCP_OPTIONS, }) {
|
|
67
69
|
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
68
70
|
const { translate } = useTranslate();
|
|
69
71
|
const { copiedOption, visibleOptions, handleAction } = (0, hooks_1.useConnectMCPButton)({ options });
|
|
70
|
-
const menuOptions =
|
|
72
|
+
const menuOptions = visibleOptions.map((key) => (Object.assign({ key }, MENU_OPTIONS[key])));
|
|
71
73
|
const primaryOption = menuOptions[0];
|
|
72
74
|
const dropdownOptions = menuOptions.slice(1);
|
|
73
75
|
if (!primaryOption)
|
|
@@ -75,7 +77,7 @@ function ConnectMCPButton({ placement = 'bottom', alignment = 'end', options = c
|
|
|
75
77
|
const PrimaryIcon = primaryOption.icon;
|
|
76
78
|
const showPrimaryCopied = copiedOption === primaryOption.key;
|
|
77
79
|
return (react_1.default.createElement(ConnectMCPButtonWrapper, { "data-component-name": "Buttons/ConnectMCPButton" }, react_1.default.createElement(SplitButton_1.SplitButton, { variant: "secondary", placement: placement, alignment: alignment, closeOnSelect: false, toggleAriaLabel: translate('page.actions.connectMcp.moreOptions', 'More options'), button: react_1.default.createElement(Button_1.Button, { variant: "secondary", icon: showPrimaryCopied ? (react_1.default.createElement(CheckmarkFilledIcon_1.CheckmarkFilledIcon, { color: "var(--color-success-base)" })) : (react_1.default.createElement(PrimaryIcon, null)), onClick: () => handleAction(primaryOption.key) }, translate(primaryOption.titleTranslationKey, primaryOption.titleDefault)) }, dropdownOptions.length > 0
|
|
78
|
-
? ({ close }) => (react_1.default.createElement(
|
|
80
|
+
? ({ close }) => (react_1.default.createElement(StyledDropdownMenu, null, dropdownOptions.map((option) => {
|
|
79
81
|
const Icon = option.icon;
|
|
80
82
|
const showCheckmark = copiedOption === option.key;
|
|
81
83
|
return (react_1.default.createElement(DropdownMenuItem_1.DropdownMenuItem, { key: option.key, onAction: () => {
|
|
@@ -87,6 +89,9 @@ function ConnectMCPButton({ placement = 'bottom', alignment = 'end', options = c
|
|
|
87
89
|
})))
|
|
88
90
|
: null)));
|
|
89
91
|
}
|
|
92
|
+
const StyledDropdownMenu = (0, styled_components_1.default)(DropdownMenu_1.DropdownMenu) `
|
|
93
|
+
--dropdown-menu-max-height: var(--connect-mcp-button-dropdown-max-height);
|
|
94
|
+
`;
|
|
90
95
|
const ConnectMCPButtonWrapper = styled_components_1.default.div `
|
|
91
96
|
display: inline-block;
|
|
92
97
|
position: relative;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.aiAssistantButton = void 0;
|
|
3
|
+
exports.connectMcpButton = exports.aiAssistantButton = void 0;
|
|
4
4
|
const styled_components_1 = require("styled-components");
|
|
5
5
|
/* eslint-disable theme/no-raw-colors-in-styles */
|
|
6
6
|
exports.aiAssistantButton = (0, styled_components_1.css) `
|
|
@@ -52,4 +52,7 @@ exports.aiAssistantButton = (0, styled_components_1.css) `
|
|
|
52
52
|
// @tokens End
|
|
53
53
|
`;
|
|
54
54
|
/* eslint-enable theme/no-raw-colors-in-styles */
|
|
55
|
+
exports.connectMcpButton = (0, styled_components_1.css) `
|
|
56
|
+
--connect-mcp-button-dropdown-max-height: fit-content;
|
|
57
|
+
`;
|
|
55
58
|
//# sourceMappingURL=variables.js.map
|
|
@@ -94,9 +94,9 @@ function Catalog(props) {
|
|
|
94
94
|
react_1.default.createElement(CatalogPageContentWrapper, null,
|
|
95
95
|
react_1.default.createElement(CatalogTitleWrapper, null,
|
|
96
96
|
react_1.default.createElement(CatalogTitle, { "data-translation-key": catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.titleTranslationKey },
|
|
97
|
-
(catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.titleTranslationKey)
|
|
97
|
+
react_1.default.createElement("span", null, (catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.titleTranslationKey)
|
|
98
98
|
? translate(catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.titleTranslationKey)
|
|
99
|
-
: catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.slug,
|
|
99
|
+
: catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.slug),
|
|
100
100
|
' '),
|
|
101
101
|
react_1.default.createElement(CounterTag_1.CounterTag, { borderless: true }, entitiesCounter)),
|
|
102
102
|
react_1.default.createElement(CatalogDescription, { "data-translation-key": catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.descriptionTranslationKey }, translate(catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.descriptionTranslationKey)),
|
|
@@ -151,7 +151,7 @@ const CatalogDescription = styled_components_1.default.p `
|
|
|
151
151
|
const CatalogPageWrapper = styled_components_1.default.div `
|
|
152
152
|
--sidebar-width: var(--catalog-sidebar-width);
|
|
153
153
|
|
|
154
|
-
height: calc(100vh - var(--navbar-
|
|
154
|
+
height: calc(100vh - var(--navbar-offset));
|
|
155
155
|
display: flex;
|
|
156
156
|
flex-direction: column;
|
|
157
157
|
overflow: hidden;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { CatalogEntityRelationsGraphProps } from '../../../../components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph';
|
|
2
|
-
export declare const CatalogEntityRelationsGraph: import("
|
|
2
|
+
export declare const CatalogEntityRelationsGraph: import("../../../../core/utils").DynamicComponent<CatalogEntityRelationsGraphProps>;
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.js
CHANGED
|
@@ -35,5 +35,5 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.CatalogEntityRelationsGraph = void 0;
|
|
37
37
|
const utils_1 = require("../../../../core/utils");
|
|
38
|
-
exports.CatalogEntityRelationsGraph = (0, utils_1.dynamic)(() => Promise.resolve().then(() => __importStar(require('
|
|
38
|
+
exports.CatalogEntityRelationsGraph = (0, utils_1.dynamic)(() => Promise.resolve().then(() => __importStar(require('../../../../components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph'))).then((mod) => mod.CatalogEntityRelationsGraph));
|
|
39
39
|
//# sourceMappingURL=CatalogEntityRelationsGraph.lazy.js.map
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js
CHANGED
|
@@ -142,10 +142,10 @@ function CatalogEntityHistorySidebar({ entityKey, revision, version, className,
|
|
|
142
142
|
}
|
|
143
143
|
const SidebarOverlay = styled_components_1.default.div `
|
|
144
144
|
position: fixed;
|
|
145
|
-
top:
|
|
145
|
+
top: var(--navbar-offset);
|
|
146
146
|
left: 0;
|
|
147
147
|
width: var(--sidebar-width);
|
|
148
|
-
height: calc(100vh - var(--navbar-
|
|
148
|
+
height: calc(100vh - var(--navbar-offset));
|
|
149
149
|
padding: var(--catalog-history-sidebar-padding);
|
|
150
150
|
background-color: var(--catalog-history-sidebar-bg-color);
|
|
151
151
|
border-right: 1px solid var(--catalog-history-sidebar-border-color);
|
|
@@ -98,7 +98,7 @@ const SplitViewWrapper = styled_components_1.default.div `
|
|
|
98
98
|
const SchemaSampleWrapper = styled_components_1.default.div `
|
|
99
99
|
flex: 1;
|
|
100
100
|
position: sticky;
|
|
101
|
-
top: calc(var(--navbar-
|
|
101
|
+
top: calc(var(--navbar-offset) + var(--spacing-md));
|
|
102
102
|
align-self: flex-start;
|
|
103
103
|
padding-top: var(--spacing-sm);
|
|
104
104
|
`;
|
|
@@ -101,17 +101,20 @@ function CatalogFilterCheckboxes({ filter, filterValuesCasing, showCounter = tru
|
|
|
101
101
|
react_1.default.createElement(FilterInput_1.FilterInput, { value: searchTerm, onChange: setSearchTerm })),
|
|
102
102
|
react_1.default.createElement(FilterOptions_1.FilterOptions, null, filteredOptions.map(({ value, count }) => {
|
|
103
103
|
const id = 'filter--' + filter.property + '--' + value;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
react_1.default.createElement(
|
|
111
|
-
|
|
112
|
-
filter.
|
|
113
|
-
|
|
114
|
-
|
|
104
|
+
const checked = filter.selectedOptions instanceof Set
|
|
105
|
+
? filter.selectedOptions.has(value) ||
|
|
106
|
+
filter.selectedOptions.has(value === null || value === void 0 ? void 0 : value.toLowerCase())
|
|
107
|
+
: false;
|
|
108
|
+
return (react_1.default.createElement(FilterCheckboxOption, { key: id },
|
|
109
|
+
react_1.default.createElement(CheckboxIcon_1.CheckboxIcon, { checked: checked }),
|
|
110
|
+
react_1.default.createElement(FilterOptionLabel_1.FilterOptionLabel, { "data-translation-key": value },
|
|
111
|
+
react_1.default.createElement(FilterCheckboxInput, { checked: checked, onChange: () => {
|
|
112
|
+
filter.toggleOption(value);
|
|
113
|
+
telemetry.sendCatalogEntitiesFilterCheckboxToggledMessage([
|
|
114
|
+
Object.assign(Object.assign({}, (0, utils_1.getBaseDataAttributes)('catalogEntitiesFilterCheckboxId', 'checkbox')), { category: filter.property, value: value }),
|
|
115
|
+
]);
|
|
116
|
+
} }),
|
|
117
|
+
highlightText((0, utils_1.changeTextCasing)(translate(value), filterValuesCasing) || '')),
|
|
115
118
|
showCounter && react_1.default.createElement(CounterTag_1.CounterTag, { borderless: true }, count)));
|
|
116
119
|
})))));
|
|
117
120
|
}
|
|
@@ -147,6 +150,22 @@ const HighlightedText = styled_components_1.default.span `
|
|
|
147
150
|
`;
|
|
148
151
|
const FilterCheckboxOption = (0, styled_components_1.default)(FilterOption_1.FilterOption) `
|
|
149
152
|
padding-left: var(--filter-option-checkbox-padding-left);
|
|
153
|
+
|
|
154
|
+
&:has(input:focus-visible) {
|
|
155
|
+
outline: 1px solid var(--button-border-color-focused);
|
|
156
|
+
outline-offset: -1px;
|
|
157
|
+
}
|
|
158
|
+
`;
|
|
159
|
+
const FilterCheckboxInput = styled_components_1.default.input.attrs({ type: 'checkbox' }) `
|
|
160
|
+
position: absolute;
|
|
161
|
+
width: 1px;
|
|
162
|
+
height: 1px;
|
|
163
|
+
margin: -1px;
|
|
164
|
+
padding: 0;
|
|
165
|
+
overflow: hidden;
|
|
166
|
+
clip: rect(0 0 0 0);
|
|
167
|
+
white-space: nowrap;
|
|
168
|
+
border: 0;
|
|
150
169
|
`;
|
|
151
170
|
const FilterSearchWrapper = styled_components_1.default.div `
|
|
152
171
|
padding-bottom: var(--spacing-xs);
|
|
@@ -46,6 +46,7 @@ const hooks_1 = require("../../../core/hooks");
|
|
|
46
46
|
const utils_1 = require("../../../core/utils");
|
|
47
47
|
const Accordion_1 = require("../../../components/Accordion/Accordion");
|
|
48
48
|
function CatalogFilterDateRange({ filter, className, }) {
|
|
49
|
+
const [today] = (0, react_1.useState)(() => new Date());
|
|
49
50
|
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
50
51
|
const { translate } = useTranslate();
|
|
51
52
|
const from = (0, react_1.useMemo)(() => (filter.selectedOptions.from ? new Date(filter.selectedOptions.from) : undefined), [filter.selectedOptions.from]);
|
|
@@ -62,7 +63,7 @@ function CatalogFilterDateRange({ filter, className, }) {
|
|
|
62
63
|
react_1.default.createElement(DateRangeWrapper, null,
|
|
63
64
|
react_1.default.createElement(DateRangeRow, null,
|
|
64
65
|
react_1.default.createElement("span", null, translate('filter.dateRange.from', 'From:')),
|
|
65
|
-
react_1.default.createElement(DatePicker_1.DatePicker, { closeCalendar: true, format: "y-MM-dd", dayPlaceholder: "DD", monthPlaceholder: "MM", yearPlaceholder: "YYYY", value: from, maxDate:
|
|
66
|
+
react_1.default.createElement(DatePicker_1.DatePicker, { closeCalendar: true, format: "y-MM-dd", dayPlaceholder: "DD", monthPlaceholder: "MM", yearPlaceholder: "YYYY", value: from, maxDate: today, onChange: (from) => {
|
|
66
67
|
if (Array.isArray(from))
|
|
67
68
|
return;
|
|
68
69
|
filter.selectOption(Object.assign(Object.assign({}, filter.selectedOptions), { from: (0, utils_1.formatDateWithoutTimeZone)(from), to: (0, utils_1.formatDateWithoutTimeZone)(to) }));
|
|
@@ -14,7 +14,7 @@ function CatalogMobileFiltersPanel({ setMobileFiltersPanelOpen, filterContent, }
|
|
|
14
14
|
}
|
|
15
15
|
const CatalogMobileFiltersPanelWrapper = styled_components_1.default.div `
|
|
16
16
|
width: 100%;
|
|
17
|
-
max-height: calc(100vh - var(--navbar-
|
|
17
|
+
max-height: calc(100vh - var(--navbar-offset));
|
|
18
18
|
overflow-y: auto;
|
|
19
19
|
background: var(--sidebar-bg-color);
|
|
20
20
|
display: flex;
|
package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.js
CHANGED
|
@@ -15,10 +15,10 @@ function CatalogMobileFiltersPanelOverlay({ setMobileFiltersPanelOpen, filterCon
|
|
|
15
15
|
const CatalogMobileFiltersPanelOverlayWrapper = styled_components_1.default.div `
|
|
16
16
|
display: none;
|
|
17
17
|
position: fixed;
|
|
18
|
-
top:
|
|
18
|
+
top: var(--navbar-offset);
|
|
19
19
|
left: 0;
|
|
20
20
|
width: 100%;
|
|
21
|
-
height: calc(100vh - var(--navbar-
|
|
21
|
+
height: calc(100vh - var(--navbar-offset));
|
|
22
22
|
z-index: 3;
|
|
23
23
|
background: var(--bg-color);
|
|
24
24
|
flex-direction: column;
|
|
@@ -11,8 +11,7 @@ const CopyButton_1 = require("../../components/Buttons/CopyButton");
|
|
|
11
11
|
const Tooltip_1 = require("../../components/Tooltip/Tooltip");
|
|
12
12
|
const hooks_1 = require("../../core/hooks");
|
|
13
13
|
const DeselectIcon_1 = require("../../icons/DeselectIcon/DeselectIcon");
|
|
14
|
-
const
|
|
15
|
-
const MinimizeIcon_1 = require("../../icons/MinimizeIcon/MinimizeIcon");
|
|
14
|
+
const ExpandCollapseIcon_1 = require("../../icons/ExpandCollapseIcon/ExpandCollapseIcon");
|
|
16
15
|
const SelectIcon_1 = require("../../icons/SelectIcon/SelectIcon");
|
|
17
16
|
const WarningSquareIcon_1 = require("../../icons/WarningSquareIcon/WarningSquareIcon");
|
|
18
17
|
const Button_1 = require("../../components/Button/Button");
|
|
@@ -40,9 +39,8 @@ function CodeBlockControls({ children, className, title, controls, tabs, dropdow
|
|
|
40
39
|
dropdown && react_1.default.createElement(CodeBlockDropdown_1.CodeBlockDropdown, Object.assign({}, dropdown)),
|
|
41
40
|
report && !report.hidden && !((_a = report === null || report === void 0 ? void 0 : report.props) === null || _a === void 0 ? void 0 : _a.hide) ? (react_1.default.createElement(Tooltip_1.Tooltip, { tip: ((_b = report.props) === null || _b === void 0 ? void 0 : _b.tooltip) ||
|
|
42
41
|
translate('codeSnippet.report.tooltipText', 'Report a problem'), placement: "top", arrowPosition: "right" }, react_1.default.createElement(ControlButton, { variant: "text", size: "small", "data-testid": "report-button", icon: controlsType === 'icon' ? react_1.default.createElement(WarningSquareIcon_1.WarningSquareIcon, { size: "18px" }) : undefined, "aria-label": "Report a problem", onClick: (_c = report.props) === null || _c === void 0 ? void 0 : _c.onClick }, controlsType !== 'icon' && (((_d = report.props) === null || _d === void 0 ? void 0 : _d.buttonText) || 'Report')))) : null,
|
|
43
|
-
expand && !((_e = codeSnippet === null || codeSnippet === void 0 ? void 0 : codeSnippet.expand) === null || _e === void 0 ? void 0 : _e.hide) ? (react_1.default.createElement(Tooltip_1.Tooltip, { tip: ((_f = expand.props) === null || _f === void 0 ? void 0 : _f.tooltip) || translate('codeSnippet.expand.tooltipText', 'Expand all'), placement: "top", arrowPosition: "right" }, react_1.default.createElement(ControlButton, { variant: "text", size: "small", "data-testid": "expand-all", icon: controlsType === 'icon' ? react_1.default.createElement(
|
|
44
|
-
|
|
45
|
-
translate('codeSnippet.collapse.tooltipText', 'Collapse all'), placement: "top", arrowPosition: "right" }, react_1.default.createElement(ControlButton, { variant: "text", size: "small", "data-testid": "collapse-all", icon: controlsType === 'icon' ? react_1.default.createElement(MinimizeIcon_1.MinimizeIcon, null) : undefined, onClick: collapse === null || collapse === void 0 ? void 0 : collapse.onClick, "aria-label": "Collapse all" }, controlsType !== 'icon' && ((collapse === null || collapse === void 0 ? void 0 : collapse.label) || 'Collapse all')))) : null,
|
|
42
|
+
expand && !((_e = codeSnippet === null || codeSnippet === void 0 ? void 0 : codeSnippet.expand) === null || _e === void 0 ? void 0 : _e.hide) ? (react_1.default.createElement(Tooltip_1.Tooltip, { tip: ((_f = expand.props) === null || _f === void 0 ? void 0 : _f.tooltip) || translate('codeSnippet.expand.tooltipText', 'Expand all'), placement: "top", arrowPosition: "right" }, react_1.default.createElement(ControlButton, { variant: "text", size: "small", "data-testid": "expand-all", icon: controlsType === 'icon' ? react_1.default.createElement(ExpandCollapseIcon_1.ExpandCollapseIcon, null) : undefined, "aria-label": "Expand all", onClick: expand === null || expand === void 0 ? void 0 : expand.onClick }, controlsType !== 'icon' && ((expand === null || expand === void 0 ? void 0 : expand.label) || 'Expand all')))) : collapse && !((_g = codeSnippet === null || codeSnippet === void 0 ? void 0 : codeSnippet.collapse) === null || _g === void 0 ? void 0 : _g.hide) ? (react_1.default.createElement(Tooltip_1.Tooltip, { tip: ((_h = collapse.props) === null || _h === void 0 ? void 0 : _h.tooltip) ||
|
|
43
|
+
translate('codeSnippet.collapse.tooltipText', 'Collapse all'), placement: "top", arrowPosition: "right" }, react_1.default.createElement(ControlButton, { variant: "text", size: "small", "data-testid": "collapse-all", icon: controlsType === 'icon' ? react_1.default.createElement(ExpandCollapseIcon_1.ExpandCollapseIcon, { $collapse: true }) : undefined, onClick: collapse === null || collapse === void 0 ? void 0 : collapse.onClick, "aria-label": "Collapse all" }, controlsType !== 'icon' && ((collapse === null || collapse === void 0 ? void 0 : collapse.label) || 'Collapse all')))) : null,
|
|
46
44
|
select ? (react_1.default.createElement(ControlButton, { variant: "text", size: "small", "data-testid": "select-all", icon: controlsType === 'icon' ? react_1.default.createElement(SelectIcon_1.SelectIcon, null) : undefined, onClick: select === null || select === void 0 ? void 0 : select.onClick, "aria-label": "Select all" }, controlsType !== 'icon' && (select === null || select === void 0 ? void 0 : select.label) ? select.label : 'Select all')) : null,
|
|
47
45
|
deselect ? (react_1.default.createElement(ControlButton, { variant: "text", size: "small", "data-testid": "clear-all", icon: controlsType === 'icon' ? react_1.default.createElement(DeselectIcon_1.DeselectIcon, null) : undefined, onClick: deselect === null || deselect === void 0 ? void 0 : deselect.onClick, "aria-label": "Clear all" }, controlsType !== 'icon' && (deselect === null || deselect === void 0 ? void 0 : deselect.label) ? deselect.label : 'Clear all')) : null,
|
|
48
46
|
copy && !((_j = codeSnippet === null || codeSnippet === void 0 ? void 0 : codeSnippet.copy) === null || _j === void 0 ? void 0 : _j.hide) ? (react_1.default.createElement(Tooltip_1.Tooltip, { tip: translate('codeSnippet.copy.tooltipText', 'Copy to clipboard'), placement: "top", arrowPosition: "right" },
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Consent = Consent;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ConsentBanner_1 = require("../../components/Consent/ConsentBanner");
|
|
9
|
+
const ConsentDialog_1 = require("../../components/Consent/ConsentDialog");
|
|
10
|
+
const hooks_1 = require("../../core/hooks");
|
|
11
|
+
function Consent() {
|
|
12
|
+
(0, hooks_1.useConsentTelemetry)();
|
|
13
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
14
|
+
react_1.default.createElement(ConsentBanner_1.ConsentBanner, null),
|
|
15
|
+
react_1.default.createElement(ConsentDialog_1.ConsentDialog, null)));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=Consent.js.map
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ConsentBanner = ConsentBanner;
|
|
40
|
+
const react_1 = __importDefault(require("react"));
|
|
41
|
+
const styled_components_1 = __importStar(require("styled-components"));
|
|
42
|
+
const Button_1 = require("../../components/Button/Button");
|
|
43
|
+
const Link_1 = require("../../components/Link/Link");
|
|
44
|
+
const hooks_1 = require("../../core/hooks");
|
|
45
|
+
function ConsentBanner() {
|
|
46
|
+
var _a;
|
|
47
|
+
const { useConsent, useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
48
|
+
const consent = useConsent();
|
|
49
|
+
const { translate } = useTranslate();
|
|
50
|
+
if (!consent.enabled || consent.mode !== 'opt-in' || consent.decided || consent.isDialogOpen) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
const title = translate('consent.title', 'We value your privacy');
|
|
54
|
+
return (react_1.default.createElement(BannerWrapper, { "data-component-name": "Consent/ConsentBanner", role: "region", "aria-label": title },
|
|
55
|
+
react_1.default.createElement(Title, null, title),
|
|
56
|
+
react_1.default.createElement(Message, null,
|
|
57
|
+
translate('consent.message', 'By selecting "Accept all cookies", you agree to the use of cookies to improve site navigation, understand how our site is used, and support our marketing efforts. Select "Customize" to choose which types of cookies you allow.'),
|
|
58
|
+
' ',
|
|
59
|
+
((_a = consent.config) === null || _a === void 0 ? void 0 : _a.privacyPolicyUrl) ? (react_1.default.createElement(Link_1.Link, { to: consent.config.privacyPolicyUrl, external: true }, translate('consent.privacyPolicy', 'Privacy policy'))) : null),
|
|
60
|
+
react_1.default.createElement(Actions, null,
|
|
61
|
+
react_1.default.createElement(MainActions, null,
|
|
62
|
+
react_1.default.createElement(Button_1.Button, { variant: "outlined", onClick: consent.reject }, translate('consent.rejectAll', 'Reject all')),
|
|
63
|
+
react_1.default.createElement(Button_1.Button, { variant: "primary", onClick: consent.accept }, translate('consent.acceptAllCookies', 'Accept all cookies'))),
|
|
64
|
+
react_1.default.createElement(Button_1.Button, { variant: "text", onClick: consent.openDialog }, translate('consent.customize', 'Customize')))));
|
|
65
|
+
}
|
|
66
|
+
const slideUp = (0, styled_components_1.keyframes) `
|
|
67
|
+
from {
|
|
68
|
+
opacity: 0;
|
|
69
|
+
transform: translateY(16px);
|
|
70
|
+
}
|
|
71
|
+
to {
|
|
72
|
+
opacity: 1;
|
|
73
|
+
transform: translateY(0);
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
76
|
+
const BannerWrapper = styled_components_1.default.div `
|
|
77
|
+
position: fixed;
|
|
78
|
+
left: var(--consent-banner-offset);
|
|
79
|
+
bottom: var(--consent-banner-offset);
|
|
80
|
+
z-index: var(--consent-banner-z-index);
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
gap: var(--consent-banner-gap);
|
|
84
|
+
width: var(--consent-banner-width);
|
|
85
|
+
max-width: calc(100vw - 2 * var(--consent-banner-offset));
|
|
86
|
+
padding: var(--consent-banner-padding);
|
|
87
|
+
border: 1px solid var(--consent-banner-border-color);
|
|
88
|
+
border-radius: var(--consent-banner-border-radius);
|
|
89
|
+
background: var(--consent-banner-bg-color);
|
|
90
|
+
color: var(--consent-banner-text-color);
|
|
91
|
+
box-shadow: var(--consent-banner-box-shadow);
|
|
92
|
+
font-family: var(--font-family-base);
|
|
93
|
+
|
|
94
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
95
|
+
animation: ${slideUp} 240ms ease-out;
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
const Title = styled_components_1.default.h2 `
|
|
99
|
+
margin: 0;
|
|
100
|
+
font-size: var(--consent-banner-title-font-size);
|
|
101
|
+
font-weight: var(--font-weight-bold);
|
|
102
|
+
`;
|
|
103
|
+
const Message = styled_components_1.default.p `
|
|
104
|
+
margin: 0;
|
|
105
|
+
color: var(--text-color-secondary);
|
|
106
|
+
font-size: var(--consent-banner-font-size);
|
|
107
|
+
`;
|
|
108
|
+
const Actions = styled_components_1.default.div `
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-wrap: wrap;
|
|
111
|
+
gap: var(--consent-banner-gap);
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: space-between;
|
|
114
|
+
`;
|
|
115
|
+
const MainActions = styled_components_1.default.div `
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-wrap: wrap;
|
|
118
|
+
gap: var(--consent-banner-gap);
|
|
119
|
+
`;
|
|
120
|
+
//# sourceMappingURL=ConsentBanner.js.map
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ConsentDialog = ConsentDialog;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const Button_1 = require("../../components/Button/Button");
|
|
10
|
+
const Link_1 = require("../../components/Link/Link");
|
|
11
|
+
const Portal_1 = require("../../components/Portal/Portal");
|
|
12
|
+
const Switch_1 = require("../../components/Switch/Switch");
|
|
13
|
+
const hooks_1 = require("../../core/hooks");
|
|
14
|
+
const CloseIcon_1 = require("../../icons/CloseIcon/CloseIcon");
|
|
15
|
+
const noop = () => { };
|
|
16
|
+
function ConsentDialog() {
|
|
17
|
+
const { useConsent } = (0, hooks_1.useThemeHooks)();
|
|
18
|
+
const consent = useConsent();
|
|
19
|
+
if (!consent.enabled || !consent.isDialogOpen) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return react_1.default.createElement(ConsentDialogContent, { consent: consent });
|
|
23
|
+
}
|
|
24
|
+
function ConsentDialogContent({ consent }) {
|
|
25
|
+
var _a;
|
|
26
|
+
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
27
|
+
const { translate } = useTranslate();
|
|
28
|
+
const { draft, setCategory, dialogRef, close, save, categories } = (0, hooks_1.useConsentDialog)(consent);
|
|
29
|
+
return (react_1.default.createElement(Portal_1.Portal, null,
|
|
30
|
+
react_1.default.createElement(Overlay, { className: "scroll-lock", "data-component-name": "Consent/ConsentDialog", onMouseDown: (event) => {
|
|
31
|
+
if (event.target === event.currentTarget)
|
|
32
|
+
close();
|
|
33
|
+
} },
|
|
34
|
+
react_1.default.createElement(Dialog, { ref: dialogRef, role: "dialog", "aria-modal": "true", "aria-labelledby": "redocly-consent-dialog-title", tabIndex: -1 },
|
|
35
|
+
react_1.default.createElement(TitleRow, null,
|
|
36
|
+
react_1.default.createElement(Title, { id: "redocly-consent-dialog-title" }, translate('consent.dialog.title', 'Cookie preferences')),
|
|
37
|
+
react_1.default.createElement(Button_1.Button, { variant: "ghost", size: "small", icon: react_1.default.createElement(CloseIcon_1.CloseIcon, null), "aria-label": translate('consent.dialog.close', 'Close'), onClick: close })),
|
|
38
|
+
react_1.default.createElement(Description, null,
|
|
39
|
+
translate('consent.dialog.description', 'Choose which cookies this site may use. You can change your choice at any time.'),
|
|
40
|
+
' ',
|
|
41
|
+
((_a = consent.config) === null || _a === void 0 ? void 0 : _a.privacyPolicyUrl) ? (react_1.default.createElement(Link_1.Link, { to: consent.config.privacyPolicyUrl, external: true }, translate('consent.privacyPolicy', 'Privacy policy'))) : null),
|
|
42
|
+
categories.map((category) => {
|
|
43
|
+
const gpcLocked = category.id === 'marketing' && consent.gpc;
|
|
44
|
+
return (react_1.default.createElement(Row, { key: category.id },
|
|
45
|
+
react_1.default.createElement(RowText, null,
|
|
46
|
+
react_1.default.createElement(RowTitle, null, translate(category.titleTranslationKey, category.titleDefault)),
|
|
47
|
+
react_1.default.createElement(RowDescription, null, translate(category.descriptionTranslationKey, category.descriptionDefault)),
|
|
48
|
+
gpcLocked ? (react_1.default.createElement(GpcNotice, null, translate('consent.gpcNotice', 'Your browser asked us not to share your data, so this stays off.'))) : null),
|
|
49
|
+
category.locked ? (react_1.default.createElement(SwitchGroup, { role: "group", "aria-label": translate('consent.alwaysOn', 'Always on') },
|
|
50
|
+
react_1.default.createElement(Switch_1.Switch, { value: true, disabled: true, onChange: noop }))) : gpcLocked ? (react_1.default.createElement(SwitchGroup, { role: "group", "aria-label": translate('consent.alwaysOff', 'Always off') },
|
|
51
|
+
react_1.default.createElement(Switch_1.Switch, { value: false, disabled: true, onChange: noop }))) : (react_1.default.createElement(Switch_1.Switch, { value: draft[category.id], onChange: (value) => setCategory(category.id, value) }))));
|
|
52
|
+
}),
|
|
53
|
+
react_1.default.createElement(Actions, null,
|
|
54
|
+
react_1.default.createElement(Button_1.Button, { variant: "outlined", onClick: consent.reject }, translate('consent.rejectAll', 'Reject all')),
|
|
55
|
+
react_1.default.createElement(Spacer, null),
|
|
56
|
+
react_1.default.createElement(Button_1.Button, { variant: "outlined", onClick: consent.accept }, translate('consent.acceptAll', 'Accept all')),
|
|
57
|
+
react_1.default.createElement(Button_1.Button, { variant: "primary", onClick: save }, translate('consent.savePreferences', 'Save preferences')))))));
|
|
58
|
+
}
|
|
59
|
+
const Overlay = styled_components_1.default.div `
|
|
60
|
+
position: fixed;
|
|
61
|
+
inset: 0;
|
|
62
|
+
z-index: var(--z-index-overlay);
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
background: var(--bg-color-modal-overlay);
|
|
67
|
+
font-family: var(--font-family-base);
|
|
68
|
+
`;
|
|
69
|
+
const Dialog = styled_components_1.default.div `
|
|
70
|
+
width: var(--consent-dialog-width);
|
|
71
|
+
max-width: var(--consent-dialog-max-width);
|
|
72
|
+
padding: var(--consent-dialog-padding);
|
|
73
|
+
border-radius: var(--consent-dialog-border-radius);
|
|
74
|
+
background: var(--consent-dialog-bg-color);
|
|
75
|
+
box-shadow: var(--consent-dialog-box-shadow);
|
|
76
|
+
`;
|
|
77
|
+
const TitleRow = styled_components_1.default.div `
|
|
78
|
+
display: flex;
|
|
79
|
+
gap: var(--spacing-xs);
|
|
80
|
+
align-items: flex-start;
|
|
81
|
+
justify-content: space-between;
|
|
82
|
+
`;
|
|
83
|
+
const Title = styled_components_1.default.h2 `
|
|
84
|
+
margin: 0 0 var(--spacing-xs);
|
|
85
|
+
font-size: var(--font-size-lg);
|
|
86
|
+
`;
|
|
87
|
+
const Description = styled_components_1.default.p `
|
|
88
|
+
margin: 0 0 var(--spacing-base);
|
|
89
|
+
color: var(--consent-dialog-description-color);
|
|
90
|
+
font-size: var(--font-size-sm);
|
|
91
|
+
`;
|
|
92
|
+
const Row = styled_components_1.default.div `
|
|
93
|
+
display: flex;
|
|
94
|
+
gap: var(--spacing-base);
|
|
95
|
+
align-items: flex-start;
|
|
96
|
+
padding: var(--spacing-sm) 0;
|
|
97
|
+
border-top: 1px solid var(--consent-dialog-row-border-color);
|
|
98
|
+
`;
|
|
99
|
+
const RowText = styled_components_1.default.div `
|
|
100
|
+
flex: 1;
|
|
101
|
+
`;
|
|
102
|
+
const RowTitle = styled_components_1.default.div `
|
|
103
|
+
font-size: var(--font-size-base);
|
|
104
|
+
font-weight: var(--font-weight-bold);
|
|
105
|
+
`;
|
|
106
|
+
const RowDescription = styled_components_1.default.div `
|
|
107
|
+
color: var(--consent-dialog-description-color);
|
|
108
|
+
font-size: var(--font-size-sm);
|
|
109
|
+
`;
|
|
110
|
+
const GpcNotice = styled_components_1.default.div `
|
|
111
|
+
color: var(--consent-dialog-description-color);
|
|
112
|
+
font-size: var(--font-size-sm);
|
|
113
|
+
`;
|
|
114
|
+
const SwitchGroup = styled_components_1.default.div `
|
|
115
|
+
flex: none;
|
|
116
|
+
`;
|
|
117
|
+
const Actions = styled_components_1.default.div `
|
|
118
|
+
display: flex;
|
|
119
|
+
flex-wrap: wrap;
|
|
120
|
+
gap: var(--spacing-xs);
|
|
121
|
+
margin-top: var(--spacing-base);
|
|
122
|
+
padding-top: var(--spacing-base);
|
|
123
|
+
border-top: 1px solid var(--consent-dialog-row-border-color);
|
|
124
|
+
`;
|
|
125
|
+
const Spacer = styled_components_1.default.span `
|
|
126
|
+
flex: 1;
|
|
127
|
+
`;
|
|
128
|
+
//# sourceMappingURL=ConsentDialog.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ConsentSettingsLink = ConsentSettingsLink;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const Button_1 = require("../../components/Button/Button");
|
|
10
|
+
const hooks_1 = require("../../core/hooks");
|
|
11
|
+
const utils_1 = require("../../core/utils");
|
|
12
|
+
function ConsentSettingsLink() {
|
|
13
|
+
const { useConsent, useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
14
|
+
const { consent: consentConfig, footer } = (0, hooks_1.useThemeConfig)() || {};
|
|
15
|
+
const consent = useConsent();
|
|
16
|
+
const { translate } = useTranslate();
|
|
17
|
+
if (!consent.enabled || (0, utils_1.resolveSettingsLinkPlacement)(consentConfig, footer) !== 'footer') {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
return (react_1.default.createElement(SettingsLinkButton, { variant: "link", size: "small", "data-component-name": "Consent/ConsentSettingsLink", onClick: consent.openDialog }, translate('consent.settingsLink', 'Cookie preferences')));
|
|
21
|
+
}
|
|
22
|
+
const SettingsLinkButton = (0, styled_components_1.default)(Button_1.Button) `
|
|
23
|
+
margin: var(--footer-link-padding-vertical) 0 var(--footer-link-padding-vertical) var(--spacing-sm);
|
|
24
|
+
padding: 0;
|
|
25
|
+
color: var(--footer-link-text-color);
|
|
26
|
+
font: inherit;
|
|
27
|
+
line-height: inherit;
|
|
28
|
+
|
|
29
|
+
&:hover,
|
|
30
|
+
&:focus-visible {
|
|
31
|
+
color: var(--footer-link-color-hover);
|
|
32
|
+
background: none;
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
//# sourceMappingURL=ConsentSettingsLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const consent: import("styled-components").RuleSet<object>;
|