@ory/elements-react 0.0.0-pr.6b3fe62 → 0.0.0-pr.7af5f16
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/CHANGELOG.md +22 -0
- package/dist/index.js +18 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -10
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.js +7 -5
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +16 -14
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## 1.0.0-next.45 (2025-04-15)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- add missing test id to scope checkbox label ([#437](https://github.com/ory/elements/pull/437))
|
|
6
|
+
- add missing captcha group to all methods ([#432](https://github.com/ory/elements/pull/432))
|
|
7
|
+
|
|
8
|
+
### ❤️ Thank You
|
|
9
|
+
|
|
10
|
+
- hackerman @aeneasr
|
|
11
|
+
- Jonas Hungershausen
|
|
12
|
+
|
|
13
|
+
## 1.0.0-next.44 (2025-04-10)
|
|
14
|
+
|
|
15
|
+
### 🩹 Fixes
|
|
16
|
+
|
|
17
|
+
- use currentColor in eye icons ([#433](https://github.com/ory/elements/pull/433))
|
|
18
|
+
|
|
19
|
+
### ❤️ Thank You
|
|
20
|
+
|
|
21
|
+
- Jonas Hungershausen
|
|
22
|
+
|
|
1
23
|
## 1.0.0-next.43 (2025-04-10)
|
|
2
24
|
|
|
3
25
|
### 🚀 Features
|
package/dist/index.js
CHANGED
|
@@ -192,21 +192,29 @@ function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
|
|
|
192
192
|
function useNodesGroups(nodes, { omit } = {}) {
|
|
193
193
|
const groupSorter = useGroupSorter();
|
|
194
194
|
const groups = react.useMemo(() => {
|
|
195
|
-
var _a;
|
|
195
|
+
var _a, _b;
|
|
196
196
|
const groups2 = {};
|
|
197
|
+
const groupRetained = {};
|
|
197
198
|
for (const node of nodes) {
|
|
199
|
+
const groupNodes = (_a = groups2[node.group]) != null ? _a : [];
|
|
200
|
+
groupNodes.push(node);
|
|
201
|
+
groups2[node.group] = groupNodes;
|
|
198
202
|
if ((omit == null ? void 0 : omit.includes("script")) && clientFetch.isUiNodeScriptAttributes(node.attributes)) {
|
|
199
203
|
continue;
|
|
200
204
|
}
|
|
201
205
|
if ((omit == null ? void 0 : omit.includes("input_hidden")) && clientFetch.isUiNodeInputAttributes(node.attributes) && node.attributes.type === "hidden") {
|
|
202
206
|
continue;
|
|
203
207
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
208
|
+
groupRetained[node.group] = ((_b = groupRetained[node.group]) != null ? _b : 0) + 1;
|
|
209
|
+
}
|
|
210
|
+
const finalGroups = {};
|
|
211
|
+
for (const [group, count] of Object.entries(groupRetained)) {
|
|
212
|
+
if (count > 0) {
|
|
213
|
+
finalGroups[group] = groups2[group];
|
|
214
|
+
}
|
|
207
215
|
}
|
|
208
|
-
return
|
|
209
|
-
}, [nodes]);
|
|
216
|
+
return finalGroups;
|
|
217
|
+
}, [nodes, omit]);
|
|
210
218
|
const entries = react.useMemo(
|
|
211
219
|
() => Object.entries(groups).sort(([a], [b]) => groupSorter(a, b)),
|
|
212
220
|
[groups, groupSorter]
|
|
@@ -905,7 +913,7 @@ function OryForm({
|
|
|
905
913
|
}),
|
|
906
914
|
type: "error"
|
|
907
915
|
};
|
|
908
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": dataTestId, children: [
|
|
916
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-8", "data-testid": dataTestId, children: [
|
|
909
917
|
/* @__PURE__ */ jsxRuntime.jsx(Message.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(Message.Content, { message: m }, m.id) }),
|
|
910
918
|
/* @__PURE__ */ jsxRuntime.jsx(OryCardFooter, {})
|
|
911
919
|
] });
|
|
@@ -1238,7 +1246,7 @@ function OryTwoStepCard() {
|
|
|
1238
1246
|
showSsoDivider && /* @__PURE__ */ jsxRuntime.jsx(Card.Divider, {}),
|
|
1239
1247
|
nonSsoNodes.sort(sortNodes).map((node, k) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, k))
|
|
1240
1248
|
] }),
|
|
1241
|
-
formState.current === "select_method" && /* @__PURE__ */ jsxRuntime.jsxs(Form.Group, { children: [
|
|
1249
|
+
formState.current === "select_method" && Object.entries(authMethodBlocks).length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Form.Group, { children: [
|
|
1242
1250
|
Object.entries(authMethodBlocks).length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Card.Divider, {}),
|
|
1243
1251
|
Object.entries(authMethodBlocks).length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1244
1252
|
AuthMethodList,
|
|
@@ -1252,9 +1260,9 @@ function OryTwoStepCard() {
|
|
|
1252
1260
|
),
|
|
1253
1261
|
authMethodAdditionalNodes.sort(sortNodes).map((node, k) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, k))
|
|
1254
1262
|
] }),
|
|
1255
|
-
formState.current === "method_active" && /* @__PURE__ */ jsxRuntime.jsxs(Form.Group, { children: [
|
|
1263
|
+
formState.current === "method_active" && finalNodes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Form.Group, { children: [
|
|
1256
1264
|
ui.nodes.filter(
|
|
1257
|
-
(n) => clientFetch.isUiNodeScriptAttributes(n.attributes) || n.group === clientFetch.UiNodeGroupEnum.Captcha
|
|
1265
|
+
(n) => clientFetch.isUiNodeScriptAttributes(n.attributes) || n.group === clientFetch.UiNodeGroupEnum.Captcha || n.group === clientFetch.UiNodeGroupEnum.Default || n.group === clientFetch.UiNodeGroupEnum.Profile
|
|
1258
1266
|
).map((node, k) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, k)),
|
|
1259
1267
|
finalNodes.sort(sortNodes).map((node, k) => /* @__PURE__ */ jsxRuntime.jsx(Node, { node }, k))
|
|
1260
1268
|
] }),
|