@feelflow/ffid-sdk 2.8.0 → 2.10.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.10.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,17 @@ function FFIDInquiryForm({
3488
3512
  turnstileToken = null,
3489
3513
  turnstileSlot,
3490
3514
  onSubmit,
3515
+ onChange,
3516
+ separateLegalCheckboxes = false,
3517
+ messagePlaceholder,
3491
3518
  locale = "ja",
3492
3519
  className
3493
3520
  }) {
3494
3521
  const isAuth = mode === "authenticated";
3522
+ const isNameReadOnly = isAuth && !!prefill?.name;
3523
+ const isEmailReadOnly = isAuth;
3495
3524
  const categoryOptions = react.useMemo(
3496
- () => categories ?? defaultCategories(),
3525
+ () => categories && categories.length > 0 ? categories : defaultCategories(),
3497
3526
  [categories]
3498
3527
  );
3499
3528
  const initialOrgId = react.useMemo(() => {
@@ -3502,23 +3531,88 @@ function FFIDInquiryForm({
3502
3531
  if (organizations.length === 1) return organizations[0].id;
3503
3532
  return null;
3504
3533
  }, [isAuth, organizations, preselectedOrganizationId]);
3534
+ const initialCategory = react.useMemo(() => {
3535
+ const fallback = categoryOptions[0]?.value ?? "general";
3536
+ const requested = prefill?.category;
3537
+ if (!requested) return fallback;
3538
+ return categoryOptions.some((opt) => opt.value === requested) ? requested : fallback;
3539
+ }, [categoryOptions, prefill?.category]);
3505
3540
  const [name, setName] = react.useState(prefill?.name ?? "");
3506
3541
  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("");
3542
+ const [company, setCompany] = react.useState(isAuth ? "" : prefill?.company ?? "");
3543
+ const [phone, setPhone] = react.useState(isAuth ? "" : prefill?.phone ?? "");
3544
+ const [category, setCategory] = react.useState(initialCategory);
3545
+ const [message, setMessage] = react.useState(prefill?.message ?? "");
3511
3546
  const [organizationId, setOrganizationId] = react.useState(initialOrgId);
3512
3547
  const [inquiryFollowup, setInquiryFollowup] = react.useState(false);
3513
3548
  const [general, setGeneral] = react.useState(false);
3514
3549
  const [agreedLegal, setAgreedLegal] = react.useState(false);
3550
+ const [agreedTerms, setAgreedTerms] = react.useState(false);
3551
+ const [agreedPrivacy, setAgreedPrivacy] = react.useState(false);
3515
3552
  const [submitting, setSubmitting] = react.useState(false);
3516
3553
  const [formError, setFormError] = react.useState(null);
3517
3554
  const [successMessage, setSuccessMessage] = react.useState(null);
3555
+ const resolvedMessagePlaceholder = react.useMemo(() => {
3556
+ if (messagePlaceholder === void 0) return void 0;
3557
+ if (typeof messagePlaceholder === "string") return messagePlaceholder;
3558
+ return messagePlaceholder({ category });
3559
+ }, [messagePlaceholder, category]);
3560
+ const [hydrated, setHydrated] = react.useState(false);
3561
+ react.useEffect(() => {
3562
+ setHydrated(true);
3563
+ }, []);
3564
+ const onChangeRef = react.useRef(onChange);
3565
+ react.useEffect(() => {
3566
+ onChangeRef.current = onChange;
3567
+ }, [onChange]);
3568
+ react.useEffect(() => {
3569
+ onChangeRef.current?.({
3570
+ name: name.trim(),
3571
+ email: email.trim(),
3572
+ company: company.trim() || null,
3573
+ phone: phone.trim() || null,
3574
+ category,
3575
+ message: message.trim(),
3576
+ organizationId,
3577
+ inquiryFollowupOptIn: inquiryFollowup,
3578
+ generalNewsletterOptIn: general,
3579
+ termsVersion,
3580
+ privacyVersion,
3581
+ turnstileToken: turnstileToken ?? null,
3582
+ locale
3583
+ });
3584
+ }, [
3585
+ name,
3586
+ email,
3587
+ company,
3588
+ phone,
3589
+ category,
3590
+ message,
3591
+ organizationId,
3592
+ inquiryFollowup,
3593
+ general,
3594
+ termsVersion,
3595
+ privacyVersion,
3596
+ turnstileToken,
3597
+ locale
3598
+ ]);
3518
3599
  async function handleSubmit(e) {
3519
3600
  e.preventDefault();
3520
3601
  setFormError(null);
3521
- if (!agreedLegal) {
3602
+ if (separateLegalCheckboxes) {
3603
+ if (!agreedTerms && !agreedPrivacy) {
3604
+ 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");
3605
+ return;
3606
+ }
3607
+ if (!agreedTerms) {
3608
+ setFormError("\u5229\u7528\u898F\u7D04\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3609
+ return;
3610
+ }
3611
+ if (!agreedPrivacy) {
3612
+ setFormError("\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3613
+ return;
3614
+ }
3615
+ } else if (!agreedLegal) {
3522
3616
  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
3617
  return;
3524
3618
  }
@@ -3555,12 +3649,13 @@ function FFIDInquiryForm({
3555
3649
  );
3556
3650
  setMessage("");
3557
3651
  } else {
3558
- setFormError(result.message);
3652
+ setFormError(
3653
+ 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"
3654
+ );
3559
3655
  }
3560
3656
  } 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
- );
3657
+ console.error("[FFIDInquiryForm] onSubmit threw", err);
3658
+ 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
3659
  } finally {
3565
3660
  setSubmitting(false);
3566
3661
  }
@@ -3584,188 +3679,258 @@ function FFIDInquiryForm({
3584
3679
  );
3585
3680
  }
3586
3681
  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)" }),
3682
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3683
+ "form",
3684
+ {
3685
+ onSubmit: handleSubmit,
3686
+ className,
3687
+ noValidate: true,
3688
+ "data-hydrated": hydrated ? "true" : void 0,
3689
+ children: [
3690
+ showOrgBlock && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3691
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-org", children: "\u554F\u3044\u5408\u308F\u305B\u308B\u7ACB\u5834" }),
3692
+ /* @__PURE__ */ jsxRuntime.jsxs(
3693
+ "select",
3694
+ {
3695
+ id: "ffid-inquiry-org",
3696
+ style: inputStyle,
3697
+ value: organizationId ?? "",
3698
+ onChange: (e) => setOrganizationId(e.target.value || null),
3699
+ children: [
3700
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: "\u500B\u4EBA\u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B" }),
3701
+ organizations.map((org) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: org.id, children: [
3702
+ org.name,
3703
+ " \u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B"
3704
+ ] }, org.id))
3705
+ ]
3706
+ }
3707
+ )
3708
+ ] }),
3709
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3710
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-name", children: "\u304A\u540D\u524D" }),
3711
+ /* @__PURE__ */ jsxRuntime.jsx(
3712
+ "input",
3713
+ {
3714
+ id: "ffid-inquiry-name",
3715
+ style: isNameReadOnly ? readOnlyStyle : inputStyle,
3716
+ type: "text",
3717
+ value: name,
3718
+ onChange: (e) => setName(e.target.value),
3719
+ readOnly: isNameReadOnly,
3720
+ required: true
3721
+ }
3722
+ )
3723
+ ] }),
3724
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3725
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-email", children: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9" }),
3726
+ /* @__PURE__ */ jsxRuntime.jsx(
3727
+ "input",
3728
+ {
3729
+ id: "ffid-inquiry-email",
3730
+ style: isEmailReadOnly ? readOnlyStyle : inputStyle,
3731
+ type: "email",
3732
+ value: email,
3733
+ onChange: (e) => setEmail(e.target.value),
3734
+ readOnly: isEmailReadOnly,
3735
+ required: true
3736
+ }
3737
+ )
3738
+ ] }),
3739
+ !isAuth && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3740
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3741
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-company", children: "\u4F1A\u793E\u540D (\u4EFB\u610F)" }),
3742
+ /* @__PURE__ */ jsxRuntime.jsx(
3743
+ "input",
3744
+ {
3745
+ id: "ffid-inquiry-company",
3746
+ style: inputStyle,
3747
+ type: "text",
3748
+ value: company,
3749
+ onChange: (e) => setCompany(e.target.value)
3750
+ }
3751
+ )
3752
+ ] }),
3753
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3754
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-phone", children: "\u96FB\u8A71\u756A\u53F7 (\u4EFB\u610F)" }),
3755
+ /* @__PURE__ */ jsxRuntime.jsx(
3756
+ "input",
3757
+ {
3758
+ id: "ffid-inquiry-phone",
3759
+ style: inputStyle,
3760
+ type: "tel",
3761
+ value: phone,
3762
+ onChange: (e) => setPhone(e.target.value)
3763
+ }
3764
+ )
3765
+ ] })
3766
+ ] }),
3767
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3768
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-category", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u7A2E\u5225" }),
3769
+ /* @__PURE__ */ jsxRuntime.jsx(
3770
+ "select",
3771
+ {
3772
+ id: "ffid-inquiry-category",
3773
+ style: inputStyle,
3774
+ value: category,
3775
+ onChange: (e) => setCategory(e.target.value),
3776
+ children: renderCategoryOptions(categoryOptions)
3777
+ }
3778
+ )
3779
+ ] }),
3780
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3781
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-message", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u5185\u5BB9" }),
3782
+ /* @__PURE__ */ jsxRuntime.jsx(
3783
+ "textarea",
3784
+ {
3785
+ id: "ffid-inquiry-message",
3786
+ style: { ...inputStyle, minHeight: 180, resize: "vertical" },
3787
+ value: message,
3788
+ onChange: (e) => setMessage(e.target.value),
3789
+ placeholder: resolvedMessagePlaceholder,
3790
+ required: true,
3791
+ maxLength: 1e4
3792
+ }
3793
+ )
3794
+ ] }),
3795
+ /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { style: { ...fieldsetStyle, border: "none", padding: 0 }, children: [
3796
+ /* @__PURE__ */ jsxRuntime.jsx("legend", { style: { ...labelStyle, marginBottom: SPACING_SM }, children: "\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u8CFC\u8AAD (\u4EFB\u610F)" }),
3797
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM, marginBottom: SPACING_SM }, children: [
3798
+ /* @__PURE__ */ jsxRuntime.jsx(
3799
+ "input",
3800
+ {
3801
+ type: "checkbox",
3802
+ checked: inquiryFollowup,
3803
+ onChange: (e) => setInquiryFollowup(e.target.checked)
3804
+ }
3805
+ ),
3806
+ /* @__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" })
3807
+ ] }),
3808
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM }, children: [
3809
+ /* @__PURE__ */ jsxRuntime.jsx(
3810
+ "input",
3811
+ {
3812
+ type: "checkbox",
3813
+ checked: general,
3814
+ onChange: (e) => setGeneral(e.target.checked)
3815
+ }
3816
+ ),
3817
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u5B9A\u671F\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u3092\u53D7\u3051\u53D6\u308B" })
3818
+ ] })
3819
+ ] }),
3820
+ separateLegalCheckboxes ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3821
+ /* @__PURE__ */ jsxRuntime.jsxs(
3822
+ "label",
3823
+ {
3824
+ style: {
3825
+ display: "flex",
3826
+ alignItems: "flex-start",
3827
+ gap: SPACING_SM,
3828
+ marginBottom: SPACING_SM
3829
+ },
3830
+ children: [
3831
+ /* @__PURE__ */ jsxRuntime.jsx(
3832
+ "input",
3833
+ {
3834
+ type: "checkbox",
3835
+ checked: agreedTerms,
3836
+ onChange: (e) => setAgreedTerms(e.target.checked),
3837
+ required: true
3838
+ }
3839
+ ),
3840
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3841
+ termsHref ? /* @__PURE__ */ jsxRuntime.jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3842
+ "\u5229\u7528\u898F\u7D04 (v",
3843
+ termsVersion,
3844
+ ")"
3845
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3846
+ "\u5229\u7528\u898F\u7D04 (v",
3847
+ termsVersion,
3848
+ ")"
3849
+ ] }),
3850
+ " ",
3851
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3852
+ ] })
3853
+ ]
3854
+ }
3855
+ ),
3856
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3857
+ /* @__PURE__ */ jsxRuntime.jsx(
3858
+ "input",
3859
+ {
3860
+ type: "checkbox",
3861
+ checked: agreedPrivacy,
3862
+ onChange: (e) => setAgreedPrivacy(e.target.checked),
3863
+ required: true
3864
+ }
3865
+ ),
3866
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3867
+ privacyHref ? /* @__PURE__ */ jsxRuntime.jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3868
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3869
+ privacyVersion,
3870
+ ")"
3871
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3872
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3873
+ privacyVersion,
3874
+ ")"
3875
+ ] }),
3876
+ " ",
3877
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3878
+ ] })
3879
+ ] })
3880
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { style: fieldsetStyle, children: /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3881
+ /* @__PURE__ */ jsxRuntime.jsx(
3882
+ "input",
3883
+ {
3884
+ type: "checkbox",
3885
+ checked: agreedLegal,
3886
+ onChange: (e) => setAgreedLegal(e.target.checked),
3887
+ required: true
3888
+ }
3889
+ ),
3890
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3891
+ termsHref ? /* @__PURE__ */ jsxRuntime.jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3892
+ "\u5229\u7528\u898F\u7D04 (v",
3893
+ termsVersion,
3894
+ ")"
3895
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3896
+ "\u5229\u7528\u898F\u7D04 (v",
3897
+ termsVersion,
3898
+ ")"
3899
+ ] }),
3900
+ " ",
3901
+ "\u3068",
3902
+ " ",
3903
+ privacyHref ? /* @__PURE__ */ jsxRuntime.jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3904
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3905
+ privacyVersion,
3906
+ ")"
3907
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3908
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3909
+ privacyVersion,
3910
+ ")"
3911
+ ] }),
3912
+ " ",
3913
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3914
+ ] })
3915
+ ] }) }),
3916
+ !isAuth && turnstileSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { style: fieldsetStyle, children: turnstileSlot }),
3917
+ formError && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", style: { ...errorTextStyle, marginBottom: SPACING_MD }, children: formError }),
3653
3918
  /* @__PURE__ */ jsxRuntime.jsx(
3654
- "input",
3919
+ "button",
3655
3920
  {
3656
- id: "ffid-inquiry-phone",
3657
- style: inputStyle,
3658
- type: "tel",
3659
- value: phone,
3660
- onChange: (e) => setPhone(e.target.value)
3921
+ type: "submit",
3922
+ style: {
3923
+ ...submitButtonStyle,
3924
+ opacity: submitting ? SUBMIT_BUTTON_OPACITY_PENDING : 1,
3925
+ cursor: submitting ? "not-allowed" : "pointer"
3926
+ },
3927
+ disabled: submitting,
3928
+ children: submitting ? "\u9001\u4FE1\u4E2D..." : "\u9001\u4FE1\u3059\u308B"
3661
3929
  }
3662
3930
  )
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
- ] });
3931
+ ]
3932
+ }
3933
+ );
3769
3934
  }
3770
3935
 
3771
3936
  exports.DEFAULT_API_BASE_URL = DEFAULT_API_BASE_URL;