impact-nova 2.6.2 → 3.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/data/ag-grid-react/ag-grid-cell-components.d.ts +9 -0
- package/dist/components/data/ag-grid-react/ag-grid-list.d.ts +16 -0
- package/dist/components/data/ag-grid-react/ag-grid-list.js +23 -0
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +21 -9
- package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.d.ts +14 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js +70 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.d.ts +10 -5
- package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.js +73 -41
- package/dist/components/data/ag-grid-react/cell-renderers/index.d.ts +7 -0
- package/dist/components/data/ag-grid-react/cell-renderers/index.js +42 -36
- package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.d.ts +19 -0
- package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.js +89 -0
- package/dist/components/data/ag-grid-react/cell-renderers/select-ai-insight-affordance.d.ts +28 -0
- package/dist/components/data/ag-grid-react/cell-renderers/select-ai-insight-affordance.js +96 -0
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.d.ts +30 -10
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +72 -24
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts +42 -0
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js +86 -0
- package/dist/components/data/ag-grid-react/headers/components/date-filter-picker.d.ts +2 -12
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +200 -207
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +263 -244
- package/dist/components/data/data-table/data-table.js +85 -82
- package/dist/components/data/data-table/data-table.types.d.ts +5 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +2 -3
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
- package/dist/components/data/expandable-list-item/sku-next-page-coordinator.d.ts +14 -0
- package/dist/components/data/expandable-list-item/sku-strip-lookahead.d.ts +26 -0
- package/dist/components/data/expandable-list-item/useServerSkuInfinitePages.d.ts +10 -0
- package/dist/components/data/expandable-list-item/useSkuStripVirtualizer.d.ts +30 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.catalog.d.ts +81 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.item-grid.d.ts +1 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.product-card.d.ts +7 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.sku-picker.d.ts +2 -0
- package/dist/components/data-display/chart/chart-heatmap-demos.d.ts +3 -0
- package/dist/components/data-display/chart/chart-heatmap-play.d.ts +9 -0
- package/dist/components/data-display/chart/chart.category-cluster-heatmap.stories-data.d.ts +22 -0
- package/dist/components/data-display/chart/chart.diverging-heatmap.stories-data.d.ts +43 -0
- package/dist/components/data-display/chart/chart.js +100 -93
- package/dist/components/data-display/chart/chart.types.d.ts +10 -0
- package/dist/components/data-display/chart/chart.utils.d.ts +14 -2
- package/dist/components/data-display/chart/chart.utils.js +132 -35
- package/dist/components/data-display/chart/index.js +15 -13
- package/dist/components/data-display/chart/resolve-highcharts-options.js +19 -14
- package/dist/components/data-display/globe-map/globe-map.d.ts +8 -0
- package/dist/components/data-display/globe-map/globe-map.js +161 -0
- package/dist/components/data-display/globe-map/globe-map.stories-data.d.ts +12 -0
- package/dist/components/data-display/globe-map/globe-map.types.d.ts +83 -0
- package/dist/components/data-display/globe-map/globe-map.utils.d.ts +115 -0
- package/dist/components/data-display/globe-map/globe-map.utils.js +259 -0
- package/dist/components/data-display/globe-map/globe-map.variants.d.ts +19 -0
- package/dist/components/data-display/globe-map/globe-map.variants.js +80 -0
- package/dist/components/data-display/globe-map/index.d.ts +2 -0
- package/dist/components/data-display/globe-map/index.js +10 -0
- package/dist/components/data-display/globe-map/internals/globe-countries-110m.json.d.ts +4 -0
- package/dist/components/data-display/globe-map/internals/globe-countries-110m.json.js +7 -0
- package/dist/components/data-display/globe-map/internals/globe-map-context.d.ts +25 -0
- package/dist/components/data-display/globe-map/internals/globe-map-context.js +19 -0
- package/dist/components/data-display/globe-map/internals/globe-map-legend.d.ts +2 -0
- package/dist/components/data-display/globe-map/internals/globe-map-legend.js +51 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card-carousel.d.ts +6 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card-carousel.js +119 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card.d.ts +2 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card.js +106 -0
- package/dist/components/data-display/globe-map/internals/globe-map-scene.d.ts +17 -0
- package/dist/components/data-display/globe-map/internals/globe-map-scene.js +218 -0
- package/dist/components/data-display/globe-map/internals/globe-map-tooltip.d.ts +2 -0
- package/dist/components/data-display/globe-map/internals/globe-map-tooltip.js +33 -0
- package/dist/components/data-display/globe-map/internals/use-globe-map-scene.d.ts +45 -0
- package/dist/components/data-display/globe-map/internals/use-globe-map-scene.js +270 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.d.ts +9 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.js +94 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.stories-data.d.ts +7 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.types.d.ts +43 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.variants.d.ts +11 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.variants.js +47 -0
- package/dist/components/data-display/hex-tilemap/index.d.ts +2 -0
- package/dist/components/data-display/hex-tilemap/index.js +12 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-camera.d.ts +40 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-camera.js +103 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-country-lattices.d.ts +9 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-country-lattices.js +1387 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-geometry.d.ts +21 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-geometry.js +82 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-lattice.d.ts +18 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-lattice.js +47 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-layout.d.ts +10 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-layout.js +35 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-new-zealand-grid.d.ts +31 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-new-zealand-grid.js +138 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-regions.d.ts +6 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-regions.js +18 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-context.d.ts +24 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-context.js +19 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-legend.d.ts +2 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-legend.js +51 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-tooltip.d.ts +2 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-tooltip.js +36 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-viewport.d.ts +3 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-viewport.js +147 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-zoom.d.ts +13 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-zoom.js +99 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-world-grid.d.ts +8 -0
- package/dist/components/data-display/hex-tilemap/internals/use-hex-camera.d.ts +27 -0
- package/dist/components/data-display/hex-tilemap/internals/use-hex-camera.js +137 -0
- package/dist/components/data-display/notch-card/index.d.ts +2 -0
- package/dist/components/data-display/notch-card/index.js +6 -0
- package/dist/components/data-display/notch-card/notch-card.d.ts +7 -0
- package/dist/components/data-display/notch-card/notch-card.js +151 -0
- package/dist/components/data-display/notch-card/notch-card.path.d.ts +19 -0
- package/dist/components/data-display/notch-card/notch-card.path.js +118 -0
- package/dist/components/data-display/notch-card/notch-card.types.d.ts +15 -0
- package/dist/components/data-display/notch-card/notch-card.variants.d.ts +15 -0
- package/dist/components/data-display/notch-card/notch-card.variants.js +86 -0
- package/dist/components/feedback/hover-card/hover-card.d.ts +3 -1
- package/dist/components/feedback/hover-card/hover-card.js +28 -24
- package/dist/components/feedback/tooltip/overflow-tooltip.d.ts +1 -1
- package/dist/components/feedback/tooltip/overflow-tooltip.js +63 -57
- package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +4 -0
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
- 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/filter-strip/index.d.ts +1 -0
- package/dist/components/flows/filter-strip/index.js +4 -2
- package/dist/components/flows/guidance/renderers/guidance-tour-overlay.js +48 -46
- package/dist/components/flows/iris-chat/index.d.ts +10 -0
- package/dist/components/flows/iris-chat/index.js +55 -0
- package/dist/components/flows/iris-chat/iris-chat-artifact.d.ts +4 -0
- package/dist/components/flows/iris-chat/iris-chat-artifact.js +125 -0
- package/dist/components/flows/iris-chat/iris-chat-composer.d.ts +3 -0
- package/dist/components/flows/iris-chat/iris-chat-composer.js +297 -0
- package/dist/components/flows/iris-chat/iris-chat-context.d.ts +14 -0
- package/dist/components/flows/iris-chat/iris-chat-context.js +23 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.d.ts +18 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.js +176 -0
- package/dist/components/flows/iris-chat/iris-chat-markdown.d.ts +3 -0
- package/dist/components/flows/iris-chat/iris-chat-markdown.js +62 -0
- package/dist/components/flows/iris-chat/iris-chat-menu.d.ts +15 -0
- package/dist/components/flows/iris-chat/iris-chat-menu.js +259 -0
- package/dist/components/flows/iris-chat/iris-chat-prompt.d.ts +3 -0
- package/dist/components/flows/iris-chat/iris-chat-prompt.js +46 -0
- package/dist/components/flows/iris-chat/iris-chat-thinking.d.ts +12 -0
- package/dist/components/flows/iris-chat/iris-chat-thinking.js +202 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +37 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.js +493 -0
- package/dist/components/flows/iris-chat/iris-chat.d.ts +43 -0
- package/dist/components/flows/iris-chat/iris-chat.js +336 -0
- package/dist/components/flows/iris-chat/iris-chat.types.d.ts +208 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +14 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.js +78 -0
- package/dist/components/flows/iris-chat/read-iris-greeting-period.d.ts +4 -0
- package/dist/components/flows/iris-chat/read-iris-greeting-period.js +16 -0
- package/dist/components/flows/wizard/index.d.ts +2 -2
- package/dist/components/flows/wizard/index.js +17 -13
- package/dist/components/flows/wizard/wizard-context.d.ts +6 -1
- package/dist/components/flows/wizard/wizard-context.js +15 -7
- package/dist/components/flows/wizard/wizard.d.ts +22 -4
- package/dist/components/flows/wizard/wizard.js +278 -174
- package/dist/components/flows/wizard/wizard.types.d.ts +40 -0
- package/dist/components/forms/choice-card/assets/featured-backdrop-baked.webp.js +4 -0
- package/dist/components/forms/choice-card/assets/featured-noise.webp.js +4 -0
- package/dist/components/forms/choice-card/choice-card-featured-arcs.d.ts +4 -0
- package/dist/components/forms/choice-card/choice-card-featured-arcs.js +42 -0
- package/dist/components/forms/choice-card/choice-card-featured-backdrop.d.ts +4 -0
- package/dist/components/forms/choice-card/choice-card-featured-backdrop.js +45 -0
- package/dist/components/forms/choice-card/choice-card-indicator.variants.d.ts +8 -0
- package/dist/components/forms/choice-card/choice-card-indicator.variants.js +5 -0
- package/dist/components/forms/choice-card/choice-card-percent.d.ts +11 -0
- package/dist/components/forms/choice-card/choice-card-percent.js +80 -0
- package/dist/components/forms/choice-card/choice-card.d.ts +40 -3
- package/dist/components/forms/choice-card/choice-card.js +651 -170
- package/dist/components/forms/choice-card/choice-card.types.d.ts +40 -0
- package/dist/components/forms/choice-card/choice-card.variants.d.ts +7 -0
- package/dist/components/forms/choice-card/choice-card.variants.js +100 -0
- package/dist/components/forms/choice-card/index.d.ts +2 -1
- package/dist/components/forms/choice-card/index.js +27 -10
- package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
- package/dist/components/forms/select/components/Submenu.js +2 -3
- package/dist/components/layout/header/header.d.ts +3 -2
- package/dist/components/layout/header/header.js +67 -47
- package/dist/components/layout/header/header.types.d.ts +1 -0
- package/dist/components/primitives/iris/iris-agent-cursor.d.ts +3 -0
- package/dist/components/primitives/iris/iris-agent-cursor.js +89 -0
- package/dist/components/primitives/iris/iris-alan-gradient-icon.d.ts +5 -0
- package/dist/components/primitives/iris/iris-alan-gradient-icon.js +69 -0
- package/dist/components/primitives/iris/iris-control-context.d.ts +15 -0
- package/dist/components/primitives/iris/iris-control-context.js +44 -0
- package/dist/components/primitives/iris/iris-control-region.d.ts +10 -0
- package/dist/components/primitives/iris/iris-control-region.js +102 -0
- package/dist/components/primitives/iris/iris-control.types.d.ts +24 -0
- package/dist/components/primitives/iris/iris-control.variants.d.ts +4 -0
- package/dist/components/primitives/iris/iris-control.variants.js +20 -0
- package/dist/components/primitives/iris/iris.d.ts +24 -0
- package/dist/components/primitives/iris/iris.js +232 -0
- package/dist/components/primitives/iris/iris.types.d.ts +35 -0
- package/dist/components/primitives/iris/iris.variants.d.ts +30 -0
- package/dist/components/primitives/iris/iris.variants.js +120 -0
- package/dist/components/primitives/stepper/internals/pipeline-current-mark.d.ts +6 -0
- package/dist/components/primitives/stepper/internals/pipeline-current-mark.js +35 -0
- package/dist/components/primitives/stepper/internals/rail-status-dot.d.ts +13 -0
- package/dist/components/primitives/stepper/internals/rail-status-dot.js +70 -0
- package/dist/components/primitives/stepper/internals/step-hit-target.d.ts +15 -0
- package/dist/components/primitives/stepper/internals/step-hit-target.js +51 -0
- package/dist/components/primitives/stepper/internals/step-model.d.ts +3 -0
- package/dist/components/primitives/stepper/internals/step-model.js +10 -0
- package/dist/components/primitives/stepper/internals/stepper-compact.d.ts +5 -0
- package/dist/components/primitives/stepper/internals/stepper-compact.js +68 -0
- package/dist/components/primitives/stepper/internals/stepper-pipeline.d.ts +7 -0
- package/dist/components/primitives/stepper/internals/stepper-pipeline.js +87 -0
- package/dist/components/primitives/stepper/internals/stepper-rail.d.ts +5 -0
- package/dist/components/primitives/stepper/internals/stepper-rail.js +105 -0
- package/dist/components/primitives/stepper/internals/stepper-summary.d.ts +5 -0
- package/dist/components/primitives/stepper/internals/stepper-summary.js +103 -0
- package/dist/components/primitives/stepper/internals/stepper-track.d.ts +8 -0
- package/dist/components/primitives/stepper/internals/stepper-track.js +170 -0
- package/dist/components/primitives/stepper/stepper.d.ts +1 -0
- package/dist/components/primitives/stepper/stepper.js +134 -52
- package/dist/components/primitives/stepper/stepper.types.d.ts +17 -0
- package/dist/components/primitives/stepper/stepper.variants.d.ts +26 -0
- package/dist/components/primitives/stepper/stepper.variants.js +165 -5
- package/dist/components/primitives/tabs/tabs.d.ts +4 -1
- package/dist/components/primitives/tabs/tabs.js +131 -59
- package/dist/components/primitives/tabs/tabs.types.d.ts +5 -1
- package/dist/form-react/Fields/DateRangeField.js +20 -19
- package/dist/form-react/Fields/WeekRangePicker.js +36 -36
- package/dist/i18n/defaultMessages.d.ts +100 -0
- package/dist/i18n/defaultMessages.js +118 -21
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +99 -2
- package/dist/i18n/locales/es.js +99 -2
- package/dist/i18n/locales/hi.js +99 -2
- package/dist/i18n/locales/kn.js +99 -2
- package/dist/impact-nova-components.css +972 -2
- package/dist/impact-nova-tokens.scss +109 -1
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +585 -551
- package/dist/lib/virtualized/directional-range-extractor.d.ts +26 -0
- package/dist/lib/virtualized/directional-range-extractor.js +39 -0
- package/dist/lib/virtualized/index.d.ts +3 -0
- package/dist/lib/virtualized/index.js +35 -27
- package/dist/lib/virtualized/scroll-seek.d.ts +61 -0
- package/dist/lib/virtualized/scroll-seek.js +61 -0
- package/dist/lib/virtualized/usePaintedRangeVirtualizer.d.ts +19 -0
- package/dist/lib/virtualized/usePaintedRangeVirtualizer.js +30 -0
- package/dist/lib/virtualized/useResponsiveColumnCount.d.ts +35 -0
- package/dist/lib/virtualized/useResponsiveColumnCount.js +51 -0
- package/dist/lib/virtualized/useScrollSeekPaintedRange.d.ts +13 -0
- package/dist/lib/virtualized/useScrollSeekPaintedRange.js +45 -0
- package/dist/lib/virtualized/useVirtualizedList.d.ts +7 -0
- package/dist/lib/virtualized/useVirtualizedList.js +89 -87
- package/dist/lib/virtualized/useVirtualizedRows.d.ts +9 -2
- package/dist/lib/virtualized/useVirtualizedRows.js +15 -13
- package/dist/lib/virtualized/virtualized.types.d.ts +2 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/tailwind.config.js +3 -1
- package/dist/theme/tailwind-colors.js +2 -1
- package/package.json +39 -4
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import { Checkmark as y } from "impact-nova-icons";
|
|
4
|
+
import { cn as i } from "../../../../lib/utils.js";
|
|
5
|
+
import { summaryIconVariants as N, summaryStepVariants as w, stepperVariants as S } from "../stepper.variants.js";
|
|
6
|
+
import { ClickMeArrow as k } from "../../../ui/local-raster-icons/rasterIcons.js";
|
|
7
|
+
import { resolveStepItem as z, stepStatus as j } from "./step-model.js";
|
|
8
|
+
import { StepHitTarget as I, StepBrandRail as R } from "./step-hit-target.js";
|
|
9
|
+
const V = p.forwardRef(
|
|
10
|
+
({
|
|
11
|
+
className: d,
|
|
12
|
+
currentStep: u,
|
|
13
|
+
steps: o,
|
|
14
|
+
onStepClick: m,
|
|
15
|
+
stepAriaLabel: f,
|
|
16
|
+
...h
|
|
17
|
+
}, b) => {
|
|
18
|
+
const x = o.length, c = !!m;
|
|
19
|
+
return /* @__PURE__ */ e(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
ref: b,
|
|
23
|
+
className: i(S({ variant: "summary" }), d),
|
|
24
|
+
"data-orientation": "horizontal",
|
|
25
|
+
"data-variant": "summary",
|
|
26
|
+
"data-component": "stepper",
|
|
27
|
+
role: "list",
|
|
28
|
+
...h,
|
|
29
|
+
children: o.map((g, l) => {
|
|
30
|
+
const t = z(g), s = l + 1, a = j(s, u), r = a === "active", v = l < o.length - 1;
|
|
31
|
+
return /* @__PURE__ */ n(p.Fragment, { children: [
|
|
32
|
+
/* @__PURE__ */ n(
|
|
33
|
+
I,
|
|
34
|
+
{
|
|
35
|
+
stepNumber: s,
|
|
36
|
+
status: a,
|
|
37
|
+
disabled: t.disabled,
|
|
38
|
+
interactive: c,
|
|
39
|
+
ariaLabel: f(s, x),
|
|
40
|
+
isActive: r,
|
|
41
|
+
onStepClick: m,
|
|
42
|
+
className: i(
|
|
43
|
+
w({ status: a }),
|
|
44
|
+
c && !t.disabled && "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-focus-ring/25"
|
|
45
|
+
),
|
|
46
|
+
children: [
|
|
47
|
+
r ? /* @__PURE__ */ e(R, {}) : null,
|
|
48
|
+
/* @__PURE__ */ n("span", { className: "flex items-center gap-2.5", children: [
|
|
49
|
+
/* @__PURE__ */ e("span", { className: N({ status: a }), children: a === "completed" ? /* @__PURE__ */ e(y, { className: "size-3.5 stroke-[3px]" }) : /* @__PURE__ */ e("span", { children: t.icon || s }) }),
|
|
50
|
+
/* @__PURE__ */ e(
|
|
51
|
+
"span",
|
|
52
|
+
{
|
|
53
|
+
className: i(
|
|
54
|
+
"whitespace-nowrap capitalize",
|
|
55
|
+
r ? "text-sm font-semibold leading-[21px] text-brand" : a === "completed" ? "text-sm font-semibold leading-[21px] text-[var(--color-stepper-complete-ink)]" : "text-sm font-normal leading-4 text-content-icon"
|
|
56
|
+
),
|
|
57
|
+
children: t.label
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
] }),
|
|
61
|
+
t.description ? /* @__PURE__ */ e(
|
|
62
|
+
"span",
|
|
63
|
+
{
|
|
64
|
+
className: i(
|
|
65
|
+
"whitespace-nowrap text-xs font-medium capitalize leading-4",
|
|
66
|
+
r ? "text-secondary-foreground" : "text-content-placeholder"
|
|
67
|
+
),
|
|
68
|
+
children: t.description
|
|
69
|
+
}
|
|
70
|
+
) : null
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
v ? /* @__PURE__ */ n("span", { className: "relative flex w-7 shrink-0 items-center justify-center", children: [
|
|
75
|
+
/* @__PURE__ */ e(
|
|
76
|
+
"span",
|
|
77
|
+
{
|
|
78
|
+
"aria-hidden": !0,
|
|
79
|
+
"data-summary-dots": "",
|
|
80
|
+
className: "absolute inset-x-0 top-1/2 h-0 w-full -translate-y-1/2 border-t border-dashed border-stroke-hairline"
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
r ? /* @__PURE__ */ e(
|
|
84
|
+
k,
|
|
85
|
+
{
|
|
86
|
+
size: 12,
|
|
87
|
+
alt: "",
|
|
88
|
+
"aria-hidden": !0,
|
|
89
|
+
"data-summary-connector": "",
|
|
90
|
+
className: "relative z-[1] -rotate-90 bg-canvas"
|
|
91
|
+
}
|
|
92
|
+
) : null
|
|
93
|
+
] }) : null
|
|
94
|
+
] }, l);
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
V.displayName = "SummaryStepper";
|
|
101
|
+
export {
|
|
102
|
+
V as SummaryStepper
|
|
103
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StepperProps } from '../stepper.types';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export declare const TrackStepper: React.ForwardRefExoticComponent<Omit<StepperProps, "variant"> & {
|
|
4
|
+
stepAriaLabel: (stepNumber: number, total: number) => string;
|
|
5
|
+
currentlyStepLabel: string;
|
|
6
|
+
previousLabel: string;
|
|
7
|
+
nextLabel: string;
|
|
8
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { jsxs as p, jsx as r, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { Checkmark as E, ChevronRight as y } from "impact-nova-icons";
|
|
4
|
+
import { Button as z } from "../../button/button.js";
|
|
5
|
+
import { cn as m } from "../../../../lib/utils.js";
|
|
6
|
+
import { trackIconVariants as _, trackStepVariants as T, stepperVariants as q } from "../stepper.variants.js";
|
|
7
|
+
import { resolveStepItem as D, stepStatus as F } from "./step-model.js";
|
|
8
|
+
import { StepHitTarget as H } from "./step-hit-target.js";
|
|
9
|
+
const M = l.forwardRef(
|
|
10
|
+
({
|
|
11
|
+
className: S,
|
|
12
|
+
currentStep: u,
|
|
13
|
+
steps: c,
|
|
14
|
+
onStepClick: f,
|
|
15
|
+
stepAriaLabel: x,
|
|
16
|
+
currentlyStepLabel: w,
|
|
17
|
+
previousLabel: C,
|
|
18
|
+
nextLabel: R,
|
|
19
|
+
...I
|
|
20
|
+
}, L) => {
|
|
21
|
+
const k = c.length, i = !!f, d = l.useRef(null), [b, V] = l.useState(!1), [h, W] = l.useState(!1), v = b || h, o = l.useCallback(() => {
|
|
22
|
+
const e = d.current;
|
|
23
|
+
if (!e) return;
|
|
24
|
+
const t = 16, a = e.scrollWidth > e.clientWidth + t;
|
|
25
|
+
V(a && e.scrollLeft > t), W(
|
|
26
|
+
a && Math.ceil(e.scrollLeft + e.clientWidth) < e.scrollWidth - t
|
|
27
|
+
);
|
|
28
|
+
}, []), O = l.useCallback((e) => {
|
|
29
|
+
const t = d.current;
|
|
30
|
+
if (!t) return;
|
|
31
|
+
t.querySelector(`[data-step="${e + 1}"]`)?.scrollIntoView({ inline: "center", block: "nearest", behavior: "smooth" });
|
|
32
|
+
}, []);
|
|
33
|
+
l.useLayoutEffect(() => {
|
|
34
|
+
const e = d.current;
|
|
35
|
+
if (!e) return;
|
|
36
|
+
o(), e.scrollWidth > e.clientWidth + 16 && (e.querySelector("[data-status='active']")?.scrollIntoView({ inline: "center", block: "nearest", behavior: "auto" }), o());
|
|
37
|
+
const a = new ResizeObserver(o);
|
|
38
|
+
return a.observe(e), e.addEventListener("scroll", o, { passive: !0 }), () => {
|
|
39
|
+
a.disconnect(), e.removeEventListener("scroll", o);
|
|
40
|
+
};
|
|
41
|
+
}, [u, c.length, o]);
|
|
42
|
+
const N = (e) => {
|
|
43
|
+
d.current?.scrollBy({ left: e * 220, behavior: "smooth" });
|
|
44
|
+
};
|
|
45
|
+
return /* @__PURE__ */ p(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
ref: L,
|
|
49
|
+
className: m(q({ variant: "track" }), S),
|
|
50
|
+
"data-orientation": "horizontal",
|
|
51
|
+
"data-variant": "track",
|
|
52
|
+
"data-component": "stepper",
|
|
53
|
+
...I,
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ p("div", { className: "relative flex items-center ", children: [
|
|
56
|
+
/* @__PURE__ */ r(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
ref: d,
|
|
60
|
+
role: "list",
|
|
61
|
+
className: m(
|
|
62
|
+
"scrollbar-hide flex w-full items-center gap-2 overflow-x-auto",
|
|
63
|
+
v ? "px-8 [mask-image:linear-gradient(to_right,transparent,black_28px,black_calc(100%-28px),transparent)]" : "justify-center"
|
|
64
|
+
),
|
|
65
|
+
children: c.map((e, t) => {
|
|
66
|
+
const a = D(e), s = t + 1, n = F(s, u), g = n === "active", j = v && (t === 0 && b || t === c.length - 1 && h);
|
|
67
|
+
return /* @__PURE__ */ p(
|
|
68
|
+
H,
|
|
69
|
+
{
|
|
70
|
+
stepNumber: s,
|
|
71
|
+
status: n,
|
|
72
|
+
disabled: a.disabled,
|
|
73
|
+
interactive: i,
|
|
74
|
+
ariaLabel: x(s, k),
|
|
75
|
+
isActive: g,
|
|
76
|
+
onStepClick: f,
|
|
77
|
+
className: m(
|
|
78
|
+
T({ status: n }),
|
|
79
|
+
j && "blur-[1.5px]",
|
|
80
|
+
i && !a.disabled && "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-focus-ring/25"
|
|
81
|
+
),
|
|
82
|
+
children: [
|
|
83
|
+
g ? /* @__PURE__ */ r("span", { className: "w-full text-sm font-semibold capitalize leading-[21px] text-secondary-foreground", children: w }) : null,
|
|
84
|
+
/* @__PURE__ */ p("span", { className: "flex items-center gap-2", children: [
|
|
85
|
+
/* @__PURE__ */ r("span", { className: _({ status: n }), children: n === "completed" ? /* @__PURE__ */ r(E, { className: "size-3.5 stroke-[3px]" }) : /* @__PURE__ */ r("span", { children: a.icon || s }) }),
|
|
86
|
+
/* @__PURE__ */ r(
|
|
87
|
+
"span",
|
|
88
|
+
{
|
|
89
|
+
className: m(
|
|
90
|
+
"whitespace-nowrap capitalize",
|
|
91
|
+
g ? "text-base font-semibold leading-6 text-content" : n === "completed" ? "text-sm font-medium leading-[21px] text-[var(--color-stepper-complete-ink)]" : "text-sm font-medium leading-[21px] text-content"
|
|
92
|
+
),
|
|
93
|
+
children: a.label
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
] })
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
t
|
|
100
|
+
);
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
v ? /* @__PURE__ */ p(B, { children: [
|
|
105
|
+
/* @__PURE__ */ r(
|
|
106
|
+
z,
|
|
107
|
+
{
|
|
108
|
+
type: "button",
|
|
109
|
+
variant: "outline",
|
|
110
|
+
size: "icon",
|
|
111
|
+
"aria-label": C,
|
|
112
|
+
disabled: !b,
|
|
113
|
+
onClick: () => N(-1),
|
|
114
|
+
className: "absolute start-0 top-1/2 z-[2] h-8 w-8 -translate-y-1/2 border-[1.5px] bg-canvas-elevated disabled:opacity-100",
|
|
115
|
+
children: /* @__PURE__ */ r(y, { className: "size-4 rotate-180" })
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
/* @__PURE__ */ r(
|
|
119
|
+
z,
|
|
120
|
+
{
|
|
121
|
+
type: "button",
|
|
122
|
+
variant: "outline",
|
|
123
|
+
size: "icon",
|
|
124
|
+
"aria-label": R,
|
|
125
|
+
disabled: !h,
|
|
126
|
+
onClick: () => N(1),
|
|
127
|
+
className: "absolute end-0 top-1/2 z-[2] h-8 w-8 -translate-y-1/2 border-[1.5px] bg-canvas-elevated disabled:opacity-100",
|
|
128
|
+
children: /* @__PURE__ */ r(y, { className: "size-4" })
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
] }) : null
|
|
132
|
+
] }),
|
|
133
|
+
/* @__PURE__ */ r(
|
|
134
|
+
"div",
|
|
135
|
+
{
|
|
136
|
+
className: "flex items-center justify-center gap-2 pt-1",
|
|
137
|
+
role: "group",
|
|
138
|
+
"aria-label": w,
|
|
139
|
+
children: c.map((e, t) => {
|
|
140
|
+
const a = t + 1, s = a === u;
|
|
141
|
+
return /* @__PURE__ */ r(
|
|
142
|
+
"button",
|
|
143
|
+
{
|
|
144
|
+
type: "button",
|
|
145
|
+
"data-pagination-step": a,
|
|
146
|
+
"aria-label": x(a, k),
|
|
147
|
+
"aria-current": s ? "step" : void 0,
|
|
148
|
+
disabled: !i,
|
|
149
|
+
onClick: i ? () => {
|
|
150
|
+
f?.(t), O(t);
|
|
151
|
+
} : void 0,
|
|
152
|
+
className: m(
|
|
153
|
+
s ? "h-1.5 w-5 rounded-full bg-content" : "size-1.5 rounded-full bg-muted",
|
|
154
|
+
!i && "cursor-not-allowed"
|
|
155
|
+
)
|
|
156
|
+
},
|
|
157
|
+
t
|
|
158
|
+
);
|
|
159
|
+
})
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
M.displayName = "TrackStepper";
|
|
168
|
+
export {
|
|
169
|
+
M as TrackStepper
|
|
170
|
+
};
|
|
@@ -2,3 +2,4 @@ import { StepperProps } from './stepper.types';
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export { Stepper };
|
|
5
|
+
export type { StepperProps, StepItem, StepperVariant, StepperRenderStepContext, StepStatus, } from './stepper.types';
|
|
@@ -1,86 +1,168 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { Checkmark as
|
|
4
|
-
import { createComponent as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { OverflowTooltip as
|
|
7
|
-
import { useImpactNovaI18n as
|
|
8
|
-
import { iconVariants as
|
|
9
|
-
|
|
1
|
+
import { jsx as t, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import * as z from "react";
|
|
3
|
+
import { Checkmark as D } from "impact-nova-icons";
|
|
4
|
+
import { createComponent as P } from "../../../lib/primitives/create-component.js";
|
|
5
|
+
import { cn as f } from "../../../lib/utils.js";
|
|
6
|
+
import { OverflowTooltip as N } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
7
|
+
import { useImpactNovaI18n as T } from "../../../i18n/use-impact-nova-i18n.js";
|
|
8
|
+
import { iconVariants as V, stepVariants as k, stepperVariants as A } from "./stepper.variants.js";
|
|
9
|
+
import { CompactStepper as O } from "./internals/stepper-compact.js";
|
|
10
|
+
import { PipelineStepper as R } from "./internals/stepper-pipeline.js";
|
|
11
|
+
import { RailStepper as E } from "./internals/stepper-rail.js";
|
|
12
|
+
import { SummaryStepper as F } from "./internals/stepper-summary.js";
|
|
13
|
+
import { TrackStepper as K } from "./internals/stepper-track.js";
|
|
14
|
+
const Z = P(
|
|
10
15
|
"Stepper",
|
|
11
|
-
({
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
({
|
|
17
|
+
className: s,
|
|
18
|
+
currentStep: r,
|
|
19
|
+
steps: a,
|
|
20
|
+
orientation: o = "horizontal",
|
|
21
|
+
variant: u = "default",
|
|
22
|
+
heading: I,
|
|
23
|
+
renderStep: j,
|
|
24
|
+
onStepClick: e,
|
|
25
|
+
...n
|
|
26
|
+
}, p) => {
|
|
27
|
+
const { t: m } = T(), v = a.length, d = (x, i) => m("stepper.stepOfTotal", { current: x, total: i });
|
|
28
|
+
return u === "rail" ? /* @__PURE__ */ t(
|
|
29
|
+
E,
|
|
30
|
+
{
|
|
31
|
+
ref: p,
|
|
32
|
+
className: s,
|
|
33
|
+
currentStep: r,
|
|
34
|
+
steps: a,
|
|
35
|
+
onStepClick: e,
|
|
36
|
+
renderStep: j,
|
|
37
|
+
stepAriaLabel: d,
|
|
38
|
+
...n
|
|
39
|
+
}
|
|
40
|
+
) : u === "compact" ? /* @__PURE__ */ t(
|
|
41
|
+
O,
|
|
42
|
+
{
|
|
43
|
+
ref: p,
|
|
44
|
+
className: s,
|
|
45
|
+
currentStep: r,
|
|
46
|
+
steps: a,
|
|
47
|
+
orientation: o,
|
|
48
|
+
onStepClick: e,
|
|
49
|
+
stepAriaLabel: d,
|
|
50
|
+
...n
|
|
51
|
+
}
|
|
52
|
+
) : u === "pipeline" ? /* @__PURE__ */ t(
|
|
53
|
+
R,
|
|
54
|
+
{
|
|
55
|
+
ref: p,
|
|
56
|
+
className: s,
|
|
57
|
+
currentStep: r,
|
|
58
|
+
steps: a,
|
|
59
|
+
onStepClick: e,
|
|
60
|
+
heading: I,
|
|
61
|
+
stepAriaLabel: d,
|
|
62
|
+
pipelinePrefix: m("stepper.pipelinePrefix"),
|
|
63
|
+
stepsCountLabel: m("stepper.stepsCount", { current: r, total: v }),
|
|
64
|
+
...n
|
|
65
|
+
}
|
|
66
|
+
) : u === "track" ? /* @__PURE__ */ t(
|
|
67
|
+
K,
|
|
68
|
+
{
|
|
69
|
+
ref: p,
|
|
70
|
+
className: s,
|
|
71
|
+
currentStep: r,
|
|
72
|
+
steps: a,
|
|
73
|
+
onStepClick: e,
|
|
74
|
+
stepAriaLabel: d,
|
|
75
|
+
currentlyStepLabel: m("stepper.currentlyStep", {
|
|
76
|
+
current: r,
|
|
77
|
+
total: v
|
|
78
|
+
}),
|
|
79
|
+
previousLabel: m("stepper.previousSteps"),
|
|
80
|
+
nextLabel: m("stepper.nextSteps"),
|
|
81
|
+
...n
|
|
82
|
+
}
|
|
83
|
+
) : u === "summary" ? /* @__PURE__ */ t(
|
|
84
|
+
F,
|
|
85
|
+
{
|
|
86
|
+
ref: p,
|
|
87
|
+
className: s,
|
|
88
|
+
currentStep: r,
|
|
89
|
+
steps: a,
|
|
90
|
+
onStepClick: e,
|
|
91
|
+
stepAriaLabel: d,
|
|
92
|
+
...n
|
|
93
|
+
}
|
|
94
|
+
) : /* @__PURE__ */ t(
|
|
14
95
|
"div",
|
|
15
96
|
{
|
|
16
|
-
ref:
|
|
17
|
-
className:
|
|
18
|
-
"data-orientation":
|
|
97
|
+
ref: p,
|
|
98
|
+
className: f(A({ orientation: o, variant: "default" }), s),
|
|
99
|
+
"data-orientation": o,
|
|
100
|
+
"data-variant": "default",
|
|
19
101
|
"data-component": "stepper",
|
|
20
102
|
role: "list",
|
|
21
|
-
...
|
|
22
|
-
children:
|
|
23
|
-
const
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
103
|
+
...n,
|
|
104
|
+
children: a.map((x, i) => {
|
|
105
|
+
const l = typeof x == "string" ? { label: x } : x, b = i + 1, w = b === r, L = b < r, h = l.disabled, c = L ? "completed" : w ? "active" : "default";
|
|
106
|
+
return /* @__PURE__ */ g(z.Fragment, { children: [
|
|
107
|
+
/* @__PURE__ */ g(
|
|
26
108
|
"div",
|
|
27
109
|
{
|
|
28
110
|
role: "listitem",
|
|
29
|
-
onClick: () => !
|
|
30
|
-
"aria-label":
|
|
31
|
-
"aria-current":
|
|
32
|
-
tabIndex:
|
|
33
|
-
onKeyDown:
|
|
34
|
-
(
|
|
111
|
+
onClick: () => !h && e?.(i),
|
|
112
|
+
"aria-label": d(b, v),
|
|
113
|
+
"aria-current": w ? "step" : void 0,
|
|
114
|
+
tabIndex: e && !h ? 0 : void 0,
|
|
115
|
+
onKeyDown: e && !h ? (y) => {
|
|
116
|
+
(y.key === "Enter" || y.key === " ") && (y.preventDefault(), e(i));
|
|
35
117
|
} : void 0,
|
|
36
|
-
"data-step":
|
|
37
|
-
"data-status":
|
|
38
|
-
"data-disabled":
|
|
39
|
-
className:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
118
|
+
"data-step": b,
|
|
119
|
+
"data-status": c,
|
|
120
|
+
"data-disabled": h || void 0,
|
|
121
|
+
className: f(
|
|
122
|
+
k({ orientation: o, status: c }),
|
|
123
|
+
o === "horizontal" && "min-w-[140px]",
|
|
124
|
+
h ? "opacity-80 cursor-not-allowed" : e ? "cursor-pointer" : "cursor-default"
|
|
43
125
|
),
|
|
44
126
|
children: [
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
127
|
+
/* @__PURE__ */ t("div", { className: f(V({ status: c }), "mr-2"), children: L ? /* @__PURE__ */ t(D, { className: "h-5 w-5 stroke-[3px]" }) : /* @__PURE__ */ t("span", { children: l.icon || b }) }),
|
|
128
|
+
/* @__PURE__ */ g("div", { className: "flex min-w-0 flex-col justify-center overflow-hidden", children: [
|
|
129
|
+
/* @__PURE__ */ t(
|
|
130
|
+
N,
|
|
49
131
|
{
|
|
50
|
-
triggerClassName:
|
|
132
|
+
triggerClassName: f(
|
|
51
133
|
"text-[14px] leading-tight font-medium truncate max-w-[200px] block",
|
|
52
|
-
|
|
53
|
-
|
|
134
|
+
c === "completed" ? "text-success" : "text-content",
|
|
135
|
+
c === "active" && o === "vertical" ? "text-brand" : ""
|
|
54
136
|
),
|
|
55
|
-
content:
|
|
137
|
+
content: l.label,
|
|
56
138
|
side: "top",
|
|
57
139
|
variant: "tertiary",
|
|
58
|
-
children:
|
|
140
|
+
children: l.label
|
|
59
141
|
}
|
|
60
142
|
),
|
|
61
|
-
|
|
62
|
-
|
|
143
|
+
l.description && /* @__PURE__ */ t(
|
|
144
|
+
N,
|
|
63
145
|
{
|
|
64
|
-
triggerClassName:
|
|
146
|
+
triggerClassName: f(
|
|
65
147
|
"text-[12px] leading-tight mt-0.5 truncate max-w-[200px] block",
|
|
66
|
-
|
|
148
|
+
c === "completed" ? "text-success" : "text-secondary-foreground"
|
|
67
149
|
),
|
|
68
|
-
content:
|
|
150
|
+
content: l.description,
|
|
69
151
|
side: "top",
|
|
70
152
|
variant: "tertiary",
|
|
71
|
-
children:
|
|
153
|
+
children: l.description
|
|
72
154
|
}
|
|
73
155
|
)
|
|
74
156
|
] })
|
|
75
157
|
]
|
|
76
158
|
}
|
|
77
159
|
),
|
|
78
|
-
i <
|
|
160
|
+
i < a.length - 1 && /* @__PURE__ */ t(
|
|
79
161
|
"div",
|
|
80
162
|
{
|
|
81
|
-
className:
|
|
163
|
+
className: f(
|
|
82
164
|
"border-t border-dashed border-stroke-hairline transition-colors",
|
|
83
|
-
|
|
165
|
+
o === "horizontal" ? "mx-1 min-w-[24px] flex-1 self-center" : "my-[-4px] ml-[12px] h-6 w-0 border-l"
|
|
84
166
|
)
|
|
85
167
|
}
|
|
86
168
|
)
|
|
@@ -91,5 +173,5 @@ const R = j(
|
|
|
91
173
|
}
|
|
92
174
|
);
|
|
93
175
|
export {
|
|
94
|
-
|
|
176
|
+
Z as Stepper
|
|
95
177
|
};
|
|
@@ -7,8 +7,25 @@ export interface StepItem {
|
|
|
7
7
|
icon?: React.ReactNode;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
}
|
|
10
|
+
export type StepperVariant = NonNullable<VariantProps<typeof stepperVariants>["variant"]>;
|
|
11
|
+
export type StepperOrientation = NonNullable<VariantProps<typeof stepperVariants>["orientation"]>;
|
|
12
|
+
export type StepStatus = "completed" | "active" | "default";
|
|
13
|
+
/** Context passed to `renderStep` on `variant="rail"`. */
|
|
14
|
+
export interface StepperRenderStepContext {
|
|
15
|
+
step: StepItem;
|
|
16
|
+
index: number;
|
|
17
|
+
stepNumber: number;
|
|
18
|
+
status: StepStatus;
|
|
19
|
+
}
|
|
10
20
|
export interface StepperProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof stepperVariants> {
|
|
11
21
|
currentStep: number;
|
|
12
22
|
steps: (string | StepItem)[];
|
|
13
23
|
onStepClick?: (index: number) => void;
|
|
24
|
+
/** Pipeline heading after the "Pipeline:" prefix. Ignored on other variants. */
|
|
25
|
+
heading?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Rail variant only: custom step body (e.g. `AccordionItem`).
|
|
28
|
+
* Falls back to a label-only card when omitted.
|
|
29
|
+
*/
|
|
30
|
+
renderStep?: (ctx: StepperRenderStepContext) => React.ReactNode;
|
|
14
31
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const stepperVariants: (props?: ({
|
|
2
2
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
3
|
+
variant?: "default" | "summary" | "track" | "compact" | "rail" | "pipeline" | null | undefined;
|
|
3
4
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
4
5
|
export declare const stepVariants: (props?: ({
|
|
5
6
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
@@ -8,3 +9,28 @@ export declare const stepVariants: (props?: ({
|
|
|
8
9
|
export declare const iconVariants: (props?: ({
|
|
9
10
|
status?: "default" | "active" | "completed" | null | undefined;
|
|
10
11
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
|
+
export declare const compactStepVariants: (props?: ({
|
|
13
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
14
|
+
status?: "default" | "active" | "completed" | null | undefined;
|
|
15
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
16
|
+
export declare const compactIconVariants: (props?: ({
|
|
17
|
+
status?: "default" | "active" | "completed" | null | undefined;
|
|
18
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
19
|
+
export declare const compactLabelVariants: (props?: ({
|
|
20
|
+
status?: "default" | "active" | "completed" | null | undefined;
|
|
21
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
22
|
+
export declare const pipelineDotVariants: (props?: ({
|
|
23
|
+
status?: "default" | "active" | "completed" | null | undefined;
|
|
24
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
25
|
+
export declare const trackStepVariants: (props?: ({
|
|
26
|
+
status?: "default" | "active" | "completed" | null | undefined;
|
|
27
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
28
|
+
export declare const trackIconVariants: (props?: ({
|
|
29
|
+
status?: "default" | "active" | "completed" | null | undefined;
|
|
30
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
31
|
+
export declare const summaryStepVariants: (props?: ({
|
|
32
|
+
status?: "default" | "active" | "completed" | null | undefined;
|
|
33
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
34
|
+
export declare const summaryIconVariants: (props?: ({
|
|
35
|
+
status?: "default" | "active" | "completed" | null | undefined;
|
|
36
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|