orizon 0.2.0 → 0.2.2

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 (167) hide show
  1. package/README.md +45 -7
  2. package/bin/cli.mjs +53 -16
  3. package/bin/init.mjs +541 -156
  4. package/dist/components/affix/Affix.d.ts +19 -0
  5. package/dist/components/affix/Affix.stories.d.ts +9 -0
  6. package/dist/components/affix/index.d.ts +23 -0
  7. package/dist/components/alert/Alert.d.ts +21 -0
  8. package/dist/components/alert/Alert.stories.d.ts +13 -0
  9. package/dist/components/alert/ErrorBoundary.d.ts +10 -0
  10. package/dist/components/alert/index.d.ts +20 -0
  11. package/dist/components/anchor/Anchor.d.ts +23 -0
  12. package/dist/components/anchor/Anchor.stories.d.ts +9 -0
  13. package/dist/components/anchor/index.d.ts +24 -0
  14. package/dist/components/app/App.d.ts +25 -0
  15. package/dist/components/app/App.stories.d.ts +8 -0
  16. package/dist/components/app/index.d.ts +18 -0
  17. package/dist/components/auto-complete/AutoComplete.d.ts +22 -0
  18. package/dist/components/auto-complete/AutoComplete.stories.d.ts +12 -0
  19. package/dist/components/auto-complete/index.d.ts +22 -0
  20. package/dist/components/avatar/Avatar.d.ts +24 -0
  21. package/dist/components/avatar/Avatar.stories.d.ts +10 -0
  22. package/dist/components/avatar/index.d.ts +21 -0
  23. package/dist/components/badge/Badge.d.ts +19 -0
  24. package/dist/components/badge/Badge.stories.d.ts +12 -0
  25. package/dist/components/badge/index.d.ts +19 -0
  26. package/dist/components/breadcrumb/Breadcrumb.d.ts +24 -0
  27. package/dist/components/breadcrumb/Breadcrumb.stories.d.ts +9 -0
  28. package/dist/components/breadcrumb/index.d.ts +25 -0
  29. package/dist/components/button/Button.d.ts +24 -0
  30. package/dist/components/button/Button.stories.d.ts +20 -0
  31. package/dist/components/button/ButtonGroup.d.ts +23 -0
  32. package/dist/components/button/index.d.ts +33 -0
  33. package/dist/components/button/types.d.ts +87 -11
  34. package/dist/components/calendar/Calendar.d.ts +21 -0
  35. package/dist/components/calendar/Calendar.stories.d.ts +10 -0
  36. package/dist/components/calendar/index.d.ts +19 -0
  37. package/dist/components/card/Card.d.ts +21 -0
  38. package/dist/components/card/Card.stories.d.ts +14 -0
  39. package/dist/components/card/index.d.ts +25 -0
  40. package/dist/components/carousel/Carousel.d.ts +23 -0
  41. package/dist/components/carousel/Carousel.stories.d.ts +11 -0
  42. package/dist/components/carousel/index.d.ts +25 -0
  43. package/dist/components/cascader/Cascader.d.ts +26 -0
  44. package/dist/components/cascader/Cascader.stories.d.ts +11 -0
  45. package/dist/components/cascader/index.d.ts +25 -0
  46. package/dist/components/checkbox/Checkbox.d.ts +21 -0
  47. package/dist/components/checkbox/Checkbox.stories.d.ts +11 -0
  48. package/dist/components/checkbox/CheckboxGroup.d.ts +10 -0
  49. package/dist/components/checkbox/index.d.ts +19 -0
  50. package/dist/components/collapse/Collapse.d.ts +25 -0
  51. package/dist/components/collapse/Collapse.stories.d.ts +12 -0
  52. package/dist/components/collapse/index.d.ts +26 -0
  53. package/dist/components/color-picker/ColorPicker.d.ts +22 -0
  54. package/dist/components/color-picker/ColorPicker.stories.d.ts +11 -0
  55. package/dist/components/color-picker/index.d.ts +22 -0
  56. package/dist/components/date-picker/DatePicker.d.ts +20 -0
  57. package/dist/components/date-picker/DatePicker.stories.d.ts +12 -0
  58. package/dist/components/date-picker/RangePicker.d.ts +12 -0
  59. package/dist/components/date-picker/index.d.ts +21 -0
  60. package/dist/components/descriptions/Descriptions.d.ts +25 -0
  61. package/dist/components/descriptions/Descriptions.stories.d.ts +12 -0
  62. package/dist/components/descriptions/index.d.ts +25 -0
  63. package/dist/components/divider/Divider.stories.d.ts +12 -0
  64. package/dist/components/divider/index.d.ts +10 -0
  65. package/dist/components/drawer/Drawer.stories.d.ts +10 -0
  66. package/dist/components/drawer/index.d.ts +13 -0
  67. package/dist/components/dropdown/Dropdown.stories.d.ts +12 -0
  68. package/dist/components/dropdown/index.d.ts +14 -0
  69. package/dist/components/empty/Empty.stories.d.ts +11 -0
  70. package/dist/components/empty/index.d.ts +14 -0
  71. package/dist/components/flex/Flex.stories.d.ts +12 -0
  72. package/dist/components/flex/index.d.ts +15 -0
  73. package/dist/components/float-button/FloatButton.stories.d.ts +12 -0
  74. package/dist/components/float-button/index.d.ts +15 -0
  75. package/dist/components/form/Form.stories.d.ts +10 -0
  76. package/dist/components/form/index.d.ts +17 -0
  77. package/dist/components/grid/Grid.stories.d.ts +11 -0
  78. package/dist/components/grid/index.d.ts +20 -0
  79. package/dist/components/image/Image.stories.d.ts +11 -0
  80. package/dist/components/image/index.d.ts +14 -0
  81. package/dist/components/input/Input.stories.d.ts +14 -0
  82. package/dist/components/input/index.d.ts +15 -0
  83. package/dist/components/input-number/InputNumber.stories.d.ts +13 -0
  84. package/dist/components/input-number/index.d.ts +10 -0
  85. package/dist/components/layout/Layout.stories.d.ts +9 -0
  86. package/dist/components/layout/index.d.ts +17 -0
  87. package/dist/components/list/List.stories.d.ts +13 -0
  88. package/dist/components/list/index.d.ts +18 -0
  89. package/dist/components/masonry/Masonry.stories.d.ts +11 -0
  90. package/dist/components/masonry/index.d.ts +12 -0
  91. package/dist/components/mentions/Mentions.stories.d.ts +12 -0
  92. package/dist/components/mentions/index.d.ts +11 -0
  93. package/dist/components/menu/Menu.stories.d.ts +12 -0
  94. package/dist/components/menu/index.d.ts +15 -0
  95. package/dist/components/message/Message.stories.d.ts +8 -0
  96. package/dist/components/message/index.d.ts +16 -0
  97. package/dist/components/modal/Modal.stories.d.ts +12 -0
  98. package/dist/components/modal/index.d.ts +17 -0
  99. package/dist/components/notification/Notification.stories.d.ts +10 -0
  100. package/dist/components/notification/index.d.ts +14 -0
  101. package/dist/components/pagination/Pagination.stories.d.ts +13 -0
  102. package/dist/components/pagination/index.d.ts +13 -0
  103. package/dist/components/popconfirm/Popconfirm.stories.d.ts +11 -0
  104. package/dist/components/popconfirm/index.d.ts +13 -0
  105. package/dist/components/popover/Popover.stories.d.ts +10 -0
  106. package/dist/components/popover/index.d.ts +10 -0
  107. package/dist/components/progress/Progress.stories.d.ts +13 -0
  108. package/dist/components/progress/index.d.ts +10 -0
  109. package/dist/components/qrcode/QRCode.stories.d.ts +11 -0
  110. package/dist/components/qrcode/index.d.ts +9 -0
  111. package/dist/components/radio/Radio.stories.d.ts +13 -0
  112. package/dist/components/radio/index.d.ts +17 -0
  113. package/dist/components/rate/Rate.stories.d.ts +12 -0
  114. package/dist/components/rate/index.d.ts +13 -0
  115. package/dist/components/result/Result.stories.d.ts +12 -0
  116. package/dist/components/result/index.d.ts +9 -0
  117. package/dist/components/segmented/Segmented.stories.d.ts +12 -0
  118. package/dist/components/segmented/index.d.ts +9 -0
  119. package/dist/components/select/Select.stories.d.ts +14 -0
  120. package/dist/components/select/index.d.ts +10 -0
  121. package/dist/components/skeleton/Skeleton.stories.d.ts +12 -0
  122. package/dist/components/skeleton/index.d.ts +15 -0
  123. package/dist/components/slider/Slider.stories.d.ts +13 -0
  124. package/dist/components/slider/index.d.ts +10 -0
  125. package/dist/components/space/Space.stories.d.ts +13 -0
  126. package/dist/components/space/index.d.ts +18 -0
  127. package/dist/components/spin/Spin.stories.d.ts +13 -0
  128. package/dist/components/spin/index.d.ts +14 -0
  129. package/dist/components/splitter/Splitter.stories.d.ts +12 -0
  130. package/dist/components/splitter/index.d.ts +18 -0
  131. package/dist/components/statistic/Statistic.stories.d.ts +10 -0
  132. package/dist/components/statistic/index.d.ts +17 -0
  133. package/dist/components/steps/Steps.stories.d.ts +11 -0
  134. package/dist/components/steps/index.d.ts +15 -0
  135. package/dist/components/switch/Switch.stories.d.ts +10 -0
  136. package/dist/components/switch/index.d.ts +12 -0
  137. package/dist/components/table/Table.stories.d.ts +12 -0
  138. package/dist/components/table/index.d.ts +12 -0
  139. package/dist/components/tabs/Tabs.stories.d.ts +11 -0
  140. package/dist/components/tabs/index.d.ts +16 -0
  141. package/dist/components/tag/Tag.stories.d.ts +11 -0
  142. package/dist/components/tag/index.d.ts +14 -0
  143. package/dist/components/time-picker/TimePicker.stories.d.ts +10 -0
  144. package/dist/components/time-picker/index.d.ts +13 -0
  145. package/dist/components/timeline/Timeline.stories.d.ts +10 -0
  146. package/dist/components/timeline/index.d.ts +15 -0
  147. package/dist/components/tooltip/Tooltip.stories.d.ts +8 -0
  148. package/dist/components/tooltip/index.d.ts +10 -0
  149. package/dist/components/tour/Tour.stories.d.ts +8 -0
  150. package/dist/components/tour/index.d.ts +16 -0
  151. package/dist/components/transfer/Transfer.stories.d.ts +9 -0
  152. package/dist/components/transfer/index.d.ts +15 -0
  153. package/dist/components/tree/Tree.stories.d.ts +10 -0
  154. package/dist/components/tree/index.d.ts +18 -0
  155. package/dist/components/tree-select/TreeSelect.stories.d.ts +9 -0
  156. package/dist/components/tree-select/index.d.ts +16 -0
  157. package/dist/components/typography/Typography.stories.d.ts +11 -0
  158. package/dist/components/typography/index.d.ts +14 -0
  159. package/dist/components/upload/Upload.stories.d.ts +10 -0
  160. package/dist/components/upload/index.d.ts +17 -0
  161. package/dist/components/watermark/Watermark.stories.d.ts +9 -0
  162. package/dist/components/watermark/index.d.ts +11 -0
  163. package/dist/orizon.cjs.js +101 -101
  164. package/dist/orizon.es.js +26200 -25378
  165. package/dist/preset.css +4 -4
  166. package/dist/themes/corporate.css +169 -0
  167. package/package.json +16 -3
@@ -3,6 +3,39 @@ import { ButtonGroup } from './ButtonGroup';
3
3
  type ButtonComponent = typeof InternalButton & {
4
4
  Group: typeof ButtonGroup;
5
5
  };
6
+ /**
7
+ * Button component with Ant-Design-compatible props.
8
+ *
9
+ * Supports `type`, `size`, `shape`, `danger`, `ghost`, `loading`,
10
+ * `icon`, `block`, and `hint` (tooltip on hover).
11
+ *
12
+ * Use `Button.Group` to render connected button groups.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * // Primary button
17
+ * <Button type="primary">Save</Button>
18
+ *
19
+ * // With icon and tooltip
20
+ * <Button type="primary" icon={<Save />} hint="Save changes">Save</Button>
21
+ *
22
+ * // Danger
23
+ * <Button danger icon={<Trash2 />}>Delete</Button>
24
+ *
25
+ * // Loading state
26
+ * <Button type="primary" loading>Submitting…</Button>
27
+ *
28
+ * // Ghost on dark background
29
+ * <Button type="primary" ghost>Ghost</Button>
30
+ *
31
+ * // Button group
32
+ * <Button.Group>
33
+ * <Button>Left</Button>
34
+ * <Button>Center</Button>
35
+ * <Button>Right</Button>
36
+ * </Button.Group>
37
+ * ```
38
+ */
6
39
  declare const Button: ButtonComponent;
7
40
  export { Button };
8
41
  export type { ButtonProps, ButtonGroupProps, ButtonType, ButtonSize, ButtonShape, ButtonHTMLType } from './types';
@@ -1,35 +1,111 @@
1
1
  import { ReactNode, MouseEventHandler, ButtonHTMLAttributes } from 'react';
2
+ /** Visual style — maps to CVA `variant` in the primitive. */
2
3
  export type ButtonType = "primary" | "default" | "dashed" | "link" | "text";
4
+ /** T-shirt sizing — maps to CVA `size` in the primitive. */
3
5
  export type ButtonSize = "small" | "middle" | "large";
6
+ /** Border-radius preset. "circle" forces a 1:1 aspect ratio. */
4
7
  export type ButtonShape = "default" | "circle" | "round";
8
+ /** Native `<button type="">` attribute. Kept separate from `ButtonType`. */
5
9
  export type ButtonHTMLType = "button" | "submit" | "reset";
10
+ /**
11
+ * Props for the public `<Button>` component.
12
+ *
13
+ * Extends native button attributes but replaces `type` with
14
+ * the Ant-Design-style {@link ButtonType} (use `htmlType` for
15
+ * the native attribute instead).
16
+ */
6
17
  export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
7
- /** Antd button type */
18
+ /**
19
+ * Visual type of the button.
20
+ *
21
+ * | value | rendered as |
22
+ * |-----------|----------------------------|
23
+ * | primary | Solid primary background |
24
+ * | default | Outlined / bordered |
25
+ * | dashed | Outlined with dashed border|
26
+ * | text | Ghost / transparent |
27
+ * | link | Inline text link style |
28
+ *
29
+ * @default "default"
30
+ */
8
31
  type?: ButtonType;
9
- /** Size of button */
32
+ /**
33
+ * Button size. Inherits from `SizeContext` if not provided.
34
+ * @default "middle"
35
+ */
10
36
  size?: ButtonSize;
11
- /** Shape of button */
37
+ /**
38
+ * Border-radius shape.
39
+ * - `"default"` — standard rounded-lg
40
+ * - `"round"` — fully rounded (pill shape)
41
+ * - `"circle"` — 1:1 square with full rounding (use with icon-only)
42
+ *
43
+ * @default "default"
44
+ */
12
45
  shape?: ButtonShape;
13
- /** Show loading spinner */
46
+ /**
47
+ * Show a loading spinner and disable the button.
48
+ * Replaces the `icon` slot with a spinning `<Loader2>`.
49
+ * @default false
50
+ */
14
51
  loading?: boolean;
15
- /** Danger styling */
52
+ /**
53
+ * Apply destructive (red) styling regardless of `type`.
54
+ * @default false
55
+ */
16
56
  danger?: boolean;
17
- /** Ghost styling (transparent background) */
57
+ /**
58
+ * Transparent background with border in the current text color.
59
+ * Useful on dark/colored backgrounds.
60
+ * @default false
61
+ */
18
62
  ghost?: boolean;
19
- /** Full width */
63
+ /**
64
+ * Stretch to 100% width of the parent container.
65
+ * @default false
66
+ */
20
67
  block?: boolean;
21
- /** Icon placed before children */
68
+ /**
69
+ * Icon element rendered alongside (or instead of) the label.
70
+ * Pass any `ReactNode` — typically a Lucide icon.
71
+ */
22
72
  icon?: ReactNode;
23
- /** Icon placement */
73
+ /**
74
+ * Which side of the label the `icon` appears on.
75
+ * @default "start"
76
+ */
24
77
  iconPosition?: "start" | "end";
25
- /** HTML button type attribute */
78
+ /**
79
+ * Native `<button>` type attribute.
80
+ * Kept separate from the visual `type` prop to avoid conflicts.
81
+ * @default "button"
82
+ */
26
83
  htmlType?: ButtonHTMLType;
27
- /** Click handler */
84
+ /**
85
+ * Plain-text tooltip shown on hover via the Tooltip primitive.
86
+ * Wraps the button in a `<TooltipProvider> → <Tooltip> → <TooltipTrigger>`.
87
+ * Only renders the tooltip wrapper when a non-empty string is provided.
88
+ */
89
+ hint?: string;
90
+ /** Click handler. */
28
91
  onClick?: MouseEventHandler<HTMLButtonElement>;
92
+ /** Button label / content. */
29
93
  children?: ReactNode;
30
94
  }
95
+ /**
96
+ * Props for `<Button.Group>`.
97
+ *
98
+ * Groups adjacent buttons with collapsed borders and shared rounding.
99
+ * Children are cloned with the group-level `size` if provided.
100
+ */
31
101
  export interface ButtonGroupProps {
102
+ /**
103
+ * Overrides the size of every child `<Button>` in the group.
104
+ * Individual button sizes are preserved if this is not set.
105
+ */
32
106
  size?: ButtonSize;
107
+ /** Additional CSS classes on the group wrapper. */
33
108
  className?: string;
109
+ /** `<Button>` children. */
34
110
  children?: ReactNode;
35
111
  }
@@ -1,4 +1,25 @@
1
1
  import { CalendarProps } from './types';
2
+ /**
3
+ * @file Calendar Component
4
+ *
5
+ * Full-featured calendar with two modes: a full-screen grid view
6
+ * and a compact mini calendar using the shadcn primitive. Supports
7
+ * month / year panel switching, custom cell rendering, disabled
8
+ * dates, and controlled / uncontrolled selection.
9
+ *
10
+ * Key props: `fullscreen`, `mode`, `value`, `disabledDate`,
11
+ * `cellRender`, `headerRender`, `onChange`, `onSelect`.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Calendar />
16
+ * <Calendar fullscreen={false} />
17
+ * <Calendar mode="year" />
18
+ * ```
19
+ *
20
+ * @see {@link ./types.ts} — prop definitions
21
+ * @see {@link ./index.ts} — barrel export
22
+ */
2
23
  import * as React from "react";
3
24
  declare const InternalCalendar: React.FC<CalendarProps>;
4
25
  export { InternalCalendar };
@@ -0,0 +1,10 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Calendar } from './index';
3
+ declare const meta: Meta<typeof Calendar>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Calendar>;
6
+ export declare const Playground: Story;
7
+ export declare const Fullscreen: Story;
8
+ export declare const Mini: Story;
9
+ export declare const YearMode: Story;
10
+ export declare const DisabledDates: Story;
@@ -1,3 +1,22 @@
1
+ /**
2
+ * @file Calendar — Public Barrel Export
3
+ *
4
+ * Re-exports the `<Calendar>` date selection component.
5
+ */
6
+ /**
7
+ * Calendar component for date display and selection.
8
+ *
9
+ * Renders a full-screen monthly/yearly calendar by default, or a
10
+ * compact mini calendar when `fullscreen={false}`. Supports
11
+ * `mode`, `disabledDate`, custom `cellRender`, and `headerRender`.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Calendar />
16
+ * <Calendar fullscreen={false} />
17
+ * <Calendar mode="year" onChange={(d) => console.log(d)} />
18
+ * ```
19
+ */
1
20
  declare const Calendar: import('react').FC<import('./types').CalendarProps>;
2
21
  export { Calendar };
3
22
  export type { CalendarProps, CalendarMode } from './types';
@@ -1,4 +1,25 @@
1
1
  import { CardProps, CardMetaProps, CardGridProps } from './types';
2
+ /**
3
+ * @file Card Component
4
+ *
5
+ * A versatile container component with optional title, extra content,
6
+ * cover image, action bar, and loading skeleton. Includes `Card.Meta`
7
+ * for avatar + title + description layouts and `Card.Grid` for grid
8
+ * cells within the card body.
9
+ *
10
+ * Key props: `title`, `extra`, `cover`, `actions`, `bordered`,
11
+ * `hoverable`, `loading`, `size`, `type`.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Card title="Card Title" extra={<a href="#">More</a>}>
16
+ * <p>Card content</p>
17
+ * </Card>
18
+ * ```
19
+ *
20
+ * @see {@link ./types.ts} — prop definitions
21
+ * @see {@link ./index.ts} — barrel export
22
+ */
2
23
  import * as React from "react";
3
24
  declare const CardMeta: React.FC<CardMetaProps>;
4
25
  declare const CardGrid: React.FC<CardGridProps>;
@@ -0,0 +1,14 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Card } from './index';
3
+ declare const meta: Meta<typeof Card>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Card>;
6
+ export declare const Playground: Story;
7
+ export declare const Basic: Story;
8
+ export declare const Hoverable: Story;
9
+ export declare const Loading: Story;
10
+ export declare const NoBorder: Story;
11
+ export declare const WithCover: Story;
12
+ export declare const Meta: Story;
13
+ export declare const GridCells: Story;
14
+ export declare const InnerCard: Story;
@@ -3,6 +3,31 @@ type CardComponent = typeof InternalCard & {
3
3
  Meta: typeof CardMeta;
4
4
  Grid: typeof CardGrid;
5
5
  };
6
+ /**
7
+ * Card container component.
8
+ *
9
+ * Supports `title`, `extra`, `cover`, `actions`, `bordered`,
10
+ * `hoverable`, `loading`, `size`, and `type` (inner for nesting).
11
+ *
12
+ * Use `Card.Meta` for avatar + title + description layouts and
13
+ * `Card.Grid` for hoverable grid cells inside the card body.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <Card title="Users" extra={<a href="#">More</a>}>
18
+ * <p>Card body content</p>
19
+ * </Card>
20
+ *
21
+ * <Card cover={<img src="/cover.jpg" alt="" />}>
22
+ * <Card.Meta title="Title" description="Description" />
23
+ * </Card>
24
+ *
25
+ * <Card>
26
+ * <Card.Grid>Cell 1</Card.Grid>
27
+ * <Card.Grid>Cell 2</Card.Grid>
28
+ * </Card>
29
+ * ```
30
+ */
6
31
  declare const Card: CardComponent;
7
32
  export { Card };
8
33
  export type { CardProps, CardMetaProps, CardGridProps, CardSize, CardType } from './types';
@@ -1,4 +1,27 @@
1
1
  import { CarouselProps, CarouselRef } from './types';
2
+ /**
3
+ * @file Carousel Component
4
+ *
5
+ * A slideshow component that cycles through child slides with
6
+ * scroll or fade transitions. Supports autoplay with pause-on-hover,
7
+ * navigation arrows, dot indicators at any position, and an
8
+ * imperative ref for programmatic control.
9
+ *
10
+ * Key props: `autoplay`, `effect`, `dots`, `dotPosition`, `arrows`,
11
+ * `slidesToShow`, `infinite`, `beforeChange`, `afterChange`.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Carousel autoplay arrows>
16
+ * <div>Slide 1</div>
17
+ * <div>Slide 2</div>
18
+ * <div>Slide 3</div>
19
+ * </Carousel>
20
+ * ```
21
+ *
22
+ * @see {@link ./types.ts} — prop definitions
23
+ * @see {@link ./index.ts} — barrel export
24
+ */
2
25
  import * as React from "react";
3
26
  declare const InternalCarousel: React.ForwardRefExoticComponent<CarouselProps & React.RefAttributes<CarouselRef>>;
4
27
  export { InternalCarousel };
@@ -0,0 +1,11 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Carousel } from './index';
3
+ declare const meta: Meta<typeof Carousel>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Carousel>;
6
+ export declare const Playground: Story;
7
+ export declare const Basic: Story;
8
+ export declare const FadeEffect: Story;
9
+ export declare const Arrows: Story;
10
+ export declare const DotPositions: Story;
11
+ export declare const Autoplay: Story;
@@ -1,3 +1,28 @@
1
+ /**
2
+ * @file Carousel — Public Barrel Export
3
+ *
4
+ * Re-exports the `<Carousel>` slideshow component.
5
+ */
6
+ /**
7
+ * Carousel slideshow component.
8
+ *
9
+ * Cycles through child slides with `effect` (scrollx / fade),
10
+ * `autoplay`, `arrows`, `dots`, and `dotPosition`. Exposes an
11
+ * imperative ref with `goTo`, `next`, and `prev` methods.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Carousel autoplay arrows>
16
+ * <div>Slide 1</div>
17
+ * <div>Slide 2</div>
18
+ * </Carousel>
19
+ *
20
+ * <Carousel effect="fade" dotPosition="right">
21
+ * <img src="/a.jpg" />
22
+ * <img src="/b.jpg" />
23
+ * </Carousel>
24
+ * ```
25
+ */
1
26
  declare const Carousel: import('react').ForwardRefExoticComponent<import('./types').CarouselProps & import('react').RefAttributes<import('./types').CarouselRef>>;
2
27
  export { Carousel };
3
28
  export type { CarouselProps, CarouselRef, DotPosition, CarouselEffect, AutoplayConfig, } from './types';
@@ -1,4 +1,30 @@
1
1
  import { CascaderProps } from './types';
2
+ /**
3
+ * @file Cascader Component
4
+ *
5
+ * Hierarchical dropdown selector that drills into nested option
6
+ * columns. Supports single and multiple selection, expand on
7
+ * click or hover, search filtering, lazy loading via `loadData`,
8
+ * allow-clear, and custom display rendering.
9
+ *
10
+ * Key props: `options`, `value`, `onChange`, `multiple`,
11
+ * `expandTrigger`, `showSearch`, `changeOnSelect`, `placeholder`.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Cascader
16
+ * options={[
17
+ * { value: "zhejiang", label: "Zhejiang", children: [
18
+ * { value: "hangzhou", label: "Hangzhou" },
19
+ * ]},
20
+ * ]}
21
+ * placeholder="Select location"
22
+ * />
23
+ * ```
24
+ *
25
+ * @see {@link ./types.ts} — prop definitions
26
+ * @see {@link ./index.ts} — barrel export
27
+ */
2
28
  import * as React from "react";
3
29
  declare const InternalCascader: React.ForwardRefExoticComponent<CascaderProps & React.RefAttributes<HTMLDivElement>>;
4
30
  export { InternalCascader };
@@ -0,0 +1,11 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Cascader } from './index';
3
+ declare const meta: Meta<typeof Cascader>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Cascader>;
6
+ export declare const Playground: Story;
7
+ export declare const Basic: Story;
8
+ export declare const ExpandOnHover: Story;
9
+ export declare const ChangeOnSelect: Story;
10
+ export declare const AllowClear: Story;
11
+ export declare const Disabled: Story;
@@ -1,3 +1,28 @@
1
+ /**
2
+ * @file Cascader — Public Barrel Export
3
+ *
4
+ * Re-exports the `<Cascader>` hierarchical dropdown selector.
5
+ */
6
+ /**
7
+ * Cascader component for hierarchical selection.
8
+ *
9
+ * Drills into nested option columns. Supports `multiple` selection,
10
+ * `expandTrigger` (click / hover), `showSearch`, `changeOnSelect`,
11
+ * `loadData` for lazy loading, and `allowClear`.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Cascader
16
+ * options={[
17
+ * { value: "zhejiang", label: "Zhejiang", children: [
18
+ * { value: "hangzhou", label: "Hangzhou" },
19
+ * ]},
20
+ * ]}
21
+ * placeholder="Select location"
22
+ * onChange={(val, opts) => console.log(val, opts)}
23
+ * />
24
+ * ```
25
+ */
1
26
  declare const Cascader: import('react').ForwardRefExoticComponent<import('./types').CascaderProps & import('react').RefAttributes<HTMLDivElement>>;
2
27
  export { Cascader };
3
28
  export type { CascaderProps, CascaderOption, CascaderSize, CascaderStatus, CascaderVariant, CascaderExpandTrigger, CascaderPlacement, } from './types';
@@ -1,4 +1,25 @@
1
1
  import { CheckboxProps } from './types';
2
+ /**
3
+ * @file Checkbox Component
4
+ *
5
+ * A styled checkbox with label support. Works standalone or inside
6
+ * a `Checkbox.Group` context. Supports controlled / uncontrolled
7
+ * `checked`, `indeterminate` visual state, and `disabled`.
8
+ *
9
+ * Key props: `checked`, `defaultChecked`, `indeterminate`,
10
+ * `disabled`, `onChange`, `children` (label).
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <Checkbox onChange={(e) => console.log(e.target.checked)}>
15
+ * Accept terms
16
+ * </Checkbox>
17
+ * ```
18
+ *
19
+ * @see {@link ./types.ts} — prop definitions
20
+ * @see {@link ./CheckboxGroup.tsx} — group component
21
+ * @see {@link ./index.ts} — barrel export
22
+ */
2
23
  import * as React from "react";
3
24
  declare const InternalCheckbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLElement>>;
4
25
  export { InternalCheckbox };
@@ -0,0 +1,11 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Checkbox } from './index';
3
+ declare const meta: Meta<typeof Checkbox>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Checkbox>;
6
+ export declare const Playground: Story;
7
+ export declare const Basic: Story;
8
+ export declare const Disabled: Story;
9
+ export declare const Indeterminate: Story;
10
+ export declare const GroupOptions: Story;
11
+ export declare const GroupChildren: Story;
@@ -1,4 +1,14 @@
1
1
  import { CheckboxGroupProps } from './types';
2
+ /**
3
+ * @file CheckboxGroup Component
4
+ *
5
+ * Provides group context for multiple `<Checkbox>` children.
6
+ * Manages a shared list of selected values and can render
7
+ * checkboxes from an `options` array or from child composition.
8
+ *
9
+ * @see {@link ./Checkbox.tsx} — individual checkbox
10
+ * @see {@link ./types.ts} — prop definitions
11
+ */
2
12
  import * as React from "react";
3
13
  export interface CheckboxGroupContextValue {
4
14
  value: (string | number)[];
@@ -3,6 +3,25 @@ import { CheckboxGroup } from './CheckboxGroup';
3
3
  type CheckboxComponent = typeof InternalCheckbox & {
4
4
  Group: typeof CheckboxGroup;
5
5
  };
6
+ /**
7
+ * Checkbox component with label support.
8
+ *
9
+ * Supports `checked`, `defaultChecked`, `indeterminate`, and
10
+ * `disabled`. Use `Checkbox.Group` for multi-select with an
11
+ * `options` array or child composition.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Checkbox>Remember me</Checkbox>
16
+ * <Checkbox indeterminate>Select all</Checkbox>
17
+ *
18
+ * <Checkbox.Group
19
+ * options={["Apple", "Pear", "Orange"]}
20
+ * defaultValue={["Apple"]}
21
+ * onChange={(vals) => console.log(vals)}
22
+ * />
23
+ * ```
24
+ */
6
25
  declare const Checkbox: CheckboxComponent;
7
26
  export { Checkbox };
8
27
  export type { CheckboxProps, CheckboxGroupProps, CheckboxChangeEvent, CheckboxOptionType, } from './types';
@@ -1,4 +1,29 @@
1
1
  import { CollapseProps } from './types';
2
+ /**
3
+ * @file Collapse Component
4
+ *
5
+ * An accordion/collapse panel that reveals content on header click.
6
+ * Supports `accordion` mode (single panel), `bordered` / `ghost`
7
+ * styles, `expandIconPosition`, custom `expandIcon`, `size` presets,
8
+ * and per-item `collapsible` trigger modes.
9
+ *
10
+ * Key props: `items`, `activeKey`, `accordion`, `bordered`,
11
+ * `ghost`, `size`, `expandIconPosition`, `onChange`.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Collapse
16
+ * items={[
17
+ * { key: "1", label: "Panel 1", children: <p>Content 1</p> },
18
+ * { key: "2", label: "Panel 2", children: <p>Content 2</p> },
19
+ * ]}
20
+ * accordion
21
+ * />
22
+ * ```
23
+ *
24
+ * @see {@link ./types.ts} — prop definitions
25
+ * @see {@link ./index.ts} — barrel export
26
+ */
2
27
  import * as React from "react";
3
28
  declare const InternalCollapse: React.FC<CollapseProps>;
4
29
  export { InternalCollapse };
@@ -0,0 +1,12 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Collapse } from './index';
3
+ declare const meta: Meta<typeof Collapse>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Collapse>;
6
+ export declare const Playground: Story;
7
+ export declare const Basic: Story;
8
+ export declare const Accordion: Story;
9
+ export declare const Ghost: Story;
10
+ export declare const Sizes: Story;
11
+ export declare const ExpandIconEnd: Story;
12
+ export declare const WithExtra: Story;
@@ -1,3 +1,29 @@
1
+ /**
2
+ * @file Collapse — Public Barrel Export
3
+ *
4
+ * Re-exports the `<Collapse>` accordion panel component.
5
+ */
6
+ /**
7
+ * Collapse / Accordion panel component.
8
+ *
9
+ * Reveals content panels on header click. Supports `accordion`
10
+ * (single open), `bordered` / `ghost` styles, `size` presets,
11
+ * `expandIconPosition`, and custom `expandIcon`.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Collapse
16
+ * items={[
17
+ * { key: "1", label: "Section A", children: <p>Content A</p> },
18
+ * { key: "2", label: "Section B", children: <p>Content B</p> },
19
+ * ]}
20
+ * />
21
+ *
22
+ * <Collapse accordion ghost>
23
+ * ...
24
+ * </Collapse>
25
+ * ```
26
+ */
1
27
  declare const Collapse: import('react').FC<import('./types').CollapseProps>;
2
28
  export { Collapse };
3
29
  export type { CollapseProps, CollapseItem, CollapsibleType, ExpandIconPosition, CollapseSize, } from './types';
@@ -1,4 +1,26 @@
1
1
  import { ColorPickerProps } from './types';
2
+ /**
3
+ * @file ColorPicker Component
4
+ *
5
+ * A colour selection panel with saturation canvas, hue slider,
6
+ * optional alpha slider, format switching (hex / rgb / hsb),
7
+ * and preset colour swatches. Opens as a popover triggered by
8
+ * click or hover on a colour swatch.
9
+ *
10
+ * Key props: `value`, `onChange`, `format`, `showText`, `presets`,
11
+ * `disabledAlpha`, `size`, `trigger`.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <ColorPicker defaultValue="#1677ff" showText />
16
+ * <ColorPicker
17
+ * presets={[{ label: "Brand", colors: ["#f00", "#0f0", "#00f"] }]}
18
+ * />
19
+ * ```
20
+ *
21
+ * @see {@link ./types.ts} — prop definitions
22
+ * @see {@link ./index.ts} — barrel export
23
+ */
2
24
  import * as React from "react";
3
25
  declare const InternalColorPicker: React.ForwardRefExoticComponent<ColorPickerProps & React.RefAttributes<HTMLDivElement>>;
4
26
  export { InternalColorPicker };
@@ -0,0 +1,11 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { ColorPicker } from './index';
3
+ declare const meta: Meta<typeof ColorPicker>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof ColorPicker>;
6
+ export declare const Playground: Story;
7
+ export declare const ShowText: Story;
8
+ export declare const Sizes: Story;
9
+ export declare const Presets: Story;
10
+ export declare const DisabledAlpha: Story;
11
+ export declare const Disabled: Story;
@@ -1,3 +1,25 @@
1
+ /**
2
+ * @file ColorPicker — Public Barrel Export
3
+ *
4
+ * Re-exports the `<ColorPicker>` colour selection component.
5
+ */
6
+ /**
7
+ * ColorPicker component for selecting colours.
8
+ *
9
+ * Opens a popover with a saturation canvas, hue slider, optional
10
+ * alpha slider, format switcher (hex / rgb / hsb), and preset
11
+ * colour swatches. Supports `showText`, `trigger` (click / hover),
12
+ * and `size`.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <ColorPicker defaultValue="#1677ff" />
17
+ * <ColorPicker showText format="rgb" />
18
+ * <ColorPicker
19
+ * presets={[{ label: "Brand", colors: ["#1677ff", "#52c41a"] }]}
20
+ * />
21
+ * ```
22
+ */
1
23
  declare const ColorPicker: import('react').ForwardRefExoticComponent<import('./types').ColorPickerProps & import('react').RefAttributes<HTMLDivElement>>;
2
24
  export { ColorPicker };
3
25
  export type { ColorPickerProps, ColorFormat, ColorPickerSize, ColorPickerTrigger, ColorPreset, } from './types';