@swan-admin/swan-web-component 1.0.72 → 1.0.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/Header-Bf7ClSfT.js +32 -0
  2. package/dist/Header-Bf7ClSfT.js.map +1 -0
  3. package/dist/Header-C65iSMsF.js +32 -0
  4. package/dist/Header-C65iSMsF.js.map +1 -0
  5. package/dist/LoadingScreen-C9vDF8N6.js +12 -0
  6. package/dist/LoadingScreen-C9vDF8N6.js.map +1 -0
  7. package/dist/LoadingScreen-CDhtnDGT.js +12 -0
  8. package/dist/LoadingScreen-CDhtnDGT.js.map +1 -0
  9. package/dist/LoadingScreen-DFKUWqQS.js +12 -0
  10. package/dist/LoadingScreen-DFKUWqQS.js.map +1 -0
  11. package/dist/LoadingScreen-DGyU-r8n.js +12 -0
  12. package/dist/LoadingScreen-DGyU-r8n.js.map +1 -0
  13. package/dist/bodyScan.d.ts +2 -2
  14. package/dist/bodyScan.js +2 -2
  15. package/dist/bodyScan.js.map +1 -1
  16. package/dist/bodyScan.mjs +2 -2
  17. package/dist/bodyScan.mjs.map +1 -1
  18. package/dist/createSvgIcon-CSumJvXf.js +2 -0
  19. package/dist/createSvgIcon-CSumJvXf.js.map +1 -0
  20. package/dist/createSvgIcon-KYNE9Cmr.js +2 -0
  21. package/dist/createSvgIcon-KYNE9Cmr.js.map +1 -0
  22. package/dist/faceScan.d.ts +2 -2
  23. package/dist/faceScan.js +1 -1
  24. package/dist/faceScan.js.map +1 -1
  25. package/dist/faceScan.mjs +1 -1
  26. package/dist/faceScan.mjs.map +1 -1
  27. package/dist/index-B23Mlqqj.js +5068 -0
  28. package/dist/index-B23Mlqqj.js.map +1 -0
  29. package/dist/index-CenJi_ia.js +4686 -0
  30. package/dist/index-CenJi_ia.js.map +1 -0
  31. package/dist/index-D0NFHRX9.js +5068 -0
  32. package/dist/index-D0NFHRX9.js.map +1 -0
  33. package/dist/index-slG-fgu8.js +4684 -0
  34. package/dist/index-slG-fgu8.js.map +1 -0
  35. package/dist/index.d.ts +2 -2
  36. package/dist/index.js +1 -1
  37. package/dist/index.mjs +1 -1
  38. package/dist/interfaces-C9CQpzhP.d.ts +142 -0
  39. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { O as OnboardingProps, F as FocalLengthProps, E as EducationalProps } from './interfaces-ej_cyAqr.js';
2
- export { G as GenderType, P as PreferredLanguage, S as Step, a as StyleConfig } from './interfaces-ej_cyAqr.js';
1
+ import { O as OnboardingProps, F as FocalLengthProps, E as EducationalProps } from './interfaces-C9CQpzhP.js';
2
+ export { G as GenderType, P as PreferredLanguage, S as Step, a as StyleConfig } from './interfaces-C9CQpzhP.js';
3
3
  import React$1 from 'react';
4
4
 
5
5
  declare const Onboarding: React$1.FC<OnboardingProps>;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react/jsx-runtime"),o=require("react"),l=require("./Header-DyVbEgG9.js"),n=require("./arrow-right-CC1_17IM.js"),a=require("./createSvgIcon-qbf2BgaS.js");function t(e){var o=Object.create(null);return e&&Object.keys(e).forEach(function(l){if("default"!==l){var n=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(o,l,n.get?n:{enumerable:!0,get:function(){return e[l]}})}}),o.default=e,Object.freeze(o)}require("react-dom");var i=t(o);const d=(...e)=>e.filter(Boolean).join(" "),m=i.forwardRef(({className:o,resolvedConfig:l,type:n,...a},t)=>e.jsxs(e.Fragment,{children:[e.jsx("input",{type:n,className:`${o||""} customInput `+d("flex w-full px-[.75rem] h-[40px] text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed backdrop-blur-sm bg-btn font-medium pl-[1rem] pr-[2.5rem] focus:ring-1 focus:outline-none transition-all duration-200"),autoCapitalize:"off",autoCorrect:"off",ref:t,...a,style:{background:l?.style?.input?.inputBackgroundColor||"#F9FAFC",color:l?.style?.input?.inputTextColor||"#000",fontSize:l?.style?.input?.inputFontSize||"16px",fontWeight:l?.style?.input?.inputFontWeight||"400",border:`1px solid ${l?.style?.input?.inputBorderColor||"transparent"}`,fontFamily:l?.style?.base?.baseFontFamily||"Inter, sans-serif",borderRadius:l?.style?.input?.inputBorderRadius||"4px"}}),e.jsx("style",{children:`\n .customInput::placeholder {\n color: ${l?.style?.input?.inputPlaceholderColor||"#000"};\n font-weight: ${l?.style?.input?.inputFontWeight||"500"};\n opacity: 1;\n font-size: ${l?.style?.input?.inputFontSize||"14px"};\n }\n .customInput:focus-visible {\n box-shadow:0 0 0 2px white, 0 0 0 4px rgb(from currentColor r g b / 0.5);\n }\n \n `})]}));m.displayName="CustomInput";
1
+ "use strict";var e=require("react/jsx-runtime"),o=require("react"),l=require("./Header-Bf7ClSfT.js"),n=require("./arrow-right-CC1_17IM.js"),a=require("./createSvgIcon-CSumJvXf.js");function t(e){var o=Object.create(null);return e&&Object.keys(e).forEach(function(l){if("default"!==l){var n=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(o,l,n.get?n:{enumerable:!0,get:function(){return e[l]}})}}),o.default=e,Object.freeze(o)}require("react-dom");var i=t(o);const d=(...e)=>e.filter(Boolean).join(" "),m=i.forwardRef(({className:o,resolvedConfig:l,type:n,...a},t)=>e.jsxs(e.Fragment,{children:[e.jsx("input",{type:n,className:`${o||""} customInput `+d("flex w-full px-[.75rem] h-[40px] text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed backdrop-blur-sm bg-btn font-medium pl-[1rem] pr-[2.5rem] focus:ring-1 focus:outline-none transition-all duration-200"),autoCapitalize:"off",autoCorrect:"off",ref:t,...a,style:{background:l?.style?.input?.inputBackgroundColor||"#F9FAFC",color:l?.style?.input?.inputTextColor||"#000",fontSize:l?.style?.input?.inputFontSize||"16px",fontWeight:l?.style?.input?.inputFontWeight||"400",border:`1px solid ${l?.style?.input?.inputBorderColor||"transparent"}`,fontFamily:l?.style?.base?.baseFontFamily||"Inter, sans-serif",borderRadius:l?.style?.input?.inputBorderRadius||"4px"}}),e.jsx("style",{children:`\n .customInput::placeholder {\n color: ${l?.style?.input?.inputPlaceholderColor||"#000"};\n font-weight: ${l?.style?.input?.inputFontWeight||"500"};\n opacity: 1;\n font-size: ${l?.style?.input?.inputFontSize||"14px"};\n }\n .customInput:focus-visible {\n box-shadow:0 0 0 2px white, 0 0 0 4px rgb(from currentColor r g b / 0.5);\n }\n \n `})]}));m.displayName="CustomInput";
2
2
  /**
3
3
  * @license lucide-react v0.553.0 - ISC
4
4
  *
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{jsxs as e,Fragment as l,jsx as o}from"react/jsx-runtime";import*as n from"react";import a,{isValidElement as t,cloneElement as i,Children as d,useState as m,useCallback as _,useMemo as r,useEffect as c,createContext as s,useRef as h,useLayoutEffect as f,useId as g,useContext as u,useInsertionEffect as p,Fragment as y,createElement as v,forwardRef as P,Component as A}from"react";import{S as x,h as S,i as b,s as G,w as C,T,u as E,a as O,b as M,E as N,c as R,P as L,d as w,e as X,f as F,g as V,_ as I,j as D,k,l as H,m as U,n as B,o as K,p as j,q as W,r as Y,t as $,v as z,x as Z,y as Q,z as J,A as q,B as ee,C as le,D as oe,F as ne,G as ae,H as te,I as ie,J as de,K as me,L as _e,M as re,N as ce,O as se,Q as he,R as fe,U as ge,V as ue,W as pe,X as ye,Y as ve,Z as Pe,$ as Ae,a0 as xe,a1 as Se,a2 as be,a3 as Ge,a4 as Ce,a5 as Te,a6 as Ee,a7 as Oe,a8 as Me,a9 as Ne,aa as Re,ab as Le,ac as we,ad as Xe,ae as Fe,af as Ve,ag as Ie,ah as De,ai as ke,aj as He,ak as Ue,al as Be,am as Ke,an as je,ao as We,ap as Ye,aq as $e,ar as ze,as as Ze,at as Qe}from"./Header-CGdVhD4h.js";export{au as PreferredLanguage}from"./Header-CGdVhD4h.js";import{c as Je,A as qe}from"./arrow-right-DXQbS3wL.js";import{c as el,u as ll}from"./createSvgIcon-DS-4jmZ4.js";import"react-dom";const ol=(...e)=>e.filter(Boolean).join(" "),nl=n.forwardRef(({className:n,resolvedConfig:a,type:t,...i},d)=>e(l,{children:[o("input",{type:t,className:`${n||""} customInput `+ol("flex w-full px-[.75rem] h-[40px] text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed backdrop-blur-sm bg-btn font-medium pl-[1rem] pr-[2.5rem] focus:ring-1 focus:outline-none transition-all duration-200"),autoCapitalize:"off",autoCorrect:"off",ref:d,...i,style:{background:a?.style?.input?.inputBackgroundColor||"#F9FAFC",color:a?.style?.input?.inputTextColor||"#000",fontSize:a?.style?.input?.inputFontSize||"16px",fontWeight:a?.style?.input?.inputFontWeight||"400",border:`1px solid ${a?.style?.input?.inputBorderColor||"transparent"}`,fontFamily:a?.style?.base?.baseFontFamily||"Inter, sans-serif",borderRadius:a?.style?.input?.inputBorderRadius||"4px"}}),o("style",{children:`\n .customInput::placeholder {\n color: ${a?.style?.input?.inputPlaceholderColor||"#000"};\n font-weight: ${a?.style?.input?.inputFontWeight||"500"};\n opacity: 1;\n font-size: ${a?.style?.input?.inputFontSize||"14px"};\n }\n .customInput:focus-visible {\n box-shadow:0 0 0 2px white, 0 0 0 4px rgb(from currentColor r g b / 0.5);\n }\n \n `})]}));nl.displayName="CustomInput";
1
+ import{jsxs as e,Fragment as l,jsx as o}from"react/jsx-runtime";import*as n from"react";import a,{isValidElement as t,cloneElement as i,Children as d,useState as m,useCallback as _,useMemo as r,useEffect as c,createContext as s,useRef as h,useLayoutEffect as f,useId as g,useContext as u,useInsertionEffect as p,Fragment as y,createElement as v,forwardRef as P,Component as A}from"react";import{S as x,h as S,i as b,s as G,w as C,T,u as E,a as O,b as M,E as N,c as R,P as L,d as w,e as X,f as F,g as V,_ as I,j as D,k,l as H,m as U,n as B,o as K,p as j,q as W,r as Y,t as $,v as z,x as Z,y as Q,z as J,A as q,B as ee,C as le,D as oe,F as ne,G as ae,H as te,I as ie,J as de,K as me,L as _e,M as re,N as ce,O as se,Q as he,R as fe,U as ge,V as ue,W as pe,X as ye,Y as ve,Z as Pe,$ as Ae,a0 as xe,a1 as Se,a2 as be,a3 as Ge,a4 as Ce,a5 as Te,a6 as Ee,a7 as Oe,a8 as Me,a9 as Ne,aa as Re,ab as Le,ac as we,ad as Xe,ae as Fe,af as Ve,ag as Ie,ah as De,ai as ke,aj as He,ak as Ue,al as Be,am as Ke,an as je,ao as We,ap as Ye,aq as $e,ar as ze,as as Ze,at as Qe}from"./Header-C65iSMsF.js";export{au as PreferredLanguage}from"./Header-C65iSMsF.js";import{c as Je,A as qe}from"./arrow-right-DXQbS3wL.js";import{c as el,u as ll}from"./createSvgIcon-KYNE9Cmr.js";import"react-dom";const ol=(...e)=>e.filter(Boolean).join(" "),nl=n.forwardRef(({className:n,resolvedConfig:a,type:t,...i},d)=>e(l,{children:[o("input",{type:t,className:`${n||""} customInput `+ol("flex w-full px-[.75rem] h-[40px] text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed backdrop-blur-sm bg-btn font-medium pl-[1rem] pr-[2.5rem] focus:ring-1 focus:outline-none transition-all duration-200"),autoCapitalize:"off",autoCorrect:"off",ref:d,...i,style:{background:a?.style?.input?.inputBackgroundColor||"#F9FAFC",color:a?.style?.input?.inputTextColor||"#000",fontSize:a?.style?.input?.inputFontSize||"16px",fontWeight:a?.style?.input?.inputFontWeight||"400",border:`1px solid ${a?.style?.input?.inputBorderColor||"transparent"}`,fontFamily:a?.style?.base?.baseFontFamily||"Inter, sans-serif",borderRadius:a?.style?.input?.inputBorderRadius||"4px"}}),o("style",{children:`\n .customInput::placeholder {\n color: ${a?.style?.input?.inputPlaceholderColor||"#000"};\n font-weight: ${a?.style?.input?.inputFontWeight||"500"};\n opacity: 1;\n font-size: ${a?.style?.input?.inputFontSize||"14px"};\n }\n .customInput:focus-visible {\n box-shadow:0 0 0 2px white, 0 0 0 4px rgb(from currentColor r g b / 0.5);\n }\n \n `})]}));nl.displayName="CustomInput";
2
2
  /**
3
3
  * @license lucide-react v0.553.0 - ISC
4
4
  *
@@ -0,0 +1,142 @@
1
+ declare enum GenderType {
2
+ Male = "male",
3
+ Female = "female"
4
+ }
5
+ declare enum PreferredLanguage {
6
+ English = "English",
7
+ Hindi = "Hindi",
8
+ German = "German",
9
+ French = "French",
10
+ Spanish = "Spanish",
11
+ Arabic = "Arabic",
12
+ Italian = "Italian"
13
+ }
14
+
15
+ interface Step {
16
+ type: StepType;
17
+ value?: any;
18
+ order?: number;
19
+ isVisible?: boolean;
20
+ onStepComplete?: (value: any) => Promise<void> | void;
21
+ }
22
+ type Gender = "male" | "female";
23
+ type StepType = "email" | "name" | "height" | "gender";
24
+ interface StyleConfig {
25
+ base?: {
26
+ brandColor?: string;
27
+ backgroundColor?: string;
28
+ primaryColor?: string;
29
+ secondaryColor?: string;
30
+ baseTextColor?: string;
31
+ baseFontSize?: string;
32
+ baseFontFamily?: string;
33
+ };
34
+ logo?: {
35
+ logoWidth?: string;
36
+ logoHeight?: string;
37
+ };
38
+ heading?: {
39
+ headingColor?: string;
40
+ headingFontSize?: string;
41
+ headingFontWeight?: string;
42
+ headingFontFamily?: string;
43
+ };
44
+ subheading?: {
45
+ subheadingColor?: string;
46
+ subheadingFontSize?: string;
47
+ subheadingFontWeight?: string;
48
+ subheadingFontFamily?: string;
49
+ };
50
+ button?: {
51
+ buttonBackground?: string;
52
+ buttonDisabledBackground?: string;
53
+ buttonDisabledTextColor?: string;
54
+ buttonTextColor?: string;
55
+ buttonFontSize?: string;
56
+ buttonFontFamily?: string;
57
+ buttonBorderRadius?: string;
58
+ };
59
+ input?: {
60
+ inputBackgroundColor?: string;
61
+ inputTextColor?: string;
62
+ inputPlaceholderColor?: string;
63
+ inputBorderColor?: string;
64
+ inputFontSize?: string;
65
+ inputFontWeight?: string;
66
+ inputBorderRadius?: string;
67
+ inputErrorColor?: string;
68
+ inputErrorFontSize?: string;
69
+ };
70
+ }
71
+ interface OnboardingProps {
72
+ steps: Step[];
73
+ config?: Config;
74
+ onComplete?: (values: Record<string, any>) => void;
75
+ }
76
+ interface Config {
77
+ style?: StyleConfig;
78
+ logo?: string;
79
+ loader?: string;
80
+ }
81
+ interface FocalLengthOuput {
82
+ brandName: string;
83
+ modelName: string;
84
+ focalLength: number;
85
+ }
86
+ interface FocalLengthProps {
87
+ onComplete?: (value: FocalLengthOuput) => Promise<void> | void;
88
+ initialValue?: any;
89
+ config?: Config;
90
+ }
91
+ interface sectionsType {
92
+ full: "full";
93
+ body: "body";
94
+ face: "face";
95
+ }
96
+ interface EducationalProps {
97
+ gender?: Gender;
98
+ sections?: sectionsType[keyof sectionsType][];
99
+ config?: any;
100
+ onComplete?: () => void;
101
+ }
102
+ interface BodyScanProps {
103
+ userDetails: UserDetails;
104
+ language?: PreferredLanguage;
105
+ config?: any;
106
+ onScanSuccess?: (data: any) => void;
107
+ onRetry?: () => void;
108
+ onComplete?: () => void;
109
+ onScanError: (errorDetails: any) => void;
110
+ isError?: boolean;
111
+ isSuccess?: boolean;
112
+ }
113
+ interface UserDetails {
114
+ email: string;
115
+ userName?: string;
116
+ shopDomain: string;
117
+ gender: Gender;
118
+ heightInCm: number;
119
+ scanType: string;
120
+ deviceFocalLength: number;
121
+ deviceModelName: string;
122
+ callbackUrl?: string;
123
+ }
124
+ interface FaceScanMetaData {
125
+ email: string;
126
+ shopDomain: string;
127
+ gender: Gender;
128
+ deviceFocalLength: number;
129
+ callbackUrl?: string;
130
+ }
131
+ interface FaceScanProps {
132
+ userDetails: FaceScanMetaData;
133
+ onComplete?: (data: any) => void;
134
+ onScanError?: (data: any) => void;
135
+ onRetry?: () => void;
136
+ config?: any;
137
+ isError?: boolean;
138
+ isSuccess?: boolean;
139
+ }
140
+
141
+ export { GenderType as G, PreferredLanguage as P };
142
+ export type { BodyScanProps as B, EducationalProps as E, FocalLengthProps as F, OnboardingProps as O, Step as S, UserDetails as U, StyleConfig as a, FaceScanProps as b, FaceScanMetaData as c };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swan-admin/swan-web-component",
3
- "version": "1.0.72",
3
+ "version": "1.0.74",
4
4
  "description": "Cross-framework Onboarding component (React + Angular compatible)",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",