@feelflow/ffid-sdk 2.8.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -621,7 +621,7 @@ function createMembersMethods(deps) {
621
621
  }
622
622
 
623
623
  // src/client/version-check.ts
624
- var SDK_VERSION = "2.8.0";
624
+ var SDK_VERSION = "2.9.0";
625
625
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
626
626
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
627
627
  function sdkHeaders() {
@@ -3436,6 +3436,29 @@ function defaultCategories() {
3436
3436
  label: DEFAULT_CATEGORY_LABELS_JA[value]
3437
3437
  }));
3438
3438
  }
3439
+ function renderCategoryOptions(options) {
3440
+ const hasAnyGroup = options.some((o) => !!o.group);
3441
+ if (!hasAnyGroup) {
3442
+ return options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value, children: opt.label }, opt.value));
3443
+ }
3444
+ const ungrouped = options.filter((o) => !o.group);
3445
+ const groupKeys = [];
3446
+ const groupLabelByKey = /* @__PURE__ */ new Map();
3447
+ const itemsByKey = /* @__PURE__ */ new Map();
3448
+ for (const opt of options) {
3449
+ if (!opt.group) continue;
3450
+ if (!itemsByKey.has(opt.group)) {
3451
+ groupKeys.push(opt.group);
3452
+ itemsByKey.set(opt.group, []);
3453
+ groupLabelByKey.set(opt.group, opt.groupLabel ?? opt.group);
3454
+ }
3455
+ itemsByKey.get(opt.group).push(opt);
3456
+ }
3457
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3458
+ ungrouped.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value, children: opt.label }, opt.value)),
3459
+ groupKeys.map((key) => /* @__PURE__ */ jsxRuntime.jsx("optgroup", { label: groupLabelByKey.get(key) ?? key, children: itemsByKey.get(key).map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value, children: opt.label }, opt.value)) }, key))
3460
+ ] });
3461
+ }
3439
3462
  var labelStyle = {
3440
3463
  display: "block",
3441
3464
  fontSize: FONT_SIZE_SM,
@@ -3475,6 +3498,7 @@ var submitButtonStyle = {
3475
3498
  borderRadius: BORDER_RADIUS_MD,
3476
3499
  cursor: "pointer"
3477
3500
  };
3501
+ var SUBMIT_BUTTON_OPACITY_PENDING = 0.6;
3478
3502
  function FFIDInquiryForm({
3479
3503
  mode,
3480
3504
  prefill,
@@ -3488,12 +3512,16 @@ function FFIDInquiryForm({
3488
3512
  turnstileToken = null,
3489
3513
  turnstileSlot,
3490
3514
  onSubmit,
3515
+ onChange,
3516
+ separateLegalCheckboxes = false,
3491
3517
  locale = "ja",
3492
3518
  className
3493
3519
  }) {
3494
3520
  const isAuth = mode === "authenticated";
3521
+ const isNameReadOnly = isAuth && !!prefill?.name;
3522
+ const isEmailReadOnly = isAuth;
3495
3523
  const categoryOptions = react.useMemo(
3496
- () => categories ?? defaultCategories(),
3524
+ () => categories && categories.length > 0 ? categories : defaultCategories(),
3497
3525
  [categories]
3498
3526
  );
3499
3527
  const initialOrgId = react.useMemo(() => {
@@ -3502,23 +3530,83 @@ function FFIDInquiryForm({
3502
3530
  if (organizations.length === 1) return organizations[0].id;
3503
3531
  return null;
3504
3532
  }, [isAuth, organizations, preselectedOrganizationId]);
3533
+ const initialCategory = react.useMemo(() => {
3534
+ const fallback = categoryOptions[0]?.value ?? "general";
3535
+ const requested = prefill?.category;
3536
+ if (!requested) return fallback;
3537
+ return categoryOptions.some((opt) => opt.value === requested) ? requested : fallback;
3538
+ }, [categoryOptions, prefill?.category]);
3505
3539
  const [name, setName] = react.useState(prefill?.name ?? "");
3506
3540
  const [email, setEmail] = react.useState(prefill?.email ?? "");
3507
- const [company, setCompany] = react.useState("");
3508
- const [phone, setPhone] = react.useState("");
3509
- const [category, setCategory] = react.useState(categoryOptions[0]?.value ?? "general");
3510
- const [message, setMessage] = react.useState("");
3541
+ const [company, setCompany] = react.useState(isAuth ? "" : prefill?.company ?? "");
3542
+ const [phone, setPhone] = react.useState(isAuth ? "" : prefill?.phone ?? "");
3543
+ const [category, setCategory] = react.useState(initialCategory);
3544
+ const [message, setMessage] = react.useState(prefill?.message ?? "");
3511
3545
  const [organizationId, setOrganizationId] = react.useState(initialOrgId);
3512
3546
  const [inquiryFollowup, setInquiryFollowup] = react.useState(false);
3513
3547
  const [general, setGeneral] = react.useState(false);
3514
3548
  const [agreedLegal, setAgreedLegal] = react.useState(false);
3549
+ const [agreedTerms, setAgreedTerms] = react.useState(false);
3550
+ const [agreedPrivacy, setAgreedPrivacy] = react.useState(false);
3515
3551
  const [submitting, setSubmitting] = react.useState(false);
3516
3552
  const [formError, setFormError] = react.useState(null);
3517
3553
  const [successMessage, setSuccessMessage] = react.useState(null);
3554
+ const [hydrated, setHydrated] = react.useState(false);
3555
+ react.useEffect(() => {
3556
+ setHydrated(true);
3557
+ }, []);
3558
+ const onChangeRef = react.useRef(onChange);
3559
+ react.useEffect(() => {
3560
+ onChangeRef.current = onChange;
3561
+ }, [onChange]);
3562
+ react.useEffect(() => {
3563
+ onChangeRef.current?.({
3564
+ name: name.trim(),
3565
+ email: email.trim(),
3566
+ company: company.trim() || null,
3567
+ phone: phone.trim() || null,
3568
+ category,
3569
+ message: message.trim(),
3570
+ organizationId,
3571
+ inquiryFollowupOptIn: inquiryFollowup,
3572
+ generalNewsletterOptIn: general,
3573
+ termsVersion,
3574
+ privacyVersion,
3575
+ turnstileToken: turnstileToken ?? null,
3576
+ locale
3577
+ });
3578
+ }, [
3579
+ name,
3580
+ email,
3581
+ company,
3582
+ phone,
3583
+ category,
3584
+ message,
3585
+ organizationId,
3586
+ inquiryFollowup,
3587
+ general,
3588
+ termsVersion,
3589
+ privacyVersion,
3590
+ turnstileToken,
3591
+ locale
3592
+ ]);
3518
3593
  async function handleSubmit(e) {
3519
3594
  e.preventDefault();
3520
3595
  setFormError(null);
3521
- if (!agreedLegal) {
3596
+ if (separateLegalCheckboxes) {
3597
+ if (!agreedTerms && !agreedPrivacy) {
3598
+ setFormError("\u5229\u7528\u898F\u7D04\u3068\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3599
+ return;
3600
+ }
3601
+ if (!agreedTerms) {
3602
+ setFormError("\u5229\u7528\u898F\u7D04\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3603
+ return;
3604
+ }
3605
+ if (!agreedPrivacy) {
3606
+ setFormError("\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3607
+ return;
3608
+ }
3609
+ } else if (!agreedLegal) {
3522
3610
  setFormError("\u5229\u7528\u898F\u7D04\u3068\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3523
3611
  return;
3524
3612
  }
@@ -3555,12 +3643,13 @@ function FFIDInquiryForm({
3555
3643
  );
3556
3644
  setMessage("");
3557
3645
  } else {
3558
- setFormError(result.message);
3646
+ setFormError(
3647
+ result.message ?? "\u9001\u4FE1\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u6642\u9593\u3092\u304A\u3044\u3066\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002"
3648
+ );
3559
3649
  }
3560
3650
  } catch (err) {
3561
- setFormError(
3562
- err instanceof Error ? err.message : "\u9001\u4FE1\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6642\u9593\u3092\u304A\u3044\u3066\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002"
3563
- );
3651
+ console.error("[FFIDInquiryForm] onSubmit threw", err);
3652
+ setFormError("\u9001\u4FE1\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6642\u9593\u3092\u304A\u3044\u3066\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002");
3564
3653
  } finally {
3565
3654
  setSubmitting(false);
3566
3655
  }
@@ -3584,188 +3673,257 @@ function FFIDInquiryForm({
3584
3673
  );
3585
3674
  }
3586
3675
  const showOrgBlock = isAuth && organizations.length >= 1;
3587
- return /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className, noValidate: true, children: [
3588
- showOrgBlock && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3589
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-org", children: "\u554F\u3044\u5408\u308F\u305B\u308B\u7ACB\u5834" }),
3590
- /* @__PURE__ */ jsxRuntime.jsxs(
3591
- "select",
3592
- {
3593
- id: "ffid-inquiry-org",
3594
- style: inputStyle,
3595
- value: organizationId ?? "",
3596
- onChange: (e) => setOrganizationId(e.target.value || null),
3597
- children: [
3598
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: "\u500B\u4EBA\u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B" }),
3599
- organizations.map((org) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: org.id, children: [
3600
- org.name,
3601
- " \u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B"
3602
- ] }, org.id))
3603
- ]
3604
- }
3605
- )
3606
- ] }),
3607
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3608
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-name", children: "\u304A\u540D\u524D" }),
3609
- /* @__PURE__ */ jsxRuntime.jsx(
3610
- "input",
3611
- {
3612
- id: "ffid-inquiry-name",
3613
- style: isAuth ? readOnlyStyle : inputStyle,
3614
- type: "text",
3615
- value: name,
3616
- onChange: (e) => setName(e.target.value),
3617
- readOnly: isAuth,
3618
- required: true
3619
- }
3620
- )
3621
- ] }),
3622
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3623
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-email", children: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9" }),
3624
- /* @__PURE__ */ jsxRuntime.jsx(
3625
- "input",
3626
- {
3627
- id: "ffid-inquiry-email",
3628
- style: isAuth ? readOnlyStyle : inputStyle,
3629
- type: "email",
3630
- value: email,
3631
- onChange: (e) => setEmail(e.target.value),
3632
- readOnly: isAuth,
3633
- required: true
3634
- }
3635
- )
3636
- ] }),
3637
- !isAuth && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3638
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3639
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-company", children: "\u4F1A\u793E\u540D (\u4EFB\u610F)" }),
3640
- /* @__PURE__ */ jsxRuntime.jsx(
3641
- "input",
3642
- {
3643
- id: "ffid-inquiry-company",
3644
- style: inputStyle,
3645
- type: "text",
3646
- value: company,
3647
- onChange: (e) => setCompany(e.target.value)
3648
- }
3649
- )
3650
- ] }),
3651
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3652
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-phone", children: "\u96FB\u8A71\u756A\u53F7 (\u4EFB\u610F)" }),
3676
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3677
+ "form",
3678
+ {
3679
+ onSubmit: handleSubmit,
3680
+ className,
3681
+ noValidate: true,
3682
+ "data-hydrated": hydrated ? "true" : void 0,
3683
+ children: [
3684
+ showOrgBlock && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3685
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-org", children: "\u554F\u3044\u5408\u308F\u305B\u308B\u7ACB\u5834" }),
3686
+ /* @__PURE__ */ jsxRuntime.jsxs(
3687
+ "select",
3688
+ {
3689
+ id: "ffid-inquiry-org",
3690
+ style: inputStyle,
3691
+ value: organizationId ?? "",
3692
+ onChange: (e) => setOrganizationId(e.target.value || null),
3693
+ children: [
3694
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: "\u500B\u4EBA\u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B" }),
3695
+ organizations.map((org) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: org.id, children: [
3696
+ org.name,
3697
+ " \u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B"
3698
+ ] }, org.id))
3699
+ ]
3700
+ }
3701
+ )
3702
+ ] }),
3703
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3704
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-name", children: "\u304A\u540D\u524D" }),
3705
+ /* @__PURE__ */ jsxRuntime.jsx(
3706
+ "input",
3707
+ {
3708
+ id: "ffid-inquiry-name",
3709
+ style: isNameReadOnly ? readOnlyStyle : inputStyle,
3710
+ type: "text",
3711
+ value: name,
3712
+ onChange: (e) => setName(e.target.value),
3713
+ readOnly: isNameReadOnly,
3714
+ required: true
3715
+ }
3716
+ )
3717
+ ] }),
3718
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3719
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-email", children: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9" }),
3720
+ /* @__PURE__ */ jsxRuntime.jsx(
3721
+ "input",
3722
+ {
3723
+ id: "ffid-inquiry-email",
3724
+ style: isEmailReadOnly ? readOnlyStyle : inputStyle,
3725
+ type: "email",
3726
+ value: email,
3727
+ onChange: (e) => setEmail(e.target.value),
3728
+ readOnly: isEmailReadOnly,
3729
+ required: true
3730
+ }
3731
+ )
3732
+ ] }),
3733
+ !isAuth && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3734
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3735
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-company", children: "\u4F1A\u793E\u540D (\u4EFB\u610F)" }),
3736
+ /* @__PURE__ */ jsxRuntime.jsx(
3737
+ "input",
3738
+ {
3739
+ id: "ffid-inquiry-company",
3740
+ style: inputStyle,
3741
+ type: "text",
3742
+ value: company,
3743
+ onChange: (e) => setCompany(e.target.value)
3744
+ }
3745
+ )
3746
+ ] }),
3747
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3748
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-phone", children: "\u96FB\u8A71\u756A\u53F7 (\u4EFB\u610F)" }),
3749
+ /* @__PURE__ */ jsxRuntime.jsx(
3750
+ "input",
3751
+ {
3752
+ id: "ffid-inquiry-phone",
3753
+ style: inputStyle,
3754
+ type: "tel",
3755
+ value: phone,
3756
+ onChange: (e) => setPhone(e.target.value)
3757
+ }
3758
+ )
3759
+ ] })
3760
+ ] }),
3761
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3762
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-category", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u7A2E\u5225" }),
3763
+ /* @__PURE__ */ jsxRuntime.jsx(
3764
+ "select",
3765
+ {
3766
+ id: "ffid-inquiry-category",
3767
+ style: inputStyle,
3768
+ value: category,
3769
+ onChange: (e) => setCategory(e.target.value),
3770
+ children: renderCategoryOptions(categoryOptions)
3771
+ }
3772
+ )
3773
+ ] }),
3774
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3775
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-message", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u5185\u5BB9" }),
3776
+ /* @__PURE__ */ jsxRuntime.jsx(
3777
+ "textarea",
3778
+ {
3779
+ id: "ffid-inquiry-message",
3780
+ style: { ...inputStyle, minHeight: 180, resize: "vertical" },
3781
+ value: message,
3782
+ onChange: (e) => setMessage(e.target.value),
3783
+ required: true,
3784
+ maxLength: 1e4
3785
+ }
3786
+ )
3787
+ ] }),
3788
+ /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { style: { ...fieldsetStyle, border: "none", padding: 0 }, children: [
3789
+ /* @__PURE__ */ jsxRuntime.jsx("legend", { style: { ...labelStyle, marginBottom: SPACING_SM }, children: "\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u8CFC\u8AAD (\u4EFB\u610F)" }),
3790
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM, marginBottom: SPACING_SM }, children: [
3791
+ /* @__PURE__ */ jsxRuntime.jsx(
3792
+ "input",
3793
+ {
3794
+ type: "checkbox",
3795
+ checked: inquiryFollowup,
3796
+ onChange: (e) => setInquiryFollowup(e.target.checked)
3797
+ }
3798
+ ),
3799
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u304A\u554F\u3044\u5408\u308F\u305B\u306B\u95A2\u9023\u3059\u308B\u6848\u5185\u3092\u53D7\u3051\u53D6\u308B" })
3800
+ ] }),
3801
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM }, children: [
3802
+ /* @__PURE__ */ jsxRuntime.jsx(
3803
+ "input",
3804
+ {
3805
+ type: "checkbox",
3806
+ checked: general,
3807
+ onChange: (e) => setGeneral(e.target.checked)
3808
+ }
3809
+ ),
3810
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u5B9A\u671F\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u3092\u53D7\u3051\u53D6\u308B" })
3811
+ ] })
3812
+ ] }),
3813
+ separateLegalCheckboxes ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3814
+ /* @__PURE__ */ jsxRuntime.jsxs(
3815
+ "label",
3816
+ {
3817
+ style: {
3818
+ display: "flex",
3819
+ alignItems: "flex-start",
3820
+ gap: SPACING_SM,
3821
+ marginBottom: SPACING_SM
3822
+ },
3823
+ children: [
3824
+ /* @__PURE__ */ jsxRuntime.jsx(
3825
+ "input",
3826
+ {
3827
+ type: "checkbox",
3828
+ checked: agreedTerms,
3829
+ onChange: (e) => setAgreedTerms(e.target.checked),
3830
+ required: true
3831
+ }
3832
+ ),
3833
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3834
+ termsHref ? /* @__PURE__ */ jsxRuntime.jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3835
+ "\u5229\u7528\u898F\u7D04 (v",
3836
+ termsVersion,
3837
+ ")"
3838
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3839
+ "\u5229\u7528\u898F\u7D04 (v",
3840
+ termsVersion,
3841
+ ")"
3842
+ ] }),
3843
+ " ",
3844
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3845
+ ] })
3846
+ ]
3847
+ }
3848
+ ),
3849
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3850
+ /* @__PURE__ */ jsxRuntime.jsx(
3851
+ "input",
3852
+ {
3853
+ type: "checkbox",
3854
+ checked: agreedPrivacy,
3855
+ onChange: (e) => setAgreedPrivacy(e.target.checked),
3856
+ required: true
3857
+ }
3858
+ ),
3859
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3860
+ privacyHref ? /* @__PURE__ */ jsxRuntime.jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3861
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3862
+ privacyVersion,
3863
+ ")"
3864
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3865
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3866
+ privacyVersion,
3867
+ ")"
3868
+ ] }),
3869
+ " ",
3870
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3871
+ ] })
3872
+ ] })
3873
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { style: fieldsetStyle, children: /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3874
+ /* @__PURE__ */ jsxRuntime.jsx(
3875
+ "input",
3876
+ {
3877
+ type: "checkbox",
3878
+ checked: agreedLegal,
3879
+ onChange: (e) => setAgreedLegal(e.target.checked),
3880
+ required: true
3881
+ }
3882
+ ),
3883
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3884
+ termsHref ? /* @__PURE__ */ jsxRuntime.jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3885
+ "\u5229\u7528\u898F\u7D04 (v",
3886
+ termsVersion,
3887
+ ")"
3888
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3889
+ "\u5229\u7528\u898F\u7D04 (v",
3890
+ termsVersion,
3891
+ ")"
3892
+ ] }),
3893
+ " ",
3894
+ "\u3068",
3895
+ " ",
3896
+ privacyHref ? /* @__PURE__ */ jsxRuntime.jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3897
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3898
+ privacyVersion,
3899
+ ")"
3900
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3901
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3902
+ privacyVersion,
3903
+ ")"
3904
+ ] }),
3905
+ " ",
3906
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3907
+ ] })
3908
+ ] }) }),
3909
+ !isAuth && turnstileSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { style: fieldsetStyle, children: turnstileSlot }),
3910
+ formError && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", style: { ...errorTextStyle, marginBottom: SPACING_MD }, children: formError }),
3653
3911
  /* @__PURE__ */ jsxRuntime.jsx(
3654
- "input",
3912
+ "button",
3655
3913
  {
3656
- id: "ffid-inquiry-phone",
3657
- style: inputStyle,
3658
- type: "tel",
3659
- value: phone,
3660
- onChange: (e) => setPhone(e.target.value)
3914
+ type: "submit",
3915
+ style: {
3916
+ ...submitButtonStyle,
3917
+ opacity: submitting ? SUBMIT_BUTTON_OPACITY_PENDING : 1,
3918
+ cursor: submitting ? "not-allowed" : "pointer"
3919
+ },
3920
+ disabled: submitting,
3921
+ children: submitting ? "\u9001\u4FE1\u4E2D..." : "\u9001\u4FE1\u3059\u308B"
3661
3922
  }
3662
3923
  )
3663
- ] })
3664
- ] }),
3665
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3666
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-category", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u7A2E\u5225" }),
3667
- /* @__PURE__ */ jsxRuntime.jsx(
3668
- "select",
3669
- {
3670
- id: "ffid-inquiry-category",
3671
- style: inputStyle,
3672
- value: category,
3673
- onChange: (e) => setCategory(e.target.value),
3674
- children: categoryOptions.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value, children: opt.label }, opt.value))
3675
- }
3676
- )
3677
- ] }),
3678
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3679
- /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-message", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u5185\u5BB9" }),
3680
- /* @__PURE__ */ jsxRuntime.jsx(
3681
- "textarea",
3682
- {
3683
- id: "ffid-inquiry-message",
3684
- style: { ...inputStyle, minHeight: 180, resize: "vertical" },
3685
- value: message,
3686
- onChange: (e) => setMessage(e.target.value),
3687
- required: true,
3688
- maxLength: 1e4
3689
- }
3690
- )
3691
- ] }),
3692
- /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { style: { ...fieldsetStyle, border: "none", padding: 0 }, children: [
3693
- /* @__PURE__ */ jsxRuntime.jsx("legend", { style: { ...labelStyle, marginBottom: SPACING_SM }, children: "\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u8CFC\u8AAD (\u4EFB\u610F)" }),
3694
- /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM, marginBottom: SPACING_SM }, children: [
3695
- /* @__PURE__ */ jsxRuntime.jsx(
3696
- "input",
3697
- {
3698
- type: "checkbox",
3699
- checked: inquiryFollowup,
3700
- onChange: (e) => setInquiryFollowup(e.target.checked)
3701
- }
3702
- ),
3703
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u304A\u554F\u3044\u5408\u308F\u305B\u306B\u95A2\u9023\u3059\u308B\u6848\u5185\u3092\u53D7\u3051\u53D6\u308B" })
3704
- ] }),
3705
- /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM }, children: [
3706
- /* @__PURE__ */ jsxRuntime.jsx(
3707
- "input",
3708
- {
3709
- type: "checkbox",
3710
- checked: general,
3711
- onChange: (e) => setGeneral(e.target.checked)
3712
- }
3713
- ),
3714
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u5B9A\u671F\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u3092\u53D7\u3051\u53D6\u308B" })
3715
- ] })
3716
- ] }),
3717
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: fieldsetStyle, children: /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3718
- /* @__PURE__ */ jsxRuntime.jsx(
3719
- "input",
3720
- {
3721
- type: "checkbox",
3722
- checked: agreedLegal,
3723
- onChange: (e) => setAgreedLegal(e.target.checked),
3724
- required: true
3725
- }
3726
- ),
3727
- /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3728
- termsHref ? /* @__PURE__ */ jsxRuntime.jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3729
- "\u5229\u7528\u898F\u7D04 (v",
3730
- termsVersion,
3731
- ")"
3732
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3733
- "\u5229\u7528\u898F\u7D04 (v",
3734
- termsVersion,
3735
- ")"
3736
- ] }),
3737
- " ",
3738
- "\u3068",
3739
- " ",
3740
- privacyHref ? /* @__PURE__ */ jsxRuntime.jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3741
- "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3742
- privacyVersion,
3743
- ")"
3744
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3745
- "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3746
- privacyVersion,
3747
- ")"
3748
- ] }),
3749
- " ",
3750
- "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3751
- ] })
3752
- ] }) }),
3753
- !isAuth && turnstileSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { style: fieldsetStyle, children: turnstileSlot }),
3754
- formError && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", style: { ...errorTextStyle, marginBottom: SPACING_MD }, children: formError }),
3755
- /* @__PURE__ */ jsxRuntime.jsx(
3756
- "button",
3757
- {
3758
- type: "submit",
3759
- style: {
3760
- ...submitButtonStyle,
3761
- opacity: submitting ? 0.6 : 1,
3762
- cursor: submitting ? "not-allowed" : "pointer"
3763
- },
3764
- disabled: submitting,
3765
- children: submitting ? "\u9001\u4FE1\u4E2D..." : "\u9001\u4FE1\u3059\u308B"
3766
- }
3767
- )
3768
- ] });
3924
+ ]
3925
+ }
3926
+ );
3769
3927
  }
3770
3928
 
3771
3929
  exports.DEFAULT_API_BASE_URL = DEFAULT_API_BASE_URL;