Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
mfal committed Jan 9, 2025
1 parent 73aedff commit 1450448
Show file tree
Hide file tree
Showing 44 changed files with 454 additions and 430 deletions.
6 changes: 0 additions & 6 deletions .idea/compiler.xml

This file was deleted.

6 changes: 4 additions & 2 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
"build:icons",
"build:imports",
"build:css",
"^build:docs-properties",
"^build:remote-components"
"build:base",
"build:docs-properties",
"build:remote-components"
],
"cache": true
},
Expand Down Expand Up @@ -49,6 +50,7 @@
"inputs": ["default", "{projectRoot}/src/content/**/*.mdx"]
},
"build:base": {
"dependsOn": ["^build"],
"cache": true,
"inputs": ["default"]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const PropertyRow: React.FC<PropertyTableGroupProps> = ({
components={omit(customComponents, [
"Content",
"Heading",
"InlineAlert",
"Alert",
"DoAndDont",
"ColumnLayout",
])}
Expand Down
24 changes: 14 additions & 10 deletions packages/docs/src/lib/mdx/components/MdxFileView/MdxFileView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,20 @@ export const MdxFileView: FC<Props> = (props) => {
return (
<NextMDXRemote
{...mdxFile.mdxSource}
components={{
LiveCodeEditor: ExampleLiveCodeEditor,
PropertiesTables: ExamplePropertiesTables,
Do: ExampleDo,
Dont: ExampleDont,
Info: ExampleInfo,
MStudio: ExampleStudio,
Plain: ExamplePlain,
...customComponents,
}}
components={
{
LiveCodeEditor: ExampleLiveCodeEditor,
PropertiesTables: ExamplePropertiesTables,
Do: ExampleDo,
Dont: ExampleDont,
Info: ExampleInfo,
MStudio: ExampleStudio,
Plain: ExamplePlain,
...customComponents,
// @todo: remove when MDXRemote types are fixed
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any
}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import styles from "./customComponents.module.css";
import Heading from "@mittwald/flow-react-components/Heading";
import type { MDXComponents } from "mdx/types";
import Alert from "@mittwald/flow-react-components/Alert";
import Content from "@mittwald/flow-react-components/Content";
import type { PropsWithChildren } from "react";
import React from "react";
import CopyButton from "@mittwald/flow-react-components/CopyButton";
import Link from "@mittwald/flow-react-components/Link";
Expand All @@ -23,7 +23,7 @@ import {
} from "@mittwald/flow-react-components/Table";
import { Label } from "@mittwald/flow-react-components/Label";

export const customComponents: MDXComponents = {
export const customComponents = {
Content: Content,
Heading: Heading,
Alert: Alert,
Expand All @@ -33,7 +33,7 @@ export const customComponents: MDXComponents = {
Label: Label,
Link: Link,

pre: ({ children }) => (
pre: ({ children }: PropsWithChildren) => (
<div className={styles.preContainer}>
<pre className={styles.pre}>{children}</pre>
<CopyButton
Expand All @@ -45,43 +45,49 @@ export const customComponents: MDXComponents = {
</div>
),

code: ({ children }) => <InlineCode>{children}</InlineCode>,
code: ({ children }: PropsWithChildren) => (
<InlineCode>{children}</InlineCode>
),

p: ({ children }) => (
p: ({ children }: PropsWithChildren) => (
<Text className={styles.p} elementType="p">
{children}
</Text>
),

ul: ({ children }) => <ul className={styles.ul}>{children}</ul>,
ul: ({ children }: PropsWithChildren) => (
<ul className={styles.ul}>{children}</ul>
),

li: ({ children }) => <li className={styles.li}>{children}</li>,
li: ({ children }: PropsWithChildren) => (
<li className={styles.li}>{children}</li>
),

h1: ({ children }) => (
h1: ({ children }: PropsWithChildren) => (
<Heading level={2} size="l" className={styles.heading2}>
{children}
</Heading>
),

h2: ({ children }) => (
h2: ({ children }: PropsWithChildren) => (
<Heading level={3} size="m" className={styles.heading}>
{children}
</Heading>
),

h3: ({ children }) => (
h3: ({ children }: PropsWithChildren) => (
<Heading level={4} size="s" className={styles.heading}>
{children}
</Heading>
),

h4: ({ children }) => (
h4: ({ children }: PropsWithChildren) => (
<Heading level={5} className={styles.heading}>
{children}
</Heading>
),

a: ({ children, href }) => {
a: ({ children, href }: PropsWithChildren<{ href?: string }>) => {
if (href?.startsWith("http")) {
return (
<Link href={href} inline>
Expand All @@ -101,10 +107,14 @@ export const customComponents: MDXComponents = {

hr: () => <Separator className={styles.separator} />,

table: ({ children }) => <Table>{children}</Table>,
thead: ({ children }) => <TableHeader>{children}</TableHeader>,
tr: ({ children }) => <TableRow>{children}</TableRow>,
th: ({ children }) => <TableColumn>{children}</TableColumn>,
tbody: ({ children }) => <TableBody>{children}</TableBody>,
td: ({ children }) => <TableCell>{children}</TableCell>,
};
table: ({ children }: PropsWithChildren) => <Table>{children}</Table>,
thead: ({ children }: PropsWithChildren) => (
<TableHeader>{children}</TableHeader>
),
tr: ({ children }: PropsWithChildren) => <TableRow>{children}</TableRow>,
th: ({ children }: PropsWithChildren) => (
<TableColumn>{children}</TableColumn>
),
tbody: ({ children }: PropsWithChildren) => <TableBody>{children}</TableBody>,
td: ({ children }: PropsWithChildren) => <TableCell>{children}</TableCell>,
} as const;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ export class RemoteAlertIconElement extends FlowRemoteElement<RemoteAlertIconEle
"aria-describedby": {},
"aria-details": {},
end: {},
"aria-activedescendant": {},
"aria-autocomplete": {},
"aria-haspopup": {},
id: {},
type: {},
"aria-errormessage": {},
width: {},
spacing: {},
clipPath: {},
Expand All @@ -28,9 +33,7 @@ export class RemoteAlertIconElement extends FlowRemoteElement<RemoteAlertIconEle
tabIndex: {},
role: {},
color: {},
"aria-activedescendant": {},
"aria-atomic": {},
"aria-autocomplete": {},
"aria-braillelabel": {},
"aria-brailleroledescription": {},
"aria-busy": {},
Expand All @@ -44,11 +47,9 @@ export class RemoteAlertIconElement extends FlowRemoteElement<RemoteAlertIconEle
"aria-description": {},
"aria-disabled": {},
"aria-dropeffect": {},
"aria-errormessage": {},
"aria-expanded": {},
"aria-flowto": {},
"aria-grabbed": {},
"aria-haspopup": {},
"aria-hidden": {},
"aria-invalid": {},
"aria-keyshortcuts": {},
Expand Down Expand Up @@ -83,7 +84,6 @@ export class RemoteAlertIconElement extends FlowRemoteElement<RemoteAlertIconEle
method: {},
min: {},
target: {},
type: {},
crossOrigin: {},
accentHeight: {},
accumulate: {},
Expand Down Expand Up @@ -330,23 +330,24 @@ export class RemoteAlertIconElement extends FlowRemoteElement<RemoteAlertIconEle
keyUp: {},
change: {},
copy: {},
copyCapture: {},
cut: {},
cutCapture: {},
paste: {},
pasteCapture: {},
compositionStart: {},
compositionEnd: {},
compositionUpdate: {},
select: {},
beforeInput: {},
input: {},
copyCapture: {},
cutCapture: {},
pasteCapture: {},
compositionEndCapture: {},
compositionStart: {},
compositionStartCapture: {},
compositionUpdate: {},
compositionUpdateCapture: {},
focusCapture: {},
blurCapture: {},
changeCapture: {},
beforeInput: {},
beforeInputCapture: {},
input: {},
inputCapture: {},
reset: {},
resetCapture: {},
Expand Down Expand Up @@ -444,7 +445,6 @@ export class RemoteAlertIconElement extends FlowRemoteElement<RemoteAlertIconEle
mouseOverCapture: {},
mouseUp: {},
mouseUpCapture: {},
select: {},
selectCapture: {},
touchCancel: {},
touchCancelCapture: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ export class RemoteButtonElement extends FlowRemoteElement<RemoteButtonElementPr
"aria-labelledby": {},
"aria-describedby": {},
"aria-details": {},
"aria-haspopup": {},
isDisabled: {},
autoFocus: {},
excludeFromTabOrder: {},
id: {},
type: {},
"aria-controls": {},
"aria-expanded": {},
"aria-haspopup": {},
"aria-pressed": {},
type: {},
preventFocusOnPress: {},
excludeFromTabOrder: {},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ export class RemoteCheckboxButtonElement extends FlowRemoteElement<RemoteCheckbo
validate: {},
autoFocus: {},
value: {},
excludeFromTabOrder: {},
id: {},
name: {},
"aria-errormessage": {},
slot: {},
"aria-controls": {},
"aria-errormessage": {},
excludeFromTabOrder: {},
isIndeterminate: {},
defaultSelected: {},
isSelected: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ export class RemoteCheckboxElement extends FlowRemoteElement<RemoteCheckboxEleme
validate: {},
autoFocus: {},
value: {},
excludeFromTabOrder: {},
id: {},
name: {},
"aria-errormessage": {},
slot: {},
"aria-controls": {},
"aria-errormessage": {},
excludeFromTabOrder: {},
isIndeterminate: {},
defaultSelected: {},
isSelected: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export class RemoteCheckboxGroupElement extends FlowRemoteElement<RemoteCheckbox
defaultValue: {},
id: {},
name: {},
slot: {},
"aria-errormessage": {},
slot: {},
s: {},
m: {},
l: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ export class RemoteCopyButtonElement extends FlowRemoteElement<RemoteCopyButtonE
"aria-labelledby": {},
"aria-describedby": {},
"aria-details": {},
"aria-haspopup": {},
isDisabled: {},
autoFocus: {},
value: {},
excludeFromTabOrder: {},
id: {},
type: {},
name: {},
slot: {},
form: {},
color: {},
"aria-controls": {},
"aria-disabled": {},
"aria-expanded": {},
"aria-haspopup": {},
"aria-pressed": {},
type: {},
size: {},
preventFocusOnPress: {},
excludeFromTabOrder: {},
variant: {},
isPending: {},
isSucceeded: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ export class RemoteDatePickerElement extends FlowRemoteElement<RemoteDatePickerE
"aria-describedby": {},
"aria-details": {},
validationBehavior: {},
hourCycle: {},
granularity: {},
hideTimeZone: {},
shouldForceLeadingZeros: {},
placeholderValue: {},
minValue: {},
maxValue: {},
isDisabled: {},
isReadOnly: {},
isRequired: {},
Expand All @@ -33,6 +26,13 @@ export class RemoteDatePickerElement extends FlowRemoteElement<RemoteDatePickerE
id: {},
name: {},
slot: {},
hourCycle: {},
granularity: {},
hideTimeZone: {},
shouldForceLeadingZeros: {},
placeholderValue: {},
minValue: {},
maxValue: {},
pageBehavior: {},
isDateUnavailable: {},
shouldCloseOnSelect: {},
Expand Down
Loading

0 comments on commit 1450448

Please sign in to comment.