@octaviaflow/core 3.1.0-beta.79 → 3.1.0-beta.80

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/index.js CHANGED
@@ -1186,6 +1186,7 @@ import {
1186
1186
  useId as useId4,
1187
1187
  useState as useState3
1188
1188
  } from "react";
1189
+ import { CheckmarkFilledIcon } from "@octaviaflow/icons";
1189
1190
 
1190
1191
  // src/components/SocialButton/SocialButton.tsx
1191
1192
  import { LogoGithubIcon, LogoLinkedinIcon, LogoXIcon } from "@octaviaflow/icons";
@@ -1560,19 +1561,23 @@ function AuthFormHeader({ logo, title, titleId, description, headingLevel }) {
1560
1561
  description && /* @__PURE__ */ jsx6("p", { className: "ods-auth-form__desc", children: description })
1561
1562
  ] });
1562
1563
  }
1563
- function AuthFormSocial({ providers, onSocialClick, dividerLabel, disabled }) {
1564
+ function AuthFormSocial({ providers, onSocialClick, dividerLabel, disabled, position = "bottom" }) {
1564
1565
  if (!providers || providers.length === 0) return null;
1565
- return /* @__PURE__ */ jsxs6(Fragment4, { children: [
1566
+ const row = /* @__PURE__ */ jsx6("div", { className: "ods-auth-form__social", children: providers.map((provider) => /* @__PURE__ */ jsx6(
1567
+ SocialButton,
1568
+ {
1569
+ provider,
1570
+ disabled,
1571
+ onClick: () => onSocialClick?.(provider)
1572
+ },
1573
+ provider
1574
+ )) });
1575
+ return position === "top" ? /* @__PURE__ */ jsxs6(Fragment4, { children: [
1576
+ row,
1577
+ /* @__PURE__ */ jsx6(AuthDivider, { children: dividerLabel })
1578
+ ] }) : /* @__PURE__ */ jsxs6(Fragment4, { children: [
1566
1579
  /* @__PURE__ */ jsx6(AuthDivider, { children: dividerLabel }),
1567
- /* @__PURE__ */ jsx6("div", { className: "ods-auth-form__social", children: providers.map((provider) => /* @__PURE__ */ jsx6(
1568
- SocialButton,
1569
- {
1570
- provider,
1571
- disabled,
1572
- onClick: () => onSocialClick?.(provider)
1573
- },
1574
- provider
1575
- )) })
1580
+ row
1576
1581
  ] });
1577
1582
  }
1578
1583
  function AuthFormFooterLink({ prompt, label, href, onClick }) {
@@ -1605,6 +1610,7 @@ function AuthLoginForm({
1605
1610
  forgotLabel = "Forgot your password?",
1606
1611
  socialProviders = ["google"],
1607
1612
  onSocialClick,
1613
+ socialPosition = "bottom",
1608
1614
  socialDividerLabel = "Or, log in with",
1609
1615
  registerHref,
1610
1616
  onRegisterClick,
@@ -1646,6 +1652,16 @@ function AuthLoginForm({
1646
1652
  error && /* @__PURE__ */ jsx6(Banner, { variant: "error", children: error }),
1647
1653
  success && /* @__PURE__ */ jsx6(Banner, { variant: "success", children: success })
1648
1654
  ] }),
1655
+ socialPosition === "top" && /* @__PURE__ */ jsx6(
1656
+ AuthFormSocial,
1657
+ {
1658
+ providers: socialProviders,
1659
+ onSocialClick,
1660
+ dividerLabel: socialDividerLabel,
1661
+ disabled: loading,
1662
+ position: "top"
1663
+ }
1664
+ ),
1649
1665
  /* @__PURE__ */ jsxs6("div", { className: "ods-auth-form__fields", children: [
1650
1666
  /* @__PURE__ */ jsx6(
1651
1667
  Input,
@@ -1688,7 +1704,7 @@ function AuthLoginForm({
1688
1704
  hasForgot && (forgotHref ? /* @__PURE__ */ jsx6("a", { className: "ods-auth-form__link", href: forgotHref, onClick: onForgotClick, children: forgotLabel }) : /* @__PURE__ */ jsx6("button", { type: "button", className: "ods-auth-form__link", onClick: onForgotClick, children: forgotLabel }))
1689
1705
  ] }),
1690
1706
  /* @__PURE__ */ jsx6(Button, { type: "submit", variant: "primary", fullWidth: true, loading, children: submitLabel }),
1691
- /* @__PURE__ */ jsx6(
1707
+ socialPosition === "bottom" && /* @__PURE__ */ jsx6(
1692
1708
  AuthFormSocial,
1693
1709
  {
1694
1710
  providers: socialProviders,
@@ -1742,6 +1758,10 @@ function AuthSignupForm({
1742
1758
  socialProviders = ["google"],
1743
1759
  onSocialClick,
1744
1760
  socialDividerLabel = "Or, sign up with",
1761
+ layout = "form-first",
1762
+ emailCtaLabel = "Sign up with email",
1763
+ backLabel = "Back to all options",
1764
+ highlights,
1745
1765
  signInHref,
1746
1766
  onSignInClick,
1747
1767
  signInPrompt = "Already have an account?",
@@ -1761,6 +1781,8 @@ function AuthSignupForm({
1761
1781
  const [isCompanyAccount, setIsCompanyAccount] = useState3(false);
1762
1782
  const [companyName, setCompanyName] = useState3("");
1763
1783
  const [domain, setDomain] = useState3("");
1784
+ const [entryMode, setEntryMode] = useState3("choice");
1785
+ const choiceScreen = layout === "choice-first" && entryMode === "choice";
1764
1786
  useEffect(() => {
1765
1787
  if (!showCompanyToggle || !isCompanyAccount || domain) return;
1766
1788
  const at = email.indexOf("@");
@@ -1801,138 +1823,180 @@ function AuthSignupForm({
1801
1823
  error && /* @__PURE__ */ jsx6(Banner, { variant: "error", children: error }),
1802
1824
  success && /* @__PURE__ */ jsx6(Banner, { variant: "success", children: success })
1803
1825
  ] }),
1804
- /* @__PURE__ */ jsxs6("div", { className: "ods-auth-form__fields", children: [
1805
- nameLayout === "split" ? /* @__PURE__ */ jsxs6("div", { className: "ods-auth-form__grid2", children: [
1806
- /* @__PURE__ */ jsx6(
1826
+ choiceScreen && /* @__PURE__ */ jsxs6("div", { className: "ods-auth-form__choice", children: [
1827
+ /* @__PURE__ */ jsx6("div", { className: "ods-auth-form__social", children: (socialProviders ?? []).map((provider) => /* @__PURE__ */ jsx6(
1828
+ SocialButton,
1829
+ {
1830
+ provider,
1831
+ disabled: loading,
1832
+ onClick: () => onSocialClick?.(provider)
1833
+ },
1834
+ provider
1835
+ )) }),
1836
+ /* @__PURE__ */ jsx6(AuthDivider, { children: "or" }),
1837
+ /* @__PURE__ */ jsx6(
1838
+ Button,
1839
+ {
1840
+ type: "button",
1841
+ variant: "secondary",
1842
+ fullWidth: true,
1843
+ disabled: loading,
1844
+ onClick: () => setEntryMode("email"),
1845
+ children: emailCtaLabel
1846
+ }
1847
+ ),
1848
+ highlights && highlights.length > 0 && /* @__PURE__ */ jsx6("ul", { className: "ods-auth-form__highlights", children: highlights.map((item, i) => (
1849
+ // biome-ignore lint/suspicious/noArrayIndexKey: static copy row
1850
+ /* @__PURE__ */ jsxs6("li", { children: [
1851
+ /* @__PURE__ */ jsx6(CheckmarkFilledIcon, { size: "sm", "aria-hidden": "true" }),
1852
+ item
1853
+ ] }, i)
1854
+ )) })
1855
+ ] }),
1856
+ !choiceScreen && /* @__PURE__ */ jsxs6(Fragment4, { children: [
1857
+ layout === "choice-first" && /* @__PURE__ */ jsx6(
1858
+ "button",
1859
+ {
1860
+ type: "button",
1861
+ className: "ods-auth-form__back",
1862
+ onClick: () => setEntryMode("choice"),
1863
+ disabled: loading,
1864
+ children: backLabel
1865
+ }
1866
+ ),
1867
+ /* @__PURE__ */ jsxs6("div", { className: "ods-auth-form__fields", children: [
1868
+ nameLayout === "split" ? /* @__PURE__ */ jsxs6("div", { className: "ods-auth-form__grid2", children: [
1869
+ /* @__PURE__ */ jsx6(
1870
+ Input,
1871
+ {
1872
+ label: firstNameLabel,
1873
+ type: "text",
1874
+ name: "firstName",
1875
+ autoComplete: "given-name",
1876
+ required: true,
1877
+ placeholder: firstNamePlaceholder,
1878
+ value: firstName,
1879
+ onChange: (e) => setFirstName(e.target.value),
1880
+ disabled: loading
1881
+ }
1882
+ ),
1883
+ /* @__PURE__ */ jsx6(
1884
+ Input,
1885
+ {
1886
+ label: lastNameLabel,
1887
+ type: "text",
1888
+ name: "lastName",
1889
+ autoComplete: "family-name",
1890
+ required: true,
1891
+ placeholder: lastNamePlaceholder,
1892
+ value: lastName,
1893
+ onChange: (e) => setLastName(e.target.value),
1894
+ disabled: loading
1895
+ }
1896
+ )
1897
+ ] }) : /* @__PURE__ */ jsx6(
1807
1898
  Input,
1808
1899
  {
1809
- label: firstNameLabel,
1900
+ label: nameLabel,
1810
1901
  type: "text",
1811
- name: "firstName",
1812
- autoComplete: "given-name",
1902
+ name: "name",
1903
+ autoComplete: "name",
1813
1904
  required: true,
1814
- placeholder: firstNamePlaceholder,
1815
- value: firstName,
1816
- onChange: (e) => setFirstName(e.target.value),
1905
+ placeholder: namePlaceholder,
1906
+ value: name,
1907
+ onChange: (e) => setName(e.target.value),
1817
1908
  disabled: loading
1818
1909
  }
1819
1910
  ),
1820
1911
  /* @__PURE__ */ jsx6(
1821
1912
  Input,
1822
1913
  {
1823
- label: lastNameLabel,
1824
- type: "text",
1825
- name: "lastName",
1826
- autoComplete: "family-name",
1914
+ label: emailLabel,
1915
+ type: "email",
1916
+ name: "email",
1917
+ autoComplete: "email",
1918
+ required: true,
1919
+ placeholder: emailPlaceholder,
1920
+ value: email,
1921
+ onChange: (e) => setEmail(e.target.value),
1922
+ disabled: loading
1923
+ }
1924
+ ),
1925
+ /* @__PURE__ */ jsx6(
1926
+ PasswordInput,
1927
+ {
1928
+ label: passwordLabel,
1929
+ name: "password",
1930
+ autoComplete: "new-password",
1827
1931
  required: true,
1828
- placeholder: lastNamePlaceholder,
1829
- value: lastName,
1830
- onChange: (e) => setLastName(e.target.value),
1932
+ placeholder: passwordPlaceholder,
1933
+ value: password,
1934
+ onChange: setPassword,
1935
+ strengthRules: passwordStrengthRules,
1831
1936
  disabled: loading
1832
1937
  }
1833
1938
  )
1834
- ] }) : /* @__PURE__ */ jsx6(
1835
- Input,
1836
- {
1837
- label: nameLabel,
1838
- type: "text",
1839
- name: "name",
1840
- autoComplete: "name",
1841
- required: true,
1842
- placeholder: namePlaceholder,
1843
- value: name,
1844
- onChange: (e) => setName(e.target.value),
1845
- disabled: loading
1846
- }
1847
- ),
1848
- /* @__PURE__ */ jsx6(
1849
- Input,
1939
+ ] }),
1940
+ showCompanyToggle && /* @__PURE__ */ jsxs6(Fragment4, { children: [
1941
+ /* @__PURE__ */ jsx6(
1942
+ Checkbox,
1943
+ {
1944
+ label: companyToggleLabel,
1945
+ checked: isCompanyAccount,
1946
+ onChange: setIsCompanyAccount,
1947
+ disabled: loading
1948
+ }
1949
+ ),
1950
+ isCompanyAccount && /* @__PURE__ */ jsxs6("div", { className: "ods-auth-form__grid2", children: [
1951
+ /* @__PURE__ */ jsx6(
1952
+ Input,
1953
+ {
1954
+ label: companyNameLabel,
1955
+ type: "text",
1956
+ name: "companyName",
1957
+ autoComplete: "organization",
1958
+ required: true,
1959
+ placeholder: companyNamePlaceholder,
1960
+ value: companyName,
1961
+ onChange: (e) => setCompanyName(e.target.value),
1962
+ disabled: loading
1963
+ }
1964
+ ),
1965
+ /* @__PURE__ */ jsx6(
1966
+ Input,
1967
+ {
1968
+ label: domainLabel,
1969
+ type: "text",
1970
+ name: "domain",
1971
+ placeholder: domainPlaceholder,
1972
+ value: domain,
1973
+ onChange: (e) => setDomain(e.target.value),
1974
+ disabled: loading
1975
+ }
1976
+ )
1977
+ ] })
1978
+ ] }),
1979
+ showTerms && /* @__PURE__ */ jsx6(
1980
+ Checkbox,
1850
1981
  {
1851
- label: emailLabel,
1852
- type: "email",
1853
- name: "email",
1854
- autoComplete: "email",
1982
+ label: termsLabel,
1983
+ checked: acceptTerms,
1984
+ onChange: setAcceptTerms,
1855
1985
  required: true,
1856
- placeholder: emailPlaceholder,
1857
- value: email,
1858
- onChange: (e) => setEmail(e.target.value),
1859
1986
  disabled: loading
1860
1987
  }
1861
1988
  ),
1862
- /* @__PURE__ */ jsx6(
1863
- PasswordInput,
1989
+ /* @__PURE__ */ jsx6(Button, { type: "submit", variant: "primary", fullWidth: true, loading, children: submitLabel }),
1990
+ layout === "form-first" && /* @__PURE__ */ jsx6(
1991
+ AuthFormSocial,
1864
1992
  {
1865
- label: passwordLabel,
1866
- name: "password",
1867
- autoComplete: "new-password",
1868
- required: true,
1869
- placeholder: passwordPlaceholder,
1870
- value: password,
1871
- onChange: setPassword,
1872
- strengthRules: passwordStrengthRules,
1993
+ providers: socialProviders,
1994
+ onSocialClick,
1995
+ dividerLabel: socialDividerLabel,
1873
1996
  disabled: loading
1874
1997
  }
1875
1998
  )
1876
1999
  ] }),
1877
- showCompanyToggle && /* @__PURE__ */ jsxs6(Fragment4, { children: [
1878
- /* @__PURE__ */ jsx6(
1879
- Checkbox,
1880
- {
1881
- label: companyToggleLabel,
1882
- checked: isCompanyAccount,
1883
- onChange: setIsCompanyAccount,
1884
- disabled: loading
1885
- }
1886
- ),
1887
- isCompanyAccount && /* @__PURE__ */ jsxs6("div", { className: "ods-auth-form__grid2", children: [
1888
- /* @__PURE__ */ jsx6(
1889
- Input,
1890
- {
1891
- label: companyNameLabel,
1892
- type: "text",
1893
- name: "companyName",
1894
- autoComplete: "organization",
1895
- required: true,
1896
- placeholder: companyNamePlaceholder,
1897
- value: companyName,
1898
- onChange: (e) => setCompanyName(e.target.value),
1899
- disabled: loading
1900
- }
1901
- ),
1902
- /* @__PURE__ */ jsx6(
1903
- Input,
1904
- {
1905
- label: domainLabel,
1906
- type: "text",
1907
- name: "domain",
1908
- placeholder: domainPlaceholder,
1909
- value: domain,
1910
- onChange: (e) => setDomain(e.target.value),
1911
- disabled: loading
1912
- }
1913
- )
1914
- ] })
1915
- ] }),
1916
- showTerms && /* @__PURE__ */ jsx6(
1917
- Checkbox,
1918
- {
1919
- label: termsLabel,
1920
- checked: acceptTerms,
1921
- onChange: setAcceptTerms,
1922
- required: true,
1923
- disabled: loading
1924
- }
1925
- ),
1926
- /* @__PURE__ */ jsx6(Button, { type: "submit", variant: "primary", fullWidth: true, loading, children: submitLabel }),
1927
- /* @__PURE__ */ jsx6(
1928
- AuthFormSocial,
1929
- {
1930
- providers: socialProviders,
1931
- onSocialClick,
1932
- dividerLabel: socialDividerLabel,
1933
- disabled: loading
1934
- }
1935
- ),
1936
2000
  footer ?? /* @__PURE__ */ jsx6(
1937
2001
  AuthFormFooterLink,
1938
2002
  {
@@ -15670,7 +15734,7 @@ function FlowCanvas2({
15670
15734
  // src/components/FlowDoctor/FlowDoctor.tsx
15671
15735
  import {
15672
15736
  ArrowRightIcon as ArrowRightIcon3,
15673
- CheckmarkFilledIcon,
15737
+ CheckmarkFilledIcon as CheckmarkFilledIcon2,
15674
15738
  CheckmarkIcon as CheckmarkIcon8,
15675
15739
  ErrorFilledIcon,
15676
15740
  StethoscopeIcon,
@@ -15692,7 +15756,7 @@ function flowDoctorSummary(issues) {
15692
15756
  ].filter(Boolean).join(", ");
15693
15757
  }
15694
15758
  var VERDICT_ICON = {
15695
- clean: /* @__PURE__ */ jsx66(CheckmarkFilledIcon, { size: "md", "aria-hidden": "true" }),
15759
+ clean: /* @__PURE__ */ jsx66(CheckmarkFilledIcon2, { size: "md", "aria-hidden": "true" }),
15696
15760
  warning: /* @__PURE__ */ jsx66(WarningFilledIcon, { size: "md", "aria-hidden": "true" }),
15697
15761
  error: /* @__PURE__ */ jsx66(ErrorFilledIcon, { size: "md", "aria-hidden": "true" })
15698
15762
  };