@superleapai/flow-ui 2.3.7 → 2.3.8
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/components/steps.js +245 -0
- package/components/tabs.js +191 -0
- package/core/flow.js +34 -0
- package/dist/output.css +1 -1
- package/dist/superleap-flow.min.js +2 -2
- package/index.d.ts +36 -0
- package/index.js +4 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -535,6 +535,40 @@ declare module "@superleapai/flow-ui" {
|
|
|
535
535
|
label: string;
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
+
export interface TabsTabItem {
|
|
539
|
+
value: string;
|
|
540
|
+
label: string;
|
|
541
|
+
content: HTMLElement | string;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
export interface TabsConfig {
|
|
545
|
+
defaultValue?: string;
|
|
546
|
+
value?: string;
|
|
547
|
+
onChange?: (value: string) => void;
|
|
548
|
+
tabs: TabsTabItem[];
|
|
549
|
+
size?: "default" | "small" | "large";
|
|
550
|
+
listClassName?: string;
|
|
551
|
+
contentClassName?: string;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
export interface StepsStepItem {
|
|
555
|
+
id: string;
|
|
556
|
+
label: string;
|
|
557
|
+
content?: HTMLElement | string;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
export interface StepsConfig {
|
|
561
|
+
steps: StepsStepItem[];
|
|
562
|
+
defaultValue?: string;
|
|
563
|
+
value?: string;
|
|
564
|
+
onChange?: (stepId: string) => void;
|
|
565
|
+
title?: string;
|
|
566
|
+
description?: string;
|
|
567
|
+
listClassName?: string;
|
|
568
|
+
contentClassName?: string;
|
|
569
|
+
showContent?: boolean;
|
|
570
|
+
}
|
|
571
|
+
|
|
538
572
|
export interface ToastAPI {
|
|
539
573
|
close: () => void;
|
|
540
574
|
element: HTMLElement | null;
|
|
@@ -589,6 +623,8 @@ declare module "@superleapai/flow-ui" {
|
|
|
589
623
|
steps: StepConfig[],
|
|
590
624
|
currentStepId: string
|
|
591
625
|
): void;
|
|
626
|
+
createTabs(config: TabsConfig): HTMLElement;
|
|
627
|
+
createSteps(config: StepsConfig): HTMLElement;
|
|
592
628
|
|
|
593
629
|
// Alerts & Toasts
|
|
594
630
|
showToast(
|
package/index.js
CHANGED
|
@@ -90,6 +90,8 @@
|
|
|
90
90
|
require("./components/checkbox.js");
|
|
91
91
|
require("./components/radio-group.js");
|
|
92
92
|
require("./components/table.js");
|
|
93
|
+
require("./components/tabs.js");
|
|
94
|
+
require("./components/steps.js");
|
|
93
95
|
|
|
94
96
|
// Export FlowUI and SuperLeap from global scope
|
|
95
97
|
if (typeof global !== "undefined" && global.FlowUI) {
|
|
@@ -164,6 +166,8 @@
|
|
|
164
166
|
"Checkbox",
|
|
165
167
|
"RadioGroup",
|
|
166
168
|
"SuperleapTable",
|
|
169
|
+
"Tabs",
|
|
170
|
+
"Steps",
|
|
167
171
|
];
|
|
168
172
|
|
|
169
173
|
componentNames.forEach((name) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superleapai/flow-ui",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.8",
|
|
4
4
|
"description": "A reusable design system for building multi-step forms with comprehensive UI components. Single file, clean globals, SDK included. Only FlowUI and SuperLeap exposed.",
|
|
5
5
|
"main": "dist/superleap-flow.min.js",
|
|
6
6
|
"types": "index.d.ts",
|