@tetrascience-npm/tetrascience-react-ui 0.5.0-beta.65.1 → 0.5.0-beta.67.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -37
- package/dist/components/composed/ProcessFlow/ProcessFlow.cjs +2 -0
- package/dist/components/composed/ProcessFlow/ProcessFlow.cjs.map +1 -0
- package/dist/components/composed/ProcessFlow/ProcessFlow.js +543 -0
- package/dist/components/composed/ProcessFlow/ProcessFlow.js.map +1 -0
- package/dist/components/composed/ProcessFlow/ProcessFlow.utils.cjs +2 -0
- package/dist/components/composed/ProcessFlow/ProcessFlow.utils.cjs.map +1 -0
- package/dist/components/composed/ProcessFlow/ProcessFlow.utils.js +84 -0
- package/dist/components/composed/ProcessFlow/ProcessFlow.utils.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +99 -0
- package/dist/index.js +605 -601
- package/dist/index.js.map +1 -1
- package/dist/index.tailwind.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { ColumnOrderState } from '@tanstack/react-table';
|
|
|
12
12
|
import { Combobox as Combobox_2 } from '@base-ui/react';
|
|
13
13
|
import { Command as Command_2 } from 'cmdk';
|
|
14
14
|
import { ComponentProps } from 'react';
|
|
15
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
15
16
|
import { Context as Context_2 } from 'react';
|
|
16
17
|
import { ContextMenu as ContextMenu_2 } from 'radix-ui';
|
|
17
18
|
import { DayButton } from 'react-day-picker';
|
|
@@ -35,6 +36,7 @@ import { Locale } from 'react-day-picker';
|
|
|
35
36
|
import { LucideIcon } from 'lucide-react';
|
|
36
37
|
import { MemoExoticComponent } from 'react';
|
|
37
38
|
import { Menubar as Menubar_2 } from 'radix-ui';
|
|
39
|
+
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
38
40
|
import { NavigationMenu as NavigationMenu_2 } from 'radix-ui';
|
|
39
41
|
import { OnChange } from '@monaco-editor/react';
|
|
40
42
|
import { OTPInput } from 'input-otp';
|
|
@@ -2569,6 +2571,103 @@ export declare function PopoverTrigger({ ...props }: React_2.ComponentProps<type
|
|
|
2569
2571
|
|
|
2570
2572
|
export declare function pos(row: number, col: number, columns: number): WellId;
|
|
2571
2573
|
|
|
2574
|
+
/**
|
|
2575
|
+
* Runtime list of the visual states supported by ProcessFlow steps.
|
|
2576
|
+
* Use this for controls, schemas, and forms that need to present the same status values the component understands.
|
|
2577
|
+
*/
|
|
2578
|
+
export declare const PROCESS_FLOW_STEP_STATUSES: readonly ["pending", "active", "completed", "error", "disabled"];
|
|
2579
|
+
|
|
2580
|
+
export declare function ProcessFlow({ steps, connections, selectedStepId, onStepSelect, orientation, size, showDescriptions, className, style, "aria-label": ariaLabel, ...props }: ProcessFlowProps): JSX.Element | null;
|
|
2581
|
+
|
|
2582
|
+
/** Connection between two steps in a branching/configurable flow. Linear flows derive connections automatically. */
|
|
2583
|
+
export declare interface ProcessFlowConnection {
|
|
2584
|
+
id?: string;
|
|
2585
|
+
from: string;
|
|
2586
|
+
to: string;
|
|
2587
|
+
status?: ProcessFlowStepStatus;
|
|
2588
|
+
ariaLabel?: string;
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
/** Direction for linear process flows. Branching flows are configured with step positions and connections. */
|
|
2592
|
+
export declare type ProcessFlowOrientation = "horizontal" | "vertical";
|
|
2593
|
+
|
|
2594
|
+
/**
|
|
2595
|
+
* Presentational process flow.
|
|
2596
|
+
*
|
|
2597
|
+
* ProcessFlow is fully controlled by props. It visualizes parent-owned workflow state and emits user selection through
|
|
2598
|
+
* onStepSelect. It intentionally does not own status transitions or fire completion/error side effects.
|
|
2599
|
+
*/
|
|
2600
|
+
export declare interface ProcessFlowProps extends Omit<ComponentPropsWithoutRef<"nav">, "onSelect"> {
|
|
2601
|
+
/** Ordered list of steps to render. Each step controls its own visual status. */
|
|
2602
|
+
steps: ProcessFlowStep[];
|
|
2603
|
+
/** Optional explicit connections for branching/configurable flows. */
|
|
2604
|
+
connections?: ProcessFlowConnection[];
|
|
2605
|
+
/** Selected/viewed step id. This is separate from the active workflow status. */
|
|
2606
|
+
selectedStepId?: string;
|
|
2607
|
+
/** Called when a selectable step is clicked. Disabled and non-selectable steps do not call this. */
|
|
2608
|
+
onStepSelect?: (step: ProcessFlowStep, details: ProcessFlowStepSelectDetails) => void;
|
|
2609
|
+
orientation?: ProcessFlowOrientation;
|
|
2610
|
+
size?: ProcessFlowSize;
|
|
2611
|
+
/** Defaults to true. Set to false to hide step descriptions. */
|
|
2612
|
+
showDescriptions?: boolean;
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
/** Visual density of the process flow. */
|
|
2616
|
+
export declare type ProcessFlowSize = "default" | "compact";
|
|
2617
|
+
|
|
2618
|
+
/**
|
|
2619
|
+
* Configurable step rendered by ProcessFlow.
|
|
2620
|
+
*
|
|
2621
|
+
* Keep workflow-specific behavior in the parent. A step config should describe what to render, not what to do when a
|
|
2622
|
+
* workflow completes or errors.
|
|
2623
|
+
*/
|
|
2624
|
+
export declare interface ProcessFlowStep {
|
|
2625
|
+
/** Stable identifier used for selection and connections. */
|
|
2626
|
+
id: string;
|
|
2627
|
+
/** Visible step label. */
|
|
2628
|
+
label: ReactNode;
|
|
2629
|
+
/** Optional secondary text shown under or beside the label. */
|
|
2630
|
+
description?: ReactNode;
|
|
2631
|
+
/** Parent-controlled visual state. Defaults to "pending". */
|
|
2632
|
+
status?: ProcessFlowStepStatus;
|
|
2633
|
+
/** Accessible label for selectable steps. */
|
|
2634
|
+
ariaLabel?: string;
|
|
2635
|
+
/** Forces the step into the disabled visual/non-interactive state. */
|
|
2636
|
+
disabled?: boolean;
|
|
2637
|
+
/** Set to false when the step should render as non-navigable even when onStepSelect is provided. */
|
|
2638
|
+
selectable?: boolean;
|
|
2639
|
+
/** Optional grid position for simple branching/configurable layouts. */
|
|
2640
|
+
position?: ProcessFlowStepPosition;
|
|
2641
|
+
}
|
|
2642
|
+
|
|
2643
|
+
export declare type ProcessFlowStepConfig = ProcessFlowStep;
|
|
2644
|
+
|
|
2645
|
+
export declare interface ProcessFlowStepPosition {
|
|
2646
|
+
/** Zero-based row used when rendering a simple branching/configurable flow. */
|
|
2647
|
+
row?: number;
|
|
2648
|
+
/** Zero-based column used when rendering a simple branching/configurable flow. */
|
|
2649
|
+
column?: number;
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2652
|
+
export declare interface ProcessFlowStepSelectDetails {
|
|
2653
|
+
/** Zero-based index of the selected step in the steps prop. */
|
|
2654
|
+
stepIndex: number;
|
|
2655
|
+
/** Current visual status of the selected step. */
|
|
2656
|
+
status: ProcessFlowStepStatus;
|
|
2657
|
+
nativeEvent: MouseEvent_2<HTMLButtonElement>;
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2660
|
+
/**
|
|
2661
|
+
* Visual state for a ProcessFlow step.
|
|
2662
|
+
*
|
|
2663
|
+
* The parent application owns this state. ProcessFlow renders the provided status and does not run workflow side effects.
|
|
2664
|
+
*/
|
|
2665
|
+
export declare type ProcessFlowStepStatus = (typeof PROCESS_FLOW_STEP_STATUSES)[number];
|
|
2666
|
+
|
|
2667
|
+
export declare type ProcessStep = ProcessFlowStep;
|
|
2668
|
+
|
|
2669
|
+
export declare type ProcessStepStatus = ProcessFlowStepStatus;
|
|
2670
|
+
|
|
2572
2671
|
export declare const PromptInput: ({ className, accept, multiple, globalDrop, syncHiddenInput, maxFiles, maxFileSize, onError, onSubmit, children, ...props }: PromptInputProps) => JSX.Element;
|
|
2573
2672
|
|
|
2574
2673
|
export declare const PromptInputActionAddAttachments: ({ label, ...props }: PromptInputActionAddAttachmentsProps) => JSX.Element;
|