dawn-ui-react 1.0.0-alpha.8 → 1.0.0-alpha.9
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/dist/components/code-block/code-block-actions.d.ts +2 -0
- package/dist/components/code-block/code-block-copy.d.ts +2 -0
- package/dist/components/code-block/code-block-download.d.ts +2 -0
- package/dist/components/code-block/code-block-header-group.d.ts +2 -0
- package/dist/components/code-block/code-block-header.d.ts +3 -0
- package/dist/components/code-block/code-block-name.d.ts +2 -0
- package/dist/components/code-block/code-block-select.d.ts +2 -0
- package/dist/components/code-block/code-block-tabs.d.ts +2 -0
- package/dist/components/code-block/code-block-window.d.ts +3 -0
- package/dist/components/code-block/code-block.d.ts +3 -0
- package/dist/components/code-block/code-block.types.d.ts +26 -0
- package/dist/components/code-block/index.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/tabs/tabs.types.d.ts +1 -1
- package/dist/dawn-ui-react.js +1318 -1302
- package/dist/dawn-ui-react.umd.cjs +24 -24
- package/package.json +2 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CodeBlockProps, CodeBlockProviderState } from './code-block.types';
|
|
2
|
+
export declare const CodeBlock: ({ items, defaultValue, className, children, ref, ...props }: CodeBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const useCodeBlock: () => CodeBlockProviderState;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SelectTrigger } from '../select';
|
|
2
|
+
import { Tabs } from '../tabs';
|
|
3
|
+
export type CodeBlockProps = Omit<React.ComponentProps<'div'>, 'defaultValue'> & {
|
|
4
|
+
defaultValue: CodeBlockValue;
|
|
5
|
+
items: CodeBlockValue[];
|
|
6
|
+
};
|
|
7
|
+
export type CodeBlockProviderState = {
|
|
8
|
+
currentValue: CodeBlockValue;
|
|
9
|
+
setCurrentValue: React.Dispatch<React.SetStateAction<CodeBlockValue>>;
|
|
10
|
+
items: CodeBlockValue[];
|
|
11
|
+
};
|
|
12
|
+
export type CodeBlockValue = {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
name: string;
|
|
16
|
+
content: string;
|
|
17
|
+
icon?: React.ReactNode;
|
|
18
|
+
};
|
|
19
|
+
export type CodeBlockTabsProps = React.ComponentProps<typeof Tabs>;
|
|
20
|
+
export type CodeBlockCopyProps = React.ComponentProps<'button'>;
|
|
21
|
+
export type CodeBlockNameProps = React.ComponentProps<'div'>;
|
|
22
|
+
export type CodeBlockSelectProps = React.ComponentProps<typeof SelectTrigger>;
|
|
23
|
+
export type CodeBlockHeaderGroupProps = React.ComponentProps<'div'>;
|
|
24
|
+
export type CodeBlockTitleProps = React.ComponentProps<'div'>;
|
|
25
|
+
export type CodeBlockDownloadProps = React.ComponentProps<'button'>;
|
|
26
|
+
export type CodeBlockActionsProps = React.ComponentProps<'div'>;
|
|
@@ -6,7 +6,7 @@ export type TabsTabProps = ComponentProps<typeof BaseTabs.Tab>;
|
|
|
6
6
|
export type TabsIndicatorProps = ComponentProps<typeof BaseTabs.Indicator>;
|
|
7
7
|
export type TabsListProps = ComponentProps<typeof BaseTabs.List>;
|
|
8
8
|
export declare const tabsVariants: (props?: ({
|
|
9
|
-
variant?: "default" | "underline" | null | undefined;
|
|
9
|
+
variant?: "ghost" | "default" | "underline" | null | undefined;
|
|
10
10
|
fill?: boolean | null | undefined;
|
|
11
11
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
12
|
export type TabsProps = React.ComponentProps<typeof BaseTabs.Root> & VariantProps<typeof tabsVariants>;
|