polaris-plus-ui 0.0.2 → 0.1.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/index.css +97 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +87 -2
- package/dist/index.d.ts +87 -2
- package/dist/index.js +351 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +332 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.css
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/* src/Flow-Components/Onboarding/Onboarding.css */
|
|
2
|
+
:root {
|
|
3
|
+
--onboarding-bg: #f6f6f7;
|
|
4
|
+
--onboarding-primary: #008060;
|
|
5
|
+
--onboarding-border: #e1e3e5;
|
|
6
|
+
--onboarding-radius: 12px;
|
|
7
|
+
}
|
|
8
|
+
s-page {
|
|
9
|
+
background-color: var(--onboarding-bg);
|
|
10
|
+
min-height: 100vh;
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
.onboarding-wrapper {
|
|
14
|
+
width: 100%;
|
|
15
|
+
padding-bottom: 60px;
|
|
16
|
+
}
|
|
17
|
+
.setup-info-text-wrapper {
|
|
18
|
+
margin-bottom: 8px;
|
|
19
|
+
}
|
|
20
|
+
.grid-container {
|
|
21
|
+
margin-top: 10px;
|
|
22
|
+
}
|
|
23
|
+
.wel-left-card,
|
|
24
|
+
.slideshow-container {
|
|
25
|
+
height: 100%;
|
|
26
|
+
}
|
|
27
|
+
.left-card-content,
|
|
28
|
+
.slideshow-inner {
|
|
29
|
+
background: white;
|
|
30
|
+
border-radius: var(--onboarding-radius);
|
|
31
|
+
}
|
|
32
|
+
.slideshow-inner {
|
|
33
|
+
border: 1px solid var(--onboarding-border);
|
|
34
|
+
}
|
|
35
|
+
.onboarding-sidebar-icon.large {
|
|
36
|
+
font-size: 60px;
|
|
37
|
+
margin-bottom: 16px;
|
|
38
|
+
}
|
|
39
|
+
.onboarding-sidebar-card-content [tone=success] {
|
|
40
|
+
font-weight: bold;
|
|
41
|
+
}
|
|
42
|
+
@media (max-width: 899px) {
|
|
43
|
+
.grid-container {
|
|
44
|
+
grid-template-columns: 1fr !important;
|
|
45
|
+
gap: 16px !important;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
.pagination-bullet {
|
|
49
|
+
transition: all 0.3s ease;
|
|
50
|
+
}
|
|
51
|
+
.onboarding-field {
|
|
52
|
+
margin-bottom: 24px;
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
gap: 8px;
|
|
56
|
+
text-align: left;
|
|
57
|
+
}
|
|
58
|
+
.onboarding-label {
|
|
59
|
+
font-size: 14px;
|
|
60
|
+
font-weight: 600;
|
|
61
|
+
color: #202223;
|
|
62
|
+
}
|
|
63
|
+
.onboarding-input {
|
|
64
|
+
width: 100%;
|
|
65
|
+
padding: 12px;
|
|
66
|
+
font-size: 14px;
|
|
67
|
+
border: 1px solid #d1d3d5;
|
|
68
|
+
border-radius: 8px;
|
|
69
|
+
transition: border-color 0.2s;
|
|
70
|
+
}
|
|
71
|
+
.onboarding-input:focus {
|
|
72
|
+
outline: none;
|
|
73
|
+
border-color: var(--onboarding-primary);
|
|
74
|
+
box-shadow: 0 0 0 1px var(--onboarding-primary);
|
|
75
|
+
}
|
|
76
|
+
.onboarding-field-checkbox {
|
|
77
|
+
flex-direction: row;
|
|
78
|
+
align-items: center;
|
|
79
|
+
}
|
|
80
|
+
.onboarding-checkbox-label {
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
gap: 12px;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
font-size: 14px;
|
|
86
|
+
}
|
|
87
|
+
.onboarding-checkbox {
|
|
88
|
+
width: 18px;
|
|
89
|
+
height: 18px;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
.onboarding-help-text {
|
|
93
|
+
font-size: 12px;
|
|
94
|
+
color: #6d7175;
|
|
95
|
+
margin-top: 4px;
|
|
96
|
+
}
|
|
97
|
+
/*# sourceMappingURL=index.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Flow-Components/Onboarding/Onboarding.css"],"sourcesContent":["/* Onboarding.css */\n:root {\n --onboarding-bg: #f6f6f7;\n --onboarding-primary: #008060;\n --onboarding-border: #e1e3e5;\n --onboarding-radius: 12px;\n}\n\n/* Page Wrapper */\ns-page {\n background-color: var(--onboarding-bg);\n min-height: 100vh;\n display: block;\n}\n\n.onboarding-wrapper {\n width: 100%;\n padding-bottom: 60px;\n}\n\n.setup-info-text-wrapper {\n margin-bottom: 8px;\n}\n\n/* Grid Layout */\n.grid-container {\n margin-top: 10px;\n}\n\n.wel-left-card, \n.slideshow-container {\n height: 100%;\n}\n\n/* Card Content Areas */\n.left-card-content,\n.slideshow-inner {\n background: white;\n border-radius: var(--onboarding-radius);\n}\n\n.slideshow-inner {\n border: 1px solid var(--onboarding-border);\n}\n\n/* Sidebar Specifics */\n.onboarding-sidebar-icon.large {\n font-size: 60px;\n margin-bottom: 16px;\n}\n\n/* Features in Sidebar */\n.onboarding-sidebar-card-content [tone=\"success\"] {\n font-weight: bold;\n}\n\n/* Mobile Responsiveness */\n@media (max-width: 899px) {\n .grid-container {\n grid-template-columns: 1fr !important;\n gap: 16px !important;\n }\n}\n\n/* Pagination Dots / Bullets */\n/* Note: Bullets are inline-styled in TSX for color flexibility, \n but base transitions go here */\n.pagination-bullet {\n transition: all 0.3s ease;\n}\n\n/* Form Fields */\n.onboarding-field {\n margin-bottom: 24px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n text-align: left;\n}\n\n.onboarding-label {\n font-size: 14px;\n font-weight: 600;\n color: #202223;\n}\n\n.onboarding-input {\n width: 100%;\n padding: 12px;\n font-size: 14px;\n border: 1px solid #d1d3d5;\n border-radius: 8px;\n transition: border-color 0.2s;\n}\n\n.onboarding-input:focus {\n outline: none;\n border-color: var(--onboarding-primary);\n box-shadow: 0 0 0 1px var(--onboarding-primary);\n}\n\n.onboarding-field-checkbox {\n flex-direction: row;\n align-items: center;\n}\n\n.onboarding-checkbox-label {\n display: flex;\n align-items: center;\n gap: 12px;\n cursor: pointer;\n font-size: 14px;\n}\n\n.onboarding-checkbox {\n width: 18px;\n height: 18px;\n cursor: pointer;\n}\n\n.onboarding-help-text {\n font-size: 12px;\n color: #6d7175;\n margin-top: 4px;\n}\n"],"mappings":";AACA;AACE,mBAAiB;AACjB,wBAAsB;AACtB,uBAAqB;AACrB,uBAAqB;AACvB;AAGA;AACE,oBAAkB,IAAI;AACtB,cAAY;AACZ,WAAS;AACX;AAEA,CAAC;AACC,SAAO;AACP,kBAAgB;AAClB;AAEA,CAAC;AACC,iBAAe;AACjB;AAGA,CAAC;AACC,cAAY;AACd;AAEA,CAAC;AACD,CAAC;AACC,UAAQ;AACV;AAGA,CAAC;AACD,CAAC;AACC,cAAY;AACZ,iBAAe,IAAI;AACrB;AAEA,CALC;AAMG,UAAQ,IAAI,MAAM,IAAI;AAC1B;AAGA,CAAC,uBAAuB,CAAC;AACvB,aAAW;AACX,iBAAe;AACjB;AAGA,CAAC,gCAAgC,CAAC;AAChC,eAAa;AACf;AAGA,QAAO,WAAY;AACjB,GAjCD;AAkCG,2BAAuB;AACvB,SAAK;AACP;AACF;AAKA,CAAC;AACG,cAAY,IAAI,KAAK;AACzB;AAGA,CAAC;AACC,iBAAe;AACf,WAAS;AACT,kBAAgB;AAChB,OAAK;AACL,cAAY;AACd;AAEA,CAAC;AACC,aAAW;AACX,eAAa;AACb,SAAO;AACT;AAEA,CAAC;AACC,SAAO;AACP,WAAS;AACT,aAAW;AACX,UAAQ,IAAI,MAAM;AAClB,iBAAe;AACf,cAAY,aAAa;AAC3B;AAEA,CATC,gBASgB;AACf,WAAS;AACT,gBAAc,IAAI;AAClB,cAAY,EAAE,EAAE,EAAE,IAAI,IAAI;AAC5B;AAEA,CAAC;AACC,kBAAgB;AAChB,eAAa;AACf;AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,OAAK;AACL,UAAQ;AACR,aAAW;AACb;AAEA,CAAC;AACC,SAAO;AACP,UAAQ;AACR,UAAQ;AACV;AAEA,CAAC;AACC,aAAW;AACX,SAAO;AACP,cAAY;AACd;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import React, { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
interface AppPageProps {
|
|
5
5
|
/** Page heading */
|
|
@@ -52,4 +52,89 @@ interface StatusCardsProps {
|
|
|
52
52
|
}
|
|
53
53
|
declare function StatusCard({ heading, title, status, tone, description, details, meta, action, onAction, }: StatusCardsProps): react_jsx_runtime.JSX.Element;
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
interface TabsProps {
|
|
56
|
+
defaultValue?: string;
|
|
57
|
+
value?: string;
|
|
58
|
+
onValueChange?: (value: string) => void;
|
|
59
|
+
children: ReactNode;
|
|
60
|
+
className?: string;
|
|
61
|
+
}
|
|
62
|
+
declare function Tabs({ defaultValue, value, onValueChange, children }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
63
|
+
interface TabsListProps {
|
|
64
|
+
children: ReactNode;
|
|
65
|
+
gap?: string;
|
|
66
|
+
}
|
|
67
|
+
declare function TabsList({ children, gap }: TabsListProps): react_jsx_runtime.JSX.Element;
|
|
68
|
+
interface TabsTriggerProps {
|
|
69
|
+
value: string;
|
|
70
|
+
children: ReactNode;
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
}
|
|
73
|
+
declare function TabsTrigger({ value, children, disabled }: TabsTriggerProps): react_jsx_runtime.JSX.Element;
|
|
74
|
+
interface TabsContentProps {
|
|
75
|
+
value: string;
|
|
76
|
+
children: ReactNode;
|
|
77
|
+
}
|
|
78
|
+
declare function TabsContent({ value, children }: TabsContentProps): react_jsx_runtime.JSX.Element | null;
|
|
79
|
+
|
|
80
|
+
interface OnboardingData {
|
|
81
|
+
[key: string]: any;
|
|
82
|
+
}
|
|
83
|
+
interface OnboardingStep {
|
|
84
|
+
id: string;
|
|
85
|
+
title: string;
|
|
86
|
+
subtitle?: string;
|
|
87
|
+
infoMessage?: string;
|
|
88
|
+
component?: React.ComponentType<{
|
|
89
|
+
data: OnboardingData;
|
|
90
|
+
updateData: (newData: Partial<OnboardingData>) => void;
|
|
91
|
+
}>;
|
|
92
|
+
children?: React.ReactNode;
|
|
93
|
+
validate?: (data: OnboardingData) => boolean;
|
|
94
|
+
sidebar?: {
|
|
95
|
+
icon?: React.ReactNode;
|
|
96
|
+
title: string;
|
|
97
|
+
description: string;
|
|
98
|
+
features?: string[];
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
interface OnboardingStepProps extends Omit<OnboardingStep, 'component'> {
|
|
102
|
+
children?: React.ReactNode;
|
|
103
|
+
}
|
|
104
|
+
interface OnboardingContextType {
|
|
105
|
+
currentStepIndex: number;
|
|
106
|
+
totalSteps: number;
|
|
107
|
+
data: OnboardingData;
|
|
108
|
+
updateData: (newData: Partial<OnboardingData>) => void;
|
|
109
|
+
nextStep: () => void;
|
|
110
|
+
prevStep: () => void;
|
|
111
|
+
isFirstStep: boolean;
|
|
112
|
+
isLastStep: boolean;
|
|
113
|
+
canProceed: boolean;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
interface SetupSummaryProps {
|
|
117
|
+
data?: OnboardingData;
|
|
118
|
+
updateData?: (newData: Partial<OnboardingData>) => void;
|
|
119
|
+
}
|
|
120
|
+
declare const SetupSummary: React.FC<SetupSummaryProps>;
|
|
121
|
+
|
|
122
|
+
interface OnboardingProps {
|
|
123
|
+
steps?: OnboardingStep[];
|
|
124
|
+
children?: React.ReactNode;
|
|
125
|
+
onFinish: (data: OnboardingData) => void;
|
|
126
|
+
}
|
|
127
|
+
declare const Step: React.FC<OnboardingStepProps>;
|
|
128
|
+
declare const Onboarding: React.FC<OnboardingProps> & {
|
|
129
|
+
Step: typeof Step;
|
|
130
|
+
Summary: typeof SetupSummary;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
declare const OnboardingProvider: React.FC<{
|
|
134
|
+
steps: OnboardingStep[];
|
|
135
|
+
children: React.ReactNode;
|
|
136
|
+
onFinish: (data: OnboardingData) => void;
|
|
137
|
+
}>;
|
|
138
|
+
declare const useOnboarding: () => OnboardingContextType;
|
|
139
|
+
|
|
140
|
+
export { AppPage, type AppPageProps, Onboarding, type OnboardingContextType, type OnboardingData, type OnboardingProps, OnboardingProvider, type OnboardingStep, type OnboardingStepProps, PageSection, type PageSectionProps, type PageSectionVariant, SetupSummary, StatusCard, type StatusCardsProps, type StatusTone, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, useOnboarding };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import React, { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
interface AppPageProps {
|
|
5
5
|
/** Page heading */
|
|
@@ -52,4 +52,89 @@ interface StatusCardsProps {
|
|
|
52
52
|
}
|
|
53
53
|
declare function StatusCard({ heading, title, status, tone, description, details, meta, action, onAction, }: StatusCardsProps): react_jsx_runtime.JSX.Element;
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
interface TabsProps {
|
|
56
|
+
defaultValue?: string;
|
|
57
|
+
value?: string;
|
|
58
|
+
onValueChange?: (value: string) => void;
|
|
59
|
+
children: ReactNode;
|
|
60
|
+
className?: string;
|
|
61
|
+
}
|
|
62
|
+
declare function Tabs({ defaultValue, value, onValueChange, children }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
63
|
+
interface TabsListProps {
|
|
64
|
+
children: ReactNode;
|
|
65
|
+
gap?: string;
|
|
66
|
+
}
|
|
67
|
+
declare function TabsList({ children, gap }: TabsListProps): react_jsx_runtime.JSX.Element;
|
|
68
|
+
interface TabsTriggerProps {
|
|
69
|
+
value: string;
|
|
70
|
+
children: ReactNode;
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
}
|
|
73
|
+
declare function TabsTrigger({ value, children, disabled }: TabsTriggerProps): react_jsx_runtime.JSX.Element;
|
|
74
|
+
interface TabsContentProps {
|
|
75
|
+
value: string;
|
|
76
|
+
children: ReactNode;
|
|
77
|
+
}
|
|
78
|
+
declare function TabsContent({ value, children }: TabsContentProps): react_jsx_runtime.JSX.Element | null;
|
|
79
|
+
|
|
80
|
+
interface OnboardingData {
|
|
81
|
+
[key: string]: any;
|
|
82
|
+
}
|
|
83
|
+
interface OnboardingStep {
|
|
84
|
+
id: string;
|
|
85
|
+
title: string;
|
|
86
|
+
subtitle?: string;
|
|
87
|
+
infoMessage?: string;
|
|
88
|
+
component?: React.ComponentType<{
|
|
89
|
+
data: OnboardingData;
|
|
90
|
+
updateData: (newData: Partial<OnboardingData>) => void;
|
|
91
|
+
}>;
|
|
92
|
+
children?: React.ReactNode;
|
|
93
|
+
validate?: (data: OnboardingData) => boolean;
|
|
94
|
+
sidebar?: {
|
|
95
|
+
icon?: React.ReactNode;
|
|
96
|
+
title: string;
|
|
97
|
+
description: string;
|
|
98
|
+
features?: string[];
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
interface OnboardingStepProps extends Omit<OnboardingStep, 'component'> {
|
|
102
|
+
children?: React.ReactNode;
|
|
103
|
+
}
|
|
104
|
+
interface OnboardingContextType {
|
|
105
|
+
currentStepIndex: number;
|
|
106
|
+
totalSteps: number;
|
|
107
|
+
data: OnboardingData;
|
|
108
|
+
updateData: (newData: Partial<OnboardingData>) => void;
|
|
109
|
+
nextStep: () => void;
|
|
110
|
+
prevStep: () => void;
|
|
111
|
+
isFirstStep: boolean;
|
|
112
|
+
isLastStep: boolean;
|
|
113
|
+
canProceed: boolean;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
interface SetupSummaryProps {
|
|
117
|
+
data?: OnboardingData;
|
|
118
|
+
updateData?: (newData: Partial<OnboardingData>) => void;
|
|
119
|
+
}
|
|
120
|
+
declare const SetupSummary: React.FC<SetupSummaryProps>;
|
|
121
|
+
|
|
122
|
+
interface OnboardingProps {
|
|
123
|
+
steps?: OnboardingStep[];
|
|
124
|
+
children?: React.ReactNode;
|
|
125
|
+
onFinish: (data: OnboardingData) => void;
|
|
126
|
+
}
|
|
127
|
+
declare const Step: React.FC<OnboardingStepProps>;
|
|
128
|
+
declare const Onboarding: React.FC<OnboardingProps> & {
|
|
129
|
+
Step: typeof Step;
|
|
130
|
+
Summary: typeof SetupSummary;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
declare const OnboardingProvider: React.FC<{
|
|
134
|
+
steps: OnboardingStep[];
|
|
135
|
+
children: React.ReactNode;
|
|
136
|
+
onFinish: (data: OnboardingData) => void;
|
|
137
|
+
}>;
|
|
138
|
+
declare const useOnboarding: () => OnboardingContextType;
|
|
139
|
+
|
|
140
|
+
export { AppPage, type AppPageProps, Onboarding, type OnboardingContextType, type OnboardingData, type OnboardingProps, OnboardingProvider, type OnboardingStep, type OnboardingStepProps, PageSection, type PageSectionProps, type PageSectionVariant, SetupSummary, StatusCard, type StatusCardsProps, type StatusTone, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, useOnboarding };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,14 +17,30 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// src/index.ts
|
|
21
31
|
var index_exports = {};
|
|
22
32
|
__export(index_exports, {
|
|
23
33
|
AppPage: () => AppPage,
|
|
34
|
+
Onboarding: () => Onboarding,
|
|
35
|
+
OnboardingProvider: () => OnboardingProvider,
|
|
24
36
|
PageSection: () => PageSection,
|
|
25
|
-
|
|
37
|
+
SetupSummary: () => SetupSummary,
|
|
38
|
+
StatusCard: () => StatusCard,
|
|
39
|
+
Tabs: () => Tabs,
|
|
40
|
+
TabsContent: () => TabsContent,
|
|
41
|
+
TabsList: () => TabsList,
|
|
42
|
+
TabsTrigger: () => TabsTrigger,
|
|
43
|
+
useOnboarding: () => useOnboarding
|
|
26
44
|
});
|
|
27
45
|
module.exports = __toCommonJS(index_exports);
|
|
28
46
|
|
|
@@ -106,10 +124,341 @@ function StatusCard({
|
|
|
106
124
|
] })
|
|
107
125
|
] }) }) }) });
|
|
108
126
|
}
|
|
127
|
+
|
|
128
|
+
// src/components/Tab/Tab.tsx
|
|
129
|
+
var import_react = require("react");
|
|
130
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
131
|
+
var TabsContext = (0, import_react.createContext)(void 0);
|
|
132
|
+
var useTabs = () => {
|
|
133
|
+
const context = (0, import_react.useContext)(TabsContext);
|
|
134
|
+
if (!context) {
|
|
135
|
+
throw new Error("Tabs sub-components must be used within a Tabs component");
|
|
136
|
+
}
|
|
137
|
+
return context;
|
|
138
|
+
};
|
|
139
|
+
function Tabs({ defaultValue, value, onValueChange, children }) {
|
|
140
|
+
const [internalActiveTab, setInternalActiveTab] = (0, import_react.useState)(defaultValue || "");
|
|
141
|
+
const activeTab = value !== void 0 ? value : internalActiveTab;
|
|
142
|
+
const setActiveTab = (newValue) => {
|
|
143
|
+
if (value === void 0) {
|
|
144
|
+
setInternalActiveTab(newValue);
|
|
145
|
+
}
|
|
146
|
+
onValueChange?.(newValue);
|
|
147
|
+
};
|
|
148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TabsContext.Provider, { value: { activeTab, setActiveTab }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: { width: "100%" }, children }) });
|
|
149
|
+
}
|
|
150
|
+
function TabsList({ children, gap = "small" }) {
|
|
151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("s-box", { paddingInline: "base", paddingBlock: "small", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: {
|
|
152
|
+
overflowX: "auto",
|
|
153
|
+
scrollbarWidth: "none",
|
|
154
|
+
msOverflowStyle: "none"
|
|
155
|
+
}, children: [
|
|
156
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("style", { dangerouslySetInnerHTML: { __html: `
|
|
157
|
+
::-webkit-scrollbar { display: none; }
|
|
158
|
+
` } }),
|
|
159
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("s-stack", { direction: "inline", gap, alignItems: "center", children })
|
|
160
|
+
] }) });
|
|
161
|
+
}
|
|
162
|
+
function TabsTrigger({ value, children, disabled }) {
|
|
163
|
+
const { activeTab, setActiveTab } = useTabs();
|
|
164
|
+
const isActive = activeTab === value;
|
|
165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("s-box", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
166
|
+
"s-clickable",
|
|
167
|
+
{
|
|
168
|
+
paddingInline: "small",
|
|
169
|
+
maxInlineWidth: "100px",
|
|
170
|
+
paddingBlock: "small-100",
|
|
171
|
+
borderRadius: "large-100",
|
|
172
|
+
background: isActive ? "strong" : "transparent",
|
|
173
|
+
onClick: () => !disabled && setActiveTab(value),
|
|
174
|
+
style: {
|
|
175
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
176
|
+
opacity: disabled ? 0.5 : 1,
|
|
177
|
+
transition: "background 0.2s ease, transform 0.1s ease",
|
|
178
|
+
userSelect: "none"
|
|
179
|
+
},
|
|
180
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
181
|
+
"s-text",
|
|
182
|
+
{
|
|
183
|
+
type: isActive ? "strong" : "generic",
|
|
184
|
+
tone: isActive ? "neutral" : "auto",
|
|
185
|
+
children
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
}
|
|
189
|
+
) });
|
|
190
|
+
}
|
|
191
|
+
function TabsContent({ value, children }) {
|
|
192
|
+
const { activeTab } = useTabs();
|
|
193
|
+
if (activeTab !== value) return null;
|
|
194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("s-box", { padding: "base", children });
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// src/Flow-Components/Onboarding/Onboarding.tsx
|
|
198
|
+
var import_react3 = __toESM(require("react"));
|
|
199
|
+
|
|
200
|
+
// src/Flow-Components/Onboarding/hooks/useOnboarding.tsx
|
|
201
|
+
var import_react2 = require("react");
|
|
202
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
203
|
+
var OnboardingContext = (0, import_react2.createContext)(void 0);
|
|
204
|
+
var OnboardingProvider = ({ steps, children, onFinish }) => {
|
|
205
|
+
const [currentStepIndex, setCurrentStepIndex] = (0, import_react2.useState)(0);
|
|
206
|
+
const [data, setData] = (0, import_react2.useState)({});
|
|
207
|
+
const updateData = (0, import_react2.useCallback)((newData) => {
|
|
208
|
+
setData((prev) => ({ ...prev, ...newData }));
|
|
209
|
+
}, []);
|
|
210
|
+
const nextStep = (0, import_react2.useCallback)(() => {
|
|
211
|
+
if (currentStepIndex < steps.length - 1) {
|
|
212
|
+
setCurrentStepIndex((prev) => prev + 1);
|
|
213
|
+
} else {
|
|
214
|
+
onFinish(data);
|
|
215
|
+
}
|
|
216
|
+
}, [currentStepIndex, steps.length, data, onFinish]);
|
|
217
|
+
const prevStep = (0, import_react2.useCallback)(() => {
|
|
218
|
+
if (currentStepIndex > 0) {
|
|
219
|
+
setCurrentStepIndex((prev) => prev - 1);
|
|
220
|
+
}
|
|
221
|
+
}, [currentStepIndex]);
|
|
222
|
+
const currentStep = steps[currentStepIndex];
|
|
223
|
+
const canProceed = (0, import_react2.useMemo)(() => {
|
|
224
|
+
if (!currentStep) return false;
|
|
225
|
+
return currentStep.validate ? currentStep.validate(data) : true;
|
|
226
|
+
}, [currentStep, data]);
|
|
227
|
+
const value = (0, import_react2.useMemo)(
|
|
228
|
+
() => ({
|
|
229
|
+
currentStepIndex,
|
|
230
|
+
totalSteps: steps.length,
|
|
231
|
+
data,
|
|
232
|
+
updateData,
|
|
233
|
+
nextStep,
|
|
234
|
+
prevStep,
|
|
235
|
+
isFirstStep: currentStepIndex === 0,
|
|
236
|
+
isLastStep: currentStepIndex === steps.length - 1,
|
|
237
|
+
canProceed
|
|
238
|
+
}),
|
|
239
|
+
[currentStepIndex, steps.length, data, updateData, nextStep, prevStep, canProceed]
|
|
240
|
+
);
|
|
241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(OnboardingContext.Provider, { value, children });
|
|
242
|
+
};
|
|
243
|
+
var useOnboarding = () => {
|
|
244
|
+
const context = (0, import_react2.useContext)(OnboardingContext);
|
|
245
|
+
if (!context) {
|
|
246
|
+
throw new Error("useOnboarding must be used within an OnboardingProvider");
|
|
247
|
+
}
|
|
248
|
+
return context;
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
// src/Flow-Components/Onboarding/components/SetupSummary.tsx
|
|
252
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
253
|
+
var SetupSummary = (props) => {
|
|
254
|
+
const context = useOnboarding();
|
|
255
|
+
const data = props.data || context.data;
|
|
256
|
+
const entries = Object.entries(data);
|
|
257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "setup-summary", children: [
|
|
258
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { marginBottom: "24px" }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "glass-pill", style: { background: "#e1f5fe", color: "#0277bd", padding: "4px 12px" }, children: "Overview" }) }),
|
|
259
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { display: "grid", gap: "16px" }, children: [
|
|
260
|
+
entries.map(([key, value]) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: {
|
|
261
|
+
display: "flex",
|
|
262
|
+
justifyContent: "space-between",
|
|
263
|
+
padding: "12px 0",
|
|
264
|
+
borderBottom: "1px solid #f1f2f4"
|
|
265
|
+
}, children: [
|
|
266
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { style: { fontWeight: 600, color: "#6d7175", textTransform: "capitalize" }, children: [
|
|
267
|
+
key.replace(/([A-Z])/g, " $1").trim(),
|
|
268
|
+
":"
|
|
269
|
+
] }),
|
|
270
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: { fontWeight: 500, color: "#1a1c1d" }, children: typeof value === "boolean" ? value ? "Yes" : "No" : String(value || "--") })
|
|
271
|
+
] }, key)),
|
|
272
|
+
entries.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: { color: "#6d7175", fontStyle: "italic" }, children: "No configuration data provided." })
|
|
273
|
+
] }),
|
|
274
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { marginTop: "32px", padding: "16px", borderRadius: "8px", background: "#f9fafb", border: "1px dashed #d1d3d5" }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: { fontSize: "13px", color: "#6d7175", margin: 0 }, children: 'Please review your information and click "Finish Setup" to activate account.' }) })
|
|
275
|
+
] });
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
// src/Flow-Components/Onboarding/Onboarding.tsx
|
|
279
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
280
|
+
var OnboardingInner = ({ steps }) => {
|
|
281
|
+
const {
|
|
282
|
+
currentStepIndex,
|
|
283
|
+
totalSteps,
|
|
284
|
+
data,
|
|
285
|
+
updateData,
|
|
286
|
+
nextStep,
|
|
287
|
+
prevStep,
|
|
288
|
+
isFirstStep,
|
|
289
|
+
isLastStep,
|
|
290
|
+
canProceed
|
|
291
|
+
} = useOnboarding();
|
|
292
|
+
const currentStep = steps[currentStepIndex];
|
|
293
|
+
if (!currentStep) return null;
|
|
294
|
+
const StepComponent = currentStep.component;
|
|
295
|
+
const progress = Math.round((currentStepIndex + 1) / totalSteps * 100);
|
|
296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-page", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("s-stack", { gap: "large", children: [
|
|
297
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("s-stack", { gap: "tight", children: [
|
|
298
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-text", { type: "strong", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { fontSize: "24px", fontWeight: "bold", marginTop: "30px" }, children: "Installation Setup" }) }),
|
|
299
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "setup-info-text-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-text", { color: "subdued", type: "strong", children: "Complete all the steps to set up your Live Gold Rate Updater account." }) })
|
|
300
|
+
] }),
|
|
301
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { display: "flex", justifyContent: "center", width: "100%", padding: "0 0 16px" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
302
|
+
"div",
|
|
303
|
+
{
|
|
304
|
+
className: "grid-container",
|
|
305
|
+
style: {
|
|
306
|
+
maxWidth: "1000px",
|
|
307
|
+
width: "100%",
|
|
308
|
+
display: "grid",
|
|
309
|
+
gridTemplateColumns: "1fr 0.6fr",
|
|
310
|
+
gap: "24px",
|
|
311
|
+
alignItems: "stretch"
|
|
312
|
+
},
|
|
313
|
+
children: [
|
|
314
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "wel-left-card", style: { display: "flex", flexDirection: "column", gap: "20px" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { flex: 1 }, children: [
|
|
315
|
+
currentStep.infoMessage && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { marginBottom: "15px" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-section", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-banner", { tone: "info", heading: "Welcome to Installation Setup!", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-text", { children: currentStep.infoMessage }) }) }) }),
|
|
316
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-section", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
317
|
+
"div",
|
|
318
|
+
{
|
|
319
|
+
className: "left-card-content",
|
|
320
|
+
style: {
|
|
321
|
+
minHeight: "450px",
|
|
322
|
+
display: "flex",
|
|
323
|
+
flexDirection: "column",
|
|
324
|
+
justifyContent: "space-between",
|
|
325
|
+
padding: "20px"
|
|
326
|
+
},
|
|
327
|
+
children: [
|
|
328
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("s-stack", { gap: "base", children: [
|
|
329
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("s-stack", { direction: "inline", justifyContent: "space-between", alignItems: "center", children: [
|
|
330
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("s-text", { color: "subdued", type: "strong", children: [
|
|
331
|
+
"Step ",
|
|
332
|
+
currentStepIndex + 1,
|
|
333
|
+
" of ",
|
|
334
|
+
totalSteps
|
|
335
|
+
] }),
|
|
336
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-badge", { tone: "info", size: "base", children: `${progress}%` })
|
|
337
|
+
] }),
|
|
338
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: {
|
|
339
|
+
width: "100%",
|
|
340
|
+
height: "8px",
|
|
341
|
+
backgroundColor: "#e5e5e5",
|
|
342
|
+
borderRadius: "4px",
|
|
343
|
+
overflow: "hidden"
|
|
344
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: {
|
|
345
|
+
width: `${progress}%`,
|
|
346
|
+
height: "100%",
|
|
347
|
+
backgroundColor: "#008060",
|
|
348
|
+
transition: "width 0.5s ease"
|
|
349
|
+
} }) }),
|
|
350
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("s-stack", { gap: "large", children: [
|
|
351
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("s-stack", { gap: "none", children: [
|
|
352
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-text", { "font-weight": "bold", type: "strong", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { fontWeight: "bold", fontSize: "18px" }, children: currentStep.title }) }),
|
|
353
|
+
currentStep.subtitle && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-text", { color: "subdued", type: "strong", children: currentStep.subtitle })
|
|
354
|
+
] }),
|
|
355
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "onboarding-step-component-mount", children: StepComponent ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(StepComponent, { data, updateData }) : currentStep.children })
|
|
356
|
+
] })
|
|
357
|
+
] }) }),
|
|
358
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { flexShrink: 0, paddingTop: "24px" }, children: [
|
|
359
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-divider", {}),
|
|
360
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("s-stack", { direction: "inline", justifyContent: "space-between", style: { paddingTop: "16px" }, children: [
|
|
361
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-button", { onClick: prevStep, disabled: isFirstStep, children: "Back" }),
|
|
362
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
363
|
+
"s-button",
|
|
364
|
+
{
|
|
365
|
+
variant: "primary",
|
|
366
|
+
onClick: nextStep,
|
|
367
|
+
disabled: !canProceed,
|
|
368
|
+
children: isLastStep ? "Finish" : "Next"
|
|
369
|
+
}
|
|
370
|
+
)
|
|
371
|
+
] })
|
|
372
|
+
] })
|
|
373
|
+
]
|
|
374
|
+
}
|
|
375
|
+
) })
|
|
376
|
+
] }) }),
|
|
377
|
+
currentStep.sidebar && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "slideshow-container", style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-section", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
378
|
+
"div",
|
|
379
|
+
{
|
|
380
|
+
className: "slideshow-inner",
|
|
381
|
+
style: {
|
|
382
|
+
minHeight: "450px",
|
|
383
|
+
display: "flex",
|
|
384
|
+
flexDirection: "column",
|
|
385
|
+
justifyContent: "center",
|
|
386
|
+
padding: "20px 0",
|
|
387
|
+
textAlign: "center"
|
|
388
|
+
},
|
|
389
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("s-stack", { alignItems: "center", justifyContent: "center", gap: "large", children: [
|
|
390
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { display: "flex", alignItems: "center", justifyContent: "center" }, children: currentStep.sidebar.icon ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { fontSize: "60px" }, children: currentStep.sidebar.icon }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { fontSize: "60px" }, children: "\u{1F514}" }) }),
|
|
391
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("s-stack", { gap: "tight", align: "center", children: [
|
|
392
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-text", { "font-weight": "bold", type: "strong", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { fontSize: "18px", fontWeight: "bold" }, children: currentStep.sidebar.title }) }),
|
|
393
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-text", { color: "subdued", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { maxWidth: "300px", margin: "0 auto" }, children: currentStep.sidebar.description }) })
|
|
394
|
+
] }),
|
|
395
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-divider", {}),
|
|
396
|
+
currentStep.sidebar.features && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-stack", { gap: "base", align: "start", style: { textAlign: "left", width: "100%", paddingLeft: "32px" }, children: currentStep.sidebar.features.map((feature, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("s-stack", { gap: "small", direction: "inline", alignItems: "start", children: [
|
|
397
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-text", { tone: "success", fontWeight: "bold", children: "\u2713" }),
|
|
398
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-text", { variant: "bodyMd", children: feature })
|
|
399
|
+
] }, index)) }),
|
|
400
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-divider", {}),
|
|
401
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("s-stack", { direction: "inline", justifyContent: "center", alignItems: "center", gap: "base", children: steps.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
402
|
+
"div",
|
|
403
|
+
{
|
|
404
|
+
style: {
|
|
405
|
+
width: currentStepIndex === index ? "28px" : "8px",
|
|
406
|
+
height: "7px",
|
|
407
|
+
borderRadius: "4px",
|
|
408
|
+
background: currentStepIndex === index ? "#f49342" : "#e1e3e5",
|
|
409
|
+
transition: "all 0.3s ease"
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
index
|
|
413
|
+
)) })
|
|
414
|
+
] })
|
|
415
|
+
}
|
|
416
|
+
) }) })
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
) })
|
|
420
|
+
] }) });
|
|
421
|
+
};
|
|
422
|
+
var Step = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children });
|
|
423
|
+
var Onboarding = ({ steps: stepsProp, children, onFinish }) => {
|
|
424
|
+
const steps = import_react3.default.useMemo(() => {
|
|
425
|
+
if (stepsProp) return stepsProp;
|
|
426
|
+
const discoveredSteps = [];
|
|
427
|
+
import_react3.default.Children.forEach(children, (child) => {
|
|
428
|
+
if (import_react3.default.isValidElement(child) && child.type === Step) {
|
|
429
|
+
const props = child.props;
|
|
430
|
+
discoveredSteps.push({
|
|
431
|
+
...props,
|
|
432
|
+
children: props.children
|
|
433
|
+
});
|
|
434
|
+
} else if (import_react3.default.isValidElement(child) && child.type === SetupSummary) {
|
|
435
|
+
const props = child.props;
|
|
436
|
+
discoveredSteps.push({
|
|
437
|
+
id: "summary",
|
|
438
|
+
title: "Review & Finish Setup",
|
|
439
|
+
...props,
|
|
440
|
+
component: SetupSummary
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
return discoveredSteps;
|
|
445
|
+
}, [stepsProp, children]);
|
|
446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(OnboardingProvider, { steps, onFinish, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(OnboardingInner, { steps }) });
|
|
447
|
+
};
|
|
448
|
+
Onboarding.Step = Step;
|
|
449
|
+
Onboarding.Summary = SetupSummary;
|
|
109
450
|
// Annotate the CommonJS export names for ESM import in node:
|
|
110
451
|
0 && (module.exports = {
|
|
111
452
|
AppPage,
|
|
453
|
+
Onboarding,
|
|
454
|
+
OnboardingProvider,
|
|
112
455
|
PageSection,
|
|
113
|
-
|
|
456
|
+
SetupSummary,
|
|
457
|
+
StatusCard,
|
|
458
|
+
Tabs,
|
|
459
|
+
TabsContent,
|
|
460
|
+
TabsList,
|
|
461
|
+
TabsTrigger,
|
|
462
|
+
useOnboarding
|
|
114
463
|
});
|
|
115
464
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/components/AppPage/AppPage.tsx","../src/components/PageSection/PageSection.tsx","../src/components/StatusCard/StatusCard.tsx"],"sourcesContent":["// Core page components\nexport * from \"./components/AppPage\";\nexport * from \"./components/PageSection\";\n\n// UI components\nexport * from \"./components/StatusCard\";","import type { ReactNode } from \"react\";\n\nexport interface AppPageProps {\n /** Page heading */\n heading: string;\n /** Page subheading */\n subheading?: string;\n children: ReactNode;\n}\n\n/**\n * AppPage\n *\n * Wraps `s-page` with an `s-section` layout section.\n * Requires the Polaris CDN script in your app's <head>:\n * https://cdn.shopify.com/shopifycloud/polaris.js\n */\nexport function AppPage({ heading, subheading, children }: AppPageProps) {\n return (\n <s-page heading={heading}>\n {subheading && (\n <s-text as=\"p\" variant=\"bodyMd\" slot=\"subtitle\">\n {subheading}\n </s-text>\n )}\n <s-section>\n {children}\n </s-section>\n </s-page>\n );\n}","import type { ReactNode } from \"react\";\n\nexport type PageSectionVariant = \"oneThird\" | \"oneHalf\" | \"fullWidth\";\n\nexport interface PageSectionProps {\n /** Section heading */\n heading?: string;\n /** Content inside the section */\n children: ReactNode;\n}\n\n/**\n * PageSection\n *\n * A typed wrapper around `s-section` for use inside an `AppPage`\n * or directly within an `s-page`.\n *\n * CDN: https://cdn.shopify.com/shopifycloud/polaris.js\n */\nexport function PageSection({ heading, children }: PageSectionProps) {\n return (\n <s-section heading={heading}>\n {children}\n </s-section>\n );\n}\n","import type { ReactNode } from \"react\";\n\nexport type StatusTone = \"info\" | \"success\" | \"warning\" | \"critical\";\n\ninterface DetailItem {\n label: string;\n value: string;\n}\n\nexport interface StatusCardsProps {\n heading: string;\n title: string;\n status?: string;\n tone?: StatusTone;\n description?: string;\n details?: DetailItem[];\n meta?: string;\n action?: string;\n onAction?: () => void;\n}\n\nexport function StatusCard({\n heading,\n title,\n status,\n tone = \"info\",\n description,\n details = [],\n meta,\n action,\n onAction,\n}: StatusCardsProps) {\n return (\n <s-section>\n <s-card>\n <s-box padding=\"base\">\n <s-stack gap=\"base\">\n\n {/* Header */}\n \n\t\t\t\t\t\t\t\t\t\t\t\t\t<s-stack gap=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t <s-text variant=\"headingMd\" color=\"subdued\">\n <h2 style={{ margin: 0 ,marginLeft: \"0.5rem\", letterSpacing: \"0.1rem\"}}> {heading}</h2>\n </s-text>\n \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<s-stack direction=\"inline\" alignItems=\"center\" gap=\"small\">\n <s-text variant=\"headingMd\" fontWeight=\"semibold\">\n <h1 style={{ margin: \"0.5rem\" }}> {title}</h1>\n </s-text>\n {status && (\n <s-badge tone={tone}>{status}</s-badge>\n )}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</s-stack>\n </s-stack>\n\n {/* Description */}\n {description && (\n <s-text variant=\"bodyMd\" tone=\"subdued\">\n <h3 style={{ margin: 0 ,marginLeft: \"0.5rem\", color:\"#596063\" }}>{description}</h3>\n </s-text>\n )}\n\n {/* Details → GRID (important change) */}\n {details.length > 0 && (\n <s-grid\n gap=\"small\"\n gridTemplateColumns=\"1fr 1fr\"\n >\n {details.map((item, i) => (\n <s-box\n key={i}\n padding=\"base\"\n background=\"strong\"\n borderRadius=\"base\"\n >\n <s-stack gap=\"small-100\">\n <s-text variant=\"bodySm\" tone=\"subdued\">\n {item.label.toLocaleUpperCase()}\n </s-text>\n\n <s-text variant=\"bodyMd\" fontWeight=\"medium\">\n {item.value}\n </s-text>\n </s-stack>\n </s-box>\n ))}\n </s-grid>\n )}\n\n {/* Footer */}\n {(meta || action) && (\n <>\n <s-divider />\n\n <s-stack\n direction=\"inline\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n >\n <s-text variant=\"bodySm\" tone=\"subdued\">\n {meta}\n </s-text>\n\n {action && (\n <s-button variant=\"secondary\" onClick={onAction}>\n {action}\n </s-button>\n )}\n </s-stack>\n </>\n )}\n\n </s-stack>\n </s-box>\n </s-card>\n </s-section>\n );\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACmBQ;AAFD,SAAS,QAAQ,EAAE,SAAS,YAAY,SAAS,GAAiB;AACrE,SACI,6CAAC,YAAO,SACH;AAAA,kBACG,4CAAC,YAAO,IAAG,KAAI,SAAQ,UAAS,MAAK,YAChC,sBACL;AAAA,IAEJ,4CAAC,eACI,UACL;AAAA,KACJ;AAER;;;ACTQ,IAAAA,sBAAA;AAFD,SAAS,YAAY,EAAE,SAAS,SAAS,GAAqB;AACjE,SACI,6CAAC,eAAU,SACN,UACL;AAER;;;ACgBe,IAAAC,sBAAA;AApBR,SAAS,WAAW;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,UAAU,CAAC;AAAA,EACX;AAAA,EACA;AAAA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Ae;AAAA,UACf,YAAW;AAAA,UAEX;AAAA,yDAAC,YAAO,SAAQ,UAAS,MAAK,WACzB,gBACL;AAAA,YAEC,UACG,6CAAC,cAAS,SAAQ,aAAY,SAAS,UAClC,kBACL;AAAA;AAAA;AAAA,MAER;AAAA,OACJ;AAAA,KAGR,GACJ,GACJ,GACJ;AAER;","names":["import_jsx_runtime","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/components/AppPage/AppPage.tsx","../src/components/PageSection/PageSection.tsx","../src/components/StatusCard/StatusCard.tsx","../src/components/Tab/Tab.tsx","../src/Flow-Components/Onboarding/Onboarding.tsx","../src/Flow-Components/Onboarding/hooks/useOnboarding.tsx","../src/Flow-Components/Onboarding/components/SetupSummary.tsx"],"sourcesContent":["// Core page components\nexport * from \"./components/AppPage\";\nexport * from \"./components/PageSection\";\n\n// UI components\nexport * from \"./components/StatusCard\";\nexport * from \"./components/Tab\";\n\n// Flow Components\nexport * from \"./Flow-Components/Onboarding\";","import type { ReactNode } from \"react\";\n\nexport interface AppPageProps {\n /** Page heading */\n heading: string;\n /** Page subheading */\n subheading?: string;\n children: ReactNode;\n}\n\n/**\n * AppPage\n *\n * Wraps `s-page` with an `s-section` layout section.\n * Requires the Polaris CDN script in your app's <head>:\n * https://cdn.shopify.com/shopifycloud/polaris.js\n */\nexport function AppPage({ heading, subheading, children }: AppPageProps) {\n return (\n <s-page heading={heading}>\n {subheading && (\n <s-text as=\"p\" variant=\"bodyMd\" slot=\"subtitle\">\n {subheading}\n </s-text>\n )}\n <s-section>\n {children}\n </s-section>\n </s-page>\n );\n}","import type { ReactNode } from \"react\";\n\nexport type PageSectionVariant = \"oneThird\" | \"oneHalf\" | \"fullWidth\";\n\nexport interface PageSectionProps {\n /** Section heading */\n heading?: string;\n /** Content inside the section */\n children: ReactNode;\n}\n\n/**\n * PageSection\n *\n * A typed wrapper around `s-section` for use inside an `AppPage`\n * or directly within an `s-page`.\n *\n * CDN: https://cdn.shopify.com/shopifycloud/polaris.js\n */\nexport function PageSection({ heading, children }: PageSectionProps) {\n return (\n <s-section heading={heading}>\n {children}\n </s-section>\n );\n}\n","import type { ReactNode } from \"react\";\n\nexport type StatusTone = \"info\" | \"success\" | \"warning\" | \"critical\";\n\ninterface DetailItem {\n label: string;\n value: string;\n}\n\nexport interface StatusCardsProps {\n heading: string;\n title: string;\n status?: string;\n tone?: StatusTone;\n description?: string;\n details?: DetailItem[];\n meta?: string;\n action?: string;\n onAction?: () => void;\n}\n\nexport function StatusCard({\n heading,\n title,\n status,\n tone = \"info\",\n description,\n details = [],\n meta,\n action,\n onAction,\n}: StatusCardsProps) {\n return (\n <s-section>\n <s-card>\n <s-box padding=\"base\">\n <s-stack gap=\"base\">\n\n {/* Header */}\n \n\t\t\t\t\t\t\t\t\t\t\t\t\t<s-stack gap=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t <s-text variant=\"headingMd\" color=\"subdued\">\n <h2 style={{ margin: 0 ,marginLeft: \"0.5rem\", letterSpacing: \"0.1rem\"}}> {heading}</h2>\n </s-text>\n \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<s-stack direction=\"inline\" alignItems=\"center\" gap=\"small\">\n <s-text variant=\"headingMd\" fontWeight=\"semibold\">\n <h1 style={{ margin: \"0.5rem\" }}> {title}</h1>\n </s-text>\n {status && (\n <s-badge tone={tone}>{status}</s-badge>\n )}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</s-stack>\n </s-stack>\n\n {/* Description */}\n {description && (\n <s-text variant=\"bodyMd\" tone=\"subdued\">\n <h3 style={{ margin: 0 ,marginLeft: \"0.5rem\", color:\"#596063\" }}>{description}</h3>\n </s-text>\n )}\n\n {/* Details → GRID (important change) */}\n {details.length > 0 && (\n <s-grid\n gap=\"small\"\n gridTemplateColumns=\"1fr 1fr\"\n >\n {details.map((item, i) => (\n <s-box\n key={i}\n padding=\"base\"\n background=\"strong\"\n borderRadius=\"base\"\n >\n <s-stack gap=\"small-100\">\n <s-text variant=\"bodySm\" tone=\"subdued\">\n {item.label.toLocaleUpperCase()}\n </s-text>\n\n <s-text variant=\"bodyMd\" fontWeight=\"medium\">\n {item.value}\n </s-text>\n </s-stack>\n </s-box>\n ))}\n </s-grid>\n )}\n\n {/* Footer */}\n {(meta || action) && (\n <>\n <s-divider />\n\n <s-stack\n direction=\"inline\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n >\n <s-text variant=\"bodySm\" tone=\"subdued\">\n {meta}\n </s-text>\n\n {action && (\n <s-button variant=\"secondary\" onClick={onAction}>\n {action}\n </s-button>\n )}\n </s-stack>\n </>\n )}\n\n </s-stack>\n </s-box>\n </s-card>\n </s-section>\n );\n}","import React, { createContext, useContext, useState, ReactNode } from \"react\";\r\n\r\n// --- Context ---\r\ninterface TabsContextProps {\r\n activeTab: string;\r\n setActiveTab: (value: string) => void;\r\n}\r\n\r\nconst TabsContext = createContext<TabsContextProps | undefined>(undefined);\r\n\r\nconst useTabs = () => {\r\n const context = useContext(TabsContext);\r\n if (!context) {\r\n throw new Error(\"Tabs sub-components must be used within a Tabs component\");\r\n }\r\n return context;\r\n};\r\n\r\n// --- Main Tabs Component ---\r\nexport interface TabsProps {\r\n defaultValue?: string;\r\n value?: string;\r\n onValueChange?: (value: string) => void;\r\n children: ReactNode;\r\n className?: string; \r\n}\r\n\r\nexport function Tabs({ defaultValue, value, onValueChange, children }: TabsProps) {\r\n const [internalActiveTab, setInternalActiveTab] = useState(defaultValue || \"\");\r\n\r\n const activeTab = value !== undefined ? value : internalActiveTab;\r\n const setActiveTab = (newValue: string) => {\r\n if (value === undefined) {\r\n setInternalActiveTab(newValue);\r\n }\r\n onValueChange?.(newValue);\r\n };\r\n\r\n return (\r\n <TabsContext.Provider value={{ activeTab, setActiveTab }}>\r\n <div style={{ width: \"100%\" }}>\r\n {children}\r\n </div>\r\n </TabsContext.Provider>\r\n );\r\n}\r\n\r\nexport interface TabsListProps {\r\n children: ReactNode;\r\n gap?: string;\r\n}\r\n\r\nexport function TabsList({ children, gap = \"small\" }: TabsListProps) {\r\n return (\r\n <s-box paddingInline=\"base\" paddingBlock=\"small\">\r\n <div style={{ \r\n overflowX: \"auto\", \r\n scrollbarWidth: \"none\", \r\n msOverflowStyle: \"none\", \r\n }}>\r\n <style dangerouslySetInnerHTML={{ __html: `\r\n ::-webkit-scrollbar { display: none; }\r\n ` }} />\r\n <s-stack direction=\"inline\" gap={gap} alignItems=\"center\">\r\n {children}\r\n </s-stack>\r\n </div>\r\n </s-box>\r\n );\r\n}\r\n\r\n// --- Trigger Component ---\r\nexport interface TabsTriggerProps {\r\n value: string;\r\n children: ReactNode;\r\n disabled?: boolean;\r\n}\r\n\r\nexport function TabsTrigger({ value, children, disabled }: TabsTriggerProps) {\r\n const { activeTab, setActiveTab } = useTabs();\r\n const isActive = activeTab === value;\r\n\r\n return (\r\n <s-box>\r\n <s-clickable\r\n paddingInline=\"small\"\r\n maxInlineWidth=\"100px\"\r\n paddingBlock=\"small-100\" \r\n borderRadius=\"large-100\"\r\n background={isActive ? \"strong\" : \"transparent\"}\r\n onClick={() => !disabled && setActiveTab(value)}\r\n style={{\r\n cursor: disabled ? \"not-allowed\" : \"pointer\",\r\n opacity: disabled ? 0.5 : 1,\r\n transition: \"background 0.2s ease, transform 0.1s ease\",\r\n userSelect: \"none\",\r\n }}\r\n >\r\n <s-text\r\n type={isActive ? \"strong\" : \"generic\"}\r\n tone={isActive ? \"neutral\" : \"auto\"}\r\n >\r\n {children}\r\n </s-text>\r\n </s-clickable>\r\n </s-box>\r\n );\r\n}\r\n\r\n// --- Content Component ---\r\nexport interface TabsContentProps {\r\n value: string;\r\n children: ReactNode;\r\n}\r\n\r\nexport function TabsContent({ value, children }: TabsContentProps) {\r\n const { activeTab } = useTabs();\r\n\r\n if (activeTab !== value) return null;\r\n\r\n return (\r\n <s-box padding=\"base\">\r\n {children}\r\n </s-box>\r\n );\r\n}","import React from 'react';\nimport { OnboardingProvider, useOnboarding } from './hooks/useOnboarding';\nimport { OnboardingStep, OnboardingData, OnboardingStepProps } from './types';\nimport { SetupSummary } from './components/SetupSummary';\n\nexport type { OnboardingStep, OnboardingData };\n\nimport './Onboarding.css';\n\nconst OnboardingInner: React.FC<{ steps: OnboardingStep[] }> = ({ steps }) => {\n\n const {\n currentStepIndex,\n totalSteps,\n data,\n updateData,\n nextStep,\n prevStep,\n isFirstStep,\n isLastStep,\n canProceed,\n } = useOnboarding();\n\n const currentStep = steps[currentStepIndex];\n if (!currentStep) return null;\n \n const StepComponent = currentStep.component;\n const progress = Math.round(((currentStepIndex + 1) / totalSteps) * 100);\n\n return (\n <s-page>\n <s-stack gap=\"large\">\n\n {/* Header Section */}\n <s-stack gap=\"tight\">\n <s-text type=\"strong\">\n <div style={{ fontSize: \"24px\", fontWeight: \"bold\", marginTop: \"30px\" }}>\n Installation Setup\n </div>\n </s-text>\n <div className=\"setup-info-text-wrapper\">\n <s-text color=\"subdued\" type=\"strong\">\n Complete all the steps to set up your Live Gold Rate Updater account.\n </s-text>\n </div>\n </s-stack>\n\n <div style={{ display: \"flex\", justifyContent: \"center\", width: \"100%\", padding: \"0 0 16px\" }}>\n <div \n className=\"grid-container\"\n style={{ \n maxWidth: \"1000px\", \n width: \"100%\", \n display: \"grid\", \n gridTemplateColumns: \"1fr 0.6fr\", \n gap: \"24px\",\n alignItems: \"stretch\" \n }}\n >\n {/* Left Card: Main Content */}\n <div className=\"wel-left-card\" style={{ display: \"flex\", flexDirection: \"column\", gap: \"20px\" }}>\n <div style={{ flex: 1 }}>\n \n {/* Banner Section */}\n {currentStep.infoMessage && (\n <div style={{ marginBottom: '15px' }}>\n <s-section>\n <s-banner tone=\"info\" heading=\"Welcome to Installation Setup!\">\n <s-text>{currentStep.infoMessage}</s-text>\n </s-banner>\n </s-section>\n </div>\n )}\n\n <s-section>\n <div \n className=\"left-card-content\"\n style={{ \n minHeight: \"450px\", \n display: \"flex\", \n flexDirection: \"column\", \n justifyContent: \"space-between\", \n padding: \"20px\" \n }}\n >\n <div style={{ flex: 1 }}>\n <s-stack gap=\"base\">\n <s-stack direction=\"inline\" justifyContent=\"space-between\" alignItems=\"center\">\n <s-text color=\"subdued\" type=\"strong\">\n Step {currentStepIndex + 1} of {totalSteps}\n </s-text>\n <s-badge tone=\"info\" size=\"base\">{`${progress}%`}</s-badge>\n </s-stack>\n\n {/* Progress Bar */}\n <div style={{ \n width: '100%', \n height: '8px', \n backgroundColor: '#e5e5e5', \n borderRadius: '4px', \n overflow: 'hidden' \n }}>\n <div style={{ \n width: `${progress}%`, \n height: '100%', \n backgroundColor: '#008060', \n transition: 'width 0.5s ease' \n }} />\n </div>\n\n {/* Step Title + Content */}\n <s-stack gap=\"large\">\n <s-stack gap=\"none\">\n <s-text font-weight=\"bold\" type=\"strong\">\n <div style={{ fontWeight: \"bold\", fontSize: \"18px\" }}>\n {currentStep.title}\n </div>\n </s-text>\n {currentStep.subtitle && (\n <s-text color=\"subdued\" type=\"strong\">\n {currentStep.subtitle}\n </s-text>\n )}\n </s-stack>\n <div className=\"onboarding-step-component-mount\">\n {StepComponent ? (\n <StepComponent data={data} updateData={updateData} />\n ) : (\n currentStep.children\n )}\n </div>\n </s-stack>\n </s-stack>\n </div>\n\n <div style={{ flexShrink: 0, paddingTop: \"24px\" }}>\n <s-divider />\n <s-stack direction=\"inline\" justifyContent=\"space-between\" style={{ paddingTop: \"16px\" }}>\n <s-button onClick={prevStep} disabled={isFirstStep}>\n Back\n </s-button>\n <s-button \n variant=\"primary\" \n onClick={nextStep} \n disabled={!canProceed}\n >\n {isLastStep ? 'Finish' : 'Next'}\n </s-button>\n </s-stack>\n </div>\n </div>\n </s-section>\n </div>\n </div>\n\n {/* Right Card: Sidebar Slideshow */}\n {currentStep.sidebar && (\n <div className=\"slideshow-container\" style={{ display: \"flex\", flexDirection: \"column\" }}>\n <s-section>\n <div \n className=\"slideshow-inner\"\n style={{ \n minHeight: \"450px\", \n display: \"flex\", \n flexDirection: \"column\", \n justifyContent: \"center\", \n padding: \"20px 0\",\n textAlign: \"center\"\n }}\n >\n <s-stack alignItems=\"center\" justifyContent=\"center\" gap=\"large\">\n \n {/* Icon */}\n <div style={{ display: \"flex\", alignItems: \"center\", justifyContent: \"center\" }}>\n {currentStep.sidebar.icon ? (\n <div style={{ fontSize: \"60px\" }}>{currentStep.sidebar.icon}</div>\n ) : (\n <div style={{ fontSize: \"60px\" }}>🔔</div>\n )}\n </div>\n\n {/* Info */}\n <s-stack gap=\"tight\" align=\"center\">\n <s-text font-weight=\"bold\" type=\"strong\">\n <div style={{ fontSize: \"18px\", fontWeight: \"bold\" }}>\n {currentStep.sidebar.title}\n </div>\n </s-text>\n <s-text color=\"subdued\">\n <div style={{ maxWidth: \"300px\", margin: \"0 auto\" }}>\n {currentStep.sidebar.description}\n </div>\n </s-text>\n </s-stack>\n\n <s-divider />\n\n {/* Features */}\n {currentStep.sidebar.features && (\n <s-stack gap=\"base\" align=\"start\" style={{ textAlign: \"left\", width: \"100%\", paddingLeft: \"32px\" }}>\n {currentStep.sidebar.features.map((feature, index) => (\n <s-stack gap=\"small\" direction=\"inline\" key={index} alignItems=\"start\">\n <s-text tone=\"success\" fontWeight=\"bold\">✓</s-text>\n <s-text variant=\"bodyMd\">{feature}</s-text>\n </s-stack>\n ))}\n </s-stack>\n )}\n\n <s-divider />\n\n {/* Pagination Bullets */}\n <s-stack direction=\"inline\" justifyContent=\"center\" alignItems=\"center\" gap=\"base\">\n {steps.map((_, index) => (\n <div\n key={index}\n style={{\n width: currentStepIndex === index ? \"28px\" : \"8px\",\n height: \"7px\",\n borderRadius: \"4px\",\n background: currentStepIndex === index ? \"#f49342\" : \"#e1e3e5\",\n transition: \"all 0.3s ease\",\n }}\n />\n ))}\n </s-stack>\n\n </s-stack>\n </div>\n </s-section>\n </div>\n )}\n </div>\n </div>\n </s-stack>\n </s-page>\n );\n};\n\nexport interface OnboardingProps {\n steps?: OnboardingStep[];\n children?: React.ReactNode;\n onFinish: (data: OnboardingData) => void;\n}\n\nconst Step: React.FC<OnboardingStepProps> = ({ children }) => <>{children}</>;\n\nexport const Onboarding: React.FC<OnboardingProps> & {\n Step: typeof Step;\n Summary: typeof SetupSummary;\n} = ({ steps: stepsProp, children, onFinish }) => {\n \n const steps = React.useMemo(() => {\n if (stepsProp) return stepsProp;\n \n // Discover steps from children\n const discoveredSteps: OnboardingStep[] = [];\n React.Children.forEach(children, (child) => {\n if (React.isValidElement(child) && child.type === Step) {\n const props = child.props as any;\n discoveredSteps.push({\n ...props,\n children: props.children,\n });\n } else if (React.isValidElement(child) && child.type === SetupSummary) {\n const props = child.props as any;\n discoveredSteps.push({\n id: 'summary',\n title: 'Review & Finish Setup',\n ...props,\n component: SetupSummary,\n });\n }\n });\n return discoveredSteps;\n }, [stepsProp, children]);\n\n return (\n <OnboardingProvider steps={steps} onFinish={onFinish}>\n <OnboardingInner steps={steps} />\n </OnboardingProvider>\n );\n};\n\nOnboarding.Step = Step;\nOnboarding.Summary = SetupSummary;","import React, { createContext, useContext, useState, useCallback, useMemo } from 'react';\nimport { OnboardingContextType, OnboardingData, OnboardingStep } from '../types';\n\nconst OnboardingContext = createContext<OnboardingContextType | undefined>(undefined);\n\nexport const OnboardingProvider: React.FC<{\n steps: OnboardingStep[];\n children: React.ReactNode;\n onFinish: (data: OnboardingData) => void;\n}> = ({ steps, children, onFinish }) => {\n const [currentStepIndex, setCurrentStepIndex] = useState(0);\n const [data, setData] = useState<OnboardingData>({});\n\n const updateData = useCallback((newData: Partial<OnboardingData>) => {\n setData((prev) => ({ ...prev, ...newData }));\n }, []);\n\n const nextStep = useCallback(() => {\n if (currentStepIndex < steps.length - 1) {\n setCurrentStepIndex((prev) => prev + 1);\n } else {\n onFinish(data);\n }\n }, [currentStepIndex, steps.length, data, onFinish]);\n\n const prevStep = useCallback(() => {\n if (currentStepIndex > 0) {\n setCurrentStepIndex((prev) => prev - 1);\n }\n }, [currentStepIndex]);\n\n const currentStep = steps[currentStepIndex];\n const canProceed = useMemo(() => {\n if (!currentStep) return false;\n return currentStep.validate ? currentStep.validate(data) : true;\n }, [currentStep, data]);\n\n const value = useMemo(\n () => ({\n currentStepIndex,\n totalSteps: steps.length,\n data,\n updateData,\n nextStep,\n prevStep,\n isFirstStep: currentStepIndex === 0,\n isLastStep: currentStepIndex === steps.length - 1,\n canProceed,\n }),\n [currentStepIndex, steps.length, data, updateData, nextStep, prevStep, canProceed]\n );\n\n return <OnboardingContext.Provider value={value}>{children}</OnboardingContext.Provider>;\n};\n\nexport const useOnboarding = () => {\n const context = useContext(OnboardingContext);\n if (!context) {\n throw new Error('useOnboarding must be used within an OnboardingProvider');\n }\n return context;\n};\n","import React from 'react';\nimport { OnboardingData } from '../types';\nimport { useOnboarding } from '../hooks/useOnboarding';\n\ninterface SetupSummaryProps {\n data?: OnboardingData;\n updateData?: (newData: Partial<OnboardingData>) => void;\n}\n\nexport const SetupSummary: React.FC<SetupSummaryProps> = (props) => {\n const context = useOnboarding();\n const data = props.data || context.data;\n const entries = Object.entries(data);\n\n return (\n <div className=\"setup-summary\">\n <div style={{ marginBottom: '24px' }}>\n <span className=\"glass-pill\" style={{ background: '#e1f5fe', color: '#0277bd', padding: '4px 12px' }}>\n Overview\n </span>\n </div>\n \n <div style={{ display: 'grid', gap: '16px' }}>\n {entries.map(([key, value]) => (\n <div key={key} style={{ \n display: 'flex', \n justifyContent: 'space-between', \n padding: '12px 0', \n borderBottom: '1px solid #f1f2f4' \n }}>\n <span style={{ fontWeight: 600, color: '#6d7175', textTransform: 'capitalize' }}>\n {key.replace(/([A-Z])/g, ' $1').trim()}:\n </span>\n <span style={{ fontWeight: 500, color: '#1a1c1d' }}>\n {typeof value === 'boolean' ? (value ? 'Yes' : 'No') : String(value || '--')}\n </span>\n </div>\n ))}\n {entries.length === 0 && (\n <p style={{ color: '#6d7175', fontStyle: 'italic' }}>No configuration data provided.</p>\n )}\n </div>\n\n <div style={{ marginTop: '32px', padding: '16px', borderRadius: '8px', background: '#f9fafb', border: '1px dashed #d1d3d5' }}>\n <p style={{ fontSize: '13px', color: '#6d7175', margin: 0 }}>\n Please review your information and click \"Finish Setup\" to activate account.\n </p>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACmBQ;AAFD,SAAS,QAAQ,EAAE,SAAS,YAAY,SAAS,GAAiB;AACrE,SACI,6CAAC,YAAO,SACH;AAAA,kBACG,4CAAC,YAAO,IAAG,KAAI,SAAQ,UAAS,MAAK,YAChC,sBACL;AAAA,IAEJ,4CAAC,eACI,UACL;AAAA,KACJ;AAER;;;ACTQ,IAAAA,sBAAA;AAFD,SAAS,YAAY,EAAE,SAAS,SAAS,GAAqB;AACjE,SACI,6CAAC,eAAU,SACN,UACL;AAER;;;ACgBe,IAAAC,sBAAA;AApBR,SAAS,WAAW;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,UAAU,CAAC;AAAA,EACX;AAAA,EACA;AAAA,EACA;AACJ,GAAqB;AACjB,SACI,6CAAC,eACG,uDAAC,YACG,uDAAC,WAAM,SAAQ,QACX,wDAAC,aAAQ,KAAI,QAIpB;AAAA,kDAAC,aAAQ,KAAI,KACX;AAAA,mDAAC,YAAO,SAAQ,aAAY,OAAM,WAClB,wDAAC,QAAG,OAAO,EAAE,QAAQ,GAAG,YAAY,UAAU,eAAe,SAAQ,GAAG;AAAA;AAAA,QAAE;AAAA,SAAQ,GACrF;AAAA,MAEd,8CAAC,aAAQ,WAAU,UAAS,YAAW,UAAS,KAAI,SACtC;AAAA,qDAAC,YAAO,SAAQ,aAAY,YAAW,YACnC,wDAAC,QAAG,OAAO,EAAE,QAAQ,SAAS,GAAG;AAAA;AAAA,UAAE;AAAA,WAAM,GAC7C;AAAA,QACC,UACG,6CAAC,aAAQ,MAAa,kBAAO;AAAA,SAE/C;AAAA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C,EAAE,SAAS,MAAM,6EAAG,UAAS;AAEnE,IAAM,aAGT,CAAC,EAAE,OAAO,WAAW,UAAU,SAAS,MAAM;AAEhD,QAAM,QAAQ,cAAAC,QAAM,QAAQ,MAAM;AAChC,QAAI,UAAW,QAAO;AAGtB,UAAM,kBAAoC,CAAC;AAC3C,kBAAAA,QAAM,SAAS,QAAQ,UAAU,CAAC,UAAU;AAC1C,UAAI,cAAAA,QAAM,eAAe,KAAK,KAAK,MAAM,SAAS,MAAM;AACtD,cAAM,QAAQ,MAAM;AACpB,wBAAgB,KAAK;AAAA,UACnB,GAAG;AAAA,UACH,UAAU,MAAM;AAAA,QAClB,CAAC;AAAA,MACH,WAAW,cAAAA,QAAM,eAAe,KAAK,KAAK,MAAM,SAAS,cAAc;AACrE,cAAM,QAAQ,MAAM;AACpB,wBAAgB,KAAK;AAAA,UACjB,IAAI;AAAA,UACJ,OAAO;AAAA,UACP,GAAG;AAAA,UACH,WAAW;AAAA,QACf,CAAC;AAAA,MACH;AAAA,IACF,CAAC;AACD,WAAO;AAAA,EACT,GAAG,CAAC,WAAW,QAAQ,CAAC;AAExB,SACE,6CAAC,sBAAmB,OAAc,UAChC,uDAAC,mBAAgB,OAAc,GACjC;AAEJ;AAEA,WAAW,OAAO;AAClB,WAAW,UAAU;","names":["import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_react","import_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","React"]}
|
package/dist/index.mjs
CHANGED
|
@@ -78,9 +78,340 @@ function StatusCard({
|
|
|
78
78
|
] })
|
|
79
79
|
] }) }) }) });
|
|
80
80
|
}
|
|
81
|
+
|
|
82
|
+
// src/components/Tab/Tab.tsx
|
|
83
|
+
import { createContext, useContext, useState } from "react";
|
|
84
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
85
|
+
var TabsContext = createContext(void 0);
|
|
86
|
+
var useTabs = () => {
|
|
87
|
+
const context = useContext(TabsContext);
|
|
88
|
+
if (!context) {
|
|
89
|
+
throw new Error("Tabs sub-components must be used within a Tabs component");
|
|
90
|
+
}
|
|
91
|
+
return context;
|
|
92
|
+
};
|
|
93
|
+
function Tabs({ defaultValue, value, onValueChange, children }) {
|
|
94
|
+
const [internalActiveTab, setInternalActiveTab] = useState(defaultValue || "");
|
|
95
|
+
const activeTab = value !== void 0 ? value : internalActiveTab;
|
|
96
|
+
const setActiveTab = (newValue) => {
|
|
97
|
+
if (value === void 0) {
|
|
98
|
+
setInternalActiveTab(newValue);
|
|
99
|
+
}
|
|
100
|
+
onValueChange?.(newValue);
|
|
101
|
+
};
|
|
102
|
+
return /* @__PURE__ */ jsx4(TabsContext.Provider, { value: { activeTab, setActiveTab }, children: /* @__PURE__ */ jsx4("div", { style: { width: "100%" }, children }) });
|
|
103
|
+
}
|
|
104
|
+
function TabsList({ children, gap = "small" }) {
|
|
105
|
+
return /* @__PURE__ */ jsx4("s-box", { paddingInline: "base", paddingBlock: "small", children: /* @__PURE__ */ jsxs3("div", { style: {
|
|
106
|
+
overflowX: "auto",
|
|
107
|
+
scrollbarWidth: "none",
|
|
108
|
+
msOverflowStyle: "none"
|
|
109
|
+
}, children: [
|
|
110
|
+
/* @__PURE__ */ jsx4("style", { dangerouslySetInnerHTML: { __html: `
|
|
111
|
+
::-webkit-scrollbar { display: none; }
|
|
112
|
+
` } }),
|
|
113
|
+
/* @__PURE__ */ jsx4("s-stack", { direction: "inline", gap, alignItems: "center", children })
|
|
114
|
+
] }) });
|
|
115
|
+
}
|
|
116
|
+
function TabsTrigger({ value, children, disabled }) {
|
|
117
|
+
const { activeTab, setActiveTab } = useTabs();
|
|
118
|
+
const isActive = activeTab === value;
|
|
119
|
+
return /* @__PURE__ */ jsx4("s-box", { children: /* @__PURE__ */ jsx4(
|
|
120
|
+
"s-clickable",
|
|
121
|
+
{
|
|
122
|
+
paddingInline: "small",
|
|
123
|
+
maxInlineWidth: "100px",
|
|
124
|
+
paddingBlock: "small-100",
|
|
125
|
+
borderRadius: "large-100",
|
|
126
|
+
background: isActive ? "strong" : "transparent",
|
|
127
|
+
onClick: () => !disabled && setActiveTab(value),
|
|
128
|
+
style: {
|
|
129
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
130
|
+
opacity: disabled ? 0.5 : 1,
|
|
131
|
+
transition: "background 0.2s ease, transform 0.1s ease",
|
|
132
|
+
userSelect: "none"
|
|
133
|
+
},
|
|
134
|
+
children: /* @__PURE__ */ jsx4(
|
|
135
|
+
"s-text",
|
|
136
|
+
{
|
|
137
|
+
type: isActive ? "strong" : "generic",
|
|
138
|
+
tone: isActive ? "neutral" : "auto",
|
|
139
|
+
children
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
) });
|
|
144
|
+
}
|
|
145
|
+
function TabsContent({ value, children }) {
|
|
146
|
+
const { activeTab } = useTabs();
|
|
147
|
+
if (activeTab !== value) return null;
|
|
148
|
+
return /* @__PURE__ */ jsx4("s-box", { padding: "base", children });
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// src/Flow-Components/Onboarding/Onboarding.tsx
|
|
152
|
+
import React3 from "react";
|
|
153
|
+
|
|
154
|
+
// src/Flow-Components/Onboarding/hooks/useOnboarding.tsx
|
|
155
|
+
import { createContext as createContext2, useContext as useContext2, useState as useState2, useCallback, useMemo } from "react";
|
|
156
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
157
|
+
var OnboardingContext = createContext2(void 0);
|
|
158
|
+
var OnboardingProvider = ({ steps, children, onFinish }) => {
|
|
159
|
+
const [currentStepIndex, setCurrentStepIndex] = useState2(0);
|
|
160
|
+
const [data, setData] = useState2({});
|
|
161
|
+
const updateData = useCallback((newData) => {
|
|
162
|
+
setData((prev) => ({ ...prev, ...newData }));
|
|
163
|
+
}, []);
|
|
164
|
+
const nextStep = useCallback(() => {
|
|
165
|
+
if (currentStepIndex < steps.length - 1) {
|
|
166
|
+
setCurrentStepIndex((prev) => prev + 1);
|
|
167
|
+
} else {
|
|
168
|
+
onFinish(data);
|
|
169
|
+
}
|
|
170
|
+
}, [currentStepIndex, steps.length, data, onFinish]);
|
|
171
|
+
const prevStep = useCallback(() => {
|
|
172
|
+
if (currentStepIndex > 0) {
|
|
173
|
+
setCurrentStepIndex((prev) => prev - 1);
|
|
174
|
+
}
|
|
175
|
+
}, [currentStepIndex]);
|
|
176
|
+
const currentStep = steps[currentStepIndex];
|
|
177
|
+
const canProceed = useMemo(() => {
|
|
178
|
+
if (!currentStep) return false;
|
|
179
|
+
return currentStep.validate ? currentStep.validate(data) : true;
|
|
180
|
+
}, [currentStep, data]);
|
|
181
|
+
const value = useMemo(
|
|
182
|
+
() => ({
|
|
183
|
+
currentStepIndex,
|
|
184
|
+
totalSteps: steps.length,
|
|
185
|
+
data,
|
|
186
|
+
updateData,
|
|
187
|
+
nextStep,
|
|
188
|
+
prevStep,
|
|
189
|
+
isFirstStep: currentStepIndex === 0,
|
|
190
|
+
isLastStep: currentStepIndex === steps.length - 1,
|
|
191
|
+
canProceed
|
|
192
|
+
}),
|
|
193
|
+
[currentStepIndex, steps.length, data, updateData, nextStep, prevStep, canProceed]
|
|
194
|
+
);
|
|
195
|
+
return /* @__PURE__ */ jsx5(OnboardingContext.Provider, { value, children });
|
|
196
|
+
};
|
|
197
|
+
var useOnboarding = () => {
|
|
198
|
+
const context = useContext2(OnboardingContext);
|
|
199
|
+
if (!context) {
|
|
200
|
+
throw new Error("useOnboarding must be used within an OnboardingProvider");
|
|
201
|
+
}
|
|
202
|
+
return context;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
// src/Flow-Components/Onboarding/components/SetupSummary.tsx
|
|
206
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
207
|
+
var SetupSummary = (props) => {
|
|
208
|
+
const context = useOnboarding();
|
|
209
|
+
const data = props.data || context.data;
|
|
210
|
+
const entries = Object.entries(data);
|
|
211
|
+
return /* @__PURE__ */ jsxs4("div", { className: "setup-summary", children: [
|
|
212
|
+
/* @__PURE__ */ jsx6("div", { style: { marginBottom: "24px" }, children: /* @__PURE__ */ jsx6("span", { className: "glass-pill", style: { background: "#e1f5fe", color: "#0277bd", padding: "4px 12px" }, children: "Overview" }) }),
|
|
213
|
+
/* @__PURE__ */ jsxs4("div", { style: { display: "grid", gap: "16px" }, children: [
|
|
214
|
+
entries.map(([key, value]) => /* @__PURE__ */ jsxs4("div", { style: {
|
|
215
|
+
display: "flex",
|
|
216
|
+
justifyContent: "space-between",
|
|
217
|
+
padding: "12px 0",
|
|
218
|
+
borderBottom: "1px solid #f1f2f4"
|
|
219
|
+
}, children: [
|
|
220
|
+
/* @__PURE__ */ jsxs4("span", { style: { fontWeight: 600, color: "#6d7175", textTransform: "capitalize" }, children: [
|
|
221
|
+
key.replace(/([A-Z])/g, " $1").trim(),
|
|
222
|
+
":"
|
|
223
|
+
] }),
|
|
224
|
+
/* @__PURE__ */ jsx6("span", { style: { fontWeight: 500, color: "#1a1c1d" }, children: typeof value === "boolean" ? value ? "Yes" : "No" : String(value || "--") })
|
|
225
|
+
] }, key)),
|
|
226
|
+
entries.length === 0 && /* @__PURE__ */ jsx6("p", { style: { color: "#6d7175", fontStyle: "italic" }, children: "No configuration data provided." })
|
|
227
|
+
] }),
|
|
228
|
+
/* @__PURE__ */ jsx6("div", { style: { marginTop: "32px", padding: "16px", borderRadius: "8px", background: "#f9fafb", border: "1px dashed #d1d3d5" }, children: /* @__PURE__ */ jsx6("p", { style: { fontSize: "13px", color: "#6d7175", margin: 0 }, children: 'Please review your information and click "Finish Setup" to activate account.' }) })
|
|
229
|
+
] });
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
// src/Flow-Components/Onboarding/Onboarding.tsx
|
|
233
|
+
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
234
|
+
var OnboardingInner = ({ steps }) => {
|
|
235
|
+
const {
|
|
236
|
+
currentStepIndex,
|
|
237
|
+
totalSteps,
|
|
238
|
+
data,
|
|
239
|
+
updateData,
|
|
240
|
+
nextStep,
|
|
241
|
+
prevStep,
|
|
242
|
+
isFirstStep,
|
|
243
|
+
isLastStep,
|
|
244
|
+
canProceed
|
|
245
|
+
} = useOnboarding();
|
|
246
|
+
const currentStep = steps[currentStepIndex];
|
|
247
|
+
if (!currentStep) return null;
|
|
248
|
+
const StepComponent = currentStep.component;
|
|
249
|
+
const progress = Math.round((currentStepIndex + 1) / totalSteps * 100);
|
|
250
|
+
return /* @__PURE__ */ jsx7("s-page", { children: /* @__PURE__ */ jsxs5("s-stack", { gap: "large", children: [
|
|
251
|
+
/* @__PURE__ */ jsxs5("s-stack", { gap: "tight", children: [
|
|
252
|
+
/* @__PURE__ */ jsx7("s-text", { type: "strong", children: /* @__PURE__ */ jsx7("div", { style: { fontSize: "24px", fontWeight: "bold", marginTop: "30px" }, children: "Installation Setup" }) }),
|
|
253
|
+
/* @__PURE__ */ jsx7("div", { className: "setup-info-text-wrapper", children: /* @__PURE__ */ jsx7("s-text", { color: "subdued", type: "strong", children: "Complete all the steps to set up your Live Gold Rate Updater account." }) })
|
|
254
|
+
] }),
|
|
255
|
+
/* @__PURE__ */ jsx7("div", { style: { display: "flex", justifyContent: "center", width: "100%", padding: "0 0 16px" }, children: /* @__PURE__ */ jsxs5(
|
|
256
|
+
"div",
|
|
257
|
+
{
|
|
258
|
+
className: "grid-container",
|
|
259
|
+
style: {
|
|
260
|
+
maxWidth: "1000px",
|
|
261
|
+
width: "100%",
|
|
262
|
+
display: "grid",
|
|
263
|
+
gridTemplateColumns: "1fr 0.6fr",
|
|
264
|
+
gap: "24px",
|
|
265
|
+
alignItems: "stretch"
|
|
266
|
+
},
|
|
267
|
+
children: [
|
|
268
|
+
/* @__PURE__ */ jsx7("div", { className: "wel-left-card", style: { display: "flex", flexDirection: "column", gap: "20px" }, children: /* @__PURE__ */ jsxs5("div", { style: { flex: 1 }, children: [
|
|
269
|
+
currentStep.infoMessage && /* @__PURE__ */ jsx7("div", { style: { marginBottom: "15px" }, children: /* @__PURE__ */ jsx7("s-section", { children: /* @__PURE__ */ jsx7("s-banner", { tone: "info", heading: "Welcome to Installation Setup!", children: /* @__PURE__ */ jsx7("s-text", { children: currentStep.infoMessage }) }) }) }),
|
|
270
|
+
/* @__PURE__ */ jsx7("s-section", { children: /* @__PURE__ */ jsxs5(
|
|
271
|
+
"div",
|
|
272
|
+
{
|
|
273
|
+
className: "left-card-content",
|
|
274
|
+
style: {
|
|
275
|
+
minHeight: "450px",
|
|
276
|
+
display: "flex",
|
|
277
|
+
flexDirection: "column",
|
|
278
|
+
justifyContent: "space-between",
|
|
279
|
+
padding: "20px"
|
|
280
|
+
},
|
|
281
|
+
children: [
|
|
282
|
+
/* @__PURE__ */ jsx7("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsxs5("s-stack", { gap: "base", children: [
|
|
283
|
+
/* @__PURE__ */ jsxs5("s-stack", { direction: "inline", justifyContent: "space-between", alignItems: "center", children: [
|
|
284
|
+
/* @__PURE__ */ jsxs5("s-text", { color: "subdued", type: "strong", children: [
|
|
285
|
+
"Step ",
|
|
286
|
+
currentStepIndex + 1,
|
|
287
|
+
" of ",
|
|
288
|
+
totalSteps
|
|
289
|
+
] }),
|
|
290
|
+
/* @__PURE__ */ jsx7("s-badge", { tone: "info", size: "base", children: `${progress}%` })
|
|
291
|
+
] }),
|
|
292
|
+
/* @__PURE__ */ jsx7("div", { style: {
|
|
293
|
+
width: "100%",
|
|
294
|
+
height: "8px",
|
|
295
|
+
backgroundColor: "#e5e5e5",
|
|
296
|
+
borderRadius: "4px",
|
|
297
|
+
overflow: "hidden"
|
|
298
|
+
}, children: /* @__PURE__ */ jsx7("div", { style: {
|
|
299
|
+
width: `${progress}%`,
|
|
300
|
+
height: "100%",
|
|
301
|
+
backgroundColor: "#008060",
|
|
302
|
+
transition: "width 0.5s ease"
|
|
303
|
+
} }) }),
|
|
304
|
+
/* @__PURE__ */ jsxs5("s-stack", { gap: "large", children: [
|
|
305
|
+
/* @__PURE__ */ jsxs5("s-stack", { gap: "none", children: [
|
|
306
|
+
/* @__PURE__ */ jsx7("s-text", { "font-weight": "bold", type: "strong", children: /* @__PURE__ */ jsx7("div", { style: { fontWeight: "bold", fontSize: "18px" }, children: currentStep.title }) }),
|
|
307
|
+
currentStep.subtitle && /* @__PURE__ */ jsx7("s-text", { color: "subdued", type: "strong", children: currentStep.subtitle })
|
|
308
|
+
] }),
|
|
309
|
+
/* @__PURE__ */ jsx7("div", { className: "onboarding-step-component-mount", children: StepComponent ? /* @__PURE__ */ jsx7(StepComponent, { data, updateData }) : currentStep.children })
|
|
310
|
+
] })
|
|
311
|
+
] }) }),
|
|
312
|
+
/* @__PURE__ */ jsxs5("div", { style: { flexShrink: 0, paddingTop: "24px" }, children: [
|
|
313
|
+
/* @__PURE__ */ jsx7("s-divider", {}),
|
|
314
|
+
/* @__PURE__ */ jsxs5("s-stack", { direction: "inline", justifyContent: "space-between", style: { paddingTop: "16px" }, children: [
|
|
315
|
+
/* @__PURE__ */ jsx7("s-button", { onClick: prevStep, disabled: isFirstStep, children: "Back" }),
|
|
316
|
+
/* @__PURE__ */ jsx7(
|
|
317
|
+
"s-button",
|
|
318
|
+
{
|
|
319
|
+
variant: "primary",
|
|
320
|
+
onClick: nextStep,
|
|
321
|
+
disabled: !canProceed,
|
|
322
|
+
children: isLastStep ? "Finish" : "Next"
|
|
323
|
+
}
|
|
324
|
+
)
|
|
325
|
+
] })
|
|
326
|
+
] })
|
|
327
|
+
]
|
|
328
|
+
}
|
|
329
|
+
) })
|
|
330
|
+
] }) }),
|
|
331
|
+
currentStep.sidebar && /* @__PURE__ */ jsx7("div", { className: "slideshow-container", style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsx7("s-section", { children: /* @__PURE__ */ jsx7(
|
|
332
|
+
"div",
|
|
333
|
+
{
|
|
334
|
+
className: "slideshow-inner",
|
|
335
|
+
style: {
|
|
336
|
+
minHeight: "450px",
|
|
337
|
+
display: "flex",
|
|
338
|
+
flexDirection: "column",
|
|
339
|
+
justifyContent: "center",
|
|
340
|
+
padding: "20px 0",
|
|
341
|
+
textAlign: "center"
|
|
342
|
+
},
|
|
343
|
+
children: /* @__PURE__ */ jsxs5("s-stack", { alignItems: "center", justifyContent: "center", gap: "large", children: [
|
|
344
|
+
/* @__PURE__ */ jsx7("div", { style: { display: "flex", alignItems: "center", justifyContent: "center" }, children: currentStep.sidebar.icon ? /* @__PURE__ */ jsx7("div", { style: { fontSize: "60px" }, children: currentStep.sidebar.icon }) : /* @__PURE__ */ jsx7("div", { style: { fontSize: "60px" }, children: "\u{1F514}" }) }),
|
|
345
|
+
/* @__PURE__ */ jsxs5("s-stack", { gap: "tight", align: "center", children: [
|
|
346
|
+
/* @__PURE__ */ jsx7("s-text", { "font-weight": "bold", type: "strong", children: /* @__PURE__ */ jsx7("div", { style: { fontSize: "18px", fontWeight: "bold" }, children: currentStep.sidebar.title }) }),
|
|
347
|
+
/* @__PURE__ */ jsx7("s-text", { color: "subdued", children: /* @__PURE__ */ jsx7("div", { style: { maxWidth: "300px", margin: "0 auto" }, children: currentStep.sidebar.description }) })
|
|
348
|
+
] }),
|
|
349
|
+
/* @__PURE__ */ jsx7("s-divider", {}),
|
|
350
|
+
currentStep.sidebar.features && /* @__PURE__ */ jsx7("s-stack", { gap: "base", align: "start", style: { textAlign: "left", width: "100%", paddingLeft: "32px" }, children: currentStep.sidebar.features.map((feature, index) => /* @__PURE__ */ jsxs5("s-stack", { gap: "small", direction: "inline", alignItems: "start", children: [
|
|
351
|
+
/* @__PURE__ */ jsx7("s-text", { tone: "success", fontWeight: "bold", children: "\u2713" }),
|
|
352
|
+
/* @__PURE__ */ jsx7("s-text", { variant: "bodyMd", children: feature })
|
|
353
|
+
] }, index)) }),
|
|
354
|
+
/* @__PURE__ */ jsx7("s-divider", {}),
|
|
355
|
+
/* @__PURE__ */ jsx7("s-stack", { direction: "inline", justifyContent: "center", alignItems: "center", gap: "base", children: steps.map((_, index) => /* @__PURE__ */ jsx7(
|
|
356
|
+
"div",
|
|
357
|
+
{
|
|
358
|
+
style: {
|
|
359
|
+
width: currentStepIndex === index ? "28px" : "8px",
|
|
360
|
+
height: "7px",
|
|
361
|
+
borderRadius: "4px",
|
|
362
|
+
background: currentStepIndex === index ? "#f49342" : "#e1e3e5",
|
|
363
|
+
transition: "all 0.3s ease"
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
index
|
|
367
|
+
)) })
|
|
368
|
+
] })
|
|
369
|
+
}
|
|
370
|
+
) }) })
|
|
371
|
+
]
|
|
372
|
+
}
|
|
373
|
+
) })
|
|
374
|
+
] }) });
|
|
375
|
+
};
|
|
376
|
+
var Step = ({ children }) => /* @__PURE__ */ jsx7(Fragment2, { children });
|
|
377
|
+
var Onboarding = ({ steps: stepsProp, children, onFinish }) => {
|
|
378
|
+
const steps = React3.useMemo(() => {
|
|
379
|
+
if (stepsProp) return stepsProp;
|
|
380
|
+
const discoveredSteps = [];
|
|
381
|
+
React3.Children.forEach(children, (child) => {
|
|
382
|
+
if (React3.isValidElement(child) && child.type === Step) {
|
|
383
|
+
const props = child.props;
|
|
384
|
+
discoveredSteps.push({
|
|
385
|
+
...props,
|
|
386
|
+
children: props.children
|
|
387
|
+
});
|
|
388
|
+
} else if (React3.isValidElement(child) && child.type === SetupSummary) {
|
|
389
|
+
const props = child.props;
|
|
390
|
+
discoveredSteps.push({
|
|
391
|
+
id: "summary",
|
|
392
|
+
title: "Review & Finish Setup",
|
|
393
|
+
...props,
|
|
394
|
+
component: SetupSummary
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
return discoveredSteps;
|
|
399
|
+
}, [stepsProp, children]);
|
|
400
|
+
return /* @__PURE__ */ jsx7(OnboardingProvider, { steps, onFinish, children: /* @__PURE__ */ jsx7(OnboardingInner, { steps }) });
|
|
401
|
+
};
|
|
402
|
+
Onboarding.Step = Step;
|
|
403
|
+
Onboarding.Summary = SetupSummary;
|
|
81
404
|
export {
|
|
82
405
|
AppPage,
|
|
406
|
+
Onboarding,
|
|
407
|
+
OnboardingProvider,
|
|
83
408
|
PageSection,
|
|
84
|
-
|
|
409
|
+
SetupSummary,
|
|
410
|
+
StatusCard,
|
|
411
|
+
Tabs,
|
|
412
|
+
TabsContent,
|
|
413
|
+
TabsList,
|
|
414
|
+
TabsTrigger,
|
|
415
|
+
useOnboarding
|
|
85
416
|
};
|
|
86
417
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/AppPage/AppPage.tsx","../src/components/PageSection/PageSection.tsx","../src/components/StatusCard/StatusCard.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nexport interface AppPageProps {\n /** Page heading */\n heading: string;\n /** Page subheading */\n subheading?: string;\n children: ReactNode;\n}\n\n/**\n * AppPage\n *\n * Wraps `s-page` with an `s-section` layout section.\n * Requires the Polaris CDN script in your app's <head>:\n * https://cdn.shopify.com/shopifycloud/polaris.js\n */\nexport function AppPage({ heading, subheading, children }: AppPageProps) {\n return (\n <s-page heading={heading}>\n {subheading && (\n <s-text as=\"p\" variant=\"bodyMd\" slot=\"subtitle\">\n {subheading}\n </s-text>\n )}\n <s-section>\n {children}\n </s-section>\n </s-page>\n );\n}","import type { ReactNode } from \"react\";\n\nexport type PageSectionVariant = \"oneThird\" | \"oneHalf\" | \"fullWidth\";\n\nexport interface PageSectionProps {\n /** Section heading */\n heading?: string;\n /** Content inside the section */\n children: ReactNode;\n}\n\n/**\n * PageSection\n *\n * A typed wrapper around `s-section` for use inside an `AppPage`\n * or directly within an `s-page`.\n *\n * CDN: https://cdn.shopify.com/shopifycloud/polaris.js\n */\nexport function PageSection({ heading, children }: PageSectionProps) {\n return (\n <s-section heading={heading}>\n {children}\n </s-section>\n );\n}\n","import type { ReactNode } from \"react\";\n\nexport type StatusTone = \"info\" | \"success\" | \"warning\" | \"critical\";\n\ninterface DetailItem {\n label: string;\n value: string;\n}\n\nexport interface StatusCardsProps {\n heading: string;\n title: string;\n status?: string;\n tone?: StatusTone;\n description?: string;\n details?: DetailItem[];\n meta?: string;\n action?: string;\n onAction?: () => void;\n}\n\nexport function StatusCard({\n heading,\n title,\n status,\n tone = \"info\",\n description,\n details = [],\n meta,\n action,\n onAction,\n}: StatusCardsProps) {\n return (\n <s-section>\n <s-card>\n <s-box padding=\"base\">\n <s-stack gap=\"base\">\n\n {/* Header */}\n \n\t\t\t\t\t\t\t\t\t\t\t\t\t<s-stack gap=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t <s-text variant=\"headingMd\" color=\"subdued\">\n <h2 style={{ margin: 0 ,marginLeft: \"0.5rem\", letterSpacing: \"0.1rem\"}}> {heading}</h2>\n </s-text>\n \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<s-stack direction=\"inline\" alignItems=\"center\" gap=\"small\">\n <s-text variant=\"headingMd\" fontWeight=\"semibold\">\n <h1 style={{ margin: \"0.5rem\" }}> {title}</h1>\n </s-text>\n {status && (\n <s-badge tone={tone}>{status}</s-badge>\n )}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</s-stack>\n </s-stack>\n\n {/* Description */}\n {description && (\n <s-text variant=\"bodyMd\" tone=\"subdued\">\n <h3 style={{ margin: 0 ,marginLeft: \"0.5rem\", color:\"#596063\" }}>{description}</h3>\n </s-text>\n )}\n\n {/* Details → GRID (important change) */}\n {details.length > 0 && (\n <s-grid\n gap=\"small\"\n gridTemplateColumns=\"1fr 1fr\"\n >\n {details.map((item, i) => (\n <s-box\n key={i}\n padding=\"base\"\n background=\"strong\"\n borderRadius=\"base\"\n >\n <s-stack gap=\"small-100\">\n <s-text variant=\"bodySm\" tone=\"subdued\">\n {item.label.toLocaleUpperCase()}\n </s-text>\n\n <s-text variant=\"bodyMd\" fontWeight=\"medium\">\n {item.value}\n </s-text>\n </s-stack>\n </s-box>\n ))}\n </s-grid>\n )}\n\n {/* Footer */}\n {(meta || action) && (\n <>\n <s-divider />\n\n <s-stack\n direction=\"inline\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n >\n <s-text variant=\"bodySm\" tone=\"subdued\">\n {meta}\n </s-text>\n\n {action && (\n <s-button variant=\"secondary\" onClick={onAction}>\n {action}\n </s-button>\n )}\n </s-stack>\n </>\n )}\n\n </s-stack>\n </s-box>\n </s-card>\n </s-section>\n );\n}"],"mappings":";AAmBQ,SAEQ,KAFR;AAFD,SAAS,QAAQ,EAAE,SAAS,YAAY,SAAS,GAAiB;AACrE,SACI,qBAAC,YAAO,SACH;AAAA,kBACG,oBAAC,YAAO,IAAG,KAAI,SAAQ,UAAS,MAAK,YAChC,sBACL;AAAA,IAEJ,oBAAC,eACI,UACL;AAAA,KACJ;AAER;;;ACTQ,gBAAAA,YAAA;AAFD,SAAS,YAAY,EAAE,SAAS,SAAS,GAAqB;AACjE,SACI,gBAAAA,KAAC,eAAU,SACN,UACL;AAER;;;ACgBe,SAkDa,UAlDb,OAAAC,MACgB,QAAAC,aADhB;AApBR,SAAS,WAAW;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,UAAU,CAAC;AAAA,EACX;AAAA,EACA;AAAA,EACA;AACJ,GAAqB;AACjB,SACI,gBAAAD,KAAC,eACG,0BAAAA,KAAC,YACG,0BAAAA,KAAC,WAAM,SAAQ,QACX,0BAAAC,MAAC,aAAQ,KAAI,QAIpB;AAAA,oBAAAA,MAAC,aAAQ,KAAI,KACX;AAAA,sBAAAD,KAAC,YAAO,SAAQ,aAAY,OAAM,WAClB,0BAAAC,MAAC,QAAG,OAAO,EAAE,QAAQ,GAAG,YAAY,UAAU,eAAe,SAAQ,GAAG;AAAA;AAAA,QAAE;AAAA,SAAQ,GACrF;AAAA,MAEd,gBAAAA,MAAC,aAAQ,WAAU,UAAS,YAAW,UAAS,KAAI,SACtC;AAAA,wBAAAD,KAAC,YAAO,SAAQ,aAAY,YAAW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age.tsx","../src/components/PageSection/PageSection.tsx","../src/components/StatusCard/StatusCard.tsx","../src/components/Tab/Tab.tsx","../src/Flow-Components/Onboarding/Onboarding.tsx","../src/Flow-Components/Onboarding/hooks/useOnboarding.tsx","../src/Flow-Components/Onboarding/components/SetupSummary.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nexport interface AppPageProps {\n /** Page heading */\n heading: string;\n /** Page subheading */\n subheading?: string;\n children: ReactNode;\n}\n\n/**\n * AppPage\n *\n * Wraps `s-page` with an `s-section` layout section.\n * Requires the Polaris CDN script in your app's <head>:\n * https://cdn.shopify.com/shopifycloud/polaris.js\n */\nexport function AppPage({ heading, subheading, children }: AppPageProps) {\n return (\n <s-page heading={heading}>\n {subheading && (\n <s-text as=\"p\" variant=\"bodyMd\" slot=\"subtitle\">\n {subheading}\n </s-text>\n )}\n <s-section>\n {children}\n </s-section>\n </s-page>\n );\n}","import type { ReactNode } from \"react\";\n\nexport type PageSectionVariant = \"oneThird\" | \"oneHalf\" | \"fullWidth\";\n\nexport interface PageSectionProps {\n /** Section heading */\n heading?: string;\n /** Content inside the section */\n children: ReactNode;\n}\n\n/**\n * PageSection\n *\n * A typed wrapper around `s-section` for use inside an `AppPage`\n * or directly within an `s-page`.\n *\n * CDN: https://cdn.shopify.com/shopifycloud/polaris.js\n */\nexport function PageSection({ heading, children }: PageSectionProps) {\n return (\n <s-section heading={heading}>\n {children}\n </s-section>\n );\n}\n","import type { ReactNode } from \"react\";\n\nexport type StatusTone = \"info\" | \"success\" | \"warning\" | \"critical\";\n\ninterface DetailItem {\n label: string;\n value: string;\n}\n\nexport interface StatusCardsProps {\n heading: string;\n title: string;\n status?: string;\n tone?: StatusTone;\n description?: string;\n details?: DetailItem[];\n meta?: string;\n action?: string;\n onAction?: () => void;\n}\n\nexport function StatusCard({\n heading,\n title,\n status,\n tone = \"info\",\n description,\n details = [],\n meta,\n action,\n onAction,\n}: StatusCardsProps) {\n return (\n <s-section>\n <s-card>\n <s-box padding=\"base\">\n <s-stack gap=\"base\">\n\n {/* Header */}\n \n\t\t\t\t\t\t\t\t\t\t\t\t\t<s-stack gap=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t <s-text variant=\"headingMd\" color=\"subdued\">\n <h2 style={{ margin: 0 ,marginLeft: \"0.5rem\", letterSpacing: \"0.1rem\"}}> {heading}</h2>\n </s-text>\n \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<s-stack direction=\"inline\" alignItems=\"center\" gap=\"small\">\n <s-text variant=\"headingMd\" fontWeight=\"semibold\">\n <h1 style={{ margin: \"0.5rem\" }}> {title}</h1>\n </s-text>\n {status && (\n <s-badge tone={tone}>{status}</s-badge>\n )}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</s-stack>\n </s-stack>\n\n {/* Description */}\n {description && (\n <s-text variant=\"bodyMd\" tone=\"subdued\">\n <h3 style={{ margin: 0 ,marginLeft: \"0.5rem\", color:\"#596063\" }}>{description}</h3>\n </s-text>\n )}\n\n {/* Details → GRID (important change) */}\n {details.length > 0 && (\n <s-grid\n gap=\"small\"\n gridTemplateColumns=\"1fr 1fr\"\n >\n {details.map((item, i) => (\n <s-box\n key={i}\n padding=\"base\"\n background=\"strong\"\n borderRadius=\"base\"\n >\n <s-stack gap=\"small-100\">\n <s-text variant=\"bodySm\" tone=\"subdued\">\n {item.label.toLocaleUpperCase()}\n </s-text>\n\n <s-text variant=\"bodyMd\" fontWeight=\"medium\">\n {item.value}\n </s-text>\n </s-stack>\n </s-box>\n ))}\n </s-grid>\n )}\n\n {/* Footer */}\n {(meta || action) && (\n <>\n <s-divider />\n\n <s-stack\n direction=\"inline\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n >\n <s-text variant=\"bodySm\" tone=\"subdued\">\n {meta}\n </s-text>\n\n {action && (\n <s-button variant=\"secondary\" onClick={onAction}>\n {action}\n </s-button>\n )}\n </s-stack>\n </>\n )}\n\n </s-stack>\n </s-box>\n </s-card>\n </s-section>\n );\n}","import React, { createContext, useContext, useState, ReactNode } from \"react\";\r\n\r\n// --- Context ---\r\ninterface TabsContextProps {\r\n activeTab: string;\r\n setActiveTab: (value: string) => void;\r\n}\r\n\r\nconst TabsContext = createContext<TabsContextProps | undefined>(undefined);\r\n\r\nconst useTabs = () => {\r\n const context = useContext(TabsContext);\r\n if (!context) {\r\n throw new Error(\"Tabs sub-components must be used within a Tabs component\");\r\n }\r\n return context;\r\n};\r\n\r\n// --- Main Tabs Component ---\r\nexport interface TabsProps {\r\n defaultValue?: string;\r\n value?: string;\r\n onValueChange?: (value: string) => void;\r\n children: ReactNode;\r\n className?: string; \r\n}\r\n\r\nexport function Tabs({ defaultValue, value, onValueChange, children }: TabsProps) {\r\n const [internalActiveTab, setInternalActiveTab] = useState(defaultValue || \"\");\r\n\r\n const activeTab = value !== undefined ? value : internalActiveTab;\r\n const setActiveTab = (newValue: string) => {\r\n if (value === undefined) {\r\n setInternalActiveTab(newValue);\r\n }\r\n onValueChange?.(newValue);\r\n };\r\n\r\n return (\r\n <TabsContext.Provider value={{ activeTab, setActiveTab }}>\r\n <div style={{ width: \"100%\" }}>\r\n {children}\r\n </div>\r\n </TabsContext.Provider>\r\n );\r\n}\r\n\r\nexport interface TabsListProps {\r\n children: ReactNode;\r\n gap?: string;\r\n}\r\n\r\nexport function TabsList({ children, gap = \"small\" }: TabsListProps) {\r\n return (\r\n <s-box paddingInline=\"base\" paddingBlock=\"small\">\r\n <div style={{ \r\n overflowX: \"auto\", \r\n scrollbarWidth: \"none\", \r\n msOverflowStyle: \"none\", \r\n }}>\r\n <style dangerouslySetInnerHTML={{ __html: `\r\n ::-webkit-scrollbar { display: none; }\r\n ` }} />\r\n <s-stack direction=\"inline\" gap={gap} alignItems=\"center\">\r\n {children}\r\n </s-stack>\r\n </div>\r\n </s-box>\r\n );\r\n}\r\n\r\n// --- Trigger Component ---\r\nexport interface TabsTriggerProps {\r\n value: string;\r\n children: ReactNode;\r\n disabled?: boolean;\r\n}\r\n\r\nexport function TabsTrigger({ value, children, disabled }: TabsTriggerProps) {\r\n const { activeTab, setActiveTab } = useTabs();\r\n const isActive = activeTab === value;\r\n\r\n return (\r\n <s-box>\r\n <s-clickable\r\n paddingInline=\"small\"\r\n maxInlineWidth=\"100px\"\r\n paddingBlock=\"small-100\" \r\n borderRadius=\"large-100\"\r\n background={isActive ? \"strong\" : \"transparent\"}\r\n onClick={() => !disabled && setActiveTab(value)}\r\n style={{\r\n cursor: disabled ? \"not-allowed\" : \"pointer\",\r\n opacity: disabled ? 0.5 : 1,\r\n transition: \"background 0.2s ease, transform 0.1s ease\",\r\n userSelect: \"none\",\r\n }}\r\n >\r\n <s-text\r\n type={isActive ? \"strong\" : \"generic\"}\r\n tone={isActive ? \"neutral\" : \"auto\"}\r\n >\r\n {children}\r\n </s-text>\r\n </s-clickable>\r\n </s-box>\r\n );\r\n}\r\n\r\n// --- Content Component ---\r\nexport interface TabsContentProps {\r\n value: string;\r\n children: ReactNode;\r\n}\r\n\r\nexport function TabsContent({ value, children }: TabsContentProps) {\r\n const { activeTab } = useTabs();\r\n\r\n if (activeTab !== value) return null;\r\n\r\n return (\r\n <s-box padding=\"base\">\r\n {children}\r\n </s-box>\r\n );\r\n}","import React from 'react';\nimport { OnboardingProvider, useOnboarding } from './hooks/useOnboarding';\nimport { OnboardingStep, OnboardingData, OnboardingStepProps } from './types';\nimport { SetupSummary } from './components/SetupSummary';\n\nexport type { OnboardingStep, OnboardingData };\n\nimport './Onboarding.css';\n\nconst OnboardingInner: React.FC<{ steps: OnboardingStep[] }> = ({ steps }) => {\n\n const {\n currentStepIndex,\n totalSteps,\n data,\n updateData,\n nextStep,\n prevStep,\n isFirstStep,\n isLastStep,\n canProceed,\n } = useOnboarding();\n\n const currentStep = steps[currentStepIndex];\n if (!currentStep) return null;\n \n const StepComponent = currentStep.component;\n const progress = Math.round(((currentStepIndex + 1) / totalSteps) * 100);\n\n return (\n <s-page>\n <s-stack gap=\"large\">\n\n {/* Header Section */}\n <s-stack gap=\"tight\">\n <s-text type=\"strong\">\n <div style={{ fontSize: \"24px\", fontWeight: \"bold\", marginTop: \"30px\" }}>\n Installation Setup\n </div>\n </s-text>\n <div className=\"setup-info-text-wrapper\">\n <s-text color=\"subdued\" type=\"strong\">\n Complete all the steps to set up your Live Gold Rate Updater account.\n </s-text>\n </div>\n </s-stack>\n\n <div style={{ display: \"flex\", justifyContent: \"center\", width: \"100%\", padding: \"0 0 16px\" }}>\n <div \n className=\"grid-container\"\n style={{ \n maxWidth: \"1000px\", \n width: \"100%\", \n display: \"grid\", \n gridTemplateColumns: \"1fr 0.6fr\", \n gap: \"24px\",\n alignItems: \"stretch\" \n }}\n >\n {/* Left Card: Main Content */}\n <div className=\"wel-left-card\" style={{ display: \"flex\", flexDirection: \"column\", gap: \"20px\" }}>\n <div style={{ flex: 1 }}>\n \n {/* Banner Section */}\n {currentStep.infoMessage && (\n <div style={{ marginBottom: '15px' }}>\n <s-section>\n <s-banner tone=\"info\" heading=\"Welcome to Installation Setup!\">\n <s-text>{currentStep.infoMessage}</s-text>\n </s-banner>\n </s-section>\n </div>\n )}\n\n <s-section>\n <div \n className=\"left-card-content\"\n style={{ \n minHeight: \"450px\", \n display: \"flex\", \n flexDirection: \"column\", \n justifyContent: \"space-between\", \n padding: \"20px\" \n }}\n >\n <div style={{ flex: 1 }}>\n <s-stack gap=\"base\">\n <s-stack direction=\"inline\" justifyContent=\"space-between\" alignItems=\"center\">\n <s-text color=\"subdued\" type=\"strong\">\n Step {currentStepIndex + 1} of {totalSteps}\n </s-text>\n <s-badge tone=\"info\" size=\"base\">{`${progress}%`}</s-badge>\n </s-stack>\n\n {/* Progress Bar */}\n <div style={{ \n width: '100%', \n height: '8px', \n backgroundColor: '#e5e5e5', \n borderRadius: '4px', \n overflow: 'hidden' \n }}>\n <div style={{ \n width: `${progress}%`, \n height: '100%', \n backgroundColor: '#008060', \n transition: 'width 0.5s ease' \n }} />\n </div>\n\n {/* Step Title + Content */}\n <s-stack gap=\"large\">\n <s-stack gap=\"none\">\n <s-text font-weight=\"bold\" type=\"strong\">\n <div style={{ fontWeight: \"bold\", fontSize: \"18px\" }}>\n {currentStep.title}\n </div>\n </s-text>\n {currentStep.subtitle && (\n <s-text color=\"subdued\" type=\"strong\">\n {currentStep.subtitle}\n </s-text>\n )}\n </s-stack>\n <div className=\"onboarding-step-component-mount\">\n {StepComponent ? (\n <StepComponent data={data} updateData={updateData} />\n ) : (\n currentStep.children\n )}\n </div>\n </s-stack>\n </s-stack>\n </div>\n\n <div style={{ flexShrink: 0, paddingTop: \"24px\" }}>\n <s-divider />\n <s-stack direction=\"inline\" justifyContent=\"space-between\" style={{ paddingTop: \"16px\" }}>\n <s-button onClick={prevStep} disabled={isFirstStep}>\n Back\n </s-button>\n <s-button \n variant=\"primary\" \n onClick={nextStep} \n disabled={!canProceed}\n >\n {isLastStep ? 'Finish' : 'Next'}\n </s-button>\n </s-stack>\n </div>\n </div>\n </s-section>\n </div>\n </div>\n\n {/* Right Card: Sidebar Slideshow */}\n {currentStep.sidebar && (\n <div className=\"slideshow-container\" style={{ display: \"flex\", flexDirection: \"column\" }}>\n <s-section>\n <div \n className=\"slideshow-inner\"\n style={{ \n minHeight: \"450px\", \n display: \"flex\", \n flexDirection: \"column\", \n justifyContent: \"center\", \n padding: \"20px 0\",\n textAlign: \"center\"\n }}\n >\n <s-stack alignItems=\"center\" justifyContent=\"center\" gap=\"large\">\n \n {/* Icon */}\n <div style={{ display: \"flex\", alignItems: \"center\", justifyContent: \"center\" }}>\n {currentStep.sidebar.icon ? (\n <div style={{ fontSize: \"60px\" }}>{currentStep.sidebar.icon}</div>\n ) : (\n <div style={{ fontSize: \"60px\" }}>🔔</div>\n )}\n </div>\n\n {/* Info */}\n <s-stack gap=\"tight\" align=\"center\">\n <s-text font-weight=\"bold\" type=\"strong\">\n <div style={{ fontSize: \"18px\", fontWeight: \"bold\" }}>\n {currentStep.sidebar.title}\n </div>\n </s-text>\n <s-text color=\"subdued\">\n <div style={{ maxWidth: \"300px\", margin: \"0 auto\" }}>\n {currentStep.sidebar.description}\n </div>\n </s-text>\n </s-stack>\n\n <s-divider />\n\n {/* Features */}\n {currentStep.sidebar.features && (\n <s-stack gap=\"base\" align=\"start\" style={{ textAlign: \"left\", width: \"100%\", paddingLeft: \"32px\" }}>\n {currentStep.sidebar.features.map((feature, index) => (\n <s-stack gap=\"small\" direction=\"inline\" key={index} alignItems=\"start\">\n <s-text tone=\"success\" fontWeight=\"bold\">✓</s-text>\n <s-text variant=\"bodyMd\">{feature}</s-text>\n </s-stack>\n ))}\n </s-stack>\n )}\n\n <s-divider />\n\n {/* Pagination Bullets */}\n <s-stack direction=\"inline\" justifyContent=\"center\" alignItems=\"center\" gap=\"base\">\n {steps.map((_, index) => (\n <div\n key={index}\n style={{\n width: currentStepIndex === index ? \"28px\" : \"8px\",\n height: \"7px\",\n borderRadius: \"4px\",\n background: currentStepIndex === index ? \"#f49342\" : \"#e1e3e5\",\n transition: \"all 0.3s ease\",\n }}\n />\n ))}\n </s-stack>\n\n </s-stack>\n </div>\n </s-section>\n </div>\n )}\n </div>\n </div>\n </s-stack>\n </s-page>\n );\n};\n\nexport interface OnboardingProps {\n steps?: OnboardingStep[];\n children?: React.ReactNode;\n onFinish: (data: OnboardingData) => void;\n}\n\nconst Step: React.FC<OnboardingStepProps> = ({ children }) => <>{children}</>;\n\nexport const Onboarding: React.FC<OnboardingProps> & {\n Step: typeof Step;\n Summary: typeof SetupSummary;\n} = ({ steps: stepsProp, children, onFinish }) => {\n \n const steps = React.useMemo(() => {\n if (stepsProp) return stepsProp;\n \n // Discover steps from children\n const discoveredSteps: OnboardingStep[] = [];\n React.Children.forEach(children, (child) => {\n if (React.isValidElement(child) && child.type === Step) {\n const props = child.props as any;\n discoveredSteps.push({\n ...props,\n children: props.children,\n });\n } else if (React.isValidElement(child) && child.type === SetupSummary) {\n const props = child.props as any;\n discoveredSteps.push({\n id: 'summary',\n title: 'Review & Finish Setup',\n ...props,\n component: SetupSummary,\n });\n }\n });\n return discoveredSteps;\n }, [stepsProp, children]);\n\n return (\n <OnboardingProvider steps={steps} onFinish={onFinish}>\n <OnboardingInner steps={steps} />\n </OnboardingProvider>\n );\n};\n\nOnboarding.Step = Step;\nOnboarding.Summary = SetupSummary;","import React, { createContext, useContext, useState, useCallback, useMemo } from 'react';\nimport { OnboardingContextType, OnboardingData, OnboardingStep } from '../types';\n\nconst OnboardingContext = createContext<OnboardingContextType | undefined>(undefined);\n\nexport const OnboardingProvider: React.FC<{\n steps: OnboardingStep[];\n children: React.ReactNode;\n onFinish: (data: OnboardingData) => void;\n}> = ({ steps, children, onFinish }) => {\n const [currentStepIndex, setCurrentStepIndex] = useState(0);\n const [data, setData] = useState<OnboardingData>({});\n\n const updateData = useCallback((newData: Partial<OnboardingData>) => {\n setData((prev) => ({ ...prev, ...newData }));\n }, []);\n\n const nextStep = useCallback(() => {\n if (currentStepIndex < steps.length - 1) {\n setCurrentStepIndex((prev) => prev + 1);\n } else {\n onFinish(data);\n }\n }, [currentStepIndex, steps.length, data, onFinish]);\n\n const prevStep = useCallback(() => {\n if (currentStepIndex > 0) {\n setCurrentStepIndex((prev) => prev - 1);\n }\n }, [currentStepIndex]);\n\n const currentStep = steps[currentStepIndex];\n const canProceed = useMemo(() => {\n if (!currentStep) return false;\n return currentStep.validate ? currentStep.validate(data) : true;\n }, [currentStep, data]);\n\n const value = useMemo(\n () => ({\n currentStepIndex,\n totalSteps: steps.length,\n data,\n updateData,\n nextStep,\n prevStep,\n isFirstStep: currentStepIndex === 0,\n isLastStep: currentStepIndex === steps.length - 1,\n canProceed,\n }),\n [currentStepIndex, steps.length, data, updateData, nextStep, prevStep, canProceed]\n );\n\n return <OnboardingContext.Provider value={value}>{children}</OnboardingContext.Provider>;\n};\n\nexport const useOnboarding = () => {\n const context = useContext(OnboardingContext);\n if (!context) {\n throw new Error('useOnboarding must be used within an OnboardingProvider');\n }\n return context;\n};\n","import React from 'react';\nimport { OnboardingData } from '../types';\nimport { useOnboarding } from '../hooks/useOnboarding';\n\ninterface SetupSummaryProps {\n data?: OnboardingData;\n updateData?: (newData: Partial<OnboardingData>) => void;\n}\n\nexport const SetupSummary: React.FC<SetupSummaryProps> = (props) => {\n const context = useOnboarding();\n const data = props.data || context.data;\n const entries = Object.entries(data);\n\n return (\n <div className=\"setup-summary\">\n <div style={{ marginBottom: '24px' }}>\n <span className=\"glass-pill\" style={{ background: '#e1f5fe', color: '#0277bd', padding: '4px 12px' }}>\n Overview\n </span>\n </div>\n \n <div style={{ display: 'grid', gap: '16px' }}>\n {entries.map(([key, value]) => (\n <div key={key} style={{ \n display: 'flex', \n justifyContent: 'space-between', \n padding: '12px 0', \n borderBottom: '1px solid #f1f2f4' \n }}>\n <span style={{ fontWeight: 600, color: '#6d7175', textTransform: 'capitalize' }}>\n {key.replace(/([A-Z])/g, ' $1').trim()}:\n </span>\n <span style={{ fontWeight: 500, color: '#1a1c1d' }}>\n {typeof value === 'boolean' ? (value ? 'Yes' : 'No') : String(value || '--')}\n </span>\n </div>\n ))}\n {entries.length === 0 && (\n <p style={{ color: '#6d7175', fontStyle: 'italic' }}>No configuration data provided.</p>\n )}\n </div>\n\n <div style={{ marginTop: '32px', padding: '16px', borderRadius: '8px', background: '#f9fafb', border: '1px dashed #d1d3d5' }}>\n <p style={{ fontSize: '13px', color: '#6d7175', margin: 0 }}>\n Please review your information and click \"Finish Setup\" to activate account.\n </p>\n </div>\n </div>\n );\n};\n"],"mappings":";AAmBQ,SAEQ,KAFR;AAFD,SAAS,QAAQ,EAAE,SAAS,YAAY,SAAS,GAAiB;AACrE,SACI,qBAAC,YAAO,SACH;AAAA,kBACG,oBAAC,YAAO,IAAG,KAAI,SAAQ,UAAS,MAAK,YAChC,sBACL;AAAA,IAEJ,oBAAC,eACI,UACL;AAAA,KACJ;AAER;;;ACTQ,gBAAAA,YAAA;AAFD,SAAS,YAAY,EAAE,SAAS,SAAS,GAAqB;AACjE,SACI,gBAAAA,KAAC,eAAU,SACN,UACL;AAER;;;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