@gamecrafters/base-ui 0.0.6 → 0.0.7

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.
Files changed (75) hide show
  1. package/build/components/code/Code.d.ts +7 -0
  2. package/build/components/code/Code.types.d.ts +5 -0
  3. package/build/components/code/index.d.ts +2 -0
  4. package/build/components/code-block/CodeBlock.d.ts +12 -0
  5. package/build/components/code-block/CodeBlock.types.d.ts +40 -0
  6. package/build/components/code-block/CodeBlockCode.d.ts +7 -0
  7. package/build/components/code-block/CodeBlockContent.d.ts +7 -0
  8. package/build/components/code-block/CodeBlockContext.d.ts +2 -0
  9. package/build/components/code-block/CodeBlockHeader.d.ts +7 -0
  10. package/build/components/code-block/CodeBlockTitle.d.ts +7 -0
  11. package/build/components/code-block/highlightCode.d.ts +12 -0
  12. package/build/components/code-block/index.d.ts +38 -0
  13. package/build/components/highlight/Highlight.d.ts +11 -0
  14. package/build/components/highlight/Highlight.types.d.ts +15 -0
  15. package/build/components/highlight/highlightMatches.d.ts +2 -0
  16. package/build/components/highlight/index.d.ts +3 -0
  17. package/build/components/index.d.ts +9 -0
  18. package/build/components/mark/Mark.d.ts +11 -0
  19. package/build/components/mark/Mark.types.d.ts +11 -0
  20. package/build/components/mark/index.d.ts +2 -0
  21. package/build/components/markdown/Markdown.d.ts +10 -0
  22. package/build/components/markdown/Markdown.types.d.ts +17 -0
  23. package/build/components/markdown/MarkdownProse.d.ts +8 -0
  24. package/build/components/markdown/index.d.ts +3 -0
  25. package/build/components/markdown/markdownTheme.d.ts +6 -0
  26. package/build/components/progress-circle/ProgressCircle.d.ts +11 -0
  27. package/build/components/progress-circle/ProgressCircle.types.d.ts +10 -0
  28. package/build/components/progress-circle/index.d.ts +2 -0
  29. package/build/components/rating/Rating.d.ts +18 -0
  30. package/build/components/rating/Rating.types.d.ts +16 -0
  31. package/build/components/rating/index.d.ts +2 -0
  32. package/build/components/rich-text-editor/RichTextEditor.d.ts +15 -0
  33. package/build/components/rich-text-editor/RichTextEditor.types.d.ts +36 -0
  34. package/build/components/rich-text-editor/RichTextEditorContent.d.ts +5 -0
  35. package/build/components/rich-text-editor/RichTextEditorContext.d.ts +2 -0
  36. package/build/components/rich-text-editor/RichTextEditorToolbar.d.ts +8 -0
  37. package/build/components/rich-text-editor/index.d.ts +23 -0
  38. package/build/components/rich-text-editor/richTextEditorTheme.d.ts +4 -0
  39. package/build/components/status/Status.d.ts +11 -0
  40. package/build/components/status/Status.types.d.ts +19 -0
  41. package/build/components/status/StatusContext.d.ts +2 -0
  42. package/build/components/status/StatusIndicator.d.ts +8 -0
  43. package/build/components/status/index.d.ts +17 -0
  44. package/build/hooks/useSlots.d.ts +1 -4
  45. package/build/lib/qr-code/core/data.d.ts +13 -0
  46. package/build/lib/qr-code/core/errors.d.ts +12 -0
  47. package/build/lib/qr-code/core/format.d.ts +12 -0
  48. package/build/lib/qr-code/core/index.d.ts +16 -0
  49. package/build/lib/qr-code/core/mask.d.ts +19 -0
  50. package/build/lib/qr-code/core/matrix.d.ts +17 -0
  51. package/build/lib/qr-code/core/micro.d.ts +16 -0
  52. package/build/lib/qr-code/core/mode.d.ts +31 -0
  53. package/build/lib/qr-code/core/reed-solomon.d.ts +13 -0
  54. package/build/lib/qr-code/core/segment.d.ts +8 -0
  55. package/build/lib/qr-code/core/tables.d.ts +49 -0
  56. package/build/lib/qr-code/core/types.d.ts +36 -0
  57. package/build/lib/qr-code/core/version.d.ts +18 -0
  58. package/build/lib/qr-code/index.d.ts +17 -0
  59. package/build/lib/qr-code/types/index.d.ts +65 -0
  60. package/build/lib/qr-code/utilities/adler32.d.ts +4 -0
  61. package/build/lib/qr-code/utilities/common.d.ts +2 -0
  62. package/build/lib/qr-code/utilities/crc32.d.ts +4 -0
  63. package/build/lib/qr-code/utilities/data-uri.d.ts +6 -0
  64. package/build/lib/qr-code/utilities/deflate.d.ts +6 -0
  65. package/build/lib/qr-code/utilities/gradient.d.ts +10 -0
  66. package/build/lib/qr-code/utilities/ico.d.ts +4 -0
  67. package/build/lib/qr-code/utilities/logo.d.ts +9 -0
  68. package/build/lib/qr-code/utilities/png-encoder.d.ts +5 -0
  69. package/build/lib/qr-code/utilities/shapes.d.ts +7 -0
  70. package/build/lib/qr-code/utilities/svg.d.ts +5 -0
  71. package/build/lib/qr-code/utilities/text.d.ts +11 -0
  72. package/build/main.cjs.js +2 -2
  73. package/build/main.esm.js +2 -2
  74. package/build/styles/main.css +1 -1
  75. package/package.json +11 -1
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ declare const _default: <As extends React.ElementType = "code">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "code" : As> & {
3
+ className?: string;
4
+ }, "as"> & {
5
+ as?: As | undefined;
6
+ } & React.RefAttributes<any>) => React.ReactNode;
7
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import type * as React from "react";
2
+ import type { PolymorphicProps } from "../../utilities/polymorphic";
3
+ export type CodeProps<As extends React.ElementType = "code"> = PolymorphicProps<As, "code", {
4
+ className?: string;
5
+ }>;
@@ -0,0 +1,2 @@
1
+ export { default as Code } from "./Code";
2
+ export * from "./Code.types";
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ declare const _default: <As extends React.ElementType = "div">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "div" : As> & {
3
+ language?: import("./CodeBlock.types").CodeBlockLanguage;
4
+ lightTheme?: import("./CodeBlock.types").CodeBlockTheme;
5
+ darkTheme?: import("./CodeBlock.types").CodeBlockTheme;
6
+ showLineNumbers?: boolean;
7
+ wrap?: import("./CodeBlock.types").CodeBlockWrap;
8
+ className?: string;
9
+ }, "as"> & {
10
+ as?: As | undefined;
11
+ } & React.RefAttributes<any>) => React.ReactNode;
12
+ export default _default;
@@ -0,0 +1,40 @@
1
+ import type * as React from "react";
2
+ import type { BundledLanguage, BundledTheme, SpecialLanguage } from "shiki";
3
+ import type { PolymorphicProps } from "../../utilities/polymorphic";
4
+ export type CodeBlockLanguage = BundledLanguage | SpecialLanguage;
5
+ export type CodeBlockTheme = BundledTheme;
6
+ export type CodeBlockWrap = "wrap" | "nowrap";
7
+ export type CodeBlockToken = {
8
+ content: string;
9
+ style?: Record<string, string>;
10
+ };
11
+ export type CodeBlockLine = CodeBlockToken[];
12
+ export type CodeBlockProps<As extends React.ElementType = "div"> = PolymorphicProps<As, "div", {
13
+ language?: CodeBlockLanguage;
14
+ lightTheme?: CodeBlockTheme;
15
+ darkTheme?: CodeBlockTheme;
16
+ showLineNumbers?: boolean;
17
+ wrap?: CodeBlockWrap;
18
+ className?: string;
19
+ }>;
20
+ export type CodeBlockHeaderProps<As extends React.ElementType = "div"> = PolymorphicProps<As, "div", {
21
+ className?: string;
22
+ }>;
23
+ export type CodeBlockTitleProps<As extends React.ElementType = "span"> = PolymorphicProps<As, "span", {
24
+ className?: string;
25
+ }>;
26
+ export type CodeBlockContentProps<As extends React.ElementType = "div"> = PolymorphicProps<As, "div", {
27
+ className?: string;
28
+ }>;
29
+ export type CodeBlockCodeProps = Omit<React.ComponentPropsWithoutRef<"pre">, "children"> & {
30
+ children?: string;
31
+ language?: CodeBlockLanguage;
32
+ className?: string;
33
+ };
34
+ export type CodeBlockContextValue = {
35
+ language?: CodeBlockLanguage;
36
+ lightTheme?: CodeBlockTheme;
37
+ darkTheme?: CodeBlockTheme;
38
+ showLineNumbers?: boolean;
39
+ wrap?: CodeBlockWrap;
40
+ };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLPreElement>, HTMLPreElement>, "ref">, "children"> & {
3
+ children?: string;
4
+ language?: import("./CodeBlock.types").CodeBlockLanguage;
5
+ className?: string;
6
+ } & React.RefAttributes<any>) => React.ReactNode;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ declare const _default: <As extends React.ElementType = "div">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "div" : As> & {
3
+ className?: string;
4
+ }, "as"> & {
5
+ as?: As | undefined;
6
+ } & React.RefAttributes<any>) => React.ReactNode;
7
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import type { CodeBlockContextValue } from "./CodeBlock.types";
2
+ export declare const CodeBlockContext: import("react").Context<CodeBlockContextValue>;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ declare const _default: <As extends React.ElementType = "div">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "div" : As> & {
3
+ className?: string;
4
+ }, "as"> & {
5
+ as?: As | undefined;
6
+ } & React.RefAttributes<any>) => React.ReactNode;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ declare const _default: <As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "span" : As> & {
3
+ className?: string;
4
+ }, "as"> & {
5
+ as?: As | undefined;
6
+ } & React.RefAttributes<any>) => React.ReactNode;
7
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import type { CodeBlockLanguage, CodeBlockLine, CodeBlockTheme } from "./CodeBlock.types";
2
+ export declare const DEFAULT_LANGUAGE = "text";
3
+ export declare const DEFAULT_LIGHT_THEME = "github-light";
4
+ export declare const DEFAULT_DARK_THEME = "github-dark";
5
+ type HighlightOptions = {
6
+ language: CodeBlockLanguage;
7
+ lightTheme: CodeBlockTheme;
8
+ darkTheme: CodeBlockTheme;
9
+ };
10
+ export declare const toPlainLines: (code: string) => CodeBlockLine[];
11
+ export declare const highlightLines: (code: string, options: HighlightOptions) => Promise<CodeBlockLine[]>;
12
+ export {};
@@ -0,0 +1,38 @@
1
+ import CodeBlockCode from "./CodeBlockCode";
2
+ import CodeBlockContent from "./CodeBlockContent";
3
+ import CodeBlockHeader from "./CodeBlockHeader";
4
+ import CodeBlockTitle from "./CodeBlockTitle";
5
+ export declare const CodeBlock: (<As extends React.ElementType = "div">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "div" : As> & {
6
+ language?: import("./CodeBlock.types").CodeBlockLanguage;
7
+ lightTheme?: import("./CodeBlock.types").CodeBlockTheme;
8
+ darkTheme?: import("./CodeBlock.types").CodeBlockTheme;
9
+ showLineNumbers?: boolean;
10
+ wrap?: import("./CodeBlock.types").CodeBlockWrap;
11
+ className?: string;
12
+ }, "as"> & {
13
+ as?: As | undefined;
14
+ } & import("react").RefAttributes<any>) => React.ReactNode) & {
15
+ Header: <As extends React.ElementType = "div">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "div" : As> & {
16
+ className?: string;
17
+ }, "as"> & {
18
+ as?: As | undefined;
19
+ } & import("react").RefAttributes<any>) => React.ReactNode;
20
+ Title: <As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "span" : As> & {
21
+ className?: string;
22
+ }, "as"> & {
23
+ as?: As | undefined;
24
+ } & import("react").RefAttributes<any>) => React.ReactNode;
25
+ Content: <As extends React.ElementType = "div">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "div" : As> & {
26
+ className?: string;
27
+ }, "as"> & {
28
+ as?: As | undefined;
29
+ } & import("react").RefAttributes<any>) => React.ReactNode;
30
+ Code: (props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLPreElement>, HTMLPreElement>, "ref">, "children"> & {
31
+ children?: string;
32
+ language?: import("./CodeBlock.types").CodeBlockLanguage;
33
+ className?: string;
34
+ } & import("react").RefAttributes<any>) => React.ReactNode;
35
+ };
36
+ export { CodeBlockHeader, CodeBlockTitle, CodeBlockContent, CodeBlockCode };
37
+ export { CodeBlockContext } from "./CodeBlockContext";
38
+ export * from "./CodeBlock.types";
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ declare const _default: <As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "span" : As> & {
3
+ children?: string;
4
+ match?: import("./Highlight.types").HighlightMatch;
5
+ caseSensitive?: boolean;
6
+ variant?: import("..").MarkVariant;
7
+ className?: string;
8
+ }, "as"> & {
9
+ as?: As | undefined;
10
+ } & React.RefAttributes<any>) => React.ReactNode;
11
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import type * as React from "react";
2
+ import type { PolymorphicProps } from "../../utilities/polymorphic";
3
+ import type { MarkVariant } from "../mark";
4
+ export type HighlightMatch = string | string[];
5
+ export type HighlightChunk = {
6
+ text: string;
7
+ matched: boolean;
8
+ };
9
+ export type HighlightProps<As extends React.ElementType = "span"> = PolymorphicProps<As, "span", {
10
+ children?: string;
11
+ match?: HighlightMatch;
12
+ caseSensitive?: boolean;
13
+ variant?: MarkVariant;
14
+ className?: string;
15
+ }>;
@@ -0,0 +1,2 @@
1
+ import type { HighlightChunk, HighlightMatch } from "./Highlight.types";
2
+ export declare const splitHighlightChunks: (text: string, match?: HighlightMatch, caseSensitive?: boolean) => HighlightChunk[];
@@ -0,0 +1,3 @@
1
+ export { default as Highlight } from "./Highlight";
2
+ export { splitHighlightChunks } from "./highlightMatches";
3
+ export * from "./Highlight.types";
@@ -20,6 +20,8 @@ export * from "./carousel";
20
20
  export * from "./chart";
21
21
  export * from "./checkbox";
22
22
  export * from "./checkbox-group";
23
+ export * from "./code";
24
+ export * from "./code-block";
23
25
  export * from "./collapsible";
24
26
  export * from "./command-palette";
25
27
  export * from "./confirmation-dialog";
@@ -35,6 +37,7 @@ export * from "./filtered-action-list";
35
37
  export * from "./form-control";
36
38
  export * from "./heading";
37
39
  export * from "./hidden";
40
+ export * from "./highlight";
38
41
  export * from "./icon-button";
39
42
  export * from "./image";
40
43
  export * from "./inline-message";
@@ -42,6 +45,8 @@ export * from "./keybinding-hint";
42
45
  export * from "./label";
43
46
  export * from "./link";
44
47
  export * from "./link-button";
48
+ export * from "./mark";
49
+ export * from "./markdown";
45
50
  export * from "./nav-list";
46
51
  export * from "./page-content";
47
52
  export * from "./page-footer";
@@ -52,9 +57,12 @@ export * from "./pagination";
52
57
  export * from "./placeholder";
53
58
  export * from "./portal";
54
59
  export * from "./progress-bar";
60
+ export * from "./progress-circle";
55
61
  export * from "./radio";
56
62
  export * from "./radio-group";
63
+ export * from "./rating";
57
64
  export * from "./relative-time";
65
+ export * from "./rich-text-editor";
58
66
  export * from "./scrollable-region";
59
67
  export * from "./segmented-control";
60
68
  export * from "./select";
@@ -67,6 +75,7 @@ export * from "./slider";
67
75
  export * from "./spinner";
68
76
  export * from "./stack";
69
77
  export * from "./state-label";
78
+ export * from "./status";
70
79
  export * from "./tabs";
71
80
  export * from "./text";
72
81
  export * from "./text-input";
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import type { MarkSize, MarkVariant, MarkWeight } from "./Mark.types";
3
+ declare const _default: <As extends React.ElementType = "mark">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "mark" : As> & {
4
+ variant?: MarkVariant;
5
+ size?: MarkSize;
6
+ weight?: MarkWeight;
7
+ className?: string;
8
+ }, "as"> & {
9
+ as?: As | undefined;
10
+ } & React.RefAttributes<any>) => React.ReactNode;
11
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import type * as React from "react";
2
+ import type { PolymorphicProps } from "../../utilities/polymorphic";
3
+ export type MarkVariant = "attention" | "accent" | "success" | "danger" | "neutral";
4
+ export type MarkSize = "large" | "medium" | "small";
5
+ export type MarkWeight = "light" | "normal" | "medium" | "semibold";
6
+ export type MarkProps<As extends React.ElementType = "mark"> = PolymorphicProps<As, "mark", {
7
+ variant?: MarkVariant;
8
+ size?: MarkSize;
9
+ weight?: MarkWeight;
10
+ className?: string;
11
+ }>;
@@ -0,0 +1,2 @@
1
+ export { default as Mark } from "./Mark";
2
+ export * from "./Mark.types";
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & {
3
+ children?: string;
4
+ transformers?: import("@lexical/markdown").Transformer[];
5
+ preserveNewLines?: boolean;
6
+ namespace?: string;
7
+ onError?: (error: Error, editor: import("lexical").LexicalEditor) => void;
8
+ className?: string;
9
+ } & React.RefAttributes<any>) => React.ReactNode;
10
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import type * as React from "react";
2
+ import type { Transformer } from "@lexical/markdown";
3
+ import type { LexicalEditor } from "lexical";
4
+ export type MarkdownProps = Omit<React.ComponentPropsWithoutRef<"div">, "children"> & {
5
+ children?: string;
6
+ transformers?: Transformer[];
7
+ preserveNewLines?: boolean;
8
+ namespace?: string;
9
+ onError?: (error: Error, editor: LexicalEditor) => void;
10
+ className?: string;
11
+ };
12
+ export type MarkdownProseProps = Omit<React.ComponentPropsWithoutRef<"div">, "children"> & {
13
+ source: string;
14
+ transformers: Transformer[];
15
+ preserveNewLines?: boolean;
16
+ className?: string;
17
+ };
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & {
3
+ source: string;
4
+ transformers: import("@lexical/markdown").Transformer[];
5
+ preserveNewLines?: boolean;
6
+ className?: string;
7
+ } & React.RefAttributes<any>) => React.ReactNode;
8
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export { default as Markdown } from "./Markdown";
2
+ export { DEFAULT_MARKDOWN_NAMESPACE, markdownTheme, MARKDOWN_NODES, MARKDOWN_TRANSFORMERS, } from "./markdownTheme";
3
+ export * from "./Markdown.types";
@@ -0,0 +1,6 @@
1
+ import type { Transformer } from "@lexical/markdown";
2
+ import type { EditorThemeClasses, Klass, LexicalNode } from "lexical";
3
+ export declare const DEFAULT_MARKDOWN_NAMESPACE = "Markdown";
4
+ export declare const MARKDOWN_NODES: readonly Klass<LexicalNode>[];
5
+ export declare const MARKDOWN_TRANSFORMERS: Transformer[];
6
+ export declare const markdownTheme: EditorThemeClasses;
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import type { ProgressCircleSize, ProgressCircleVariant } from "./ProgressCircle.types";
3
+ declare const _default: <As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "span" : As> & {
4
+ progress?: number;
5
+ size?: ProgressCircleSize;
6
+ variant?: ProgressCircleVariant;
7
+ className?: string;
8
+ }, "as"> & {
9
+ as?: As | undefined;
10
+ } & React.RefAttributes<any>) => React.ReactNode;
11
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import type * as React from "react";
2
+ import type { PolymorphicProps } from "../../utilities/polymorphic";
3
+ export type ProgressCircleSize = "small" | "medium" | "large";
4
+ export type ProgressCircleVariant = "accent" | "attention" | "danger" | "done" | "neutral" | "severe" | "sponsors" | "success";
5
+ export type ProgressCircleProps<As extends React.ElementType = "span"> = PolymorphicProps<As, "span", {
6
+ progress?: number;
7
+ size?: ProgressCircleSize;
8
+ variant?: ProgressCircleVariant;
9
+ className?: string;
10
+ }>;
@@ -0,0 +1,2 @@
1
+ export { default as ProgressCircle } from "./ProgressCircle";
2
+ export * from "./ProgressCircle.types";
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ import type { RatingSize } from "./Rating.types";
3
+ export declare const DEFAULT_RATING_COUNT = 5;
4
+ declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "onChange" | "defaultValue"> & {
5
+ count?: number;
6
+ value?: number;
7
+ defaultValue?: number;
8
+ size?: RatingSize;
9
+ readOnly?: boolean;
10
+ disabled?: boolean;
11
+ clearable?: boolean;
12
+ name?: string;
13
+ onChange?: (value: number) => void;
14
+ itemLabel?: (value: number, count: number) => string;
15
+ valueLabel?: (value: number, count: number) => string;
16
+ className?: string;
17
+ } & React.RefAttributes<any>) => React.ReactNode;
18
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import type * as React from "react";
2
+ export type RatingSize = "small" | "medium" | "large";
3
+ export type RatingProps = Omit<React.ComponentPropsWithoutRef<"span">, "onChange" | "defaultValue"> & {
4
+ count?: number;
5
+ value?: number;
6
+ defaultValue?: number;
7
+ size?: RatingSize;
8
+ readOnly?: boolean;
9
+ disabled?: boolean;
10
+ clearable?: boolean;
11
+ name?: string;
12
+ onChange?: (value: number) => void;
13
+ itemLabel?: (value: number, count: number) => string;
14
+ valueLabel?: (value: number, count: number) => string;
15
+ className?: string;
16
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Rating, DEFAULT_RATING_COUNT } from "./Rating";
2
+ export * from "./Rating.types";
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import type { LexicalEditor } from "lexical";
3
+ declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onChange"> & {
4
+ defaultValue?: import("@lexical/react/LexicalComposer").InitialEditorStateType;
5
+ onChange?: (editorState: import("lexical").EditorState, editor: LexicalEditor) => void;
6
+ placeholder?: string;
7
+ readOnly?: boolean;
8
+ nodes?: readonly (import("lexical").Klass<import("lexical").LexicalNode> | import("lexical").LexicalNodeReplacement)[];
9
+ namespace?: string;
10
+ onError?: (error: Error, editor: LexicalEditor) => void;
11
+ minHeight?: number;
12
+ maxHeight?: number;
13
+ className?: string;
14
+ } & React.RefAttributes<any>) => React.ReactNode;
15
+ export default _default;
@@ -0,0 +1,36 @@
1
+ import type * as React from "react";
2
+ import type { InitialEditorStateType } from "@lexical/react/LexicalComposer";
3
+ import type { EditorState, Klass, LexicalEditor, LexicalNode, LexicalNodeReplacement } from "lexical";
4
+ export type RichTextEditorControl = "history" | "inline" | "block" | "list" | "link";
5
+ export type RichTextEditorBlockType = "paragraph" | "h1" | "h2" | "h3" | "quote" | "bullet" | "number";
6
+ export type RichTextEditorTextFormat = "bold" | "italic" | "underline" | "strikethrough" | "code";
7
+ export type RichTextEditorProps = Omit<React.ComponentPropsWithoutRef<"div">, "onChange"> & {
8
+ defaultValue?: InitialEditorStateType;
9
+ onChange?: (editorState: EditorState, editor: LexicalEditor) => void;
10
+ placeholder?: string;
11
+ readOnly?: boolean;
12
+ nodes?: readonly (Klass<LexicalNode> | LexicalNodeReplacement)[];
13
+ namespace?: string;
14
+ onError?: (error: Error, editor: LexicalEditor) => void;
15
+ minHeight?: number;
16
+ maxHeight?: number;
17
+ className?: string;
18
+ };
19
+ export type RichTextEditorToolbarProps = React.ComponentPropsWithoutRef<"div"> & {
20
+ controls?: readonly RichTextEditorControl[];
21
+ children?: React.ReactNode;
22
+ "aria-label"?: string;
23
+ className?: string;
24
+ };
25
+ export type RichTextEditorContentProps = Omit<React.ComponentPropsWithoutRef<"div">, "children" | "placeholder" | "aria-placeholder"> & {
26
+ className?: string;
27
+ };
28
+ export type RichTextEditorContextValue = {
29
+ readOnly?: boolean;
30
+ placeholder?: string;
31
+ minHeight?: number;
32
+ maxHeight?: number;
33
+ ariaLabel?: string;
34
+ ariaLabelledBy?: string;
35
+ ariaDescribedBy?: string;
36
+ };
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "aria-placeholder" | "children" | "placeholder"> & {
3
+ className?: string;
4
+ } & React.RefAttributes<any>) => React.ReactNode;
5
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import type { RichTextEditorContextValue } from "./RichTextEditor.types";
2
+ export declare const RichTextEditorContext: import("react").Context<RichTextEditorContextValue>;
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import type { RichTextEditorControl, RichTextEditorToolbarProps } from "./RichTextEditor.types";
3
+ export declare const DEFAULT_RICH_TEXT_EDITOR_CONTROLS: readonly RichTextEditorControl[];
4
+ declare function RichTextEditorToolbar(props: RichTextEditorToolbarProps): React.JSX.Element;
5
+ declare namespace RichTextEditorToolbar {
6
+ var displayName: string;
7
+ }
8
+ export default RichTextEditorToolbar;
@@ -0,0 +1,23 @@
1
+ import RichTextEditorContent from "./RichTextEditorContent";
2
+ import RichTextEditorToolbar from "./RichTextEditorToolbar";
3
+ export declare const RichTextEditor: ((props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onChange"> & {
4
+ defaultValue?: import("@lexical/react/LexicalComposer").InitialEditorStateType;
5
+ onChange?: (editorState: import("lexical").EditorState, editor: import("lexical").LexicalEditor) => void;
6
+ placeholder?: string;
7
+ readOnly?: boolean;
8
+ nodes?: readonly (import("lexical").Klass<import("lexical").LexicalNode> | import("lexical").LexicalNodeReplacement)[];
9
+ namespace?: string;
10
+ onError?: (error: Error, editor: import("lexical").LexicalEditor) => void;
11
+ minHeight?: number;
12
+ maxHeight?: number;
13
+ className?: string;
14
+ } & import("react").RefAttributes<any>) => React.ReactNode) & {
15
+ Toolbar: typeof RichTextEditorToolbar;
16
+ Content: (props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "aria-placeholder" | "children" | "placeholder"> & {
17
+ className?: string;
18
+ } & import("react").RefAttributes<any>) => React.ReactNode;
19
+ };
20
+ export { RichTextEditorToolbar, RichTextEditorContent };
21
+ export { DEFAULT_RICH_TEXT_EDITOR_CONTROLS } from "./RichTextEditorToolbar";
22
+ export { DEFAULT_RICH_TEXT_EDITOR_NAMESPACE, RICH_TEXT_EDITOR_NODES, richTextEditorTheme, } from "./richTextEditorTheme";
23
+ export * from "./RichTextEditor.types";
@@ -0,0 +1,4 @@
1
+ import type { EditorThemeClasses, Klass, LexicalNode } from "lexical";
2
+ export declare const DEFAULT_RICH_TEXT_EDITOR_NAMESPACE = "RichTextEditor";
3
+ export declare const RICH_TEXT_EDITOR_NODES: readonly Klass<LexicalNode>[];
4
+ export declare const richTextEditorTheme: EditorThemeClasses;
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import type { StatusSize, StatusVariant } from "./Status.types";
3
+ declare const _default: <As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "span" : As> & {
4
+ variant?: StatusVariant;
5
+ size?: StatusSize;
6
+ srText?: string;
7
+ className?: string;
8
+ }, "as"> & {
9
+ as?: As | undefined;
10
+ } & React.RefAttributes<any>) => React.ReactNode;
11
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import type * as React from "react";
2
+ import type { PolymorphicProps } from "../../utilities/polymorphic";
3
+ export type StatusVariant = "accent" | "success" | "attention" | "severe" | "danger" | "done" | "neutral";
4
+ export type StatusSize = "small" | "medium" | "large";
5
+ export type StatusProps<As extends React.ElementType = "span"> = PolymorphicProps<As, "span", {
6
+ variant?: StatusVariant;
7
+ size?: StatusSize;
8
+ srText?: string;
9
+ className?: string;
10
+ }>;
11
+ export type StatusIndicatorProps = React.ComponentPropsWithoutRef<"span"> & {
12
+ variant?: StatusVariant;
13
+ size?: StatusSize;
14
+ className?: string;
15
+ };
16
+ export type StatusContextValue = {
17
+ variant?: StatusVariant;
18
+ size?: StatusSize;
19
+ };
@@ -0,0 +1,2 @@
1
+ import type { StatusContextValue } from "./Status.types";
2
+ export declare const StatusContext: import("react").Context<StatusContextValue>;
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import type { StatusSize, StatusVariant } from "./Status.types";
3
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
4
+ variant?: StatusVariant;
5
+ size?: StatusSize;
6
+ className?: string;
7
+ } & React.RefAttributes<any>) => React.ReactNode;
8
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import StatusIndicator from "./StatusIndicator";
2
+ export declare const Status: (<As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "span" : As> & {
3
+ variant?: import("./Status.types").StatusVariant;
4
+ size?: import("./Status.types").StatusSize;
5
+ srText?: string;
6
+ className?: string;
7
+ }, "as"> & {
8
+ as?: As | undefined;
9
+ } & import("react").RefAttributes<any>) => React.ReactNode) & {
10
+ Indicator: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
11
+ variant?: import("./Status.types").StatusVariant;
12
+ size?: import("./Status.types").StatusSize;
13
+ className?: string;
14
+ } & import("react").RefAttributes<any>) => React.ReactNode;
15
+ };
16
+ export { StatusIndicator };
17
+ export * from "./Status.types";
@@ -6,9 +6,6 @@ export type SlotConfig = Record<string, ComponentMatcher | ComponentAndPropsMatc
6
6
  type SlotElements<Config extends SlotConfig> = {
7
7
  [Property in keyof Config]: SlotValue<Config, Property>;
8
8
  };
9
- type SlotValue<Config, Property extends keyof Config> = Config[Property] extends React.ElementType ? React.ReactElement<React.ComponentPropsWithoutRef<Config[Property]>, Config[Property]> : Config[Property] extends readonly [
10
- infer ElementType extends React.ElementType,
11
- infer _testFn
12
- ] ? React.ReactElement<React.ComponentPropsWithoutRef<ElementType>, ElementType> : never;
9
+ type SlotValue<Config, Property extends keyof Config> = Config[Property] extends React.ElementType ? React.ReactElement<React.ComponentPropsWithoutRef<Config[Property]>, Config[Property]> : Config[Property] extends readonly [infer ElementType extends React.ElementType, infer _testFn] ? React.ReactElement<React.ComponentPropsWithoutRef<ElementType>, ElementType> : never;
13
10
  export declare const useSlots: <Config extends SlotConfig>(children: React.ReactNode, config: Config) => [Partial<SlotElements<Config>>, React.ReactNode[]];
14
11
  export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * QR Code data encoding and bitstream construction
3
+ */
4
+ import type { ErrorCorrectionLevel, QRCodeOptions } from "./types";
5
+ export interface EncodedData {
6
+ version: number;
7
+ ecLevel: ErrorCorrectionLevel;
8
+ bits: number[];
9
+ }
10
+ /**
11
+ * Encode text into QR code data bits with error correction
12
+ */
13
+ export declare function encodeData(text: string, options?: QRCodeOptions): EncodedData;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Custom error classes for qr-code
3
+ */
4
+ export declare class QRCodeError extends Error {
5
+ name: string;
6
+ }
7
+ export declare class InvalidInputError extends QRCodeError {
8
+ name: string;
9
+ }
10
+ export declare class CapacityError extends QRCodeError {
11
+ name: string;
12
+ }