Compare commits
10 Commits
17ec53e08f
...
afc18988cd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afc18988cd | ||
|
|
e7d1371c48 | ||
|
|
57918a6d8c | ||
|
|
e635771615 | ||
|
|
58a27fd9d3 | ||
|
|
22ed3a409e | ||
|
|
1a6242e642 | ||
|
|
e704488eb9 | ||
|
|
4c31c448f3 | ||
|
|
74ee154669 |
@ -49,7 +49,7 @@ const INTERNAL_ORDER_FIELDS = new Set([
|
||||
const INTERNAL_ORDER_ITEM_FIELDS = new Set(["WHMCS_Service_ID__c"]);
|
||||
|
||||
/** Statuses that trigger provisioning */
|
||||
const PROVISION_TRIGGER_STATUSES = new Set(["Approved", "Reactivate"]);
|
||||
const PROVISION_TRIGGER_STATUSES = new Set(["Processed", "Reactivate"]);
|
||||
|
||||
@Injectable()
|
||||
export class OrderCdcSubscriber implements OnModuleInit {
|
||||
@ -134,9 +134,9 @@ export class OrderCdcSubscriber implements OnModuleInit {
|
||||
await this.handleActivationStatusChange(payload, orderId);
|
||||
}
|
||||
|
||||
// Check for provisioning trigger (Status change to "Approved")
|
||||
// Check for provisioning trigger (Status change to "Processed")
|
||||
if (payload && changedFields.has("Status")) {
|
||||
await this.handleStatusApprovedChange(payload, orderId);
|
||||
await this.handleStatusProcessedChange(payload, orderId);
|
||||
}
|
||||
|
||||
// Cache invalidation - only for customer-facing field changes
|
||||
@ -222,9 +222,9 @@ export class OrderCdcSubscriber implements OnModuleInit {
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle order status changes to "Approved"
|
||||
* Handle order status changes to "Processed"
|
||||
*
|
||||
* Enqueues a provisioning job when Status changes to "Approved".
|
||||
* Enqueues a provisioning job when Status changes to "Processed".
|
||||
* The provisioning processor will fetch the full order from Salesforce
|
||||
* and validate the conditions (SIM_Type__c, Assign_Physical_SIM__c, etc.)
|
||||
*
|
||||
@ -232,27 +232,20 @@ export class OrderCdcSubscriber implements OnModuleInit {
|
||||
* because CDC only includes CHANGED fields. If only Status was updated, those fields
|
||||
* will be null in the payload even though they have values on the record.
|
||||
*
|
||||
* The processor handles:
|
||||
* - Physical SIM: Status="Approved" + SIM_Type="Physical SIM" + Assigned_Physical_SIM set
|
||||
* - Standard: Activation_Status__c="Activating"
|
||||
* - Idempotency via WHMCS_Order_ID__c check
|
||||
* On API failure, the orchestrator reverts the order Status back to "Approved".
|
||||
*/
|
||||
private async handleStatusApprovedChange(
|
||||
private async handleStatusProcessedChange(
|
||||
payload: Record<string, unknown>,
|
||||
orderId: string
|
||||
): Promise<void> {
|
||||
const status = extractStringField(payload, ["Status"]);
|
||||
|
||||
// Only trigger when status changes to "Approved"
|
||||
if (status !== "Approved") {
|
||||
// Only trigger when status changes to "Processed"
|
||||
if (status !== "Processed") {
|
||||
return;
|
||||
}
|
||||
|
||||
// Note: We intentionally do NOT check SIM_Type__c or Assign_Physical_SIM__c here
|
||||
// because CDC payloads only contain changed fields. The provisioning processor
|
||||
// will fetch the full order and validate all conditions.
|
||||
|
||||
this.logger.log("Enqueuing provisioning job for order status change to Approved", {
|
||||
this.logger.log("Enqueuing provisioning job for order status change to Processed", {
|
||||
orderId,
|
||||
status,
|
||||
});
|
||||
@ -260,15 +253,15 @@ export class OrderCdcSubscriber implements OnModuleInit {
|
||||
try {
|
||||
await this.provisioningQueue.enqueue({
|
||||
sfOrderId: orderId,
|
||||
idempotencyKey: `cdc-status-approved-${Date.now()}-${orderId}`,
|
||||
correlationId: `cdc-status-approved-${orderId}`,
|
||||
idempotencyKey: `cdc-status-processed-${Date.now()}-${orderId}`,
|
||||
correlationId: `cdc-status-processed-${orderId}`,
|
||||
});
|
||||
|
||||
this.logger.log("Successfully enqueued provisioning job for Approved status", {
|
||||
this.logger.log("Successfully enqueued provisioning job for Processed status", {
|
||||
orderId,
|
||||
});
|
||||
} catch (error) {
|
||||
this.logger.error("Failed to enqueue provisioning job for Approved status", {
|
||||
this.logger.error("Failed to enqueue provisioning job for Processed status", {
|
||||
orderId,
|
||||
error: error instanceof Error ? error.message : String(error),
|
||||
});
|
||||
|
||||
@ -34,10 +34,10 @@ export class ProvisioningProcessor extends WorkerHost {
|
||||
|
||||
// Guard: Determine if this is a valid provisioning request
|
||||
// Case 1: Standard flow - Activation_Status__c = "Activating"
|
||||
// Case 2: Physical SIM flow - Status = "Approved" with SIM_Type__c = "Physical SIM"
|
||||
// Case 2: Physical SIM flow - Status = "Processed" with SIM_Type__c = "Physical SIM"
|
||||
const isStandardActivation = activationStatus === "Activating";
|
||||
const isPhysicalSimApproval =
|
||||
orderStatus === "Approved" && simType === "Physical SIM" && !!assignedPhysicalSim;
|
||||
orderStatus === "Processed" && simType === "Physical SIM" && !!assignedPhysicalSim;
|
||||
|
||||
if (!isStandardActivation && !isPhysicalSimApproval) {
|
||||
this.logger.log("Skipping provisioning job: Order not in activatable state", {
|
||||
|
||||
@ -312,7 +312,7 @@ export class OrderFulfillmentOrchestrator {
|
||||
failedStep: context.steps.find(s => s.status === "failed")?.step,
|
||||
});
|
||||
|
||||
// Update Salesforce with failure status
|
||||
// Update Salesforce with failure status — revert to "Approved" so it can be retried
|
||||
const errorShortCode = (
|
||||
this.orderFulfillmentErrorService.getShortCode(error) || String(errorCode)
|
||||
)
|
||||
@ -321,7 +321,7 @@ export class OrderFulfillmentOrchestrator {
|
||||
try {
|
||||
await this.salesforceFacade.updateOrder({
|
||||
Id: sfOrderId,
|
||||
Status: "Pending Review",
|
||||
Status: "Approved",
|
||||
Activation_Status__c: "Failed",
|
||||
Activation_Error_Code__c: errorShortCode,
|
||||
Activation_Error_Message__c: userMessage?.slice(0, 255),
|
||||
|
||||
48
apps/portal/.storybook/main.ts
Normal file
48
apps/portal/.storybook/main.ts
Normal file
@ -0,0 +1,48 @@
|
||||
import type { StorybookConfig } from "@storybook/react-vite";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import path from "path";
|
||||
|
||||
const config: StorybookConfig = {
|
||||
stories: ["../src/**/*.stories.@(ts|tsx)"],
|
||||
addons: ["@storybook/addon-essentials"],
|
||||
framework: {
|
||||
name: "@storybook/react-vite",
|
||||
options: {},
|
||||
},
|
||||
staticDirs: ["../public"],
|
||||
viteFinal: async config => {
|
||||
config.plugins = config.plugins || [];
|
||||
config.plugins.push(tailwindcss());
|
||||
|
||||
// Ensure JSX runtime is available (auto-imports React)
|
||||
config.esbuild = {
|
||||
...config.esbuild,
|
||||
jsx: "automatic",
|
||||
};
|
||||
|
||||
config.resolve = config.resolve || {};
|
||||
config.resolve.alias = {
|
||||
...config.resolve.alias,
|
||||
"@": path.resolve(__dirname, "../src"),
|
||||
"next/link": path.resolve(__dirname, "mocks/next-link.tsx"),
|
||||
"next/image": path.resolve(__dirname, "mocks/next-image.tsx"),
|
||||
"next/navigation": path.resolve(__dirname, "mocks/next-navigation.tsx"),
|
||||
};
|
||||
|
||||
// Disable PostCSS — @tailwindcss/vite handles CSS directly
|
||||
config.css = config.css || {};
|
||||
config.css.postcss = { plugins: [] };
|
||||
|
||||
// Polyfill process.env for Next.js code that uses it
|
||||
config.define = {
|
||||
...config.define,
|
||||
"process.env": JSON.stringify({
|
||||
NODE_ENV: "development",
|
||||
}),
|
||||
};
|
||||
|
||||
return config;
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
24
apps/portal/.storybook/mocks/next-image.tsx
Normal file
24
apps/portal/.storybook/mocks/next-image.tsx
Normal file
@ -0,0 +1,24 @@
|
||||
import React from "react";
|
||||
|
||||
interface ImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
||||
src: string;
|
||||
alt: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
fill?: boolean;
|
||||
priority?: boolean;
|
||||
}
|
||||
|
||||
const Image = ({ src, alt, width, height, fill, priority: _priority, ...props }: ImageProps) => (
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
<img
|
||||
src={src}
|
||||
alt={alt}
|
||||
width={width}
|
||||
height={height}
|
||||
style={fill ? { objectFit: "cover", width: "100%", height: "100%" } : undefined}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
export default Image;
|
||||
13
apps/portal/.storybook/mocks/next-link.tsx
Normal file
13
apps/portal/.storybook/mocks/next-link.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import React from "react";
|
||||
|
||||
const Link = React.forwardRef<
|
||||
HTMLAnchorElement,
|
||||
React.AnchorHTMLAttributes<HTMLAnchorElement> & { href: string }
|
||||
>(({ href, children, ...props }, ref) => (
|
||||
<a ref={ref} href={href} {...props}>
|
||||
{children}
|
||||
</a>
|
||||
));
|
||||
Link.displayName = "Link";
|
||||
|
||||
export default Link;
|
||||
30
apps/portal/.storybook/mocks/next-navigation.tsx
Normal file
30
apps/portal/.storybook/mocks/next-navigation.tsx
Normal file
@ -0,0 +1,30 @@
|
||||
export function useRouter() {
|
||||
return {
|
||||
push: (url: string) => {
|
||||
window.location.hash = url;
|
||||
},
|
||||
replace: (url: string) => {
|
||||
window.location.hash = url;
|
||||
},
|
||||
back: () => {
|
||||
window.history.back();
|
||||
},
|
||||
forward: () => {
|
||||
window.history.forward();
|
||||
},
|
||||
refresh: () => {},
|
||||
prefetch: () => Promise.resolve(),
|
||||
};
|
||||
}
|
||||
|
||||
export function usePathname() {
|
||||
return "/";
|
||||
}
|
||||
|
||||
export function useSearchParams() {
|
||||
return new URLSearchParams();
|
||||
}
|
||||
|
||||
export function useParams() {
|
||||
return {};
|
||||
}
|
||||
18
apps/portal/.storybook/preview.ts
Normal file
18
apps/portal/.storybook/preview.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import type { Preview } from "@storybook/react";
|
||||
import "../src/app/globals.css";
|
||||
|
||||
const preview: Preview = {
|
||||
parameters: {
|
||||
layout: "centered",
|
||||
backgrounds: {
|
||||
default: "light",
|
||||
values: [
|
||||
{ name: "light", value: "#f9f9f9" },
|
||||
{ name: "white", value: "#ffffff" },
|
||||
{ name: "dark", value: "#1a1a2e" },
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default preview;
|
||||
@ -0,0 +1 @@
|
||||
import{j as t}from"./jsx-runtime-D_zvdyIk.js";function m({firstName:r,lastName:n,email:o,address:s}){const i=e=>[e.postcode?`〒${e.postcode}`:"",e.prefectureJa||"",e.cityJa||"",e.townJa||"",e.streetAddress||"",e.buildingName||"",e.roomNumber||""].filter(Boolean).join("");return t.jsxs("div",{className:"p-4 rounded-lg bg-muted/50 border border-border",children:[t.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Account details:"}),t.jsxs("p",{className:"font-medium text-foreground",children:[r," ",n]}),t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:o}),s&&t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:i(s)})]})}m.__docgenInfo={description:"",methods:[],displayName:"AccountInfoDisplay",props:{firstName:{required:!0,tsType:{name:"string"},description:""},lastName:{required:!0,tsType:{name:"string"},description:""},email:{required:!0,tsType:{name:"string"},description:""},address:{required:!1,tsType:{name:"union",raw:"AddressData | null | undefined",elements:[{name:"AddressData"},{name:"null"},{name:"undefined"}]},description:""}}};export{m as A};
|
||||
@ -0,0 +1,29 @@
|
||||
import{A as l}from"./AccountInfoDisplay-DWJQCkvO.js";import"./jsx-runtime-D_zvdyIk.js";const f={title:"Features/Services/EligibilityCheck/AccountInfoDisplay",component:l,parameters:{layout:"centered"}},a={args:{firstName:"Taro",lastName:"Yamada",email:"taro.yamada@example.com"}},e={args:{firstName:"Taro",lastName:"Yamada",email:"taro.yamada@example.com",address:{postcode:"100-0001",prefectureJa:"東京都",cityJa:"千代田区",townJa:"千代田",streetAddress:"1-1-1",buildingName:"パレスビル",roomNumber:"101"}}},r={args:{firstName:"Jane",lastName:"Smith",email:"jane.smith@example.com",address:null}};var s,t,m;a.parameters={...a.parameters,docs:{...(s=a.parameters)==null?void 0:s.docs,source:{originalSource:`{
|
||||
args: {
|
||||
firstName: "Taro",
|
||||
lastName: "Yamada",
|
||||
email: "taro.yamada@example.com"
|
||||
}
|
||||
}`,...(m=(t=a.parameters)==null?void 0:t.docs)==null?void 0:m.source}}};var o,n,d;e.parameters={...e.parameters,docs:{...(o=e.parameters)==null?void 0:o.docs,source:{originalSource:`{
|
||||
args: {
|
||||
firstName: "Taro",
|
||||
lastName: "Yamada",
|
||||
email: "taro.yamada@example.com",
|
||||
address: {
|
||||
postcode: "100-0001",
|
||||
prefectureJa: "\\u6771\\u4EAC\\u90FD",
|
||||
cityJa: "\\u5343\\u4EE3\\u7530\\u533A",
|
||||
townJa: "\\u5343\\u4EE3\\u7530",
|
||||
streetAddress: "1-1-1",
|
||||
buildingName: "\\u30D1\\u30EC\\u30B9\\u30D3\\u30EB",
|
||||
roomNumber: "101"
|
||||
}
|
||||
}
|
||||
}`,...(d=(n=e.parameters)==null?void 0:n.docs)==null?void 0:d.source}}};var c,i,u;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:`{
|
||||
args: {
|
||||
firstName: "Jane",
|
||||
lastName: "Smith",
|
||||
email: "jane.smith@example.com",
|
||||
address: null
|
||||
}
|
||||
}`,...(u=(i=r.parameters)==null?void 0:i.docs)==null?void 0:u.source}}};const g=["Default","WithAddress","WithoutAddress"];export{a as Default,e as WithAddress,r as WithoutAddress,g as __namedExportsOrder,f as default};
|
||||
@ -0,0 +1 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{F as c}from"./CheckCircleIcon-Dva35lTP.js";import"./index-JhL3uwfD.js";function o(){return e.jsxs("div",{className:"bg-card text-card-foreground rounded-2xl shadow-[var(--cp-card-shadow)] border border-border overflow-hidden",children:[e.jsx("div",{className:"px-6 py-4 border-b border-border",children:e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Account Status"})}),e.jsx("div",{className:"p-6",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(c,{className:"h-8 w-8 text-success"}),e.jsxs("div",{className:"ml-3",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Account Active"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"All systems operational"})]})]})})]})}o.__docgenInfo={description:"",methods:[],displayName:"AccountStatusCard"};const m={title:"Features/Dashboard/AccountStatusCard",component:o,parameters:{layout:"centered"},decorators:[d=>e.jsx("div",{style:{width:400},children:e.jsx(d,{})})]},r={};var s,t,a;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:"{}",...(a=(t=r.parameters)==null?void 0:t.docs)==null?void 0:a.source}}};const u=["Default"];export{r as Default,u as __namedExportsOrder,m as default};
|
||||
@ -0,0 +1 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{C as l}from"./CardPricing-FcGNWupq.js";const m=[{type:"Immediate",title:"Immediate Activation",description:"Activate as soon as your SIM arrives and is set up."},{type:"Scheduled",title:"Scheduled Activation",description:"Pick a go-live date within the next 30 days."}];function u({activationType:d,onActivationTypeChange:s,scheduledActivationDate:o,onScheduledActivationDateChange:c,errors:r,activationFee:n}){return e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:m.map(t=>{const i=d===t.type;return e.jsxs("label",{className:`p-6 rounded-xl border text-left transition-shadow duration-[var(--cp-duration-normal)] focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-within:ring-offset-background cursor-pointer flex flex-col gap-3 ${i?"border-primary bg-primary-soft shadow-[var(--cp-shadow-2)]":"border-border hover:bg-muted shadow-[var(--cp-shadow-1)] hover:shadow-[var(--cp-shadow-2)]"}`,children:[e.jsx("input",{type:"radio",name:"activationType",value:t.type,checked:i,onChange:a=>s(a.target.value),className:"sr-only"}),e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("h4",{className:"text-lg font-semibold text-foreground leading-tight",children:t.title})}),e.jsx("div",{className:`w-5 h-5 rounded-full border-2 flex items-center justify-center flex-shrink-0 ${i?"bg-primary border-primary":"border-border bg-card"}`,"aria-hidden":"true",children:i&&e.jsx("div",{className:"w-2 h-2 bg-primary-foreground rounded-full"})})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),n?e.jsx("div",{className:"pt-3 border-t border-border",children:e.jsx(l,{alignment:"left",size:"md",oneTimePrice:n.amount})}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"Activation fee shown at checkout"}),t.type==="Scheduled"&&e.jsx("div",{className:`overflow-hidden transition-[max-height,opacity] duration-300 ease-out ${i?"max-h-[260px] opacity-100":"max-h-0 opacity-0"}`,"aria-hidden":!i,children:e.jsxs("div",{className:"mt-3",children:[e.jsx("label",{htmlFor:"scheduledActivationDate",className:"block text-sm font-medium text-muted-foreground mb-1",children:"Preferred activation date *"}),e.jsx("input",{type:"date",id:"scheduledActivationDate",value:o,onChange:a=>c(a.target.value),min:new Date().toISOString().split("T")[0],max:new Date(Date.now()+720*60*60*1e3).toISOString().split("T")[0],className:"w-full px-3 py-2 border border-input rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-ring transition-colors"}),r.scheduledActivationDate&&e.jsx("p",{className:"text-danger text-sm mt-1",children:r.scheduledActivationDate}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Weekend or holiday requests may be processed on the next business day."})]})})]},t.type)})})}u.__docgenInfo={description:"",methods:[],displayName:"ActivationForm",props:{activationType:{required:!0,tsType:{name:"union",raw:'"Immediate" | "Scheduled"',elements:[{name:"literal",value:'"Immediate"'},{name:"literal",value:'"Scheduled"'}]},description:""},onActivationTypeChange:{required:!0,tsType:{name:"signature",type:"function",raw:'(type: "Immediate" | "Scheduled") => void',signature:{arguments:[{type:{name:"union",raw:'"Immediate" | "Scheduled"',elements:[{name:"literal",value:'"Immediate"'},{name:"literal",value:'"Scheduled"'}]},name:"type"}],return:{name:"void"}}},description:""},scheduledActivationDate:{required:!0,tsType:{name:"string"},description:""},onScheduledActivationDateChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(date: string) => void",signature:{arguments:[{type:{name:"string"},name:"date"}],return:{name:"void"}}},description:""},errors:{required:!0,tsType:{name:"Record",elements:[{name:"string"},{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]}],raw:"Record<string, string | undefined>"},description:""},activationFee:{required:!1,tsType:{name:"union",raw:"ActivationFeeDetails | undefined",elements:[{name:"ActivationFeeDetails"},{name:"undefined"}]},description:""}}};export{u as A};
|
||||
@ -0,0 +1,39 @@
|
||||
import{A}from"./ActivationForm-B27tsgwI.js";import"./jsx-runtime-D_zvdyIk.js";import"./CardPricing-FcGNWupq.js";import"./CurrencyYenIcon-Bf5bmWZc.js";import"./index-JhL3uwfD.js";const T={title:"Features/Services/SIM/ActivationForm",component:A,parameters:{layout:"centered"}},e={args:{activationType:"Immediate",onActivationTypeChange:()=>{},scheduledActivationDate:"",onScheduledActivationDateChange:()=>{},errors:{}}},a={args:{activationType:"Scheduled",onActivationTypeChange:()=>{},scheduledActivationDate:"2026-04-01",onScheduledActivationDateChange:()=>{},errors:{}}},t={args:{activationType:"Immediate",onActivationTypeChange:()=>{},scheduledActivationDate:"",onScheduledActivationDateChange:()=>{},errors:{},activationFee:{name:"Activation Fee",amount:1500}}},n={args:{activationType:"Scheduled",onActivationTypeChange:()=>{},scheduledActivationDate:"",onScheduledActivationDateChange:()=>{},errors:{scheduledActivationDate:"Please select a valid date"}}};var o,i,r;e.parameters={...e.parameters,docs:{...(o=e.parameters)==null?void 0:o.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activationType: "Immediate",
|
||||
onActivationTypeChange: () => {},
|
||||
scheduledActivationDate: "",
|
||||
onScheduledActivationDateChange: () => {},
|
||||
errors: {}
|
||||
}
|
||||
}`,...(r=(i=e.parameters)==null?void 0:i.docs)==null?void 0:r.source}}};var c,s,d;a.parameters={...a.parameters,docs:{...(c=a.parameters)==null?void 0:c.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activationType: "Scheduled",
|
||||
onActivationTypeChange: () => {},
|
||||
scheduledActivationDate: "2026-04-01",
|
||||
onScheduledActivationDateChange: () => {},
|
||||
errors: {}
|
||||
}
|
||||
}`,...(d=(s=a.parameters)==null?void 0:s.docs)==null?void 0:d.source}}};var v,h,m;t.parameters={...t.parameters,docs:{...(v=t.parameters)==null?void 0:v.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activationType: "Immediate",
|
||||
onActivationTypeChange: () => {},
|
||||
scheduledActivationDate: "",
|
||||
onScheduledActivationDateChange: () => {},
|
||||
errors: {},
|
||||
activationFee: {
|
||||
name: "Activation Fee",
|
||||
amount: 1500
|
||||
}
|
||||
}
|
||||
}`,...(m=(h=t.parameters)==null?void 0:h.docs)==null?void 0:m.source}}};var p,u,l;n.parameters={...n.parameters,docs:{...(p=n.parameters)==null?void 0:p.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activationType: "Scheduled",
|
||||
onActivationTypeChange: () => {},
|
||||
scheduledActivationDate: "",
|
||||
onScheduledActivationDateChange: () => {},
|
||||
errors: {
|
||||
scheduledActivationDate: "Please select a valid date"
|
||||
}
|
||||
}
|
||||
}`,...(l=(u=n.parameters)==null?void 0:u.docs)==null?void 0:l.source}}};const F=["Immediate","Scheduled","WithActivationFee","WithDateError"];export{e as Immediate,a as Scheduled,t as WithActivationFee,n as WithDateError,F as __namedExportsOrder,T as default};
|
||||
@ -0,0 +1 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import"./DataTable-COYdcx41.js";import"./FormField-C0UylACv.js";import"./OtpInput-6kd_2E0v.js";import"./OtpExpiryDisplay-BGgB7Tk6.js";import"./SearchFilterBar-Ds19v0-P.js";import"./PaginationBar-D_k7ztRb.js";import"./DetailHeader-C0ZsoM39.js";import"./AlertBanner-Bnlyj1xc.js";import"./skeleton-ISCbfaf8.js";import"./loading-card-BIOTKPal.js";import"./error-state-BSicqqE6.js";import"./index-BKyvj4H5.js";import"./SectionHeader-Bo81Whai.js";import"./ProgressSteps-weVdXcqu.js";import"./SubCard-1OZIPgEM.js";import{A as d}from"./AnimatedCard-DFAiX4zP.js";import"./ServiceCard-BJEHFLba.js";import"./SummaryStats-D6b7Am-p.js";import"./FilterDropdown-CUU04WmN.js";import"./ClearFiltersButton-CPCoyXk2.js";import"./DetailStatsGrid-CDkKTM-B.js";import"./SectionCard-BcUjc-7N.js";import"./MetricCard-BR1xVIXz.js";import"./BackLink-C5IY6wzy.js";import"./status-badge-5pzxe45J.js";import"./error-boundary-DIRO_cDI.js";import"./error-fallbacks-kSPsNxmV.js";import{B as r}from"./button-C8_cybvS.js";import"./input-BbGJiz0K.js";import"./password-input-D4khGh8v.js";import"./checkbox-DahUyQbt.js";import"./label-C25VH7yk.js";import"./error-message-DeFFz6H_.js";import"./status-pill-wWp9xkwA.js";import"./badge-BdMsasyi.js";import"./spinner-mU4XywER.js";import"./loading-overlay-DMJTiFny.js";import"./empty-state-DRUGJ9ip.js";import"./inline-toast-DQJ-O9wc.js";import"./logo-f0fprTjz.js";import{S as u}from"./step-header-C0A-1Uoh.js";import"./status-indicator-C7K_QPts.js";import"./view-toggle-ja_vihxz.js";import"./animated-container-DyAZ9gmw.js";import{A as c}from"./ActivationForm-B27tsgwI.js";import{F as l}from"./ArrowLeftIcon-Cw1eswTb.js";import{F as v}from"./ArrowRightIcon--Vuz7Q7x.js";function f({activationType:t,setActivationType:n,scheduledActivationDate:i,setScheduledActivationDate:o,activationFee:a,onNext:m,onBack:p}){const s=()=>{t==="Scheduled"&&!i||m()};return e.jsxs(d,{variant:"static",className:"p-8 transition-all duration-500 ease-in-out transform opacity-100 translate-y-0",children:[e.jsx("div",{className:"mb-6",children:e.jsx(u,{stepNumber:2,title:"Activation",description:"Choose when to start your service"})}),e.jsx(c,{activationType:t||"Immediate",onActivationTypeChange:n,scheduledActivationDate:i,onScheduledActivationDateChange:o,errors:{},activationFee:a}),e.jsxs("div",{className:"flex justify-between mt-6",children:[e.jsx(r,{onClick:p,variant:"outline",leftIcon:e.jsx(l,{className:"w-4 h-4"}),children:"Back to SIM Type"}),e.jsx(r,{onClick:s,rightIcon:e.jsx(v,{className:"w-4 h-4"}),children:"Continue to Add-ons"})]})]})}f.__docgenInfo={description:"",methods:[],displayName:"ActivationStep",props:{onNext:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},onBack:{required:!1,tsType:{name:"union",raw:"(() => void) | undefined",elements:[{name:"unknown"},{name:"undefined"}]},description:""},activationType:{required:!0,tsType:{name:"union",raw:'"Immediate" | "Scheduled" | ""',elements:[{name:"literal",value:'"Immediate"'},{name:"literal",value:'"Scheduled"'},{name:"literal",value:'""'}]},description:""},setActivationType:{required:!0,tsType:{name:"signature",type:"function",raw:'(type: "Immediate" | "Scheduled") => void',signature:{arguments:[{type:{name:"union",raw:'"Immediate" | "Scheduled"',elements:[{name:"literal",value:'"Immediate"'},{name:"literal",value:'"Scheduled"'}]},name:"type"}],return:{name:"void"}}},description:""},scheduledActivationDate:{required:!0,tsType:{name:"string"},description:""},setScheduledActivationDate:{required:!0,tsType:{name:"signature",type:"function",raw:"(date: string) => void",signature:{arguments:[{type:{name:"string"},name:"date"}],return:{name:"void"}}},description:""},activationFee:{required:!1,tsType:{name:"union",raw:"ActivationFeeDetails | undefined",elements:[{name:"ActivationFeeDetails"},{name:"undefined"}]},description:""}}};export{f as A};
|
||||
@ -0,0 +1,41 @@
|
||||
import{A as S}from"./ActivationStep-DEd_rSq5.js";import"./jsx-runtime-D_zvdyIk.js";import"./DataTable-COYdcx41.js";import"./empty-state-DRUGJ9ip.js";import"./button-C8_cybvS.js";import"./index-JhL3uwfD.js";import"./next-link-BmD4fPSy.js";import"./index-DXhM58Yq.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./spinner-mU4XywER.js";import"./PlusIcon-DGufmf06.js";import"./ChevronRightIcon-CMQWsJeW.js";import"./FormField-C0UylACv.js";import"./label-C25VH7yk.js";import"./input-BbGJiz0K.js";import"./error-message-DeFFz6H_.js";import"./ExclamationCircleIcon-jFfW0Ax_.js";import"./OtpInput-6kd_2E0v.js";import"./input-otp-Cin9-T84.js";import"./createLucideIcon-CctB0W3q.js";import"./OtpExpiryDisplay-BGgB7Tk6.js";import"./clock-C92s7kSC.js";import"./SearchFilterBar-Ds19v0-P.js";import"./FunnelIcon-8nhbwqu0.js";import"./XMarkIcon-Bsb1W5VN.js";import"./PaginationBar-D_k7ztRb.js";import"./DetailHeader-C0ZsoM39.js";import"./status-pill-wWp9xkwA.js";import"./AlertBanner-Bnlyj1xc.js";import"./XCircleIcon-CiVBnngB.js";import"./ExclamationTriangleIcon-Di4DJZFg.js";import"./InformationCircleIcon-Clz7d-56.js";import"./CheckCircleIcon-Dva35lTP.js";import"./skeleton-ISCbfaf8.js";import"./loading-card-BIOTKPal.js";import"./password-input-D4khGh8v.js";import"./checkbox-DahUyQbt.js";import"./badge-BdMsasyi.js";import"./loading-overlay-DMJTiFny.js";import"./error-state-BSicqqE6.js";import"./ArrowPathIcon-CZjG6RfV.js";import"./inline-toast-DQJ-O9wc.js";import"./index-CNXKWNLp.js";import"./proxy-ZkTvaR74.js";import"./logo-f0fprTjz.js";import"./next-image-69WeRggt.js";import"./step-header-C0A-1Uoh.js";import"./status-indicator-C7K_QPts.js";import"./view-toggle-ja_vihxz.js";import"./Squares2X2Icon-BMQM_Wy1.js";import"./animated-container-DyAZ9gmw.js";import"./SectionHeader-Bo81Whai.js";import"./ProgressSteps-weVdXcqu.js";import"./SubCard-1OZIPgEM.js";import"./AnimatedCard-DFAiX4zP.js";import"./ServiceCard-BJEHFLba.js";import"./arrow-right-BNMAry-H.js";import"./SummaryStats-D6b7Am-p.js";import"./FilterDropdown-CUU04WmN.js";import"./ClearFiltersButton-CPCoyXk2.js";import"./DetailStatsGrid-CDkKTM-B.js";import"./SectionCard-BcUjc-7N.js";import"./MetricCard-BR1xVIXz.js";import"./BackLink-C5IY6wzy.js";import"./ArrowLeftIcon-Cw1eswTb.js";import"./status-badge-5pzxe45J.js";import"./error-boundary-DIRO_cDI.js";import"./error-fallbacks-kSPsNxmV.js";import"./ActivationForm-B27tsgwI.js";import"./CardPricing-FcGNWupq.js";import"./CurrencyYenIcon-Bf5bmWZc.js";import"./ArrowRightIcon--Vuz7Q7x.js";const wt={title:"Features/Services/SIM/Configure/ActivationStep",component:S,parameters:{layout:"centered"}},t={args:{activationType:"",setActivationType:()=>{},scheduledActivationDate:"",setScheduledActivationDate:()=>{},onNext:()=>{},onBack:()=>{}}},e={args:{activationType:"Immediate",setActivationType:()=>{},scheduledActivationDate:"",setScheduledActivationDate:()=>{},onNext:()=>{},onBack:()=>{}}},i={args:{activationType:"Scheduled",setActivationType:()=>{},scheduledActivationDate:"2026-04-01",setScheduledActivationDate:()=>{},onNext:()=>{},onBack:()=>{}}},o={args:{activationType:"Immediate",setActivationType:()=>{},scheduledActivationDate:"",setScheduledActivationDate:()=>{},activationFee:{name:"Activation Fee",amount:1500},onNext:()=>{},onBack:()=>{}}};var r,a,n;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activationType: "",
|
||||
setActivationType: () => {},
|
||||
scheduledActivationDate: "",
|
||||
setScheduledActivationDate: () => {},
|
||||
onNext: () => {},
|
||||
onBack: () => {}
|
||||
}
|
||||
}`,...(n=(a=t.parameters)==null?void 0:a.docs)==null?void 0:n.source}}};var p,m,c;e.parameters={...e.parameters,docs:{...(p=e.parameters)==null?void 0:p.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activationType: "Immediate",
|
||||
setActivationType: () => {},
|
||||
scheduledActivationDate: "",
|
||||
setScheduledActivationDate: () => {},
|
||||
onNext: () => {},
|
||||
onBack: () => {}
|
||||
}
|
||||
}`,...(c=(m=e.parameters)==null?void 0:m.docs)==null?void 0:c.source}}};var s,d,v;i.parameters={...i.parameters,docs:{...(s=i.parameters)==null?void 0:s.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activationType: "Scheduled",
|
||||
setActivationType: () => {},
|
||||
scheduledActivationDate: "2026-04-01",
|
||||
setScheduledActivationDate: () => {},
|
||||
onNext: () => {},
|
||||
onBack: () => {}
|
||||
}
|
||||
}`,...(v=(d=i.parameters)==null?void 0:d.docs)==null?void 0:v.source}}};var u,l,A;o.parameters={...o.parameters,docs:{...(u=o.parameters)==null?void 0:u.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activationType: "Immediate",
|
||||
setActivationType: () => {},
|
||||
scheduledActivationDate: "",
|
||||
setScheduledActivationDate: () => {},
|
||||
activationFee: {
|
||||
name: "Activation Fee",
|
||||
amount: 1500
|
||||
},
|
||||
onNext: () => {},
|
||||
onBack: () => {}
|
||||
}
|
||||
}`,...(A=(l=o.parameters)==null?void 0:l.docs)==null?void 0:A.source}}};const zt=["Default","ImmediateSelected","ScheduledSelected","WithActivationFee"];export{t as Default,e as ImmediateSelected,i as ScheduledSelected,o as WithActivationFee,zt as __namedExportsOrder,wt as default};
|
||||
@ -0,0 +1,63 @@
|
||||
import{j as t}from"./jsx-runtime-D_zvdyIk.js";import{r as o}from"./index-JhL3uwfD.js";import{D as C}from"./DashboardActivityItem-bwWapT3F.js";import{i as k,c as E,d as M}from"./date-Csq1SWDU.js";import"./index-BKyvj4H5.js";import{fn as P}from"./index-B9TJ7cVi.js";import"./schema-DP3xEsUJ.js";import"./constants-Cd_qStHG.js";import"./coerce-BirWdn0y.js";import"./schema-B8i337wU.js";import"./schema-Dok_SHcO.js";import"./schema-B7GuHPAW.js";import"./currency-CYvr7ZUf.js";import"./CheckCircleIcon-Dva35lTP.js";import"./ChatBubbleLeftRightIcon-DfYi9O0H.js";import"./ServerIcon-Cf--50di.js";import"./DocumentTextIcon-Dk_xQMYi.js";import"./ExclamationTriangleIcon-Di4DJZFg.js";import"./date-CJlSVdaN.js";function L({title:e,titleId:i,...n},a){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":i},n),e?o.createElement("title",{id:i},e):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 18 9 11.25l4.306 4.306a11.95 11.95 0 0 1 5.814-5.518l2.74-1.22m0 0-5.94-2.281m5.94 2.28-2.28 5.941"}))}const O=o.forwardRef(L);function Y(e){return E(e)?"Today":M(e)?"Yesterday":e.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function z(e){const i=[];for(const n of e){const a=new Date(n.date),r=i.find(s=>k(s.date,a));r?r.activities.push(n):i.push({label:Y(a),date:a,activities:[n]})}return i.sort((n,a)=>a.date.getTime()-n.date.getTime())}function j({activities:e,onItemClick:i,maxItems:n=10}){const a=o.useMemo(()=>{const r=e.slice(0,n);return z(r)},[e,n]);return e.length===0?t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"w-12 h-12 rounded-xl bg-muted/50 flex items-center justify-center mx-auto mb-3",children:t.jsx(O,{className:"h-6 w-6 text-muted-foreground/40"})}),t.jsx("h3",{className:"text-sm font-medium text-foreground",children:"No recent activity"}),t.jsx("p",{className:"mt-1 text-sm text-muted-foreground max-w-xs mx-auto",children:"Your account activity will appear here once you start using our services."})]}):t.jsx("div",{className:"space-y-6",children:a.map(r=>t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:r.label}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),t.jsx("div",{className:"space-y-0",children:r.activities.map((s,A)=>{const N=s.type==="invoice_created"||s.type==="invoice_paid",T=A===r.activities.length-1;return t.jsx(C,{activity:s,onClick:N&&i?()=>i(s):void 0,showConnector:!T},s.id)})})]},r.label))})}j.__docgenInfo={description:"",methods:[],displayName:"ActivityTimeline",props:{activities:{required:!0,tsType:{name:"Array",elements:[{name:"z.infer",elements:[{name:"activitySchema"}],raw:"z.infer<typeof activitySchema>"}],raw:"Activity[]"},description:""},onItemClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(activity: Activity) => void",signature:{arguments:[{type:{name:"z.infer",elements:[{name:"activitySchema"}],raw:"z.infer<typeof activitySchema>"},name:"activity"}],return:{name:"void"}}},description:""},maxItems:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"10",computed:!1}}}};const l=new Date().toISOString(),F=new Date(Date.now()-864e5).toISOString(),u=new Date(Date.now()-2*864e5).toISOString(),re={title:"Features/Dashboard/ActivityTimeline",component:j,parameters:{layout:"centered"},decorators:[e=>t.jsx("div",{style:{width:560},children:t.jsx(e,{})})]},c={args:{activities:[{id:"act-1",type:"invoice_created",title:"Invoice #1042 created",description:"Monthly internet service",date:l},{id:"act-2",type:"invoice_paid",title:"Invoice #1041 paid",description:"Payment of 5,980 JPY received",date:l},{id:"act-3",type:"service_activated",title:"Fiber 100Mbps activated",description:"Internet service is now active",date:F},{id:"act-4",type:"case_created",title:"Support case opened",description:"Connection issues reported",date:u},{id:"act-5",type:"case_closed",title:"Support case resolved",description:"Connection issue has been fixed",date:u}],onItemClick:P()}},d={args:{activities:[]}},m={args:{activities:[{id:"act-1",type:"invoice_paid",title:"Invoice #1041 paid",description:"Payment of 5,980 JPY received",date:l}]}},p={args:{activities:Array.from({length:20},(e,i)=>({id:`act-${i}`,type:"invoice_created",title:`Invoice #${1e3+i} created`,description:"Monthly service charge",date:new Date(Date.now()-i*864e5).toISOString()})),maxItems:5}};var v,y,f;c.parameters={...c.parameters,docs:{...(v=c.parameters)==null?void 0:v.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activities: [{
|
||||
id: "act-1",
|
||||
type: "invoice_created",
|
||||
title: "Invoice #1042 created",
|
||||
description: "Monthly internet service",
|
||||
date: today
|
||||
}, {
|
||||
id: "act-2",
|
||||
type: "invoice_paid",
|
||||
title: "Invoice #1041 paid",
|
||||
description: "Payment of 5,980 JPY received",
|
||||
date: today
|
||||
}, {
|
||||
id: "act-3",
|
||||
type: "service_activated",
|
||||
title: "Fiber 100Mbps activated",
|
||||
description: "Internet service is now active",
|
||||
date: yesterday
|
||||
}, {
|
||||
id: "act-4",
|
||||
type: "case_created",
|
||||
title: "Support case opened",
|
||||
description: "Connection issues reported",
|
||||
date: twoDaysAgo
|
||||
}, {
|
||||
id: "act-5",
|
||||
type: "case_closed",
|
||||
title: "Support case resolved",
|
||||
description: "Connection issue has been fixed",
|
||||
date: twoDaysAgo
|
||||
}],
|
||||
onItemClick: fn()
|
||||
}
|
||||
}`,...(f=(y=c.parameters)==null?void 0:y.docs)==null?void 0:f.source}}};var g,h,x;d.parameters={...d.parameters,docs:{...(g=d.parameters)==null?void 0:g.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activities: []
|
||||
}
|
||||
}`,...(x=(h=d.parameters)==null?void 0:h.docs)==null?void 0:x.source}}};var w,S,I;m.parameters={...m.parameters,docs:{...(w=m.parameters)==null?void 0:w.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activities: [{
|
||||
id: "act-1",
|
||||
type: "invoice_paid",
|
||||
title: "Invoice #1041 paid",
|
||||
description: "Payment of 5,980 JPY received",
|
||||
date: today
|
||||
}]
|
||||
}
|
||||
}`,...(I=(S=m.parameters)==null?void 0:S.docs)==null?void 0:I.source}}};var D,b,_;p.parameters={...p.parameters,docs:{...(D=p.parameters)==null?void 0:D.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activities: Array.from({
|
||||
length: 20
|
||||
}, (_, i) => ({
|
||||
id: \`act-\${i}\`,
|
||||
type: "invoice_created" as const,
|
||||
title: \`Invoice #\${1000 + i} created\`,
|
||||
description: "Monthly service charge",
|
||||
date: new Date(Date.now() - i * 86400000).toISOString()
|
||||
})),
|
||||
maxItems: 5
|
||||
}
|
||||
}`,...(_=(b=p.parameters)==null?void 0:b.docs)==null?void 0:_.source}}};const se=["Default","Empty","SingleActivity","LimitedItems"];export{c as Default,d as Empty,p as LimitedItems,m as SingleActivity,se as __namedExportsOrder,re as default};
|
||||
13
apps/portal/public/storybook/assets/AddonGroup-BSDkN5FG.js
Normal file
13
apps/portal/public/storybook/assets/AddonGroup-BSDkN5FG.js
Normal file
@ -0,0 +1,13 @@
|
||||
import{j as n}from"./jsx-runtime-D_zvdyIk.js";import{F as c}from"./CheckCircleIcon-DrKOIitY.js";function f(e){const s=[],t=new Set,d=[...e].sort((i,a)=>(i.displayOrder??0)-(a.displayOrder??0));for(const i of d)if(!t.has(i.sku)){if(i.isBundledAddon&&i.bundledAddonId){const a=d.find(u=>u.id===i.bundledAddonId);if(a&&!t.has(a.sku)){const u=y(i,a);s.push(u),t.add(i.sku),t.add(a.sku);continue}}s.push(p(i)),t.add(i.sku)}return s}function y(e,s){const t=e.billingCycle==="Monthly"?e:s,d=e.billingCycle==="Onetime"?e:s,i=t.name.replace(/\s*(Monthly|Installation|Fee)\s*/gi,"").trim();return{id:`bundle-${e.sku}-${s.sku}`,name:i,description:`${i} (monthly service + installation)`,monthlyPrice:typeof t.monthlyPrice=="number"&&t.monthlyPrice>0?t.monthlyPrice:void 0,activationPrice:typeof d.oneTimePrice=="number"&&d.oneTimePrice>0?d.oneTimePrice:void 0,skus:[e.sku,s.sku],isBundled:!0,displayOrder:Math.min(e.displayOrder??0,s.displayOrder??0)}}function p(e){return{id:e.sku,name:e.name,description:e.description||"",monthlyPrice:typeof e.monthlyPrice=="number"&&e.monthlyPrice>0?e.monthlyPrice:void 0,activationPrice:typeof e.oneTimePrice=="number"&&e.oneTimePrice>0?e.oneTimePrice:void 0,skus:[e.sku],isBundled:!1,displayOrder:e.displayOrder??0}}function h({addons:e,selectedAddonSkus:s,onAddonToggle:t,showSkus:d=!1}){const i=s.length===0,a=f(e),u=r=>{if(r.skus.every(l=>s.includes(l)))t(s.filter(l=>!r.skus.includes(l)));else{const l=s.filter(m=>!r.skus.includes(m));t([...l,...r.skus])}};return a.length===0?n.jsx("div",{className:"text-center py-4 text-gray-500",children:n.jsx("p",{children:"No add-ons available for this plan"})}):n.jsxs("div",{className:"space-y-4",children:[a.map(r=>{const o=r.skus.every(l=>s.includes(l));return n.jsxs("label",{className:`flex items-start gap-3 p-4 rounded-lg border-2 cursor-pointer transition-all ${o?"border-green-500 bg-green-50 ring-2 ring-green-100":"border-gray-200 hover:border-gray-300"}`,children:[n.jsx("input",{type:"checkbox",checked:o,onChange:()=>u(r),className:"text-green-600 focus:ring-green-500 mt-1"}),n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"font-medium text-gray-900",children:r.name}),o&&n.jsx(c,{className:"h-5 w-5 text-green-600"})]}),n.jsx("p",{className:"text-sm text-gray-600 mt-1",children:r.description}),n.jsxs("div",{className:"flex flex-wrap gap-4 mt-2",children:[r.monthlyPrice!==void 0&&n.jsxs("span",{className:"text-sm font-semibold text-blue-600",children:["¥",r.monthlyPrice.toLocaleString(),"/month"]}),r.activationPrice!==void 0&&n.jsxs("span",{className:"text-sm font-semibold text-orange-600",children:["Activation: ¥",r.activationPrice.toLocaleString()]})]}),r.isBundled&&n.jsxs("div",{className:"text-xs text-green-600 mt-1 flex items-center gap-1",children:[n.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsx("path",{fillRule:"evenodd",d:"M3.172 5.172a4 4 0 015.656 0L10 6.343l1.172-1.171a4 4 0 115.656 5.656L10 17.657l-6.828-6.829a4 4 0 010-5.656z",clipRule:"evenodd"})}),"Bundle Package"]}),d&&n.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:["SKUs: ",r.skus.join(", ")]})]})]},r.id)}),n.jsxs("div",{"aria-hidden":!i,className:`overflow-hidden rounded-xl border border-dashed border-blue-200/70 bg-blue-50/80 px-5 transition-all duration-300 ease-out ${i?"opacity-100 translate-y-0 max-h-32 py-4":"pointer-events-none opacity-0 -translate-y-2 max-h-0 py-0"}`,children:[n.jsx("p",{className:"text-sm font-medium text-blue-800",children:"No add-ons selected"}),n.jsx("p",{className:"text-xs text-blue-700/80 mt-1",children:"Pick optional services now or continue without extras—add them later anytime."})]})]})}h.__docgenInfo={description:"",methods:[],displayName:"AddonGroup",props:{addons:{required:!0,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:`{
|
||||
id: string;
|
||||
sku: string;
|
||||
name: string;
|
||||
description?: string | undefined;
|
||||
displayOrder?: number | undefined;
|
||||
billingCycle?: string | undefined;
|
||||
monthlyPrice?: number | undefined;
|
||||
oneTimePrice?: number | undefined;
|
||||
unitPrice?: number | undefined;
|
||||
bundledAddonId?: string | undefined;
|
||||
isBundledAddon?: boolean | undefined;
|
||||
}`,signature:{properties:[{key:"id",value:{name:"string",required:!0}},{key:"sku",value:{name:"string",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"description",value:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}],required:!1}},{key:"displayOrder",value:{name:"union",raw:"number | undefined",elements:[{name:"number"},{name:"undefined"}],required:!1}},{key:"billingCycle",value:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}],required:!1}},{key:"monthlyPrice",value:{name:"union",raw:"number | undefined",elements:[{name:"number"},{name:"undefined"}],required:!1}},{key:"oneTimePrice",value:{name:"union",raw:"number | undefined",elements:[{name:"number"},{name:"undefined"}],required:!1}},{key:"unitPrice",value:{name:"union",raw:"number | undefined",elements:[{name:"number"},{name:"undefined"}],required:!1}},{key:"bundledAddonId",value:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}],required:!1}},{key:"isBundledAddon",value:{name:"union",raw:"boolean | undefined",elements:[{name:"boolean"},{name:"undefined"}],required:!1}}]}}],raw:"AddonItem[]"},description:""},selectedAddonSkus:{required:!0,tsType:{name:"Array",elements:[{name:"string"}],raw:"string[]"},description:""},onAddonToggle:{required:!0,tsType:{name:"signature",type:"function",raw:"(skus: string[]) => void",signature:{arguments:[{type:{name:"Array",elements:[{name:"string"}],raw:"string[]"},name:"skus"}],return:{name:"void"}}},description:""},showSkus:{required:!1,tsType:{name:"union",raw:"boolean | undefined",elements:[{name:"boolean"},{name:"undefined"}]},description:"",defaultValue:{value:"false",computed:!1}}}};export{h as A};
|
||||
@ -0,0 +1,32 @@
|
||||
import{A as k}from"./AddonGroup-BSDkN5FG.js";import"./jsx-runtime-D_zvdyIk.js";import"./CheckCircleIcon-DrKOIitY.js";import"./index-JhL3uwfD.js";const b={title:"Features/Services/Base/AddonGroup",component:k,parameters:{layout:"centered"}},r=[{id:"addon-1",sku:"ADDON-WIFI",name:"Wi-Fi Router Rental",description:"High-speed Wi-Fi router included",displayOrder:1,billingCycle:"Monthly",monthlyPrice:500,oneTimePrice:0},{id:"addon-2",sku:"ADDON-STATIC-IP",name:"Static IP Address",description:"Dedicated static IP for your connection",displayOrder:2,billingCycle:"Monthly",monthlyPrice:1e3,oneTimePrice:0},{id:"addon-3",sku:"ADDON-SECURITY",name:"Security Suite",description:"Antivirus and firewall protection",displayOrder:3,billingCycle:"Monthly",monthlyPrice:300,oneTimePrice:0}],O=[{id:"addon-4",sku:"ADDON-TV-MONTHLY",name:"TV Service Monthly",description:"Streaming TV package",displayOrder:1,billingCycle:"Monthly",monthlyPrice:800,oneTimePrice:0,isBundledAddon:!0,bundledAddonId:"addon-5"},{id:"addon-5",sku:"ADDON-TV-INSTALL",name:"TV Service Installation Fee",description:"One-time setup fee",displayOrder:2,billingCycle:"Onetime",monthlyPrice:0,oneTimePrice:3e3,isBundledAddon:!0,bundledAddonId:"addon-4"}],e={args:{addons:r,selectedAddonSkus:[],onAddonToggle:()=>{}}},d={args:{addons:r,selectedAddonSkus:["ADDON-WIFI","ADDON-SECURITY"],onAddonToggle:()=>{}}},n={args:{addons:[...r,...O],selectedAddonSkus:[],onAddonToggle:()=>{}}},o={args:{addons:r,selectedAddonSkus:["ADDON-WIFI"],onAddonToggle:()=>{},showSkus:!0}},s={args:{addons:[],selectedAddonSkus:[],onAddonToggle:()=>{}}};var a,t,i;e.parameters={...e.parameters,docs:{...(a=e.parameters)==null?void 0:a.docs,source:{originalSource:`{
|
||||
args: {
|
||||
addons: sampleAddons,
|
||||
selectedAddonSkus: [],
|
||||
onAddonToggle: () => {}
|
||||
}
|
||||
}`,...(i=(t=e.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};var c,l,u;d.parameters={...d.parameters,docs:{...(c=d.parameters)==null?void 0:c.docs,source:{originalSource:`{
|
||||
args: {
|
||||
addons: sampleAddons,
|
||||
selectedAddonSkus: ["ADDON-WIFI", "ADDON-SECURITY"],
|
||||
onAddonToggle: () => {}
|
||||
}
|
||||
}`,...(u=(l=d.parameters)==null?void 0:l.docs)==null?void 0:u.source}}};var m,A,p;n.parameters={...n.parameters,docs:{...(m=n.parameters)==null?void 0:m.docs,source:{originalSource:`{
|
||||
args: {
|
||||
addons: [...sampleAddons, ...bundledAddons],
|
||||
selectedAddonSkus: [],
|
||||
onAddonToggle: () => {}
|
||||
}
|
||||
}`,...(p=(A=n.parameters)==null?void 0:A.docs)==null?void 0:p.source}}};var g,S,T;o.parameters={...o.parameters,docs:{...(g=o.parameters)==null?void 0:g.docs,source:{originalSource:`{
|
||||
args: {
|
||||
addons: sampleAddons,
|
||||
selectedAddonSkus: ["ADDON-WIFI"],
|
||||
onAddonToggle: () => {},
|
||||
showSkus: true
|
||||
}
|
||||
}`,...(T=(S=o.parameters)==null?void 0:S.docs)==null?void 0:T.source}}};var y,D,I;s.parameters={...s.parameters,docs:{...(y=s.parameters)==null?void 0:y.docs,source:{originalSource:`{
|
||||
args: {
|
||||
addons: [],
|
||||
selectedAddonSkus: [],
|
||||
onAddonToggle: () => {}
|
||||
}
|
||||
}`,...(I=(D=s.parameters)==null?void 0:D.docs)==null?void 0:I.source}}};const C=["Default","WithSelection","WithBundledAddons","WithSkus","EmptyAddons"];export{e as Default,s as EmptyAddons,n as WithBundledAddons,d as WithSelection,o as WithSkus,C as __namedExportsOrder,b as default};
|
||||
@ -0,0 +1 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import"./DataTable-COYdcx41.js";import"./FormField-C0UylACv.js";import"./OtpInput-6kd_2E0v.js";import"./OtpExpiryDisplay-BGgB7Tk6.js";import"./SearchFilterBar-Ds19v0-P.js";import"./PaginationBar-D_k7ztRb.js";import"./DetailHeader-C0ZsoM39.js";import"./AlertBanner-Bnlyj1xc.js";import"./skeleton-ISCbfaf8.js";import"./loading-card-BIOTKPal.js";import"./error-state-BSicqqE6.js";import"./index-BKyvj4H5.js";import"./SectionHeader-Bo81Whai.js";import"./ProgressSteps-weVdXcqu.js";import"./SubCard-1OZIPgEM.js";import{A as m}from"./AnimatedCard-DFAiX4zP.js";import"./ServiceCard-BJEHFLba.js";import"./SummaryStats-D6b7Am-p.js";import"./FilterDropdown-CUU04WmN.js";import"./ClearFiltersButton-CPCoyXk2.js";import"./DetailStatsGrid-CDkKTM-B.js";import"./SectionCard-BcUjc-7N.js";import"./MetricCard-BR1xVIXz.js";import"./BackLink-C5IY6wzy.js";import"./status-badge-5pzxe45J.js";import"./error-boundary-DIRO_cDI.js";import"./error-fallbacks-kSPsNxmV.js";import{B as t}from"./button-C8_cybvS.js";import"./input-BbGJiz0K.js";import"./password-input-D4khGh8v.js";import"./checkbox-DahUyQbt.js";import"./label-C25VH7yk.js";import"./error-message-DeFFz6H_.js";import"./status-pill-wWp9xkwA.js";import"./badge-BdMsasyi.js";import"./spinner-mU4XywER.js";import"./loading-overlay-DMJTiFny.js";import"./empty-state-DRUGJ9ip.js";import"./inline-toast-DQJ-O9wc.js";import"./logo-f0fprTjz.js";import{S as p}from"./step-header-C0A-1Uoh.js";import"./status-indicator-C7K_QPts.js";import"./view-toggle-ja_vihxz.js";import"./animated-container-DyAZ9gmw.js";import{A as d}from"./AddonGroup-BSDkN5FG.js";import{F as l}from"./ArrowLeftIcon-Cw1eswTb.js";import{F as c}from"./ArrowRightIcon--Vuz7Q7x.js";function u({addons:r,selectedAddons:i,setSelectedAddons:o,planType:n,onNext:a,onBack:s}){return e.jsxs(m,{variant:"static",className:"p-8 transition-all duration-500 ease-in-out transform opacity-100 translate-y-0",children:[e.jsx("div",{className:"mb-6",children:e.jsx(p,{stepNumber:3,title:"Add-ons",description:"Optional services to enhance your experience"})}),r.length>0?e.jsx(d,{addons:r,selectedAddonSkus:i,onAddonToggle:o,showSkus:!1}):e.jsx("div",{className:"text-center py-8",children:e.jsx("p",{className:"text-muted-foreground",children:n==="DataOnly"?"No add-ons are available for data-only plans.":"No add-ons are available for this plan."})}),e.jsxs("div",{className:"flex justify-between mt-6",children:[e.jsx(t,{onClick:s,variant:"outline",leftIcon:e.jsx(l,{className:"w-4 h-4"}),children:"Back to Activation"}),e.jsx(t,{onClick:a,rightIcon:e.jsx(c,{className:"w-4 h-4"}),children:"Continue to Number Porting"})]})]})}u.__docgenInfo={description:"",methods:[],displayName:"AddonsStep",props:{onNext:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},onBack:{required:!1,tsType:{name:"union",raw:"(() => void) | undefined",elements:[{name:"unknown"},{name:"undefined"}]},description:""},addons:{required:!0,tsType:{name:"Array",elements:[{name:"z.infer",elements:[{name:"simCatalogProductSchema"}],raw:"z.infer<typeof simCatalogProductSchema>"}],raw:"SimCatalogProduct[]"},description:""},selectedAddons:{required:!0,tsType:{name:"Array",elements:[{name:"string"}],raw:"string[]"},description:""},setSelectedAddons:{required:!0,tsType:{name:"signature",type:"function",raw:"(addons: string[]) => void",signature:{arguments:[{type:{name:"Array",elements:[{name:"string"}],raw:"string[]"},name:"addons"}],return:{name:"void"}}},description:""},planType:{required:!0,tsType:{name:"string"},description:""}}};export{u as A};
|
||||
@ -0,0 +1,37 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{B as a}from"./button-C8_cybvS.js";import"./input-BbGJiz0K.js";import"./password-input-D4khGh8v.js";import"./checkbox-DahUyQbt.js";import"./label-C25VH7yk.js";import"./error-message-DeFFz6H_.js";import"./status-pill-wWp9xkwA.js";import"./badge-BdMsasyi.js";import"./spinner-mU4XywER.js";import"./loading-overlay-DMJTiFny.js";import"./error-state-BSicqqE6.js";import"./empty-state-DRUGJ9ip.js";import"./inline-toast-DQJ-O9wc.js";import"./skeleton-ISCbfaf8.js";import"./loading-card-BIOTKPal.js";import"./logo-f0fprTjz.js";import{S as v}from"./step-header-C0A-1Uoh.js";import"./status-indicator-C7K_QPts.js";import"./view-toggle-ja_vihxz.js";import"./animated-container-DyAZ9gmw.js";import{A as D}from"./AddonGroup-BSDkN5FG.js";import{F as O}from"./ArrowLeftIcon-Cw1eswTb.js";import{F as P}from"./ArrowRightIcon--Vuz7Q7x.js";import"./index-JhL3uwfD.js";import"./next-link-BmD4fPSy.js";import"./index-DXhM58Yq.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./createLucideIcon-CctB0W3q.js";import"./ExclamationCircleIcon-jFfW0Ax_.js";import"./ExclamationTriangleIcon-Di4DJZFg.js";import"./ArrowPathIcon-CZjG6RfV.js";import"./PlusIcon-DGufmf06.js";import"./index-CNXKWNLp.js";import"./proxy-ZkTvaR74.js";import"./next-image-69WeRggt.js";import"./Squares2X2Icon-BMQM_Wy1.js";import"./CheckCircleIcon-DrKOIitY.js";function k({addons:f,selectedAddonSkus:S,onAddonToggle:x,isTransitioning:I,onBack:h,onNext:w}){return e.jsxs("div",{className:`bg-white rounded-2xl shadow-lg border border-gray-200/50 p-8 md:p-10 transition-all duration-150 ease-out ${I?"opacity-0 translate-y-2":"opacity-100 translate-y-0"}`,children:[e.jsx("div",{className:"mb-8",children:e.jsx(v,{stepNumber:3,title:"Add-ons",description:"Optional services to enhance your internet experience"})}),e.jsx(D,{addons:f,selectedAddonSkus:S,onAddonToggle:x,showSkus:!1}),e.jsxs("div",{className:"flex justify-between mt-8 pt-6 border-t border-gray-100",children:[e.jsx(a,{onClick:h,variant:"outline",leftIcon:e.jsx(O,{className:"w-4 h-4"}),children:"Back to Installation"}),e.jsx(a,{onClick:w,rightIcon:e.jsx(P,{className:"w-4 h-4"}),className:"min-w-[200px]",children:"Review Order"})]})]})}k.__docgenInfo={description:"",methods:[],displayName:"AddonsStep",props:{addons:{required:!0,tsType:{name:"Array",elements:[{name:"z.infer",elements:[{name:"internetAddonCatalogItemSchema"}],raw:"z.infer<typeof internetAddonCatalogItemSchema>"}],raw:"InternetAddonCatalogItem[]"},description:""},selectedAddonSkus:{required:!0,tsType:{name:"Array",elements:[{name:"string"}],raw:"string[]"},description:""},onAddonToggle:{required:!0,tsType:{name:"signature",type:"function",raw:"(newSelectedSkus: string[]) => void",signature:{arguments:[{type:{name:"Array",elements:[{name:"string"}],raw:"string[]"},name:"newSelectedSkus"}],return:{name:"void"}}},description:""},isTransitioning:{required:!0,tsType:{name:"boolean"},description:""},onBack:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},onNext:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""}}};const s=[{id:"addon-001",sku:"INT-ADDON-PHONE",name:"Hikari Denwa (IP Phone)",description:"Home phone service over fiber connection",monthlyPrice:450,oneTimePrice:1e3,displayOrder:1,catalogMetadata:{addonType:"phone"}},{id:"addon-002",sku:"INT-ADDON-EXTENDER",name:"WiFi Range Extender",description:"Extend your WiFi coverage to larger areas",monthlyPrice:300,oneTimePrice:0,displayOrder:2,catalogMetadata:{addonType:"equipment"}},{id:"addon-003",sku:"INT-ADDON-STATIC-IP",name:"Static IP Address",description:"Fixed IP address for hosting or remote access",monthlyPrice:800,oneTimePrice:0,displayOrder:3,catalogMetadata:{addonType:"network"}}],Ne={title:"Features/Services/Internet/Configure/AddonsStep",component:k,parameters:{layout:"centered"}},n={args:{addons:s,selectedAddonSkus:[],onAddonToggle:()=>{},isTransitioning:!1,onBack:()=>{},onNext:()=>{}}},o={args:{addons:s,selectedAddonSkus:["INT-ADDON-PHONE","INT-ADDON-STATIC-IP"],onAddonToggle:()=>{},isTransitioning:!1,onBack:()=>{},onNext:()=>{}}},r={args:{addons:[],selectedAddonSkus:[],onAddonToggle:()=>{},isTransitioning:!1,onBack:()=>{},onNext:()=>{}}},t={args:{addons:s,selectedAddonSkus:[],onAddonToggle:()=>{},isTransitioning:!0,onBack:()=>{},onNext:()=>{}}};var i,d,m;n.parameters={...n.parameters,docs:{...(i=n.parameters)==null?void 0:i.docs,source:{originalSource:`{
|
||||
args: {
|
||||
addons: mockAddons,
|
||||
selectedAddonSkus: [],
|
||||
onAddonToggle: () => {},
|
||||
isTransitioning: false,
|
||||
onBack: () => {},
|
||||
onNext: () => {}
|
||||
}
|
||||
}`,...(m=(d=n.parameters)==null?void 0:d.docs)==null?void 0:m.source}}};var c,p,l;o.parameters={...o.parameters,docs:{...(c=o.parameters)==null?void 0:c.docs,source:{originalSource:`{
|
||||
args: {
|
||||
addons: mockAddons,
|
||||
selectedAddonSkus: ["INT-ADDON-PHONE", "INT-ADDON-STATIC-IP"],
|
||||
onAddonToggle: () => {},
|
||||
isTransitioning: false,
|
||||
onBack: () => {},
|
||||
onNext: () => {}
|
||||
}
|
||||
}`,...(l=(p=o.parameters)==null?void 0:p.docs)==null?void 0:l.source}}};var u,g,A;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`{
|
||||
args: {
|
||||
addons: [],
|
||||
selectedAddonSkus: [],
|
||||
onAddonToggle: () => {},
|
||||
isTransitioning: false,
|
||||
onBack: () => {},
|
||||
onNext: () => {}
|
||||
}
|
||||
}`,...(A=(g=r.parameters)==null?void 0:g.docs)==null?void 0:A.source}}};var T,N,y;t.parameters={...t.parameters,docs:{...(T=t.parameters)==null?void 0:T.docs,source:{originalSource:`{
|
||||
args: {
|
||||
addons: mockAddons,
|
||||
selectedAddonSkus: [],
|
||||
onAddonToggle: () => {},
|
||||
isTransitioning: true,
|
||||
onBack: () => {},
|
||||
onNext: () => {}
|
||||
}
|
||||
}`,...(y=(N=t.parameters)==null?void 0:N.docs)==null?void 0:y.source}}};const ye=["Default","WithSelections","NoAddonsAvailable","Transitioning"];export{n as Default,r as NoAddonsAvailable,t as Transitioning,o as WithSelections,ye as __namedExportsOrder,Ne as default};
|
||||
@ -0,0 +1,28 @@
|
||||
import{A}from"./AddonsStep-BL22SA_U.js";import"./jsx-runtime-D_zvdyIk.js";import"./DataTable-COYdcx41.js";import"./empty-state-DRUGJ9ip.js";import"./button-C8_cybvS.js";import"./index-JhL3uwfD.js";import"./next-link-BmD4fPSy.js";import"./index-DXhM58Yq.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./spinner-mU4XywER.js";import"./PlusIcon-DGufmf06.js";import"./ChevronRightIcon-CMQWsJeW.js";import"./FormField-C0UylACv.js";import"./label-C25VH7yk.js";import"./input-BbGJiz0K.js";import"./error-message-DeFFz6H_.js";import"./ExclamationCircleIcon-jFfW0Ax_.js";import"./OtpInput-6kd_2E0v.js";import"./input-otp-Cin9-T84.js";import"./createLucideIcon-CctB0W3q.js";import"./OtpExpiryDisplay-BGgB7Tk6.js";import"./clock-C92s7kSC.js";import"./SearchFilterBar-Ds19v0-P.js";import"./FunnelIcon-8nhbwqu0.js";import"./XMarkIcon-Bsb1W5VN.js";import"./PaginationBar-D_k7ztRb.js";import"./DetailHeader-C0ZsoM39.js";import"./status-pill-wWp9xkwA.js";import"./AlertBanner-Bnlyj1xc.js";import"./XCircleIcon-CiVBnngB.js";import"./ExclamationTriangleIcon-Di4DJZFg.js";import"./InformationCircleIcon-Clz7d-56.js";import"./CheckCircleIcon-Dva35lTP.js";import"./skeleton-ISCbfaf8.js";import"./loading-card-BIOTKPal.js";import"./password-input-D4khGh8v.js";import"./checkbox-DahUyQbt.js";import"./badge-BdMsasyi.js";import"./loading-overlay-DMJTiFny.js";import"./error-state-BSicqqE6.js";import"./ArrowPathIcon-CZjG6RfV.js";import"./inline-toast-DQJ-O9wc.js";import"./index-CNXKWNLp.js";import"./proxy-ZkTvaR74.js";import"./logo-f0fprTjz.js";import"./next-image-69WeRggt.js";import"./step-header-C0A-1Uoh.js";import"./status-indicator-C7K_QPts.js";import"./view-toggle-ja_vihxz.js";import"./Squares2X2Icon-BMQM_Wy1.js";import"./animated-container-DyAZ9gmw.js";import"./SectionHeader-Bo81Whai.js";import"./ProgressSteps-weVdXcqu.js";import"./SubCard-1OZIPgEM.js";import"./AnimatedCard-DFAiX4zP.js";import"./ServiceCard-BJEHFLba.js";import"./arrow-right-BNMAry-H.js";import"./SummaryStats-D6b7Am-p.js";import"./FilterDropdown-CUU04WmN.js";import"./ClearFiltersButton-CPCoyXk2.js";import"./DetailStatsGrid-CDkKTM-B.js";import"./SectionCard-BcUjc-7N.js";import"./MetricCard-BR1xVIXz.js";import"./BackLink-C5IY6wzy.js";import"./ArrowLeftIcon-Cw1eswTb.js";import"./status-badge-5pzxe45J.js";import"./error-boundary-DIRO_cDI.js";import"./error-fallbacks-kSPsNxmV.js";import"./AddonGroup-BSDkN5FG.js";import"./CheckCircleIcon-DrKOIitY.js";import"./ArrowRightIcon--Vuz7Q7x.js";const Uo={title:"Features/Services/SIM/Configure/AddonsStep",component:A,parameters:{layout:"centered"}},l=[{id:"addon-1",sku:"ADDON-UNLIMITED-CALL",name:"Unlimited Domestic Calling",monthlyPrice:3e3,unitPrice:3e3,oneTimePrice:0,billingCycle:"Monthly",simDataSize:"",simPlanType:"",simHasFamilyDiscount:!1,catalogMetadata:{}},{id:"addon-2",sku:"ADDON-VOICEMAIL",name:"Voicemail",monthlyPrice:300,unitPrice:300,oneTimePrice:0,billingCycle:"Monthly",simDataSize:"",simPlanType:"",simHasFamilyDiscount:!1,catalogMetadata:{}}],o={args:{addons:l,selectedAddons:[],setSelectedAddons:()=>{},planType:"DataSmsVoice",onNext:()=>{},onBack:()=>{}}},t={args:{addons:l,selectedAddons:["ADDON-UNLIMITED-CALL"],setSelectedAddons:()=>{},planType:"DataSmsVoice",onNext:()=>{},onBack:()=>{}}},e={args:{addons:[],selectedAddons:[],setSelectedAddons:()=>{},planType:"DataOnly",onNext:()=>{},onBack:()=>{}}};var r,i,m;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`{
|
||||
args: {
|
||||
addons: mockAddons,
|
||||
selectedAddons: [],
|
||||
setSelectedAddons: () => {},
|
||||
planType: "DataSmsVoice",
|
||||
onNext: () => {},
|
||||
onBack: () => {}
|
||||
}
|
||||
}`,...(m=(i=o.parameters)==null?void 0:i.docs)==null?void 0:m.source}}};var n,a,p;t.parameters={...t.parameters,docs:{...(n=t.parameters)==null?void 0:n.docs,source:{originalSource:`{
|
||||
args: {
|
||||
addons: mockAddons,
|
||||
selectedAddons: ["ADDON-UNLIMITED-CALL"],
|
||||
setSelectedAddons: () => {},
|
||||
planType: "DataSmsVoice",
|
||||
onNext: () => {},
|
||||
onBack: () => {}
|
||||
}
|
||||
}`,...(p=(a=t.parameters)==null?void 0:a.docs)==null?void 0:p.source}}};var s,d,c;e.parameters={...e.parameters,docs:{...(s=e.parameters)==null?void 0:s.docs,source:{originalSource:`{
|
||||
args: {
|
||||
addons: [],
|
||||
selectedAddons: [],
|
||||
setSelectedAddons: () => {},
|
||||
planType: "DataOnly",
|
||||
onNext: () => {},
|
||||
onBack: () => {}
|
||||
}
|
||||
}`,...(c=(d=e.parameters)==null?void 0:d.docs)==null?void 0:c.source}}};const vo=["Default","WithSelectedAddons","NoAddonsAvailable"];export{o as Default,e as NoAddonsAvailable,t as WithSelectedAddons,vo as __namedExportsOrder,Uo as default};
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,16 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";function f({orderType:a,embedded:x,titleOverride:g}){return e.jsxs("div",{className:"p-6 bg-card border border-border rounded-lg space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-5 h-5 bg-primary/20 rounded"}),e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:g??"Service Address"}),e.jsx("span",{className:"ml-auto px-2 py-1 text-xs rounded-full bg-green-100 text-green-800",children:"Verified"})]}),e.jsxs("div",{className:"text-foreground space-y-1",children:[e.jsx("p",{className:"font-semibold",children:"2-20-9 Wakabayashi"}),e.jsx("p",{className:"text-muted-foreground",children:"Gramercy 201"}),e.jsx("p",{className:"text-muted-foreground",children:"Setagaya-ku, Tokyo 154-0023"}),e.jsx("p",{className:"text-muted-foreground",children:"Japan"})]}),e.jsxs("p",{className:"text-xs text-muted-foreground italic",children:["Order type: ",a??"N/A"," | Embedded: ",String(x??!1)]})]})}const y={title:"Features/Services/Base/AddressConfirmation",component:f,parameters:{layout:"centered"},decorators:[a=>e.jsx("div",{style:{maxWidth:500},children:e.jsx(a,{})})]},r={args:{orderType:"INTERNET",embedded:!1}},s={args:{orderType:"INTERNET",embedded:!0}},d={args:{orderType:"SIM",titleOverride:"Delivery Address"}};var t,o,n;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`{
|
||||
args: {
|
||||
orderType: "INTERNET",
|
||||
embedded: false
|
||||
}
|
||||
}`,...(n=(o=r.parameters)==null?void 0:o.docs)==null?void 0:n.source}}};var c,m,i;s.parameters={...s.parameters,docs:{...(c=s.parameters)==null?void 0:c.docs,source:{originalSource:`{
|
||||
args: {
|
||||
orderType: "INTERNET",
|
||||
embedded: true
|
||||
}
|
||||
}`,...(i=(m=s.parameters)==null?void 0:m.docs)==null?void 0:i.source}}};var l,p,u;d.parameters={...d.parameters,docs:{...(l=d.parameters)==null?void 0:l.docs,source:{originalSource:`{
|
||||
args: {
|
||||
orderType: "SIM",
|
||||
titleOverride: "Delivery Address"
|
||||
}
|
||||
}`,...(u=(p=d.parameters)==null?void 0:p.docs)==null?void 0:u.source}}};const b=["Default","Embedded","CustomTitle"];export{d as CustomTitle,r as Default,s as Embedded,b as __namedExportsOrder,y as default};
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,52 @@
|
||||
import{j as i}from"./jsx-runtime-D_zvdyIk.js";import{A as D}from"./AddressForm-CCWrICXS.js";import"./index-JhL3uwfD.js";import"./countries-CY6LSu2r.js";import"./useZodForm-ByUWfWhF.js";import"./error-handling-CCxr4Gjn.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./schema-Dok_SHcO.js";import"./ExclamationTriangleIcon-Di4DJZFg.js";const q={title:"Features/Services/Base/AddressForm",component:D,parameters:{layout:"centered"},decorators:[j=>i.jsx("div",{style:{maxWidth:600},children:i.jsx(j,{})})]},e={args:{onChange:()=>{}}},a={args:{initialAddress:{address1:"Gramercy 201",address2:"2-20-9 Wakabayashi",city:"Setagaya-ku",state:"Tokyo",postcode:"154-0023",country:"JP"},onChange:()=>{}}},r={args:{variant:"compact",onChange:()=>{}}},s={args:{variant:"inline",showTitle:!1,onChange:()=>{}}},t={args:{initialAddress:{address1:"Gramercy 201",address2:"2-20-9 Wakabayashi",city:"Setagaya-ku",state:"Tokyo",postcode:"154-0023",country:"JP"},disabled:!0,onChange:()=>{}}},n={args:{title:"Installation Address",description:"Enter the address where internet service will be installed.",onChange:()=>{}}},o={args:{showTitle:!1,onChange:()=>{}}};var d,c,m;e.parameters={...e.parameters,docs:{...(d=e.parameters)==null?void 0:d.docs,source:{originalSource:`{
|
||||
args: {
|
||||
onChange: () => {}
|
||||
}
|
||||
}`,...(m=(c=e.parameters)==null?void 0:c.docs)==null?void 0:m.source}}};var l,p,g;a.parameters={...a.parameters,docs:{...(l=a.parameters)==null?void 0:l.docs,source:{originalSource:`{
|
||||
args: {
|
||||
initialAddress: {
|
||||
address1: "Gramercy 201",
|
||||
address2: "2-20-9 Wakabayashi",
|
||||
city: "Setagaya-ku",
|
||||
state: "Tokyo",
|
||||
postcode: "154-0023",
|
||||
country: "JP"
|
||||
},
|
||||
onChange: () => {}
|
||||
}
|
||||
}`,...(g=(p=a.parameters)==null?void 0:p.docs)==null?void 0:g.source}}};var u,h,y;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`{
|
||||
args: {
|
||||
variant: "compact",
|
||||
onChange: () => {}
|
||||
}
|
||||
}`,...(y=(h=r.parameters)==null?void 0:h.docs)==null?void 0:y.source}}};var C,k,S;s.parameters={...s.parameters,docs:{...(C=s.parameters)==null?void 0:C.docs,source:{originalSource:`{
|
||||
args: {
|
||||
variant: "inline",
|
||||
showTitle: false,
|
||||
onChange: () => {}
|
||||
}
|
||||
}`,...(S=(k=s.parameters)==null?void 0:k.docs)==null?void 0:S.source}}};var T,A,b;t.parameters={...t.parameters,docs:{...(T=t.parameters)==null?void 0:T.docs,source:{originalSource:`{
|
||||
args: {
|
||||
initialAddress: {
|
||||
address1: "Gramercy 201",
|
||||
address2: "2-20-9 Wakabayashi",
|
||||
city: "Setagaya-ku",
|
||||
state: "Tokyo",
|
||||
postcode: "154-0023",
|
||||
country: "JP"
|
||||
},
|
||||
disabled: true,
|
||||
onChange: () => {}
|
||||
}
|
||||
}`,...(b=(A=t.parameters)==null?void 0:A.docs)==null?void 0:b.source}}};var f,v,w;n.parameters={...n.parameters,docs:{...(f=n.parameters)==null?void 0:f.docs,source:{originalSource:`{
|
||||
args: {
|
||||
title: "Installation Address",
|
||||
description: "Enter the address where internet service will be installed.",
|
||||
onChange: () => {}
|
||||
}
|
||||
}`,...(w=(v=n.parameters)==null?void 0:v.docs)==null?void 0:w.source}}};var x,W,I;o.parameters={...o.parameters,docs:{...(x=o.parameters)==null?void 0:x.docs,source:{originalSource:`{
|
||||
args: {
|
||||
showTitle: false,
|
||||
onChange: () => {}
|
||||
}
|
||||
}`,...(I=(W=o.parameters)==null?void 0:W.docs)==null?void 0:I.source}}};const z=["Default","WithInitialAddress","CompactVariant","InlineVariant","Disabled","CustomTitle","NoTitle"];export{r as CompactVariant,n as CustomTitle,e as Default,t as Disabled,s as InlineVariant,o as NoTitle,a as WithInitialAddress,z as __namedExportsOrder,q as default};
|
||||
@ -0,0 +1,14 @@
|
||||
import{j as k}from"./jsx-runtime-D_zvdyIk.js";import{r as c}from"./index-JhL3uwfD.js";import{J as V,R as g}from"./JapanAddressForm-CUdYD2hV.js";import{p as I}from"./schema-Cvvg7S_W.js";import"./button-C8_cybvS.js";import"./next-link-BmD4fPSy.js";import"./index-DXhM58Yq.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./spinner-mU4XywER.js";import"./input-BbGJiz0K.js";import"./password-input-D4khGh8v.js";import"./createLucideIcon-CctB0W3q.js";import"./checkbox-DahUyQbt.js";import"./label-C25VH7yk.js";import"./error-message-DeFFz6H_.js";import"./ExclamationCircleIcon-jFfW0Ax_.js";import"./status-pill-wWp9xkwA.js";import"./badge-BdMsasyi.js";import"./loading-overlay-DMJTiFny.js";import"./error-state-BSicqqE6.js";import"./ExclamationTriangleIcon-Di4DJZFg.js";import"./ArrowPathIcon-CZjG6RfV.js";import"./empty-state-DRUGJ9ip.js";import"./PlusIcon-DGufmf06.js";import"./inline-toast-DQJ-O9wc.js";import"./index-CNXKWNLp.js";import"./proxy-ZkTvaR74.js";import"./skeleton-ISCbfaf8.js";import"./loading-card-BIOTKPal.js";import"./logo-f0fprTjz.js";import"./next-image-69WeRggt.js";import"./step-header-C0A-1Uoh.js";import"./status-indicator-C7K_QPts.js";import"./view-toggle-ja_vihxz.js";import"./Squares2X2Icon-BMQM_Wy1.js";import"./animated-container-DyAZ9gmw.js";import"./FormField-C0UylACv.js";import"./ZipCodeInput-C0pEKKnJ.js";import"./countries-CY6LSu2r.js";import"./useQuery-tNNTAmfW.js";import"./QueryClientProvider-D7wSf7Op.js";import"./circle-check-big-Bab09Iah.js";import"./search-DSeV2urL.js";import"./AnimatedSection-CccjFZBU.js";import"./ProgressIndicator-zQZ52Xi8.js";import"./BilingualValue-B84DkgyY.js";import"./sparkles-q054t7ye.js";import"./map-pin-Bm-ztWPO.js";import"./chevron-right-C40ybnlz.js";import"./house-pESumjO8.js";import"./building-2-C7pcwIk2.js";import"./text-CXa-DJQz.js";function M(s){const r=I(s);return{address1:r.address1||"",address2:r.address2||"",city:r.city||"",state:r.state||"",postcode:r.postcode||"",country:"JP",countryCode:"JP"}}function R(s){const r=(s.address1||"").trim(),a=r.lastIndexOf(" ");let i=r,e="";if(a>0){const t=r.slice(a+1);/^[0-9A-Z]+$/i.test(t)&&t.length<=10&&(i=r.slice(0,a),e=t)}const m=s.postcode||s.state||s.city?e?g.APARTMENT:g.HOUSE:void 0;return{postcode:s.postcode||"",prefecture:s.state||"",city:s.city||"",town:s.address2||"",streetAddress:"",buildingName:i||"",roomNumber:e||"",residenceType:m,prefectureJa:"",cityJa:"",townJa:""}}function x({form:s,onJapaneseAddressChange:r}){const{values:a,errors:i,touched:e,setValue:n,setTouchedField:m}=s,t=a.address,h=c.useRef(!0),w=c.useMemo(()=>({...{postcode:t.postcode||"",prefecture:t.state||"",city:t.city||"",town:t.address2||"",streetAddress:"",buildingName:"",roomNumber:"",residenceType:void 0,prefectureJa:"",cityJa:"",townJa:""},...R(t)}),[]),d=o=>{const p=`address.${o}`;return e[p]||e.address?i[p]??i[o]:void 0},v={postcode:d("postcode"),prefecture:d("state"),city:d("city"),town:d("address2"),buildingName:d("address1"),roomNumber:d("address1")},C={postcode:e["address.postcode"]||e.address,prefecture:e["address.state"]||e.address,city:e["address.city"]||e.address,town:e["address.address2"]||e.address,buildingName:e["address.address1"]||e.address,roomNumber:e["address.address1"]||e.address},W=c.useCallback((o,p)=>{if(h.current){h.current=!1;return}const u=M(o);n("address",u),r==null||r(o)},[n,r]),j=c.useCallback(o=>{const u={postcode:"address.postcode",prefecture:"address.state",city:"address.city",town:"address.address2",buildingName:"address.address1",roomNumber:"address.address1"}[o];u&&m(u)},[m]);return c.useEffect(()=>{t.country||n("address",{...t,country:"JP",countryCode:"JP"})},[]),k.jsx(V,{initialValues:w,onChange:W,errors:v,touched:C,onBlur:j})}x.__docgenInfo={description:"",methods:[],displayName:"AddressStepJapan",props:{form:{required:!0,tsType:{name:"FormInterface"},description:""},onJapaneseAddressChange:{required:!1,tsType:{name:"signature",type:"function",raw:"(data: BilingualAddress) => void",signature:{arguments:[{type:{name:"z.infer",elements:[{name:"bilingualAddressSchema"}],raw:"z.infer<typeof bilingualAddressSchema>"},name:"data"}],return:{name:"void"}}},description:`Called when Japanese address data changes.
|
||||
Use this to capture Japanese fields for Salesforce sync.`}}};const _={values:{address:{address1:"",address2:"",city:"",state:"",postcode:"",country:"JP",countryCode:"JP"}},errors:{},touched:{},setValue:()=>{},setTouchedField:()=>{}},q={values:{address:{address1:"Sunshine Mansion 201",address2:"Nishi-Shinjuku",city:"Shinjuku-ku",state:"Tokyo",postcode:"160-0023",country:"JP",countryCode:"JP"}},errors:{},touched:{},setValue:()=>{},setTouchedField:()=>{}},B={values:{address:{address1:"",address2:"",city:"",state:"",postcode:"",country:"JP",countryCode:"JP"}},errors:{"address.postcode":"Postal code is required","address.state":"Prefecture is required"},touched:{address:!0,"address.postcode":!0,"address.state":!0},setValue:()=>{},setTouchedField:()=>{}},ze={title:"Features/Address/AddressStepJapan",component:x,parameters:{layout:"padded"}},l={args:{form:_}},f={args:{form:q}},y={args:{form:B}};var E,J,b;l.parameters={...l.parameters,docs:{...(E=l.parameters)==null?void 0:E.docs,source:{originalSource:`{
|
||||
args: {
|
||||
form: emptyForm
|
||||
}
|
||||
}`,...(b=(J=l.parameters)==null?void 0:J.docs)==null?void 0:b.source}}};var F,A,N;f.parameters={...f.parameters,docs:{...(F=f.parameters)==null?void 0:F.docs,source:{originalSource:`{
|
||||
args: {
|
||||
form: filledForm
|
||||
}
|
||||
}`,...(N=(A=f.parameters)==null?void 0:A.docs)==null?void 0:N.source}}};var P,S,T;y.parameters={...y.parameters,docs:{...(P=y.parameters)==null?void 0:P.docs,source:{originalSource:`{
|
||||
args: {
|
||||
form: formWithErrors
|
||||
}
|
||||
}`,...(T=(S=y.parameters)==null?void 0:S.docs)==null?void 0:T.source}}};const Ue=["Empty","WithExistingAddress","WithValidationErrors"];export{l as Empty,f as WithExistingAddress,y as WithValidationErrors,Ue as __namedExportsOrder,ze as default};
|
||||
@ -0,0 +1 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{F as g}from"./XCircleIcon-CiVBnngB.js";import{F as b}from"./ExclamationTriangleIcon-Di4DJZFg.js";import{F as w}from"./InformationCircleIcon-Clz7d-56.js";import{F as v}from"./CheckCircleIcon-Dva35lTP.js";const j={success:{bg:"bg-success-soft",border:"border-success/30",text:"text-success",icon:"text-success",Icon:v},info:{bg:"bg-info-soft",border:"border-info/30",text:"text-info",icon:"text-info",Icon:w},warning:{bg:"bg-warning-soft",border:"border-warning/35",text:"text-foreground",icon:"text-warning",Icon:b},error:{bg:"bg-danger-soft",border:"border-danger/30",text:"text-danger",icon:"text-danger",Icon:g}};function N({variant:s="info",title:a,children:t,icon:n,size:i="md",elevated:d=!1,onClose:o,className:l,...c}){const r=j[s],m=r.Icon,u=i==="sm"?"p-3":"p-4",f="rounded-xl",p=d?"shadow-sm":"",x=s==="error"||s==="warning"?"alert":"status";return e.jsx("div",{className:[f,u,"border",p,r.bg,r.border,l].filter(Boolean).join(" "),role:x,...c,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-0.5 flex-shrink-0",children:n||e.jsx(m,{className:["h-5 w-5",r.icon].join(" ")})}),e.jsxs("div",{className:"flex-1",children:[a&&e.jsx("p",{className:["font-medium",r.text].join(" "),children:a}),t&&e.jsx("div",{className:["text-sm mt-1 text-foreground/80"].join(" "),children:t})]}),o&&e.jsx("button",{onClick:o,"aria-label":"Close alert",className:"text-muted-foreground hover:text-foreground transition-colors",children:"×"})]})})}N.__docgenInfo={description:"",methods:[],displayName:"AlertBanner",props:{variant:{required:!1,tsType:{name:"union",raw:'"success" | "info" | "warning" | "error"',elements:[{name:"literal",value:'"success"'},{name:"literal",value:'"info"'},{name:"literal",value:'"warning"'},{name:"literal",value:'"error"'}]},description:"",defaultValue:{value:'"info"',computed:!1}},title:{required:!1,tsType:{name:"string"},description:""},children:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},icon:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},size:{required:!1,tsType:{name:"union",raw:'"sm" | "md"',elements:[{name:"literal",value:'"sm"'},{name:"literal",value:'"md"'}]},description:"",defaultValue:{value:'"md"',computed:!1}},elevated:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onClose:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""}}};export{N as A};
|
||||
@ -0,0 +1,45 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{A as r}from"./AlertBanner-Bnlyj1xc.js";import"./XCircleIcon-CiVBnngB.js";import"./index-JhL3uwfD.js";import"./ExclamationTriangleIcon-Di4DJZFg.js";import"./InformationCircleIcon-Clz7d-56.js";import"./CheckCircleIcon-Dva35lTP.js";const H={title:"Molecules/AlertBanner",component:r,argTypes:{variant:{control:"select",options:["success","info","warning","error"]},size:{control:"select",options:["sm","md"]},elevated:{control:"boolean"}}},a={args:{variant:"info",title:"New feature available",children:"Check out the new dashboard layout."}},n={args:{variant:"success",title:"Payment received",children:"Your payment has been processed successfully."}},s={args:{variant:"warning",title:"Account expiring",children:"Your subscription expires in 3 days."}},t={args:{variant:"error",title:"Payment failed",children:"Please update your payment method."}},o={render:()=>e.jsxs("div",{className:"flex flex-col gap-4 w-[500px]",children:[e.jsx(r,{variant:"info",title:"Info",children:"Informational message"}),e.jsx(r,{variant:"success",title:"Success",children:"Operation completed"}),e.jsx(r,{variant:"warning",title:"Warning",children:"Attention needed"}),e.jsx(r,{variant:"error",title:"Error",children:"Something went wrong"})]})},i={args:{variant:"info",title:"Dismissible",children:"Click the X to close.",onClose:()=>alert("Closed!")}},c={args:{variant:"warning",title:"Heads up",size:"sm"}};var l,d,m;a.parameters={...a.parameters,docs:{...(l=a.parameters)==null?void 0:l.docs,source:{originalSource:`{
|
||||
args: {
|
||||
variant: "info",
|
||||
title: "New feature available",
|
||||
children: "Check out the new dashboard layout."
|
||||
}
|
||||
}`,...(m=(d=a.parameters)==null?void 0:d.docs)==null?void 0:m.source}}};var p,u,g;n.parameters={...n.parameters,docs:{...(p=n.parameters)==null?void 0:p.docs,source:{originalSource:`{
|
||||
args: {
|
||||
variant: "success",
|
||||
title: "Payment received",
|
||||
children: "Your payment has been processed successfully."
|
||||
}
|
||||
}`,...(g=(u=n.parameters)==null?void 0:u.docs)==null?void 0:g.source}}};var h,v,f;s.parameters={...s.parameters,docs:{...(h=s.parameters)==null?void 0:h.docs,source:{originalSource:`{
|
||||
args: {
|
||||
variant: "warning",
|
||||
title: "Account expiring",
|
||||
children: "Your subscription expires in 3 days."
|
||||
}
|
||||
}`,...(f=(v=s.parameters)==null?void 0:v.docs)==null?void 0:f.source}}};var x,w,y;t.parameters={...t.parameters,docs:{...(x=t.parameters)==null?void 0:x.docs,source:{originalSource:`{
|
||||
args: {
|
||||
variant: "error",
|
||||
title: "Payment failed",
|
||||
children: "Please update your payment method."
|
||||
}
|
||||
}`,...(y=(w=t.parameters)==null?void 0:w.docs)==null?void 0:y.source}}};var A,S,b;o.parameters={...o.parameters,docs:{...(A=o.parameters)==null?void 0:A.docs,source:{originalSource:`{
|
||||
render: () => <div className="flex flex-col gap-4 w-[500px]">
|
||||
<AlertBanner variant="info" title="Info">Informational message</AlertBanner>
|
||||
<AlertBanner variant="success" title="Success">Operation completed</AlertBanner>
|
||||
<AlertBanner variant="warning" title="Warning">Attention needed</AlertBanner>
|
||||
<AlertBanner variant="error" title="Error">Something went wrong</AlertBanner>
|
||||
</div>
|
||||
}`,...(b=(S=o.parameters)==null?void 0:S.docs)==null?void 0:b.source}}};var B,C,j;i.parameters={...i.parameters,docs:{...(B=i.parameters)==null?void 0:B.docs,source:{originalSource:`{
|
||||
args: {
|
||||
variant: "info",
|
||||
title: "Dismissible",
|
||||
children: "Click the X to close.",
|
||||
onClose: () => alert("Closed!")
|
||||
}
|
||||
}`,...(j=(C=i.parameters)==null?void 0:C.docs)==null?void 0:j.source}}};var E,I,P;c.parameters={...c.parameters,docs:{...(E=c.parameters)==null?void 0:E.docs,source:{originalSource:`{
|
||||
args: {
|
||||
variant: "warning",
|
||||
title: "Heads up",
|
||||
size: "sm"
|
||||
}
|
||||
}`,...(P=(I=c.parameters)==null?void 0:I.docs)==null?void 0:P.source}}};const V=["Info","Success","Warning","Error","AllVariants","Closable","Small"];export{o as AllVariants,i as Closable,t as Error,a as Info,c as Small,n as Success,s as Warning,V as __namedExportsOrder,H as default};
|
||||
@ -0,0 +1 @@
|
||||
import{j as u}from"./jsx-runtime-D_zvdyIk.js";import{m as c}from"./proxy-ZkTvaR74.js";const m="0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.06)",p="0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07)";function f({children:s,className:r="",variant:a="default",onClick:n,disabled:e=!1}){const i="bg-card text-card-foreground rounded-xl border",t={default:"border-border",highlighted:"border-primary/35 ring-1 ring-primary/15",success:"border-success/25 ring-1 ring-success/15",static:"border-border"},d=n&&!e?"cursor-pointer":"",o=e?"opacity-50 cursor-not-allowed":"",l=a==="static"||e;return u.jsx(c.div,{className:`${i} ${t[a]} ${d} ${o} ${r}`,initial:{boxShadow:m},whileHover:l?{}:{boxShadow:p},transition:{duration:.2},onClick:e?void 0:n,children:s})}f.__docgenInfo={description:"",methods:[],displayName:"AnimatedCard",props:{children:{required:!0,tsType:{name:"ReactNode"},description:""},className:{required:!1,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:"",defaultValue:{value:'""',computed:!1}},variant:{required:!1,tsType:{name:"union",raw:'"default" | "highlighted" | "success" | "static" | undefined',elements:[{name:"literal",value:'"default"'},{name:"literal",value:'"highlighted"'},{name:"literal",value:'"success"'},{name:"literal",value:'"static"'},{name:"undefined"}]},description:"",defaultValue:{value:'"default"',computed:!1}},onClick:{required:!1,tsType:{name:"union",raw:"(() => void) | undefined",elements:[{name:"unknown"},{name:"undefined"}]},description:""},disabled:{required:!1,tsType:{name:"union",raw:"boolean | undefined",elements:[{name:"boolean"},{name:"undefined"}]},description:"",defaultValue:{value:"false",computed:!1}}}};export{f as A};
|
||||
@ -0,0 +1,23 @@
|
||||
import{j as a}from"./jsx-runtime-D_zvdyIk.js";import{A as e}from"./AnimatedCard-DFAiX4zP.js";import"./proxy-ZkTvaR74.js";import"./index-JhL3uwfD.js";const f={title:"Molecules/AnimatedCard",component:e,argTypes:{variant:{control:"select",options:["default","highlighted","success","static"]},disabled:{control:"boolean"}}},s={args:{children:a.jsx("div",{className:"p-6",children:"Default animated card content"})}},r={render:()=>a.jsxs("div",{className:"grid grid-cols-2 gap-4 w-[600px]",children:[a.jsx(e,{variant:"default",children:a.jsx("div",{className:"p-6",children:"Default"})}),a.jsx(e,{variant:"highlighted",children:a.jsx("div",{className:"p-6",children:"Highlighted"})}),a.jsx(e,{variant:"success",children:a.jsx("div",{className:"p-6",children:"Success"})}),a.jsx(e,{variant:"static",children:a.jsx("div",{className:"p-6",children:"Static"})})]})},i={args:{onClick:()=>alert("Clicked!"),children:a.jsx("div",{className:"p-6",children:"Click me! (interactive card)"})}},d={args:{disabled:!0,onClick:()=>{},children:a.jsx("div",{className:"p-6",children:"Disabled card"})}};var c,t,n;s.parameters={...s.parameters,docs:{...(c=s.parameters)==null?void 0:c.docs,source:{originalSource:`{
|
||||
args: {
|
||||
children: <div className="p-6">Default animated card content</div>
|
||||
}
|
||||
}`,...(n=(t=s.parameters)==null?void 0:t.docs)==null?void 0:n.source}}};var l,o,m;r.parameters={...r.parameters,docs:{...(l=r.parameters)==null?void 0:l.docs,source:{originalSource:`{
|
||||
render: () => <div className="grid grid-cols-2 gap-4 w-[600px]">
|
||||
<AnimatedCard variant="default"><div className="p-6">Default</div></AnimatedCard>
|
||||
<AnimatedCard variant="highlighted"><div className="p-6">Highlighted</div></AnimatedCard>
|
||||
<AnimatedCard variant="success"><div className="p-6">Success</div></AnimatedCard>
|
||||
<AnimatedCard variant="static"><div className="p-6">Static</div></AnimatedCard>
|
||||
</div>
|
||||
}`,...(m=(o=r.parameters)==null?void 0:o.docs)==null?void 0:m.source}}};var p,v,h;i.parameters={...i.parameters,docs:{...(p=i.parameters)==null?void 0:p.docs,source:{originalSource:`{
|
||||
args: {
|
||||
onClick: () => alert("Clicked!"),
|
||||
children: <div className="p-6">Click me! (interactive card)</div>
|
||||
}
|
||||
}`,...(h=(v=i.parameters)==null?void 0:v.docs)==null?void 0:h.source}}};var u,g,x;d.parameters={...d.parameters,docs:{...(u=d.parameters)==null?void 0:u.docs,source:{originalSource:`{
|
||||
args: {
|
||||
disabled: true,
|
||||
onClick: () => {},
|
||||
children: <div className="p-6">Disabled card</div>
|
||||
}
|
||||
}`,...(x=(g=d.parameters)==null?void 0:g.docs)==null?void 0:x.source}}};const D=["Default","AllVariants","Interactive","Disabled"];export{r as AllVariants,s as Default,d as Disabled,i as Interactive,D as __namedExportsOrder,f as default};
|
||||
@ -0,0 +1 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{A as o}from"./index-CNXKWNLp.js";import{m as n}from"./proxy-ZkTvaR74.js";function r({show:t,children:i,delay:a=0}){return e.jsx(o,{initial:!1,children:t&&e.jsx(n.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.5,ease:"easeOut",delay:a/1e3},style:{overflow:"hidden"},children:i})})}r.__docgenInfo={description:"",methods:[],displayName:"AnimatedSection",props:{show:{required:!0,tsType:{name:"boolean"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},delay:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}}}};export{r as A};
|
||||
@ -0,0 +1,25 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{A as h}from"./AnimatedSection-CccjFZBU.js";import"./index-CNXKWNLp.js";import"./index-JhL3uwfD.js";import"./proxy-ZkTvaR74.js";const f={title:"Features/Address/AnimatedSection",component:h,parameters:{layout:"centered"}},r={args:{show:!0,delay:0,children:e.jsx("div",{className:"p-4 border border-border rounded-lg bg-card",children:e.jsx("p",{className:"text-foreground",children:"This content is visible with animation."})})}},s={args:{show:!1,delay:0,children:e.jsx("div",{className:"p-4 border border-border rounded-lg bg-card",children:e.jsx("p",{className:"text-foreground",children:"This content is hidden."})})}},a={args:{show:!0,delay:300,children:e.jsx("div",{className:"p-4 border border-border rounded-lg bg-card",children:e.jsx("p",{className:"text-foreground",children:"This content appears with a 300ms delay."})})}};var d,o,n;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:`{
|
||||
args: {
|
||||
show: true,
|
||||
delay: 0,
|
||||
children: <div className="p-4 border border-border rounded-lg bg-card">
|
||||
<p className="text-foreground">This content is visible with animation.</p>
|
||||
</div>
|
||||
}
|
||||
}`,...(n=(o=r.parameters)==null?void 0:o.docs)==null?void 0:n.source}}};var t,i,c;s.parameters={...s.parameters,docs:{...(t=s.parameters)==null?void 0:t.docs,source:{originalSource:`{
|
||||
args: {
|
||||
show: false,
|
||||
delay: 0,
|
||||
children: <div className="p-4 border border-border rounded-lg bg-card">
|
||||
<p className="text-foreground">This content is hidden.</p>
|
||||
</div>
|
||||
}
|
||||
}`,...(c=(i=s.parameters)==null?void 0:i.docs)==null?void 0:c.source}}};var l,m,p;a.parameters={...a.parameters,docs:{...(l=a.parameters)==null?void 0:l.docs,source:{originalSource:`{
|
||||
args: {
|
||||
show: true,
|
||||
delay: 300,
|
||||
children: <div className="p-4 border border-border rounded-lg bg-card">
|
||||
<p className="text-foreground">This content appears with a 300ms delay.</p>
|
||||
</div>
|
||||
}
|
||||
}`,...(p=(m=a.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};const v=["Visible","Hidden","WithDelay"];export{s as Hidden,r as Visible,a as WithDelay,v as __namedExportsOrder,f as default};
|
||||
@ -0,0 +1 @@
|
||||
import{r}from"./index-JhL3uwfD.js";function a({title:e,titleId:o,...t},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":o},t),e?r.createElement("title",{id:o},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}))}const i=r.forwardRef(a);export{i as F};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function a({title:r,titleId:t,...o},n){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},o),r?e.createElement("title",{id:t},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))}const i=e.forwardRef(a);export{i as F};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function n({title:r,titleId:t,...o},a){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},o),r?e.createElement("title",{id:t},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const i=e.forwardRef(n);export{i as F};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function a({title:r,titleId:t,...o},n){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},o),r?e.createElement("title",{id:t},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))}const s=e.forwardRef(a);export{s as F};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function a({title:r,titleId:o,...t},n){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":o},t),r?e.createElement("title",{id:o},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"}))}const s=e.forwardRef(a);export{s as F};
|
||||
@ -0,0 +1 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{L as d}from"./next-link-BmD4fPSy.js";import{F as c}from"./ArrowLeftIcon-Cw1eswTb.js";function m({children:r,title:a,subtitle:t,showBackButton:o=!1,backHref:l="/",backLabel:i="Back to Home",wide:n=!1}){const s=n?"max-w-xl":"max-w-md";return e.jsxs("div",{className:"w-full flex flex-col items-center justify-center min-h-[calc(100dvh-4rem)] py-8 sm:py-12",children:[e.jsxs("div",{className:`w-full ${s}`,children:[o&&e.jsx("div",{className:"mb-6",children:e.jsxs(d,{href:l,className:"inline-flex items-center text-sm font-medium text-muted-foreground hover:text-foreground transition-colors group",children:[e.jsx(c,{className:"h-4 w-4 mr-2 transition-transform group-hover:-translate-x-0.5"}),i]})}),e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground mb-2 font-heading",children:a}),t&&e.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-sm mx-auto",children:t})]})]}),e.jsxs("div",{className:`mt-6 w-full ${s}`,children:[e.jsx("div",{className:"bg-card text-card-foreground py-8 px-6 rounded-xl border border-border shadow-sm sm:px-10",children:r}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-xs text-muted-foreground/60 flex items-center justify-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 rounded-full bg-success"}),"Secure login protected by SSL encryption"]})})]})]})}m.__docgenInfo={description:"",methods:[],displayName:"AuthLayout",props:{children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},title:{required:!0,tsType:{name:"string"},description:""},subtitle:{required:!1,tsType:{name:"string"},description:""},showBackButton:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},backHref:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"/"',computed:!1}},backLabel:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"Back to Home"',computed:!1}},wide:{required:!1,tsType:{name:"boolean"},description:"Use wider layout for forms with more content like signup",defaultValue:{value:"false",computed:!1}}}};export{m as A};
|
||||
@ -0,0 +1,41 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{A as m}from"./AuthLayout-DNr24V9g.js";import"./next-link-BmD4fPSy.js";import"./index-JhL3uwfD.js";import"./ArrowLeftIcon-Cw1eswTb.js";const x={title:"Templates/AuthLayout",component:m,parameters:{layout:"fullscreen"},argTypes:{wide:{control:"boolean"},showBackButton:{control:"boolean"}}},r={args:{title:"Welcome back",subtitle:"Sign in to your account to continue",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-muted-foreground mb-1",children:"Email"}),e.jsx("input",{className:"w-full h-11 px-4 rounded-lg border border-border bg-card text-sm",placeholder:"you@example.com"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-muted-foreground mb-1",children:"Password"}),e.jsx("input",{type:"password",className:"w-full h-11 px-4 rounded-lg border border-border bg-card text-sm",placeholder:"Enter password"})]}),e.jsx("button",{className:"w-full h-11 rounded-lg bg-primary text-primary-foreground font-medium text-sm",children:"Sign in"})]})}},t={args:{title:"Create your account",subtitle:"Get started with Assist Solutions services",wide:!0,showBackButton:!0,children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-muted-foreground mb-1",children:"First Name"}),e.jsx("input",{className:"w-full h-11 px-4 rounded-lg border border-border bg-card text-sm",placeholder:"John"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-muted-foreground mb-1",children:"Last Name"}),e.jsx("input",{className:"w-full h-11 px-4 rounded-lg border border-border bg-card text-sm",placeholder:"Doe"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-muted-foreground mb-1",children:"Email"}),e.jsx("input",{className:"w-full h-11 px-4 rounded-lg border border-border bg-card text-sm",placeholder:"you@example.com"})]}),e.jsx("button",{className:"w-full h-11 rounded-lg bg-primary text-primary-foreground font-medium text-sm",children:"Create Account"})]})}};var o,s,l;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`{
|
||||
args: {
|
||||
title: "Welcome back",
|
||||
subtitle: "Sign in to your account to continue",
|
||||
children: <div className="space-y-4">
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-muted-foreground mb-1">Email</label>
|
||||
<input className="w-full h-11 px-4 rounded-lg border border-border bg-card text-sm" placeholder="you@example.com" />
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-muted-foreground mb-1">Password</label>
|
||||
<input type="password" className="w-full h-11 px-4 rounded-lg border border-border bg-card text-sm" placeholder="Enter password" />
|
||||
</div>
|
||||
<button className="w-full h-11 rounded-lg bg-primary text-primary-foreground font-medium text-sm">Sign in</button>
|
||||
</div>
|
||||
}
|
||||
}`,...(l=(s=r.parameters)==null?void 0:s.docs)==null?void 0:l.source}}};var d,a,n;t.parameters={...t.parameters,docs:{...(d=t.parameters)==null?void 0:d.docs,source:{originalSource:`{
|
||||
args: {
|
||||
title: "Create your account",
|
||||
subtitle: "Get started with Assist Solutions services",
|
||||
wide: true,
|
||||
showBackButton: true,
|
||||
children: <div className="space-y-4">
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-muted-foreground mb-1">First Name</label>
|
||||
<input className="w-full h-11 px-4 rounded-lg border border-border bg-card text-sm" placeholder="John" />
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-muted-foreground mb-1">Last Name</label>
|
||||
<input className="w-full h-11 px-4 rounded-lg border border-border bg-card text-sm" placeholder="Doe" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-muted-foreground mb-1">Email</label>
|
||||
<input className="w-full h-11 px-4 rounded-lg border border-border bg-card text-sm" placeholder="you@example.com" />
|
||||
</div>
|
||||
<button className="w-full h-11 rounded-lg bg-primary text-primary-foreground font-medium text-sm">Create Account</button>
|
||||
</div>
|
||||
}
|
||||
}`,...(n=(a=t.parameters)==null?void 0:a.docs)==null?void 0:n.source}}};const g=["Login","SignUp"];export{r as Login,t as SignUp,g as __namedExportsOrder,x as default};
|
||||
1
apps/portal/public/storybook/assets/BackLink-C5IY6wzy.js
Normal file
1
apps/portal/public/storybook/assets/BackLink-C5IY6wzy.js
Normal file
@ -0,0 +1 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{B as o}from"./button-C8_cybvS.js";import{c as t}from"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import{F as m}from"./ArrowLeftIcon-Cw1eswTb.js";const c={left:"justify-start",center:"justify-center",right:"justify-end"};function u({href:a,label:r="Back",align:s="left",className:i,buttonClassName:n,icon:l=e.jsx(m,{className:"w-4 h-4"})}){return e.jsx("div",{className:t("mb-6 flex",c[s],i),children:e.jsx(o,{as:"a",href:a,size:"sm",variant:"ghost",leftIcon:l,className:t("text-muted-foreground hover:text-foreground",n),children:r})})}u.__docgenInfo={description:"",methods:[],displayName:"BackLink",props:{href:{required:!0,tsType:{name:"string"},description:""},label:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"Back"',computed:!1}},align:{required:!1,tsType:{name:"union",raw:'"left" | "center" | "right"',elements:[{name:"literal",value:'"left"'},{name:"literal",value:'"center"'},{name:"literal",value:'"right"'}]},description:"",defaultValue:{value:'"left"',computed:!1}},className:{required:!1,tsType:{name:"string"},description:""},buttonClassName:{required:!1,tsType:{name:"string"},description:""},icon:{required:!1,tsType:{name:"ReactNode"},description:"",defaultValue:{value:'<ArrowLeftIcon className="w-4 h-4" />',computed:!1}}}};export{u as B};
|
||||
@ -0,0 +1,17 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{B as n}from"./BackLink-C5IY6wzy.js";import"./button-C8_cybvS.js";import"./index-JhL3uwfD.js";import"./next-link-BmD4fPSy.js";import"./index-DXhM58Yq.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./spinner-mU4XywER.js";import"./ArrowLeftIcon-Cw1eswTb.js";const R={title:"Molecules/BackLink",component:n,argTypes:{align:{control:"select",options:["left","center","right"]}}},r={args:{href:"/",label:"Back"}},a={args:{href:"/account",label:"Back to Account"}},t={render:()=>e.jsxs("div",{className:"flex flex-col gap-4 w-96",children:[e.jsx(n,{href:"/",label:"Left aligned",align:"left"}),e.jsx(n,{href:"/",label:"Center aligned",align:"center"}),e.jsx(n,{href:"/",label:"Right aligned",align:"right"})]})};var l,o,s;r.parameters={...r.parameters,docs:{...(l=r.parameters)==null?void 0:l.docs,source:{originalSource:`{
|
||||
args: {
|
||||
href: "/",
|
||||
label: "Back"
|
||||
}
|
||||
}`,...(s=(o=r.parameters)==null?void 0:o.docs)==null?void 0:s.source}}};var c,i,m;a.parameters={...a.parameters,docs:{...(c=a.parameters)==null?void 0:c.docs,source:{originalSource:`{
|
||||
args: {
|
||||
href: "/account",
|
||||
label: "Back to Account"
|
||||
}
|
||||
}`,...(m=(i=a.parameters)==null?void 0:i.docs)==null?void 0:m.source}}};var p,g,d;t.parameters={...t.parameters,docs:{...(p=t.parameters)==null?void 0:p.docs,source:{originalSource:`{
|
||||
render: () => <div className="flex flex-col gap-4 w-96">
|
||||
<BackLink href="/" label="Left aligned" align="left" />
|
||||
<BackLink href="/" label="Center aligned" align="center" />
|
||||
<BackLink href="/" label="Right aligned" align="right" />
|
||||
</div>
|
||||
}`,...(d=(g=t.parameters)==null?void 0:g.docs)==null?void 0:d.source}}};const S=["Default","CustomLabel","Alignments"];export{t as Alignments,a as CustomLabel,r as Default,S as __namedExportsOrder,R as default};
|
||||
@ -0,0 +1,2 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";function a({romaji:s,japanese:i,placeholder:r,verified:t}){return t?e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"text-foreground font-medium",children:s}),i&&e.jsxs("span",{className:"text-muted-foreground text-sm",children:["(",i,")"]})]}):e.jsx("span",{className:"text-muted-foreground/60 italic text-sm",children:r})}a.__docgenInfo={description:`Displays a bilingual value with both romaji and Japanese text.
|
||||
Shows placeholder when not verified.`,methods:[],displayName:"BilingualValue",props:{romaji:{required:!0,tsType:{name:"string"},description:"Romanized (English) value"},japanese:{required:!1,tsType:{name:"string"},description:"Japanese value (optional)"},placeholder:{required:!0,tsType:{name:"string"},description:"Placeholder text when not verified"},verified:{required:!0,tsType:{name:"boolean"},description:"Whether the address has been verified"}}};export{a as B};
|
||||
@ -0,0 +1,21 @@
|
||||
import{B as l}from"./BilingualValue-B84DkgyY.js";import"./jsx-runtime-D_zvdyIk.js";const j={title:"Features/Address/BilingualValue",component:l,parameters:{layout:"centered"}},e={args:{romaji:"Shinjuku-ku",japanese:"新宿区",placeholder:"—",verified:!0}},r={args:{romaji:"Shinjuku-ku",placeholder:"—",verified:!0}},a={args:{romaji:"",japanese:"",placeholder:"Awaiting verification",verified:!1}};var i,s,o;e.parameters={...e.parameters,docs:{...(i=e.parameters)==null?void 0:i.docs,source:{originalSource:`{
|
||||
args: {
|
||||
romaji: "Shinjuku-ku",
|
||||
japanese: "新宿区",
|
||||
placeholder: "—",
|
||||
verified: true
|
||||
}
|
||||
}`,...(o=(s=e.parameters)==null?void 0:s.docs)==null?void 0:o.source}}};var n,t,u;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{
|
||||
args: {
|
||||
romaji: "Shinjuku-ku",
|
||||
placeholder: "—",
|
||||
verified: true
|
||||
}
|
||||
}`,...(u=(t=r.parameters)==null?void 0:t.docs)==null?void 0:u.source}}};var c,d,p;a.parameters={...a.parameters,docs:{...(c=a.parameters)==null?void 0:c.docs,source:{originalSource:`{
|
||||
args: {
|
||||
romaji: "",
|
||||
japanese: "",
|
||||
placeholder: "Awaiting verification",
|
||||
verified: false
|
||||
}
|
||||
}`,...(p=(d=a.parameters)==null?void 0:d.docs)==null?void 0:p.source}}};const g=["Verified","VerifiedWithoutJapanese","NotVerified"];export{a as NotVerified,e as Verified,r as VerifiedWithoutJapanese,g as __namedExportsOrder,j as default};
|
||||
@ -0,0 +1 @@
|
||||
import{j as a}from"./jsx-runtime-D_zvdyIk.js";import{r as u}from"./index-JhL3uwfD.js";import{S as f}from"./status-pill-wWp9xkwA.js";import{F as t}from"./DocumentTextIcon-Dk_xQMYi.js";import{F as n}from"./ClockIcon-BFX11zAZ.js";import{F as o}from"./ExclamationTriangleIcon-Di4DJZFg.js";import{F as i}from"./CheckCircleIcon-Dva35lTP.js";import{F as p}from"./XCircleIcon-CiVBnngB.js";const w=e=>{switch(e.toLowerCase()){case"paid":return{variant:"success",icon:a.jsx(i,{className:"h-4 w-4"}),label:"Paid"};case"overdue":return{variant:"error",icon:a.jsx(o,{className:"h-4 w-4"}),label:"Overdue"};case"unpaid":return{variant:"warning",icon:a.jsx(n,{className:"h-4 w-4"}),label:"Unpaid"};case"cancelled":case"canceled":return{variant:"neutral",icon:a.jsx(p,{className:"h-4 w-4"}),label:"Cancelled"};case"draft":return{variant:"neutral",icon:a.jsx(t,{className:"h-4 w-4"}),label:"Draft"};case"refunded":return{variant:"info",icon:a.jsx(i,{className:"h-4 w-4"}),label:"Refunded"};case"collections":return{variant:"error",icon:a.jsx(o,{className:"h-4 w-4"}),label:"Collections"};case"payment pending":return{variant:"warning",icon:a.jsx(n,{className:"h-4 w-4"}),label:"Payment Pending"};default:return{variant:"neutral",icon:a.jsx(t,{className:"h-4 w-4"}),label:e}}},l=u.forwardRef(({status:e,showIcon:c=!0,children:s,...d},m)=>{const r=w(e);return a.jsx(f,{ref:m,variant:r.variant,icon:c?r.icon:void 0,label:typeof s=="string"?s:r.label,...d})});l.displayName="BillingStatusBadge";l.__docgenInfo={description:"",methods:[],displayName:"BillingStatusBadge",props:{status:{required:!0,tsType:{name:"string"},description:""},showIcon:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}}},composes:["Omit"]};export{l as B};
|
||||
@ -0,0 +1,43 @@
|
||||
import{B as A}from"./BillingStatusBadge-CQ1ic61y.js";import"./jsx-runtime-D_zvdyIk.js";import"./index-JhL3uwfD.js";import"./status-pill-wWp9xkwA.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./DocumentTextIcon-Dk_xQMYi.js";import"./ClockIcon-BFX11zAZ.js";import"./ExclamationTriangleIcon-Di4DJZFg.js";import"./CheckCircleIcon-Dva35lTP.js";import"./XCircleIcon-CiVBnngB.js";const ss={title:"Features/Billing/BillingStatusBadge",component:A,parameters:{layout:"centered"}},s={args:{status:"Paid"}},e={args:{status:"Unpaid"}},a={args:{status:"Overdue"}},r={args:{status:"Cancelled"}},t={args:{status:"Draft"}},o={args:{status:"Refunded"}},n={args:{status:"Collections"}},c={args:{status:"Payment Pending"}},d={args:{status:"Paid",showIcon:!1}},m={args:{status:"Paid",children:"Payment Complete"}};var u,i,p;s.parameters={...s.parameters,docs:{...(u=s.parameters)==null?void 0:u.docs,source:{originalSource:`{
|
||||
args: {
|
||||
status: "Paid"
|
||||
}
|
||||
}`,...(p=(i=s.parameters)==null?void 0:i.docs)==null?void 0:p.source}}};var l,g,P;e.parameters={...e.parameters,docs:{...(l=e.parameters)==null?void 0:l.docs,source:{originalSource:`{
|
||||
args: {
|
||||
status: "Unpaid"
|
||||
}
|
||||
}`,...(P=(g=e.parameters)==null?void 0:g.docs)==null?void 0:P.source}}};var f,C,S;a.parameters={...a.parameters,docs:{...(f=a.parameters)==null?void 0:f.docs,source:{originalSource:`{
|
||||
args: {
|
||||
status: "Overdue"
|
||||
}
|
||||
}`,...(S=(C=a.parameters)==null?void 0:C.docs)==null?void 0:S.source}}};var y,h,B;r.parameters={...r.parameters,docs:{...(y=r.parameters)==null?void 0:y.docs,source:{originalSource:`{
|
||||
args: {
|
||||
status: "Cancelled"
|
||||
}
|
||||
}`,...(B=(h=r.parameters)==null?void 0:h.docs)==null?void 0:B.source}}};var O,v,D;t.parameters={...t.parameters,docs:{...(O=t.parameters)==null?void 0:O.docs,source:{originalSource:`{
|
||||
args: {
|
||||
status: "Draft"
|
||||
}
|
||||
}`,...(D=(v=t.parameters)==null?void 0:v.docs)==null?void 0:D.source}}};var I,R,U;o.parameters={...o.parameters,docs:{...(I=o.parameters)==null?void 0:I.docs,source:{originalSource:`{
|
||||
args: {
|
||||
status: "Refunded"
|
||||
}
|
||||
}`,...(U=(R=o.parameters)==null?void 0:R.docs)==null?void 0:U.source}}};var b,w,x;n.parameters={...n.parameters,docs:{...(b=n.parameters)==null?void 0:b.docs,source:{originalSource:`{
|
||||
args: {
|
||||
status: "Collections"
|
||||
}
|
||||
}`,...(x=(w=n.parameters)==null?void 0:w.docs)==null?void 0:x.source}}};var L,W,_;c.parameters={...c.parameters,docs:{...(L=c.parameters)==null?void 0:L.docs,source:{originalSource:`{
|
||||
args: {
|
||||
status: "Payment Pending"
|
||||
}
|
||||
}`,...(_=(W=c.parameters)==null?void 0:W.docs)==null?void 0:_.source}}};var E,F,j;d.parameters={...d.parameters,docs:{...(E=d.parameters)==null?void 0:E.docs,source:{originalSource:`{
|
||||
args: {
|
||||
status: "Paid",
|
||||
showIcon: false
|
||||
}
|
||||
}`,...(j=(F=d.parameters)==null?void 0:F.docs)==null?void 0:j.source}}};var k,q,z;m.parameters={...m.parameters,docs:{...(k=m.parameters)==null?void 0:k.docs,source:{originalSource:`{
|
||||
args: {
|
||||
status: "Paid",
|
||||
children: "Payment Complete"
|
||||
}
|
||||
}`,...(z=(q=m.parameters)==null?void 0:q.docs)==null?void 0:z.source}}};const es=["Paid","Unpaid","Overdue","Cancelled","Draft","Refunded","Collections","PaymentPending","WithoutIcon","CustomLabel"];export{r as Cancelled,n as Collections,m as CustomLabel,t as Draft,a as Overdue,s as Paid,c as PaymentPending,o as Refunded,e as Unpaid,d as WithoutIcon,es as __namedExportsOrder,ss as default};
|
||||
@ -0,0 +1,45 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as u}from"./index-JhL3uwfD.js";import{L as f}from"./next-link-BmD4fPSy.js";import{c as l}from"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import{F as _}from"./CreditCardIcon-BBdrpHQs.js";import{F as h}from"./ArrowRightIcon--Vuz7Q7x.js";import{F as $}from"./ClockIcon-BFX11zAZ.js";import{F as x}from"./CheckCircleIcon-Dva35lTP.js";import{F as T}from"./ExclamationTriangleIcon-Di4DJZFg.js";import{F as V}from"./index-9c86oO0t.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./currency-CYvr7ZUf.js";import"./date-CJlSVdaN.js";import"./text-CXa-DJQz.js";const{formatCurrency:H}=V;function M({className:r,forwardedRef:a,...t}){return e.jsx("div",{ref:a,className:l("bg-card rounded-lg border border-border p-6",r),...t,children:e.jsxs("div",{className:"animate-pulse",children:[e.jsxs("div",{className:"flex items-center mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-muted rounded-lg"}),e.jsx("div",{className:"ml-3 h-6 bg-muted rounded w-32"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"h-4 bg-muted rounded w-full"}),e.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),e.jsx("div",{className:"h-4 bg-muted rounded w-1/2"})]})]})})}const q={error:"text-danger",warning:"text-warning",success:"text-success",neutral:"text-muted-foreground"};function z({item:r,compact:a,formatAmount:t}){const s=r.icon;return e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-muted/50",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(s,{className:l("w-5 h-5 mr-3",q[r.variant])}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium text-foreground",children:r.label}),!a&&r.count>0&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:[r.count," invoice",r.count===1?"":"s"]})]})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-lg font-semibold text-foreground",children:t(r.amount)}),a&&r.count>0&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:[r.count," invoice",r.count===1?"":"s"]})]})]})}function G(r){return[{label:"Outstanding",amount:r.totalOutstanding,count:r.invoiceCount.unpaid,variant:r.totalOutstanding>0?"warning":"neutral",icon:r.totalOutstanding>0?$:x},{label:"Overdue",amount:r.totalOverdue,count:r.invoiceCount.overdue,variant:r.totalOverdue>0?"error":"neutral",icon:r.totalOverdue>0?T:x},{label:"Paid This Period",amount:r.totalPaid,count:r.invoiceCount.paid,variant:"success",icon:x}]}const E=u.forwardRef(({summary:r,loading:a=!1,compact:t=!1,className:s,...g},v)=>{const L=u.useCallback(m=>H(m,r.currency),[r.currency]),U=u.useMemo(()=>G(r),[r]);return a?e.jsx(M,{forwardedRef:v,className:s,...g}):e.jsxs("div",{ref:v,className:l("bg-card rounded-lg border border-border transition-all duration-200 hover:shadow-sm",t?"p-4":"p-6",s),...g,children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"w-8 h-8 bg-primary/10 rounded-lg flex items-center justify-center",children:e.jsx(_,{className:"w-5 h-5 text-primary"})}),e.jsx("h3",{className:"ml-3 text-lg font-semibold text-foreground",children:"Billing Summary"})]}),!t&&e.jsxs(f,{href:"/account/billing",className:"inline-flex items-center text-sm text-primary hover:text-primary-hover font-medium",children:["View All",e.jsx(h,{className:"ml-1 w-4 h-4"})]})]}),e.jsx("div",{className:l("space-y-4",t&&"space-y-3"),children:U.map((m,D)=>e.jsx(z,{item:m,compact:t,formatAmount:L},D))}),!t&&e.jsx("div",{className:"mt-6 pt-4 border-t border-border",children:e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Total Invoices"}),e.jsx("span",{className:"font-medium text-foreground",children:r.invoiceCount.total})]})}),t&&e.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:e.jsxs(f,{href:"/account/billing",className:"inline-flex items-center text-sm text-primary hover:text-primary-hover font-medium",children:["View All Invoices",e.jsx(h,{className:"ml-1 w-4 h-4"})]})})]})});E.displayName="BillingSummary";const p={totalOutstanding:249.98,totalOverdue:79.99,totalPaid:1520,currency:"EUR",invoiceCount:{total:24,unpaid:3,overdue:1,paid:20}},ce={title:"Features/Billing/BillingSummary",component:E,parameters:{layout:"centered"},decorators:[r=>e.jsx("div",{className:"w-[450px]",children:e.jsx(r,{})})]},n={args:{summary:p}},o={args:{summary:p,compact:!0}},i={args:{summary:p,loading:!0}},d={args:{summary:{totalOutstanding:0,totalOverdue:0,totalPaid:3200,currency:"EUR",invoiceCount:{total:15,unpaid:0,overdue:0,paid:15}}}},c={args:{summary:{totalOutstanding:1500,totalOverdue:800,totalPaid:200,currency:"USD",invoiceCount:{total:10,unpaid:5,overdue:3,paid:2}}}};var j,b,N;n.parameters={...n.parameters,docs:{...(j=n.parameters)==null?void 0:j.docs,source:{originalSource:`{
|
||||
args: {
|
||||
summary: mockSummary
|
||||
}
|
||||
}`,...(N=(b=n.parameters)==null?void 0:b.docs)==null?void 0:N.source}}};var y,w,O;o.parameters={...o.parameters,docs:{...(y=o.parameters)==null?void 0:y.docs,source:{originalSource:`{
|
||||
args: {
|
||||
summary: mockSummary,
|
||||
compact: true
|
||||
}
|
||||
}`,...(O=(w=o.parameters)==null?void 0:w.docs)==null?void 0:O.source}}};var S,C,F;i.parameters={...i.parameters,docs:{...(S=i.parameters)==null?void 0:S.docs,source:{originalSource:`{
|
||||
args: {
|
||||
summary: mockSummary,
|
||||
loading: true
|
||||
}
|
||||
}`,...(F=(C=i.parameters)==null?void 0:C.docs)==null?void 0:F.source}}};var R,P,A;d.parameters={...d.parameters,docs:{...(R=d.parameters)==null?void 0:R.docs,source:{originalSource:`{
|
||||
args: {
|
||||
summary: {
|
||||
totalOutstanding: 0,
|
||||
totalOverdue: 0,
|
||||
totalPaid: 3200.0,
|
||||
currency: "EUR",
|
||||
invoiceCount: {
|
||||
total: 15,
|
||||
unpaid: 0,
|
||||
overdue: 0,
|
||||
paid: 15
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,...(A=(P=d.parameters)==null?void 0:P.docs)==null?void 0:A.source}}};var I,k,B;c.parameters={...c.parameters,docs:{...(I=c.parameters)==null?void 0:I.docs,source:{originalSource:`{
|
||||
args: {
|
||||
summary: {
|
||||
totalOutstanding: 1500.0,
|
||||
totalOverdue: 800.0,
|
||||
totalPaid: 200.0,
|
||||
currency: "USD",
|
||||
invoiceCount: {
|
||||
total: 10,
|
||||
unpaid: 5,
|
||||
overdue: 3,
|
||||
paid: 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,...(B=(k=c.parameters)==null?void 0:k.docs)==null?void 0:B.source}}};const le=["Default","Compact","Loading","AllPaid","HighOutstanding"];export{d as AllPaid,o as Compact,n as Default,c as HighOutstanding,i as Loading,le as __namedExportsOrder,ce as default};
|
||||
@ -0,0 +1 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{B as r}from"./button-C8_cybvS.js";import{A as n}from"./arrow-right-BNMAry-H.js";import"./index-JhL3uwfD.js";import"./next-link-BmD4fPSy.js";import"./index-DXhM58Yq.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./spinner-mU4XywER.js";import"./createLucideIcon-CctB0W3q.js";function i(){return e.jsx("div",{"aria-label":"Call to action",className:"bg-primary-soft",children:e.jsxs("div",{className:"mx-auto max-w-3xl px-6 sm:px-10 lg:px-14 py-14 sm:py-16 text-center",children:[e.jsx("h2",{className:"text-2xl sm:text-3xl font-extrabold text-foreground font-heading",children:"Ready to Get Set Up?"}),e.jsx("p",{className:"mt-2 text-base text-muted-foreground",children:"No Japanese required. Our English-speaking team is here to help."}),e.jsxs("div",{className:"mt-6 flex flex-col sm:flex-row items-center justify-center gap-3",children:[e.jsx(r,{as:"a",href:"/services",variant:"pill",size:"lg",rightIcon:e.jsx(n,{className:"h-5 w-5"}),children:"Find Your Plan"}),e.jsx(r,{as:"a",href:"#contact",variant:"pillOutline",size:"lg",children:"Talk to Us"})]})]})})}i.__docgenInfo={description:"",methods:[],displayName:"CTABanner"};const y={title:"Features/LandingPage/CTABanner",component:i,parameters:{layout:"fullscreen"}},t={};var a,s,o;t.parameters={...t.parameters,docs:{...(a=t.parameters)==null?void 0:a.docs,source:{originalSource:"{}",...(o=(s=t.parameters)==null?void 0:s.docs)==null?void 0:o.source}}};const v=["Default"];export{t as Default,v as __namedExportsOrder,y as default};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function a({title:r,titleId:t,...o},n){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},o),r?e.createElement("title",{id:t},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"}))}const i=e.forwardRef(a);export{i as F};
|
||||
@ -0,0 +1,7 @@
|
||||
import{j as l}from"./jsx-runtime-D_zvdyIk.js";function s({text:e,variant:r="default",size:a="md"}){const t=()=>{switch(r){case"gold":return"bg-warning-bg text-warning border-warning-border";case"platinum":return"bg-neutral-bg text-neutral border-neutral-border";case"silver":return"bg-neutral-soft text-neutral border-neutral-border";case"recommended":return"bg-success-bg text-success border-success-border";case"family":return"bg-info-soft text-info border-info-border";case"new":return"bg-primary/10 text-primary border-primary/20";default:return"bg-neutral-soft text-neutral border-neutral-border"}},n=(()=>{switch(a){case"xs":return"text-[11px] px-1.5 py-[2px]";case"sm":return"text-xs px-2 py-0.5";default:return"text-xs px-2.5 py-1"}})();return l.jsx("span",{className:`${n} inline-flex items-center rounded-full font-medium border whitespace-nowrap ${t()}`,children:e})}s.__docgenInfo={description:"",methods:[],displayName:"CardBadge",props:{text:{required:!0,tsType:{name:"string"},description:""},variant:{required:!1,tsType:{name:"union",raw:`| "gold"
|
||||
| "platinum"
|
||||
| "silver"
|
||||
| "recommended"
|
||||
| "family"
|
||||
| "new"
|
||||
| "default"`,elements:[{name:"literal",value:'"gold"'},{name:"literal",value:'"platinum"'},{name:"literal",value:'"silver"'},{name:"literal",value:'"recommended"'},{name:"literal",value:'"family"'},{name:"literal",value:'"new"'},{name:"literal",value:'"default"'}]},description:"",defaultValue:{value:'"default"',computed:!1}},size:{required:!1,tsType:{name:"union",raw:'"xs" | "sm" | "md"',elements:[{name:"literal",value:'"xs"'},{name:"literal",value:'"sm"'},{name:"literal",value:'"md"'}]},description:"",defaultValue:{value:'"md"',computed:!1}}}};export{s as C};
|
||||
@ -0,0 +1,57 @@
|
||||
import{j as a}from"./jsx-runtime-D_zvdyIk.js";import{C as e}from"./CardBadge-CfIpSSwP.js";const K={title:"Features/Services/Base/CardBadge",component:e,parameters:{layout:"centered"}},r={args:{text:"Standard"}},t={args:{text:"Gold Plan",variant:"gold"}},s={args:{text:"Platinum",variant:"platinum"}},n={args:{text:"Silver",variant:"silver"}},o={args:{text:"Recommended",variant:"recommended"}},d={args:{text:"Family Plan",variant:"family"}},m={args:{text:"New",variant:"new"}},i={args:{text:"XS Badge",variant:"recommended",size:"xs"}},c={args:{text:"Small Badge",variant:"gold",size:"sm"}},l={render:()=>a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx(e,{text:"Default",variant:"default"}),a.jsx(e,{text:"Gold",variant:"gold"}),a.jsx(e,{text:"Platinum",variant:"platinum"}),a.jsx(e,{text:"Silver",variant:"silver"}),a.jsx(e,{text:"Recommended",variant:"recommended"}),a.jsx(e,{text:"Family",variant:"family"}),a.jsx(e,{text:"New",variant:"new"})]})};var p,x,u;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`{
|
||||
args: {
|
||||
text: "Standard"
|
||||
}
|
||||
}`,...(u=(x=r.parameters)==null?void 0:x.docs)==null?void 0:u.source}}};var g,v,S;t.parameters={...t.parameters,docs:{...(g=t.parameters)==null?void 0:g.docs,source:{originalSource:`{
|
||||
args: {
|
||||
text: "Gold Plan",
|
||||
variant: "gold"
|
||||
}
|
||||
}`,...(S=(v=t.parameters)==null?void 0:v.docs)==null?void 0:S.source}}};var f,B,w;s.parameters={...s.parameters,docs:{...(f=s.parameters)==null?void 0:f.docs,source:{originalSource:`{
|
||||
args: {
|
||||
text: "Platinum",
|
||||
variant: "platinum"
|
||||
}
|
||||
}`,...(w=(B=s.parameters)==null?void 0:B.docs)==null?void 0:w.source}}};var y,j,C;n.parameters={...n.parameters,docs:{...(y=n.parameters)==null?void 0:y.docs,source:{originalSource:`{
|
||||
args: {
|
||||
text: "Silver",
|
||||
variant: "silver"
|
||||
}
|
||||
}`,...(C=(j=n.parameters)==null?void 0:j.docs)==null?void 0:C.source}}};var P,N,F;o.parameters={...o.parameters,docs:{...(P=o.parameters)==null?void 0:P.docs,source:{originalSource:`{
|
||||
args: {
|
||||
text: "Recommended",
|
||||
variant: "recommended"
|
||||
}
|
||||
}`,...(F=(N=o.parameters)==null?void 0:N.docs)==null?void 0:F.source}}};var R,G,z;d.parameters={...d.parameters,docs:{...(R=d.parameters)==null?void 0:R.docs,source:{originalSource:`{
|
||||
args: {
|
||||
text: "Family Plan",
|
||||
variant: "family"
|
||||
}
|
||||
}`,...(z=(G=d.parameters)==null?void 0:G.docs)==null?void 0:z.source}}};var D,E,A;m.parameters={...m.parameters,docs:{...(D=m.parameters)==null?void 0:D.docs,source:{originalSource:`{
|
||||
args: {
|
||||
text: "New",
|
||||
variant: "new"
|
||||
}
|
||||
}`,...(A=(E=m.parameters)==null?void 0:E.docs)==null?void 0:A.source}}};var V,X,_;i.parameters={...i.parameters,docs:{...(V=i.parameters)==null?void 0:V.docs,source:{originalSource:`{
|
||||
args: {
|
||||
text: "XS Badge",
|
||||
variant: "recommended",
|
||||
size: "xs"
|
||||
}
|
||||
}`,...(_=(X=i.parameters)==null?void 0:X.docs)==null?void 0:_.source}}};var h,O,b;c.parameters={...c.parameters,docs:{...(h=c.parameters)==null?void 0:h.docs,source:{originalSource:`{
|
||||
args: {
|
||||
text: "Small Badge",
|
||||
variant: "gold",
|
||||
size: "sm"
|
||||
}
|
||||
}`,...(b=(O=c.parameters)==null?void 0:O.docs)==null?void 0:b.source}}};var k,q,H;l.parameters={...l.parameters,docs:{...(k=l.parameters)==null?void 0:k.docs,source:{originalSource:`{
|
||||
render: () => <div className="flex flex-wrap gap-2">
|
||||
<CardBadge text="Default" variant="default" />
|
||||
<CardBadge text="Gold" variant="gold" />
|
||||
<CardBadge text="Platinum" variant="platinum" />
|
||||
<CardBadge text="Silver" variant="silver" />
|
||||
<CardBadge text="Recommended" variant="recommended" />
|
||||
<CardBadge text="Family" variant="family" />
|
||||
<CardBadge text="New" variant="new" />
|
||||
</div>
|
||||
}`,...(H=(q=l.parameters)==null?void 0:q.docs)==null?void 0:H.source}}};const L=["Default","Gold","Platinum","Silver","Recommended","Family","New","ExtraSmall","Small","AllVariants"];export{l as AllVariants,r as Default,i as ExtraSmall,d as Family,t as Gold,m as New,s as Platinum,o as Recommended,n as Silver,c as Small,L as __namedExportsOrder,K as default};
|
||||
@ -0,0 +1 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{F as i}from"./CurrencyYenIcon-Bf5bmWZc.js";function d({monthlyPrice:n,oneTimePrice:a,size:m="md",alignment:s="right"}){const r={sm:{monthlyPrice:"text-xl",monthlyLabel:"text-xs",icon:"h-5 w-5",oneTimePrice:"text-sm",oneTimeLabel:"text-xs"},md:{monthlyPrice:"text-2xl",monthlyLabel:"text-sm",icon:"h-6 w-6",oneTimePrice:"text-base",oneTimeLabel:"text-xs"},lg:{monthlyPrice:"text-3xl",monthlyLabel:"text-base",icon:"h-7 w-7",oneTimePrice:"text-lg",oneTimeLabel:"text-sm"}},o=s==="right"?"text-right":"text-left",l=s==="right"?"justify-end":"justify-start";if(!n&&!a)return null;const t=r[m];return e.jsxs("div",{className:`flex-shrink-0 ${o}`,children:[n&&n>0&&e.jsxs("div",{className:`flex items-baseline gap-1 ${l}`,children:[e.jsx(i,{className:`${t.icon} text-gray-600`}),e.jsx("span",{className:`${t.monthlyPrice} font-bold text-gray-900`,children:n.toLocaleString()}),e.jsx("span",{className:`${t.monthlyLabel} text-gray-500 font-normal`,children:"/month"})]}),a&&a>0&&e.jsxs("div",{className:`flex items-baseline gap-1 ${l} ${n?"mt-1":""}`,children:[e.jsx(i,{className:"h-4 w-4 text-orange-600"}),e.jsx("span",{className:`${t.oneTimePrice} font-semibold text-orange-600`,children:a.toLocaleString()}),e.jsx("span",{className:`${t.oneTimeLabel} text-orange-500`,children:"one-time"})]})]})}d.__docgenInfo={description:"",methods:[],displayName:"CardPricing",props:{monthlyPrice:{required:!1,tsType:{name:"union",raw:"number | null | undefined",elements:[{name:"number"},{name:"null"},{name:"undefined"}]},description:""},oneTimePrice:{required:!1,tsType:{name:"union",raw:"number | null | undefined",elements:[{name:"number"},{name:"null"},{name:"undefined"}]},description:""},size:{required:!1,tsType:{name:"union",raw:'"sm" | "md" | "lg" | undefined',elements:[{name:"literal",value:'"sm"'},{name:"literal",value:'"md"'},{name:"literal",value:'"lg"'},{name:"undefined"}]},description:"",defaultValue:{value:'"md"',computed:!1}},alignment:{required:!1,tsType:{name:"union",raw:'"left" | "right" | undefined',elements:[{name:"literal",value:'"left"'},{name:"literal",value:'"right"'},{name:"undefined"}]},description:"",defaultValue:{value:'"right"',computed:!1}}}};export{d as C};
|
||||
@ -0,0 +1,37 @@
|
||||
import{C as M}from"./CardPricing-FcGNWupq.js";import"./jsx-runtime-D_zvdyIk.js";import"./CurrencyYenIcon-Bf5bmWZc.js";import"./index-JhL3uwfD.js";const F={title:"Features/Services/Base/CardPricing",component:M,parameters:{layout:"centered"}},e={args:{monthlyPrice:4980}},r={args:{oneTimePrice:3300}},s={args:{monthlyPrice:4980,oneTimePrice:3300}},n={args:{monthlyPrice:4980,oneTimePrice:3300,size:"sm"}},o={args:{monthlyPrice:4980,oneTimePrice:3300,size:"lg"}},a={args:{monthlyPrice:4980,oneTimePrice:3300,alignment:"left"}},c={args:{monthlyPrice:null,oneTimePrice:null}};var i,t,m;e.parameters={...e.parameters,docs:{...(i=e.parameters)==null?void 0:i.docs,source:{originalSource:`{
|
||||
args: {
|
||||
monthlyPrice: 4980
|
||||
}
|
||||
}`,...(m=(t=e.parameters)==null?void 0:t.docs)==null?void 0:m.source}}};var l,p,g;r.parameters={...r.parameters,docs:{...(l=r.parameters)==null?void 0:l.docs,source:{originalSource:`{
|
||||
args: {
|
||||
oneTimePrice: 3300
|
||||
}
|
||||
}`,...(g=(p=r.parameters)==null?void 0:p.docs)==null?void 0:g.source}}};var P,d,u;s.parameters={...s.parameters,docs:{...(P=s.parameters)==null?void 0:P.docs,source:{originalSource:`{
|
||||
args: {
|
||||
monthlyPrice: 4980,
|
||||
oneTimePrice: 3300
|
||||
}
|
||||
}`,...(u=(d=s.parameters)==null?void 0:d.docs)==null?void 0:u.source}}};var y,h,S;n.parameters={...n.parameters,docs:{...(y=n.parameters)==null?void 0:y.docs,source:{originalSource:`{
|
||||
args: {
|
||||
monthlyPrice: 4980,
|
||||
oneTimePrice: 3300,
|
||||
size: "sm"
|
||||
}
|
||||
}`,...(S=(h=n.parameters)==null?void 0:h.docs)==null?void 0:S.source}}};var T,z,O;o.parameters={...o.parameters,docs:{...(T=o.parameters)==null?void 0:T.docs,source:{originalSource:`{
|
||||
args: {
|
||||
monthlyPrice: 4980,
|
||||
oneTimePrice: 3300,
|
||||
size: "lg"
|
||||
}
|
||||
}`,...(O=(z=o.parameters)==null?void 0:z.docs)==null?void 0:O.source}}};var f,L,B;a.parameters={...a.parameters,docs:{...(f=a.parameters)==null?void 0:f.docs,source:{originalSource:`{
|
||||
args: {
|
||||
monthlyPrice: 4980,
|
||||
oneTimePrice: 3300,
|
||||
alignment: "left"
|
||||
}
|
||||
}`,...(B=(L=a.parameters)==null?void 0:L.docs)==null?void 0:B.source}}};var C,x,A;c.parameters={...c.parameters,docs:{...(C=c.parameters)==null?void 0:C.docs,source:{originalSource:`{
|
||||
args: {
|
||||
monthlyPrice: null,
|
||||
oneTimePrice: null
|
||||
}
|
||||
}`,...(A=(x=c.parameters)==null?void 0:x.docs)==null?void 0:A.source}}};const b=["MonthlyOnly","OneTimeOnly","BothPrices","SmallSize","LargeSize","LeftAligned","NoPrices"];export{s as BothPrices,o as LargeSize,a as LeftAligned,e as MonthlyOnly,c as NoPrices,r as OneTimeOnly,n as SmallSize,b as __namedExportsOrder,F as default};
|
||||
@ -0,0 +1,17 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{fn as n}from"./index-B9TJ7cVi.js";import{r as b}from"./index-JhL3uwfD.js";import{m as o}from"./proxy-ZkTvaR74.js";import{F as y}from"./XMarkIcon-Bsb1W5VN.js";const j=["5GB","10GB","25GB","50GB"];function w({currentPlanCode:f,onClose:a}){const x=f??"",p=j.filter(s=>s!==x),[h,g]=b.useState("");return e.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:e.jsxs("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[e.jsx(o.div,{className:"fixed inset-0 bg-gray-500 bg-opacity-75","aria-hidden":"true",initial:{opacity:0},animate:{opacity:1}}),e.jsx("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:""}),e.jsxs(o.div,{className:"relative z-10 inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},transition:{duration:.2,ease:"easeOut"},children:[e.jsx("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:e.jsx("div",{className:"sm:flex sm:items-start",children:e.jsxs("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Change SIM Plan"}),e.jsx("button",{onClick:a,className:"text-gray-400 hover:text-gray-600",children:e.jsx(y,{className:"h-5 w-5"})})]}),e.jsx("div",{className:"mt-4 space-y-4",children:e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Select New Plan"}),e.jsxs("select",{value:h,onChange:s=>g(s.target.value),className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 text-sm",children:[e.jsx("option",{value:"",children:"Choose a plan"}),p.map(s=>e.jsx("option",{value:s,children:s},s))]}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Only plans different from your current plan are listed. The change will be scheduled for the 1st of the next month."})]})})]})})}),e.jsxs("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[e.jsx("button",{type:"button",className:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm disabled:opacity-50",children:"Change Plan"}),e.jsx("button",{type:"button",onClick:a,className:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",children:"Back"})]})]})]})})}const k={title:"Features/Subscriptions/Sim/ChangePlanModal",component:w,parameters:{layout:"centered"}},t={args:{subscriptionId:123,currentPlanCode:"10GB",onClose:n(),onSuccess:n(),onError:n()}},r={args:{subscriptionId:123,currentPlanCode:void 0,onClose:n(),onSuccess:n(),onError:n()}};var l,i,c;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`{
|
||||
args: {
|
||||
subscriptionId: 123,
|
||||
currentPlanCode: "10GB",
|
||||
onClose: fn(),
|
||||
onSuccess: fn(),
|
||||
onError: fn()
|
||||
}
|
||||
}`,...(c=(i=t.parameters)==null?void 0:i.docs)==null?void 0:c.source}}};var m,d,u;r.parameters={...r.parameters,docs:{...(m=r.parameters)==null?void 0:m.docs,source:{originalSource:`{
|
||||
args: {
|
||||
subscriptionId: 123,
|
||||
currentPlanCode: undefined,
|
||||
onClose: fn(),
|
||||
onSuccess: fn(),
|
||||
onError: fn()
|
||||
}
|
||||
}`,...(u=(d=r.parameters)==null?void 0:d.docs)==null?void 0:u.source}}};const E=["Default","NoPlanSelected"];export{t as Default,r as NoPlanSelected,E as __namedExportsOrder,k as default};
|
||||
@ -0,0 +1,18 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{c as i}from"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";function m({children:l,className:p}){return e.jsx("section",{className:i("relative",p),children:l})}m.__docgenInfo={description:"",methods:[],displayName:"Chapter",props:{children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},className:{required:!1,tsType:{name:"string"},description:""}}};const f={title:"Features/LandingPage/Chapter",component:m,parameters:{layout:"centered"}},a={args:{children:e.jsxs("div",{className:"p-8",children:[e.jsx("h2",{className:"text-2xl font-bold",children:"Chapter Content"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"This is an example section wrapped in a Chapter component."})]})}},s={args:{children:e.jsxs("div",{className:"p-8",children:[e.jsx("h2",{className:"text-2xl font-bold",children:"Styled Chapter"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"This chapter has a custom background class."})]}),className:"bg-muted rounded-xl"}};var t,r,n;a.parameters={...a.parameters,docs:{...(t=a.parameters)==null?void 0:t.docs,source:{originalSource:`{
|
||||
args: {
|
||||
children: <div className="p-8">
|
||||
<h2 className="text-2xl font-bold">Chapter Content</h2>
|
||||
<p className="mt-2 text-muted-foreground">
|
||||
This is an example section wrapped in a Chapter component.
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
}`,...(n=(r=a.parameters)==null?void 0:r.docs)==null?void 0:n.source}}};var o,c,d;s.parameters={...s.parameters,docs:{...(o=s.parameters)==null?void 0:o.docs,source:{originalSource:`{
|
||||
args: {
|
||||
children: <div className="p-8">
|
||||
<h2 className="text-2xl font-bold">Styled Chapter</h2>
|
||||
<p className="mt-2 text-muted-foreground">This chapter has a custom background class.</p>
|
||||
</div>,
|
||||
className: "bg-muted rounded-xl"
|
||||
}
|
||||
}`,...(d=(c=s.parameters)==null?void 0:c.docs)==null?void 0:d.source}}};const C=["Default","WithCustomClass"];export{a as Default,s as WithCustomClass,C as __namedExportsOrder,f as default};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function n({title:r,titleId:t,...o},a){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},o),r?e.createElement("title",{id:t},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 0 1-.825-.242m9.345-8.334a2.126 2.126 0 0 0-.476-.095 48.64 48.64 0 0 0-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0 0 11.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155"}))}const l=e.forwardRef(n);export{l as F};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function o({title:r,titleId:l,...a},t){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":l},a),r?e.createElement("title",{id:l},r):null,e.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const c=e.forwardRef(o);export{c as F};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function a({title:r,titleId:t,...o},n){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},o),r?e.createElement("title",{id:t},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const s=e.forwardRef(a);export{s as F};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function a({title:r,titleId:t,...o},n){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},o),r?e.createElement("title",{id:t},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const i=e.forwardRef(a);export{i as F};
|
||||
@ -0,0 +1,6 @@
|
||||
import{j as r}from"./jsx-runtime-D_zvdyIk.js";import{A as c}from"./AlertBanner-Bnlyj1xc.js";import{B as n}from"./button-C8_cybvS.js";import"./XCircleIcon-CiVBnngB.js";import"./index-JhL3uwfD.js";import"./ExclamationTriangleIcon-Di4DJZFg.js";import"./InformationCircleIcon-Clz7d-56.js";import"./CheckCircleIcon-Dva35lTP.js";import"./next-link-BmD4fPSy.js";import"./index-DXhM58Yq.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./spinner-mU4XywER.js";function i({shopHref:t}){return r.jsx("div",{className:"max-w-2xl mx-auto py-8",children:r.jsx(c,{variant:"error",title:"Checkout Error",elevated:!0,children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{children:"Checkout data is not available"}),r.jsx(n,{as:"a",href:t,variant:"link",children:"Back to Services"})]})})})}i.__docgenInfo={description:`Error fallback displayed when checkout data is not available.
|
||||
Shows an error banner with a link back to services.`,methods:[],displayName:"CheckoutErrorFallback",props:{shopHref:{required:!0,tsType:{name:"string"},description:"The shop href to navigate back to"}}};const w={title:"Features/Checkout/CheckoutErrorFallback",component:i,parameters:{layout:"centered"},decorators:[t=>r.jsx("div",{style:{width:640},children:r.jsx(t,{})})]},e={args:{shopHref:"/account/services"}};var a,o,s;e.parameters={...e.parameters,docs:{...(a=e.parameters)==null?void 0:a.docs,source:{originalSource:`{
|
||||
args: {
|
||||
shopHref: "/account/services"
|
||||
}
|
||||
}`,...(s=(o=e.parameters)==null?void 0:o.docs)==null?void 0:s.source}}};const C=["Default"];export{e as Default,C as __namedExportsOrder,w as default};
|
||||
@ -0,0 +1,16 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as h}from"./index-JhL3uwfD.js";import{L as t}from"./next-link-BmD4fPSy.js";import{L as u}from"./logo-f0fprTjz.js";import{u as n}from"./auth.store-CVqT-1lf.js";import{F as x}from"./ShieldCheckIcon-BBoI5cMX.js";import"./next-image-69WeRggt.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./error-handling-CCxr4Gjn.js";import"./react-C6W-rNNW.js";import"./schema-JsDJirqf.js";import"./schema-Dok_SHcO.js";function d({children:m}){const o=n(s=>s.hasCheckedAuth),a=n(s=>s.checkAuth);return h.useEffect(()=>{o||a()},[a,o]),e.jsxs("div",{className:"min-h-screen flex flex-col bg-background text-foreground",children:[e.jsxs("div",{className:"fixed inset-0 -z-10 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute top-0 left-1/4 w-96 h-96 bg-primary/5 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute bottom-0 right-1/4 w-96 h-96 bg-primary/5 rounded-full blur-3xl"})]}),e.jsx("header",{className:"sticky top-0 z-40 border-b border-border/50 bg-background/80 backdrop-blur-xl",children:e.jsxs("div",{className:"max-w-[var(--cp-page-max-width)] mx-auto px-[var(--cp-page-padding)] py-3 flex items-center justify-between gap-4",children:[e.jsxs(t,{href:"/",className:"inline-flex items-center gap-3 min-w-0 group",children:[e.jsx("span",{className:"inline-flex items-center justify-center h-11 w-11 rounded-xl bg-white border border-border/60 shadow-lg shadow-[#28A6E0]/10 transition-transform group-hover:scale-105",children:e.jsx(u,{size:28})}),e.jsxs("span",{className:"min-w-0 hidden sm:block",children:[e.jsx("span",{className:"block text-base font-bold leading-tight truncate text-foreground",children:"Assist Solutions"}),e.jsx("span",{className:"block text-xs text-muted-foreground leading-tight truncate",children:"Secure Checkout"})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"hidden sm:flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(x,{className:"h-5 w-5 text-success"}),e.jsx("span",{children:"Secure Checkout"})]}),e.jsx(t,{href:"/help",className:"inline-flex items-center rounded-lg px-3 py-2 text-sm font-medium text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",children:"Need Help?"})]})]})}),e.jsx("main",{className:"flex-1",children:e.jsx("div",{className:"max-w-[var(--cp-page-max-width)] mx-auto px-[var(--cp-page-padding)] py-8 sm:py-12",children:m})}),e.jsx("footer",{className:"border-t border-border/50 bg-muted/30",children:e.jsx("div",{className:"max-w-[var(--cp-page-max-width)] mx-auto px-[var(--cp-page-padding)] py-6",children:e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{children:["© ",new Date().getFullYear()," Assist Solutions"]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(t,{href:"#",className:"hover:text-foreground transition-colors",children:"Privacy Policy"}),e.jsx(t,{href:"#",className:"hover:text-foreground transition-colors",children:"Terms of Service"})]})]})})})]})}d.__docgenInfo={description:`CheckoutShell - Minimal shell for checkout flow
|
||||
|
||||
Features:
|
||||
- Logo linking to homepage
|
||||
- Security badge
|
||||
- Support link
|
||||
- Clean, focused design`,methods:[],displayName:"CheckoutShell",props:{children:{required:!0,tsType:{name:"ReactNode"},description:""}}};const F={title:"Features/Checkout/CheckoutShell",component:d,parameters:{layout:"fullscreen"}},r={args:{children:e.jsxs("div",{className:"text-center py-20",children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Checkout Content Area"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"This area would contain the checkout form."})]})}};var c,i,l;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:`{
|
||||
args: {
|
||||
children: <div className="text-center py-20">
|
||||
<h1 className="text-2xl font-bold">Checkout Content Area</h1>
|
||||
<p className="text-muted-foreground mt-2">
|
||||
This area would contain the checkout form.
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
}`,...(l=(i=r.parameters)==null?void 0:i.docs)==null?void 0:l.source}}};const L=["Default"];export{r as Default,L as __namedExportsOrder,F as default};
|
||||
@ -0,0 +1,88 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{B as l}from"./button-C8_cybvS.js";import{A as t}from"./AlertBanner-Bnlyj1xc.js";import"./index-BKyvj4H5.js";import{fn as r}from"./index-B9TJ7cVi.js";import"./index-JhL3uwfD.js";import"./next-link-BmD4fPSy.js";import"./index-DXhM58Yq.js";import"./cn-CDN07tui.js";import"./spinner-mU4XywER.js";import"./XCircleIcon-CiVBnngB.js";import"./ExclamationTriangleIcon-Di4DJZFg.js";import"./InformationCircleIcon-Clz7d-56.js";import"./CheckCircleIcon-Dva35lTP.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";function U(i,n){if(typeof window>"u")return!0;const s=n==null?void 0:n.trim(),a=s?`
|
||||
|
||||
${s}`:"";return window.confirm(`${i}${a}`)}function Y({eligibility:i,eligibilityRequest:n,hasServiceAddress:s,addressLabel:a,userAddress:o,planSku:b}){return i.isLoading?e.jsx(t,{variant:"info",title:"Checking availability…",elevated:!0,children:"We're loading your current eligibility status."}):i.isError?e.jsx(t,{variant:"warning",title:"Unable to verify availability right now",elevated:!0,children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3",children:[e.jsx("span",{className:"text-sm text-foreground/80",children:"Please try again in a moment. If this continues, contact support."}),e.jsx(l,{type:"button",size:"sm",className:"sm:ml-auto",onClick:()=>void i.refetch(),children:"Try again"})]})}):i.isPending?e.jsx(t,{variant:"info",title:"Availability review in progress",elevated:!0,children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3",children:[e.jsx("span",{className:"text-sm text-foreground/80",children:"We're verifying whether our service is available at your residence. Once eligibility is confirmed, you can submit your internet order."}),e.jsx(l,{as:"a",href:"/account/services/internet",size:"sm",className:"sm:ml-auto",children:"View status"})]})}):i.isNotRequested?e.jsx(J,{eligibilityRequest:n,hasServiceAddress:s,addressLabel:a,userAddress:o,planSku:b}):i.isIneligible?e.jsx(t,{variant:"warning",title:"Service not available",elevated:!0,children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm text-foreground/80",children:"Our team reviewed your address and determined service isn't available right now."}),e.jsx(Z,{notes:i.notes,requestedAt:i.requestedAt}),e.jsx(l,{as:"a",href:"/account/support/new",size:"sm",children:"Contact support"})]})}):null}function Z({notes:i,requestedAt:n}){return i?e.jsx("p",{className:"text-xs text-muted-foreground",children:i}):n?e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Last updated: ",new Date(n).toLocaleString()]}):null}function J({eligibilityRequest:i,hasServiceAddress:n,addressLabel:s,userAddress:a,planSku:o}){return e.jsx(t,{variant:"info",title:"Eligibility review required",elevated:!0,children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3",children:[e.jsx("span",{className:"text-sm text-foreground/80",children:"Request an eligibility review to confirm service availability for your address before submitting an internet order."}),n?e.jsx(l,{type:"button",size:"sm",className:"sm:ml-auto",disabled:i.isPending,isLoading:i.isPending,loadingText:"Requesting…",onClick:()=>void(async()=>{U("Request an eligibility review for this address?",s)&&i.mutate({address:a??void 0,notes:o?`Requested during checkout. Selected plan SKU: ${o}`:"Requested during checkout."})})(),children:"Request review"}):e.jsx(l,{as:"a",href:"/account/settings",size:"sm",className:"sm:ml-auto",children:"Add address"})]})})}function D({activeInternetWarning:i,...n}){return e.jsxs(e.Fragment,{children:[i&&e.jsx(t,{variant:"warning",title:"Existing Internet Subscription",elevated:!0,children:e.jsx("span",{className:"text-sm text-foreground/80",children:i})}),e.jsx(Y,{...n})]})}D.__docgenInfo={description:"",methods:[],displayName:"CheckoutStatusBanners",props:{activeInternetWarning:{required:!0,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},eligibility:{required:!0,tsType:{name:"signature",type:"object",raw:`{
|
||||
isLoading: boolean;
|
||||
isError: boolean;
|
||||
isPending: boolean;
|
||||
isNotRequested: boolean;
|
||||
isIneligible: boolean;
|
||||
notes?: string | null | undefined;
|
||||
requestedAt?: string | null | undefined;
|
||||
refetch: () => void;
|
||||
}`,signature:{properties:[{key:"isLoading",value:{name:"boolean",required:!0}},{key:"isError",value:{name:"boolean",required:!0}},{key:"isPending",value:{name:"boolean",required:!0}},{key:"isNotRequested",value:{name:"boolean",required:!0}},{key:"isIneligible",value:{name:"boolean",required:!0}},{key:"notes",value:{name:"union",raw:"string | null | undefined",elements:[{name:"string"},{name:"null"},{name:"undefined"}],required:!1}},{key:"requestedAt",value:{name:"union",raw:"string | null | undefined",elements:[{name:"string"},{name:"null"},{name:"undefined"}],required:!1}},{key:"refetch",value:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}},required:!0}}]}},description:""},eligibilityRequest:{required:!0,tsType:{name:"signature",type:"object",raw:`{
|
||||
isPending: boolean;
|
||||
mutate: (data: { address?: Partial<Address> | undefined; notes?: string | undefined }) => void;
|
||||
}`,signature:{properties:[{key:"isPending",value:{name:"boolean",required:!0}},{key:"mutate",value:{name:"signature",type:"function",raw:"(data: { address?: Partial<Address> | undefined; notes?: string | undefined }) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{ address?: Partial<Address> | undefined; notes?: string | undefined }",signature:{properties:[{key:"address",value:{name:"union",raw:"Partial<Address> | undefined",elements:[{name:"Partial",elements:[{name:"z.infer",elements:[{name:"addressSchema"}],raw:"z.infer<typeof addressSchema>"}],raw:"Partial<Address>"},{name:"undefined"}],required:!1}},{key:"notes",value:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}],required:!1}}]}},name:"data"}],return:{name:"void"}},required:!0}}]}},description:""},hasServiceAddress:{required:!0,tsType:{name:"boolean"},description:""},addressLabel:{required:!0,tsType:{name:"string"},description:""},userAddress:{required:!1,tsType:{name:"union",raw:"Partial<Address> | undefined",elements:[{name:"Partial",elements:[{name:"z.infer",elements:[{name:"addressSchema"}],raw:"z.infer<typeof addressSchema>"}],raw:"Partial<Address>"},{name:"undefined"}]},description:""},planSku:{required:!1,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""}}};const de={title:"Features/Checkout/CheckoutStatusBanners",component:D,parameters:{layout:"centered"},decorators:[i=>e.jsx("div",{style:{width:640},children:e.jsx(i,{})})],args:{activeInternetWarning:null,eligibility:{isLoading:!1,isError:!1,isPending:!1,isNotRequested:!1,isIneligible:!1,notes:null,requestedAt:null,refetch:r()},eligibilityRequest:{isPending:!1,mutate:r()},hasServiceAddress:!0,addressLabel:"123 Tokyo Street, Shibuya-ku, Tokyo",userAddress:{address1:"123 Tokyo Street",city:"Tokyo",state:"Shibuya-ku",postcode:"150-0001",country:"JP"},planSku:"FIBER-100"}},d={},u={args:{activeInternetWarning:"You already have an active internet subscription. Adding a new one may result in duplicate billing."}},c={args:{eligibility:{isLoading:!0,isError:!1,isPending:!1,isNotRequested:!1,isIneligible:!1,refetch:r()}}},m={args:{eligibility:{isLoading:!1,isError:!0,isPending:!1,isNotRequested:!1,isIneligible:!1,refetch:r()}}},g={args:{eligibility:{isLoading:!1,isError:!1,isPending:!0,isNotRequested:!1,isIneligible:!1,refetch:r()}}},f={args:{eligibility:{isLoading:!1,isError:!1,isPending:!1,isNotRequested:!0,isIneligible:!1,refetch:r()}}},p={args:{hasServiceAddress:!1,eligibility:{isLoading:!1,isError:!1,isPending:!1,isNotRequested:!0,isIneligible:!1,refetch:r()}}},y={args:{eligibility:{isLoading:!1,isError:!1,isPending:!1,isNotRequested:!1,isIneligible:!0,notes:"Service is not available in your area due to infrastructure limitations.",requestedAt:"2026-03-01T10:00:00Z",refetch:r()}}};var v,h,x;d.parameters={...d.parameters,docs:{...(v=d.parameters)==null?void 0:v.docs,source:{originalSource:"{}",...(x=(h=d.parameters)==null?void 0:h.docs)==null?void 0:x.source}}};var q,w,N;u.parameters={...u.parameters,docs:{...(q=u.parameters)==null?void 0:q.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activeInternetWarning: "You already have an active internet subscription. Adding a new one may result in duplicate billing."
|
||||
}
|
||||
}`,...(N=(w=u.parameters)==null?void 0:w.docs)==null?void 0:N.source}}};var E,P,j;c.parameters={...c.parameters,docs:{...(E=c.parameters)==null?void 0:E.docs,source:{originalSource:`{
|
||||
args: {
|
||||
eligibility: {
|
||||
isLoading: true,
|
||||
isError: false,
|
||||
isPending: false,
|
||||
isNotRequested: false,
|
||||
isIneligible: false,
|
||||
refetch: fn()
|
||||
}
|
||||
}
|
||||
}`,...(j=(P=c.parameters)==null?void 0:P.docs)==null?void 0:j.source}}};var S,A,R;m.parameters={...m.parameters,docs:{...(S=m.parameters)==null?void 0:S.docs,source:{originalSource:`{
|
||||
args: {
|
||||
eligibility: {
|
||||
isLoading: false,
|
||||
isError: true,
|
||||
isPending: false,
|
||||
isNotRequested: false,
|
||||
isIneligible: false,
|
||||
refetch: fn()
|
||||
}
|
||||
}
|
||||
}`,...(R=(A=m.parameters)==null?void 0:A.docs)==null?void 0:R.source}}};var k,I,L;g.parameters={...g.parameters,docs:{...(k=g.parameters)==null?void 0:k.docs,source:{originalSource:`{
|
||||
args: {
|
||||
eligibility: {
|
||||
isLoading: false,
|
||||
isError: false,
|
||||
isPending: true,
|
||||
isNotRequested: false,
|
||||
isIneligible: false,
|
||||
refetch: fn()
|
||||
}
|
||||
}
|
||||
}`,...(L=(I=g.parameters)==null?void 0:I.docs)==null?void 0:L.source}}};var T,W,z;f.parameters={...f.parameters,docs:{...(T=f.parameters)==null?void 0:T.docs,source:{originalSource:`{
|
||||
args: {
|
||||
eligibility: {
|
||||
isLoading: false,
|
||||
isError: false,
|
||||
isPending: false,
|
||||
isNotRequested: true,
|
||||
isIneligible: false,
|
||||
refetch: fn()
|
||||
}
|
||||
}
|
||||
}`,...(z=(W=f.parameters)==null?void 0:W.docs)==null?void 0:z.source}}};var B,C,_;p.parameters={...p.parameters,docs:{...(B=p.parameters)==null?void 0:B.docs,source:{originalSource:`{
|
||||
args: {
|
||||
hasServiceAddress: false,
|
||||
eligibility: {
|
||||
isLoading: false,
|
||||
isError: false,
|
||||
isPending: false,
|
||||
isNotRequested: true,
|
||||
isIneligible: false,
|
||||
refetch: fn()
|
||||
}
|
||||
}
|
||||
}`,...(_=(C=p.parameters)==null?void 0:C.docs)==null?void 0:_.source}}};var $,F,O;y.parameters={...y.parameters,docs:{...($=y.parameters)==null?void 0:$.docs,source:{originalSource:`{
|
||||
args: {
|
||||
eligibility: {
|
||||
isLoading: false,
|
||||
isError: false,
|
||||
isPending: false,
|
||||
isNotRequested: false,
|
||||
isIneligible: true,
|
||||
notes: "Service is not available in your area due to infrastructure limitations.",
|
||||
requestedAt: "2026-03-01T10:00:00Z",
|
||||
refetch: fn()
|
||||
}
|
||||
}
|
||||
}`,...(O=(F=y.parameters)==null?void 0:F.docs)==null?void 0:O.source}}};const ue=["NoWarnings","ActiveInternetWarning","EligibilityLoading","EligibilityError","EligibilityPending","EligibilityNotRequested","EligibilityNotRequestedNoAddress","Ineligible"];export{u as ActiveInternetWarning,m as EligibilityError,c as EligibilityLoading,f as EligibilityNotRequested,p as EligibilityNotRequestedNoAddress,g as EligibilityPending,y as Ineligible,d as NoWarnings,ue as __namedExportsOrder,de as default};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function a({title:r,titleId:t,...o},n){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},o),r?e.createElement("title",{id:t},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const s=e.forwardRef(a);export{s as F};
|
||||
@ -0,0 +1,4 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{c as n}from"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import{F as i}from"./XMarkIcon-Bsb1W5VN.js";function l({onClick:t,show:r=!0,label:s="Clear",className:a}){return r?e.jsxs("button",{onClick:t,className:n("flex items-center gap-1 px-3 py-2 text-sm","text-muted-foreground hover:text-foreground hover:bg-muted","rounded-lg transition-colors",a),children:[e.jsx(i,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:s})]}):null}l.__docgenInfo={description:`ClearFiltersButton - Reusable clear filters button with consistent styling.
|
||||
|
||||
Used across list pages (Orders, Support, Invoices) to reset filters.
|
||||
Only renders when \`show\` is true (defaults to true).`,methods:[],displayName:"ClearFiltersButton",props:{onClick:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"Callback when button is clicked"},show:{required:!1,tsType:{name:"boolean"},description:"Whether the button should be visible (typically when filters are active)",defaultValue:{value:"true",computed:!1}},label:{required:!1,tsType:{name:"string"},description:'Optional label text (default: "Clear")',defaultValue:{value:'"Clear"',computed:!1}},className:{required:!1,tsType:{name:"string"},description:"Optional additional class names"}}};export{l as C};
|
||||
@ -0,0 +1,17 @@
|
||||
import{C as u}from"./ClearFiltersButton-CPCoyXk2.js";import"./jsx-runtime-D_zvdyIk.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./XMarkIcon-Bsb1W5VN.js";import"./index-JhL3uwfD.js";const F={title:"Molecules/ClearFiltersButton",component:u},e={args:{onClick:()=>alert("Cleared!"),show:!0}},r={args:{onClick:()=>{},show:!0,label:"Reset Filters"}},s={args:{onClick:()=>{},show:!1}};var o,a,t;e.parameters={...e.parameters,docs:{...(o=e.parameters)==null?void 0:o.docs,source:{originalSource:`{
|
||||
args: {
|
||||
onClick: () => alert("Cleared!"),
|
||||
show: true
|
||||
}
|
||||
}`,...(t=(a=e.parameters)==null?void 0:a.docs)==null?void 0:t.source}}};var n,l,c;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{
|
||||
args: {
|
||||
onClick: () => {},
|
||||
show: true,
|
||||
label: "Reset Filters"
|
||||
}
|
||||
}`,...(c=(l=r.parameters)==null?void 0:l.docs)==null?void 0:c.source}}};var i,m,p;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`{
|
||||
args: {
|
||||
onClick: () => {},
|
||||
show: false
|
||||
}
|
||||
}`,...(p=(m=s.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};const S=["Default","CustomLabel","Hidden"];export{r as CustomLabel,e as Default,s as Hidden,S as __namedExportsOrder,F as default};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function a({title:r,titleId:o,...t},n){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":o},t),r?e.createElement("title",{id:o},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const i=e.forwardRef(a);export{i as F};
|
||||
@ -0,0 +1 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as d}from"./index-JhL3uwfD.js";import{m as i}from"./proxy-ZkTvaR74.js";import{C as l}from"./chevron-down-CuGyZVZ6.js";import{A as c}from"./index-CNXKWNLp.js";function m({title:r,icon:s,defaultOpen:o=!1,children:a}){const[t,n]=d.useState(o);return e.jsxs("div",{className:"border border-border/60 rounded-xl overflow-hidden bg-card",children:[e.jsxs("button",{type:"button",onClick:()=>n(!t),className:"w-full flex items-center justify-between p-4 text-left hover:bg-muted/30 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(s,{className:"w-4 h-4 text-primary"}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:r})]}),e.jsx(i.div,{animate:{rotate:t?180:0},transition:{duration:.2},children:e.jsx(l,{className:"w-4 h-4 text-muted-foreground"})})]}),e.jsx(c,{initial:!1,children:t&&e.jsx(i.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:"easeOut"},style:{overflow:"hidden"},children:e.jsx("div",{className:"p-4 pt-0 border-t border-border/60",children:a})})})]})}m.__docgenInfo={description:"",methods:[],displayName:"CollapsibleSection",props:{title:{required:!0,tsType:{name:"string"},description:""},icon:{required:!0,tsType:{name:"ElementType"},description:""},defaultOpen:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},children:{required:!0,tsType:{name:"ReactNode"},description:""}}};export{m as C};
|
||||
@ -0,0 +1,35 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{C as x}from"./CollapsibleSection-CChCyQrB.js";import{S as f}from"./settings-BcEpseup.js";import{I as g}from"./info-Ck405yVi.js";import{C as h}from"./circle-question-mark-CauZ9VmE.js";import"./index-JhL3uwfD.js";import"./proxy-ZkTvaR74.js";import"./chevron-down-CuGyZVZ6.js";import"./createLucideIcon-CctB0W3q.js";import"./index-CNXKWNLp.js";const T={title:"Features/Services/Base/CollapsibleSection",component:x,parameters:{layout:"centered"},decorators:[u=>e.jsx("div",{style:{maxWidth:500},children:e.jsx(u,{})})]},t={args:{title:"Advanced Settings",icon:f,children:e.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[e.jsx("p",{children:"Configure advanced settings for your plan."}),e.jsx("p",{children:"These settings are optional and can be changed later."})]})}},s={args:{title:"Important Information",icon:g,defaultOpen:!0,children:e.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[e.jsx("p",{children:"This section is open by default."}),e.jsx("p",{children:"It contains important details about your service."})]})}},n={args:{title:"Need Help?",icon:h,children:e.jsxs("div",{className:"space-y-3 text-sm",children:[e.jsx("p",{className:"text-muted-foreground",children:"If you need assistance, contact our support team."}),e.jsxs("ul",{className:"list-disc list-inside text-muted-foreground space-y-1",children:[e.jsx("li",{children:"Phone: 0120-XXX-XXX"}),e.jsx("li",{children:"Email: support@example.com"}),e.jsx("li",{children:"Hours: 9:00 - 18:00 JST"})]})]})}};var r,a,o;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`{
|
||||
args: {
|
||||
title: "Advanced Settings",
|
||||
icon: Settings,
|
||||
children: <div className="space-y-2 text-sm text-muted-foreground">
|
||||
<p>Configure advanced settings for your plan.</p>
|
||||
<p>These settings are optional and can be changed later.</p>
|
||||
</div>
|
||||
}
|
||||
}`,...(o=(a=t.parameters)==null?void 0:a.docs)==null?void 0:o.source}}};var i,c,l;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`{
|
||||
args: {
|
||||
title: "Important Information",
|
||||
icon: Info,
|
||||
defaultOpen: true,
|
||||
children: <div className="space-y-2 text-sm text-muted-foreground">
|
||||
<p>This section is open by default.</p>
|
||||
<p>It contains important details about your service.</p>
|
||||
</div>
|
||||
}
|
||||
}`,...(l=(c=s.parameters)==null?void 0:c.docs)==null?void 0:l.source}}};var d,p,m;n.parameters={...n.parameters,docs:{...(d=n.parameters)==null?void 0:d.docs,source:{originalSource:`{
|
||||
args: {
|
||||
title: "Need Help?",
|
||||
icon: HelpCircle,
|
||||
children: <div className="space-y-3 text-sm">
|
||||
<p className="text-muted-foreground">
|
||||
If you need assistance, contact our support team.
|
||||
</p>
|
||||
<ul className="list-disc list-inside text-muted-foreground space-y-1">
|
||||
<li>Phone: 0120-XXX-XXX</li>
|
||||
<li>Email: support@example.com</li>
|
||||
<li>Hours: 9:00 - 18:00 JST</li>
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
}`,...(m=(p=n.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};const O=["Default","DefaultOpen","HelpSection"];export{t as Default,s as DefaultOpen,n as HelpSection,O as __namedExportsOrder,T as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
import{j as r}from"./jsx-runtime-D_zvdyIk.js";import{A as j}from"./AnimatedCard-DFAiX4zP.js";import"./StepIndicator-chJR-dG8.js";import{S as w,d as A}from"./StepHeader-D_31J9G_.js";import{S as R}from"./StepActions-x37eBfO8.js";import{S as L}from"./StepContent-D57mrCa_.js";import"./ValidationStatus-Dsgne9Qr.js";import"./HelpPanel-rRaRP4jS.js";import"./InfoPanel-CAJ6XA4c.js";function k(a,s){return a==="highlighted"?"highlighted":s?"static":"default"}function E({stepNumber:a,title:s,description:n,isActive:o=!0,isCompleted:u=!1,isDisabled:e=!1,validation:t,children:d,helpText:l,infoText:p,onNext:m,onPrevious:f,onSkip:c,nextLabel:g,previousLabel:y,skipLabel:T,showActions:h=!0,variant:q="default",showStepIndicator:v=!0,loading:S=!1,disabled:b=!1,headerContent:x,footerContent:i}){const V=A({isActive:o,isCompleted:u,isDisabled:e}),C=(t==null?void 0:t.errors)&&t.errors.length>0,N=h&&!e;return r.jsxs(j,{variant:k(q,e),className:`p-6 ${e?"opacity-60":""}`,children:[r.jsx(w,{stepNumber:a,title:s,description:n,status:V,validation:t,showStepIndicator:v,headerContent:x}),r.jsx(L,{helpText:l,infoText:p,isDisabled:e,children:d}),N&&r.jsx(R,{onNext:m,onPrevious:f,onSkip:c,nextLabel:g,previousLabel:y,skipLabel:T,loading:S,disabled:b,hasErrors:C}),i&&r.jsx("div",{className:"mt-6 pt-4 border-t border-gray-200",children:i})]})}E.__docgenInfo={description:"",methods:[],displayName:"ConfigurationStep",props:{stepNumber:{required:!0,tsType:{name:"number"},description:""},title:{required:!0,tsType:{name:"string"},description:""},description:{required:!1,tsType:{name:"string"},description:""},isActive:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},isCompleted:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},isDisabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},validation:{required:!1,tsType:{name:"StepValidation"},description:""},children:{required:!0,tsType:{name:"ReactNode"},description:""},helpText:{required:!1,tsType:{name:"string"},description:""},infoText:{required:!1,tsType:{name:"string"},description:""},onNext:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},onPrevious:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},onSkip:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},nextLabel:{required:!1,tsType:{name:"string"},description:""},previousLabel:{required:!1,tsType:{name:"string"},description:""},skipLabel:{required:!1,tsType:{name:"string"},description:""},showActions:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},variant:{required:!1,tsType:{name:"union",raw:'"default" | "highlighted" | "compact"',elements:[{name:"literal",value:'"default"'},{name:"literal",value:'"highlighted"'},{name:"literal",value:'"compact"'}]},description:"",defaultValue:{value:'"default"',computed:!1}},showStepIndicator:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},loading:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},headerContent:{required:!1,tsType:{name:"ReactNode"},description:""},footerContent:{required:!1,tsType:{name:"ReactNode"},description:""}}};export{E as C};
|
||||
@ -0,0 +1,111 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{C as _}from"./ConfigurationStep-xBkwMSbV.js";import"./AnimatedCard-DFAiX4zP.js";import"./proxy-ZkTvaR74.js";import"./index-JhL3uwfD.js";import"./StepIndicator-chJR-dG8.js";import"./CheckCircleIcon-Dva35lTP.js";import"./StepHeader-D_31J9G_.js";import"./ValidationStatus-Dsgne9Qr.js";import"./ExclamationTriangleIcon-Di4DJZFg.js";import"./StepActions-x37eBfO8.js";import"./button-C8_cybvS.js";import"./next-link-BmD4fPSy.js";import"./index-DXhM58Yq.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./spinner-mU4XywER.js";import"./StepContent-D57mrCa_.js";import"./HelpPanel-rRaRP4jS.js";import"./InformationCircleIcon-Clz7d-56.js";import"./InfoPanel-CAJ6XA4c.js";const ue={title:"Features/Services/Base/ConfigurationStep",component:_,parameters:{layout:"centered"},decorators:[Y=>e.jsx("div",{style:{maxWidth:600},children:e.jsx(Y,{})})]},r={args:{stepNumber:1,title:"Select Your Plan",description:"Choose the internet plan that best fits your needs.",isActive:!0,children:e.jsx("div",{className:"p-4 bg-gray-50 rounded border",children:"Step content goes here"}),onNext:()=>{},onPrevious:()=>{}}},t={args:{stepNumber:1,title:"Plan Selected",description:"Fiber Internet 1G plan selected.",isCompleted:!0,children:e.jsx("div",{className:"p-4 bg-green-50 rounded border border-green-200",children:"Plan configured successfully"}),validation:{isValid:!0},onNext:()=>{}}},i={args:{stepNumber:3,title:"Payment Method",description:"Complete previous steps first.",isDisabled:!0,children:e.jsx("div",{children:"This content is hidden when disabled"})}},s={args:{stepNumber:2,title:"Configure Add-ons",description:"Select optional add-on services.",isActive:!0,children:e.jsx("div",{className:"p-4 bg-red-50 rounded border border-red-200",children:"Form with errors"}),validation:{isValid:!1,errors:["Please select at least one add-on","Invalid configuration"]},onNext:()=>{},onPrevious:()=>{}}},n={args:{stepNumber:2,title:"Address Verification",description:"Confirm your installation address.",isActive:!0,children:e.jsx("div",{className:"p-4 bg-amber-50 rounded border border-amber-200",children:"Address form"}),validation:{isValid:!0,warnings:["Address could not be verified automatically"]},onNext:()=>{}}},o={args:{stepNumber:1,title:"Choose Speed Tier",description:"Select your preferred connection speed.",isActive:!0,children:e.jsx("div",{className:"p-4 bg-gray-50 rounded border",children:"Speed selection form"}),helpText:"Higher speeds are recommended for households with multiple devices.",infoText:"All plans include unlimited data and free router rental.",onNext:()=>{}}},d={args:{stepNumber:2,title:"Processing Order",description:"Please wait while we process your configuration.",isActive:!0,children:e.jsx("div",{className:"p-4 bg-gray-50 rounded border",children:"Processing..."}),loading:!0,onNext:()=>{}}},a={args:{stepNumber:2,title:"Optional Add-ons",description:"Add optional services or skip this step.",isActive:!0,children:e.jsx("div",{className:"p-4 bg-gray-50 rounded border",children:"Add-on selection"}),onNext:()=>{},onPrevious:()=>{},onSkip:()=>{},skipLabel:"Skip Add-ons"}},c={args:{stepNumber:1,title:"Featured Step",description:"This step uses the highlighted card variant.",isActive:!0,variant:"highlighted",children:e.jsx("div",{className:"p-4 bg-blue-50 rounded border border-blue-200",children:"Highlighted content"}),onNext:()=>{}}},l={args:{stepNumber:1,title:"Simple Step",description:"Without the step number indicator.",isActive:!0,showStepIndicator:!1,children:e.jsx("div",{className:"p-4 bg-gray-50 rounded border",children:"Content"}),onNext:()=>{}}};var p,u,m;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`{
|
||||
args: {
|
||||
stepNumber: 1,
|
||||
title: "Select Your Plan",
|
||||
description: "Choose the internet plan that best fits your needs.",
|
||||
isActive: true,
|
||||
children: <div className="p-4 bg-gray-50 rounded border">Step content goes here</div>,
|
||||
onNext: () => {},
|
||||
onPrevious: () => {}
|
||||
}
|
||||
}`,...(m=(u=r.parameters)==null?void 0:u.docs)==null?void 0:m.source}}};var g,h,b;t.parameters={...t.parameters,docs:{...(g=t.parameters)==null?void 0:g.docs,source:{originalSource:`{
|
||||
args: {
|
||||
stepNumber: 1,
|
||||
title: "Plan Selected",
|
||||
description: "Fiber Internet 1G plan selected.",
|
||||
isCompleted: true,
|
||||
children: <div className="p-4 bg-green-50 rounded border border-green-200">Plan configured successfully</div>,
|
||||
validation: {
|
||||
isValid: true
|
||||
},
|
||||
onNext: () => {}
|
||||
}
|
||||
}`,...(b=(h=t.parameters)==null?void 0:h.docs)==null?void 0:b.source}}};var v,N,f;i.parameters={...i.parameters,docs:{...(v=i.parameters)==null?void 0:v.docs,source:{originalSource:`{
|
||||
args: {
|
||||
stepNumber: 3,
|
||||
title: "Payment Method",
|
||||
description: "Complete previous steps first.",
|
||||
isDisabled: true,
|
||||
children: <div>This content is hidden when disabled</div>
|
||||
}
|
||||
}`,...(f=(N=i.parameters)==null?void 0:N.docs)==null?void 0:f.source}}};var S,A,x;s.parameters={...s.parameters,docs:{...(S=s.parameters)==null?void 0:S.docs,source:{originalSource:`{
|
||||
args: {
|
||||
stepNumber: 2,
|
||||
title: "Configure Add-ons",
|
||||
description: "Select optional add-on services.",
|
||||
isActive: true,
|
||||
children: <div className="p-4 bg-red-50 rounded border border-red-200">Form with errors</div>,
|
||||
validation: {
|
||||
isValid: false,
|
||||
errors: ["Please select at least one add-on", "Invalid configuration"]
|
||||
},
|
||||
onNext: () => {},
|
||||
onPrevious: () => {}
|
||||
}
|
||||
}`,...(x=(A=s.parameters)==null?void 0:A.docs)==null?void 0:x.source}}};var y,P,C;n.parameters={...n.parameters,docs:{...(y=n.parameters)==null?void 0:y.docs,source:{originalSource:`{
|
||||
args: {
|
||||
stepNumber: 2,
|
||||
title: "Address Verification",
|
||||
description: "Confirm your installation address.",
|
||||
isActive: true,
|
||||
children: <div className="p-4 bg-amber-50 rounded border border-amber-200">Address form</div>,
|
||||
validation: {
|
||||
isValid: true,
|
||||
warnings: ["Address could not be verified automatically"]
|
||||
},
|
||||
onNext: () => {}
|
||||
}
|
||||
}`,...(C=(P=n.parameters)==null?void 0:P.docs)==null?void 0:C.source}}};var w,j,W;o.parameters={...o.parameters,docs:{...(w=o.parameters)==null?void 0:w.docs,source:{originalSource:`{
|
||||
args: {
|
||||
stepNumber: 1,
|
||||
title: "Choose Speed Tier",
|
||||
description: "Select your preferred connection speed.",
|
||||
isActive: true,
|
||||
children: <div className="p-4 bg-gray-50 rounded border">Speed selection form</div>,
|
||||
helpText: "Higher speeds are recommended for households with multiple devices.",
|
||||
infoText: "All plans include unlimited data and free router rental.",
|
||||
onNext: () => {}
|
||||
}
|
||||
}`,...(W=(j=o.parameters)==null?void 0:j.docs)==null?void 0:W.source}}};var k,I,T;d.parameters={...d.parameters,docs:{...(k=d.parameters)==null?void 0:k.docs,source:{originalSource:`{
|
||||
args: {
|
||||
stepNumber: 2,
|
||||
title: "Processing Order",
|
||||
description: "Please wait while we process your configuration.",
|
||||
isActive: true,
|
||||
children: <div className="p-4 bg-gray-50 rounded border">Processing...</div>,
|
||||
loading: true,
|
||||
onNext: () => {}
|
||||
}
|
||||
}`,...(T=(I=d.parameters)==null?void 0:I.docs)==null?void 0:T.source}}};var V,H,F;a.parameters={...a.parameters,docs:{...(V=a.parameters)==null?void 0:V.docs,source:{originalSource:`{
|
||||
args: {
|
||||
stepNumber: 2,
|
||||
title: "Optional Add-ons",
|
||||
description: "Add optional services or skip this step.",
|
||||
isActive: true,
|
||||
children: <div className="p-4 bg-gray-50 rounded border">Add-on selection</div>,
|
||||
onNext: () => {},
|
||||
onPrevious: () => {},
|
||||
onSkip: () => {},
|
||||
skipLabel: "Skip Add-ons"
|
||||
}
|
||||
}`,...(F=(H=a.parameters)==null?void 0:H.docs)==null?void 0:F.source}}};var O,D,E;c.parameters={...c.parameters,docs:{...(O=c.parameters)==null?void 0:O.docs,source:{originalSource:`{
|
||||
args: {
|
||||
stepNumber: 1,
|
||||
title: "Featured Step",
|
||||
description: "This step uses the highlighted card variant.",
|
||||
isActive: true,
|
||||
variant: "highlighted",
|
||||
children: <div className="p-4 bg-blue-50 rounded border border-blue-200">Highlighted content</div>,
|
||||
onNext: () => {}
|
||||
}
|
||||
}`,...(E=(D=c.parameters)==null?void 0:D.docs)==null?void 0:E.source}}};var L,G,M;l.parameters={...l.parameters,docs:{...(L=l.parameters)==null?void 0:L.docs,source:{originalSource:`{
|
||||
args: {
|
||||
stepNumber: 1,
|
||||
title: "Simple Step",
|
||||
description: "Without the step number indicator.",
|
||||
isActive: true,
|
||||
showStepIndicator: false,
|
||||
children: <div className="p-4 bg-gray-50 rounded border">Content</div>,
|
||||
onNext: () => {}
|
||||
}
|
||||
}`,...(M=(G=l.parameters)==null?void 0:G.docs)==null?void 0:M.source}}};const me=["Active","Completed","Disabled","WithValidationErrors","WithWarnings","WithHelpAndInfo","Loading","WithSkipAction","Highlighted","NoStepIndicator"];export{r as Active,t as Completed,i as Disabled,c as Highlighted,d as Loading,l as NoStepIndicator,o as WithHelpAndInfo,a as WithSkipAction,s as WithValidationErrors,n as WithWarnings,me as __namedExportsOrder,ue as default};
|
||||
@ -0,0 +1 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{P as t}from"./PageLayout-CxVUl3Jy.js";import{F as d}from"./ServerIcon-Cf--50di.js";import"./next-link-BmD4fPSy.js";import"./index-JhL3uwfD.js";import"./skeleton-ISCbfaf8.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./loading-card-BIOTKPal.js";import"./button-C8_cybvS.js";import"./index-DXhM58Yq.js";import"./spinner-mU4XywER.js";import"./input-BbGJiz0K.js";import"./password-input-D4khGh8v.js";import"./createLucideIcon-CctB0W3q.js";import"./checkbox-DahUyQbt.js";import"./label-C25VH7yk.js";import"./error-message-DeFFz6H_.js";import"./ExclamationCircleIcon-jFfW0Ax_.js";import"./status-pill-wWp9xkwA.js";import"./badge-BdMsasyi.js";import"./loading-overlay-DMJTiFny.js";import"./error-state-BSicqqE6.js";import"./ExclamationTriangleIcon-Di4DJZFg.js";import"./ArrowPathIcon-CZjG6RfV.js";import"./empty-state-DRUGJ9ip.js";import"./PlusIcon-DGufmf06.js";import"./inline-toast-DQJ-O9wc.js";import"./index-CNXKWNLp.js";import"./proxy-ZkTvaR74.js";import"./logo-f0fprTjz.js";import"./next-image-69WeRggt.js";import"./step-header-C0A-1Uoh.js";import"./status-indicator-C7K_QPts.js";import"./view-toggle-ja_vihxz.js";import"./Squares2X2Icon-BMQM_Wy1.js";import"./animated-container-DyAZ9gmw.js";import"./ArrowLeftIcon-Cw1eswTb.js";function m(){return e.jsx(t,{icon:e.jsx(d,{}),title:"Configure Internet Service",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("div",{className:"h-9 w-44 bg-gray-200 rounded mx-auto mb-6"}),e.jsx("div",{className:"h-10 w-80 bg-gray-200 rounded mx-auto mb-4"}),e.jsxs("div",{className:"inline-flex items-center gap-3 bg-gray-50 px-6 py-3 rounded-2xl border",children:[e.jsx("div",{className:"h-6 w-20 bg-gray-200 rounded-full"}),e.jsx("span",{className:"h-4 w-3 bg-gray-200 rounded"}),e.jsx("div",{className:"h-4 w-28 bg-gray-200 rounded"}),e.jsx("span",{className:"h-4 w-3 bg-gray-200 rounded"}),e.jsx("div",{className:"h-4 w-24 bg-gray-200 rounded"})]})]}),e.jsx("div",{className:"flex items-center justify-between max-w-2xl mx-auto mb-8",children:Array.from({length:4}).map((l,s)=>e.jsxs("div",{className:"flex-1 flex items-center",children:[e.jsx("div",{className:"h-3 w-3 rounded-full bg-gray-300"}),s<3&&e.jsx("div",{className:"h-1 flex-1 bg-gray-200 mx-2 rounded"})]},s))}),e.jsx("div",{className:"space-y-8",children:e.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl p-8",children:[e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"w-8 h-8 bg-blue-200 rounded-full"}),e.jsx("div",{className:"h-6 w-48 bg-gray-200 rounded"})]}),e.jsx("div",{className:"h-4 w-64 bg-gray-200 rounded ml-11"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"h-4 w-full bg-gray-200 rounded"}),e.jsx("div",{className:"h-4 w-3/4 bg-gray-200 rounded"}),e.jsx("div",{className:"h-4 w-1/2 bg-gray-200 rounded"})]})]})})]})})}m.__docgenInfo={description:"",methods:[],displayName:"ConfigureLoadingSkeleton"};const X={title:"Features/Services/Internet/Configure/ConfigureLoadingSkeleton",component:m,parameters:{layout:"fullscreen"}},r={};var a,o,i;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:"{}",...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};const Y=["Default"];export{r as Default,Y as __namedExportsOrder,X as default};
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function n({title:r,titleId:t,...o},a){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},o),r?e.createElement("title",{id:t},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z"}))}const s=e.forwardRef(n);export{s as F};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function a({title:r,titleId:t,...n},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),r?e.createElement("title",{id:t},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 7.5 3 4.5m0 0 3-4.5M12 12v5.25M15 12H9m6 3H9m12-3a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const i=e.forwardRef(a);export{i as F};
|
||||
@ -0,0 +1 @@
|
||||
import{j as o}from"./jsx-runtime-D_zvdyIk.js";import{i as _}from"./schema-DP3xEsUJ.js";import{i as S}from"./schema-B8i337wU.js";import{r as w}from"./schema-Dok_SHcO.js";import{o as i,s as e,n,_ as c,r as f,a as l,b as m,h as v,c as d,l as s}from"./coerce-BirWdn0y.js";import{f as N}from"./currency-CYvr7ZUf.js";import{F as u}from"./CheckCircleIcon-Dva35lTP.js";import{F as I}from"./ChatBubbleLeftRightIcon-DfYi9O0H.js";import{F as j}from"./ServerIcon-Cf--50di.js";import{F as C}from"./DocumentTextIcon-Dk_xQMYi.js";import{F as A}from"./ExclamationTriangleIcon-Di4DJZFg.js";const b=c(["invoice_created","invoice_paid","service_activated","case_created","case_closed"]),F=i({id:e(),type:b,title:e(),description:e().optional(),date:e(),relatedId:n().optional(),metadata:f(e(),l([e(),n(),m(),v()])).optional()}),T=i({amount:n(),currency:e().optional(),dueDate:e().optional(),invoiceNumber:e().optional(),status:e().optional()}).partial().refine(t=>typeof t.amount=="number",{message:"amount is required",path:["amount"]}),D=i({productName:e().optional(),registrationDate:e().optional(),status:e().optional()}).partial(),$=i({activeSubscriptions:n().int().nonnegative(),unpaidInvoices:n().int().nonnegative(),openCases:n().int().nonnegative(),recentOrders:n().int().nonnegative().optional(),totalSpent:n().nonnegative().optional(),currency:e()}),O=i({id:n().int().positive(),dueDate:e(),amount:n(),currency:e()}),h=i({stats:$,nextInvoice:O.nullable(),recentActivity:d(F)});i({code:e(),message:e(),details:f(e(),l([e(),n(),m(),v()])).optional()});const k=c(["all","billing","orders","support"]);i({key:k,label:e(),types:d(b).optional()});h.extend({invoices:d(_).optional()});const R=c(["invoice","payment_method","order","internet_eligibility","id_verification","onboarding"]),q=c(["critical","warning","info","neutral"]),M=i({id:e(),priority:l([s(1),s(2),s(3),s(4)]),type:R,title:e(),description:e(),actionLabel:e(),detailHref:e().optional(),requiresSsoAction:m().optional(),tone:q,metadata:i({invoiceId:n().int().positive().optional(),orderId:e().optional(),amount:n().optional(),currency:e().optional(),dueDate:e().datetime().optional()}).optional()}),E=i({totalCount:n().int().nonnegative().nullable()});i({summary:h,paymentMethods:E,internetEligibility:S,residenceCardVerification:w,tasks:d(M)});const L=N;function z(t){const a=T.safeParse(t.metadata??{});if(!a.success||typeof a.data.amount!="number")return null;const r=L(a.data.amount,a.data.currency);return r?t.type==="invoice_paid"?`${r} payment completed`:`${r} invoice generated`:null}function P(t){const a=D.safeParse(t.metadata??{});return!a.success||!a.data.productName?null:`${a.data.productName} is now active`}function V(t){const a=t.description??"";switch(t.type){case"invoice_created":case"invoice_paid":return z(t)??a;case"service_activated":return P(t)??a;default:return a}}const B={invoice_created:C,invoice_paid:u,service_activated:j,case_created:I,case_closed:u},H={invoice_created:"text-blue-500 bg-blue-50",invoice_paid:"text-green-500 bg-green-50",service_activated:"text-purple-500 bg-purple-50",case_created:"text-amber-500 bg-amber-50",case_closed:"text-green-500 bg-green-50"},K=A;function U({activity:t,onClick:a,showConnector:r=!0}){const y=B[t.type]??K,g=H[t.type]??"text-muted-foreground bg-muted",x=V(t),p=o.jsxs("div",{className:"flex items-start gap-3 relative",children:[r&&o.jsx("div",{className:"absolute left-[15px] top-8 bottom-0 w-px bg-border -z-10"}),o.jsx("div",{className:`flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center ${g}`,children:o.jsx(y,{className:"h-4 w-4"})}),o.jsxs("div",{className:"flex-1 min-w-0 pb-4",children:[o.jsx("p",{className:`text-sm font-medium leading-tight ${a?"text-foreground group-hover:text-primary":"text-foreground"}`,children:t.title}),o.jsx("p",{className:"text-sm text-muted-foreground mt-0.5 leading-snug",children:x})]})]});return a?o.jsx("button",{type:"button",className:"group w-full text-left rounded-lg hover:bg-muted/50 transition-colors cursor-pointer -mx-2 px-2",onClick:a,children:p}):o.jsx("div",{className:"w-full text-left",children:p})}U.__docgenInfo={description:"",methods:[],displayName:"DashboardActivityItem",props:{activity:{required:!0,tsType:{name:"z.infer",elements:[{name:"activitySchema"}],raw:"z.infer<typeof activitySchema>"},description:""},onClick:{required:!1,tsType:{name:"union",raw:"(() => void) | undefined",elements:[{name:"unknown"},{name:"undefined"}]},description:""},showConnector:{required:!1,tsType:{name:"union",raw:"boolean | undefined",elements:[{name:"boolean"},{name:"undefined"}]},description:"",defaultValue:{value:"true",computed:!1}}}};export{U as D};
|
||||
@ -0,0 +1,79 @@
|
||||
import{j as c}from"./jsx-runtime-D_zvdyIk.js";import{D as M}from"./DashboardActivityItem-bwWapT3F.js";import{fn as j}from"./index-B9TJ7cVi.js";import"./schema-DP3xEsUJ.js";import"./constants-Cd_qStHG.js";import"./coerce-BirWdn0y.js";import"./schema-B8i337wU.js";import"./schema-Dok_SHcO.js";import"./schema-B7GuHPAW.js";import"./currency-CYvr7ZUf.js";import"./CheckCircleIcon-Dva35lTP.js";import"./index-JhL3uwfD.js";import"./ChatBubbleLeftRightIcon-DfYi9O0H.js";import"./ServerIcon-Cf--50di.js";import"./DocumentTextIcon-Dk_xQMYi.js";import"./ExclamationTriangleIcon-Di4DJZFg.js";const T={title:"Features/Dashboard/DashboardActivityItem",component:M,parameters:{layout:"centered"},decorators:[k=>c.jsx("div",{style:{width:480},children:c.jsx(k,{})})]},e={args:{activity:{id:"act-1",type:"invoice_created",title:"Invoice #1042 created",description:"Monthly internet service - March 2026",date:new Date().toISOString()},showConnector:!0}},t={args:{activity:{id:"act-2",type:"invoice_paid",title:"Invoice #1041 paid",description:"Payment of 5,980 JPY received",date:new Date().toISOString()},showConnector:!0}},n={args:{activity:{id:"act-3",type:"service_activated",title:"Fiber 100Mbps activated",description:"Internet service is now active",date:new Date().toISOString()},showConnector:!1}},i={args:{activity:{id:"act-4",type:"case_created",title:"Support case opened",description:"Connection issues reported",date:new Date().toISOString()},showConnector:!0}},r={args:{activity:{id:"act-5",type:"case_closed",title:"Support case resolved",description:"Connection issue has been fixed",date:new Date().toISOString()},showConnector:!1}},a={args:{activity:{id:"act-6",type:"invoice_created",title:"Invoice #1042 created",description:"Click to view invoice details",date:new Date().toISOString()},onClick:j(),showConnector:!1}},o={args:{activity:{id:"act-7",type:"invoice_paid",title:"Invoice #1040 paid",description:"Payment received",date:new Date().toISOString()},showConnector:!1}};var s,d,p;e.parameters={...e.parameters,docs:{...(s=e.parameters)==null?void 0:s.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activity: {
|
||||
id: "act-1",
|
||||
type: "invoice_created",
|
||||
title: "Invoice #1042 created",
|
||||
description: "Monthly internet service - March 2026",
|
||||
date: new Date().toISOString()
|
||||
},
|
||||
showConnector: true
|
||||
}
|
||||
}`,...(p=(d=e.parameters)==null?void 0:d.docs)==null?void 0:p.source}}};var v,m,l;t.parameters={...t.parameters,docs:{...(v=t.parameters)==null?void 0:v.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activity: {
|
||||
id: "act-2",
|
||||
type: "invoice_paid",
|
||||
title: "Invoice #1041 paid",
|
||||
description: "Payment of 5,980 JPY received",
|
||||
date: new Date().toISOString()
|
||||
},
|
||||
showConnector: true
|
||||
}
|
||||
}`,...(l=(m=t.parameters)==null?void 0:m.docs)==null?void 0:l.source}}};var u,S,y;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activity: {
|
||||
id: "act-3",
|
||||
type: "service_activated",
|
||||
title: "Fiber 100Mbps activated",
|
||||
description: "Internet service is now active",
|
||||
date: new Date().toISOString()
|
||||
},
|
||||
showConnector: false
|
||||
}
|
||||
}`,...(y=(S=n.parameters)==null?void 0:S.docs)==null?void 0:y.source}}};var C,g,w;i.parameters={...i.parameters,docs:{...(C=i.parameters)==null?void 0:C.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activity: {
|
||||
id: "act-4",
|
||||
type: "case_created",
|
||||
title: "Support case opened",
|
||||
description: "Connection issues reported",
|
||||
date: new Date().toISOString()
|
||||
},
|
||||
showConnector: true
|
||||
}
|
||||
}`,...(w=(g=i.parameters)==null?void 0:g.docs)==null?void 0:w.source}}};var I,h,f;r.parameters={...r.parameters,docs:{...(I=r.parameters)==null?void 0:I.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activity: {
|
||||
id: "act-5",
|
||||
type: "case_closed",
|
||||
title: "Support case resolved",
|
||||
description: "Connection issue has been fixed",
|
||||
date: new Date().toISOString()
|
||||
},
|
||||
showConnector: false
|
||||
}
|
||||
}`,...(f=(h=r.parameters)==null?void 0:h.docs)==null?void 0:f.source}}};var D,_,O;a.parameters={...a.parameters,docs:{...(D=a.parameters)==null?void 0:D.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activity: {
|
||||
id: "act-6",
|
||||
type: "invoice_created",
|
||||
title: "Invoice #1042 created",
|
||||
description: "Click to view invoice details",
|
||||
date: new Date().toISOString()
|
||||
},
|
||||
onClick: fn(),
|
||||
showConnector: false
|
||||
}
|
||||
}`,...(O=(_=a.parameters)==null?void 0:_.docs)==null?void 0:O.source}}};var b,x,P;o.parameters={...o.parameters,docs:{...(b=o.parameters)==null?void 0:b.docs,source:{originalSource:`{
|
||||
args: {
|
||||
activity: {
|
||||
id: "act-7",
|
||||
type: "invoice_paid",
|
||||
title: "Invoice #1040 paid",
|
||||
description: "Payment received",
|
||||
date: new Date().toISOString()
|
||||
},
|
||||
showConnector: false
|
||||
}
|
||||
}`,...(P=(x=o.parameters)==null?void 0:x.docs)==null?void 0:P.source}}};const U=["InvoiceCreated","InvoicePaid","ServiceActivated","CaseCreated","CaseClosed","Clickable","WithoutConnector"];export{r as CaseClosed,i as CaseCreated,a as Clickable,e as InvoiceCreated,t as InvoicePaid,n as ServiceActivated,o as WithoutConnector,U as __namedExportsOrder,T as default};
|
||||
11
apps/portal/public/storybook/assets/DataTable-COYdcx41.js
Normal file
11
apps/portal/public/storybook/assets/DataTable-COYdcx41.js
Normal file
@ -0,0 +1,11 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{E as c}from"./empty-state-DRUGJ9ip.js";import{F as u}from"./ChevronRightIcon-CMQWsJeW.js";function p({data:i,columns:t,onRowClick:a}){const n=t.find(r=>r.primary),d=t.filter(r=>!r.hideOnMobile&&!r.primary);return e.jsx("div",{className:"md:hidden space-y-3",children:i.map((r,l)=>{var m;return e.jsxs("div",{className:`
|
||||
bg-card border border-border rounded-xl p-4
|
||||
shadow-[var(--cp-shadow-1)]
|
||||
transition-all duration-[var(--cp-duration-fast)]
|
||||
active:scale-[0.98] active:shadow-none
|
||||
${a?"cursor-pointer active:bg-muted/50":""}
|
||||
`,onClick:()=>a==null?void 0:a(r),role:a?"button":void 0,tabIndex:a?0:void 0,onKeyDown:s=>{a&&(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),a(r))},style:{animationDelay:`${l*50}ms`},children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 mb-3",children:[e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx("div",{className:"font-semibold text-foreground",children:(m=n??t[0])==null?void 0:m.render(r)})}),a&&e.jsx(u,{className:"h-5 w-5 text-muted-foreground/50 flex-shrink-0"})]}),e.jsx("div",{className:"space-y-2",children:d.map((s,o)=>!n&&o===0&&s===t[0]?null:e.jsxs("div",{className:"flex items-center justify-between gap-4 text-sm",children:[e.jsx("span",{className:"text-muted-foreground font-medium flex-shrink-0",children:s.header}),e.jsx("span",{className:"text-foreground text-right min-w-0 truncate",children:s.render(r)})]},s.key))})]},r.id)})})}function f({data:i,columns:t,onRowClick:a,className:n="",forceTableView:d=!1}){return e.jsx("div",{className:`${d?"":"hidden md:block"} overflow-x-auto`,children:e.jsxs("table",{className:`min-w-full divide-y divide-border ${n}`,children:[e.jsx("thead",{className:"bg-muted/50",children:e.jsx("tr",{children:t.map(r=>e.jsx("th",{className:`px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider ${r.className||""}`,children:r.header},r.key))})}),e.jsx("tbody",{className:"bg-card divide-y divide-border",children:i.map(r=>e.jsx("tr",{className:`hover:bg-muted/30 transition-colors duration-[var(--cp-transition-fast)] ${a?"cursor-pointer":""}`,onClick:()=>a==null?void 0:a(r),children:t.map(l=>e.jsx("td",{className:`px-6 py-4 whitespace-nowrap ${l.className||""}`,children:l.render(r)},l.key))},r.id))})]})})}function x({data:i,columns:t,emptyState:a,onRowClick:n,className:d="",forceTableView:r=!1}){return i.length===0&&a?e.jsx(c,{icon:a.icon,title:a.title,description:a.description,variant:"compact"}):e.jsxs(e.Fragment,{children:[!r&&e.jsx(p,{data:i,columns:t,onRowClick:n}),e.jsx(f,{data:i,columns:t,onRowClick:n,className:d,forceTableView:r})]})}x.__docgenInfo={description:"",methods:[],displayName:"DataTable",props:{data:{required:!0,tsType:{name:"Array",elements:[{name:"T"}],raw:"T[]"},description:""},columns:{required:!0,tsType:{name:"Array",elements:[{name:"Column",elements:[{name:"T"}],raw:"Column<T>"}],raw:"Column<T>[]"},description:""},emptyState:{required:!1,tsType:{name:"signature",type:"object",raw:`{
|
||||
icon: ReactNode;
|
||||
title: string;
|
||||
description: string;
|
||||
}`,signature:{properties:[{key:"icon",value:{name:"ReactNode",required:!0}},{key:"title",value:{name:"string",required:!0}},{key:"description",value:{name:"string",required:!0}}]}},description:""},onRowClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(item: T) => void",signature:{arguments:[{type:{name:"T"},name:"item"}],return:{name:"void"}}},description:""},className:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},forceTableView:{required:!1,tsType:{name:"boolean"},description:"Force table view even on mobile (not recommended for UX)",defaultValue:{value:"false",computed:!1}}}};export{x as D};
|
||||
@ -0,0 +1,24 @@
|
||||
import{j as f}from"./jsx-runtime-D_zvdyIk.js";import{D as x}from"./DataTable-COYdcx41.js";import{F as h}from"./InboxIcon-C_jmd85B.js";import"./empty-state-DRUGJ9ip.js";import"./button-C8_cybvS.js";import"./index-JhL3uwfD.js";import"./next-link-BmD4fPSy.js";import"./index-DXhM58Yq.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./spinner-mU4XywER.js";import"./PlusIcon-DGufmf06.js";import"./ChevronRightIcon-CMQWsJeW.js";const g=[{id:1,name:"John Doe",email:"john@example.com",status:"Active",amount:"¥12,000"},{id:2,name:"Jane Smith",email:"jane@example.com",status:"Pending",amount:"¥8,500"},{id:3,name:"Bob Wilson",email:"bob@example.com",status:"Active",amount:"¥15,200"},{id:4,name:"Alice Brown",email:"alice@example.com",status:"Inactive",amount:"¥3,100"},{id:5,name:"Charlie Davis",email:"charlie@example.com",status:"Active",amount:"¥9,800"}],o=[{key:"name",header:"Name",render:e=>e.name,primary:!0},{key:"email",header:"Email",render:e=>e.email},{key:"status",header:"Status",render:e=>f.jsx("span",{className:e.status==="Active"?"text-success":e.status==="Pending"?"text-warning":"text-muted-foreground",children:e.status})},{key:"amount",header:"Amount",render:e=>e.amount}],I={title:"Molecules/DataTable",component:x,parameters:{layout:"padded"}},a={args:{data:g,columns:o,forceTableView:!0}},t={args:{data:g,columns:o,onRowClick:e=>alert(`Clicked: ${e.name}`),forceTableView:!0}},r={args:{data:[],columns:o,emptyState:{icon:f.jsx(h,{className:"h-12 w-12"}),title:"No records found",description:"Try adjusting your search or filters."}}};var s,m,n;a.parameters={...a.parameters,docs:{...(s=a.parameters)==null?void 0:s.docs,source:{originalSource:`{
|
||||
args: {
|
||||
data: sampleData,
|
||||
columns,
|
||||
forceTableView: true
|
||||
}
|
||||
}`,...(n=(m=a.parameters)==null?void 0:m.docs)==null?void 0:n.source}}};var i,c,l;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`{
|
||||
args: {
|
||||
data: sampleData,
|
||||
columns,
|
||||
onRowClick: item => alert(\`Clicked: \${item.name}\`),
|
||||
forceTableView: true
|
||||
}
|
||||
}`,...(l=(c=t.parameters)==null?void 0:c.docs)==null?void 0:l.source}}};var u,d,p;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`{
|
||||
args: {
|
||||
data: [],
|
||||
columns,
|
||||
emptyState: {
|
||||
icon: <InboxIcon className="h-12 w-12" />,
|
||||
title: "No records found",
|
||||
description: "Try adjusting your search or filters."
|
||||
}
|
||||
}
|
||||
}`,...(p=(d=r.parameters)==null?void 0:d.docs)==null?void 0:p.source}}};const B=["Default","Clickable","Empty"];export{t as Clickable,a as Default,r as Empty,B as __namedExportsOrder,I as default};
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{S as d}from"./status-pill-wWp9xkwA.js";function c({title:i,subtitle:r,status:a,leftIcon:t,actions:n,className:l,meta:s}){return e.jsxs("div",{className:`pb-4 border-b border-border ${l||""}`,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center",children:[t,e.jsxs("div",{className:t?"ml-3":void 0,children:[e.jsx("h3",{className:"text-lg font-medium text-foreground",children:i}),r&&e.jsx("p",{className:"text-sm text-muted-foreground",children:r})]})]}),a&&e.jsx(d,{label:a.label,variant:a.variant}),n]}),s&&e.jsx("div",{className:"mt-4",children:s})]})}c.__docgenInfo={description:"",methods:[],displayName:"DetailHeader",props:{title:{required:!0,tsType:{name:"string"},description:""},subtitle:{required:!1,tsType:{name:"string"},description:""},status:{required:!1,tsType:{name:"signature",type:"object",raw:"{ label: string; variant: Variant }",signature:{properties:[{key:"label",value:{name:"string",required:!0}},{key:"variant",value:{name:"union",raw:'"success" | "warning" | "error" | "neutral" | "info"',elements:[{name:"literal",value:'"success"'},{name:"literal",value:'"warning"'},{name:"literal",value:'"error"'},{name:"literal",value:'"neutral"'},{name:"literal",value:'"info"'}],required:!0}}]}},description:""},leftIcon:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},actions:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},className:{required:!1,tsType:{name:"string"},description:""},meta:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};export{c as D};
|
||||
@ -0,0 +1,44 @@
|
||||
import{j as t}from"./jsx-runtime-D_zvdyIk.js";import{D as x}from"./DetailHeader-C0ZsoM39.js";import{B as b}from"./button-C8_cybvS.js";import{F as v}from"./DocumentTextIcon-Dk_xQMYi.js";import{F as I}from"./WifiIcon-BRIpHl8i.js";import"./status-pill-wWp9xkwA.js";import"./index-JhL3uwfD.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./next-link-BmD4fPSy.js";import"./index-DXhM58Yq.js";import"./spinner-mU4XywER.js";const H={title:"Molecules/DetailHeader",component:x,parameters:{layout:"padded"}},e={args:{title:"Order #12345",subtitle:"Placed on March 1, 2026",status:{label:"Active",variant:"success"}}},a={args:{title:"Internet Plan - Fiber 1Gbps",subtitle:"Subscription #SUB-789",leftIcon:t.jsx(I,{className:"h-8 w-8 text-primary"}),status:{label:"Active",variant:"success"}}},s={args:{title:"Invoice #INV-2026-001",subtitle:"Due: March 15, 2026",leftIcon:t.jsx(v,{className:"h-8 w-8 text-info"}),status:{label:"Pending",variant:"warning"},actions:t.jsx(b,{size:"sm",children:"Pay Now"})}},r={args:{title:"Support Ticket #4567",status:{label:"Open",variant:"info"},meta:t.jsxs("div",{className:"flex gap-4 text-sm text-muted-foreground",children:[t.jsx("span",{children:"Priority: High"}),t.jsx("span",{children:"Category: Billing"}),t.jsx("span",{children:"Created: 2 hours ago"})]})}};var n,i,o;e.parameters={...e.parameters,docs:{...(n=e.parameters)==null?void 0:n.docs,source:{originalSource:`{
|
||||
args: {
|
||||
title: "Order #12345",
|
||||
subtitle: "Placed on March 1, 2026",
|
||||
status: {
|
||||
label: "Active",
|
||||
variant: "success"
|
||||
}
|
||||
}
|
||||
}`,...(o=(i=e.parameters)==null?void 0:i.docs)==null?void 0:o.source}}};var c,l,p;a.parameters={...a.parameters,docs:{...(c=a.parameters)==null?void 0:c.docs,source:{originalSource:`{
|
||||
args: {
|
||||
title: "Internet Plan - Fiber 1Gbps",
|
||||
subtitle: "Subscription #SUB-789",
|
||||
leftIcon: <WifiIcon className="h-8 w-8 text-primary" />,
|
||||
status: {
|
||||
label: "Active",
|
||||
variant: "success"
|
||||
}
|
||||
}
|
||||
}`,...(p=(l=a.parameters)==null?void 0:l.docs)==null?void 0:p.source}}};var m,u,d;s.parameters={...s.parameters,docs:{...(m=s.parameters)==null?void 0:m.docs,source:{originalSource:`{
|
||||
args: {
|
||||
title: "Invoice #INV-2026-001",
|
||||
subtitle: "Due: March 15, 2026",
|
||||
leftIcon: <DocumentTextIcon className="h-8 w-8 text-info" />,
|
||||
status: {
|
||||
label: "Pending",
|
||||
variant: "warning"
|
||||
},
|
||||
actions: <Button size="sm">Pay Now</Button>
|
||||
}
|
||||
}`,...(d=(u=s.parameters)==null?void 0:u.docs)==null?void 0:d.source}}};var g,f,h;r.parameters={...r.parameters,docs:{...(g=r.parameters)==null?void 0:g.docs,source:{originalSource:`{
|
||||
args: {
|
||||
title: "Support Ticket #4567",
|
||||
status: {
|
||||
label: "Open",
|
||||
variant: "info"
|
||||
},
|
||||
meta: <div className="flex gap-4 text-sm text-muted-foreground">
|
||||
<span>Priority: High</span>
|
||||
<span>Category: Billing</span>
|
||||
<span>Created: 2 hours ago</span>
|
||||
</div>
|
||||
}
|
||||
}`,...(h=(f=r.parameters)==null?void 0:f.docs)==null?void 0:h.source}}};const R=["Default","WithIcon","WithActions","WithMeta"];export{e as Default,s as WithActions,a as WithIcon,r as WithMeta,R as __namedExportsOrder,H as default};
|
||||
@ -0,0 +1,4 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{c as d}from"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";const l={2:"grid-cols-2",3:"grid-cols-2 md:grid-cols-3",4:"grid-cols-2 md:grid-cols-4"};function n({items:a,columns:r=4,className:t}){return e.jsx("div",{className:d("grid gap-4",l[r],t),children:a.map((s,i)=>e.jsx("div",{className:"bg-card rounded-xl border border-border p-4 shadow-[var(--cp-shadow-1)]",children:e.jsxs("div",{className:"flex items-center gap-3",children:[s.icon&&e.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted/50 text-muted-foreground flex-shrink-0",children:s.icon}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:s.label}),e.jsx("div",{className:"font-semibold text-foreground",children:s.value})]})]})},i))})}n.__docgenInfo={description:`DetailStatsGrid - Reusable stats grid for detail pages.
|
||||
|
||||
Used across detail pages (Orders, Subscriptions) to display key stats
|
||||
in a consistent grid layout with individual card styling.`,methods:[],displayName:"DetailStatsGrid",props:{items:{required:!0,tsType:{name:"Array",elements:[{name:"StatGridItem"}],raw:"StatGridItem[]"},description:"Array of stat items to display"},columns:{required:!1,tsType:{name:"union",raw:"2 | 3 | 4",elements:[{name:"literal",value:"2"},{name:"literal",value:"3"},{name:"literal",value:"4"}]},description:"Number of columns (default: 4 on md screens)",defaultValue:{value:"4",computed:!1}},className:{required:!1,tsType:{name:"string"},description:"Optional additional class names"}}};export{n as D};
|
||||
@ -0,0 +1,50 @@
|
||||
import{j as a}from"./jsx-runtime-D_zvdyIk.js";import{D as w}from"./DetailStatsGrid-CDkKTM-B.js";import{F as d}from"./CalendarIcon-DHpf4s_h.js";import{F as b}from"./CurrencyYenIcon-Bf5bmWZc.js";import{F as v}from"./DocumentTextIcon-Dk_xQMYi.js";import{F as h}from"./ClockIcon-BFX11zAZ.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./index-JhL3uwfD.js";const D={title:"Molecules/DetailStatsGrid",component:w,argTypes:{columns:{control:"select",options:[2,3,4]}},parameters:{layout:"padded"}},e={args:{columns:4,items:[{icon:a.jsx(d,{className:"h-5 w-5"}),label:"Start Date",value:"Jan 15, 2026"},{icon:a.jsx(b,{className:"h-5 w-5"}),label:"Monthly Cost",value:"¥4,800"},{icon:a.jsx(v,{className:"h-5 w-5"}),label:"Contract",value:"24 months"},{icon:a.jsx(h,{className:"h-5 w-5"}),label:"Next Billing",value:"Apr 1, 2026"}]}},s={args:{columns:3,items:[{icon:a.jsx(d,{className:"h-5 w-5"}),label:"Created",value:"Mar 1, 2026"},{icon:a.jsx(b,{className:"h-5 w-5"}),label:"Total",value:"¥32,400"},{icon:a.jsx(h,{className:"h-5 w-5"}),label:"Status",value:"Processing"}]}},n={args:{columns:2,items:[{label:"Plan",value:"Fiber 1Gbps"},{label:"Speed",value:"Up to 1Gbps"}]}};var o,l,r;e.parameters={...e.parameters,docs:{...(o=e.parameters)==null?void 0:o.docs,source:{originalSource:`{
|
||||
args: {
|
||||
columns: 4,
|
||||
items: [{
|
||||
icon: <CalendarIcon className="h-5 w-5" />,
|
||||
label: "Start Date",
|
||||
value: "Jan 15, 2026"
|
||||
}, {
|
||||
icon: <CurrencyYenIcon className="h-5 w-5" />,
|
||||
label: "Monthly Cost",
|
||||
value: "¥4,800"
|
||||
}, {
|
||||
icon: <DocumentTextIcon className="h-5 w-5" />,
|
||||
label: "Contract",
|
||||
value: "24 months"
|
||||
}, {
|
||||
icon: <ClockIcon className="h-5 w-5" />,
|
||||
label: "Next Billing",
|
||||
value: "Apr 1, 2026"
|
||||
}]
|
||||
}
|
||||
}`,...(r=(l=e.parameters)==null?void 0:l.docs)==null?void 0:r.source}}};var t,c,m;s.parameters={...s.parameters,docs:{...(t=s.parameters)==null?void 0:t.docs,source:{originalSource:`{
|
||||
args: {
|
||||
columns: 3,
|
||||
items: [{
|
||||
icon: <CalendarIcon className="h-5 w-5" />,
|
||||
label: "Created",
|
||||
value: "Mar 1, 2026"
|
||||
}, {
|
||||
icon: <CurrencyYenIcon className="h-5 w-5" />,
|
||||
label: "Total",
|
||||
value: "¥32,400"
|
||||
}, {
|
||||
icon: <ClockIcon className="h-5 w-5" />,
|
||||
label: "Status",
|
||||
value: "Processing"
|
||||
}]
|
||||
}
|
||||
}`,...(m=(c=s.parameters)==null?void 0:c.docs)==null?void 0:m.source}}};var i,u,p;n.parameters={...n.parameters,docs:{...(i=n.parameters)==null?void 0:i.docs,source:{originalSource:`{
|
||||
args: {
|
||||
columns: 2,
|
||||
items: [{
|
||||
label: "Plan",
|
||||
value: "Fiber 1Gbps"
|
||||
}, {
|
||||
label: "Speed",
|
||||
value: "Up to 1Gbps"
|
||||
}]
|
||||
}
|
||||
}`,...(p=(u=n.parameters)==null?void 0:u.docs)==null?void 0:p.source}}};const G=["FourColumns","ThreeColumns","TwoColumns"];export{e as FourColumns,s as ThreeColumns,n as TwoColumns,G as __namedExportsOrder,D as default};
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
import{D as i}from"./DeviceCompatibility-BmppB3yg.js";import"./jsx-runtime-D_zvdyIk.js";import"./index-JhL3uwfD.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./search-DSeV2urL.js";import"./createLucideIcon-CctB0W3q.js";import"./smartphone-Dk2P1VMI.js";import"./check-DmNqM64J.js";import"./x-gzkF7O9v.js";const y={title:"Features/Services/SIM/DeviceCompatibility",component:i,parameters:{layout:"centered"}},t={};var r,e,o;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:"{}",...(o=(e=t.parameters)==null?void 0:e.docs)==null?void 0:o.source}}};const S=["Default"];export{t as Default,S as __namedExportsOrder,y as default};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function a({title:r,titleId:o,...t},n){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":o},t),r?e.createElement("title",{id:o},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3"}))}const s=e.forwardRef(a);export{s as F};
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function a({title:r,titleId:t,...o},n){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},o),r?e.createElement("title",{id:t},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const s=e.forwardRef(a);export{s as F};
|
||||
@ -0,0 +1,23 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{c as o}from"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import{T as j}from"./triangle-alert-F5KF_Jv1.js";import{M as I}from"./map-pin-Bm-ztWPO.js";import{C}from"./clock-C92s7kSC.js";import{C as T}from"./circle-check-big-Bab09Iah.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./createLucideIcon-CctB0W3q.js";import"./index-JhL3uwfD.js";const P={eligible:{icon:T,bg:"bg-success-soft",border:"border-success/30",text:"text-success",label:"Service Available"},pending:{icon:C,bg:"bg-info-soft",border:"border-info/30",text:"text-info",label:"Review in Progress"},not_requested:{icon:I,bg:"bg-muted",border:"border-border",text:"text-muted-foreground",label:"Verification Required"},ineligible:{icon:j,bg:"bg-warning/10",border:"border-warning/30",text:"text-warning",label:"Not Available"}};function _({status:l,speed:d}){const s=P[l],E=s.icon;return e.jsxs("div",{className:o("inline-flex items-center gap-2 px-4 py-2 rounded-full border",s.bg,s.border),children:[e.jsx(E,{className:o("h-4 w-4",s.text)}),e.jsx("span",{className:o("font-semibold text-sm",s.text),children:s.label}),l==="eligible"&&d&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-muted-foreground",children:"·"}),e.jsxs("span",{className:"text-sm text-foreground font-medium",children:["Up to ",d]})]})]})}_.__docgenInfo={description:`Displays the current eligibility status as a badge with icon.
|
||||
Used in the Internet Plans view to show user's eligibility state.`,methods:[],displayName:"EligibilityStatusBadge",props:{status:{required:!0,tsType:{name:"union",raw:'"eligible" | "pending" | "not_requested" | "ineligible"',elements:[{name:"literal",value:'"eligible"'},{name:"literal",value:'"pending"'},{name:"literal",value:'"not_requested"'},{name:"literal",value:'"ineligible"'}]},description:""},speed:{required:!1,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""}}};const z={title:"Features/Services/Internet/EligibilityStatusBadge",component:_,parameters:{layout:"centered"}},r={args:{status:"eligible",speed:"1Gbps"}},t={args:{status:"eligible"}},i={args:{status:"pending"}},a={args:{status:"not_requested"}},n={args:{status:"ineligible"}};var c,g,m;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:`{
|
||||
args: {
|
||||
status: "eligible",
|
||||
speed: "1Gbps"
|
||||
}
|
||||
}`,...(m=(g=r.parameters)==null?void 0:g.docs)==null?void 0:m.source}}};var u,p,b;t.parameters={...t.parameters,docs:{...(u=t.parameters)==null?void 0:u.docs,source:{originalSource:`{
|
||||
args: {
|
||||
status: "eligible"
|
||||
}
|
||||
}`,...(b=(p=t.parameters)==null?void 0:p.docs)==null?void 0:b.source}}};var f,x,S;i.parameters={...i.parameters,docs:{...(f=i.parameters)==null?void 0:f.docs,source:{originalSource:`{
|
||||
args: {
|
||||
status: "pending"
|
||||
}
|
||||
}`,...(S=(x=i.parameters)==null?void 0:x.docs)==null?void 0:S.source}}};var h,N,v;a.parameters={...a.parameters,docs:{...(h=a.parameters)==null?void 0:h.docs,source:{originalSource:`{
|
||||
args: {
|
||||
status: "not_requested"
|
||||
}
|
||||
}`,...(v=(N=a.parameters)==null?void 0:N.docs)==null?void 0:v.source}}};var y,q,w;n.parameters={...n.parameters,docs:{...(y=n.parameters)==null?void 0:y.docs,source:{originalSource:`{
|
||||
args: {
|
||||
status: "ineligible"
|
||||
}
|
||||
}`,...(w=(q=n.parameters)==null?void 0:q.docs)==null?void 0:w.source}}};const H=["Eligible","EligibleNoSpeed","Pending","NotRequested","Ineligible"];export{r as Eligible,t as EligibleNoSpeed,n as Ineligible,a as NotRequested,i as Pending,H as __namedExportsOrder,z as default};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function n({title:r,titleId:a,...o},t){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},o),r?e.createElement("title",{id:a},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75"}))}const s=e.forwardRef(n);export{s as F};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function a({title:r,titleId:t,...o},n){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},o),r?e.createElement("title",{id:t},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))}const l=e.forwardRef(a);export{l as F};
|
||||
@ -0,0 +1 @@
|
||||
import{r as e}from"./index-JhL3uwfD.js";function a({title:r,titleId:t,...o},n){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},o),r?e.createElement("title",{id:t},r):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}const i=e.forwardRef(a);export{i as F};
|
||||
@ -0,0 +1 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";function a({icon:r,title:t,description:s}){return e.jsxs("div",{className:"flex items-start gap-4 p-6 bg-gray-50 rounded-xl border border-gray-100 transition-all duration-300 hover:shadow-md hover:border-gray-200",children:[e.jsx("div",{className:"flex-shrink-0",children:r}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:t}),e.jsx("p",{className:"text-sm text-gray-600 leading-relaxed",children:s})]})]})}a.__docgenInfo={description:"",methods:[],displayName:"FeatureCard",props:{icon:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},title:{required:!0,tsType:{name:"string"},description:""},description:{required:!0,tsType:{name:"string"},description:""}}};export{a as F};
|
||||
@ -0,0 +1,13 @@
|
||||
import{j as c}from"./jsx-runtime-D_zvdyIk.js";import{F as l}from"./FeatureCard-DMnf0Xpf.js";const d={title:"Features/Services/Common/FeatureCard",component:l,parameters:{layout:"centered"}},e={args:{icon:c.jsx("span",{className:"text-2xl text-blue-500",children:"🌐"}),title:"Global Coverage",description:"Access fast, reliable internet coverage across Japan with our nationwide NTT Docomo network."}},t={args:{icon:c.jsx("span",{className:"text-2xl text-green-500",children:"✅"}),title:"Easy Setup",description:"Get started in minutes with our simple activation process. No technical knowledge required."}};var a,r,s;e.parameters={...e.parameters,docs:{...(a=e.parameters)==null?void 0:a.docs,source:{originalSource:`{
|
||||
args: {
|
||||
icon: <span className="text-2xl text-blue-500">🌐</span>,
|
||||
title: "Global Coverage",
|
||||
description: "Access fast, reliable internet coverage across Japan with our nationwide NTT Docomo network."
|
||||
}
|
||||
}`,...(s=(r=e.parameters)==null?void 0:r.docs)==null?void 0:s.source}}};var o,n,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`{
|
||||
args: {
|
||||
icon: <span className="text-2xl text-green-500">✅</span>,
|
||||
title: "Easy Setup",
|
||||
description: "Get started in minutes with our simple activation process. No technical knowledge required."
|
||||
}
|
||||
}`,...(i=(n=t.parameters)==null?void 0:n.docs)==null?void 0:i.source}}};const u=["Default","WithEmojiIcon"];export{e as Default,t as WithEmojiIcon,u as __namedExportsOrder,d as default};
|
||||
@ -0,0 +1,3 @@
|
||||
import{j as r}from"./jsx-runtime-D_zvdyIk.js";import{c as t}from"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import{F as d}from"./FunnelIcon-8nhbwqu0.js";function p({value:n,onChange:s,options:i,label:a,width:o="w-40",className:l}){return r.jsxs("div",{className:t("relative",l),children:[r.jsx("select",{value:n,onChange:e=>s(e.target.value),className:t("block pl-3 pr-8 py-2.5 text-sm border border-border","focus:outline-none focus:ring-2 focus:ring-ring focus:border-primary","rounded-lg appearance-none bg-card text-foreground","shadow-sm cursor-pointer transition-colors",o),"aria-label":a,children:i.map(e=>r.jsx("option",{value:e.value,children:e.label},e.value))}),r.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-2.5 pointer-events-none",children:r.jsx(d,{className:"h-4 w-4 text-muted-foreground"})})]})}p.__docgenInfo={description:`FilterDropdown - Reusable filter dropdown component with consistent styling.
|
||||
|
||||
Used across list pages (Orders, Support, Invoices) for filtering by status, type, priority, etc.`,methods:[],displayName:"FilterDropdown",props:{value:{required:!0,tsType:{name:"string"},description:"Current selected value"},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:"Callback when value changes"},options:{required:!0,tsType:{name:"Array",elements:[{name:"FilterOption"}],raw:"FilterOption[]"},description:"Array of filter options"},label:{required:!0,tsType:{name:"string"},description:"Accessible label for the dropdown"},width:{required:!1,tsType:{name:"string"},description:'Optional width class (default: "w-40")',defaultValue:{value:'"w-40"',computed:!1}},className:{required:!1,tsType:{name:"string"},description:"Optional additional class names"}}};export{p as F};
|
||||
@ -0,0 +1,35 @@
|
||||
import{j as p}from"./jsx-runtime-D_zvdyIk.js";import{r as d}from"./index-JhL3uwfD.js";import{F as t}from"./FilterDropdown-CUU04WmN.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./FunnelIcon-8nhbwqu0.js";const S={title:"Molecules/FilterDropdown",component:t},e={render:()=>{const[a,n]=d.useState("all");return p.jsx(t,{value:a,onChange:n,options:[{value:"all",label:"All Statuses"},{value:"active",label:"Active"},{value:"pending",label:"Pending"},{value:"cancelled",label:"Cancelled"}],label:"Filter by status"})}},l={render:()=>{const[a,n]=d.useState("all");return p.jsx(t,{value:a,onChange:n,options:[{value:"all",label:"All Categories"},{value:"billing",label:"Billing"},{value:"technical",label:"Technical"},{value:"general",label:"General"}],label:"Filter by category",width:"w-48"})}};var r,o,s;e.parameters={...e.parameters,docs:{...(r=e.parameters)==null?void 0:r.docs,source:{originalSource:`{
|
||||
render: () => {
|
||||
const [value, setValue] = useState("all");
|
||||
return <FilterDropdown value={value} onChange={setValue} options={[{
|
||||
value: "all",
|
||||
label: "All Statuses"
|
||||
}, {
|
||||
value: "active",
|
||||
label: "Active"
|
||||
}, {
|
||||
value: "pending",
|
||||
label: "Pending"
|
||||
}, {
|
||||
value: "cancelled",
|
||||
label: "Cancelled"
|
||||
}]} label="Filter by status" />;
|
||||
}
|
||||
}`,...(s=(o=e.parameters)==null?void 0:o.docs)==null?void 0:s.source}}};var u,i,c;l.parameters={...l.parameters,docs:{...(u=l.parameters)==null?void 0:u.docs,source:{originalSource:`{
|
||||
render: () => {
|
||||
const [value, setValue] = useState("all");
|
||||
return <FilterDropdown value={value} onChange={setValue} options={[{
|
||||
value: "all",
|
||||
label: "All Categories"
|
||||
}, {
|
||||
value: "billing",
|
||||
label: "Billing"
|
||||
}, {
|
||||
value: "technical",
|
||||
label: "Technical"
|
||||
}, {
|
||||
value: "general",
|
||||
label: "General"
|
||||
}]} label="Filter by category" width="w-48" />;
|
||||
}
|
||||
}`,...(c=(i=l.parameters)==null?void 0:i.docs)==null?void 0:c.source}}};const x=["Default","CustomWidth"];export{l as CustomWidth,e as Default,x as __namedExportsOrder,S as default};
|
||||
@ -0,0 +1 @@
|
||||
import{j as n}from"./jsx-runtime-D_zvdyIk.js";import{r as t}from"./index-JhL3uwfD.js";import{c as r}from"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import{L}from"./label-C25VH7yk.js";import{I as h}from"./input-BbGJiz0K.js";import{E as F}from"./error-message-DeFFz6H_.js";const c=t.forwardRef(({label:m,error:e,helperText:d,required:f,labelProps:i,fieldId:p,containerClassName:g,inputClassName:x,children:a,...N},b)=>{const y=t.useId(),s=p||y,o=e?`${s}-error`:void 0,u=d?`${s}-helper`:void 0,l=r(o,u)||void 0,{className:v,...w}=N,T=()=>a?t.isValidElement(a)?t.cloneElement(a,{id:s,"aria-invalid":e?"true":void 0,"aria-describedby":l}):a:n.jsx(h,{id:s,ref:b,"aria-invalid":e?"true":void 0,"aria-describedby":l,className:r(e&&"border-danger focus-visible:ring-danger focus-visible:ring-offset-2",x,v),...w});return n.jsxs("div",{className:r("space-y-1",g),children:[m&&n.jsxs(L,{htmlFor:s,className:r("block text-sm font-medium text-muted-foreground",e&&"text-danger",i==null?void 0:i.className),...i?{...i,className:void 0}:void 0,children:[n.jsx("span",{children:m}),f&&n.jsx("span",{"aria-hidden":"true",className:"ml-1 text-danger",children:"*"})]}),T(),e&&n.jsx(F,{id:o,children:e}),d&&!e&&n.jsx("p",{id:u,className:"text-sm text-muted-foreground",children:d})]})});c.displayName="FormField";c.__docgenInfo={description:"",methods:[],displayName:"FormField",props:{label:{required:!1,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""},error:{required:!1,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""},helperText:{required:!1,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""},required:{required:!1,tsType:{name:"union",raw:"boolean | undefined",elements:[{name:"boolean"},{name:"undefined"}]},description:""},labelProps:{required:!1,tsType:{name:"union",raw:'Omit<LabelProps, "htmlFor"> | undefined',elements:[{name:"Omit",elements:[{name:"LabelHTMLAttributes",elements:[{name:"HTMLLabelElement"}],raw:"LabelHTMLAttributes<HTMLLabelElement>"},{name:"literal",value:'"htmlFor"'}],raw:'Omit<LabelProps, "htmlFor">'},{name:"undefined"}]},description:""},fieldId:{required:!1,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""},children:{required:!1,tsType:{name:"union",raw:"React.ReactNode | undefined",elements:[{name:"ReactReactNode",raw:"React.ReactNode"},{name:"undefined"}]},description:""},containerClassName:{required:!1,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""},inputClassName:{required:!1,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""}},composes:["Omit"]};export{c as F};
|
||||
@ -0,0 +1,33 @@
|
||||
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{F as r}from"./FormField-C0UylACv.js";import"./index-JhL3uwfD.js";import"./cn-CDN07tui.js";import"./index-BKyvj4H5.js";import"./schema-B7GuHPAW.js";import"./coerce-BirWdn0y.js";import"./label-C25VH7yk.js";import"./input-BbGJiz0K.js";import"./error-message-DeFFz6H_.js";import"./index-DXhM58Yq.js";import"./ExclamationCircleIcon-jFfW0Ax_.js";const O={title:"Molecules/FormField",component:r},a={args:{label:"Email",placeholder:"you@example.com"}},l={args:{label:"Full Name",placeholder:"John Doe",required:!0}},o={args:{label:"Email",placeholder:"you@example.com",error:"Invalid email address",required:!0}},s={args:{label:"Phone",placeholder:"+81 90-1234-5678",helperText:"Include country code"}},d={render:()=>e.jsxs("div",{className:"flex flex-col gap-4 w-80",children:[e.jsx(r,{label:"First Name",placeholder:"John",required:!0}),e.jsx(r,{label:"Last Name",placeholder:"Doe",required:!0}),e.jsx(r,{label:"Email",placeholder:"you@example.com",type:"email",required:!0}),e.jsx(r,{label:"Phone",placeholder:"+81 90-1234-5678",helperText:"Optional"}),e.jsx(r,{label:"Address",error:"Address is required",required:!0})]})};var m,t,i;a.parameters={...a.parameters,docs:{...(m=a.parameters)==null?void 0:m.docs,source:{originalSource:`{
|
||||
args: {
|
||||
label: "Email",
|
||||
placeholder: "you@example.com"
|
||||
}
|
||||
}`,...(i=(t=a.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};var c,p,n;l.parameters={...l.parameters,docs:{...(c=l.parameters)==null?void 0:c.docs,source:{originalSource:`{
|
||||
args: {
|
||||
label: "Full Name",
|
||||
placeholder: "John Doe",
|
||||
required: true
|
||||
}
|
||||
}`,...(n=(p=l.parameters)==null?void 0:p.docs)==null?void 0:n.source}}};var u,h,x;o.parameters={...o.parameters,docs:{...(u=o.parameters)==null?void 0:u.docs,source:{originalSource:`{
|
||||
args: {
|
||||
label: "Email",
|
||||
placeholder: "you@example.com",
|
||||
error: "Invalid email address",
|
||||
required: true
|
||||
}
|
||||
}`,...(x=(h=o.parameters)==null?void 0:h.docs)==null?void 0:x.source}}};var F,b,q;s.parameters={...s.parameters,docs:{...(F=s.parameters)==null?void 0:F.docs,source:{originalSource:`{
|
||||
args: {
|
||||
label: "Phone",
|
||||
placeholder: "+81 90-1234-5678",
|
||||
helperText: "Include country code"
|
||||
}
|
||||
}`,...(q=(b=s.parameters)==null?void 0:b.docs)==null?void 0:q.source}}};var g,E,y;d.parameters={...d.parameters,docs:{...(g=d.parameters)==null?void 0:g.docs,source:{originalSource:`{
|
||||
render: () => <div className="flex flex-col gap-4 w-80">
|
||||
<FormField label="First Name" placeholder="John" required />
|
||||
<FormField label="Last Name" placeholder="Doe" required />
|
||||
<FormField label="Email" placeholder="you@example.com" type="email" required />
|
||||
<FormField label="Phone" placeholder="+81 90-1234-5678" helperText="Optional" />
|
||||
<FormField label="Address" error="Address is required" required />
|
||||
</div>
|
||||
}`,...(y=(E=d.parameters)==null?void 0:E.docs)==null?void 0:y.source}}};const R=["Default","Required","WithError","WithHelperText","FormExample"];export{a as Default,d as FormExample,l as Required,o as WithError,s as WithHelperText,R as __namedExportsOrder,O as default};
|
||||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user