Skip to content

Commit

Permalink
fix: rebase bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
mszekiel committed Oct 15, 2024
1 parent d5458d8 commit 0378c35
Show file tree
Hide file tree
Showing 8 changed files with 269 additions and 2,458 deletions.
2,697 changes: 254 additions & 2,443 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
"tsup": "8.2.4",
"typedoc": "0.23.16",
"typescript": "5.2.2",
"typescript-eslint": "8.9.0",
"vite": "5.4.3",
"vite-plugin-dts": "4.1.0",
"vite-plugin-require": "1.2.14",
Expand Down
1 change: 1 addition & 0 deletions packages/elements-react/src/components/form/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export * from "./form"
export * from "./groups"
export * from "./messages"
export * from "./social"
export * from "./section"
4 changes: 2 additions & 2 deletions packages/elements-react/src/components/form/section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ export type OryFormSectionProps = PropsWithChildren<{
}>

export function OryFormSection({ children, nodes }: OryFormSectionProps) {
const {} = useComponents()
const { Settings } = useComponents()

return (
<OryForm nodes={nodes}>
<FormSection>{children}</FormSection>
<Settings.Section>{children}</Settings.Section>
</OryForm>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function SettingsSectionContent({ group, nodes }: SettingsSectionProps) {
const intl = useIntl()
const { flow } = useOryFlow()
const uniqueGroups = useNodesGroups(flow.ui.nodes)

console.log("asd")
if (group === UiNodeGroupEnum.Totp) {
return (
<OryFormSection nodes={uniqueGroups.groups.totp}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ export const OryDefaultComponents: OryFlowComponents = {
Content: DefaultMessage,
},
Settings: {
FormSection: DefaultFormSection,
FormSectionContent: DefaultFormSectionContent,
FormSectionFooter: DefaultFormSectionFooter,
Section: DefaultFormSection,
SectionContent: DefaultFormSectionContent,
SectionFooter: DefaultFormSectionFooter,
RecoveryCodes: DefaultSettingsRecoveryCodes,
Totp: DefaultSettingsTotp,
Oidc: DefaultSettingsOidc,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {
HeadlessFormSectionContentProps,
HeadlessFormSectionFooterProps,
HeadlessFormSectionProps,
OryFormSectionContentProps,
OryFormSectionFooterProps,
OryFormSectionProps,
} from "@ory/elements-react"

const DefaultFormSection = ({ children }: HeadlessFormSectionProps) => {
const DefaultFormSection = ({ children }: OryFormSectionProps) => {
return (
<div className="ory-default-theme">
<div className="flex flex-col">{children}</div>
Expand All @@ -16,7 +16,7 @@ const DefaultFormSectionContent = ({
title,
description,
children,
}: HeadlessFormSectionContentProps) => {
}: OryFormSectionContentProps) => {
return (
<div className="border rounded-t-xl border-b-0 border-dialog-border-default bg-forms-bg-default px-6 py-8 flex flex-col gap-8">
<div className="flex flex-col gap-2">
Expand All @@ -28,9 +28,7 @@ const DefaultFormSectionContent = ({
)
}

const DefaultFormSectionFooter = ({
children,
}: HeadlessFormSectionFooterProps) => {
const DefaultFormSectionFooter = ({ children }: OryFormSectionFooterProps) => {
return (
<div className="rounded-b-xl gap-2 flex justify-end px-6 py-4 bg-dialog-bg-subtle border border-dialog-border-default text-sm text-dialog-fg-mute items-center [&>span]:mr-auto min-h-[72px]">
{children}
Expand Down
2 changes: 1 addition & 1 deletion packages/elements-react/src/util/ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type {
UiNodeInputAttributesTypeEnum,
} from "@ory/client-fetch"
import { useMemo } from "react"
import { useGroupSorter } from "../../context"
import { useGroupSorter } from "../../context/component"

export function capitalize(s: string) {
if (!s) {
Expand Down

0 comments on commit 0378c35

Please sign in to comment.