@ory/elements-react 1.0.0-next.18 → 1.0.0-next.19

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.
@@ -559,12 +559,13 @@ import * as React7 from "react";
559
559
  import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
560
560
  var SvgFacebook = (props) => {
561
561
  var _a, _b;
562
- return /* @__PURE__ */ jsxs9("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
563
- /* @__PURE__ */ jsxs9("g", { clipPath: "url(#facebook_svg__a)", children: [
564
- /* @__PURE__ */ jsx14("path", { fill: "#1877F2", d: "M24 12c0-6.627-5.373-12-12-12C5.372 0 0 5.374 0 12c0 5.99 4.388 10.954 10.125 11.854V15.47H7.078V12h3.047V9.357c0-3.008 1.791-4.669 4.532-4.669 1.313 0 2.686.234 2.686.234v2.953H15.83c-1.49 0-1.955.925-1.955 1.874V12h3.328l-.532 3.469h-2.796v8.385c5.736-.9 10.124-5.864 10.124-11.854" }),
565
- /* @__PURE__ */ jsx14("path", { fill: "#fff", d: "M16.67 15.469 17.204 12h-3.328V9.75c0-.95.465-1.875 1.955-1.875h1.513V4.922s-1.373-.234-2.686-.234c-2.74 0-4.532 1.661-4.532 4.669V12H7.078v3.469h3.047v8.385a12.1 12.1 0 0 0 3.75 0V15.47z" })
566
- ] }),
567
- /* @__PURE__ */ jsx14("defs", { children: /* @__PURE__ */ jsx14("clipPath", { id: "facebook_svg__a", children: /* @__PURE__ */ jsx14("rect", { fill: "#fff" }) }) })
562
+ return /* @__PURE__ */ jsxs9("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
563
+ /* @__PURE__ */ jsx14("circle", { cx: 16, cy: 16, r: 14, fill: "url(#facebook_svg__a)" }),
564
+ /* @__PURE__ */ jsx14("path", { fill: "#fff", d: "m21.214 20.282.622-3.952h-3.89v-2.563c0-1.081.542-2.136 2.284-2.136H22V8.267S20.395 8 18.86 8c-3.205 0-5.298 1.893-5.298 5.318v3.012H10v3.952h3.562v9.552q1.073.165 2.191.166 1.12 0 2.192-.166v-9.552z" }),
565
+ /* @__PURE__ */ jsx14("defs", { children: /* @__PURE__ */ jsxs9("linearGradient", { id: "facebook_svg__a", x1: 16, x2: 16, y1: 2, y2: 29.917, gradientUnits: "userSpaceOnUse", children: [
566
+ /* @__PURE__ */ jsx14("stop", { stopColor: "#18ACFE" }),
567
+ /* @__PURE__ */ jsx14("stop", { offset: 1, stopColor: "#0163E0" })
568
+ ] }) })
568
569
  ] });
569
570
  };
570
571
  var facebook_default = SvgFacebook;
@@ -1795,20 +1796,19 @@ function DefaultSettingsOidc({
1795
1796
  }) {
1796
1797
  const hasLinkButtons = linkButtons.length > 0;
1797
1798
  const hasUnlinkButtons = unlinkButtons.length > 0;
1798
- const { setValue } = useFormContext7();
1799
+ const {
1800
+ formState: { isSubmitting }
1801
+ } = useFormContext7();
1799
1802
  return /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-8", children: [
1800
- hasLinkButtons && /* @__PURE__ */ jsx53("div", { className: "flex items-start gap-3 [&>button]:w-[79px]", children: linkButtons.map((button) => {
1803
+ hasLinkButtons && /* @__PURE__ */ jsx53("div", { className: "grid items-start gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3", children: linkButtons.map((button) => {
1801
1804
  const attrs = button.attributes;
1802
1805
  return /* @__PURE__ */ jsx53(
1803
1806
  DefaultButtonSocial,
1804
1807
  {
1805
- showLabel: false,
1808
+ showLabel: true,
1806
1809
  node: button,
1807
1810
  attributes: attrs,
1808
- onClick: () => {
1809
- setValue("link", attrs.value);
1810
- setValue("method", "oidc");
1811
- }
1811
+ onClick: button.onClick
1812
1812
  },
1813
1813
  attrs.value
1814
1814
  );
@@ -1829,11 +1829,11 @@ function DefaultSettingsOidc({
1829
1829
  {
1830
1830
  ...attrs,
1831
1831
  type: "submit",
1832
- onClick: () => {
1833
- setValue("unlink", attrs.value);
1834
- setValue("method", "oidc");
1835
- },
1836
- children: /* @__PURE__ */ jsx53(
1832
+ onClick: button.onClick,
1833
+ disabled: isSubmitting,
1834
+ className: "relative",
1835
+ title: `Unlink ${provider}`,
1836
+ children: isSubmitting ? /* @__PURE__ */ jsx53(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx53(
1837
1837
  trash_default,
1838
1838
  {
1839
1839
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -1849,11 +1849,15 @@ function DefaultSettingsOidc({
1849
1849
 
1850
1850
  // src/theme/default/components/settings/settings-passkey.tsx
1851
1851
  import { useComponents as useComponents4 } from "@ory/elements-react";
1852
+ import { useFormContext as useFormContext8 } from "react-hook-form";
1852
1853
  import { jsx as jsx54, jsxs as jsxs31 } from "react/jsx-runtime";
1853
1854
  function DefaultSettingsPasskey({
1854
1855
  triggerButton,
1855
1856
  removeButtons
1856
1857
  }) {
1858
+ const {
1859
+ formState: { isSubmitting }
1860
+ } = useFormContext8();
1857
1861
  const { Node } = useComponents4();
1858
1862
  const hasRemoveButtons = removeButtons.length > 0;
1859
1863
  return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-8", children: [
@@ -1876,28 +1880,35 @@ function DefaultSettingsPasskey({
1876
1880
  return /* @__PURE__ */ jsxs31(
1877
1881
  "div",
1878
1882
  {
1879
- className: "flex justify-between gap-6",
1883
+ className: "flex justify-between gap-6 md:items-center",
1880
1884
  children: [
1881
- /* @__PURE__ */ jsx54(
1882
- passkey_default,
1883
- {
1884
- size: 32,
1885
- className: "text-interface-foreground-default-primary"
1886
- }
1887
- ),
1888
- /* @__PURE__ */ jsxs31("div", { className: "flex-1 flex-col", children: [
1889
- /* @__PURE__ */ jsx54("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: displayName }),
1890
- /* @__PURE__ */ jsx54("span", { className: "text-sm text-interface-foreground-default-tertiary", children: keyId })
1885
+ /* @__PURE__ */ jsxs31("div", { className: "flex gap-2 items-center flex-1", children: [
1886
+ /* @__PURE__ */ jsx54(
1887
+ passkey_default,
1888
+ {
1889
+ size: 32,
1890
+ className: "text-interface-foreground-default-primary"
1891
+ }
1892
+ ),
1893
+ /* @__PURE__ */ jsxs31("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4", children: [
1894
+ /* @__PURE__ */ jsxs31("div", { className: "flex-1 flex-col", children: [
1895
+ /* @__PURE__ */ jsx54("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: displayName }),
1896
+ /* @__PURE__ */ jsx54("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block", children: keyId })
1897
+ ] }),
1898
+ addedAt && /* @__PURE__ */ jsx54("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
1899
+ dateStyle: "long"
1900
+ }).format(new Date(addedAt)) })
1901
+ ] })
1891
1902
  ] }),
1892
- addedAt && /* @__PURE__ */ jsx54("p", { className: "self-center text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
1893
- dateStyle: "long"
1894
- }).format(new Date(addedAt)) }),
1895
1903
  /* @__PURE__ */ jsx54(
1896
1904
  "button",
1897
1905
  {
1898
1906
  ...node.attributes,
1899
1907
  type: "submit",
1900
- children: /* @__PURE__ */ jsx54(
1908
+ onClick: node.onClick,
1909
+ disabled: isSubmitting,
1910
+ className: "relative",
1911
+ children: isSubmitting ? /* @__PURE__ */ jsx54(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx54(
1901
1912
  trash_default,
1902
1913
  {
1903
1914
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -1908,7 +1919,7 @@ function DefaultSettingsPasskey({
1908
1919
  )
1909
1920
  ]
1910
1921
  },
1911
- `webauthn-remove-button-${i}`
1922
+ `passkey-remove-button-${i}`
1912
1923
  );
1913
1924
  }) })
1914
1925
  ] }) : null
@@ -1946,12 +1957,18 @@ var SvgRefresh = (props) => {
1946
1957
  var refresh_default = SvgRefresh;
1947
1958
 
1948
1959
  // src/theme/default/components/settings/settings-recovery-codes.tsx
1949
- import { jsx as jsx58, jsxs as jsxs33 } from "react/jsx-runtime";
1960
+ import { useFormContext as useFormContext9 } from "react-hook-form";
1961
+ import { Fragment as Fragment4, jsx as jsx58, jsxs as jsxs33 } from "react/jsx-runtime";
1950
1962
  function DefaultSettingsRecoveryCodes({
1951
1963
  codes,
1952
1964
  regnerateButton,
1953
- revealButton
1965
+ revealButton,
1966
+ onRegenerate,
1967
+ onReveal
1954
1968
  }) {
1969
+ const {
1970
+ formState: { isSubmitting }
1971
+ } = useFormContext9();
1955
1972
  const onDownload = () => {
1956
1973
  const element = document.createElement("a");
1957
1974
  const file = new Blob([codes.join("\n")], {
@@ -1964,49 +1981,76 @@ function DefaultSettingsRecoveryCodes({
1964
1981
  };
1965
1982
  const hasCodes = codes.length >= 1;
1966
1983
  return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-8", children: [
1967
- /* @__PURE__ */ jsx58(DefaultHorizontalDivider, {}),
1968
- /* @__PURE__ */ jsxs33("div", { className: "flex justify-end gap-4", children: [
1969
- regnerateButton && /* @__PURE__ */ jsx58(
1970
- "button",
1971
- {
1972
- ...regnerateButton.attributes,
1973
- type: "submit",
1974
- children: /* @__PURE__ */ jsx58(
1975
- refresh_default,
1976
- {
1977
- size: 24,
1978
- className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover"
1979
- }
1980
- )
1981
- }
1982
- ),
1983
- revealButton && /* @__PURE__ */ jsx58(
1984
- "button",
1985
- {
1986
- ...revealButton.attributes,
1987
- type: "submit",
1988
- children: /* @__PURE__ */ jsx58(
1989
- eye_default,
1990
- {
1991
- size: 24,
1992
- className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover"
1993
- }
1994
- )
1995
- }
1996
- ),
1997
- hasCodes && /* @__PURE__ */ jsx58("button", { onClick: onDownload, type: "button", children: /* @__PURE__ */ jsx58(
1998
- download_default,
1999
- {
2000
- size: 24,
2001
- className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover"
2002
- }
2003
- ) })
1984
+ codes.length > 0 && /* @__PURE__ */ jsx58(DefaultHorizontalDivider, {}),
1985
+ /* @__PURE__ */ jsxs33("div", { className: "flex gap-4 justify-between", children: [
1986
+ /* @__PURE__ */ jsx58("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
1987
+ /* @__PURE__ */ jsxs33("div", { className: "flex gap-2", children: [
1988
+ regnerateButton && codes.length > 0 && /* @__PURE__ */ jsx58(
1989
+ "button",
1990
+ {
1991
+ ...regnerateButton.attributes,
1992
+ type: "submit",
1993
+ className: "ml-auto",
1994
+ onClick: onRegenerate,
1995
+ disabled: isSubmitting,
1996
+ "data-loading": isSubmitting,
1997
+ children: /* @__PURE__ */ jsx58(
1998
+ refresh_default,
1999
+ {
2000
+ size: 24,
2001
+ className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover"
2002
+ }
2003
+ )
2004
+ }
2005
+ ),
2006
+ revealButton && /* @__PURE__ */ jsx58(Fragment4, { children: /* @__PURE__ */ jsx58(
2007
+ "button",
2008
+ {
2009
+ ...revealButton.attributes,
2010
+ type: "submit",
2011
+ className: "ml-auto",
2012
+ onClick: onReveal,
2013
+ title: "Reveal recovery codes",
2014
+ children: /* @__PURE__ */ jsx58(
2015
+ eye_default,
2016
+ {
2017
+ size: 24,
2018
+ className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover"
2019
+ }
2020
+ )
2021
+ }
2022
+ ) }),
2023
+ hasCodes && /* @__PURE__ */ jsx58(
2024
+ "button",
2025
+ {
2026
+ onClick: onDownload,
2027
+ type: "button",
2028
+ className: "ml-auto",
2029
+ "data-testid": "recovery-codes-download-button",
2030
+ title: "Download recovery codes",
2031
+ children: /* @__PURE__ */ jsx58(
2032
+ download_default,
2033
+ {
2034
+ size: 24,
2035
+ className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover"
2036
+ }
2037
+ )
2038
+ }
2039
+ )
2040
+ ] })
2004
2041
  ] }),
2005
- hasCodes ? /* @__PURE__ */ jsx58("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ jsx58("div", { className: "grid grid-cols-5 flex-wrap gap-4 text-sm text-interface-foreground-default-primary", children: codes.map((code) => /* @__PURE__ */ jsx58("p", { children: code }, code)) }) }) : null
2042
+ hasCodes ? /* @__PURE__ */ jsx58("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ jsx58(
2043
+ "div",
2044
+ {
2045
+ className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 flex-wrap gap-4 text-sm text-interface-foreground-default-primary",
2046
+ "data-testid": "recovery-codes-codes",
2047
+ children: codes.map((code) => /* @__PURE__ */ jsx58("p", { children: code }, code))
2048
+ }
2049
+ ) }) : null
2006
2050
  ] });
2007
2051
  }
2008
2052
 
2009
- // src/theme/default/components/settings/settings-top.tsx
2053
+ // src/theme/default/components/settings/settings-totp.tsx
2010
2054
  import { useComponents as useComponents5 } from "@ory/elements-react";
2011
2055
 
2012
2056
  // src/theme/default/assets/icons/qrcode.svg
@@ -2018,19 +2062,28 @@ var SvgQrcode = (props) => {
2018
2062
  };
2019
2063
  var qrcode_default = SvgQrcode;
2020
2064
 
2021
- // src/theme/default/components/settings/settings-top.tsx
2065
+ // src/theme/default/components/settings/settings-totp.tsx
2066
+ import { useFormContext as useFormContext10 } from "react-hook-form";
2022
2067
  import { jsx as jsx60, jsxs as jsxs34 } from "react/jsx-runtime";
2023
- function DefaultSettingsTotp(props) {
2024
- var _a;
2068
+ function DefaultSettingsTotp({
2069
+ totpImage,
2070
+ totpInput,
2071
+ totpSecret,
2072
+ totpUnlink,
2073
+ onUnlink
2074
+ }) {
2025
2075
  const { Node, Card } = useComponents5();
2026
- if ("totpUnlink" in props && props.totpUnlink) {
2076
+ const {
2077
+ formState: { isSubmitting }
2078
+ } = useFormContext10();
2079
+ if (totpUnlink) {
2027
2080
  const {
2028
2081
  type,
2029
2082
  autocomplete: _ignoredAutocomplete,
2030
2083
  label: _ignoredLabel,
2031
2084
  node_type: _ignoredNodeType,
2032
2085
  ...buttonAttrs
2033
- } = (_a = props.totpUnlink) == null ? void 0 : _a.attributes;
2086
+ } = totpUnlink.attributes;
2034
2087
  return /* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
2035
2088
  /* @__PURE__ */ jsx60("div", { className: "col-span-full", children: /* @__PURE__ */ jsx60(Card.Divider, {}) }),
2036
2089
  /* @__PURE__ */ jsxs34("div", { className: "col-span-full flex items-center gap-6", children: [
@@ -2041,7 +2094,9 @@ function DefaultSettingsTotp(props) {
2041
2094
  {
2042
2095
  type: type === "button" ? "button" : "submit",
2043
2096
  ...buttonAttrs,
2044
- children: /* @__PURE__ */ jsx60(
2097
+ onClick: onUnlink,
2098
+ disabled: isSubmitting,
2099
+ children: isSubmitting ? /* @__PURE__ */ jsx60(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx60(
2045
2100
  trash_default,
2046
2101
  {
2047
2102
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -2053,15 +2108,15 @@ function DefaultSettingsTotp(props) {
2053
2108
  ] })
2054
2109
  ] });
2055
2110
  }
2056
- if ("totpSecret" in props) {
2111
+ if (totpImage && totpSecret && totpInput) {
2057
2112
  return /* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
2058
2113
  /* @__PURE__ */ jsx60("div", { className: "col-span-full", children: /* @__PURE__ */ jsx60(DefaultHorizontalDivider, {}) }),
2059
2114
  /* @__PURE__ */ jsx60("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ jsx60("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ jsx60("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ jsx60(
2060
2115
  Node.Image,
2061
2116
  {
2062
- node: props.totpImage,
2117
+ node: totpImage,
2063
2118
  attributes: {
2064
- ...props.totpImage.attributes
2119
+ ...totpImage.attributes
2065
2120
  }
2066
2121
  }
2067
2122
  ) }) }) }),
@@ -2069,18 +2124,18 @@ function DefaultSettingsTotp(props) {
2069
2124
  /* @__PURE__ */ jsx60(
2070
2125
  Node.Label,
2071
2126
  {
2072
- node: props.totpSecret,
2073
- attributes: props.totpSecret.attributes,
2127
+ node: totpSecret,
2128
+ attributes: totpSecret.attributes,
2074
2129
  children: /* @__PURE__ */ jsx60(
2075
2130
  Node.Input,
2076
2131
  {
2077
- node: props.totpSecret,
2132
+ node: totpSecret,
2078
2133
  attributes: {
2079
2134
  disabled: true,
2080
2135
  name: "totp_secret_key",
2081
2136
  node_type: "input",
2082
2137
  type: "text",
2083
- value: props.totpSecret.attributes.text.text
2138
+ value: totpSecret.attributes.text.text
2084
2139
  }
2085
2140
  }
2086
2141
  )
@@ -2089,13 +2144,13 @@ function DefaultSettingsTotp(props) {
2089
2144
  /* @__PURE__ */ jsx60(
2090
2145
  Node.Label,
2091
2146
  {
2092
- attributes: props.totpInput.attributes,
2093
- node: props.totpInput,
2147
+ attributes: totpInput.attributes,
2148
+ node: totpInput,
2094
2149
  children: /* @__PURE__ */ jsx60(
2095
- Node.Input,
2150
+ Node.CodeInput,
2096
2151
  {
2097
- node: props.totpInput,
2098
- attributes: props.totpInput.attributes
2152
+ node: totpInput,
2153
+ attributes: totpInput.attributes
2099
2154
  }
2100
2155
  )
2101
2156
  }
@@ -2118,16 +2173,20 @@ var SvgKey = (props) => {
2118
2173
  var key_default = SvgKey;
2119
2174
 
2120
2175
  // src/theme/default/components/settings/settings-webauthn.tsx
2176
+ import { useFormContext as useFormContext11 } from "react-hook-form";
2121
2177
  import { jsx as jsx62, jsxs as jsxs35 } from "react/jsx-runtime";
2122
2178
  function DefaultSettingsWebauthn({
2123
2179
  nameInput,
2124
2180
  triggerButton,
2125
2181
  removeButtons
2126
2182
  }) {
2183
+ const {
2184
+ formState: { isSubmitting }
2185
+ } = useFormContext11();
2127
2186
  const { Node, Card } = useComponents6();
2128
2187
  const hasRemoveButtons = removeButtons.length > 0;
2129
2188
  return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-8", children: [
2130
- /* @__PURE__ */ jsxs35("div", { className: "flex max-w-[60%] items-end gap-3", children: [
2189
+ /* @__PURE__ */ jsxs35("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
2131
2190
  /* @__PURE__ */ jsx62("div", { className: "flex-1", children: /* @__PURE__ */ jsx62(
2132
2191
  Node.Label,
2133
2192
  {
@@ -2153,37 +2212,44 @@ function DefaultSettingsWebauthn({
2153
2212
  ] }),
2154
2213
  hasRemoveButtons ? /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-8", children: [
2155
2214
  /* @__PURE__ */ jsx62(Card.Divider, {}),
2156
- /* @__PURE__ */ jsx62("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
2215
+ /* @__PURE__ */ jsx62("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
2157
2216
  var _a, _b;
2158
2217
  const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
2159
2218
  const addedAt = "added_at" in context ? context.added_at : null;
2160
- const diaplyName = "display_name" in context ? context.display_name : null;
2219
+ const displayName = "display_name" in context ? context.display_name : null;
2161
2220
  const keyId = "value" in node.attributes ? node.attributes.value : null;
2162
2221
  return /* @__PURE__ */ jsxs35(
2163
2222
  "div",
2164
2223
  {
2165
- className: "flex justify-between gap-6",
2224
+ className: "flex justify-between gap-6 md:items-center",
2166
2225
  children: [
2167
- /* @__PURE__ */ jsx62(
2168
- key_default,
2169
- {
2170
- size: 32,
2171
- className: "text-interface-foreground-default-primary"
2172
- }
2173
- ),
2174
- /* @__PURE__ */ jsxs35("div", { className: "flex-1 flex-col", children: [
2175
- /* @__PURE__ */ jsx62("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: diaplyName }),
2176
- /* @__PURE__ */ jsx62("span", { className: "text-sm text-interface-foreground-default-tertiary", children: keyId })
2226
+ /* @__PURE__ */ jsxs35("div", { className: "flex gap-2 items-center flex-1", children: [
2227
+ /* @__PURE__ */ jsx62(
2228
+ key_default,
2229
+ {
2230
+ size: 32,
2231
+ className: "text-interface-foreground-default-primary"
2232
+ }
2233
+ ),
2234
+ /* @__PURE__ */ jsxs35("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4", children: [
2235
+ /* @__PURE__ */ jsxs35("div", { className: "flex-1 flex-col", children: [
2236
+ /* @__PURE__ */ jsx62("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: displayName }),
2237
+ /* @__PURE__ */ jsx62("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block", children: keyId })
2238
+ ] }),
2239
+ addedAt && /* @__PURE__ */ jsx62("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
2240
+ dateStyle: "long"
2241
+ }).format(new Date(addedAt)) })
2242
+ ] })
2177
2243
  ] }),
2178
- addedAt && /* @__PURE__ */ jsx62("p", { className: "self-center text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
2179
- dateStyle: "long"
2180
- }).format(new Date(addedAt)) }),
2181
2244
  /* @__PURE__ */ jsx62(
2182
2245
  "button",
2183
2246
  {
2184
2247
  ...node.attributes,
2185
2248
  type: "submit",
2186
- children: /* @__PURE__ */ jsx62(
2249
+ onClick: node.onClick,
2250
+ disabled: isSubmitting,
2251
+ className: "relative",
2252
+ children: isSubmitting ? /* @__PURE__ */ jsx62(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx62(
2187
2253
  trash_default,
2188
2254
  {
2189
2255
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -2342,7 +2408,7 @@ import {
2342
2408
  OryProvider as OryProvider4,
2343
2409
  OrySettingsCard
2344
2410
  } from "@ory/elements-react";
2345
- import { Fragment as Fragment4, jsx as jsx67, jsxs as jsxs36 } from "react/jsx-runtime";
2411
+ import { Fragment as Fragment5, jsx as jsx67, jsxs as jsxs36 } from "react/jsx-runtime";
2346
2412
  function Settings({
2347
2413
  flow,
2348
2414
  config,
@@ -2357,7 +2423,7 @@ function Settings({
2357
2423
  flow,
2358
2424
  flowType: FlowType11.Settings,
2359
2425
  components,
2360
- children: children != null ? children : /* @__PURE__ */ jsxs36(Fragment4, { children: [
2426
+ children: children != null ? children : /* @__PURE__ */ jsxs36(Fragment5, { children: [
2361
2427
  /* @__PURE__ */ jsx67(HeadlessPageHeader, {}),
2362
2428
  /* @__PURE__ */ jsx67(OrySettingsCard, {})
2363
2429
  ] })