@mintlify/components 0.3.9 → 0.3.11
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/.github/dependabot.yml +10 -0
- package/.github/workflows/code-style-checks.yaml +13 -0
- package/.github/workflows/sanity.yml +13 -0
- package/.prettierignore +49 -0
- package/.prettierrc +1 -0
- package/dist/Accordion/Accordion.d.ts +2 -2
- package/dist/Accordion/AccordionCover.d.ts +1 -1
- package/dist/Accordion/AccordionGroup.d.ts +1 -1
- package/dist/Accordion/index.d.ts +2 -2
- package/dist/Api/ApiPlayground.d.ts +2 -2
- package/dist/Api/RequestMethodBubble.d.ts +1 -1
- package/dist/Api/RequestPathHeader.d.ts +1 -1
- package/dist/Api/index.d.ts +3 -3
- package/dist/Api/inputs/ApiInput.d.ts +1 -1
- package/dist/Api/types.d.ts +1 -1
- package/dist/Button.d.ts +2 -2
- package/dist/Callouts.d.ts +1 -1
- package/dist/Card.d.ts +6 -2
- package/dist/CardGroup.d.ts +2 -2
- package/dist/Code/CodeBlock.d.ts +4 -8
- package/dist/Code/CodeGroup.d.ts +5 -9
- package/dist/Code/CopyToClipboardButton.d.ts +4 -5
- package/dist/Code/index.d.ts +3 -3
- package/dist/Expandable/index.d.ts +1 -1
- package/dist/Frame.d.ts +1 -1
- package/dist/Tabs/Tab.d.ts +1 -1
- package/dist/Tabs/Tabs.d.ts +1 -1
- package/dist/Tabs/index.d.ts +2 -2
- package/dist/Tooltip.d.ts +2 -2
- package/dist/index.d.ts +15 -15
- package/dist/index.js +1 -1
- package/dist/main.css +1 -1
- package/dist/utils/copyToClipboard.d.ts +1 -1
- package/package.json +7 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
2
|
+
|
|
3
|
+
version: 2
|
|
4
|
+
updates:
|
|
5
|
+
- package-ecosystem: "npm" # See documentation for possible values
|
|
6
|
+
directory: "/" # Location of package manifests
|
|
7
|
+
schedule:
|
|
8
|
+
interval: "daily"
|
|
9
|
+
allow:
|
|
10
|
+
- dependency-name: "@mintlify/*"
|
package/.prettierignore
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# we are using yarn in this project
|
|
2
|
+
package.lock
|
|
3
|
+
|
|
4
|
+
# user editor preferences
|
|
5
|
+
/.vscode/
|
|
6
|
+
/.idea/
|
|
7
|
+
|
|
8
|
+
# dependencies
|
|
9
|
+
/node_modules
|
|
10
|
+
/.pnp
|
|
11
|
+
.pnp.js
|
|
12
|
+
|
|
13
|
+
# testing
|
|
14
|
+
/coverage
|
|
15
|
+
|
|
16
|
+
# next.js
|
|
17
|
+
/.next/
|
|
18
|
+
/out/
|
|
19
|
+
/public/feeds/
|
|
20
|
+
|
|
21
|
+
# production
|
|
22
|
+
/build
|
|
23
|
+
/dist
|
|
24
|
+
|
|
25
|
+
# generated files
|
|
26
|
+
/public/*
|
|
27
|
+
/src/pages/*
|
|
28
|
+
!/src/pages/api
|
|
29
|
+
/src/pages/api/*.mdx
|
|
30
|
+
!/src/pages/*.tsx
|
|
31
|
+
!/src/pages/*.ts
|
|
32
|
+
/src/config.json
|
|
33
|
+
/src/openapi.json
|
|
34
|
+
|
|
35
|
+
# misc
|
|
36
|
+
.DS_Store
|
|
37
|
+
|
|
38
|
+
# debug
|
|
39
|
+
npm-debug.log*
|
|
40
|
+
yarn-debug.log*
|
|
41
|
+
yarn-error.log*
|
|
42
|
+
build-storybook.log
|
|
43
|
+
|
|
44
|
+
# local env files
|
|
45
|
+
.env
|
|
46
|
+
.env.local
|
|
47
|
+
.env.development.local
|
|
48
|
+
.env.test.local
|
|
49
|
+
.env.production.local
|
package/.prettierrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"@mintlify/prettier-config/config.js"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
declare function Accordion({ title, description, defaultOpen, icon, onChange, variant, children, }: {
|
|
3
3
|
/** The main text of the Accordion shown in bold */
|
|
4
4
|
title: string;
|
|
@@ -11,7 +11,7 @@ declare function Accordion({ title, description, defaultOpen, icon, onChange, va
|
|
|
11
11
|
/** Callback when the Accordion is clicked with the new open state */
|
|
12
12
|
onChange?: (open: boolean) => void;
|
|
13
13
|
/** The Accordion UI style */
|
|
14
|
-
variant?:
|
|
14
|
+
variant?: 'rounded' | 'minimalist';
|
|
15
15
|
/** The Accordion contents */
|
|
16
16
|
children: ReactNode;
|
|
17
17
|
}): JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import Accordion from
|
|
2
|
-
import AccordionGroup from
|
|
1
|
+
import Accordion from './Accordion';
|
|
2
|
+
import AccordionGroup from './AccordionGroup';
|
|
3
3
|
export { Accordion, AccordionGroup };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { ParamGroup, RequestMethods } from
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ParamGroup, RequestMethods } from './types';
|
|
3
3
|
export declare function ApiPlayground({ method, paramGroups, paramValues, isSendingRequest, onChangeParamValues, onSendRequest, header, response, }: {
|
|
4
4
|
/** Request method. */
|
|
5
5
|
method: RequestMethods;
|
package/dist/Api/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiPlayground } from
|
|
2
|
-
import { RequestMethodBubble } from
|
|
3
|
-
import { RequestPathHeader } from
|
|
1
|
+
import { ApiPlayground } from './ApiPlayground';
|
|
2
|
+
import { RequestMethodBubble } from './RequestMethodBubble';
|
|
3
|
+
import { RequestPathHeader } from './RequestPathHeader';
|
|
4
4
|
export { ApiPlayground, RequestMethodBubble, RequestPathHeader };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ApiInputValue, Param } from
|
|
2
|
+
import { ApiInputValue, Param } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* ApiInput provides a UI to receive inputs from the user for API calls.
|
|
5
5
|
* The user is responsible for updating value when onChangeParam is called.
|
package/dist/Api/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type RequestMethods =
|
|
1
|
+
export type RequestMethods = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'COPY' | 'HEAD' | 'OPTIONS' | 'LINK' | 'UNLINK' | 'PURGE' | 'LOCK' | 'UNLOCK' | 'PROPFIND' | 'VIEW';
|
|
2
2
|
export type ParamGroup = {
|
|
3
3
|
name: string;
|
|
4
4
|
params: Param[];
|
package/dist/Button.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementType, ComponentPropsWithoutRef, Ref } from
|
|
1
|
+
import { ElementType, ComponentPropsWithoutRef, Ref } from 'react';
|
|
2
2
|
type ColorInterface = keyof typeof colors;
|
|
3
3
|
declare let colors: {
|
|
4
4
|
indigo: string[];
|
|
@@ -38,5 +38,5 @@ export interface ButtonPropsBase<T> {
|
|
|
38
38
|
* @typeParam T - Type of the Element rendered by the button.
|
|
39
39
|
*/
|
|
40
40
|
export type ButtonProps<T extends ElementType> = ButtonPropsBase<T> & Omit<ComponentPropsWithoutRef<T>, keyof ButtonPropsBase<T>>;
|
|
41
|
-
export declare function Button<T extends ElementType =
|
|
41
|
+
export declare function Button<T extends ElementType = 'button'>({ as, color, darkColor, reverse, children, className, mRef, ...props }: ButtonProps<T>): JSX.Element;
|
|
42
42
|
export {};
|
package/dist/Callouts.d.ts
CHANGED
package/dist/Card.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ElementType, ReactNode, Ref } from
|
|
1
|
+
import { ComponentPropsWithoutRef, ElementType, ReactNode, Ref } from 'react';
|
|
2
2
|
export interface CardPropsBase<T> {
|
|
3
3
|
/**
|
|
4
4
|
* Large title above children.
|
|
@@ -8,6 +8,10 @@ export interface CardPropsBase<T> {
|
|
|
8
8
|
* Icon to the top-left of the title.
|
|
9
9
|
*/
|
|
10
10
|
icon?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* If provided, will render an image to the top of the card.
|
|
13
|
+
*/
|
|
14
|
+
image?: string;
|
|
11
15
|
/**
|
|
12
16
|
* Type of element to be rendered.
|
|
13
17
|
*/
|
|
@@ -26,4 +30,4 @@ export interface CardPropsBase<T> {
|
|
|
26
30
|
* @typeParam T - Type of the Element rendered by the card.
|
|
27
31
|
*/
|
|
28
32
|
export type CardProps<T extends ElementType> = CardPropsBase<T> & Omit<ComponentPropsWithoutRef<T>, keyof CardPropsBase<T>>;
|
|
29
|
-
export declare function Card<T extends ElementType =
|
|
33
|
+
export declare function Card<T extends ElementType = 'div'>({ title, icon, image, className, children, as, mRef, ...props }: CardProps<T>): JSX.Element;
|
package/dist/CardGroup.d.ts
CHANGED
package/dist/Code/CodeBlock.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef } from
|
|
2
|
-
import { CopyToClipboardResult } from
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { CopyToClipboardResult } from '../utils/copyToClipboard';
|
|
3
3
|
export interface CodeBlockPropsBase {
|
|
4
4
|
filename?: string;
|
|
5
5
|
/**
|
|
@@ -10,14 +10,10 @@ export interface CodeBlockPropsBase {
|
|
|
10
10
|
* Background color for the tooltip saying `Click to Copy` when hovering the clipboard button.
|
|
11
11
|
*/
|
|
12
12
|
tooltipColor?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Background color for the tooltip saying `Copied` when clicking the clipboard button.
|
|
15
|
-
*/
|
|
16
|
-
copiedTooltipColor?: string;
|
|
17
13
|
/**
|
|
18
14
|
* The callback function when a user clicks on the copied to clipboard button
|
|
19
15
|
*/
|
|
20
16
|
onCopied?: (result: CopyToClipboardResult, textToCopy?: string) => void;
|
|
21
17
|
}
|
|
22
|
-
export type CodeBlockProps = CodeBlockPropsBase & Omit<ComponentPropsWithoutRef<
|
|
23
|
-
export declare function CodeBlock({ filename, filenameColor, tooltipColor,
|
|
18
|
+
export type CodeBlockProps = CodeBlockPropsBase & Omit<ComponentPropsWithoutRef<'div'>, keyof CodeBlockPropsBase>;
|
|
19
|
+
export declare function CodeBlock({ filename, filenameColor, tooltipColor, onCopied, children, className, ...props }: CodeBlockProps): JSX.Element;
|
package/dist/Code/CodeGroup.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { ComponentPropsWithoutRef } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { CopyToClipboardResult } from '../utils/copyToClipboard';
|
|
3
|
+
import { CodeBlockProps } from './CodeBlock';
|
|
4
4
|
export type CodeGroupPropsBase = {
|
|
5
5
|
/**
|
|
6
6
|
* Color of the filename text and the border underneath it when the content is being shown
|
|
@@ -10,10 +10,6 @@ export type CodeGroupPropsBase = {
|
|
|
10
10
|
* Background color for the tooltip saying `Click to Copy` when hovering the clipboard button.
|
|
11
11
|
*/
|
|
12
12
|
tooltipColor?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Background color for the tooltip saying `Copied` when clicking the clipboard button.
|
|
15
|
-
*/
|
|
16
|
-
copiedTooltipColor?: string;
|
|
17
13
|
/**
|
|
18
14
|
* The callback function when a user clicks on the copied to clipboard button
|
|
19
15
|
*/
|
|
@@ -21,7 +17,7 @@ export type CodeGroupPropsBase = {
|
|
|
21
17
|
isSmallText?: boolean;
|
|
22
18
|
children?: React.ReactElement<CodeBlockProps>[] | React.ReactElement<CodeBlockProps>;
|
|
23
19
|
};
|
|
24
|
-
export type CodeGroupProps = CodeGroupPropsBase & Omit<ComponentPropsWithoutRef<
|
|
20
|
+
export type CodeGroupProps = CodeGroupPropsBase & Omit<ComponentPropsWithoutRef<'div'>, keyof CodeGroupPropsBase>;
|
|
25
21
|
/**
|
|
26
22
|
* Group multiple code blocks into a tabbed UI.
|
|
27
23
|
* Uses CodeBlocks as children but does not render them directly. Instead,
|
|
@@ -29,4 +25,4 @@ export type CodeGroupProps = CodeGroupPropsBase & Omit<ComponentPropsWithoutRef<
|
|
|
29
25
|
*
|
|
30
26
|
* @param {CodeBlock[]} - children
|
|
31
27
|
*/
|
|
32
|
-
export declare function CodeGroup({ children, selectedColor, tooltipColor,
|
|
28
|
+
export declare function CodeGroup({ children, selectedColor, tooltipColor, onCopied, isSmallText, }: CodeGroupProps): JSX.Element | null;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef } from
|
|
2
|
-
import { CopyToClipboardResult } from
|
|
3
|
-
export declare function CopyToClipboardButton({ textToCopy, tooltipColor,
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { CopyToClipboardResult } from '../utils/copyToClipboard';
|
|
3
|
+
export declare function CopyToClipboardButton({ textToCopy, tooltipColor, onCopied, className, ...props }: {
|
|
4
4
|
textToCopy: string;
|
|
5
5
|
tooltipColor?: string;
|
|
6
|
-
copiedTooltipColor?: string;
|
|
7
6
|
onCopied?: (result: CopyToClipboardResult, textToCopy?: string) => void;
|
|
8
|
-
} & ComponentPropsWithoutRef<
|
|
7
|
+
} & ComponentPropsWithoutRef<'button'>): JSX.Element | null;
|
package/dist/Code/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CodeBlock, CodeBlockProps, CodeBlockPropsBase } from
|
|
2
|
-
import { CodeGroup, CodeGroupProps, CodeGroupPropsBase } from
|
|
3
|
-
export type { CodeGroupPropsBase, CodeBlockPropsBase, CodeGroupProps, CodeBlockProps
|
|
1
|
+
import { CodeBlock, CodeBlockProps, CodeBlockPropsBase } from './CodeBlock';
|
|
2
|
+
import { CodeGroup, CodeGroupProps, CodeGroupPropsBase } from './CodeGroup';
|
|
3
|
+
export type { CodeGroupPropsBase, CodeBlockPropsBase, CodeGroupProps, CodeBlockProps };
|
|
4
4
|
export { CodeBlock, CodeGroup };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import Expandable from
|
|
1
|
+
import Expandable from './Expandable';
|
|
2
2
|
export { Expandable };
|
package/dist/Frame.d.ts
CHANGED
package/dist/Tabs/Tab.d.ts
CHANGED
package/dist/Tabs/Tabs.d.ts
CHANGED
package/dist/Tabs/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import Tab from
|
|
2
|
-
import Tabs from
|
|
1
|
+
import Tab from './Tab';
|
|
2
|
+
import Tabs from './Tabs';
|
|
3
3
|
export { Tab, Tabs };
|
package/dist/Tooltip.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Accordion, AccordionGroup } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Button, ButtonProps, ButtonPropsBase } from
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
1
|
+
import { Accordion, AccordionGroup } from './Accordion';
|
|
2
|
+
import { ApiPlayground, RequestMethodBubble, RequestPathHeader } from './Api';
|
|
3
|
+
import { AppearFromTop } from './AppearFromTop';
|
|
4
|
+
import { Button, ButtonProps, ButtonPropsBase } from './Button';
|
|
5
|
+
import { Info, Warning, Note, Tip, Check } from './Callouts';
|
|
6
|
+
import { Card, CardProps, CardPropsBase } from './Card';
|
|
7
|
+
import { CardGroup } from './CardGroup';
|
|
8
|
+
import { CodeBlock, CodeBlockProps, CodeBlockPropsBase, CodeGroup, CodeGroupProps, CodeGroupPropsBase } from './Code';
|
|
9
|
+
import { Expandable } from './Expandable';
|
|
10
|
+
import { Frame } from './Frame';
|
|
11
|
+
import { Param } from './Param';
|
|
12
|
+
import { PillSelect } from './PillSelect';
|
|
13
|
+
import { Tab, Tabs } from './Tabs';
|
|
14
|
+
import { Tooltip } from './Tooltip';
|
|
15
|
+
import './css/globals.css';
|
|
16
16
|
export type { CardProps, ButtonProps, ButtonPropsBase, CardPropsBase, CodeGroupPropsBase, CodeBlockPropsBase, CodeGroupProps, CodeBlockProps, };
|
|
17
17
|
export { Accordion, AccordionGroup, AppearFromTop, ApiPlayground, Button, Card, CardGroup, CodeBlock, CodeGroup, Check, Expandable, Frame, Info, Warning, Note, Param, PillSelect, RequestMethodBubble, RequestPathHeader, Tabs, Tip, Tab, Tooltip, };
|