impact-nova 3.0.0-alpha.2 → 3.0.0-alpha.20
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/README.md +1 -1
- package/dist/_virtual/index.js +4 -4
- package/dist/_virtual/index2.js +4 -4
- package/dist/components/data/ag-grid-react/ag-grid-list.d.ts +3 -1
- package/dist/components/data/ag-grid-react/ag-grid-list.demo-board.d.ts +46 -0
- package/dist/components/data/ag-grid-react/ag-grid-list.js +9 -8
- package/dist/components/data/ag-grid-react/ag-grid-list.key-attributes.d.ts +1 -0
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +65 -3
- package/dist/components/data/ag-grid-react/build-list-drag-column-defs.d.ts +8 -0
- package/dist/components/data/ag-grid-react/build-list-drag-column-defs.js +28 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.d.ts +2 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.js +15 -14
- package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.d.ts +10 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.js +17 -0
- package/dist/components/data/ag-grid-react/cell-renderers/drag-handle-cell-renderer.d.ts +18 -0
- package/dist/components/data/ag-grid-react/cell-renderers/drag-handle-cell-renderer.js +32 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js +71 -46
- package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.js +48 -45
- package/dist/components/data/ag-grid-react/cell-renderers/index.d.ts +45 -7
- package/dist/components/data/ag-grid-react/cell-renderers/index.js +70 -58
- package/dist/components/data/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +88 -76
- package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.js +31 -33
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +18 -17
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts +5 -11
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js +127 -51
- package/dist/components/data/ag-grid-react/editable-utils.d.ts +9 -1
- package/dist/components/data/ag-grid-react/editable-utils.js +46 -41
- package/dist/components/data/ag-grid-react/headers/custom-header.js +110 -108
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +203 -199
- package/dist/components/data/ag-grid-react/index.d.ts +6 -1
- package/dist/components/data/ag-grid-react/index.js +316 -248
- package/dist/components/data/ag-grid-react/list-drag-grid-options.d.ts +34 -0
- package/dist/components/data/ag-grid-react/list-drag-grid-options.js +110 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-card.d.ts +4 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-card.js +14 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.d.ts +20 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.js +42 -0
- package/dist/components/data/ag-grid-react/list-find-highlight.d.ts +6 -0
- package/dist/components/data/ag-grid-react/list-find-highlight.js +7 -0
- package/dist/components/data/ag-grid-react/list-row-move.d.ts +84 -0
- package/dist/components/data/ag-grid-react/list-row-move.js +74 -0
- package/dist/components/data/ag-grid-react/numeric-column-header-alignment.d.ts +9 -0
- package/dist/components/data/ag-grid-react/numeric-column-header-alignment.js +67 -0
- package/dist/components/data/ag-grid-react/process-backend-columndefs.d.ts +10 -2
- package/dist/components/data/ag-grid-react/process-backend-columndefs.js +84 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.d.ts +67 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.js +162 -0
- package/dist/components/data/ag-grid-react/use-list-drag-preview.d.ts +20 -0
- package/dist/components/data/ag-grid-react/use-list-drag-preview.js +148 -0
- package/dist/components/data/ag-grid-react/use-list-find.d.ts +36 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.d.ts +46 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.js +92 -0
- package/dist/components/data/data-table/build-column-tree-from-grid.js +15 -15
- package/dist/components/data/data-table/column-picker-authority.js +9 -9
- package/dist/components/data/data-table/data-table-column-apply.js +30 -29
- package/dist/components/data/data-table/data-table-column-tree-cache.js +62 -60
- package/dist/components/data/data-table/data-table-list-header.d.ts +7 -0
- package/dist/components/data/data-table/data-table-list-header.js +31 -0
- package/dist/components/data/data-table/data-table-overlay.d.ts +6 -0
- package/dist/components/data/data-table/data-table-overlay.js +18 -0
- package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +3 -0
- package/dist/components/data/data-table/data-table-picker-column-eligibility.js +24 -4
- package/dist/components/data/data-table/data-table.js +35 -34
- package/dist/components/data/data-table/data-table.types.d.ts +13 -2
- package/dist/components/data/data-table/index.d.ts +10 -0
- package/dist/components/data/data-table/index.js +64 -52
- package/dist/components/data/data-table/use-data-table-viewport.d.ts +10 -0
- package/dist/components/data/data-table/use-data-table-viewport.js +31 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
- package/dist/components/data/expandable-list-item/index.d.ts +2 -0
- package/dist/components/data/expandable-list-item/index.js +20 -16
- package/dist/components/data/expandable-list-item/product-card-hero.d.ts +15 -0
- package/dist/components/data/expandable-list-item/product-card-iris-insight-trigger.d.ts +8 -0
- package/dist/components/data/expandable-list-item/product-card-iris-insight-trigger.js +41 -0
- package/dist/components/data/expandable-list-item/product-card-metrics-toggle.d.ts +13 -0
- package/dist/components/data/expandable-list-item/product-card-metrics-toggle.js +27 -0
- package/dist/components/data/expandable-list-item/sku-picker-chrome.d.ts +40 -0
- package/dist/components/data/expandable-list-item/sku-picker-chrome.js +150 -0
- package/dist/components/data/expandable-list-item/useServerSkuInfinitePages.d.ts +2 -1
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.catalog.d.ts +5 -4
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.sku-picker.d.ts +3 -2
- package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.d.ts +2 -0
- package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.js +16 -0
- package/dist/components/data/scenario-comparison/index.d.ts +3 -0
- package/dist/components/data/scenario-comparison/index.js +6 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-column.d.ts +12 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-column.js +172 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-label.d.ts +6 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-label.js +64 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.d.ts +5 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.js +127 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.types.d.ts +56 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.variants.d.ts +7 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.variants.js +29 -0
- package/dist/components/data-display/badge/index.d.ts +2 -0
- package/dist/components/data-display/badge/index.js +4 -2
- package/dist/components/data-display/badge/trophy-icon.d.ts +6 -0
- package/dist/components/data-display/badge/trophy-icon.js +28 -0
- package/dist/components/data-display/chart/chart-scatter3d.d.ts +39 -0
- package/dist/components/data-display/chart/chart-scatter3d.js +180 -0
- package/dist/components/data-display/chart/chart.js +125 -112
- package/dist/components/data-display/chart/chart.utils.js +122 -92
- package/dist/components/data-display/stereo-scatter/index.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/index.js +10 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-frame.d.ts +41 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-frame.js +178 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-theme.d.ts +14 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-theme.js +29 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-wedges.d.ts +23 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-wedges.js +80 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine.d.ts +120 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine.js +519 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-math.d.ts +64 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-math.js +129 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-model.d.ts +37 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-model.js +71 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-context.d.ts +33 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-context.js +19 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-key.d.ts +4 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-key.js +19 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-legend.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-legend.js +75 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-scene.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-scene.js +149 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-toolbar.d.ts +13 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-toolbar.js +93 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-tooltip.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-tooltip.js +62 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-viewport.d.ts +3 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-viewport.js +41 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.d.ts +12 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.js +107 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.stories-data.d.ts +11 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.types.d.ts +69 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.variants.d.ts +13 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.variants.js +42 -0
- package/dist/components/feedback/find-bar/collect-find-matches.d.ts +35 -0
- package/dist/components/feedback/find-bar/collect-find-matches.js +68 -0
- package/dist/components/feedback/find-bar/find-bar-shortcuts.d.ts +5 -0
- package/dist/components/feedback/find-bar/find-bar-shortcuts.js +27 -0
- package/dist/components/feedback/find-bar/find-bar.d.ts +7 -0
- package/dist/components/feedback/find-bar/find-bar.js +266 -0
- package/dist/components/feedback/find-bar/find-bar.types.d.ts +32 -0
- package/dist/components/feedback/find-bar/index.d.ts +4 -0
- package/dist/components/feedback/find-bar/index.js +11 -0
- package/dist/components/feedback/tooltip/button-icon-tooltip.d.ts +6 -1
- package/dist/components/feedback/tooltip/button-icon-tooltip.js +22 -17
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/feedback/tooltip/use-overflow-tooltip.js +44 -36
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/flows/iris-chat/IrisChatComposerVoiceCapture.d.ts +5 -0
- package/dist/components/flows/iris-chat/IrisChatComposerVoiceCapture.js +73 -0
- package/dist/components/flows/iris-chat/IrisChatHeaderWindowSizeButton.d.ts +5 -0
- package/dist/components/flows/iris-chat/IrisChatHeaderWindowSizeButton.js +49 -0
- package/dist/components/flows/iris-chat/IrisChatSnapTile.d.ts +8 -0
- package/dist/components/flows/iris-chat/IrisChatSnapTile.js +30 -0
- package/dist/components/flows/iris-chat/IrisChatVoiceWaveform.d.ts +3 -0
- package/dist/components/flows/iris-chat/IrisChatVoiceWaveform.js +25 -0
- package/dist/components/flows/iris-chat/IrisChatWindowSnapMenu.d.ts +4 -0
- package/dist/components/flows/iris-chat/IrisChatWindowSnapMenu.js +113 -0
- package/dist/components/flows/iris-chat/index.d.ts +3 -1
- package/dist/components/flows/iris-chat/index.js +58 -53
- package/dist/components/flows/iris-chat/iris-chat-artifact.js +46 -36
- package/dist/components/flows/iris-chat/iris-chat-chrome.d.ts +39 -0
- package/dist/components/flows/iris-chat/iris-chat-chrome.js +311 -0
- package/dist/components/flows/iris-chat/iris-chat-close-animation.d.ts +12 -0
- package/dist/components/flows/iris-chat/iris-chat-close-animation.js +21 -0
- package/dist/components/flows/iris-chat/iris-chat-composer.js +291 -234
- package/dist/components/flows/iris-chat/iris-chat-context.d.ts +16 -0
- package/dist/components/flows/iris-chat/iris-chat-context.js +14 -10
- package/dist/components/flows/iris-chat/iris-chat-copy-feedback.d.ts +4 -0
- package/dist/components/flows/iris-chat/iris-chat-copy-feedback.js +16 -0
- package/dist/components/flows/iris-chat/iris-chat-frame.d.ts +32 -0
- package/dist/components/flows/iris-chat/iris-chat-frame.js +88 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.d.ts +2 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.js +46 -20
- package/dist/components/flows/iris-chat/iris-chat-launch-animation.d.ts +11 -0
- package/dist/components/flows/iris-chat/iris-chat-launch-animation.js +35 -0
- package/dist/components/flows/iris-chat/iris-chat-markdown.js +82 -42
- package/dist/components/flows/iris-chat/iris-chat-menu.js +149 -117
- package/dist/components/flows/iris-chat/iris-chat-snap-presets.d.ts +7 -0
- package/dist/components/flows/iris-chat/iris-chat-snap-presets.js +83 -0
- package/dist/components/flows/iris-chat/iris-chat-speech.d.ts +52 -0
- package/dist/components/flows/iris-chat/iris-chat-speech.js +121 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +4 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.js +277 -220
- package/dist/components/flows/iris-chat/iris-chat-window-chrome.d.ts +33 -0
- package/dist/components/flows/iris-chat/iris-chat-window-chrome.js +37 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry-context.d.ts +14 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry-context.js +15 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry.d.ts +12 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry.js +113 -0
- package/dist/components/flows/iris-chat/iris-chat-window-handles.d.ts +6 -0
- package/dist/components/flows/iris-chat/iris-chat-window-handles.js +50 -0
- package/dist/components/flows/iris-chat/iris-chat-window-shell.d.ts +8 -0
- package/dist/components/flows/iris-chat/iris-chat-window-shell.js +37 -0
- package/dist/components/flows/iris-chat/iris-chat.d.ts +3 -39
- package/dist/components/flows/iris-chat/iris-chat.js +22 -330
- package/dist/components/flows/iris-chat/iris-chat.types.d.ts +20 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +4 -3
- package/dist/components/flows/iris-chat/iris-chat.variants.js +45 -22
- package/dist/components/flows/iris-chat/sync-iris-chat-composer-textarea.d.ts +6 -0
- package/dist/components/flows/iris-chat/sync-iris-chat-composer-textarea.js +23 -0
- package/dist/components/flows/iris-chat/use-iris-chat-root.d.ts +29 -0
- package/dist/components/flows/iris-chat/use-iris-chat-root.js +162 -0
- package/dist/components/forms/choice-card/choice-card-compare-scroll.d.ts +4 -0
- package/dist/components/forms/choice-card/choice-card-compare-scroll.js +6 -0
- package/dist/components/forms/choice-card/choice-card-percent.js +82 -51
- package/dist/components/forms/choice-card/choice-card.d.ts +14 -2
- package/dist/components/forms/choice-card/choice-card.js +470 -381
- package/dist/components/forms/choice-card/choice-card.types.d.ts +9 -2
- package/dist/components/forms/choice-card/choice-card.variants.js +24 -3
- package/dist/components/forms/input/input.js +5 -5
- package/dist/components/forms/select/components/SelectMenuPanel.js +15 -15
- package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
- package/dist/components/forms/select/components/Submenu.js +3 -2
- package/dist/components/layout/header/header.js +1 -0
- package/dist/components/layout/horizontal-scroller/horizontal-scroller-mask.d.ts +3 -0
- package/dist/components/layout/horizontal-scroller/horizontal-scroller-mask.js +12 -0
- package/dist/components/layout/horizontal-scroller/horizontal-scroller.js +181 -125
- package/dist/components/layout/horizontal-scroller/horizontal-scroller.types.d.ts +2 -0
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.d.ts +3 -1
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.js +77 -67
- package/dist/components/primitives/button/button.variants.js +1 -1
- package/dist/components/primitives/iris/iris-insight-truncated-text.d.ts +3 -0
- package/dist/components/primitives/iris/iris-insight-truncated-text.js +33 -0
- package/dist/components/primitives/iris/iris.d.ts +3 -1
- package/dist/components/primitives/iris/iris.js +85 -91
- package/dist/components/primitives/iris/iris.types.d.ts +9 -0
- package/dist/components/primitives/stepper/internals/step-model.d.ts +1 -1
- package/dist/components/primitives/stepper/internals/step-model.js +5 -5
- package/dist/components/primitives/stepper/internals/stepper-compact.js +13 -13
- package/dist/components/primitives/stepper/internals/stepper-pipeline.js +6 -6
- package/dist/components/primitives/stepper/internals/stepper-rail.js +15 -15
- package/dist/components/primitives/stepper/internals/stepper-summary.js +7 -7
- package/dist/components/primitives/stepper/internals/stepper-track.js +2 -2
- package/dist/components/primitives/stepper/stepper.js +99 -97
- package/dist/components/primitives/stepper/stepper.types.d.ts +4 -0
- package/dist/components/primitives/tabs/folder-tab-path.d.ts +6 -0
- package/dist/components/primitives/tabs/folder-tab-path.js +16 -0
- package/dist/components/primitives/tabs/tabs.js +178 -112
- package/dist/components/primitives/tabs/tabs.types.d.ts +1 -1
- package/dist/form-react/Fields/SelectField.js +66 -57
- package/dist/form-react/Fields/VirtualizedListField.d.ts +3 -0
- package/dist/form-react/Fields/VirtualizedListField.js +223 -0
- package/dist/form-react/fields.d.ts +1 -0
- package/dist/form-react/fields.js +28 -26
- package/dist/form-react/index.d.ts +1 -1
- package/dist/form-react/registry/defaultFieldRegistrations.d.ts +1 -1
- package/dist/form-react/registry/defaultFieldRegistrations.js +13 -12
- package/dist/form-react/types/fields.types.d.ts +48 -1
- package/dist/form-react/types/fieldsOutput.types.d.ts +4 -1
- package/dist/form-react/types/reactHookForm.types.d.ts +18 -1
- package/dist/form-react/utils/fieldDefaults.utils.js +1 -1
- package/dist/i18n/defaultMessages.d.ts +69 -0
- package/dist/i18n/defaultMessages.js +107 -42
- package/dist/i18n/impact-nova-i18n-defaults.d.ts +5 -0
- package/dist/i18n/impact-nova-i18n-defaults.js +4 -9
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +66 -1
- package/dist/i18n/locales/es.js +66 -1
- package/dist/i18n/locales/hi.js +66 -1
- package/dist/i18n/locales/kn.js +66 -1
- package/dist/impact-nova-components.css +372 -14
- package/dist/impact-nova-tokens.scss +4 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +627 -601
- package/dist/lib/alphabetical-sort.d.ts +3 -0
- package/dist/lib/alphabetical-sort.js +13 -0
- package/dist/lib/guidance/engine/guidance-engine.js +26 -27
- package/dist/lib/guidance/engine/step-navigation.d.ts +1 -0
- package/dist/lib/guidance/engine/step-navigation.js +16 -9
- package/dist/lib/guidance/types/guidance.types.d.ts +9 -1
- package/dist/lib/virtualized/index.d.ts +2 -0
- package/dist/lib/virtualized/index.js +35 -31
- package/dist/lib/virtualized/list-index.d.ts +5 -0
- package/dist/lib/virtualized/list-index.js +13 -0
- package/dist/lib/virtualized/read-infinite-query-list.d.ts +14 -0
- package/dist/lib/virtualized/read-infinite-query-list.js +12 -0
- package/dist/lib/virtualized/types.d.ts +4 -2
- package/dist/lib/virtualized/useRowState.js +60 -56
- package/dist/lib/virtualized/useVirtualizedList.d.ts +5 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/real-world-patterns.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/tailwind.config.js +3 -0
- package/dist/theme/tailwind-colors.js +3 -0
- package/package.json +23 -4
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { jsxs as C, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as w, useId as Z, useState as $, useEffect as m } from "react";
|
|
3
|
+
import { Search as q, ArrowUp as ee, ArrowDown as te, Cross as re } from "impact-nova-icons";
|
|
4
|
+
import { createComponent as ne } from "../../../lib/primitives/create-component.js";
|
|
5
|
+
import { cn as R } from "../../../lib/utils.js";
|
|
6
|
+
import { useImpactNovaI18n as ie } from "../../../i18n/use-impact-nova-i18n.js";
|
|
7
|
+
import { getFindCounterState as oe } from "./collect-find-matches.js";
|
|
8
|
+
import { createFindBarShortcutId as ae, setFindBarShortcutFocus as K, registerFindBarShortcutCapture as se, isFindBarShortcutOwner as ce } from "./find-bar-shortcuts.js";
|
|
9
|
+
function M(e) {
|
|
10
|
+
return e.metaKey || e.ctrlKey;
|
|
11
|
+
}
|
|
12
|
+
function le(e) {
|
|
13
|
+
if (e.key === "Enter" || e.key === "F3" || M(e) && e.key.toLowerCase() === "g")
|
|
14
|
+
return e.shiftKey ? "previous" : "next";
|
|
15
|
+
}
|
|
16
|
+
const ue = 500;
|
|
17
|
+
function de(e, t, i) {
|
|
18
|
+
const [o, l] = $(e), c = w(t), s = w(e);
|
|
19
|
+
m(() => {
|
|
20
|
+
c.current = t;
|
|
21
|
+
}, [t]), m(() => {
|
|
22
|
+
e !== s.current && (s.current = e, l(e));
|
|
23
|
+
}, [e]), m(() => {
|
|
24
|
+
if (i <= 0 || o === s.current) return;
|
|
25
|
+
const u = window.setTimeout(() => {
|
|
26
|
+
s.current = o, c.current(o);
|
|
27
|
+
}, i);
|
|
28
|
+
return () => window.clearTimeout(u);
|
|
29
|
+
}, [o, i]);
|
|
30
|
+
function d(u) {
|
|
31
|
+
l(u), i <= 0 && (s.current = u, c.current(u));
|
|
32
|
+
}
|
|
33
|
+
function f() {
|
|
34
|
+
o !== s.current && (s.current = o, c.current(o));
|
|
35
|
+
}
|
|
36
|
+
return { draft: o, emitDraft: d, commitDraft: f };
|
|
37
|
+
}
|
|
38
|
+
function fe(e) {
|
|
39
|
+
const {
|
|
40
|
+
inputRef: t,
|
|
41
|
+
query: i,
|
|
42
|
+
autoFocus: o,
|
|
43
|
+
captureShortcuts: l,
|
|
44
|
+
ownerId: c,
|
|
45
|
+
commitDraft: s,
|
|
46
|
+
onPrevious: d,
|
|
47
|
+
onNext: f,
|
|
48
|
+
onClose: u,
|
|
49
|
+
onKeyDown: h
|
|
50
|
+
} = e;
|
|
51
|
+
return m(() => {
|
|
52
|
+
o && (t.current?.focus(), t.current?.select());
|
|
53
|
+
}, [o, t]), m(() => {
|
|
54
|
+
if (l)
|
|
55
|
+
return se(c);
|
|
56
|
+
}, [l, c]), m(() => {
|
|
57
|
+
if (!l) return;
|
|
58
|
+
function p(r) {
|
|
59
|
+
if (!ce(c)) return;
|
|
60
|
+
if (M(r) && r.key.toLowerCase() === "f") {
|
|
61
|
+
r.preventDefault(), t.current?.focus(), t.current?.select();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const v = le(r);
|
|
65
|
+
!v || r.key === "Enter" || !i.trim() || (r.preventDefault(), v === "previous" ? d?.() : f?.());
|
|
66
|
+
}
|
|
67
|
+
return window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p);
|
|
68
|
+
}, [l, t, f, d, c, i]), function(r) {
|
|
69
|
+
if (h?.(r), !r.defaultPrevented) {
|
|
70
|
+
if (r.key === "Escape") {
|
|
71
|
+
r.preventDefault(), u?.();
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
r.key === "Enter" && (r.target instanceof HTMLButtonElement || (s(), !(!i.trim() && !t.current?.value.trim()) && (r.preventDefault(), r.shiftKey ? d?.() : f?.())));
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function me(e) {
|
|
79
|
+
const { counter: t } = e, i = !t.visible || t.noMatch;
|
|
80
|
+
return e.idle ? /* @__PURE__ */ a("span", { id: e.statusId, className: "sr-only", "aria-live": "polite", children: t.status }) : /* @__PURE__ */ C("div", { className: "flex shrink-0 items-center gap-2", "data-component": "find-bar-trail", children: [
|
|
81
|
+
t.visible ? /* @__PURE__ */ C(
|
|
82
|
+
"p",
|
|
83
|
+
{
|
|
84
|
+
className: R(
|
|
85
|
+
"whitespace-nowrap text-xs font-semibold leading-5",
|
|
86
|
+
t.noMatch ? "text-destructive" : "text-content-icon"
|
|
87
|
+
),
|
|
88
|
+
"aria-hidden": !0,
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ a("span", { className: t.noMatch ? "text-destructive" : "text-content-secondary", children: t.currentDisplay }),
|
|
91
|
+
"/",
|
|
92
|
+
t.matchCount
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
) : null,
|
|
96
|
+
/* @__PURE__ */ a("span", { id: e.statusId, className: "sr-only", "aria-live": "polite", children: t.status }),
|
|
97
|
+
/* @__PURE__ */ a("span", { className: "h-3 w-px shrink-0 bg-stroke", "aria-hidden": !0 }),
|
|
98
|
+
/* @__PURE__ */ C("div", { className: "flex items-center gap-2", children: [
|
|
99
|
+
/* @__PURE__ */ a(
|
|
100
|
+
"button",
|
|
101
|
+
{
|
|
102
|
+
type: "button",
|
|
103
|
+
"aria-label": e.previousLabel,
|
|
104
|
+
disabled: i,
|
|
105
|
+
className: "inline-flex size-4 shrink-0 items-center justify-center text-content-icon hover:text-content disabled:opacity-40",
|
|
106
|
+
onClick: e.onPrevious,
|
|
107
|
+
children: /* @__PURE__ */ a(ee, { size: 16, "aria-hidden": !0 })
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
/* @__PURE__ */ a(
|
|
111
|
+
"button",
|
|
112
|
+
{
|
|
113
|
+
type: "button",
|
|
114
|
+
"aria-label": e.nextLabel,
|
|
115
|
+
disabled: i,
|
|
116
|
+
className: "inline-flex size-4 shrink-0 items-center justify-center text-content-icon hover:text-content disabled:opacity-40",
|
|
117
|
+
onClick: e.onNext,
|
|
118
|
+
children: /* @__PURE__ */ a(te, { size: 16, "aria-hidden": !0 })
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
] }),
|
|
122
|
+
e.onClose ? /* @__PURE__ */ a(
|
|
123
|
+
"button",
|
|
124
|
+
{
|
|
125
|
+
type: "button",
|
|
126
|
+
"aria-label": e.closeLabel,
|
|
127
|
+
className: "inline-flex size-3.5 shrink-0 items-center justify-center text-content-icon hover:text-content",
|
|
128
|
+
onClick: e.onClose,
|
|
129
|
+
children: /* @__PURE__ */ a(re, { size: 14, "aria-hidden": !0 })
|
|
130
|
+
}
|
|
131
|
+
) : null
|
|
132
|
+
] });
|
|
133
|
+
}
|
|
134
|
+
const De = ne(
|
|
135
|
+
"FindBar",
|
|
136
|
+
({
|
|
137
|
+
className: e,
|
|
138
|
+
query: t,
|
|
139
|
+
onQueryChange: i,
|
|
140
|
+
debounceMs: o = ue,
|
|
141
|
+
activeIndex: l = 0,
|
|
142
|
+
matchCount: c = 0,
|
|
143
|
+
onPrevious: s,
|
|
144
|
+
onNext: d,
|
|
145
|
+
onClose: f,
|
|
146
|
+
autoFocus: u = !0,
|
|
147
|
+
captureShortcuts: h = !0,
|
|
148
|
+
placeholder: p,
|
|
149
|
+
findLabel: r,
|
|
150
|
+
previousLabel: v,
|
|
151
|
+
nextLabel: S,
|
|
152
|
+
closeLabel: T,
|
|
153
|
+
noResultsLabel: z,
|
|
154
|
+
onKeyDown: j,
|
|
155
|
+
onFocus: _,
|
|
156
|
+
onBlur: A,
|
|
157
|
+
...O
|
|
158
|
+
}, P) => {
|
|
159
|
+
const { t: b } = ie(), k = r ?? b("findBar.find"), U = v ?? b("findBar.previousMatch"), H = S ?? b("findBar.nextMatch"), W = T ?? b("findBar.closeFind"), Y = z ?? b("findBar.noResults"), D = w(null), g = w(ae()), F = Z(), y = oe({
|
|
160
|
+
query: t,
|
|
161
|
+
activeIndex: l,
|
|
162
|
+
matchCount: c,
|
|
163
|
+
noResultsLabel: Y
|
|
164
|
+
}), B = w(!1), { draft: N, emitDraft: L, commitDraft: E } = de(
|
|
165
|
+
t,
|
|
166
|
+
i,
|
|
167
|
+
o
|
|
168
|
+
);
|
|
169
|
+
function I() {
|
|
170
|
+
E(), f?.();
|
|
171
|
+
}
|
|
172
|
+
const G = fe({
|
|
173
|
+
inputRef: D,
|
|
174
|
+
query: t,
|
|
175
|
+
autoFocus: u,
|
|
176
|
+
captureShortcuts: h,
|
|
177
|
+
ownerId: g.current,
|
|
178
|
+
commitDraft: E,
|
|
179
|
+
onPrevious: s,
|
|
180
|
+
onNext: d,
|
|
181
|
+
onClose: I,
|
|
182
|
+
onKeyDown: j
|
|
183
|
+
});
|
|
184
|
+
function J(n) {
|
|
185
|
+
n.target instanceof Element && n.target.closest("button, input") || (n.preventDefault(), D.current?.focus());
|
|
186
|
+
}
|
|
187
|
+
function Q() {
|
|
188
|
+
h && K(g.current, !0);
|
|
189
|
+
}
|
|
190
|
+
function V(n) {
|
|
191
|
+
if (!h) return;
|
|
192
|
+
const x = n.relatedTarget;
|
|
193
|
+
x instanceof Node && n.currentTarget.contains(x) || K(g.current, !1);
|
|
194
|
+
}
|
|
195
|
+
function X(n) {
|
|
196
|
+
const x = n.nativeEvent;
|
|
197
|
+
B.current || "isComposing" in x && x.isComposing || L(n.currentTarget.value);
|
|
198
|
+
}
|
|
199
|
+
return /* @__PURE__ */ C(
|
|
200
|
+
"div",
|
|
201
|
+
{
|
|
202
|
+
ref: P,
|
|
203
|
+
role: "search",
|
|
204
|
+
"data-component": "find-bar",
|
|
205
|
+
"data-no-match": y.noMatch ? "true" : void 0,
|
|
206
|
+
className: R(
|
|
207
|
+
"inline-flex h-8 w-[200px] max-w-full shrink-0 items-center gap-2 overflow-hidden rounded-md border bg-canvas px-2 transition-colors focus-within:outline-none",
|
|
208
|
+
y.noMatch ? "border-destructive hover:border-destructive" : "border-stroke-field hover:border-brand focus-within:border-brand",
|
|
209
|
+
e
|
|
210
|
+
),
|
|
211
|
+
...O,
|
|
212
|
+
onKeyDown: G,
|
|
213
|
+
onMouseDown: J,
|
|
214
|
+
onFocus: (n) => {
|
|
215
|
+
_?.(n), Q();
|
|
216
|
+
},
|
|
217
|
+
onBlur: (n) => {
|
|
218
|
+
A?.(n), V(n);
|
|
219
|
+
},
|
|
220
|
+
children: [
|
|
221
|
+
/* @__PURE__ */ a(q, { size: 16, className: "shrink-0 text-content-icon", "aria-hidden": !0 }),
|
|
222
|
+
/* @__PURE__ */ a(
|
|
223
|
+
"input",
|
|
224
|
+
{
|
|
225
|
+
ref: D,
|
|
226
|
+
type: "text",
|
|
227
|
+
value: N,
|
|
228
|
+
placeholder: p ?? k,
|
|
229
|
+
"aria-label": k,
|
|
230
|
+
"aria-invalid": y.noMatch || void 0,
|
|
231
|
+
"aria-describedby": F,
|
|
232
|
+
autoComplete: "off",
|
|
233
|
+
autoCorrect: "off",
|
|
234
|
+
spellCheck: !1,
|
|
235
|
+
className: "min-w-0 flex-1 truncate bg-transparent p-0 text-sm font-medium leading-5 text-content-title outline-none placeholder:font-normal placeholder:leading-4 placeholder:text-content-placeholder",
|
|
236
|
+
onCompositionStart: () => {
|
|
237
|
+
B.current = !0;
|
|
238
|
+
},
|
|
239
|
+
onCompositionEnd: (n) => {
|
|
240
|
+
B.current = !1, L(n.currentTarget.value);
|
|
241
|
+
},
|
|
242
|
+
onChange: X
|
|
243
|
+
}
|
|
244
|
+
),
|
|
245
|
+
/* @__PURE__ */ a(
|
|
246
|
+
me,
|
|
247
|
+
{
|
|
248
|
+
counter: y,
|
|
249
|
+
statusId: F,
|
|
250
|
+
previousLabel: U,
|
|
251
|
+
nextLabel: H,
|
|
252
|
+
closeLabel: W,
|
|
253
|
+
onPrevious: s,
|
|
254
|
+
onNext: d,
|
|
255
|
+
onClose: f ? I : void 0,
|
|
256
|
+
idle: N.trim() === ""
|
|
257
|
+
}
|
|
258
|
+
)
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
);
|
|
264
|
+
export {
|
|
265
|
+
De as FindBar
|
|
266
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export interface FindBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
3
|
+
/** Current find query. */
|
|
4
|
+
query: string;
|
|
5
|
+
onQueryChange: (query: string) => void;
|
|
6
|
+
/**
|
|
7
|
+
* Delay before `onQueryChange` while typing. The field still updates immediately.
|
|
8
|
+
* Escape / close / Enter flush. Pass `0` to emit on every keystroke.
|
|
9
|
+
*/
|
|
10
|
+
debounceMs?: number;
|
|
11
|
+
/** 0-based index of the current match. */
|
|
12
|
+
activeIndex?: number;
|
|
13
|
+
/** Number of matches for `query`. */
|
|
14
|
+
matchCount?: number;
|
|
15
|
+
onPrevious?: () => void;
|
|
16
|
+
onNext?: () => void;
|
|
17
|
+
onClose?: () => void;
|
|
18
|
+
/** Focus the field on mount. Overlay find should leave this on; persistent bars should pass false. */
|
|
19
|
+
autoFocus?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* When true (default), this instance may own window ⌘F / Ctrl+F, ⌘G / Ctrl+G, and F3.
|
|
22
|
+
* Only the focused capturing bar — or the most recently mounted one if none is focused —
|
|
23
|
+
* actually handles those keys. Persistent bars that must leave browser find alone pass false.
|
|
24
|
+
*/
|
|
25
|
+
captureShortcuts?: boolean;
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
findLabel?: string;
|
|
28
|
+
previousLabel?: string;
|
|
29
|
+
nextLabel?: string;
|
|
30
|
+
closeLabel?: string;
|
|
31
|
+
noResultsLabel?: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { FindBar } from './find-bar';
|
|
2
|
+
export type { FindBarProps } from './find-bar.types';
|
|
3
|
+
export { clampFindMatchIndex, collectFindMatches, collectFindMatchOccurrences, getFindCounterState, splitFindHighlight, stepFindMatchIndex, } from './collect-find-matches';
|
|
4
|
+
export type { FindCounterState, FindHighlightPart, FindTextOccurrence, } from './collect-find-matches';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FindBar as c } from "./find-bar.js";
|
|
2
|
+
import { clampFindMatchIndex as i, collectFindMatchOccurrences as d, collectFindMatches as r, getFindCounterState as a, splitFindHighlight as l, stepFindMatchIndex as o } from "./collect-find-matches.js";
|
|
3
|
+
export {
|
|
4
|
+
c as FindBar,
|
|
5
|
+
i as clampFindMatchIndex,
|
|
6
|
+
d as collectFindMatchOccurrences,
|
|
7
|
+
r as collectFindMatches,
|
|
8
|
+
a as getFindCounterState,
|
|
9
|
+
l as splitFindHighlight,
|
|
10
|
+
o as stepFindMatchIndex
|
|
11
|
+
};
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { KeyBinding } from '../../primitives/kbd';
|
|
2
|
+
import { TooltipContentProps } from './tooltip.types';
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
export interface ButtonIconTooltipProps {
|
|
4
5
|
children: React.ReactElement;
|
|
5
6
|
label?: string;
|
|
6
7
|
side?: "top" | "bottom" | "left" | "right";
|
|
8
|
+
align?: TooltipContentProps["align"];
|
|
9
|
+
variant?: TooltipContentProps["variant"];
|
|
7
10
|
keybinding?: KeyBinding;
|
|
8
11
|
disabled?: boolean;
|
|
12
|
+
open?: boolean;
|
|
13
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
14
|
}
|
|
10
15
|
/**
|
|
11
16
|
* Wraps icon buttons with tooltip + optional Kbd badge.
|
|
12
17
|
* Use at app/feature layer — keeps Button free of feedback imports.
|
|
13
18
|
*/
|
|
14
|
-
export declare function ButtonIconTooltip({ children, label, side, keybinding, disabled, }: ButtonIconTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function ButtonIconTooltip({ children, label, side, align, variant, keybinding, disabled, open, onOpenChange, }: ButtonIconTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Kbd as
|
|
4
|
-
import { Tooltip as
|
|
5
|
-
function
|
|
6
|
-
children:
|
|
7
|
-
label:
|
|
8
|
-
side:
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import { Kbd as a } from "../../primitives/kbd/kbd.js";
|
|
4
|
+
import { Tooltip as d, TooltipTrigger as f, TooltipContent as u } from "./tooltip.js";
|
|
5
|
+
function j({
|
|
6
|
+
children: t,
|
|
7
|
+
label: n,
|
|
8
|
+
side: s = "top",
|
|
9
|
+
align: l = "center",
|
|
10
|
+
variant: p = "tertiary",
|
|
11
|
+
keybinding: r,
|
|
12
|
+
disabled: c,
|
|
13
|
+
open: e,
|
|
14
|
+
onOpenChange: m
|
|
11
15
|
}) {
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
|
|
16
|
+
return n ? /* @__PURE__ */ i(d, { ...e !== void 0 ? { open: e, onOpenChange: m ?? (() => {
|
|
17
|
+
}) } : {}, children: [
|
|
18
|
+
/* @__PURE__ */ o(f, { asChild: !0, children: c ? /* @__PURE__ */ o("span", { tabIndex: -1, className: "inline-block outline-none", children: t }) : t }),
|
|
19
|
+
/* @__PURE__ */ o(u, { variant: p, side: s, align: l, children: r ? /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
|
|
20
|
+
n,
|
|
16
21
|
" ",
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
] }) :
|
|
19
|
-
] }) :
|
|
22
|
+
/* @__PURE__ */ o(a, { keybinding: r, size: "sm" })
|
|
23
|
+
] }) : n })
|
|
24
|
+
] }) : t;
|
|
20
25
|
}
|
|
21
26
|
export {
|
|
22
|
-
|
|
27
|
+
j as ButtonIconTooltip
|
|
23
28
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Tooltip as l, TooltipTrigger as n, TooltipContent as o } from "./tooltip.js";
|
|
3
|
-
|
|
3
|
+
import "react";
|
|
4
|
+
const p = (i, r, a) => /* @__PURE__ */ t(l, { children: [
|
|
4
5
|
/* @__PURE__ */ e(n, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "inline-flex items-center justify-center h-full w-full", children: i }) }),
|
|
5
6
|
/* @__PURE__ */ e(o, { variant: "tertiary", className: a, children: r })
|
|
6
7
|
] }), h = (i, r) => /* @__PURE__ */ t(l, { children: [
|
|
@@ -9,5 +10,5 @@ const d = (i, r, a) => /* @__PURE__ */ t(l, { children: [
|
|
|
9
10
|
] });
|
|
10
11
|
export {
|
|
11
12
|
h as defaultAccordionTooltipRender,
|
|
12
|
-
|
|
13
|
+
p as defaultTabTooltipRender
|
|
13
14
|
};
|
|
@@ -4,106 +4,114 @@ const H = 500;
|
|
|
4
4
|
function N(o, s) {
|
|
5
5
|
return o !== void 0 ? o : typeof s == "string" ? s : null;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function z(o, {
|
|
8
8
|
content: s,
|
|
9
|
-
overflowMode:
|
|
9
|
+
overflowMode: g = "ellipsis",
|
|
10
10
|
alwaysShow: i = !1,
|
|
11
|
-
disabled:
|
|
12
|
-
focusable:
|
|
11
|
+
disabled: a = !1,
|
|
12
|
+
focusable: E = !1,
|
|
13
13
|
contentDependency: h
|
|
14
14
|
} = {}) {
|
|
15
|
-
const
|
|
15
|
+
const m = t.useRef(null), T = t.useRef(!1), u = t.useRef(
|
|
16
16
|
null
|
|
17
|
-
),
|
|
17
|
+
), O = t.useRef(null), [D, r] = t.useState(!1), [I, n] = t.useState(!1), v = t.useRef(!1), P = t.useRef(!1), p = N(s, o), C = typeof p == "string" ? p.trim().length > 0 : p != null, l = () => {
|
|
18
18
|
u.current && (clearTimeout(u.current), u.current = null);
|
|
19
19
|
}, c = () => {
|
|
20
|
-
const e =
|
|
21
|
-
e && (document.removeEventListener("scroll", e, !0),
|
|
20
|
+
const e = O.current;
|
|
21
|
+
e && (document.removeEventListener("scroll", e, !0), O.current = null);
|
|
22
22
|
}, A = () => {
|
|
23
23
|
l(), n(!1), r(!1);
|
|
24
24
|
}, _ = () => {
|
|
25
25
|
c();
|
|
26
26
|
const e = () => {
|
|
27
|
-
|
|
27
|
+
T.current = !1, A(), c();
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
O.current = e, document.addEventListener("scroll", e, {
|
|
30
30
|
capture: !0,
|
|
31
31
|
passive: !0
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
t.useEffect(() => {
|
|
35
35
|
r(!1), n(!1), l(), c();
|
|
36
|
-
}, [h, s, o, i,
|
|
36
|
+
}, [h, s, o, i, a, g]), t.useEffect(
|
|
37
37
|
() => () => {
|
|
38
38
|
l(), c();
|
|
39
39
|
},
|
|
40
40
|
[]
|
|
41
41
|
);
|
|
42
42
|
const k = t.useCallback((e) => {
|
|
43
|
-
|
|
44
|
-
}, []),
|
|
45
|
-
if (!(
|
|
46
|
-
if (
|
|
43
|
+
m.current = e;
|
|
44
|
+
}, []), R = (e) => i || L(e, g), d = (e, f) => {
|
|
45
|
+
if (!(a || !C)) {
|
|
46
|
+
if (R(e)) {
|
|
47
47
|
r(!0), n(!0);
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
r(!1), n(!1);
|
|
51
51
|
}
|
|
52
52
|
}, F = (e) => {
|
|
53
|
-
l()
|
|
54
|
-
|
|
53
|
+
l();
|
|
54
|
+
const f = R(e);
|
|
55
|
+
u.current = setTimeout(() => {
|
|
56
|
+
if (u.current = null, !!T.current) {
|
|
57
|
+
if (f) {
|
|
58
|
+
r(!0), n(!0);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
d(e);
|
|
62
|
+
}
|
|
55
63
|
}, H);
|
|
56
64
|
};
|
|
57
65
|
return {
|
|
58
66
|
setTriggerRef: k,
|
|
59
67
|
onTriggerPointerEnter: (e) => {
|
|
60
|
-
if (!(
|
|
61
|
-
if (
|
|
62
|
-
|
|
68
|
+
if (!(a || !C)) {
|
|
69
|
+
if (T.current = !0, _(), i) {
|
|
70
|
+
d(e.currentTarget);
|
|
63
71
|
return;
|
|
64
72
|
}
|
|
65
73
|
F(e.currentTarget);
|
|
66
74
|
}
|
|
67
75
|
},
|
|
68
76
|
onTriggerPointerLeave: () => {
|
|
69
|
-
|
|
77
|
+
T.current = !1, l();
|
|
70
78
|
},
|
|
71
|
-
onTriggerFocus:
|
|
72
|
-
|
|
79
|
+
onTriggerFocus: E ? (e) => {
|
|
80
|
+
d(e.currentTarget);
|
|
73
81
|
} : void 0,
|
|
74
82
|
onContentPointerEnter: () => {
|
|
75
|
-
|
|
83
|
+
v.current = !0, n(!0);
|
|
76
84
|
},
|
|
77
85
|
onContentPointerDown: () => {
|
|
78
|
-
|
|
86
|
+
P.current = !0, n(!0);
|
|
79
87
|
},
|
|
80
88
|
onContentPointerLeave: () => {
|
|
81
|
-
|
|
89
|
+
v.current = !1;
|
|
82
90
|
},
|
|
83
91
|
onContentPointerUp: () => {
|
|
84
|
-
|
|
92
|
+
P.current = !1;
|
|
85
93
|
},
|
|
86
|
-
triggerTabIndex:
|
|
94
|
+
triggerTabIndex: E ? 0 : void 0,
|
|
87
95
|
isTooltipArmed: D,
|
|
88
96
|
isTooltipOpen: I,
|
|
89
|
-
tooltipContent:
|
|
97
|
+
tooltipContent: p,
|
|
90
98
|
recheckOverflow: () => {
|
|
91
|
-
const e =
|
|
92
|
-
return !e ||
|
|
99
|
+
const e = m.current;
|
|
100
|
+
return !e || a || !C ? !1 : R(e) ? (r(!0), !0) : (r(!1), n(!1), !1);
|
|
93
101
|
},
|
|
94
102
|
handleTooltipOpenChange: (e) => {
|
|
95
|
-
if (!e && (
|
|
103
|
+
if (!e && (v.current || P.current) || e && !D && !i || (n(e), e))
|
|
96
104
|
return;
|
|
97
105
|
c();
|
|
98
|
-
const
|
|
99
|
-
if (!
|
|
106
|
+
const f = m.current;
|
|
107
|
+
if (!f) {
|
|
100
108
|
r(!1);
|
|
101
109
|
return;
|
|
102
110
|
}
|
|
103
|
-
!i && !L(
|
|
111
|
+
!i && !L(f, g) && r(!1);
|
|
104
112
|
}
|
|
105
113
|
};
|
|
106
114
|
}
|
|
107
115
|
export {
|
|
108
|
-
|
|
116
|
+
z as useOverflowTooltip
|
|
109
117
|
};
|
|
@@ -2,17 +2,17 @@ import { jsx as r, jsxs as h, Fragment as z } from "react/jsx-runtime";
|
|
|
2
2
|
import * as o from "react";
|
|
3
3
|
import { Person as G, Monitor as U, PriorityAlert as q, Locked as O, Reset as B } from "impact-nova-icons";
|
|
4
4
|
import { cn as p } from "../../../lib/utils.js";
|
|
5
|
+
import { Kbd as $ } from "../../primitives/kbd/kbd.js";
|
|
6
|
+
import { keybindingToString as H } from "../../primitives/kbd/keybinding-display.js";
|
|
5
7
|
import { OverflowTooltip as A } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
6
|
-
import { ModuleRegistry as
|
|
7
|
-
import { AllEnterpriseModule as
|
|
8
|
-
import { DataTable as
|
|
8
|
+
import { ModuleRegistry as V, AllCommunityModule as J } from "ag-grid-community";
|
|
9
|
+
import { AllEnterpriseModule as Q } from "ag-grid-enterprise";
|
|
10
|
+
import { DataTable as X, DataTableContent as Y } from "../../data/data-table/data-table.js";
|
|
9
11
|
import { AG_CELL_NO_PADDING as F } from "../../data/ag-grid-react/cell-renderers/index.js";
|
|
10
|
-
import { Kbd as X } from "../../primitives/kbd/kbd.js";
|
|
11
|
-
import { keybindingToString as Y } from "../../primitives/kbd/keybinding-display.js";
|
|
12
12
|
import { useCommandPalette as Z } from "./use-command-palette.js";
|
|
13
13
|
import { COMMAND_SOURCE_LABELS as m, keybindingFromEvent as W, isReservedShortcut as ee } from "./utils.js";
|
|
14
14
|
import { BadgeCellRenderer as te } from "../../data/ag-grid-react/cell-renderers/badge-cell-renderer.js";
|
|
15
|
-
|
|
15
|
+
V.registerModules([J, Q]);
|
|
16
16
|
function re(a) {
|
|
17
17
|
const t = a.data;
|
|
18
18
|
return t ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
|
|
@@ -69,7 +69,7 @@ function ne(a) {
|
|
|
69
69
|
"flex items-center justify-end h-full w-full text-end",
|
|
70
70
|
t.customisable ? "cursor-pointer" : "cursor-default opacity-70"
|
|
71
71
|
),
|
|
72
|
-
children: /* @__PURE__ */ r(
|
|
72
|
+
children: /* @__PURE__ */ r($, { keybinding: t.keybinding, size: "sm" })
|
|
73
73
|
}
|
|
74
74
|
) : t.customisable ? /* @__PURE__ */ r(
|
|
75
75
|
"button",
|
|
@@ -133,7 +133,7 @@ function le({
|
|
|
133
133
|
description: e.description || "",
|
|
134
134
|
category: e.category || "General",
|
|
135
135
|
keybinding: i,
|
|
136
|
-
keybindingDisplay: i ?
|
|
136
|
+
keybindingDisplay: i ? H(i) : "",
|
|
137
137
|
scope: e.scope,
|
|
138
138
|
source: D,
|
|
139
139
|
sourceColor: T ? "primary" : "neutral",
|
|
@@ -278,10 +278,10 @@ function le({
|
|
|
278
278
|
u?.type === "conflict" ? /* @__PURE__ */ r(q, { className: "h-3.5 w-3.5 shrink-0" }) : u?.type === "reserved" ? /* @__PURE__ */ r(O, { className: "h-3.5 w-3.5 shrink-0" }) : c ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
|
|
279
279
|
/* @__PURE__ */ r("span", { children: u ? u.text : L })
|
|
280
280
|
] }) : null;
|
|
281
|
-
return /* @__PURE__ */ h(
|
|
281
|
+
return /* @__PURE__ */ h(X, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
|
|
282
282
|
s ? s(E) : E,
|
|
283
283
|
/* @__PURE__ */ r(
|
|
284
|
-
|
|
284
|
+
Y,
|
|
285
285
|
{
|
|
286
286
|
rowData: y,
|
|
287
287
|
columnDefs: I,
|
|
@@ -6,8 +6,8 @@ import { cn as o } from "../../../lib/utils.js";
|
|
|
6
6
|
import { MultiColorFilter as F, Cross as P, InfoBadge as u } from "impact-nova-icons";
|
|
7
7
|
import { Button as D } from "../../primitives/button/button.js";
|
|
8
8
|
import { Tooltip as c, TooltipTrigger as f, TooltipContent as h } from "../../feedback/tooltip/tooltip.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { Kbd as S } from "../../primitives/kbd/kbd.js";
|
|
10
|
+
import { OverflowTooltip as j } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
11
11
|
import { useImpactNovaI18n as v } from "../../../i18n/use-impact-nova-i18n.js";
|
|
12
12
|
import { useOverlayHostDismissNestedLayersOnNavigation as I } from "../../../lib/overlay/overlay-portal-context.js";
|
|
13
13
|
import { preventDismissOnTooltipOutside as x } from "../../../lib/overlay/prevent-dismiss-on-tooltip-outside.js";
|
|
@@ -145,14 +145,14 @@ const O = ({
|
|
|
145
145
|
),
|
|
146
146
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-1 min-w-0", children: [
|
|
147
147
|
/* @__PURE__ */ e(
|
|
148
|
-
|
|
148
|
+
j,
|
|
149
149
|
{
|
|
150
150
|
triggerClassName: "truncate font-['Manrope'] block min-w-0",
|
|
151
151
|
content: t.tooltipKeybinding ? /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
|
|
152
152
|
t.label,
|
|
153
153
|
" ",
|
|
154
154
|
/* @__PURE__ */ e(
|
|
155
|
-
|
|
155
|
+
S,
|
|
156
156
|
{
|
|
157
157
|
keybinding: t.tooltipKeybinding,
|
|
158
158
|
size: "sm"
|