@stackshift-ui/signin-signup 6.0.6 → 6.0.7-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helper/index.js +1 -55
- package/dist/helper/index.mjs +1 -8
- package/dist/index.js +1 -674
- package/dist/index.mjs +1 -16
- package/dist/signin-signup.js +1 -664
- package/dist/signin-signup.mjs +1 -6
- package/dist/signin_signup_a.js +1 -349
- package/dist/signin_signup_a.mjs +1 -8
- package/dist/signin_signup_b.js +1 -324
- package/dist/signin_signup_b.mjs +1 -8
- package/dist/types.js +1 -18
- package/package.json +18 -18
- package/dist/chunk-4YOZ4R43.mjs +0 -266
- package/dist/chunk-NGYQAQA4.mjs +0 -30
- package/dist/chunk-NJKLN5F4.mjs +0 -30
- package/dist/chunk-ZP54DEPE.mjs +0 -291
package/dist/signin_signup_b.js
CHANGED
|
@@ -1,324 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/signin_signup_b.tsx
|
|
31
|
-
var signin_signup_b_exports = {};
|
|
32
|
-
__export(signin_signup_b_exports, {
|
|
33
|
-
SigninSignup_B: () => SigninSignup_B,
|
|
34
|
-
default: () => SigninSignup_B
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(signin_signup_b_exports);
|
|
37
|
-
var import_button = require("@stackshift-ui/button");
|
|
38
|
-
var import_card = require("@stackshift-ui/card");
|
|
39
|
-
var import_container = require("@stackshift-ui/container");
|
|
40
|
-
var import_flex = require("@stackshift-ui/flex");
|
|
41
|
-
var import_form = require("@stackshift-ui/form");
|
|
42
|
-
var import_form_field = require("@stackshift-ui/form-field");
|
|
43
|
-
var import_heading = require("@stackshift-ui/heading");
|
|
44
|
-
var import_image = require("@stackshift-ui/image");
|
|
45
|
-
var import_input = require("@stackshift-ui/input");
|
|
46
|
-
var import_link = require("@stackshift-ui/link");
|
|
47
|
-
var import_section = require("@stackshift-ui/section");
|
|
48
|
-
var import_text = require("@stackshift-ui/text");
|
|
49
|
-
var import_react = __toESM(require("react"));
|
|
50
|
-
|
|
51
|
-
// src/helper/index.ts
|
|
52
|
-
var logoLink = (logo) => {
|
|
53
|
-
var _a, _b, _c;
|
|
54
|
-
if ((logo == null ? void 0 : logo.internalLink) && (logo == null ? void 0 : logo.type) === "linkInternal") {
|
|
55
|
-
if ((_b = (_a = logo == null ? void 0 : logo.internalLink) == null ? void 0 : _a.toLowerCase()) == null ? void 0 : _b.includes("home")) {
|
|
56
|
-
return "/";
|
|
57
|
-
}
|
|
58
|
-
return `/${logo.internalLink}`;
|
|
59
|
-
} else if ((logo == null ? void 0 : logo.externalLink) && (logo == null ? void 0 : logo.type) === "linkExternal") {
|
|
60
|
-
return (_c = logo == null ? void 0 : logo.externalLink) != null ? _c : "/";
|
|
61
|
-
} else {
|
|
62
|
-
return "/";
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
var thankYouPageLink = (link) => {
|
|
66
|
-
if (!link) {
|
|
67
|
-
return "/thank-you";
|
|
68
|
-
} else {
|
|
69
|
-
if ((link == null ? void 0 : link.linkType) === "linkInternal") {
|
|
70
|
-
return `/${link == null ? void 0 : link.internalLink}`;
|
|
71
|
-
} else {
|
|
72
|
-
return link == null ? void 0 : link.externalLink;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
// src/signin_signup_b.tsx
|
|
78
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
79
|
-
function SigninSignup_B({ logo, form, formLinks, signInLink }) {
|
|
80
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_section.Section, { className: "py-10 bg-primary lg:py-20", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_container.Container, { maxWidth: 1280, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_container.Container, { maxWidth: 576, children: [
|
|
81
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(LogoSection, { logo }),
|
|
82
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_card.Card, { borderRadius: "md", className: "p-6 mb-6 bg-white lg:mb-10 lg:p-12", children: [
|
|
83
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SubtitleAndHeadingText, { form }),
|
|
84
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SignupForm, { form, signInLink })
|
|
85
|
-
] }),
|
|
86
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormLinks, { formLinks })
|
|
87
|
-
] }) }) });
|
|
88
|
-
}
|
|
89
|
-
function LogoSection({ logo }) {
|
|
90
|
-
var _a;
|
|
91
|
-
if (!logo) return null;
|
|
92
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mb-10", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
|
-
import_link.Link,
|
|
94
|
-
{
|
|
95
|
-
"aria-label": `Go to ${logoLink(logo) === "/" ? "home page" : logoLink(logo)}`,
|
|
96
|
-
className: "flex justify-center mx-auto text-3xl font-bold leading-none",
|
|
97
|
-
href: logoLink(logo),
|
|
98
|
-
target: logo == null ? void 0 : logo.linkTarget,
|
|
99
|
-
rel: (logo == null ? void 0 : logo.linkTarget) === "_blank" ? "noopener noreferrer" : "",
|
|
100
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
101
|
-
import_image.Image,
|
|
102
|
-
{
|
|
103
|
-
src: logo == null ? void 0 : logo.image,
|
|
104
|
-
alt: (_a = logo == null ? void 0 : logo.alt) != null ? _a : "signup-logo",
|
|
105
|
-
width: 100,
|
|
106
|
-
height: 100,
|
|
107
|
-
className: "flex justify-center text-3xl font-bold leading-none text-white"
|
|
108
|
-
}
|
|
109
|
-
)
|
|
110
|
-
}
|
|
111
|
-
) });
|
|
112
|
-
}
|
|
113
|
-
function SubtitleAndHeadingText({ form }) {
|
|
114
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mb-6", children: [
|
|
115
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Text, { muted: true, children: form == null ? void 0 : form.subtitle }),
|
|
116
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_heading.Heading, { className: "text-2xl lg:text-2xl", children: form == null ? void 0 : form.name })
|
|
117
|
-
] });
|
|
118
|
-
}
|
|
119
|
-
function SignupForm({ form, signInLink }) {
|
|
120
|
-
var _a;
|
|
121
|
-
if (!(form == null ? void 0 : form.fields)) return null;
|
|
122
|
-
const [showPasswords, setShowPasswords] = import_react.default.useState({});
|
|
123
|
-
const togglePasswordVisibility = (fieldName) => {
|
|
124
|
-
setShowPasswords((prev) => ({
|
|
125
|
-
...prev,
|
|
126
|
-
[fieldName]: !prev[fieldName]
|
|
127
|
-
}));
|
|
128
|
-
};
|
|
129
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
130
|
-
import_form.Form,
|
|
131
|
-
{
|
|
132
|
-
id: (_a = form == null ? void 0 : form.id) != null ? _a : void 0,
|
|
133
|
-
name: "SignUp-VariantB-Form",
|
|
134
|
-
className: "form-signup",
|
|
135
|
-
thankyouPage: thankYouPageLink(form == null ? void 0 : form.thankYouPage),
|
|
136
|
-
children: [
|
|
137
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
138
|
-
FormFields,
|
|
139
|
-
{
|
|
140
|
-
form,
|
|
141
|
-
showPassword: showPasswords,
|
|
142
|
-
togglePasswordVisibility
|
|
143
|
-
}
|
|
144
|
-
),
|
|
145
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "webriq-recaptcha" }) }),
|
|
146
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "text-center", children: [
|
|
147
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormButtonLabel, { form }),
|
|
148
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SigninLink, { signInLink })
|
|
149
|
-
] })
|
|
150
|
-
]
|
|
151
|
-
}
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
function FormFields({
|
|
155
|
-
form,
|
|
156
|
-
showPassword,
|
|
157
|
-
togglePasswordVisibility
|
|
158
|
-
}) {
|
|
159
|
-
var _a, _b, _c, _d;
|
|
160
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.default.Fragment, { children: [
|
|
161
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_flex.Flex, { className: "flex-col lg:flex-row gap-3", children: (_b = (_a = form == null ? void 0 : form.fields) == null ? void 0 : _a.slice(0, 2)) == null ? void 0 : _b.map((formFields, index) => {
|
|
162
|
-
var _a2;
|
|
163
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
164
|
-
import_form_field.FormField,
|
|
165
|
-
{
|
|
166
|
-
noLabel: true,
|
|
167
|
-
variant: "secondary",
|
|
168
|
-
placeholder: formFields == null ? void 0 : formFields.placeholder,
|
|
169
|
-
required: formFields == null ? void 0 : formFields.isRequired,
|
|
170
|
-
name: (_a2 = formFields == null ? void 0 : formFields.name) != null ? _a2 : "",
|
|
171
|
-
items: formFields == null ? void 0 : formFields.items,
|
|
172
|
-
type: formFields == null ? void 0 : formFields.type,
|
|
173
|
-
...formFields
|
|
174
|
-
}
|
|
175
|
-
) }, index);
|
|
176
|
-
}) }),
|
|
177
|
-
(_d = (_c = form == null ? void 0 : form.fields) == null ? void 0 : _c.slice(2)) == null ? void 0 : _d.map((formFields, index) => {
|
|
178
|
-
var _a2;
|
|
179
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "my-3", children: (formFields == null ? void 0 : formFields.type) === "inputPassword" && formFields.name ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
180
|
-
PasswordField,
|
|
181
|
-
{
|
|
182
|
-
formFields,
|
|
183
|
-
showPassword: showPassword[formFields.name] || false,
|
|
184
|
-
togglePassword: () => togglePasswordVisibility(formFields.name)
|
|
185
|
-
}
|
|
186
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
187
|
-
import_form_field.FormField,
|
|
188
|
-
{
|
|
189
|
-
noLabel: true,
|
|
190
|
-
variant: "secondary",
|
|
191
|
-
name: (_a2 = formFields == null ? void 0 : formFields.name) != null ? _a2 : "",
|
|
192
|
-
placeholder: formFields == null ? void 0 : formFields.placeholder,
|
|
193
|
-
required: formFields == null ? void 0 : formFields.isRequired,
|
|
194
|
-
items: formFields == null ? void 0 : formFields.items,
|
|
195
|
-
type: formFields == null ? void 0 : formFields.type,
|
|
196
|
-
...formFields
|
|
197
|
-
}
|
|
198
|
-
) }, index);
|
|
199
|
-
})
|
|
200
|
-
] });
|
|
201
|
-
}
|
|
202
|
-
function PasswordField({
|
|
203
|
-
formFields,
|
|
204
|
-
showPassword,
|
|
205
|
-
togglePassword
|
|
206
|
-
}) {
|
|
207
|
-
var _a;
|
|
208
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex", children: [
|
|
209
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
210
|
-
import_input.Input,
|
|
211
|
-
{
|
|
212
|
-
noLabel: true,
|
|
213
|
-
ariaLabel: (_a = formFields == null ? void 0 : formFields.placeholder) != null ? _a : formFields == null ? void 0 : formFields.name,
|
|
214
|
-
variant: "secondary",
|
|
215
|
-
type: showPassword ? "text" : "password",
|
|
216
|
-
placeholder: formFields == null ? void 0 : formFields.placeholder,
|
|
217
|
-
name: formFields == null ? void 0 : formFields.name,
|
|
218
|
-
required: formFields == null ? void 0 : formFields.isRequired
|
|
219
|
-
}
|
|
220
|
-
),
|
|
221
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
222
|
-
import_button.Button,
|
|
223
|
-
{
|
|
224
|
-
variant: "unstyled",
|
|
225
|
-
as: "button",
|
|
226
|
-
ariaLabel: showPassword ? "Show password" : "Hide password",
|
|
227
|
-
className: "focus:outline-none mr-4",
|
|
228
|
-
type: "button",
|
|
229
|
-
onClick: togglePassword,
|
|
230
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PasswordIcon, { showPassword })
|
|
231
|
-
}
|
|
232
|
-
)
|
|
233
|
-
] });
|
|
234
|
-
}
|
|
235
|
-
function FormButtonLabel({ form }) {
|
|
236
|
-
var _a;
|
|
237
|
-
if (!(form == null ? void 0 : form.buttonLabel)) return null;
|
|
238
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
239
|
-
import_button.Button,
|
|
240
|
-
{
|
|
241
|
-
as: "button",
|
|
242
|
-
className: "w-full py-4 mb-3",
|
|
243
|
-
ariaLabel: (_a = form == null ? void 0 : form.buttonLabel) != null ? _a : "Sign Up form submit button",
|
|
244
|
-
variant: "custom",
|
|
245
|
-
type: "submit",
|
|
246
|
-
children: form == null ? void 0 : form.buttonLabel
|
|
247
|
-
}
|
|
248
|
-
);
|
|
249
|
-
}
|
|
250
|
-
function SigninLink({ signInLink }) {
|
|
251
|
-
if (!(signInLink == null ? void 0 : signInLink.label)) return null;
|
|
252
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "text-xs text-gray-900", children: [
|
|
253
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Already have an account?" }),
|
|
254
|
-
" ",
|
|
255
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
256
|
-
import_button.Button,
|
|
257
|
-
{
|
|
258
|
-
as: "link",
|
|
259
|
-
variant: "link",
|
|
260
|
-
link: signInLink,
|
|
261
|
-
className: "text-xs text-primary hover:underline",
|
|
262
|
-
ariaLabel: signInLink == null ? void 0 : signInLink.label,
|
|
263
|
-
children: signInLink == null ? void 0 : signInLink.label
|
|
264
|
-
}
|
|
265
|
-
)
|
|
266
|
-
] });
|
|
267
|
-
}
|
|
268
|
-
function FormLinks({ formLinks }) {
|
|
269
|
-
if (!formLinks) return null;
|
|
270
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-center text-secondary-foreground", children: formLinks == null ? void 0 : formLinks.map((link, index, { length }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
|
|
271
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
272
|
-
import_button.Button,
|
|
273
|
-
{
|
|
274
|
-
as: "link",
|
|
275
|
-
variant: "link",
|
|
276
|
-
link,
|
|
277
|
-
className: "text-xs underline text-secondary-foreground hover:text-gray-50",
|
|
278
|
-
ariaLabel: link == null ? void 0 : link.label,
|
|
279
|
-
children: link == null ? void 0 : link.label
|
|
280
|
-
}
|
|
281
|
-
),
|
|
282
|
-
index === length - 1 ? null : index === length - 2 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\xA0and\xA0" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\xA0,\xA0" })
|
|
283
|
-
] }, index)) });
|
|
284
|
-
}
|
|
285
|
-
function PasswordIcon({ showPassword }) {
|
|
286
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children: showPassword ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
287
|
-
"svg",
|
|
288
|
-
{
|
|
289
|
-
className: "w-5 h-5 my-auto ml-4 text-gray-500",
|
|
290
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
291
|
-
"aria-hidden": "true",
|
|
292
|
-
role: "img",
|
|
293
|
-
width: "1em",
|
|
294
|
-
height: "1em",
|
|
295
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
296
|
-
viewBox: "0 0 16 16",
|
|
297
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { fill: "currentColor", children: [
|
|
298
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z" }),
|
|
299
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z" }),
|
|
300
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z" })
|
|
301
|
-
] })
|
|
302
|
-
}
|
|
303
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
304
|
-
"svg",
|
|
305
|
-
{
|
|
306
|
-
className: "w-5 h-5 my-auto ml-4 text-gray-500",
|
|
307
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
308
|
-
"aria-hidden": "true",
|
|
309
|
-
role: "img",
|
|
310
|
-
width: "1em",
|
|
311
|
-
height: "1em",
|
|
312
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
313
|
-
viewBox: "0 0 16 16",
|
|
314
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { fill: "currentColor", children: [
|
|
315
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z" }),
|
|
316
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z" })
|
|
317
|
-
] })
|
|
318
|
-
}
|
|
319
|
-
) });
|
|
320
|
-
}
|
|
321
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
322
|
-
0 && (module.exports = {
|
|
323
|
-
SigninSignup_B
|
|
324
|
-
});
|
|
1
|
+
"use strict";var m=Object.create;var x=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var Y=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var U=(t,n)=>{for(var r in n)x(t,r,{get:n[r],enumerable:!0})},d=(t,n,r,u)=>{if(n&&typeof n=="object"||typeof n=="function")for(let p of T(n))!H.call(t,p)&&p!==r&&x(t,p,{get:()=>n[p],enumerable:!(u=q(n,p))||u.enumerable});return t};var V=(t,n,r)=>(r=t!=null?m(Y(t)):{},d(n||!t||!t.__esModule?x(r,"default",{value:t,enumerable:!0}):r,t)),$=t=>d(x({},"__esModule",{value:!0}),t);var O={};U(O,{SigninSignup_B:()=>z,default:()=>z});module.exports=$(O);var b=require("@stackshift-ui/button"),N=require("@stackshift-ui/card"),v=require("@stackshift-ui/container"),P=require("@stackshift-ui/flex"),g=require("@stackshift-ui/form"),l=require("@stackshift-ui/form-field"),S=require("@stackshift-ui/heading"),C=require("@stackshift-ui/image"),R=require("@stackshift-ui/input"),M=require("@stackshift-ui/link"),A=require("@stackshift-ui/section"),B=require("@stackshift-ui/text"),w=V(require("react"));var h=t=>{var n,r,u;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(r=(n=t==null?void 0:t.internalLink)==null?void 0:n.toLowerCase())!=null&&r.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(u=t==null?void 0:t.externalLink)!=null?u:"/"},L=t=>t?(t==null?void 0:t.linkType)==="linkInternal"?`/${t==null?void 0:t.internalLink}`:t==null?void 0:t.externalLink:"/thank-you";var a=require("react/jsx-runtime");function z({logo:t,form:n,formLinks:r,signInLink:u}){return(0,a.jsx)(A.Section,{className:"py-10 bg-primary lg:py-20",children:(0,a.jsx)(v.Container,{maxWidth:1280,children:(0,a.jsxs)(v.Container,{maxWidth:576,children:[(0,a.jsx)(W,{logo:t}),(0,a.jsxs)(N.Card,{borderRadius:"md",className:"p-6 mb-6 bg-white lg:mb-10 lg:p-12",children:[(0,a.jsx)(_,{form:n}),(0,a.jsx)(j,{form:n,signInLink:u})]}),(0,a.jsx)(J,{formLinks:r})]})})})}function W({logo:t}){var n;return t?(0,a.jsx)("div",{className:"mb-10",children:(0,a.jsx)(M.Link,{"aria-label":`Go to ${h(t)==="/"?"home page":h(t)}`,className:"flex justify-center mx-auto text-3xl font-bold leading-none",href:h(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,a.jsx)(C.Image,{src:t==null?void 0:t.image,alt:(n=t==null?void 0:t.alt)!=null?n:"signup-logo",width:100,height:100,className:"flex justify-center text-3xl font-bold leading-none text-white"})})}):null}function _({form:t}){return(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)(B.Text,{muted:!0,children:t==null?void 0:t.subtitle}),(0,a.jsx)(S.Heading,{className:"text-2xl lg:text-2xl",children:t==null?void 0:t.name})]})}function j({form:t,signInLink:n}){var c;if(!(t!=null&&t.fields))return null;let[r,u]=w.default.useState({}),p=s=>{u(e=>({...e,[s]:!e[s]}))};return(0,a.jsxs)(g.Form,{id:(c=t==null?void 0:t.id)!=null?c:void 0,name:"SignUp-VariantB-Form",className:"form-signup",thankyouPage:L(t==null?void 0:t.thankYouPage),children:[(0,a.jsx)(E,{form:t,showPassword:r,togglePasswordVisibility:p}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"webriq-recaptcha"})}),(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(k,{form:t}),(0,a.jsx)(D,{signInLink:n})]})]})}function E({form:t,showPassword:n,togglePasswordVisibility:r}){var u,p,c,s;return(0,a.jsxs)(w.default.Fragment,{children:[(0,a.jsx)(P.Flex,{className:"flex-col lg:flex-row gap-3",children:(p=(u=t==null?void 0:t.fields)==null?void 0:u.slice(0,2))==null?void 0:p.map((e,y)=>{var i;return(0,a.jsx)("div",{className:"w-full",children:(0,a.jsx)(l.FormField,{noLabel:!0,variant:"secondary",placeholder:e==null?void 0:e.placeholder,required:e==null?void 0:e.isRequired,name:(i=e==null?void 0:e.name)!=null?i:"",items:e==null?void 0:e.items,type:e==null?void 0:e.type,...e})},y)})}),(s=(c=t==null?void 0:t.fields)==null?void 0:c.slice(2))==null?void 0:s.map((e,y)=>{var i;return(0,a.jsx)("div",{className:"my-3",children:(e==null?void 0:e.type)==="inputPassword"&&e.name?(0,a.jsx)(G,{formFields:e,showPassword:n[e.name]||!1,togglePassword:()=>r(e.name)}):(0,a.jsx)(l.FormField,{noLabel:!0,variant:"secondary",name:(i=e==null?void 0:e.name)!=null?i:"",placeholder:e==null?void 0:e.placeholder,required:e==null?void 0:e.isRequired,items:e==null?void 0:e.items,type:e==null?void 0:e.type,...e})},y)})]})}function G({formFields:t,showPassword:n,togglePassword:r}){var u;return(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)(R.Input,{noLabel:!0,ariaLabel:(u=t==null?void 0:t.placeholder)!=null?u:t==null?void 0:t.name,variant:"secondary",type:n?"text":"password",placeholder:t==null?void 0:t.placeholder,name:t==null?void 0:t.name,required:t==null?void 0:t.isRequired}),(0,a.jsx)(b.Button,{variant:"unstyled",as:"button",ariaLabel:n?"Show password":"Hide password",className:"focus:outline-none mr-4",type:"button",onClick:r,children:(0,a.jsx)(K,{showPassword:n})})]})}function k({form:t}){var n;return t!=null&&t.buttonLabel?(0,a.jsx)(b.Button,{as:"button",className:"w-full py-4 mb-3",ariaLabel:(n=t==null?void 0:t.buttonLabel)!=null?n:"Sign Up form submit button",variant:"custom",type:"submit",children:t==null?void 0:t.buttonLabel}):null}function D({signInLink:t}){return t!=null&&t.label?(0,a.jsxs)("span",{className:"text-xs text-gray-900",children:[(0,a.jsx)("span",{children:"Already have an account?"})," ",(0,a.jsx)(b.Button,{as:"link",variant:"link",link:t,className:"text-xs text-primary hover:underline",ariaLabel:t==null?void 0:t.label,children:t==null?void 0:t.label})]}):null}function J({formLinks:t}){return t?(0,a.jsx)("p",{className:"text-xs text-center text-secondary-foreground",children:t==null?void 0:t.map((n,r,{length:u})=>(0,a.jsxs)("span",{children:[(0,a.jsx)(b.Button,{as:"link",variant:"link",link:n,className:"text-xs underline text-secondary-foreground hover:text-gray-50",ariaLabel:n==null?void 0:n.label,children:n==null?void 0:n.label}),r===u-1?null:r===u-2?(0,a.jsx)("span",{children:"\xA0and\xA0"}):(0,a.jsx)("span",{children:"\xA0,\xA0"})]},r))}):null}function K({showPassword:t}){return(0,a.jsx)(w.default.Fragment,{children:t?(0,a.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755c-.165.165-.337.328-.517.486l.708.709z"}),(0,a.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"}),(0,a.jsx)("path",{d:"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884l-12-12l.708-.708l12 12l-.708.708z"})]})}):(0,a.jsx)("svg",{className:"w-5 h-5 my-auto ml-4 text-gray-500",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 16 16",children:(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,a.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0a3.5 3.5 0 0 1-7 0z"})]})})})}0&&(module.exports={SigninSignup_B});
|
package/dist/signin_signup_b.mjs
CHANGED
package/dist/types.js
CHANGED
|
@@ -1,18 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/types.ts
|
|
17
|
-
var types_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(types_exports);
|
|
1
|
+
"use strict";var l=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var g=(n,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of a(t))!o.call(n,e)&&e!==r&&l(n,e,{get:()=>t[e],enumerable:!(i=s(t,e))||i.enumerable});return n};var u=n=>g(l({},"__esModule",{value:!0}),n);var c={};module.exports=u(c);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/signin-signup",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.7-beta.1",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -29,32 +29,32 @@
|
|
|
29
29
|
"typescript": "^5.6.2",
|
|
30
30
|
"vite-tsconfig-paths": "^5.0.1",
|
|
31
31
|
"vitest": "^2.1.1",
|
|
32
|
-
"@stackshift-ui/
|
|
33
|
-
"@stackshift-ui/
|
|
32
|
+
"@stackshift-ui/eslint-config": "6.0.3-beta.1",
|
|
33
|
+
"@stackshift-ui/typescript-config": "6.0.3-beta.1"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
|
-
"@stackshift-ui/
|
|
38
|
-
"@stackshift-ui/card": "6.0.
|
|
39
|
-
"@stackshift-ui/
|
|
40
|
-
"@stackshift-ui/heading": "6.0.
|
|
41
|
-
"@stackshift-ui/
|
|
42
|
-
"@stackshift-ui/
|
|
43
|
-
"@stackshift-ui/
|
|
44
|
-
"@stackshift-ui/
|
|
45
|
-
"@stackshift-ui/form
|
|
46
|
-
"@stackshift-ui/
|
|
47
|
-
"@stackshift-ui/
|
|
48
|
-
"@stackshift-ui/
|
|
49
|
-
"@stackshift-ui/
|
|
50
|
-
"@stackshift-ui/
|
|
37
|
+
"@stackshift-ui/system": "6.0.4-beta.1",
|
|
38
|
+
"@stackshift-ui/card": "6.0.4-beta.1",
|
|
39
|
+
"@stackshift-ui/text": "6.0.4-beta.1",
|
|
40
|
+
"@stackshift-ui/heading": "6.0.4-beta.1",
|
|
41
|
+
"@stackshift-ui/input": "6.0.5-beta.1",
|
|
42
|
+
"@stackshift-ui/container": "6.0.4-beta.1",
|
|
43
|
+
"@stackshift-ui/form-field": "6.0.6-beta.1",
|
|
44
|
+
"@stackshift-ui/image": "6.0.4-beta.1",
|
|
45
|
+
"@stackshift-ui/form": "6.0.4-beta.1",
|
|
46
|
+
"@stackshift-ui/flex": "6.0.4-beta.1",
|
|
47
|
+
"@stackshift-ui/scripts": "6.0.3-beta.1",
|
|
48
|
+
"@stackshift-ui/button": "6.0.4-beta.1",
|
|
49
|
+
"@stackshift-ui/section": "6.0.4-beta.1",
|
|
50
|
+
"@stackshift-ui/link": "6.0.4-beta.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@types/react": "16.8 - 19",
|
|
54
54
|
"next": "10 - 14",
|
|
55
55
|
"react": "16.8 - 19",
|
|
56
56
|
"react-dom": "16.8 - 19",
|
|
57
|
-
"@stackshift-ui/system": ">=
|
|
57
|
+
"@stackshift-ui/system": ">=6.0.4-beta.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependenciesMeta": {
|
|
60
60
|
"next": {
|