@moondreamsdev/dreamer-ui 1.7.10-test.99 → 1.7.12

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 (111) hide show
  1. package/README.md +2 -11
  2. package/dist/Toast-DUpf_XxS.js +754 -0
  3. package/dist/Toast-DUpf_XxS.js.map +1 -0
  4. package/dist/Toast-Dj3X8g0Q.cjs +2 -0
  5. package/dist/Toast-Dj3X8g0Q.cjs.map +1 -0
  6. package/dist/Window-U9c7lCJ4.cjs +2 -0
  7. package/dist/Window-U9c7lCJ4.cjs.map +1 -0
  8. package/dist/{Window-uX5BuBwi.js → Window-bavT8vOT.js} +141 -21
  9. package/dist/Window-bavT8vOT.js.map +1 -0
  10. package/dist/components.cjs.js +2 -2
  11. package/dist/components.cjs.js.map +1 -1
  12. package/dist/components.esm.js +4250 -2867
  13. package/dist/components.esm.js.map +1 -1
  14. package/dist/hooks.cjs.js +1 -1
  15. package/dist/hooks.esm.js +6 -4
  16. package/dist/hooks.esm.js.map +1 -1
  17. package/dist/providers.cjs.js +1 -1
  18. package/dist/providers.esm.js +2 -2
  19. package/dist/src/components/accordion/Accordion.d.ts +36 -0
  20. package/dist/src/components/accordion/AccordionItem.d.ts +20 -0
  21. package/dist/src/components/actionmodal/ActionModal.d.ts +34 -0
  22. package/dist/src/components/avatar/Avatar.d.ts +24 -8
  23. package/dist/src/components/badge/Badge.d.ts +24 -2
  24. package/dist/src/components/button/Button.d.ts +22 -1
  25. package/dist/src/components/button/LoadingDots.d.ts +9 -0
  26. package/dist/src/components/button/variants.d.ts +4 -1
  27. package/dist/src/components/calendar/Calendar.d.ts +105 -0
  28. package/dist/src/components/calendar/hooks.d.ts +40 -0
  29. package/dist/src/components/calendar/index.d.ts +2 -0
  30. package/dist/src/components/calendar/variants.d.ts +41 -0
  31. package/dist/src/components/callout/Callout.d.ts +31 -10
  32. package/dist/src/components/card/Card.d.ts +29 -7
  33. package/dist/src/components/carousel/Carousel.d.ts +24 -1
  34. package/dist/src/components/checkbox/Checkbox.d.ts +37 -1
  35. package/dist/src/components/clickable/Clickable.d.ts +28 -0
  36. package/dist/src/components/code/Code.d.ts +18 -0
  37. package/dist/src/components/code-block/CodeBlock.d.ts +35 -10
  38. package/dist/src/components/code-block/classes.d.ts +2 -1
  39. package/dist/src/components/code-block/format.d.ts +2 -1
  40. package/dist/src/components/code-block/index.d.ts +1 -1
  41. package/dist/src/components/code-block/tokenize.d.ts +6 -2
  42. package/dist/src/components/code-block/types.d.ts +24 -1
  43. package/dist/src/components/disclosure/Disclosure.d.ts +30 -9
  44. package/dist/src/components/drawer/Drawer.d.ts +35 -10
  45. package/dist/src/components/dropdown-menu/DropdownMenu.d.ts +34 -0
  46. package/dist/src/components/dynamic-list/DynamicList.d.ts +68 -0
  47. package/dist/src/components/dynamic-list/hooks.d.ts +19 -0
  48. package/dist/src/components/dynamic-list/index.d.ts +2 -0
  49. package/dist/src/components/dynamic-list/markers.d.ts +8 -0
  50. package/dist/src/components/dynamic-list/variants.d.ts +4 -0
  51. package/dist/src/components/error-boundary/ErrorBoundary.d.ts +32 -9
  52. package/dist/src/components/form/Form.d.ts +28 -0
  53. package/dist/src/components/form/factories.d.ts +8 -0
  54. package/dist/src/components/form/hooks.d.ts +9 -0
  55. package/dist/src/components/form/index.d.ts +3 -0
  56. package/dist/src/components/form/types.d.ts +91 -0
  57. package/dist/src/components/form/variants.d.ts +32 -0
  58. package/dist/src/components/help-icon/HelpIcon.d.ts +48 -0
  59. package/dist/src/components/help-icon/index.d.ts +1 -0
  60. package/dist/src/components/index.d.ts +5 -1
  61. package/dist/src/components/input/Input.d.ts +30 -0
  62. package/dist/src/components/input/variants.d.ts +2 -0
  63. package/dist/src/components/label/Label.d.ts +33 -0
  64. package/dist/src/components/modal/Modal.d.ts +47 -1
  65. package/dist/src/components/pagination/Pagination.d.ts +36 -4
  66. package/dist/src/components/popover/Popover.d.ts +53 -3
  67. package/dist/src/components/radiogroup/RadioGroup.d.ts +33 -0
  68. package/dist/src/components/radiogroup/RadioGroupItem.d.ts +9 -0
  69. package/dist/src/components/scroll-area/ScrollArea.d.ts +25 -0
  70. package/dist/src/components/select/Select.d.ts +49 -0
  71. package/dist/src/components/separator/Separator.d.ts +23 -5
  72. package/dist/src/components/skeleton/Skeleton.d.ts +22 -2
  73. package/dist/src/components/skeleton/variants.d.ts +2 -0
  74. package/dist/src/components/slider/Slider.d.ts +46 -10
  75. package/dist/src/components/table/Table.d.ts +96 -0
  76. package/dist/src/components/table/hooks.d.ts +28 -0
  77. package/dist/src/components/table/index.d.ts +2 -0
  78. package/dist/src/components/table/variants.d.ts +14 -0
  79. package/dist/src/components/tabs/Tabs.d.ts +34 -9
  80. package/dist/src/components/textarea/Textarea.d.ts +37 -0
  81. package/dist/src/components/textarea/variants.d.ts +2 -0
  82. package/dist/src/components/toast/Toast.d.ts +39 -0
  83. package/dist/src/components/toggle/Toggle.d.ts +29 -0
  84. package/dist/src/components/tooltip/Tooltip.d.ts +42 -1
  85. package/dist/src/hooks/index.d.ts +1 -0
  86. package/dist/src/{components/carousel → hooks}/useScreenSize.d.ts +4 -4
  87. package/dist/src/symbols/ChevronUp.d.ts +2 -0
  88. package/dist/src/symbols/GripVertical.d.ts +2 -0
  89. package/dist/src/symbols/InfoCircledFilled.d.ts +2 -0
  90. package/dist/src/symbols/Plus.d.ts +2 -0
  91. package/dist/src/symbols/Trash.d.ts +2 -0
  92. package/dist/src/symbols/index.d.ts +5 -0
  93. package/dist/src/symbols/props.d.ts +2 -2
  94. package/dist/symbols.cjs.js +1 -1
  95. package/dist/symbols.esm.js +21 -16
  96. package/dist/theme.css +4 -1
  97. package/dist/useScreenSize-DiuQZBHb.js +32 -0
  98. package/dist/useScreenSize-DiuQZBHb.js.map +1 -0
  99. package/dist/useScreenSize-UGyolnfn.cjs +2 -0
  100. package/dist/useScreenSize-UGyolnfn.cjs.map +1 -0
  101. package/package.json +5 -1
  102. package/dist/Toast-CRG3g8vr.js +0 -512
  103. package/dist/Toast-CRG3g8vr.js.map +0 -1
  104. package/dist/Toast-wRAL8PRi.cjs +0 -2
  105. package/dist/Toast-wRAL8PRi.cjs.map +0 -1
  106. package/dist/Window-5IZnBJt9.cjs +0 -2
  107. package/dist/Window-5IZnBJt9.cjs.map +0 -1
  108. package/dist/Window-uX5BuBwi.js.map +0 -1
  109. package/dist/src/components/slot/Slot.d.ts +0 -7
  110. package/dist/src/components/slot/index.d.ts +0 -1
  111. package/dist/src/components/tooltip/hooks.d.ts +0 -31
@@ -1,21 +1,21 @@
1
1
  /// <reference types="react" />
2
2
  import { CardSize } from './variants';
3
3
  export interface CardProps {
4
- /** Unique identifier for the card */
4
+ /** The HTML id attribute for the card */
5
5
  id?: string;
6
- /** Custom CSS classes */
6
+ /** Additional CSS classes to apply to the card */
7
7
  className?: string;
8
8
  /** React ref for the card container */
9
9
  ref?: React.Ref<HTMLDivElement>;
10
- /** Card size variant. Affects text styles and internal padding. */
10
+ /** The size variant of the card */
11
11
  size?: CardSize;
12
- /** Padding in pixels (defaults to 16). Used for card itself and spacing between its content within the card. */
12
+ /** The amount of padding inside the card */
13
13
  padding?: number;
14
- /** Card header content */
14
+ /** Content to display in the card header */
15
15
  header?: React.ReactNode;
16
- /** Card footer content */
16
+ /** Content to display in the card footer */
17
17
  footer?: React.ReactNode;
18
- /** Main card content */
18
+ /** The main content of the card */
19
19
  children?: React.ReactNode;
20
20
  /** Image source for the card */
21
21
  imageSrc?: string;
@@ -26,4 +26,26 @@ export interface CardProps {
26
26
  /** If true, the image will extend to the edges of the card, ignoring padding. Default is false. */
27
27
  imageToEdge?: boolean;
28
28
  }
29
+ /**
30
+ * A flexible container component for displaying content in a structured format.
31
+ * Supports headers, footers, images, and customizable padding with responsive design.
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * // Simple card
36
+ * <Card header="Card Title" size="lg">
37
+ * <p>Your content goes here</p>
38
+ * </Card>
39
+ *
40
+ * // Card with image and footer
41
+ * <Card
42
+ * imageSrc="/photo.jpg"
43
+ * imageAlt="Product photo"
44
+ * header={<h3>Product Name</h3>}
45
+ * footer={<Button>Buy Now</Button>}
46
+ * >
47
+ * Product description text here.
48
+ * </Card>
49
+ * ```
50
+ */
29
51
  export declare function Card({ id, className, ref, size, padding, header, footer, children, imageSrc, imageAlt, imageComponent, imageToEdge, ...props }: CardProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { ScreenSize } from './useScreenSize';
3
2
  import { ButtonPosition, ButtonSize, ButtonStyle } from './variants';
3
+ import { ScreenSize } from '../../hooks';
4
4
  export interface CarouselProps {
5
5
  children: React.ReactNode;
6
6
  id?: string;
@@ -43,4 +43,27 @@ export interface CarouselProps {
43
43
  /** Gap between carousel items in pixels */
44
44
  gap?: number;
45
45
  }
46
+ /**
47
+ * A responsive carousel component for displaying multiple items in a sliding interface.
48
+ * Supports auto-scroll, infinite looping, responsive breakpoints, and extensive customization.
49
+ *
50
+ * @example
51
+ * ```tsx
52
+ * // Basic carousel
53
+ * <Carousel itemsToShow={3} autoScroll infinite>
54
+ * <div>Slide 1</div>
55
+ * <div>Slide 2</div>
56
+ * <div>Slide 3</div>
57
+ * </Carousel>
58
+ *
59
+ * // Responsive carousel with breakpoints
60
+ * <Carousel
61
+ * itemsToShow={{ xs: 1, md: 2, lg: 3 }}
62
+ * gap={16}
63
+ * buttonPosition="aligned"
64
+ * >
65
+ * {products.map(product => <ProductCard key={product.id} {...product} />)}
66
+ * </Carousel>
67
+ * ```
68
+ */
46
69
  export declare function Carousel({ children, id, ref, className, autoScroll, scrollInterval, pauseScrollOnHover, currentIndex, onIndexChange, hidePrevNext, hideDots, itemsToShow, buttonSize, buttonVariant, buttonPosition, infinite, prevButton, nextButton, itemsClassName, containerClassName, dotsClassName, gap, }: CarouselProps): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,47 @@
1
1
  import React, { Ref } from 'react';
2
2
  export interface CheckboxProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
+ /** Reference to the checkbox element. */
3
4
  ref?: Ref<HTMLButtonElement>;
5
+ /** The size of the checkbox in pixels. */
4
6
  size?: number;
7
+ /** CSS color value or Tailwind class for the checkbox color. */
5
8
  color?: string;
9
+ /** Whether to fill the checkbox background when checked. */
6
10
  filled?: boolean;
11
+ /** Whether the checkbox should have rounded corners. */
7
12
  rounded?: boolean;
13
+ /** Whether the checkbox is checked (controlled). */
8
14
  checked?: boolean;
15
+ /** Whether the checkbox is in an indeterminate state. */
16
+ indeterminate?: boolean;
17
+ /** Callback fired when the checkbox state changes. */
9
18
  onCheckedChange?: (checked: boolean) => void;
19
+ /** The display style of the checkbox. */
20
+ display?: 'inline' | 'block';
10
21
  }
11
- export declare function Checkbox({ ref, id, size, color, filled, rounded, checked, onCheckedChange, disabled, className, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
22
+ /**
23
+ * A customizable checkbox component with support for checked, unchecked, and indeterminate states.
24
+ * Provides keyboard navigation and accessibility features with flexible styling options.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * // Basic checkbox
29
+ * <Checkbox
30
+ * checked={isChecked}
31
+ * onCheckedChange={setIsChecked}
32
+ * />
33
+ *
34
+ * // Styled checkbox
35
+ * <Checkbox
36
+ * size={24}
37
+ * color="blue"
38
+ * filled
39
+ * rounded={false}
40
+ * onCheckedChange={(checked) => console.log(checked)}
41
+ * />
42
+ *
43
+ * // Indeterminate state
44
+ * <Checkbox indeterminate onCheckedChange={handleSelection} />
45
+ * ```
46
+ */
47
+ export declare function Checkbox({ ref, id, size, color, filled, rounded, checked, indeterminate, onCheckedChange, disabled, className, display, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,37 @@
1
1
  /// <reference types="react" />
2
2
  export interface ClickableProps extends Omit<React.HTMLProps<HTMLDivElement>, 'onClick'> {
3
+ /** The content to make clickable. */
3
4
  children: React.ReactNode;
5
+ /** URL for link functionality. When provided, renders an anchor element. */
4
6
  linkTo?: React.HTMLProps<HTMLAnchorElement>['href'];
7
+ /** Additional props to pass to the anchor element when using linkTo. */
5
8
  linkProps?: Omit<React.HTMLProps<HTMLAnchorElement>, 'href'>;
9
+ /** Click handler for button functionality. Ignored when linkTo is provided. */
6
10
  onButtonClick?: React.HTMLProps<HTMLButtonElement>['onClick'];
11
+ /** Additional props to pass to the button element when using onButtonClick. */
7
12
  buttonProps?: Omit<React.HTMLProps<HTMLButtonElement>, 'onClick'>;
8
13
  }
14
+ /**
15
+ * A wrapper component that makes any content clickable by overlaying an invisible button or link.
16
+ * Preserves the visual layout while adding interaction behavior.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * // Make a card clickable as a link
21
+ * <Clickable linkTo="/product/123">
22
+ * <Card>
23
+ * <h3>Product Title</h3>
24
+ * <p>Product description</p>
25
+ * </Card>
26
+ * </Clickable>
27
+ *
28
+ * // Make content clickable as a button
29
+ * <Clickable onButtonClick={() => openModal()}>
30
+ * <div className="flex items-center gap-2">
31
+ * <Icon />
32
+ * <span>Click me</span>
33
+ * </div>
34
+ * </Clickable>
35
+ * ```
36
+ */
9
37
  export declare function Clickable({ children, className, linkTo, linkProps, onButtonClick, buttonProps, ...props }: ClickableProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,27 @@
1
1
  import React from 'react';
2
2
  import { CodeVariant } from './variants';
3
3
  export interface CodeProps extends Omit<React.HTMLAttributes<HTMLElement>, 'children'> {
4
+ /** Unique identifier for the code element. */
4
5
  id?: string;
6
+ /** Reference to the code element. */
5
7
  ref?: React.Ref<HTMLElement>;
8
+ /** The code content to display. */
6
9
  content: string;
10
+ /** The visual style variant of the code. */
7
11
  variant?: CodeVariant;
8
12
  }
13
+ /**
14
+ * An inline code component for displaying short code snippets within text.
15
+ * Automatically adjusts font metrics and provides different visual variants.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * // Basic inline code
20
+ * <p>Use the <Code content="useState" /> hook for state management.</p>
21
+ *
22
+ * // Different variants
23
+ * <Code content="const foo = 'bar'" variant="muted" />
24
+ * <Code content="npm install react" variant="accent" />
25
+ * ```
26
+ */
9
27
  export declare function Code({ id, ref, content, variant, className, style, ...props }: CodeProps): import("react/jsx-runtime").JSX.Element;
@@ -1,28 +1,28 @@
1
1
  /// <reference types="react" />
2
2
  import { TokenClasses } from './types';
3
- export type CodeBlockLanguages = 'typescript' | 'ts' | 'tsx' | 'json' | 'bash' | 'sh' | 'css';
3
+ export type CodeBlockLanguages = 'typescript' | 'ts' | 'tsx' | 'json' | 'bash' | 'sh' | 'css' | 'markdown' | 'md';
4
4
  export interface CodeBlockProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
5
5
  /** The code content to display */
6
6
  code: string;
7
- /** Programming language for syntax highlighting (TS/TSX/JSON supported) */
7
+ /** Programming language for syntax highlighting */
8
8
  language?: CodeBlockLanguages;
9
- /** Whether to show copy button */
9
+ /** Enable copy to clipboard functionality */
10
10
  allowCopy?: boolean;
11
- /** Whether to show download button */
11
+ /** Enable download as file functionality */
12
12
  allowDownload?: boolean;
13
- /** Whether to allow fullscreen mode */
13
+ /** Enable fullscreen viewing mode */
14
14
  allowFullscreen?: boolean;
15
- /** Optional filename to display in header */
15
+ /** Optional filename to display in the header */
16
16
  filename?: string;
17
- /** Whether to show macOS-style traffic light buttons */
17
+ /** Show macOS-style traffic light buttons in header */
18
18
  showTrafficLights?: boolean;
19
- /** Whether to show line numbers */
19
+ /** Whether to show line numbers on the left side */
20
20
  showLineNumbers?: boolean;
21
- /** Whether to hide the header bar (buttons will appear in top-right corner) */
21
+ /** Hide the header completely for a minimal appearance */
22
22
  hideHeader?: boolean;
23
23
  /** Whether to hide the file type label */
24
24
  hideFiletype?: boolean;
25
- /** Maximum height in pixels before scrolling */
25
+ /** Maximum height in pixels before showing scroll */
26
26
  maxHeight?: number;
27
27
  /** Custom token classes for syntax highlighting */
28
28
  tokenClasses?: TokenClasses;
@@ -33,4 +33,29 @@ export interface CodeBlockProps extends Omit<React.HTMLAttributes<HTMLDivElement
33
33
  /** Ref to the container element */
34
34
  ref?: React.Ref<HTMLDivElement>;
35
35
  }
36
+ /**
37
+ * A feature-rich code block component with syntax highlighting, copy functionality,
38
+ * download options, and fullscreen viewing. Supports multiple programming languages.
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * // Basic code block
43
+ * <CodeBlock
44
+ * code="const greeting = 'Hello World';"
45
+ * language="typescript"
46
+ * filename="example.ts"
47
+ * />
48
+ *
49
+ * // Full-featured block
50
+ * <CodeBlock
51
+ * code={jsonData}
52
+ * language="json"
53
+ * allowCopy
54
+ * allowDownload
55
+ * allowFullscreen
56
+ * showLineNumbers
57
+ * maxHeight={400}
58
+ * />
59
+ * ```
60
+ */
36
61
  export declare function CodeBlock({ code, language, allowCopy, allowDownload, allowFullscreen, filename, showTrafficLights, showLineNumbers, hideHeader, hideFiletype, maxHeight, tokenClasses: customTokenClasses, className, id, ref, ...props }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
- import { BashTokenClasses, CSSTokenClasses, JsonTokenClasses, TSTokenClasses } from './types';
1
+ import { BashTokenClasses, CSSTokenClasses, JsonTokenClasses, MarkdownTokenClasses, TSTokenClasses } from './types';
2
2
  export declare const defaultBashTokenClasses: BashTokenClasses;
3
3
  export declare const defaultCSSTokenClasses: CSSTokenClasses;
4
4
  export declare const defaultJsonTokenClasses: JsonTokenClasses;
5
+ export declare const defaultMarkdownTokenClasses: MarkdownTokenClasses;
5
6
  export declare const defaultTSTokenClasses: TSTokenClasses;
@@ -1,5 +1,6 @@
1
- import { BashTokenClasses, CSSTokenClasses, JsonTokenClasses, TSTokenClasses } from './types';
1
+ import { BashTokenClasses, CSSTokenClasses, JsonTokenClasses, MarkdownTokenClasses, TSTokenClasses } from './types';
2
2
  export declare function formatBash(codeLines: string[], customTokenClasses?: BashTokenClasses): import("react/jsx-runtime").JSX.Element[];
3
3
  export declare function formatCSS(codeLines: string[], customTokenClasses?: CSSTokenClasses): import("react/jsx-runtime").JSX.Element[];
4
4
  export declare function formatJson(codeLines: string[], customTokenClasses?: JsonTokenClasses): import("react/jsx-runtime").JSX.Element[];
5
5
  export declare function formatTypescript(codeLines: string[], customTokenClasses?: TSTokenClasses): import("react/jsx-runtime").JSX.Element[];
6
+ export declare function formatMarkdown(codeLines: string[], customTokenClasses?: MarkdownTokenClasses): import("react/jsx-runtime").JSX.Element[];
@@ -1,2 +1,2 @@
1
1
  export { CodeBlock, type CodeBlockLanguages, type CodeBlockProps } from './CodeBlock';
2
- export type { JsonTokenClasses as CodeBlockJsonTokenClasses, TokenClasses as CodeBlockTokenClasses, TSTokenClasses as CodeBlockTSTokenClasses } from './types';
2
+ export type { JsonTokenClasses as CodeBlockJsonTokenClasses, MarkdownTokenClasses as CodeBlockMarkdownTokenClasses, TokenClasses as CodeBlockTokenClasses, TSTokenClasses as CodeBlockTSTokenClasses } from './types';
@@ -1,4 +1,4 @@
1
- import { BashTokenType, CSSTokenClasses, JsonTokenClasses, TSTokenType } from './types';
1
+ import { BashTokenType, CSSTokenClasses, JsonTokenClasses, MarkdownTokenType, TSTokenType } from './types';
2
2
  export declare function tokenizeBash(codeLine: string): {
3
3
  text: string;
4
4
  type: BashTokenType;
@@ -14,7 +14,11 @@ export declare function tokenizeJSON(codeLine: string): {
14
14
  text: string;
15
15
  type: keyof JsonTokenClasses;
16
16
  }[];
17
- export declare function tokenizeTypeScript(codeLine: string, inheritedJSXContext?: boolean, inheritedBraceDepth?: number): {
17
+ export declare function tokenizeTypeScript(codeLine: string, inheritedJSXContext?: boolean, inheritedBraceDepth?: number, inTemplateLiteral?: boolean): {
18
18
  text: string;
19
19
  type: TSTokenType;
20
20
  }[];
21
+ export declare function tokenizeMarkdown(codeLine: string): {
22
+ text: string;
23
+ type: MarkdownTokenType;
24
+ }[];
@@ -33,6 +33,29 @@ export interface JsonTokenClasses {
33
33
  plain?: string;
34
34
  }
35
35
  export type JsonTokenType = keyof JsonTokenClasses;
36
+ export interface MarkdownTokenClasses {
37
+ heading?: string;
38
+ 'heading-hash'?: string;
39
+ bold?: string;
40
+ italic?: string;
41
+ 'bold-marker'?: string;
42
+ 'italic-marker'?: string;
43
+ link?: string;
44
+ 'link-text'?: string;
45
+ 'link-url'?: string;
46
+ 'link-bracket'?: string;
47
+ 'link-paren'?: string;
48
+ code?: string;
49
+ 'code-marker'?: string;
50
+ 'code-block'?: string;
51
+ 'code-block-marker'?: string;
52
+ 'list-marker'?: string;
53
+ 'list-item'?: string;
54
+ blockquote?: string;
55
+ 'blockquote-marker'?: string;
56
+ plain?: string;
57
+ }
58
+ export type MarkdownTokenType = keyof MarkdownTokenClasses;
36
59
  export interface TSTokenClasses {
37
60
  keyword?: string;
38
61
  type?: string;
@@ -51,4 +74,4 @@ export interface TSTokenClasses {
51
74
  plain?: string;
52
75
  }
53
76
  export type TSTokenType = keyof TSTokenClasses;
54
- export type TokenClasses = TSTokenClasses | JsonTokenClasses | BashTokenClasses | CSSTokenClasses;
77
+ export type TokenClasses = TSTokenClasses | JsonTokenClasses | BashTokenClasses | CSSTokenClasses | MarkdownTokenClasses;
@@ -1,22 +1,43 @@
1
1
  import React from 'react';
2
2
  export interface DisclosureProps {
3
- /** The content to show/hide when disclosure is open.*/
3
+ /** The content to show/hide */
4
4
  children: React.ReactNode;
5
- /** The label for the disclosure button. */
5
+ /** The label text or content for the disclosure button */
6
6
  label: React.ReactNode;
7
- /** Controls the open state (uncontrolled if not provided).*/
7
+ /** Controls the open state (uncontrolled if not provided) */
8
8
  isOpen?: boolean;
9
- /**Called when disclosure is toggled.*/
9
+ /** Called when disclosure is toggled */
10
10
  onToggle?: (open: boolean) => void;
11
- /** Optional id for accessibility and testing. */
11
+ /** Optional id for accessibility and testing */
12
12
  id?: string;
13
- /** Optional ref to the root div. */
13
+ /** Optional ref to the root div */
14
14
  ref?: React.Ref<HTMLDivElement>;
15
- /** Disabled state for the button. */
15
+ /** Whether the disclosure is disabled */
16
16
  disabled?: boolean;
17
- /** Optional class name for the root div. */
17
+ /** Additional CSS classes to apply to the disclosure */
18
18
  className?: string;
19
- /** Optional class name for the button. */
19
+ /** Additional CSS classes to apply to the disclosure button */
20
20
  buttonClassName?: string;
21
21
  }
22
+ /**
23
+ * A simple disclosure component for showing and hiding content sections.
24
+ * Provides keyboard navigation and accessibility features with expand/collapse functionality.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * // Uncontrolled disclosure
29
+ * <Disclosure label="Show Details">
30
+ * <p>Hidden content that will be revealed when expanded.</p>
31
+ * </Disclosure>
32
+ *
33
+ * // Controlled disclosure
34
+ * <Disclosure
35
+ * label="Advanced Options"
36
+ * isOpen={showAdvanced}
37
+ * onToggle={setShowAdvanced}
38
+ * >
39
+ * <div>Advanced configuration options...</div>
40
+ * </Disclosure>
41
+ * ```
42
+ */
22
43
  export declare function Disclosure({ children, label, isOpen: open, onToggle, id, ref, disabled, className, buttonClassName, }: DisclosureProps): import("react/jsx-runtime").JSX.Element;
@@ -1,27 +1,28 @@
1
1
  import React from 'react';
2
2
  export interface DrawerProps {
3
+ /** Reference to the drawer element */
3
4
  ref?: React.Ref<HTMLDivElement>;
4
5
  /** Unique identifier for the drawer */
5
6
  id?: string;
6
7
  /** Whether the drawer is open */
7
8
  isOpen: boolean;
8
- /** Callback when drawer should close */
9
+ /** Callback fired when the drawer should close */
9
10
  onClose: () => void;
10
- /** Drawer title - can be a string or React node */
11
+ /** Optional title for the drawer header */
11
12
  title?: React.ReactNode;
12
- /** Drawer content */
13
+ /** The content to display inside the drawer */
13
14
  children: React.ReactNode;
14
- /** Drawer footer - can be a string or React node */
15
+ /** Optional footer content for the drawer */
15
16
  footer?: React.ReactNode;
16
- /** Additional CSS classes for the drawer */
17
+ /** Additional CSS classes to apply to the drawer */
17
18
  className?: string;
18
- /** Additional CSS classes for the overlay */
19
+ /** Additional CSS classes to apply to the overlay */
19
20
  overlayClassName?: string;
20
- /** Whether to show the close button */
21
+ /** Whether to show the close button in the top-right corner */
21
22
  showCloseButton?: boolean;
22
23
  /** Whether to disable closing when clicking the overlay */
23
24
  disableCloseOnOverlayClick?: boolean;
24
- /** Whether to enable drag gestures on the notch */
25
+ /** Whether to enable drag gestures on the notch for closing */
25
26
  enableDragGestures?: boolean;
26
27
  /** ARIA labelledby attribute */
27
28
  ariaLabelledBy?: string;
@@ -29,7 +30,31 @@ export interface DrawerProps {
29
30
  ariaDescribedBy?: string;
30
31
  }
31
32
  /**
32
- * Drawer component that slides in from the bottom of the screen.
33
- * Provides an overlay and slide-in animation for bottom sheet content display.
33
+ * A bottom-slide drawer component for mobile-friendly overlays and forms.
34
+ * Includes drag gestures, focus management, and smooth animations.
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * // Basic drawer
39
+ * <Drawer
40
+ * isOpen={showDrawer}
41
+ * onClose={() => setShowDrawer(false)}
42
+ * title="Settings"
43
+ * >
44
+ * <p>Drawer content goes here</p>
45
+ * </Drawer>
46
+ *
47
+ * // Full-featured drawer
48
+ * <Drawer
49
+ * isOpen={showForm}
50
+ * onClose={handleClose}
51
+ * title="Edit Profile"
52
+ * footer={<Button onClick={save}>Save Changes</Button>}
53
+ * enableDragGestures
54
+ * showCloseButton
55
+ * >
56
+ * <ProfileForm />
57
+ * </Drawer>
58
+ * ```
34
59
  */
35
60
  export declare function Drawer({ ref, id, isOpen, onClose, title, children, footer, className, overlayClassName, showCloseButton, disableCloseOnOverlayClick, enableDragGestures, ariaLabelledBy, ariaDescribedBy, }: DrawerProps): import("react/jsx-runtime").JSX.Element | null;
@@ -6,4 +6,38 @@ export interface DropdownMenuProps extends Omit<PopoverProps, 'children'> {
6
6
  /** Callback when an item is selected, returns the value of the selected item */
7
7
  onItemSelect?: (value: string) => void;
8
8
  }
9
+ /**
10
+ * A fully-featured dropdown menu with keyboard navigation, nested submenus, and flexible item types.
11
+ * Supports separators, groups, and custom content with accessibility features.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * // Basic dropdown menu
16
+ * <DropdownMenu
17
+ * trigger={<Button>Options</Button>}
18
+ * items={[
19
+ * { type: 'item', label: 'Edit', value: 'edit' },
20
+ * { type: 'item', label: 'Delete', value: 'delete' },
21
+ * { type: 'separator' }
22
+ * ]}
23
+ * onItemSelect={(value) => handleAction(value)}
24
+ * />
25
+ *
26
+ * // With nested submenus
27
+ * <DropdownMenu
28
+ * trigger={<Button>More Actions</Button>}
29
+ * items={[
30
+ * {
31
+ * type: 'submenu',
32
+ * label: 'Export',
33
+ * items: [
34
+ * { type: 'item', label: 'PDF', value: 'pdf' },
35
+ * { type: 'item', label: 'CSV', value: 'csv' }
36
+ * ]
37
+ * }
38
+ * ]}
39
+ * placement="bottom-end"
40
+ * />
41
+ * ```
42
+ */
9
43
  export declare function DropdownMenu({ id, items, onItemSelect, trigger, isOpen: open, placement, alignment, onOpenChange, className, ...popoverProps }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,68 @@
1
+ import React from 'react';
2
+ import { type DynamicListItem } from './hooks';
3
+ import { DynamicListSize } from './variants';
4
+ export type DynamicListMarkerType = 'disc' | 'dash' | 'decimal' | React.ReactElement;
5
+ export interface DynamicListProps<T extends object> {
6
+ /** Items to display in the list */
7
+ items?: DynamicListItem<T>[];
8
+ /** Size variant */
9
+ size?: DynamicListSize;
10
+ /** Optional ID for the component */
11
+ id?: string;
12
+ /** Additional CSS classes */
13
+ className?: string;
14
+ /** Reference to the list container element */
15
+ ref?: React.Ref<HTMLDivElement>;
16
+ /** Whether items can be added */
17
+ allowAdd?: boolean;
18
+ /** Whether items can be deleted */
19
+ allowDelete?: boolean;
20
+ /** Whether items can be reordered */
21
+ allowReorder?: boolean;
22
+ /** Placeholder text for new items */
23
+ addPlaceholder?: string;
24
+ /** Callback when items change */
25
+ onItemsChange?: (items: DynamicListItem<T>[]) => void;
26
+ /** Custom render function for items */
27
+ renderItem?: (item: DynamicListItem<T>, index: number) => React.ReactNode;
28
+ /** Marker type for list items */
29
+ marker?: DynamicListMarkerType;
30
+ /** Custom item renderer function (alternative name for renderItem) */
31
+ itemRenderer?: (item: DynamicListItem<T>, index: number) => React.ReactNode;
32
+ /** Whether to show dividers between items */
33
+ showDividers?: boolean;
34
+ /** Whether to always show reorder buttons (if allowReorder is true) */
35
+ showReorderButtons?: boolean;
36
+ /** Optional title for the list */
37
+ title?: string | React.ReactElement;
38
+ /** Whether to truncate long text in items (default: true) */
39
+ truncateText?: boolean;
40
+ }
41
+ /**
42
+ * An interactive list component with add, delete, and reorder functionality.
43
+ * Supports drag-and-drop reordering, keyboard navigation, and custom item rendering.
44
+ *
45
+ * @example
46
+ * ```tsx
47
+ * // Basic dynamic list
48
+ * <DynamicList
49
+ * items={[
50
+ * { id: '1', content: 'First item' },
51
+ * { id: '2', content: 'Second item' }
52
+ * ]}
53
+ * onItemsChange={(items) => setListItems(items)}
54
+ * title="My Tasks"
55
+ * />
56
+ *
57
+ * // Custom rendering with limited functionality
58
+ * <DynamicList
59
+ * items={todos}
60
+ * renderItem={(item, index) => (
61
+ * <TodoItem {...item} onToggle={() => toggleTodo(item.id)} />
62
+ * )}
63
+ * allowDelete={false}
64
+ * marker="decimal"
65
+ * />
66
+ * ```
67
+ */
68
+ export declare function DynamicList<T extends object>({ items: initialItems, size, id, className, ref, allowAdd, allowDelete, allowReorder, addPlaceholder, onItemsChange, renderItem, marker, itemRenderer, showDividers, showReorderButtons, title, truncateText, }: DynamicListProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ export type DynamicListItem<T extends object> = T & {
2
+ id: string;
3
+ content: string;
4
+ };
5
+ export declare function useDynamicList<T extends object>(initialItems?: DynamicListItem<T>[]): {
6
+ items: DynamicListItem<T>[];
7
+ visualItems: DynamicListItem<T>[];
8
+ addItem: (content: string, extra?: Partial<T>) => DynamicListItem<T>;
9
+ deleteItem: (id: string) => void;
10
+ moveItem: (fromIndex: number, toIndex: number) => void;
11
+ moveItemUp: (index: number) => void;
12
+ moveItemDown: (index: number) => void;
13
+ draggedItem: DynamicListItem<T> | null;
14
+ draggedOverIndex: number | null;
15
+ handleDragStart: (item: DynamicListItem<T>, index: number) => void;
16
+ handleDragOver: (e: React.DragEvent, index: number) => void;
17
+ handleDragEnd: () => void;
18
+ handleDrop: (e: React.DragEvent) => void;
19
+ };
@@ -0,0 +1,2 @@
1
+ export { DynamicList, type DynamicListProps, type DynamicListMarkerType } from './DynamicList';
2
+ export { type DynamicListItem } from './hooks';
@@ -0,0 +1,8 @@
1
+ export declare function DiscMarker({ size, className }: {
2
+ size?: number;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export declare function DashMarker({ size, className }: {
6
+ size?: number;
7
+ className?: string;
8
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export type DynamicListSize = 'sm' | 'md' | 'lg';
2
+ export declare const titleVariants: Record<DynamicListSize, string>;
3
+ export declare const listVariants: Record<DynamicListSize, string>;
4
+ export declare const iconSize: Record<DynamicListSize, number>;