keystone-design-bootstrap 1.0.72 → 1.0.73

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keystone-design-bootstrap",
3
- "version": "1.0.72",
3
+ "version": "1.0.73",
4
4
  "description": "Keystone Design Bootstrap - Sections, Elements, and Theme System for customer websites",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -65,7 +65,7 @@ export function LoginForm({ onSuccess, onClose }: LoginFormProps) {
65
65
  setPhoneValue(formatted);
66
66
  };
67
67
 
68
- const emailInput = (
68
+ const emailInput = (required = false) => (
69
69
  <input
70
70
  type="email"
71
71
  value={email}
@@ -73,10 +73,11 @@ export function LoginForm({ onSuccess, onClose }: LoginFormProps) {
73
73
  placeholder="you@example.com"
74
74
  className={inputClass}
75
75
  autoComplete="email"
76
+ required={required}
76
77
  />
77
78
  );
78
79
 
79
- const phoneInput = (
80
+ const phoneInput = (required = false) => (
80
81
  <div className="flex rounded-input border border-primary overflow-hidden focus-within:border-brand focus-within:ring-1 focus-within:ring-brand transition-colors">
81
82
  <select
82
83
  value={selectedCountry}
@@ -95,6 +96,7 @@ export function LoginForm({ onSuccess, onClose }: LoginFormProps) {
95
96
  placeholder={nationalPlaceholder}
96
97
  className="flex-1 px-3 py-2.5 text-base text-primary placeholder-quaternary bg-transparent focus:outline-none"
97
98
  autoComplete="tel"
99
+ required={required}
98
100
  />
99
101
  </div>
100
102
  );
@@ -255,7 +257,7 @@ export function LoginForm({ onSuccess, onClose }: LoginFormProps) {
255
257
  <form onSubmit={handleContinue} className="space-y-3">
256
258
  <div>
257
259
  <label className={labelClass}>Email address</label>
258
- {emailInput}
260
+ {emailInput()}
259
261
  </div>
260
262
  <div className="flex items-center gap-3">
261
263
  <hr className="flex-1 border-secondary" />
@@ -264,7 +266,7 @@ export function LoginForm({ onSuccess, onClose }: LoginFormProps) {
264
266
  </div>
265
267
  <div>
266
268
  <label className={labelClass}>Phone number</label>
267
- {phoneInput}
269
+ {phoneInput()}
268
270
  </div>
269
271
  <div className="pt-1">
270
272
  <button
@@ -347,14 +349,14 @@ export function LoginForm({ onSuccess, onClose }: LoginFormProps) {
347
349
  {/* Collect the missing contact method so the business can reach out */}
348
350
  {emailVal && !fullPhone && (
349
351
  <div>
350
- <label className={labelClass}>Phone number <span className="text-quaternary">(optional)</span></label>
351
- {phoneInput}
352
+ <label className={labelClass}>Phone number</label>
353
+ {phoneInput(true)}
352
354
  </div>
353
355
  )}
354
356
  {fullPhone && !emailVal && (
355
357
  <div>
356
- <label className={labelClass}>Email address <span className="text-quaternary">(optional)</span></label>
357
- {emailInput}
358
+ <label className={labelClass}>Email address</label>
359
+ {emailInput(true)}
358
360
  </div>
359
361
  )}
360
362
  <div>