impact-nova 3.0.0-alpha.2 → 3.0.0-alpha.22
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/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 +53 -49
- 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-heatmap-layout.d.ts +31 -0
- package/dist/components/data-display/chart/chart-heatmap-layout.js +72 -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.category-cluster-heatmap.stories-data.d.ts +1 -1
- package/dist/components/data-display/chart/chart.js +171 -143
- package/dist/components/data-display/chart/chart.types.d.ts +17 -0
- package/dist/components/data-display/chart/chart.utils.js +122 -92
- package/dist/components/data-display/heatmap-grid/heatmap-grid-play.d.ts +9 -0
- package/dist/components/data-display/heatmap-grid/heatmap-grid.d.ts +32 -0
- package/dist/components/data-display/heatmap-grid/heatmap-grid.js +93 -0
- package/dist/components/data-display/heatmap-grid/heatmap-grid.layout.d.ts +46 -0
- package/dist/components/data-display/heatmap-grid/heatmap-grid.layout.js +80 -0
- package/dist/components/data-display/heatmap-grid/heatmap-grid.types.d.ts +54 -0
- package/dist/components/data-display/heatmap-grid/heatmap-grid.variants.d.ts +18 -0
- package/dist/components/data-display/heatmap-grid/heatmap-grid.variants.js +80 -0
- package/dist/components/data-display/heatmap-grid/index.d.ts +3 -0
- package/dist/components/data-display/heatmap-grid/index.js +14 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-cell.d.ts +14 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-cell.js +39 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-context.d.ts +29 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-context.js +33 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-tooltip.d.ts +4 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-tooltip.js +49 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-viewport.d.ts +3 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-viewport.js +173 -0
- package/dist/components/data-display/heatmap-grid/internals/use-heatmap-grid-viewport.d.ts +12 -0
- package/dist/components/data-display/heatmap-grid/internals/use-heatmap-grid-viewport.js +161 -0
- 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 +75 -0
- package/dist/i18n/defaultMessages.js +112 -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 +71 -1
- package/dist/i18n/locales/es.js +71 -1
- package/dist/i18n/locales/hi.js +71 -1
- package/dist/i18n/locales/kn.js +71 -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/tailwind.config.js +3 -0
- package/dist/theme/tailwind-colors.js +3 -0
- package/package.json +27 -4
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { Search as s, CardView as m, ListFilter as u, ArrowUp as h, ArrowDown as b, Back as f } from "impact-nova-icons";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Badge as v } from "../../data-display/badge/badge.js";
|
|
5
|
+
import { ButtonIconTooltip as c } from "../../feedback/tooltip/button-icon-tooltip.js";
|
|
6
|
+
import { Input as x } from "../../forms/input/input.js";
|
|
7
|
+
import { Accordion as w, AccordionItem as g, AccordionTrigger as C, AccordionContent as N } from "../../primitives/accordion/accordion.js";
|
|
8
|
+
import { Button as i } from "../../primitives/button/button.js";
|
|
9
|
+
import { cn as S } from "../../../lib/utils.js";
|
|
10
|
+
const o = "picker";
|
|
11
|
+
function y(e) {
|
|
12
|
+
return S(
|
|
13
|
+
e && "border-brand bg-accent text-brand hover:bg-accent hover:text-brand"
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function A(e) {
|
|
17
|
+
if (e.selectedCount === 0)
|
|
18
|
+
return /* @__PURE__ */ t("p", { className: "text-xs font-medium text-content-muted", children: e.emptyLabel });
|
|
19
|
+
const a = Math.max(0, e.selectedCount - e.previewCodes.length);
|
|
20
|
+
return /* @__PURE__ */ l("div", { className: "flex min-w-0 items-center gap-1", children: [
|
|
21
|
+
/* @__PURE__ */ t("p", { className: "truncate text-xs font-medium text-content-muted", children: e.previewCodes.join(", ") }),
|
|
22
|
+
a > 0 ? /* @__PURE__ */ l(v, { variant: "subtle", color: "primary", size: "sm", shape: "square", children: [
|
|
23
|
+
"+",
|
|
24
|
+
a
|
|
25
|
+
] }) : null
|
|
26
|
+
] });
|
|
27
|
+
}
|
|
28
|
+
function V(e) {
|
|
29
|
+
const a = e.title?.trim() ? e.title : void 0, n = /* @__PURE__ */ t(
|
|
30
|
+
A,
|
|
31
|
+
{
|
|
32
|
+
selectedCount: e.selectedCount,
|
|
33
|
+
previewCodes: e.previewCodes,
|
|
34
|
+
emptyLabel: e.emptyLabel ?? "No SKUs selected"
|
|
35
|
+
}
|
|
36
|
+
), r = /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3", children: [
|
|
37
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
38
|
+
/* @__PURE__ */ t(
|
|
39
|
+
x,
|
|
40
|
+
{
|
|
41
|
+
size: "default",
|
|
42
|
+
className: "w-[200px]",
|
|
43
|
+
placeholder: "Search",
|
|
44
|
+
value: e.search,
|
|
45
|
+
onChange: (d) => e.onSearchChange(d.target.value),
|
|
46
|
+
prefix: /* @__PURE__ */ t(s, { className: "size-4 text-content-placeholder", "aria-hidden": !0 }),
|
|
47
|
+
"aria-label": e.searchLabel ?? "Search SKUs"
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ t(
|
|
51
|
+
c,
|
|
52
|
+
{
|
|
53
|
+
label: e.view === "card" ? "Switch to list view" : "Switch to card view",
|
|
54
|
+
children: /* @__PURE__ */ t(
|
|
55
|
+
i,
|
|
56
|
+
{
|
|
57
|
+
type: "button",
|
|
58
|
+
size: "icon",
|
|
59
|
+
variant: "tertiary",
|
|
60
|
+
"aria-label": e.view === "card" ? "Switch to list view" : "Switch to card view",
|
|
61
|
+
"aria-pressed": e.view === "list",
|
|
62
|
+
onClick: () => e.onViewChange(e.view === "card" ? "list" : "card"),
|
|
63
|
+
children: e.view === "card" ? /* @__PURE__ */ t(m, {}) : /* @__PURE__ */ t(u, {})
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ t(
|
|
69
|
+
c,
|
|
70
|
+
{
|
|
71
|
+
label: e.sortDirection === "desc" ? "Sort Z to A" : "Sort A to Z",
|
|
72
|
+
children: /* @__PURE__ */ t(
|
|
73
|
+
i,
|
|
74
|
+
{
|
|
75
|
+
type: "button",
|
|
76
|
+
size: "icon",
|
|
77
|
+
variant: "tertiary",
|
|
78
|
+
"aria-label": e.sortDirection === "desc" ? "Sort Z to A" : "Sort A to Z",
|
|
79
|
+
"aria-pressed": e.sortDirection !== "none",
|
|
80
|
+
className: y(e.sortDirection !== "none"),
|
|
81
|
+
onClick: e.onToggleSort,
|
|
82
|
+
children: e.sortDirection === "desc" ? /* @__PURE__ */ t(h, {}) : /* @__PURE__ */ t(b, {})
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
] }),
|
|
88
|
+
e.showBulkActions === !1 ? null : /* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
89
|
+
/* @__PURE__ */ t(
|
|
90
|
+
i,
|
|
91
|
+
{
|
|
92
|
+
type: "button",
|
|
93
|
+
variant: "ghost",
|
|
94
|
+
className: "text-brand hover:text-brand",
|
|
95
|
+
onClick: e.onSelectAll,
|
|
96
|
+
disabled: e.allSelected === !0,
|
|
97
|
+
children: "Select All"
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
/* @__PURE__ */ t(
|
|
101
|
+
i,
|
|
102
|
+
{
|
|
103
|
+
type: "button",
|
|
104
|
+
variant: "ghost",
|
|
105
|
+
className: "text-brand hover:text-brand",
|
|
106
|
+
onClick: e.onClear,
|
|
107
|
+
disabled: e.selectedCount === 0,
|
|
108
|
+
children: "Clear"
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
] })
|
|
112
|
+
] });
|
|
113
|
+
return e.collapsible ? /* @__PURE__ */ t(
|
|
114
|
+
w,
|
|
115
|
+
{
|
|
116
|
+
type: "single",
|
|
117
|
+
collapsible: !0,
|
|
118
|
+
defaultValue: e.defaultCollapsed ? void 0 : o,
|
|
119
|
+
className: "w-full",
|
|
120
|
+
children: /* @__PURE__ */ l(g, { value: o, className: "border border-stroke-subtle", children: [
|
|
121
|
+
/* @__PURE__ */ t(C, { headingLevel: 3, rightActions: n, children: a ? /* @__PURE__ */ l("span", { className: "truncate text-sm font-semibold leading-6 text-content-title", children: [
|
|
122
|
+
a,
|
|
123
|
+
e.required ? /* @__PURE__ */ t("span", { className: "text-destructive", children: " *" }) : null
|
|
124
|
+
] }) : null }),
|
|
125
|
+
/* @__PURE__ */ l(N, { className: "flex flex-col gap-3", children: [
|
|
126
|
+
e.showToolbar === !1 ? null : r,
|
|
127
|
+
e.children,
|
|
128
|
+
e.footer
|
|
129
|
+
] })
|
|
130
|
+
] })
|
|
131
|
+
}
|
|
132
|
+
) : /* @__PURE__ */ l("div", { className: "flex w-full flex-col gap-3 overflow-hidden rounded-lg border border-stroke-subtle bg-canvas-elevated px-4 py-2", children: [
|
|
133
|
+
/* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3", children: [
|
|
134
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
135
|
+
e.showBack === !1 ? null : /* @__PURE__ */ t(i, { type: "button", size: "icon", variant: "ghost", "aria-label": "Back", children: /* @__PURE__ */ t(f, {}) }),
|
|
136
|
+
a ? /* @__PURE__ */ l("p", { className: "text-sm font-semibold leading-6 text-content-title", children: [
|
|
137
|
+
a,
|
|
138
|
+
e.required ? /* @__PURE__ */ t("span", { className: "text-destructive", children: " *" }) : null
|
|
139
|
+
] }) : null
|
|
140
|
+
] }),
|
|
141
|
+
n
|
|
142
|
+
] }),
|
|
143
|
+
e.showToolbar === !1 ? null : r,
|
|
144
|
+
e.children,
|
|
145
|
+
e.footer
|
|
146
|
+
] });
|
|
147
|
+
}
|
|
148
|
+
export {
|
|
149
|
+
V as SkuPickerChrome
|
|
150
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { AlphabeticalSortDirection } from '../../../lib/alphabetical-sort';
|
|
2
|
+
export declare function useServerSkuInfinitePages(search: string, sortDirection: AlphabeticalSortDirection): {
|
|
2
3
|
debouncedSearch: string;
|
|
3
4
|
query: import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<import('./virtualized-responsive-grid.catalog').SkuServerPage, unknown>, Error>;
|
|
4
5
|
loadedCatalogIndices: number[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ImageComponent } from 'impact-nova-icons';
|
|
2
|
+
import { AlphabeticalSortDirection } from '../../../lib/alphabetical-sort';
|
|
2
3
|
export declare const SKU_CATALOG_TOTAL = 50000;
|
|
3
4
|
export declare const ITEM_CATALOG_TOTAL = 50000;
|
|
4
5
|
export declare const SERVER_PAGE_SIZE = 200;
|
|
@@ -8,7 +9,7 @@ export declare const SKU_CARD_COLUMN_GAP = 12;
|
|
|
8
9
|
export declare const SKU_CARD_HEIGHT = 66;
|
|
9
10
|
export declare const SKU_LIST_MINIMUM_WIDTH = 155;
|
|
10
11
|
export declare const SKU_LIST_COLUMN_GAP = 80;
|
|
11
|
-
export declare const SKU_LIST_ROW_HEIGHT =
|
|
12
|
+
export declare const SKU_LIST_ROW_HEIGHT = 36;
|
|
12
13
|
export declare const SKU_LIST_ROW_GAP = 16;
|
|
13
14
|
export declare const SKU_STRIP_OVERSCAN = 12;
|
|
14
15
|
export declare const BY_ITEM_VISUAL_GRID_COLUMN_COUNT = 4;
|
|
@@ -57,11 +58,11 @@ export type SkuServerPage = {
|
|
|
57
58
|
nextStartIndex?: number;
|
|
58
59
|
};
|
|
59
60
|
/** Reuse the filtered catalog for later pages of the same search. Does not mutate cached arrays. */
|
|
60
|
-
export declare function getCachedSkuMatchingIndices(searchQuery: string,
|
|
61
|
+
export declare function getCachedSkuMatchingIndices(searchQuery: string, sortDirection: AlphabeticalSortDirection): number[] | null;
|
|
61
62
|
export declare function fetchSkuServerPage(options: {
|
|
62
63
|
startIndex: number;
|
|
63
64
|
searchQuery: string;
|
|
64
|
-
|
|
65
|
+
sortDirection: AlphabeticalSortDirection;
|
|
65
66
|
pageSize?: number;
|
|
66
67
|
}): Promise<SkuServerPage>;
|
|
67
68
|
export declare function getItemCatalogRecord(catalogIndex: number): ItemCatalogRecord;
|
|
@@ -75,7 +76,7 @@ export declare function collectStripCatalogIndices(options: {
|
|
|
75
76
|
export declare function filterAndSortCatalogIndices(options: {
|
|
76
77
|
totalCount: number;
|
|
77
78
|
searchQuery: string;
|
|
78
|
-
|
|
79
|
+
sortDirection: AlphabeticalSortDirection;
|
|
79
80
|
getSearchText: (catalogIndex: number) => string;
|
|
80
81
|
getSortKey: (catalogIndex: number) => string;
|
|
81
82
|
}): number[] | null;
|
package/dist/components/data/expandable-list-item/virtualized-responsive-grid.sku-picker.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
1
|
+
import { SkuPickerGridProps } from './sku-picker-chrome';
|
|
2
|
+
export declare function ClientSkuPickerGrid(props?: SkuPickerGridProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function ServerSkuPickerGrid(props?: SkuPickerGridProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function a(c, e = 0) {
|
|
2
|
+
return c.flatMap((n) => {
|
|
3
|
+
const t = n.children ?? [];
|
|
4
|
+
return [{
|
|
5
|
+
id: n.id,
|
|
6
|
+
label: n.label,
|
|
7
|
+
icon: n.icon,
|
|
8
|
+
swatch: n.swatch,
|
|
9
|
+
depth: e,
|
|
10
|
+
emphasized: t.length > 0
|
|
11
|
+
}, ...a(t, e + 1)];
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
a as flattenScenarioComparisonRows
|
|
16
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ScenarioComparison } from './scenario-comparison';
|
|
2
|
+
export { flattenScenarioComparisonRows } from './flatten-scenario-comparison-rows';
|
|
3
|
+
export type { ScenarioComparisonProps, ScenarioComparisonRow, ScenarioComparisonColumn, ScenarioComparisonCell, FlatScenarioComparisonRow, ScenarioComparisonLabelState, ScenarioComparisonCellState, } from './scenario-comparison.types';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FlatScenarioComparisonRow, ScenarioComparisonColumn as ScenarioComparisonColumnData, ScenarioComparisonProps } from './scenario-comparison.types';
|
|
3
|
+
export declare function ScenarioComparisonColumn({ column, rows, hoveredRowId, metricHeaders, selectLabel, selectedLabel, renderCell, onHoverChange, }: {
|
|
4
|
+
column: ScenarioComparisonColumnData;
|
|
5
|
+
rows: readonly FlatScenarioComparisonRow[];
|
|
6
|
+
hoveredRowId: string | null;
|
|
7
|
+
metricHeaders: readonly ReactNode[];
|
|
8
|
+
selectLabel: string;
|
|
9
|
+
selectedLabel: string;
|
|
10
|
+
renderCell?: ScenarioComparisonProps["renderCell"];
|
|
11
|
+
onHoverChange: (rowId: string | null) => void;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { jsxs as h, Fragment as x, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Badge as g } from "../../data-display/badge/badge.js";
|
|
3
|
+
import { Button as w } from "../../primitives/button/button.js";
|
|
4
|
+
import { useChoiceCardCompare as N, ChoiceCardHeader as y, ChoiceCardFooter as S, useChoiceCardItem as v, ChoiceCardTitle as z, useChoiceCardGroup as j } from "../../forms/choice-card/choice-card.js";
|
|
5
|
+
import { cn as d } from "../../../lib/utils.js";
|
|
6
|
+
import { scenarioComparisonRowsClassName as R } from "./scenario-comparison.variants.js";
|
|
7
|
+
import { choiceCardCompareRowsScrollAccessibility as B } from "../../forms/choice-card/choice-card-compare-scroll.js";
|
|
8
|
+
function b(t) {
|
|
9
|
+
t.stopPropagation();
|
|
10
|
+
}
|
|
11
|
+
function M({
|
|
12
|
+
selectLabel: t,
|
|
13
|
+
selectedLabel: n
|
|
14
|
+
}) {
|
|
15
|
+
const i = j(), a = v();
|
|
16
|
+
return /* @__PURE__ */ e(
|
|
17
|
+
w,
|
|
18
|
+
{
|
|
19
|
+
type: "button",
|
|
20
|
+
variant: "outline",
|
|
21
|
+
disabled: a.disabled,
|
|
22
|
+
"aria-pressed": a.selected,
|
|
23
|
+
className: d(
|
|
24
|
+
"capitalize bg-canvas-elevated",
|
|
25
|
+
a.selected && "border-brand-hover bg-accent hover:bg-accent"
|
|
26
|
+
),
|
|
27
|
+
onPointerDown: b,
|
|
28
|
+
onClick: (r) => {
|
|
29
|
+
b(r), a.disabled || i.setValue(a.value);
|
|
30
|
+
},
|
|
31
|
+
children: a.selected ? n : t
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
function T({
|
|
36
|
+
title: t,
|
|
37
|
+
selectedLabel: n
|
|
38
|
+
}) {
|
|
39
|
+
const i = v();
|
|
40
|
+
return /* @__PURE__ */ h("div", { className: "flex w-max min-w-full items-center gap-1", children: [
|
|
41
|
+
/* @__PURE__ */ e(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
"data-slot": "scenario-comparison-title",
|
|
45
|
+
className: "flex h-9 min-w-max flex-1 items-center justify-center rounded-lg bg-accent px-3 py-2",
|
|
46
|
+
children: /* @__PURE__ */ e(z, { className: "whitespace-nowrap text-center text-base font-semibold leading-6 text-content-charcoal", children: t })
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
i.selected ? /* @__PURE__ */ e(
|
|
50
|
+
g,
|
|
51
|
+
{
|
|
52
|
+
variant: "solid",
|
|
53
|
+
color: "success",
|
|
54
|
+
"data-slot": "scenario-comparison-selected",
|
|
55
|
+
className: "shrink-0",
|
|
56
|
+
children: n
|
|
57
|
+
}
|
|
58
|
+
) : null
|
|
59
|
+
] });
|
|
60
|
+
}
|
|
61
|
+
function k({
|
|
62
|
+
cell: t,
|
|
63
|
+
emphasized: n,
|
|
64
|
+
hovered: i,
|
|
65
|
+
isLastRow: a,
|
|
66
|
+
columnCount: r
|
|
67
|
+
}) {
|
|
68
|
+
const l = r > 0 ? r : t?.values?.length ?? 0;
|
|
69
|
+
return /* @__PURE__ */ e(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
"data-slot": "scenario-comparison-values",
|
|
73
|
+
className: d(
|
|
74
|
+
"flex h-full w-full min-w-0 items-center justify-between px-4 py-1 transition-colors",
|
|
75
|
+
!a && "border-b border-canvas-tint",
|
|
76
|
+
i && "rounded-lg bg-accent"
|
|
77
|
+
),
|
|
78
|
+
children: Array.from({ length: l }, (f, s) => {
|
|
79
|
+
const c = t?.values?.[s];
|
|
80
|
+
return t?.badgeIndexes?.includes(s) && c != null ? /* @__PURE__ */ e(
|
|
81
|
+
g,
|
|
82
|
+
{
|
|
83
|
+
variant: "subtle",
|
|
84
|
+
color: "success",
|
|
85
|
+
size: "sm",
|
|
86
|
+
className: "capitalize",
|
|
87
|
+
children: c
|
|
88
|
+
},
|
|
89
|
+
s
|
|
90
|
+
) : /* @__PURE__ */ e(
|
|
91
|
+
"p",
|
|
92
|
+
{
|
|
93
|
+
className: d(
|
|
94
|
+
"text-sm leading-[21px]",
|
|
95
|
+
s === 0 && n ? "font-bold text-indicator-sort" : "font-medium text-content"
|
|
96
|
+
),
|
|
97
|
+
children: c ?? "—"
|
|
98
|
+
},
|
|
99
|
+
s
|
|
100
|
+
);
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
function L({
|
|
106
|
+
column: t,
|
|
107
|
+
rows: n,
|
|
108
|
+
hoveredRowId: i,
|
|
109
|
+
metricHeaders: a,
|
|
110
|
+
selectLabel: r,
|
|
111
|
+
selectedLabel: l,
|
|
112
|
+
renderCell: f,
|
|
113
|
+
onHoverChange: s
|
|
114
|
+
}) {
|
|
115
|
+
const c = a.length, C = N();
|
|
116
|
+
return /* @__PURE__ */ h(x, { children: [
|
|
117
|
+
/* @__PURE__ */ h(y, { className: "flex-col items-stretch gap-3 overflow-visible pt-3 pb-3", children: [
|
|
118
|
+
/* @__PURE__ */ e(T, { title: t.title, selectedLabel: l }),
|
|
119
|
+
a.length > 0 ? /* @__PURE__ */ e(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
"data-slot": "scenario-comparison-metrics",
|
|
123
|
+
className: "flex w-full items-center justify-between rounded-lg border border-canvas-tint bg-canvas-wash p-2 text-xs font-bold leading-5 text-content-heading capitalize",
|
|
124
|
+
children: a.map((o, m) => /* @__PURE__ */ e("span", { className: "whitespace-nowrap", children: o }, m))
|
|
125
|
+
}
|
|
126
|
+
) : null
|
|
127
|
+
] }),
|
|
128
|
+
/* @__PURE__ */ e(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
"data-slot": "choice-card-compare-rows",
|
|
132
|
+
className: d(R, "[grid-row:3]"),
|
|
133
|
+
onScroll: C.syncRowsScroll,
|
|
134
|
+
...B,
|
|
135
|
+
children: n.map((o, m) => {
|
|
136
|
+
const p = t.values?.[o.id], u = i === o.id;
|
|
137
|
+
return /* @__PURE__ */ e(
|
|
138
|
+
"div",
|
|
139
|
+
{
|
|
140
|
+
"data-row-id": o.id,
|
|
141
|
+
"data-hovered": u || void 0,
|
|
142
|
+
className: "flex h-11 items-center",
|
|
143
|
+
onMouseEnter: () => s(o.id),
|
|
144
|
+
onMouseLeave: () => s(null),
|
|
145
|
+
children: f?.({ row: o, column: t, cell: p, hovered: u }) ?? /* @__PURE__ */ e(
|
|
146
|
+
k,
|
|
147
|
+
{
|
|
148
|
+
cell: p,
|
|
149
|
+
emphasized: p?.emphasized ?? o.emphasized,
|
|
150
|
+
hovered: u,
|
|
151
|
+
isLastRow: m === n.length - 1,
|
|
152
|
+
columnCount: c
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
},
|
|
156
|
+
o.id
|
|
157
|
+
);
|
|
158
|
+
})
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ e(S, { className: "flex-nowrap items-center justify-center self-center py-3", children: /* @__PURE__ */ e(
|
|
162
|
+
M,
|
|
163
|
+
{
|
|
164
|
+
selectLabel: r,
|
|
165
|
+
selectedLabel: l
|
|
166
|
+
}
|
|
167
|
+
) })
|
|
168
|
+
] });
|
|
169
|
+
}
|
|
170
|
+
export {
|
|
171
|
+
L as ScenarioComparisonColumn
|
|
172
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FlatScenarioComparisonRow } from './scenario-comparison.types';
|
|
2
|
+
export declare function ScenarioComparisonLabel({ row, hovered, onHoverChange, }: {
|
|
3
|
+
row: FlatScenarioComparisonRow;
|
|
4
|
+
hovered: boolean;
|
|
5
|
+
onHoverChange: (rowId: string | null) => void;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { OverflowTooltip as c } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
4
|
+
import { cn as n } from "../../../lib/utils.js";
|
|
5
|
+
import { scenarioComparisonLabelVariants as t, scenarioComparisonConnectorClassName as d } from "./scenario-comparison.variants.js";
|
|
6
|
+
function b({
|
|
7
|
+
row: a,
|
|
8
|
+
hovered: r,
|
|
9
|
+
onHoverChange: s
|
|
10
|
+
}) {
|
|
11
|
+
const o = a.depth > 0 ? "child" : "parent", l = a.swatch ? {
|
|
12
|
+
backgroundColor: `color-mix(in srgb, ${a.swatch} 14%, var(--color-background))`,
|
|
13
|
+
borderColor: `color-mix(in srgb, ${a.swatch} 14%, var(--color-background))`,
|
|
14
|
+
color: a.swatch
|
|
15
|
+
} : void 0;
|
|
16
|
+
return /* @__PURE__ */ e(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
"data-slot": "scenario-comparison-label",
|
|
20
|
+
"data-row-id": a.id,
|
|
21
|
+
"data-hovered": r || void 0,
|
|
22
|
+
className: n(
|
|
23
|
+
"flex h-full w-full min-w-0 items-stretch justify-end self-stretch"
|
|
24
|
+
),
|
|
25
|
+
onMouseEnter: () => s(a.id),
|
|
26
|
+
onMouseLeave: () => s(null),
|
|
27
|
+
children: /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-1 items-center justify-end", children: [
|
|
28
|
+
/* @__PURE__ */ i(
|
|
29
|
+
"span",
|
|
30
|
+
{
|
|
31
|
+
className: n(
|
|
32
|
+
"self-center",
|
|
33
|
+
t({ kind: o })
|
|
34
|
+
),
|
|
35
|
+
style: o === "child" ? l : void 0,
|
|
36
|
+
children: [
|
|
37
|
+
a.icon ? /* @__PURE__ */ e("span", { className: "size-4 shrink-0 [&_svg]:size-4", children: a.icon }) : null,
|
|
38
|
+
a.swatch ? /* @__PURE__ */ e(
|
|
39
|
+
"span",
|
|
40
|
+
{
|
|
41
|
+
className: "size-3 shrink-0 rounded-full",
|
|
42
|
+
style: { backgroundColor: a.swatch },
|
|
43
|
+
"aria-hidden": "true"
|
|
44
|
+
}
|
|
45
|
+
) : null,
|
|
46
|
+
/* @__PURE__ */ e(c, { triggerClassName: "block max-w-[7.5rem] truncate", children: a.label })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ e(
|
|
51
|
+
"span",
|
|
52
|
+
{
|
|
53
|
+
"data-slot": "scenario-comparison-connector",
|
|
54
|
+
className: d,
|
|
55
|
+
"aria-hidden": "true"
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
] })
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
b as ScenarioComparisonLabel
|
|
64
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ScenarioComparisonProps } from './scenario-comparison.types';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const ScenarioComparison: React.ForwardRefExoticComponent<ScenarioComparisonProps & React.RefAttributes<HTMLElement>>;
|
|
4
|
+
export { ScenarioComparison };
|
|
5
|
+
export type { ScenarioComparisonProps };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as j from "react";
|
|
3
|
+
import { OverflowTooltip as k } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
4
|
+
import { ChoiceCardGroup as y, ChoiceCardCompare as I, ChoiceCardCompareLabels as M, ChoiceCard as O } from "../../forms/choice-card/choice-card.js";
|
|
5
|
+
import { ScrollOverflowAffordance as V } from "../../layout/horizontal-scroller/scroll-overflow-affordance.js";
|
|
6
|
+
import { useImpactNovaI18n as A } from "../../../i18n/use-impact-nova-i18n.js";
|
|
7
|
+
import { createComponent as D } from "../../../lib/primitives/create-component.js";
|
|
8
|
+
import { cn as E } from "../../../lib/utils.js";
|
|
9
|
+
import { flattenScenarioComparisonRows as G } from "./flatten-scenario-comparison-rows.js";
|
|
10
|
+
import { ScenarioComparisonColumn as T } from "./scenario-comparison-column.js";
|
|
11
|
+
import { ScenarioComparisonLabel as q } from "./scenario-comparison-label.js";
|
|
12
|
+
import { scenarioComparisonCardVariants as z, scenarioComparisonRootVariants as B } from "./scenario-comparison.variants.js";
|
|
13
|
+
const $ = D(
|
|
14
|
+
"ScenarioComparison",
|
|
15
|
+
({
|
|
16
|
+
title: i,
|
|
17
|
+
badge: f,
|
|
18
|
+
toolbar: n,
|
|
19
|
+
rows: h,
|
|
20
|
+
columns: l,
|
|
21
|
+
value: C,
|
|
22
|
+
defaultValue: v,
|
|
23
|
+
onValueChange: x,
|
|
24
|
+
metricHeaders: u,
|
|
25
|
+
selectLabel: w,
|
|
26
|
+
selectedLabel: g,
|
|
27
|
+
renderLabel: s,
|
|
28
|
+
renderCell: N,
|
|
29
|
+
className: b,
|
|
30
|
+
disabled: t
|
|
31
|
+
}, S) => {
|
|
32
|
+
const { t: c } = A(), [m, o] = j.useState(null), d = G(h), R = w ?? c("scenarioComparison.select"), H = g ?? c("scenarioComparison.selected"), L = u ?? [];
|
|
33
|
+
return /* @__PURE__ */ a(
|
|
34
|
+
"section",
|
|
35
|
+
{
|
|
36
|
+
ref: S,
|
|
37
|
+
"data-component": "scenario-comparison",
|
|
38
|
+
className: E(B(), b),
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ a("header", { className: "flex shrink-0 flex-wrap items-center justify-between gap-x-3 gap-y-2", children: [
|
|
41
|
+
/* @__PURE__ */ a("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
42
|
+
i ? /* @__PURE__ */ r("h2", { className: "min-w-0 max-w-full shrink-0 text-sm font-bold leading-[1.15] tracking-[-0.14px] text-content", children: /* @__PURE__ */ r(k, { triggerClassName: "block max-w-[14rem] truncate sm:max-w-none", children: i }) }) : null,
|
|
43
|
+
f
|
|
44
|
+
] }),
|
|
45
|
+
n ? /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-1 flex-wrap items-center justify-end gap-3", children: n }) : null
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ r(
|
|
48
|
+
y,
|
|
49
|
+
{
|
|
50
|
+
value: C,
|
|
51
|
+
defaultValue: v,
|
|
52
|
+
onValueChange: x,
|
|
53
|
+
disabled: t,
|
|
54
|
+
orientation: "vertical",
|
|
55
|
+
className: "flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-hidden !gap-0",
|
|
56
|
+
children: /* @__PURE__ */ r(
|
|
57
|
+
V,
|
|
58
|
+
{
|
|
59
|
+
className: "h-full min-h-0 flex-1",
|
|
60
|
+
viewportClassName: "h-full min-h-0",
|
|
61
|
+
hideScrollbar: !0,
|
|
62
|
+
contentDependency: l.length,
|
|
63
|
+
children: /* @__PURE__ */ a(
|
|
64
|
+
I,
|
|
65
|
+
{
|
|
66
|
+
fit: "fill",
|
|
67
|
+
scrollRows: !0,
|
|
68
|
+
rowMinHeight: "2.75rem",
|
|
69
|
+
className: "h-full min-h-0 overflow-visible bg-transparent pt-0 pb-0",
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ r(M, { className: "bg-canvas-elevated", children: d.map((e) => {
|
|
72
|
+
const p = m === e.id;
|
|
73
|
+
return /* @__PURE__ */ r("div", { className: "flex h-11 w-full items-center", children: s ? /* @__PURE__ */ r(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
"data-row-id": e.id,
|
|
77
|
+
onMouseEnter: () => o(e.id),
|
|
78
|
+
onMouseLeave: () => o(null),
|
|
79
|
+
children: s({ row: e, hovered: p })
|
|
80
|
+
}
|
|
81
|
+
) : /* @__PURE__ */ r(
|
|
82
|
+
q,
|
|
83
|
+
{
|
|
84
|
+
row: e,
|
|
85
|
+
hovered: p,
|
|
86
|
+
onHoverChange: o
|
|
87
|
+
}
|
|
88
|
+
) }, e.id);
|
|
89
|
+
}) }),
|
|
90
|
+
l.map((e) => /* @__PURE__ */ r(
|
|
91
|
+
O,
|
|
92
|
+
{
|
|
93
|
+
value: e.id,
|
|
94
|
+
disabled: e.disabled || t,
|
|
95
|
+
variant: "compare",
|
|
96
|
+
className: z(),
|
|
97
|
+
children: /* @__PURE__ */ r(
|
|
98
|
+
T,
|
|
99
|
+
{
|
|
100
|
+
column: e,
|
|
101
|
+
rows: d,
|
|
102
|
+
hoveredRowId: m,
|
|
103
|
+
metricHeaders: L,
|
|
104
|
+
selectLabel: R,
|
|
105
|
+
selectedLabel: H,
|
|
106
|
+
renderCell: N,
|
|
107
|
+
onHoverChange: o
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
},
|
|
111
|
+
e.id
|
|
112
|
+
))
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
export {
|
|
126
|
+
$ as ScenarioComparison
|
|
127
|
+
};
|