@mintlify/components
Advanced tools
Comparing version 0.3.10 to 0.3.11
@@ -1,2 +0,2 @@ | ||
import { ReactNode } from "react"; | ||
import { ReactNode } from 'react'; | ||
declare function Accordion({ title, description, defaultOpen, icon, onChange, variant, children, }: { | ||
@@ -14,3 +14,3 @@ /** The main text of the Accordion shown in bold */ | ||
/** The Accordion UI style */ | ||
variant?: "rounded" | "minimalist"; | ||
variant?: 'rounded' | 'minimalist'; | ||
/** The Accordion contents */ | ||
@@ -17,0 +17,0 @@ children: ReactNode; |
@@ -1,2 +0,2 @@ | ||
import { ReactNode } from "react"; | ||
import { ReactNode } from 'react'; | ||
declare function AccordionItemCover({ title, description, open, setOpen, icon, coverClass, }: { | ||
@@ -3,0 +3,0 @@ title: string; |
@@ -1,2 +0,2 @@ | ||
import { ReactNode } from "react"; | ||
import { ReactNode } from 'react'; | ||
declare function AccordionGroup({ children }: { | ||
@@ -3,0 +3,0 @@ children: ReactNode; |
@@ -1,3 +0,3 @@ | ||
import Accordion from "./Accordion"; | ||
import AccordionGroup from "./AccordionGroup"; | ||
import Accordion from './Accordion'; | ||
import AccordionGroup from './AccordionGroup'; | ||
export { Accordion, AccordionGroup }; |
@@ -1,3 +0,3 @@ | ||
import { ReactNode } from "react"; | ||
import { ParamGroup, RequestMethods } from "./types"; | ||
import { ReactNode } from 'react'; | ||
import { ParamGroup, RequestMethods } from './types'; | ||
export declare function ApiPlayground({ method, paramGroups, paramValues, isSendingRequest, onChangeParamValues, onSendRequest, header, response, }: { | ||
@@ -4,0 +4,0 @@ /** Request method. */ |
@@ -1,4 +0,4 @@ | ||
import { ApiPlayground } from "./ApiPlayground"; | ||
import { RequestMethodBubble } from "./RequestMethodBubble"; | ||
import { RequestPathHeader } from "./RequestPathHeader"; | ||
import { ApiPlayground } from './ApiPlayground'; | ||
import { RequestMethodBubble } from './RequestMethodBubble'; | ||
import { RequestPathHeader } from './RequestPathHeader'; | ||
export { ApiPlayground, RequestMethodBubble, RequestPathHeader }; |
/// <reference types="react" /> | ||
import { ApiInputValue, Param } from "../types"; | ||
import { ApiInputValue, Param } from '../types'; | ||
/** | ||
@@ -4,0 +4,0 @@ * ApiInput provides a UI to receive inputs from the user for API calls. |
@@ -1,4 +0,4 @@ | ||
import { RequestMethods } from "./types"; | ||
import { RequestMethods } from './types'; | ||
export declare const RequestMethodBubble: ({ method }: { | ||
method: RequestMethods; | ||
}) => JSX.Element; |
@@ -1,2 +0,2 @@ | ||
import { RequestMethods } from "./types"; | ||
import { RequestMethods } from './types'; | ||
export declare const RequestPathHeader: ({ method, path, baseUrls, defaultBaseUrl, onBaseUrlChange, }: { | ||
@@ -3,0 +3,0 @@ /** Request method. */ |
@@ -1,2 +0,2 @@ | ||
export type RequestMethods = "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "COPY" | "HEAD" | "OPTIONS" | "LINK" | "UNLINK" | "PURGE" | "LOCK" | "UNLOCK" | "PROPFIND" | "VIEW"; | ||
export type RequestMethods = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'COPY' | 'HEAD' | 'OPTIONS' | 'LINK' | 'UNLINK' | 'PURGE' | 'LOCK' | 'UNLOCK' | 'PROPFIND' | 'VIEW'; | ||
export type ParamGroup = { | ||
@@ -3,0 +3,0 @@ name: string; |
@@ -1,2 +0,2 @@ | ||
import { ElementType, ComponentPropsWithoutRef, Ref } from "react"; | ||
import { ElementType, ComponentPropsWithoutRef, Ref } from 'react'; | ||
type ColorInterface = keyof typeof colors; | ||
@@ -41,3 +41,3 @@ declare let colors: { | ||
export type ButtonProps<T extends ElementType> = ButtonPropsBase<T> & Omit<ComponentPropsWithoutRef<T>, keyof ButtonPropsBase<T>>; | ||
export declare function Button<T extends ElementType = "button">({ as, color, darkColor, reverse, children, className, mRef, ...props }: ButtonProps<T>): JSX.Element; | ||
export declare function Button<T extends ElementType = 'button'>({ as, color, darkColor, reverse, children, className, mRef, ...props }: ButtonProps<T>): JSX.Element; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import { ReactNode } from "react"; | ||
import { ReactNode } from 'react'; | ||
type CalloutContent = { | ||
@@ -3,0 +3,0 @@ children: ReactNode; |
@@ -1,2 +0,2 @@ | ||
import { ComponentPropsWithoutRef, ElementType, ReactNode, Ref } from "react"; | ||
import { ComponentPropsWithoutRef, ElementType, ReactNode, Ref } from 'react'; | ||
export interface CardPropsBase<T> { | ||
@@ -12,2 +12,6 @@ /** | ||
/** | ||
* If provided, will render an image to the top of the card. | ||
*/ | ||
image?: string; | ||
/** | ||
* Type of element to be rendered. | ||
@@ -30,2 +34,2 @@ */ | ||
export type CardProps<T extends ElementType> = CardPropsBase<T> & Omit<ComponentPropsWithoutRef<T>, keyof CardPropsBase<T>>; | ||
export declare function Card<T extends ElementType = "div">({ title, icon, className, children, as, mRef, ...props }: CardProps<T>): JSX.Element; | ||
export declare function Card<T extends ElementType = 'div'>({ title, icon, image, className, children, as, mRef, ...props }: CardProps<T>): JSX.Element; |
@@ -1,5 +0,5 @@ | ||
import { ReactNode } from "react"; | ||
export declare function CardGroup({ children, cols, }: { | ||
import { ReactNode } from 'react'; | ||
export declare function CardGroup({ children, cols }: { | ||
children: ReactNode; | ||
cols?: 1 | 2 | 3 | 4; | ||
}): JSX.Element; |
@@ -1,3 +0,3 @@ | ||
import { ComponentPropsWithoutRef } from "react"; | ||
import { CopyToClipboardResult } from "../utils/copyToClipboard"; | ||
import { ComponentPropsWithoutRef } from 'react'; | ||
import { CopyToClipboardResult } from '../utils/copyToClipboard'; | ||
export interface CodeBlockPropsBase { | ||
@@ -18,3 +18,3 @@ filename?: string; | ||
} | ||
export type CodeBlockProps = CodeBlockPropsBase & Omit<ComponentPropsWithoutRef<"div">, keyof CodeBlockPropsBase>; | ||
export type CodeBlockProps = CodeBlockPropsBase & Omit<ComponentPropsWithoutRef<'div'>, keyof CodeBlockPropsBase>; | ||
export declare function CodeBlock({ filename, filenameColor, tooltipColor, onCopied, children, className, ...props }: CodeBlockProps): JSX.Element; |
@@ -1,4 +0,4 @@ | ||
import React, { ComponentPropsWithoutRef } from "react"; | ||
import { CodeBlockProps } from "./CodeBlock"; | ||
import { CopyToClipboardResult } from "../utils/copyToClipboard"; | ||
import React, { ComponentPropsWithoutRef } from 'react'; | ||
import { CopyToClipboardResult } from '../utils/copyToClipboard'; | ||
import { CodeBlockProps } from './CodeBlock'; | ||
export type CodeGroupPropsBase = { | ||
@@ -20,3 +20,3 @@ /** | ||
}; | ||
export type CodeGroupProps = CodeGroupPropsBase & Omit<ComponentPropsWithoutRef<"div">, keyof CodeGroupPropsBase>; | ||
export type CodeGroupProps = CodeGroupPropsBase & Omit<ComponentPropsWithoutRef<'div'>, keyof CodeGroupPropsBase>; | ||
/** | ||
@@ -23,0 +23,0 @@ * Group multiple code blocks into a tabbed UI. |
@@ -1,3 +0,3 @@ | ||
import { ComponentPropsWithoutRef } from "react"; | ||
import { CopyToClipboardResult } from "../utils/copyToClipboard"; | ||
import { ComponentPropsWithoutRef } from 'react'; | ||
import { CopyToClipboardResult } from '../utils/copyToClipboard'; | ||
export declare function CopyToClipboardButton({ textToCopy, tooltipColor, onCopied, className, ...props }: { | ||
@@ -7,2 +7,2 @@ textToCopy: string; | ||
onCopied?: (result: CopyToClipboardResult, textToCopy?: string) => void; | ||
} & ComponentPropsWithoutRef<"button">): JSX.Element | null; | ||
} & ComponentPropsWithoutRef<'button'>): JSX.Element | null; |
@@ -1,4 +0,4 @@ | ||
import { CodeBlock, CodeBlockProps, CodeBlockPropsBase } from "./CodeBlock"; | ||
import { CodeGroup, CodeGroupProps, CodeGroupPropsBase } from "./CodeGroup"; | ||
export type { CodeGroupPropsBase, CodeBlockPropsBase, CodeGroupProps, CodeBlockProps, }; | ||
import { CodeBlock, CodeBlockProps, CodeBlockPropsBase } from './CodeBlock'; | ||
import { CodeGroup, CodeGroupProps, CodeGroupPropsBase } from './CodeGroup'; | ||
export type { CodeGroupPropsBase, CodeBlockPropsBase, CodeGroupProps, CodeBlockProps }; | ||
export { CodeBlock, CodeGroup }; |
@@ -1,2 +0,2 @@ | ||
import Expandable from "./Expandable"; | ||
import Expandable from './Expandable'; | ||
export { Expandable }; |
@@ -12,4 +12,4 @@ /// <reference types="react" /> | ||
hint: string; | ||
padding: "none" | "md"; | ||
padding: 'none' | 'md'; | ||
lightOnly: boolean; | ||
}): JSX.Element; |
@@ -1,17 +0,17 @@ | ||
import { Accordion, AccordionGroup } from "./Accordion"; | ||
import { AppearFromTop } from "./AppearFromTop"; | ||
import { ApiPlayground, RequestMethodBubble, RequestPathHeader } from "./Api"; | ||
import { Button, ButtonProps, ButtonPropsBase } from "./Button"; | ||
import { Card, CardProps, CardPropsBase } from "./Card"; | ||
import { CardGroup } from "./CardGroup"; | ||
import { CodeBlock, CodeBlockProps, CodeBlockPropsBase, CodeGroup, CodeGroupProps, CodeGroupPropsBase } from "./Code"; | ||
import { Info, Warning, Note, Tip, Check } from "./Callouts"; | ||
import { Frame } from "./Frame"; | ||
import { Param } from "./Param"; | ||
import { PillSelect } from "./PillSelect"; | ||
import { Tab, Tabs } from "./Tabs"; | ||
import { Tooltip } from "./Tooltip"; | ||
import { Expandable } from "./Expandable"; | ||
import "./css/globals.css"; | ||
import { Accordion, AccordionGroup } from './Accordion'; | ||
import { ApiPlayground, RequestMethodBubble, RequestPathHeader } from './Api'; | ||
import { AppearFromTop } from './AppearFromTop'; | ||
import { Button, ButtonProps, ButtonPropsBase } from './Button'; | ||
import { Info, Warning, Note, Tip, Check } from './Callouts'; | ||
import { Card, CardProps, CardPropsBase } from './Card'; | ||
import { CardGroup } from './CardGroup'; | ||
import { CodeBlock, CodeBlockProps, CodeBlockPropsBase, CodeGroup, CodeGroupProps, CodeGroupPropsBase } from './Code'; | ||
import { Expandable } from './Expandable'; | ||
import { Frame } from './Frame'; | ||
import { Param } from './Param'; | ||
import { PillSelect } from './PillSelect'; | ||
import { Tab, Tabs } from './Tabs'; | ||
import { Tooltip } from './Tooltip'; | ||
import './css/globals.css'; | ||
export type { CardProps, ButtonProps, ButtonPropsBase, CardPropsBase, CodeGroupPropsBase, CodeBlockPropsBase, CodeGroupProps, CodeBlockProps, }; | ||
export { Accordion, AccordionGroup, AppearFromTop, ApiPlayground, Button, Card, CardGroup, CodeBlock, CodeGroup, Check, Expandable, Frame, Info, Warning, Note, Param, PillSelect, RequestMethodBubble, RequestPathHeader, Tabs, Tip, Tab, Tooltip, }; |
@@ -1,3 +0,3 @@ | ||
import Tab from "./Tab"; | ||
import Tabs from "./Tabs"; | ||
import Tab from './Tab'; | ||
import Tabs from './Tabs'; | ||
export { Tab, Tabs }; |
@@ -1,2 +0,2 @@ | ||
import { ReactNode } from "react"; | ||
import { ReactNode } from 'react'; | ||
export default function Tab({ title, isActive, children, }: { | ||
@@ -3,0 +3,0 @@ title: string; |
@@ -1,4 +0,4 @@ | ||
import { ReactElement } from "react"; | ||
import { ReactElement } from 'react'; | ||
export default function Tabs({ children }: { | ||
children: ReactElement[]; | ||
}): JSX.Element; |
@@ -1,5 +0,5 @@ | ||
import { ReactNode } from "react"; | ||
export declare function Tooltip({ tip, children, }: { | ||
import { ReactNode } from 'react'; | ||
export declare function Tooltip({ tip, children }: { | ||
tip: string; | ||
children: ReactNode; | ||
}): JSX.Element | null; |
@@ -1,2 +0,2 @@ | ||
export type CopyToClipboardResult = "success" | "error"; | ||
export type CopyToClipboardResult = 'success' | 'error'; | ||
export declare function copyToClipboard(text: string): Promise<CopyToClipboardResult>; |
{ | ||
"name": "@mintlify/components", | ||
"version": "0.3.10", | ||
"version": "0.3.11", | ||
"description": "Open-source library of UI components made with React and TailwindCSS.", | ||
@@ -19,2 +19,4 @@ "main": "./dist/index.js", | ||
"build": "webpack", | ||
"format": "prettier \"**/*.{css,js,ts,tsx,md}\" --write", | ||
"format:check": "prettier \"**/*.{css,js,ts,tsx,md}\" --check", | ||
"prepare": "npm run build", | ||
@@ -37,2 +39,3 @@ "storybook": "start-storybook -p 6006", | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@mintlify/prettier-config": "1.0.2", | ||
"@storybook/addon-actions": "^6.5.13", | ||
@@ -48,2 +51,3 @@ "@storybook/addon-essentials": "^6.5.13", | ||
"@tailwindcss/typography": "^0.5.7", | ||
"@trivago/prettier-plugin-sort-imports": "3.x", | ||
"@types/lodash.set": "^4.3.7", | ||
@@ -62,2 +66,3 @@ "@types/react": "^18.0.21", | ||
"postcss-preset-env": "^7.8.3", | ||
"prettier": "2.x", | ||
"react": "^18.0.0", | ||
@@ -64,0 +69,0 @@ "react-dom": "^18.0.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
203248
60
679
43