@redocly/theme 0.69.0 → 0.70.0-next.1
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/Button/Button.js +5 -2
- package/lib/components/Button/variables.js +14 -5
- package/lib/components/Buttons/DownloadButton.js +13 -3
- package/lib/components/Catalog/Catalog.d.ts +2 -2
- package/lib/components/Catalog/CatalogActionsRow.d.ts +3 -2
- package/lib/components/Catalog/CatalogCardView/CatalogCard.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntities.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntitiesEmptyState.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.js +1 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.d.ts +3 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.js +45 -23
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +67 -33
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem.d.ts +3 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem.js +15 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.d.ts +3 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js +48 -57
- package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +1 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +2 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +3 -4
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.d.ts +3 -4
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +1 -2
- package/lib/components/Catalog/CatalogEntityIcon.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntityTypeTag.d.ts +2 -2
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.d.ts +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.js +1 -2
- package/lib/components/Catalog/CatalogHighlight.d.ts +2 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.d.ts +2 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.d.ts +1 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.d.ts +2 -1
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.d.ts +2 -2
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.d.ts +2 -2
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.d.ts +1 -1
- package/lib/components/Catalog/CatalogSelector.d.ts +3 -2
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +2 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +2 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTags.d.ts +2 -2
- package/lib/components/Catalog/CatalogViewModeToggle.d.ts +1 -1
- package/lib/components/Catalog/variables.js +24 -33
- package/lib/components/CatalogClassic/CatalogClassicInfoBlock.d.ts +1 -1
- package/lib/components/CatalogClassic/CatalogClassicInfoBlock.js +1 -2
- package/lib/components/CatalogClassic/CatalogClassicVirtualizedGroups.d.ts +1 -1
- package/lib/components/CodeBlock/CodeBlockControls.d.ts +1 -1
- package/lib/components/Dropdown/Dropdown.js +7 -8
- package/lib/components/Filter/FilterOptionLabel.d.ts +1 -1
- package/lib/components/LoadMore/LoadMore.d.ts +1 -1
- package/lib/components/MCP/McpConnectionTabs.js +2 -2
- package/lib/components/PageActions/PageActions.d.ts +1 -1
- package/lib/components/ReplaySecuritySchemeActions/ReplaySecuritySchemeActions.d.ts +11 -0
- package/lib/components/ReplaySecuritySchemeActions/ReplaySecuritySchemeActions.js +7 -0
- package/lib/components/Search/SearchAiDialog.d.ts +1 -1
- package/lib/components/Search/SearchAiMessage.d.ts +1 -2
- package/lib/components/Search/SearchAiMessage.js +8 -10
- package/lib/components/Search/SearchAiResponse.d.ts +1 -1
- package/lib/components/Search/SearchGroups.d.ts +1 -1
- package/lib/components/SplitButton/SplitButton.d.ts +1 -0
- package/lib/components/SplitButton/SplitButton.js +2 -2
- package/lib/components/Tooltip/AnchorTooltip.js +17 -27
- package/lib/components/Tooltip/JsTooltip.js +34 -46
- package/lib/components/Tooltip/Tooltip.js +1 -2
- package/lib/core/constants/markdown.d.ts +2 -0
- package/lib/core/constants/markdown.js +3 -1
- package/lib/core/hooks/catalog/use-catalog-entity-schema.d.ts +1 -1
- package/lib/core/hooks/catalog/use-catalog-entity-schema.js +2 -2
- package/lib/core/hooks/catalog/use-catalog-table-header-cell-actions.d.ts +1 -1
- package/lib/core/hooks/catalog/use-graph.d.ts +3 -3
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-controls.js +1 -1
- package/lib/core/hooks/index.d.ts +1 -0
- package/lib/core/hooks/index.js +1 -0
- package/lib/core/hooks/menu/use-nested-menu.js +2 -2
- package/lib/core/hooks/use-active-section-id.js +6 -0
- package/lib/core/hooks/use-anchor-positioning.d.ts +3 -0
- package/lib/core/hooks/use-anchor-positioning.js +21 -0
- package/lib/core/hooks/use-element-size.d.ts +1 -1
- package/lib/core/hooks/use-theme-hooks.js +0 -1
- package/lib/core/types/catalog.d.ts +2 -3
- package/lib/core/types/common.d.ts +1 -1
- package/lib/core/types/hooks.d.ts +4 -10
- package/lib/core/utils/load-and-navigate.js +3 -3
- package/lib/core/utils/mcp.d.ts +0 -1
- package/lib/core/utils/mcp.js +0 -13
- package/lib/core/utils/menu.d.ts +2 -2
- package/lib/core/utils/urls.js +1 -3
- package/lib/ext/use-configure-replay.d.ts +1 -1
- package/lib/layouts/OIDCForbidden.js +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanelPreview.d.ts +1 -2
- package/lib/markdoc/components/Diagram/Diagram.d.ts +1 -1
- package/lib/markdoc/components/Diagram/Diagram.js +1 -2
- package/lib/markdoc/components/Tabs/Tab.d.ts +1 -1
- package/lib/markdoc/components/Tabs/TabList.d.ts +1 -1
- package/lib/markdoc/tags/code-walkthrough.d.ts +1 -1
- package/lib/markdoc/tags/markdoc-example.js +34 -22
- package/package.json +4 -4
- package/src/components/Button/Button.tsx +5 -2
- package/src/components/Button/variables.ts +14 -5
- package/src/components/Buttons/DownloadButton.tsx +16 -8
- package/src/components/Catalog/Catalog.tsx +4 -4
- package/src/components/Catalog/CatalogActionsRow.tsx +3 -2
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +3 -2
- package/src/components/Catalog/CatalogEntities.tsx +3 -2
- package/src/components/Catalog/CatalogEntitiesEmptyState.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +6 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.tsx +4 -5
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.tsx +56 -35
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +80 -42
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem.tsx +18 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx +61 -75
- package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +3 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +7 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +7 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.tsx +3 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -2
- package/src/components/Catalog/CatalogEntityIcon.tsx +3 -2
- package/src/components/Catalog/CatalogEntityTypeTag.tsx +3 -2
- package/src/components/Catalog/CatalogFilter/CatalogFilterContent.tsx +2 -4
- package/src/components/Catalog/CatalogHighlight.tsx +2 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.tsx +2 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.tsx +2 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.tsx +2 -1
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.tsx +3 -2
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.tsx +3 -2
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.tsx +2 -1
- package/src/components/Catalog/CatalogSelector.tsx +3 -2
- package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +1 -1
- package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +1 -1
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +2 -1
- package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +2 -1
- package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +1 -1
- package/src/components/Catalog/CatalogTags.tsx +4 -2
- package/src/components/Catalog/CatalogViewModeToggle.tsx +1 -1
- package/src/components/Catalog/variables.ts +24 -33
- package/src/components/CatalogClassic/CatalogClassicInfoBlock.tsx +2 -5
- package/src/components/CatalogClassic/CatalogClassicVirtualizedGroups.tsx +1 -1
- package/src/components/CodeBlock/CodeBlockControls.tsx +2 -1
- package/src/components/Dropdown/Dropdown.tsx +5 -8
- package/src/components/Filter/FilterOptionLabel.tsx +1 -1
- package/src/components/LoadMore/LoadMore.tsx +2 -1
- package/src/components/MCP/McpConnectionTabs.tsx +3 -4
- package/src/components/PageActions/PageActions.tsx +2 -1
- package/src/components/ReplaySecuritySchemeActions/ReplaySecuritySchemeActions.tsx +19 -0
- package/src/components/Search/SearchAiDialog.tsx +1 -1
- package/src/components/Search/SearchAiMessage.tsx +3 -6
- package/src/components/Search/SearchAiResponse.tsx +2 -4
- package/src/components/Search/SearchGroups.tsx +1 -5
- package/src/components/SplitButton/SplitButton.tsx +3 -0
- package/src/components/Tooltip/AnchorTooltip.tsx +17 -27
- package/src/components/Tooltip/JsTooltip.tsx +55 -62
- package/src/components/Tooltip/Tooltip.tsx +1 -2
- package/src/core/constants/markdown.ts +4 -0
- package/src/core/hooks/__mocks__/index.ts +1 -0
- package/src/core/hooks/__mocks__/use-anchor-positioning.ts +3 -0
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +0 -3
- package/src/core/hooks/catalog/use-catalog-entity-schema.ts +3 -3
- package/src/core/hooks/catalog/use-catalog-table-header-cell-actions.ts +1 -1
- package/src/core/hooks/catalog/use-graph.ts +4 -4
- package/src/core/hooks/code-walkthrough/__mocks__/MockIntersectionObserver.ts +1 -1
- package/src/core/hooks/code-walkthrough/__mocks__/mock-intersection-observer.ts +1 -1
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-controls.ts +1 -1
- package/src/core/hooks/index.ts +1 -0
- package/src/core/hooks/menu/__mocks__/use-mobile-menu-items.ts +1 -1
- package/src/core/hooks/menu/use-nested-menu.ts +2 -2
- package/src/core/hooks/use-active-section-id.ts +8 -0
- package/src/core/hooks/use-anchor-positioning.ts +22 -0
- package/src/core/hooks/use-element-size.ts +2 -1
- package/src/core/hooks/use-theme-hooks.ts +0 -1
- package/src/core/types/catalog.ts +7 -3
- package/src/core/types/common.ts +1 -1
- package/src/core/types/hooks.ts +15 -14
- package/src/core/utils/load-and-navigate.ts +3 -3
- package/src/core/utils/mcp.ts +0 -17
- package/src/core/utils/menu.ts +2 -2
- package/src/core/utils/urls.ts +1 -3
- package/src/ext/use-configure-replay.ts +3 -3
- package/src/layouts/OIDCForbidden.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/CodePanelPreview.tsx +2 -2
- package/src/markdoc/components/CodeWalkthrough/CodeWalkthrough.tsx +2 -4
- package/src/markdoc/components/Diagram/Diagram.tsx +2 -5
- package/src/markdoc/components/Tabs/Tab.tsx +1 -1
- package/src/markdoc/components/Tabs/TabList.tsx +1 -1
- package/src/markdoc/tags/code-walkthrough.ts +2 -1
- package/src/markdoc/tags/markdoc-example.ts +45 -28
|
@@ -473,33 +473,31 @@ exports.catalog = (0, styled_components_1.css) `
|
|
|
473
473
|
* @tokens Catalog history button
|
|
474
474
|
*/
|
|
475
475
|
--catalog-history-button-width: 252px;
|
|
476
|
-
--catalog-history-button-item-width: 244px;
|
|
477
476
|
--catalog-history-separator-border-color: var(--border-color-secondary);
|
|
478
|
-
--catalog-history-separator-margin
|
|
477
|
+
--catalog-history-separator-margin: var(--spacing-sm) 0;
|
|
479
478
|
--catalog-history-item-padding: var(--spacing-xxs);
|
|
480
|
-
--catalog-history-item-
|
|
481
|
-
--catalog-history-item-
|
|
482
|
-
--catalog-history-item-border-radius: var(--menu-item-label-border-radius);
|
|
479
|
+
--catalog-history-item-gap: var(--spacing-xxs);
|
|
480
|
+
--catalog-history-item-border-radius: var(--border-radius-lg);
|
|
483
481
|
--catalog-history-item-bg-color-hover: var(--menu-item-bg-color-hover);
|
|
484
482
|
--catalog-history-icon-size: 16px;
|
|
485
|
-
--catalog-history-
|
|
483
|
+
--catalog-history-icon-gap: 2px;
|
|
486
484
|
--catalog-history-text-font-family: var(--font-family-base);
|
|
487
485
|
--catalog-history-text-font-size: var(--font-size-base);
|
|
488
486
|
--catalog-history-text-font-weight: var(--font-weight-regular);
|
|
489
487
|
--catalog-history-text-line-height: var(--line-height-base);
|
|
490
|
-
--catalog-history-text-color: var(--
|
|
488
|
+
--catalog-history-text-color: var(--menu-content-color);
|
|
491
489
|
--catalog-history-pill-gap: var(--spacing-xxs);
|
|
490
|
+
--catalog-history-pill-height: 22px;
|
|
492
491
|
--catalog-history-pill-padding-vertical: 1px;
|
|
493
492
|
--catalog-history-pill-padding-horizontal: var(--spacing-xs);
|
|
494
493
|
--catalog-history-pill-border-color: var(--border-color-primary);
|
|
495
|
-
--catalog-history-pill-border-radius:
|
|
496
|
-
--catalog-history-pill-icon-size:
|
|
494
|
+
--catalog-history-pill-border-radius: var(--border-radius-xl);
|
|
495
|
+
--catalog-history-pill-icon-size: 14px;
|
|
497
496
|
--catalog-history-pill-icon-color: var(--color-green-8);
|
|
498
497
|
--catalog-history-pill-font-family: var(--font-family-base);
|
|
499
498
|
--catalog-history-pill-font-size: var(--font-size-base);
|
|
500
499
|
--catalog-history-pill-line-height: var(--line-height-base);
|
|
501
500
|
--catalog-history-pill-text-color: var(--text-color-primary);
|
|
502
|
-
--catalog-history-pill-min-width: calc(100% - 118px - var(--catalog-history-item-gap));
|
|
503
501
|
// @tokens End
|
|
504
502
|
|
|
505
503
|
/**
|
|
@@ -508,50 +506,44 @@ exports.catalog = (0, styled_components_1.css) `
|
|
|
508
506
|
--catalog-history-sidebar-width: 320px;
|
|
509
507
|
--catalog-history-sidebar-bg-color: var(--sidebar-bg-color);
|
|
510
508
|
--catalog-history-sidebar-border-color: var(--border-color-secondary);
|
|
509
|
+
--catalog-history-sidebar-padding: var(--spacing-base) var(--spacing-base) 0;
|
|
510
|
+
--catalog-history-sidebar-divider-margin: var(--spacing-sm) 0 0;
|
|
511
511
|
|
|
512
|
-
--catalog-history-sidebar-header-padding: var(--spacing-
|
|
512
|
+
--catalog-history-sidebar-header-padding: var(--spacing-xxs);
|
|
513
513
|
--catalog-history-sidebar-header-font-family: var(--font-family-base);
|
|
514
514
|
--catalog-history-sidebar-header-font-size: var(--font-size-base);
|
|
515
515
|
--catalog-history-sidebar-header-font-weight: var(--font-weight-regular);
|
|
516
516
|
--catalog-history-sidebar-header-line-height: var(--line-height-base);
|
|
517
517
|
--catalog-history-sidebar-header-letter-spacing: 0;
|
|
518
|
-
--catalog-history-sidebar-header-color: var(--
|
|
518
|
+
--catalog-history-sidebar-header-color: var(--menu-content-color);
|
|
519
519
|
|
|
520
|
-
--catalog-history-sidebar-close-button-size:
|
|
521
|
-
--catalog-history-sidebar-close-button-border-radius: var(--border-radius-
|
|
520
|
+
--catalog-history-sidebar-close-button-size: 22px;
|
|
521
|
+
--catalog-history-sidebar-close-button-border-radius: var(--border-radius-xl);
|
|
522
522
|
--catalog-history-sidebar-close-button-bg-color-hover: var(--color-hover-base);
|
|
523
523
|
--catalog-history-sidebar-close-icon-color: var(--text-color-primary);
|
|
524
524
|
|
|
525
|
-
--catalog-history-sidebar-
|
|
526
|
-
--catalog-history-sidebar-content-margin-top: calc(var(--spacing-xxs) * -1);
|
|
527
|
-
|
|
528
|
-
--catalog-history-sidebar-version-header-padding: var(--spacing-xs) var(--spacing-xxs);
|
|
525
|
+
--catalog-history-sidebar-version-header-padding: var(--spacing-xxs);
|
|
529
526
|
--catalog-history-sidebar-version-header-border-radius: var(--border-radius-md);
|
|
530
527
|
--catalog-history-sidebar-version-header-bg-color-hover: var(--color-hover-base);
|
|
528
|
+
--catalog-history-sidebar-version-header-bg-color-current: var(--menu-item-bg-color-active);
|
|
531
529
|
|
|
532
|
-
--catalog-history-sidebar-version-icon-size:
|
|
533
|
-
--catalog-history-sidebar-version-icon-color: var(--text-color-
|
|
530
|
+
--catalog-history-sidebar-version-icon-size: 20px;
|
|
531
|
+
--catalog-history-sidebar-version-icon-color: var(--text-color-primary);
|
|
534
532
|
--catalog-history-sidebar-version-icon-color-current: var(--color-static-white);
|
|
535
|
-
--catalog-history-sidebar-version-icon-margin-right: var(--spacing-
|
|
533
|
+
--catalog-history-sidebar-version-icon-margin-right: var(--spacing-xxs);
|
|
536
534
|
--catalog-history-sidebar-chevron-icon-color: var(--text-color-secondary);
|
|
537
|
-
--catalog-history-sidebar-version-info-gap: 2px;
|
|
538
535
|
|
|
539
536
|
--catalog-history-sidebar-version-title-font-family: var(--font-family-base);
|
|
540
537
|
--catalog-history-sidebar-version-title-font-size: var(--font-size-base);
|
|
541
|
-
--catalog-history-sidebar-version-title-font-weight: var(--font-weight-
|
|
538
|
+
--catalog-history-sidebar-version-title-font-weight: var(--font-weight-regular);
|
|
542
539
|
--catalog-history-sidebar-version-title-line-height: var(--line-height-base);
|
|
543
|
-
--catalog-history-sidebar-version-title-color: var(--
|
|
544
|
-
|
|
545
|
-
--catalog-history-sidebar-version-date-font-family: var(--font-family-base);
|
|
546
|
-
--catalog-history-sidebar-version-date-font-size: var(--font-size-sm);
|
|
547
|
-
--catalog-history-sidebar-version-date-font-weight: var(--font-weight-regular);
|
|
548
|
-
--catalog-history-sidebar-version-date-line-height: var(--line-height-sm);
|
|
549
|
-
--catalog-history-sidebar-version-date-color: var(--color-warm-grey-7);
|
|
540
|
+
--catalog-history-sidebar-version-title-color: var(--menu-content-color);
|
|
550
541
|
|
|
551
|
-
--catalog-history-sidebar-revisions-padding-left:
|
|
542
|
+
--catalog-history-sidebar-revisions-padding-left: 28px;
|
|
552
543
|
--catalog-history-sidebar-revisions-padding-bottom: var(--spacing-base);
|
|
544
|
+
--catalog-history-sidebar-revision-line-left: 14px;
|
|
553
545
|
|
|
554
|
-
--catalog-history-sidebar-revision-item-padding: var(--spacing-
|
|
546
|
+
--catalog-history-sidebar-revision-item-padding: var(--spacing-xxs) var(--spacing-sm);
|
|
555
547
|
--catalog-history-sidebar-revision-item-border-radius: var(--border-radius-md);
|
|
556
548
|
--catalog-history-sidebar-revision-item-bg-color-hover: var(--bg-color-hover);
|
|
557
549
|
|
|
@@ -575,7 +567,6 @@ exports.catalog = (0, styled_components_1.css) `
|
|
|
575
567
|
/**
|
|
576
568
|
* @tokens Catalog history tag border radius
|
|
577
569
|
*/
|
|
578
|
-
--catalog-history-sidebar-version-tag-border-radius: var(--border-radius-xl);
|
|
579
570
|
--catalog-history-sidebar-revision-tag-border-radius: var(--border-radius-xl);
|
|
580
571
|
// @tokens End
|
|
581
572
|
|
|
@@ -10,7 +10,6 @@ const hooks_1 = require("../../core/hooks");
|
|
|
10
10
|
const utils_1 = require("../../core/utils");
|
|
11
11
|
const Tag_1 = require("../../components/Tag/Tag");
|
|
12
12
|
const Link_1 = require("../../components/Link/Link");
|
|
13
|
-
const utils_2 = require("../../core/utils");
|
|
14
13
|
function CatalogClassicInfoBlock(props) {
|
|
15
14
|
var _a, _b, _c, _d;
|
|
16
15
|
const scorecardBadge = ((_a = props.metadata) === null || _a === void 0 ? void 0 : _a.scorecardLevel) ? (react_1.default.createElement(ScorecardBadge, { level: props.metadata.scorecardLevel, slug: (_b = props.metadata) === null || _b === void 0 ? void 0 : _b.scoreCardSlug, colorVariable: (0, utils_1.getScorecardColorVariable)(((_c = props.metadata) === null || _c === void 0 ? void 0 : _c.scorecardLevelIdx) || 0, Object.keys(((_d = props.metadata) === null || _d === void 0 ? void 0 : _d.scorecardLevels) || {}).length) })) : null;
|
|
@@ -22,7 +21,7 @@ function ScorecardBadge(props) {
|
|
|
22
21
|
const { useTelemetry } = (0, hooks_1.useThemeHooks)();
|
|
23
22
|
const telemetry = useTelemetry();
|
|
24
23
|
return (react_1.default.createElement(Link_1.Link, { to: slug },
|
|
25
|
-
react_1.default.createElement(Tag_1.Tag, { onClick: () => telemetry.sendScorecardLinkClickedMessage([(0,
|
|
24
|
+
react_1.default.createElement(Tag_1.Tag, { onClick: () => telemetry.sendScorecardLinkClickedMessage([(0, utils_1.getBaseDataAttributes)('scorecardLink', 'tag')]), withStatusDot: true, statusDotColor: `var(${colorVariable})` }, level)));
|
|
26
25
|
}
|
|
27
26
|
const CatalogInfoBlockWrapper = styled_components_1.default.div `
|
|
28
27
|
position: relative;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { JSX } from 'react';
|
|
3
3
|
import type { CodeBlockItems } from '../../components/CodeBlock/CodeBlock';
|
|
4
|
-
import { ReportButtonProps } from '../../core/hooks';
|
|
4
|
+
import type { ReportButtonProps } from '../../core/hooks';
|
|
5
5
|
export type CodeBlockControlsProps = {
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
className?: string;
|
|
@@ -77,12 +77,18 @@ exports.Dropdown = (0, react_1.forwardRef)(({ children, className, active, trigg
|
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
const updateMenuPosition = (0, react_1.useCallback)(() => {
|
|
80
|
+
var _a;
|
|
81
|
+
var _b;
|
|
80
82
|
const wrapper = wrapperRef.current;
|
|
81
83
|
if (!wrapper)
|
|
82
84
|
return;
|
|
83
85
|
const rect = wrapper.getBoundingClientRect();
|
|
86
|
+
const menuHeight = (_b = (_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) !== null && _b !== void 0 ? _b : 0;
|
|
87
|
+
const fitsBelow = rect.bottom + menuHeight <= window.innerHeight;
|
|
88
|
+
const fitsAbove = rect.top - menuHeight >= 0;
|
|
89
|
+
const openUpward = placement === 'top' ? fitsAbove || !fitsBelow : !fitsBelow && fitsAbove;
|
|
84
90
|
const style = { minWidth: rect.width };
|
|
85
|
-
if (
|
|
91
|
+
if (openUpward) {
|
|
86
92
|
style.bottom = window.innerHeight - rect.top;
|
|
87
93
|
}
|
|
88
94
|
else {
|
|
@@ -136,13 +142,6 @@ const DropdownWrapper = styled_components_1.default.div `
|
|
|
136
142
|
position: relative;
|
|
137
143
|
|
|
138
144
|
text-decoration: none;
|
|
139
|
-
|
|
140
|
-
/* The trigger keeps its hovered appearance while the menu is open. */
|
|
141
|
-
> .button[aria-expanded='true'] {
|
|
142
|
-
background-color: var(--button-bg-color-hover);
|
|
143
|
-
color: var(--button-color-hover);
|
|
144
|
-
border-color: var(--button-border-color-hover);
|
|
145
|
-
}
|
|
146
145
|
`;
|
|
147
146
|
const ChildrenWrapper = styled_components_1.default.div `
|
|
148
147
|
padding-top: var(--dropdown-menu-padding-top);
|
|
@@ -113,8 +113,8 @@ function renderTabContent(option, connection, translate, snippetHeader) {
|
|
|
113
113
|
{
|
|
114
114
|
headline: translate('page.mcpNotAllowed.snippets.claudeDesktop.headline', 'Claude Desktop'),
|
|
115
115
|
content: (react_1.default.createElement(react_1.default.Fragment, null,
|
|
116
|
-
react_1.default.createElement(TabHint, null, translate('page.mcpNotAllowed.snippets.claudeDesktop.instruction', '
|
|
117
|
-
react_1.default.createElement(CodeBlock_1.CodeBlock, { lang: "
|
|
116
|
+
react_1.default.createElement(TabHint, null, translate('page.mcpNotAllowed.snippets.claudeDesktop.instruction', 'Open Customize → Connectors → Add custom connector and paste this server URL:')),
|
|
117
|
+
react_1.default.createElement(CodeBlock_1.CodeBlock, { lang: "text", source: connection.url, header: snippetHeader(option, 'claude-desktop') }))),
|
|
118
118
|
},
|
|
119
119
|
]);
|
|
120
120
|
case 'chatgpt':
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ReplaySecurityType = 'oauth2' | 'openIdConnect' | 'apiKey' | 'http-bearer';
|
|
2
|
+
export type ReplaySecuritySchemeActionsProps = {
|
|
3
|
+
schemeId: string | null;
|
|
4
|
+
securityType: ReplaySecurityType;
|
|
5
|
+
environment: string;
|
|
6
|
+
operationId?: string;
|
|
7
|
+
value: string;
|
|
8
|
+
setValue: (value: string) => void;
|
|
9
|
+
apiId?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function ReplaySecuritySchemeActions(_props: ReplaySecuritySchemeActionsProps): null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReplaySecuritySchemeActions = ReplaySecuritySchemeActions;
|
|
4
|
+
function ReplaySecuritySchemeActions(_props) {
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ReplaySecuritySchemeActions.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { JSX } from 'react';
|
|
3
3
|
import type { AiSearchConversationItem, SearchAiMessageResource, ToolCall, ContentSegment } from '../../core/types';
|
|
4
|
-
import { AiSearchError } from '../../core/constants';
|
|
4
|
+
import type { AiSearchError } from '../../core/constants';
|
|
5
5
|
export type SearchAiDialogProps = {
|
|
6
6
|
response: string | undefined;
|
|
7
7
|
isGeneratingResponse: boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { JSX } from 'react';
|
|
1
|
+
import React, { type JSX } from 'react';
|
|
3
2
|
import { FeedbackType, type SearchAiMessageResource, type ToolCall, type ContentSegment } from '../../core/types';
|
|
4
3
|
import { AiSearchConversationRole } from '../../core/constants';
|
|
5
4
|
export type SearchAiMessageProps = {
|
|
@@ -41,10 +41,8 @@ const react_1 = __importStar(require("react"));
|
|
|
41
41
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
42
42
|
const types_1 = require("../../core/types");
|
|
43
43
|
const constants_1 = require("../../core/constants");
|
|
44
|
-
const types_2 = require("../../core/types");
|
|
45
44
|
const Link_1 = require("../../components/Link/Link");
|
|
46
45
|
const Tag_1 = require("../../components/Tag/Tag");
|
|
47
|
-
const constants_2 = require("../../core/constants");
|
|
48
46
|
const hooks_1 = require("../../core/hooks");
|
|
49
47
|
const Markdown_1 = require("../../components/Markdown/Markdown");
|
|
50
48
|
const DocumentIcon_1 = require("../../icons/DocumentIcon/DocumentIcon");
|
|
@@ -70,7 +68,7 @@ function getExecuteDescription(args) {
|
|
|
70
68
|
}
|
|
71
69
|
function getToolCallDisplayText(toolCall) {
|
|
72
70
|
var _a;
|
|
73
|
-
if (toolCall.name ===
|
|
71
|
+
if (toolCall.name === types_1.ToolCallName.Execute) {
|
|
74
72
|
const description = getExecuteDescription(toolCall.args);
|
|
75
73
|
if (description) {
|
|
76
74
|
return { inProgressText: description, completedText: description };
|
|
@@ -123,8 +121,8 @@ function SearchAiMessageComponent({ role, content, isThinking, resources, classN
|
|
|
123
121
|
}
|
|
124
122
|
};
|
|
125
123
|
return (react_1.default.createElement(SearchAiMessageWrapper, { "data-component-name": "Search/SearchAiMessage", $role: role, className: className, "data-testid": "search-ai-message" },
|
|
126
|
-
role ===
|
|
127
|
-
react_1.default.createElement(MessageContentWrapper, null, role ===
|
|
124
|
+
role === constants_1.AiSearchConversationRole.ASSISTANT && (react_1.default.createElement(AiStarsIcon_1.AiStarsIcon, { size: "32px", background: "var(--search-ai-icon-bg-color)", borderRadius: "var(--border-radius-lg)", color: "var(--search-ai-icon-color)", margin: "0 var(--spacing-xs) 0 0" })),
|
|
125
|
+
react_1.default.createElement(MessageContentWrapper, null, role === constants_1.AiSearchConversationRole.ASSISTANT ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
128
126
|
react_1.default.createElement(MessageWrapper, { $role: role },
|
|
129
127
|
contentSegments.map((segment, index) => {
|
|
130
128
|
if (segment.type === 'tool') {
|
|
@@ -189,7 +187,7 @@ const SearchAiMessageWrapper = styled_components_1.default.div `
|
|
|
189
187
|
flex-direction: row;
|
|
190
188
|
align-items: flex-start;
|
|
191
189
|
width: 100%;
|
|
192
|
-
justify-content: ${({ $role }) => $role ===
|
|
190
|
+
justify-content: ${({ $role }) => $role === constants_1.AiSearchConversationRole.USER ? 'flex-end' : 'flex-start'};
|
|
193
191
|
`;
|
|
194
192
|
const MessageContentWrapper = styled_components_1.default.div `
|
|
195
193
|
display: flex;
|
|
@@ -215,7 +213,7 @@ const ResponseText = (0, styled_components_1.default)(Markdown_1.Markdown) `
|
|
|
215
213
|
}
|
|
216
214
|
`;
|
|
217
215
|
const MessageWrapper = styled_components_1.default.div `
|
|
218
|
-
padding: ${({ $role }) => $role ===
|
|
216
|
+
padding: ${({ $role }) => $role === constants_1.AiSearchConversationRole.USER
|
|
219
217
|
? 'var(--spacing-sm)'
|
|
220
218
|
: 'var(--spacing-sm) var(--spacing-sm) var(--spacing-xs) var(--spacing-sm)'};
|
|
221
219
|
border-radius: var(--border-radius-xl);
|
|
@@ -223,11 +221,11 @@ const MessageWrapper = styled_components_1.default.div `
|
|
|
223
221
|
max-width: 100%;
|
|
224
222
|
word-wrap: break-word;
|
|
225
223
|
white-space: pre-wrap;
|
|
226
|
-
background-color: ${({ $role }) => $role ===
|
|
224
|
+
background-color: ${({ $role }) => $role === constants_1.AiSearchConversationRole.USER
|
|
227
225
|
? 'var(--search-ai-user-bg-color)'
|
|
228
226
|
: 'var(--search-ai-assistant-bg-color)'};
|
|
229
|
-
border: ${({ $role }) => $role ===
|
|
230
|
-
color: ${({ $role }) => $role ===
|
|
227
|
+
border: ${({ $role }) => $role === constants_1.AiSearchConversationRole.USER ? 'none' : 'var(--search-ai-assistant-border)'};
|
|
228
|
+
color: ${({ $role }) => $role === constants_1.AiSearchConversationRole.USER
|
|
231
229
|
? 'var(--search-ai-user-text-color)'
|
|
232
230
|
: 'var(--search-ai-assistant-text-color)'};
|
|
233
231
|
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { JSX } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { SearchFacet, SearchFilterItem } from '../../core/types';
|
|
3
3
|
type SearchGroupsProps = {
|
|
4
4
|
facets: SearchFacet[];
|
|
5
5
|
searchFilter: SearchFilterItem[];
|
|
@@ -8,6 +8,7 @@ export type SplitButtonProps = {
|
|
|
8
8
|
children: ComponentProps<typeof Dropdown>['children'];
|
|
9
9
|
variant?: ButtonGroupVariant;
|
|
10
10
|
size?: ButtonGroupSize;
|
|
11
|
+
tone?: ButtonProps['tone'];
|
|
11
12
|
placement?: 'top' | 'bottom';
|
|
12
13
|
alignment?: 'start' | 'end';
|
|
13
14
|
portalled?: boolean;
|
|
@@ -10,12 +10,12 @@ const Button_1 = require("../../components/Button/Button");
|
|
|
10
10
|
const ButtonGroup_1 = require("../../components/Button/ButtonGroup");
|
|
11
11
|
const Dropdown_1 = require("../../components/Dropdown/Dropdown");
|
|
12
12
|
function SplitButton(props) {
|
|
13
|
-
const { button, children, variant, size, placement = 'bottom', alignment = 'end', portalled, closeOnSelect = true, disabled, toggleAriaLabel, onOpen, onClose, className, } = props;
|
|
13
|
+
const { button, children, variant, size, tone, placement = 'bottom', alignment = 'end', portalled, closeOnSelect = true, disabled, toggleAriaLabel, onOpen, onClose, className, } = props;
|
|
14
14
|
const hasMenu = typeof children === 'function' || react_1.default.Children.toArray(children).length > 0;
|
|
15
15
|
return (react_1.default.createElement(SplitButtonWrapper, { "data-component-name": "SplitButton/SplitButton", className: className },
|
|
16
16
|
react_1.default.createElement(ButtonGroup_1.ButtonGroup, { variant: variant, size: size },
|
|
17
17
|
button,
|
|
18
|
-
hasMenu ? (react_1.default.createElement(ToggleDropdown, { closeOnClick: closeOnSelect, placement: placement, alignment: alignment, portalled: portalled, withArrow: true, onOpen: onOpen, onClose: onClose, trigger: react_1.default.createElement(Button_1.Button, { "aria-label": toggleAriaLabel, "aria-haspopup": "menu", variant: variant, size: size, disabled: disabled }) }, children)) : null)));
|
|
18
|
+
hasMenu ? (react_1.default.createElement(ToggleDropdown, { closeOnClick: closeOnSelect, placement: placement, alignment: alignment, portalled: portalled, withArrow: true, onOpen: onOpen, onClose: onClose, trigger: react_1.default.createElement(Button_1.Button, { "aria-label": toggleAriaLabel, "aria-haspopup": "menu", variant: variant, size: size, tone: tone, disabled: disabled }) }, children)) : null)));
|
|
19
19
|
}
|
|
20
20
|
const SplitButtonWrapper = styled_components_1.default.div `
|
|
21
21
|
position: relative;
|
|
@@ -103,15 +103,13 @@ const PLACEMENTS = {
|
|
|
103
103
|
${({ $withArrow, $arrowPosition }) => $withArrow &&
|
|
104
104
|
(0, styled_components_1.css) `
|
|
105
105
|
&::after {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
border-top-style: solid;
|
|
110
|
-
border-radius: 2px;
|
|
106
|
+
width: 16px;
|
|
107
|
+
height: 8px;
|
|
108
|
+
clip-path: path('M0 0H16L9.414 6.586A2 2 0 0 1 6.586 6.586Z');
|
|
111
109
|
bottom: 0;
|
|
112
|
-
${$arrowPosition === 'left' && 'left:
|
|
110
|
+
${$arrowPosition === 'left' && 'left: 22px; transform: translateY(100%);'}
|
|
113
111
|
${$arrowPosition === 'center' && 'left: 50%; transform: translate(-50%, 100%);'}
|
|
114
|
-
${$arrowPosition === 'right' && 'right:
|
|
112
|
+
${$arrowPosition === 'right' && 'right: 22px; transform: translateY(100%);'}
|
|
115
113
|
}
|
|
116
114
|
`}
|
|
117
115
|
`,
|
|
@@ -135,15 +133,13 @@ const PLACEMENTS = {
|
|
|
135
133
|
${({ $withArrow, $arrowPosition }) => $withArrow &&
|
|
136
134
|
(0, styled_components_1.css) `
|
|
137
135
|
&::after {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
border-bottom-style: solid;
|
|
142
|
-
border-radius: 0 0 2px 2px;
|
|
136
|
+
width: 16px;
|
|
137
|
+
height: 8px;
|
|
138
|
+
clip-path: path('M0 8H16L9.414 1.414A2 2 0 0 0 6.586 1.414Z');
|
|
143
139
|
top: 0;
|
|
144
|
-
${$arrowPosition === 'left' && 'left:
|
|
140
|
+
${$arrowPosition === 'left' && 'left: 22px; transform: translateY(-100%);'}
|
|
145
141
|
${$arrowPosition === 'center' && 'left: 50%; transform: translate(-50%, -100%);'}
|
|
146
|
-
${$arrowPosition === 'right' && 'right:
|
|
142
|
+
${$arrowPosition === 'right' && 'right: 22px; transform: translateY(-100%);'}
|
|
147
143
|
}
|
|
148
144
|
`}
|
|
149
145
|
`,
|
|
@@ -156,11 +152,9 @@ const PLACEMENTS = {
|
|
|
156
152
|
${({ $withArrow }) => $withArrow &&
|
|
157
153
|
(0, styled_components_1.css) `
|
|
158
154
|
&::after {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
border-left-style: solid;
|
|
163
|
-
border-radius: 2px 0 0 2px;
|
|
155
|
+
width: 8px;
|
|
156
|
+
height: 16px;
|
|
157
|
+
clip-path: path('M0 0V16L6.586 9.414A2 2 0 0 0 6.586 6.586Z');
|
|
164
158
|
right: -9px;
|
|
165
159
|
top: 50%;
|
|
166
160
|
transform: translateY(-50%);
|
|
@@ -176,11 +170,9 @@ const PLACEMENTS = {
|
|
|
176
170
|
${({ $withArrow }) => $withArrow &&
|
|
177
171
|
(0, styled_components_1.css) `
|
|
178
172
|
&::after {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
border-right-style: solid;
|
|
183
|
-
border-radius: 0 2px 2px 0;
|
|
173
|
+
width: 8px;
|
|
174
|
+
height: 16px;
|
|
175
|
+
clip-path: path('M8 0V16L1.414 9.414A2 2 0 0 1 1.414 6.586Z');
|
|
184
176
|
left: -9px;
|
|
185
177
|
top: 50%;
|
|
186
178
|
transform: translateY(-50%);
|
|
@@ -222,9 +214,7 @@ const TooltipBody = styled_components_1.default.span.attrs(({ $anchorName }) =>
|
|
|
222
214
|
|
|
223
215
|
content: ' ';
|
|
224
216
|
display: inline-block;
|
|
225
|
-
|
|
226
|
-
height: 0;
|
|
227
|
-
border-color: var(--tooltip-arrow-color, var(--tooltip-bg-color));
|
|
217
|
+
background: var(--tooltip-arrow-color, var(--tooltip-bg-color));
|
|
228
218
|
}
|
|
229
219
|
|
|
230
220
|
background: var(--tooltip-bg-color);
|
|
@@ -112,12 +112,12 @@ function TooltipComponent({ children, isOpen, tip, withArrow = true, placement =
|
|
|
112
112
|
exports.Tooltip = (0, react_1.memo)(TooltipComponent);
|
|
113
113
|
const PLACEMENTS = {
|
|
114
114
|
top: (0, styled_components_1.css) `
|
|
115
|
-
${({ withArrow, arrowPosition }) => withArrow && arrowPosition === 'left'
|
|
115
|
+
${({ $withArrow, $arrowPosition }) => $withArrow && $arrowPosition === 'left'
|
|
116
116
|
? (0, styled_components_1.css) `
|
|
117
117
|
transform: translate(0, -100%);
|
|
118
118
|
margin-top: -10px;
|
|
119
119
|
`
|
|
120
|
-
: arrowPosition === 'right'
|
|
120
|
+
: $arrowPosition === 'right'
|
|
121
121
|
? (0, styled_components_1.css) `
|
|
122
122
|
transform: translate(-100%, -100%);
|
|
123
123
|
margin-top: -10px;
|
|
@@ -127,28 +127,26 @@ const PLACEMENTS = {
|
|
|
127
127
|
margin-top: -10px;
|
|
128
128
|
`}
|
|
129
129
|
|
|
130
|
-
${({ withArrow, arrowPosition }) => withArrow &&
|
|
130
|
+
${({ $withArrow, $arrowPosition }) => $withArrow &&
|
|
131
131
|
(0, styled_components_1.css) `
|
|
132
132
|
&::after {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
border-top-style: solid;
|
|
137
|
-
border-radius: 2px;
|
|
133
|
+
width: 16px;
|
|
134
|
+
height: 8px;
|
|
135
|
+
clip-path: path('M0 0H16L9.414 6.586A2 2 0 0 1 6.586 6.586Z');
|
|
138
136
|
bottom: 0;
|
|
139
|
-
${arrowPosition === 'left' && 'left:
|
|
140
|
-
${arrowPosition === 'center' && 'left: 50%; transform: translate(-50%, 99%);'}
|
|
141
|
-
${arrowPosition === 'right' && 'right:
|
|
137
|
+
${$arrowPosition === 'left' && 'left: 22px; transform: translateY(99%);'}
|
|
138
|
+
${$arrowPosition === 'center' && 'left: 50%; transform: translate(-50%, 99%);'}
|
|
139
|
+
${$arrowPosition === 'right' && 'right: 22px; transform: translateY(99%);'}
|
|
142
140
|
}
|
|
143
141
|
`}
|
|
144
142
|
`,
|
|
145
143
|
bottom: (0, styled_components_1.css) `
|
|
146
|
-
${({ withArrow, arrowPosition }) => withArrow && arrowPosition === 'left'
|
|
144
|
+
${({ $withArrow, $arrowPosition }) => $withArrow && $arrowPosition === 'left'
|
|
147
145
|
? (0, styled_components_1.css) `
|
|
148
146
|
transform: translate(0, 10px);
|
|
149
147
|
margin-top: 0;
|
|
150
148
|
`
|
|
151
|
-
: arrowPosition === 'right'
|
|
149
|
+
: $arrowPosition === 'right'
|
|
152
150
|
? (0, styled_components_1.css) `
|
|
153
151
|
transform: translate(-100%, 10px);
|
|
154
152
|
margin-top: 0;
|
|
@@ -158,18 +156,16 @@ const PLACEMENTS = {
|
|
|
158
156
|
margin-top: 0;
|
|
159
157
|
`}
|
|
160
158
|
|
|
161
|
-
${({ withArrow, arrowPosition }) => withArrow &&
|
|
159
|
+
${({ $withArrow, $arrowPosition }) => $withArrow &&
|
|
162
160
|
(0, styled_components_1.css) `
|
|
163
161
|
&::after {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
border-bottom-style: solid;
|
|
168
|
-
border-radius: 0 0 2px 2px;
|
|
162
|
+
width: 16px;
|
|
163
|
+
height: 8px;
|
|
164
|
+
clip-path: path('M0 8H16L9.414 1.414A2 2 0 0 0 6.586 1.414Z');
|
|
169
165
|
top: 0;
|
|
170
|
-
${arrowPosition === 'left' && 'left:
|
|
171
|
-
${arrowPosition === 'center' && 'left: 50%; transform: translate(-50%, -99%);'}
|
|
172
|
-
${arrowPosition === 'right' && 'right:
|
|
166
|
+
${$arrowPosition === 'left' && 'left: 22px; transform: translateY(-99%);'}
|
|
167
|
+
${$arrowPosition === 'center' && 'left: 50%; transform: translate(-50%, -99%);'}
|
|
168
|
+
${$arrowPosition === 'right' && 'right: 22px; transform: translateY(-99%);'}
|
|
173
169
|
}
|
|
174
170
|
`}
|
|
175
171
|
`,
|
|
@@ -177,19 +173,17 @@ const PLACEMENTS = {
|
|
|
177
173
|
transform: translate(-100%, -50%);
|
|
178
174
|
margin-left: -10px;
|
|
179
175
|
|
|
180
|
-
${({ withArrow, arrowPosition }) => withArrow &&
|
|
176
|
+
${({ $withArrow, $arrowPosition }) => $withArrow &&
|
|
181
177
|
(0, styled_components_1.css) `
|
|
182
178
|
&::after {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
border-left-style: solid;
|
|
187
|
-
border-radius: 2px 0 0 2px;
|
|
179
|
+
width: 8px;
|
|
180
|
+
height: 16px;
|
|
181
|
+
clip-path: path('M0 0V16L6.586 9.414A2 2 0 0 0 6.586 6.586Z');
|
|
188
182
|
top: 50%;
|
|
189
183
|
right: 0;
|
|
190
|
-
${arrowPosition === 'top' && 'top:
|
|
191
|
-
${arrowPosition === 'center' && 'top: 50%; transform: translate(99%, -50%);'}
|
|
192
|
-
${arrowPosition === 'bottom' && 'bottom:
|
|
184
|
+
${$arrowPosition === 'top' && 'top: 22px; transform: translateX(99%);'}
|
|
185
|
+
${$arrowPosition === 'center' && 'top: 50%; transform: translate(99%, -50%);'}
|
|
186
|
+
${$arrowPosition === 'bottom' && 'bottom: 22px; transform: translateX(99%);'}
|
|
193
187
|
}
|
|
194
188
|
`}
|
|
195
189
|
`,
|
|
@@ -197,19 +191,17 @@ const PLACEMENTS = {
|
|
|
197
191
|
transform: translate(0, -50%);
|
|
198
192
|
margin-left: 10px;
|
|
199
193
|
|
|
200
|
-
${({ withArrow, arrowPosition }) => withArrow &&
|
|
194
|
+
${({ $withArrow, $arrowPosition }) => $withArrow &&
|
|
201
195
|
(0, styled_components_1.css) `
|
|
202
196
|
&::after {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
border-right-style: solid;
|
|
207
|
-
border-radius: 0 2px 2px 0;
|
|
197
|
+
width: 8px;
|
|
198
|
+
height: 16px;
|
|
199
|
+
clip-path: path('M8 0V16L1.414 9.414A2 2 0 0 1 1.414 6.586Z');
|
|
208
200
|
top: 50%;
|
|
209
201
|
left: 0;
|
|
210
|
-
${arrowPosition === 'top' && 'top:
|
|
211
|
-
${arrowPosition === 'center' && 'top: 50%; transform: translate(-99%, -50%);'}
|
|
212
|
-
${arrowPosition === 'bottom' && 'bottom:
|
|
202
|
+
${$arrowPosition === 'top' && 'top: 22px; transform: translateX(-99%);'}
|
|
203
|
+
${$arrowPosition === 'center' && 'top: 50%; transform: translate(-99%, -50%);'}
|
|
204
|
+
${$arrowPosition === 'bottom' && 'bottom: 22px; transform: translateX(-99%);'}
|
|
213
205
|
}
|
|
214
206
|
`}
|
|
215
207
|
`,
|
|
@@ -240,9 +232,7 @@ const TooltipBody = styled_components_1.default.span `
|
|
|
240
232
|
|
|
241
233
|
content: ' ';
|
|
242
234
|
display: inline-block;
|
|
243
|
-
|
|
244
|
-
height: 0;
|
|
245
|
-
border-color: var(--tooltip-arrow-color, var(--tooltip-bg-color));
|
|
235
|
+
background: var(--tooltip-arrow-color, var(--tooltip-bg-color));
|
|
246
236
|
}
|
|
247
237
|
|
|
248
238
|
background: var(--tooltip-bg-color);
|
|
@@ -252,8 +242,6 @@ const TooltipBody = styled_components_1.default.span `
|
|
|
252
242
|
box-shadow: var(--bg-raised-shadow);
|
|
253
243
|
|
|
254
244
|
width: ${({ $width }) => $width || 'max-content'};
|
|
255
|
-
${({ $placement }) =>
|
|
256
|
-
${PLACEMENTS[$placement]};
|
|
257
|
-
`}
|
|
245
|
+
${({ $placement }) => PLACEMENTS[$placement]}
|
|
258
246
|
`;
|
|
259
247
|
//# sourceMappingURL=JsTooltip.js.map
|
|
@@ -41,8 +41,7 @@ const hooks_1 = require("../../core/hooks");
|
|
|
41
41
|
const utils_1 = require("../../core/utils");
|
|
42
42
|
function TooltipComponent(props) {
|
|
43
43
|
var _a, _b;
|
|
44
|
-
const {
|
|
45
|
-
const { isSupported } = useAnchorPositioning();
|
|
44
|
+
const { isSupported } = (0, hooks_1.useAnchorPositioning)();
|
|
46
45
|
const fallbackPlacements = (_a = props.fallbackPlacements) !== null && _a !== void 0 ? _a : (0, utils_1.getDefaultFallbackPlacements)((_b = props.placement) !== null && _b !== void 0 ? _b : 'top');
|
|
47
46
|
if (isSupported) {
|
|
48
47
|
return (react_1.default.createElement(AnchorTooltip_1.Tooltip, Object.assign({}, props, { fallbackPlacements: fallbackPlacements, arrowPosition: prepareArrowPosition(props.arrowPosition) })));
|