@selectwin/kit 0.1.127 → 0.1.128
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/SelectCodeBlock.d.ts +20 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +534 -492
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
type SelectCodeBlockOwnProps = {
|
|
3
|
+
/** O texto, cru. */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Uma linha acima do bloco ("Resposta do endpoint"). */
|
|
6
|
+
label?: ReactNode;
|
|
7
|
+
/** Indenta quando o texto é JSON válido; o resto passa como veio. */
|
|
8
|
+
pretty?: boolean;
|
|
9
|
+
/** Altura máxima (rem) antes de rolar. Padrão 14. */
|
|
10
|
+
maxHeight?: number;
|
|
11
|
+
/** Mostra o botão de copiar. Padrão true. */
|
|
12
|
+
copyable?: boolean;
|
|
13
|
+
/** `critical` = o bloco fica sobre um aviso vermelho (a resposta de uma falha). */
|
|
14
|
+
tone?: 'neutral' | 'critical';
|
|
15
|
+
};
|
|
16
|
+
export type SelectCodeBlockProps = SelectCodeBlockOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectCodeBlockOwnProps>;
|
|
17
|
+
/** JSON válido → indentado; qualquer outra coisa → como veio. */
|
|
18
|
+
export declare function prettyCode(raw: string): string;
|
|
19
|
+
export declare const SelectCodeBlock: import('react').ForwardRefExoticComponent<SelectCodeBlockOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectCodeBlockOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
20
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -64,6 +64,8 @@ export { SelectTable, SelectTableRow, SelectTableCell, SelectTableEmpty, SelectU
|
|
|
64
64
|
export { SelectMenu, SelectMenuItem, SelectMenuLink, SelectMenuHeading, SelectMenuDivider, SelectMenuButton } from './SelectMenu';
|
|
65
65
|
export { SelectFilterChip } from './SelectFilterChip';
|
|
66
66
|
export { SelectCopyRow } from './SelectCopyRow';
|
|
67
|
+
export { SelectCodeBlock, prettyCode } from './SelectCodeBlock';
|
|
68
|
+
export type { SelectCodeBlockProps } from './SelectCodeBlock';
|
|
67
69
|
export { SelectCopyableId } from './SelectCopyableId';
|
|
68
70
|
export type { SelectCopyableIdProps } from './SelectCopyableId';
|
|
69
71
|
export { SelectCollapsible } from './SelectCollapsible';
|