@ssa-ui-kit/core 2.33.0 → 3.0.0

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 (177) hide show
  1. package/dist/components/AccordionGroup/Accordion.d.ts +37 -0
  2. package/dist/components/AccordionGroup/AccordionContent.d.ts +48 -0
  3. package/dist/components/AccordionGroup/AccordionContext.d.ts +76 -2
  4. package/dist/components/AccordionGroup/AccordionGroup.d.ts +56 -0
  5. package/dist/components/AccordionGroup/AccordionTitle.d.ts +41 -0
  6. package/dist/components/AccordionGroup/types.d.ts +199 -1
  7. package/dist/components/Avatar/Avatar.d.ts +33 -0
  8. package/dist/components/Button/Button.d.ts +61 -0
  9. package/dist/components/Button/fixtures.d.ts +52 -31
  10. package/dist/components/Button/styles.d.ts +7 -12
  11. package/dist/components/Button/types.d.ts +98 -4
  12. package/dist/components/Charts/BarGaugeChart/components/BarGaugeChartHeader.d.ts +1 -1
  13. package/dist/components/Charts/BarLineComplexChart/BarLineComplexChartView.d.ts +2 -2
  14. package/dist/components/Charts/BarLineComplexChart/types.d.ts +2 -2
  15. package/dist/components/Charts/BigNumberChart/BigNumberChart.d.ts +4 -2
  16. package/dist/components/Charts/BigNumberChart/components/BigNumberChartHeader.d.ts +1 -1
  17. package/dist/components/Charts/BigNumberChart/components/TrendLine.d.ts +8 -3
  18. package/dist/components/Charts/BigNumberChart/components/TrendLineTooltip.d.ts +8 -5
  19. package/dist/components/Charts/GaugeChart/components/GaugeChartBase.d.ts +3 -1
  20. package/dist/components/Charts/GaugeChart/components/GaugeChartHeader.d.ts +1 -1
  21. package/dist/components/Charts/PieChart/PieChartLegendMarker.d.ts +1 -1
  22. package/dist/components/Charts/PieChart/styles.d.ts +1 -1
  23. package/dist/components/Charts/PieChart/types.d.ts +1 -1
  24. package/dist/components/Charts/RadarChart/RadarChart.d.ts +1 -1
  25. package/dist/components/Charts/RadarChart/components/RadarChartHeader.d.ts +1 -1
  26. package/dist/components/Charts/TreeMapChart/TreeMapChart.d.ts +1 -1
  27. package/dist/components/Charts/TreeMapChart/TreeMapChartHeader.d.ts +1 -1
  28. package/dist/components/Charts/index.d.ts +1 -0
  29. package/dist/components/Charts/utils/nivoReact19Compat.d.ts +18 -0
  30. package/dist/components/Checkbox/Checkbox.d.ts +84 -0
  31. package/dist/components/Checkbox/CheckboxBase.d.ts +1 -1
  32. package/dist/components/Checkbox/styles.d.ts +2 -2
  33. package/dist/components/Checkbox/types.d.ts +104 -3
  34. package/dist/components/Chip/Chip.d.ts +70 -0
  35. package/dist/components/Chip/constants.d.ts +1 -1
  36. package/dist/components/Chip/helpers.d.ts +6 -0
  37. package/dist/components/Chip/types.d.ts +129 -1
  38. package/dist/components/CollapsibleNavBar/CollapsibleNavBar.d.ts +1 -1
  39. package/dist/components/CollapsibleNavBar/CollapsibleNavBarContext.d.ts +2 -2
  40. package/dist/components/CollapsibleNavBar/components/TriggerIcon.d.ts +4 -2
  41. package/dist/components/CollapsibleNavBar/types.d.ts +9 -2
  42. package/dist/components/ColorPicker/components/CopyButton.d.ts +1 -1
  43. package/dist/components/DatePicker/constants.d.ts +22 -0
  44. package/dist/components/DatePicker/hooks/useDatePicker.d.ts +7 -5
  45. package/dist/components/DatePicker/index.d.ts +1 -0
  46. package/dist/components/DatePicker/styles.d.ts +3 -2
  47. package/dist/components/DatePicker/types.d.ts +10 -2
  48. package/dist/components/DatePicker/utils/dates.d.ts +2 -2
  49. package/dist/components/DateRangePicker/DateRangePicker.d.ts +1 -1
  50. package/dist/components/DateRangePicker/DateRangePickerFormBridge.d.ts +46 -0
  51. package/dist/components/DateRangePicker/components/DatesListWrapper.d.ts +3 -2
  52. package/dist/components/DateRangePicker/constants.d.ts +1 -0
  53. package/dist/components/DateRangePicker/hooks/useDateRangePicker.d.ts +22 -17
  54. package/dist/components/DateRangePicker/index.d.ts +3 -0
  55. package/dist/components/DateRangePicker/styles.d.ts +6 -4
  56. package/dist/components/DateRangePicker/types.d.ts +24 -7
  57. package/dist/components/DateRangePicker/utils/dates.d.ts +2 -2
  58. package/dist/components/Drawer/index.d.ts +2 -1
  59. package/dist/components/Dropdown/Dropdown.d.ts +88 -0
  60. package/dist/components/Dropdown/types.d.ts +78 -0
  61. package/dist/components/DropdownOptions/DropdownOptions.d.ts +31 -0
  62. package/dist/components/DropdownOptions/types.d.ts +22 -0
  63. package/dist/components/DropdownToggle/DropdownToggle.d.ts +1 -1
  64. package/dist/components/Field/FieldControl.d.ts +62 -1
  65. package/dist/components/Field/FieldDescription.d.ts +33 -0
  66. package/dist/components/Field/FieldError.d.ts +36 -0
  67. package/dist/components/Field/FieldLabel.d.ts +37 -0
  68. package/dist/components/Field/FieldProvider.d.ts +19 -1
  69. package/dist/components/Field/FieldRoot.d.ts +90 -0
  70. package/dist/components/Field/FieldSuccess.d.ts +34 -0
  71. package/dist/components/Field/index.d.ts +4 -0
  72. package/dist/components/Filters/FilterBlockWrapper.d.ts +3 -2
  73. package/dist/components/Filters/FiltersContext.d.ts +4 -4
  74. package/dist/components/Filters/hooks/useVisibility.d.ts +2 -2
  75. package/dist/components/FullscreenModeContext.d.ts +1 -4
  76. package/dist/components/Icon/icons/iconsList.d.ts +1 -1
  77. package/dist/components/IconButton/IconButton.d.ts +39 -0
  78. package/dist/components/IconButton/index.d.ts +2 -0
  79. package/dist/components/IconButton/styles.d.ts +2 -0
  80. package/dist/components/IconButton/types.d.ts +41 -0
  81. package/dist/components/Indicator/types.d.ts +4 -2
  82. package/dist/components/Input/types.d.ts +157 -0
  83. package/dist/components/JsonSchemaForm/fields/DateRangeField.d.ts +15 -1
  84. package/dist/components/JsonSchemaForm/utils/dateFormats.d.ts +37 -0
  85. package/dist/components/JsonSchemaForm/utils/dateRangeField.d.ts +24 -0
  86. package/dist/components/JsonSchemaForm/utils/index.d.ts +1 -0
  87. package/dist/components/JsonSchemaForm/utils/selectWidget.d.ts +16 -0
  88. package/dist/components/Modal/Modal.d.ts +60 -0
  89. package/dist/components/Modal/types.d.ts +21 -1
  90. package/dist/components/ModalContent/ModalContent.d.ts +42 -1
  91. package/dist/components/ModalDialog/ModalDialog.d.ts +27 -0
  92. package/dist/components/ModalDialog/types.d.ts +18 -0
  93. package/dist/components/ModalDismissButton/ModalDismissButton.d.ts +29 -2
  94. package/dist/components/ModalOpenButton/ModalOpenButton.d.ts +25 -1
  95. package/dist/components/NavBar/types.d.ts +1 -1
  96. package/dist/components/NotificationMenu/types.d.ts +3 -3
  97. package/dist/components/Pagination/ArrowButton.d.ts +32 -0
  98. package/dist/components/Pagination/Pagination.d.ts +81 -0
  99. package/dist/components/Pagination/PaginationButtons.d.ts +35 -0
  100. package/dist/components/Pagination/PaginationContext.d.ts +30 -0
  101. package/dist/components/Pagination/WithPagination.d.ts +47 -4
  102. package/dist/components/Pagination/components/RowsPerPageDropdown/RowsPerPageDropdown.d.ts +41 -0
  103. package/dist/components/Pagination/components/RowsPerPageDropdown/types.d.ts +39 -0
  104. package/dist/components/Pagination/styles.d.ts +1 -1
  105. package/dist/components/Pagination/types.d.ts +178 -0
  106. package/dist/components/PersonInfo/styles.d.ts +1 -1
  107. package/dist/components/Popover/Popover.d.ts +120 -0
  108. package/dist/components/Popover/PopoverClose.d.ts +26 -0
  109. package/dist/components/Popover/PopoverContent.d.ts +33 -0
  110. package/dist/components/Popover/PopoverDescription.d.ts +22 -1
  111. package/dist/components/Popover/PopoverHeading.d.ts +22 -1
  112. package/dist/components/Popover/PopoverTrigger.d.ts +30 -0
  113. package/dist/components/Popover/hooks/usePopover.d.ts +21 -0
  114. package/dist/components/Popover/hooks/usePopoverContext.d.ts +23 -0
  115. package/dist/components/Popover/types.d.ts +86 -0
  116. package/dist/components/Radio/Radio.d.ts +69 -1
  117. package/dist/components/Radio/RadioBase.d.ts +1 -1
  118. package/dist/components/Radio/types.d.ts +109 -0
  119. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  120. package/dist/components/RadioGroup/index.d.ts +1 -0
  121. package/dist/components/RadioGroup/types.d.ts +42 -0
  122. package/dist/components/SearchBox/SearchBox.d.ts +60 -0
  123. package/dist/components/SearchBox/SearchBoxInput.d.ts +1 -1
  124. package/dist/components/SearchBox/types.d.ts +46 -0
  125. package/dist/components/Slider/Slider.d.ts +53 -0
  126. package/dist/components/Slider/consts.d.ts +4 -0
  127. package/dist/components/Slider/index.d.ts +4 -0
  128. package/dist/components/Slider/styles.d.ts +90 -0
  129. package/dist/components/Slider/types.d.ts +69 -0
  130. package/dist/components/Switch/Switch.d.ts +66 -1
  131. package/dist/components/Switch/SwitchBase.d.ts +5 -1
  132. package/dist/components/Switch/SwitchContext.d.ts +50 -0
  133. package/dist/components/Switch/types.d.ts +74 -0
  134. package/dist/components/Table/Table.d.ts +74 -0
  135. package/dist/components/TableBody/TableBody.d.ts +55 -0
  136. package/dist/components/TableCell/TableCell.d.ts +56 -4
  137. package/dist/components/TableCell/types.d.ts +33 -0
  138. package/dist/components/TableCellHeader/TableCellHeader.d.ts +63 -2
  139. package/dist/components/TableCellHeader/types.d.ts +28 -0
  140. package/dist/components/TableFilters/TableFilters.d.ts +72 -0
  141. package/dist/components/TableFilters/hooks/useTableData.d.ts +3 -3
  142. package/dist/components/TableFilters/types.d.ts +130 -2
  143. package/dist/components/TableHead/TableHead.d.ts +37 -0
  144. package/dist/components/TableRow/TableRow.d.ts +2 -7
  145. package/dist/components/TableRow/types.d.ts +34 -0
  146. package/dist/components/TextField/TextField.d.ts +76 -0
  147. package/dist/components/TextField/types.d.ts +80 -0
  148. package/dist/components/Textarea/Textarea.d.ts +81 -0
  149. package/dist/components/Textarea/types.d.ts +95 -0
  150. package/dist/components/Tooltip/SimpleChartTooltip.d.ts +2 -1
  151. package/dist/components/Tooltip/Tooltip.d.ts +73 -0
  152. package/dist/components/Tooltip/types.d.ts +116 -5
  153. package/dist/components/TooltipContent/TooltipContent.d.ts +45 -0
  154. package/dist/components/TooltipTrigger/TooltipTrigger.d.ts +27 -1
  155. package/dist/components/Typeahead/Typeahead.context.d.ts +10 -4
  156. package/dist/components/Typeahead/Typeahead.d.ts +173 -9
  157. package/dist/components/Typeahead/components/TypeaheadOption.d.ts +1 -1
  158. package/dist/components/Typeahead/styles.d.ts +9 -4
  159. package/dist/components/Typeahead/types.d.ts +191 -1
  160. package/dist/components/Typeahead/useTypeahead.d.ts +13 -5
  161. package/dist/components/Typography/Typography.d.ts +50 -0
  162. package/dist/components/Typography/types.d.ts +67 -0
  163. package/dist/components/UserProfile/UserProfile.d.ts +76 -0
  164. package/dist/components/UserProfile/styles.d.ts +6 -4
  165. package/dist/components/UserProfile/types.d.ts +85 -1
  166. package/dist/components/WidgetCard/Title.d.ts +1 -1
  167. package/dist/components/WidgetCard/WidgetCardBase.d.ts +1 -1
  168. package/dist/components/WithLink.d.ts +1 -1
  169. package/dist/components/Wrapper/Wrapper.d.ts +83 -2
  170. package/dist/components/Wrapper/index.d.ts +1 -0
  171. package/dist/components/index.d.ts +113 -85
  172. package/dist/index.d.ts +1 -0
  173. package/dist/index.js +47400 -19567
  174. package/dist/index.js.map +1 -1
  175. package/dist/types/emotion.d.ts +63 -0
  176. package/dist/utils/react19HocCompat.d.ts +14 -0
  177. package/package.json +42 -33
@@ -1,2 +1,39 @@
1
1
  import { AccordionViewProps } from './types';
2
+ /**
3
+ * Accordion - Individual accordion item component
4
+ *
5
+ * A single accordion item that can be expanded or collapsed. Uses render props pattern
6
+ * for flexible content and title rendering. Must be used as a child of AccordionGroup.
7
+ *
8
+ * The component renders a CardBase with a title header and collapsible content panel.
9
+ * The open/close state is managed by the parent AccordionGroup through context.
10
+ *
11
+ * @category Components
12
+ * @subcategory Layout
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <Accordion
17
+ * id="accordion-1"
18
+ * title="Click to expand"
19
+ * ariaControls="panel-1"
20
+ * isOpened={false}
21
+ * renderTitle={AccordionTitle}
22
+ * renderContent={(props) => (
23
+ * <AccordionContent {...props}>
24
+ * <p>Accordion content goes here</p>
25
+ * </AccordionContent>
26
+ * )}
27
+ * />
28
+ * ```
29
+ *
30
+ * @see {@link AccordionGroup} - Parent container component
31
+ * @see {@link AccordionTitle} - Default title render function
32
+ * @see {@link AccordionContent} - Default content component
33
+ *
34
+ * @accessibility
35
+ * - Uses role="region" for semantic structure
36
+ * - ARIA controls and labelledby attributes for accessibility
37
+ * - Keyboard accessible
38
+ */
2
39
  export declare const Accordion: ({ title, isOpened, ariaControls, id, size, contentProps, renderTitle, renderContent, onClick, ...rest }: AccordionViewProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,4 +1,52 @@
1
1
  import { RenderContentProps } from './types';
2
+ /**
3
+ * AccordionContent - Default component for accordion content panels
4
+ *
5
+ * A pre-built component for rendering accordion content that handles styling
6
+ * and accessibility attributes. Can be used as the content in `renderContent`
7
+ * prop for Accordion components, or as a reference for custom content implementations.
8
+ *
9
+ * Features:
10
+ * - Proper ARIA attributes for accessibility
11
+ * - Size-aware styling
12
+ * - Smooth expand/collapse transitions
13
+ * - Accepts any React children
14
+ *
15
+ * @category Components
16
+ * @subcategory Layout
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <Accordion
21
+ * id="example"
22
+ * title="My Accordion"
23
+ * renderTitle={AccordionTitle}
24
+ * renderContent={(props) => (
25
+ * <AccordionContent {...props}>
26
+ * <p>This is the accordion content</p>
27
+ * <ul>
28
+ * <li>Item 1</li>
29
+ * <li>Item 2</li>
30
+ * </ul>
31
+ * </AccordionContent>
32
+ * )}
33
+ * />
34
+ * ```
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * // Custom content using AccordionContent props
39
+ * <Accordion
40
+ * renderContent={({ isOpened, ...props }) => (
41
+ * <div {...props} style={{ display: isOpened ? 'block' : 'none' }}>
42
+ * Custom content with conditional rendering
43
+ * </div>
44
+ * )}
45
+ * />
46
+ * ```
47
+ *
48
+ * @see {@link Accordion} - Parent component that uses this component
49
+ */
2
50
  export declare const AccordionContent: ({ isOpened, children, size, ...rest }: RenderContentProps & {
3
51
  children: React.ReactNode;
4
52
  }) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,6 +1,80 @@
1
1
  import { AccordionGroupContextProps } from './types';
2
+ /**
3
+ * React context for AccordionGroup state management
4
+ *
5
+ * Provides state and control functions to accordion components within an AccordionGroup.
6
+ * Used internally by AccordionGroupContextProvider and accessed via useAccordionGroupContext hook.
7
+ */
2
8
  export declare const AccordionGroupContext: import("react").Context<AccordionGroupContextProps>;
9
+ /**
10
+ * Hook to access AccordionGroup context
11
+ *
12
+ * Returns the AccordionGroup context value including opened accordions state,
13
+ * toggle functions, and stay-open behavior. Must be used within an AccordionGroupContextProvider.
14
+ *
15
+ * @returns AccordionGroupContextProps - Context value with state and control functions
16
+ * @throws Error if used outside AccordionGroupContextProvider
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * function CustomAccordionControl() {
21
+ * const { openedAccordions, toggleOpenedAccordion } = useAccordionGroupContext();
22
+ *
23
+ * return (
24
+ * <button onClick={() => toggleOpenedAccordion({ id: 'accordion-1' })}>
25
+ * Toggle Accordion 1
26
+ * </button>
27
+ * );
28
+ * }
29
+ * ```
30
+ *
31
+ * @see {@link AccordionGroupContextProvider} - Required provider component
32
+ */
3
33
  export declare const useAccordionGroupContext: () => AccordionGroupContextProps;
4
- export declare const AccordionGroupContextProvider: ({ children, }: {
34
+ /**
35
+ * Props for AccordionGroupContextProvider
36
+ */
37
+ export interface AccordionGroupContextProviderProps {
38
+ /**
39
+ * Child components that will have access to accordion context
40
+ * Should include AccordionGroup and Accordion components
41
+ */
5
42
  children: React.ReactNode;
6
- }) => import("@emotion/react/jsx-runtime").JSX.Element;
43
+ }
44
+ /**
45
+ * AccordionGroupContextProvider - Context provider for accordion group state
46
+ *
47
+ * Provides accordion state management context to all child components.
48
+ * This provider must wrap any AccordionGroup components to enable state management
49
+ * and coordination between multiple accordions.
50
+ *
51
+ * @category Components
52
+ * @subcategory Layout
53
+ *
54
+ * @example
55
+ * ```tsx
56
+ * <AccordionGroupContextProvider>
57
+ * <AccordionGroup>
58
+ * <Accordion id="1" title="Section 1" renderContent={...} renderTitle={AccordionTitle} />
59
+ * <Accordion id="2" title="Section 2" renderContent={...} renderTitle={AccordionTitle} />
60
+ * </AccordionGroup>
61
+ * </AccordionGroupContextProvider>
62
+ * ```
63
+ *
64
+ * @example
65
+ * ```tsx
66
+ * // Multiple accordion groups in the same provider
67
+ * <AccordionGroupContextProvider>
68
+ * <AccordionGroup size="large">
69
+ * <Accordion id="group1-1" ... />
70
+ * </AccordionGroup>
71
+ * <AccordionGroup size="medium">
72
+ * <Accordion id="group2-1" ... />
73
+ * </AccordionGroup>
74
+ * </AccordionGroupContextProvider>
75
+ * ```
76
+ *
77
+ * @see {@link AccordionGroup} - Component that requires this provider
78
+ * @see {@link useAccordionGroupContext} - Hook to access context
79
+ */
80
+ export declare const AccordionGroupContextProvider: ({ children, }: AccordionGroupContextProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,2 +1,58 @@
1
1
  import { AccordionGroupProps } from './types';
2
+ /**
3
+ * AccordionGroup - Container component for managing multiple accordion items
4
+ *
5
+ * Manages the state and behavior of multiple accordion components within a group.
6
+ * Supports both single and multiple accordion open modes, and provides size variants
7
+ * for different visual appearances. Must be used within an AccordionGroupContextProvider.
8
+ *
9
+ * Component structure:
10
+ * - AccordionGroupContextProvider (required wrapper)
11
+ * - AccordionGroup (manages accordion state)
12
+ * - Accordion (individual accordion items)
13
+ * - AccordionTitle (header with toggle)
14
+ * - AccordionContent (collapsible content)
15
+ *
16
+ * @category Components
17
+ * @subcategory Layout
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <AccordionGroupContextProvider>
22
+ * <AccordionGroup size="large" accordionsStayOpen={true}>
23
+ * <Accordion
24
+ * id="first"
25
+ * title="First Section"
26
+ * ariaControls="first-panel"
27
+ * renderContent={(props) => (
28
+ * <AccordionContent {...props}>
29
+ * <p>Content for first section</p>
30
+ * </AccordionContent>
31
+ * )}
32
+ * renderTitle={AccordionTitle}
33
+ * />
34
+ * </AccordionGroup>
35
+ * </AccordionGroupContextProvider>
36
+ * ```
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * // Single accordion open mode
41
+ * <AccordionGroup size="medium" accordionsStayOpen={false}>
42
+ * <Accordion id="1" title="Section 1" renderContent={...} renderTitle={AccordionTitle} />
43
+ * <Accordion id="2" title="Section 2" renderContent={...} renderTitle={AccordionTitle} />
44
+ * </AccordionGroup>
45
+ * ```
46
+ *
47
+ * @see {@link Accordion} - Individual accordion item component
48
+ * @see {@link AccordionGroupContextProvider} - Required context provider
49
+ * @see {@link AccordionTitle} - Default title render function
50
+ * @see {@link AccordionContent} - Default content component
51
+ *
52
+ * @accessibility
53
+ * - ARIA attributes set according to WAI-ARIA accordion pattern
54
+ * - Keyboard navigation support
55
+ * - Screen reader friendly
56
+ * - Proper focus management
57
+ */
2
58
  export declare const AccordionGroup: ({ children, size, accordionsStayOpen, ...rest }: AccordionGroupProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,2 +1,43 @@
1
1
  import { AccordionProps } from './types';
2
+ /**
3
+ * AccordionTitle - Default render function for accordion headers
4
+ *
5
+ * A pre-built render function for accordion titles that displays the title text
6
+ * with an expand/collapse icon indicator. Can be used as the `renderTitle` prop
7
+ * for Accordion components, or as a reference for custom title implementations.
8
+ *
9
+ * Features:
10
+ * - Displays title text with icon indicator
11
+ * - Shows carrot-up icon when closed, carrot-down when open
12
+ * - Proper ARIA attributes for accessibility
13
+ * - Click handler for toggling accordion state
14
+ *
15
+ * @category Components
16
+ * @subcategory Layout
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <Accordion
21
+ * id="example"
22
+ * title="My Accordion"
23
+ * renderTitle={AccordionTitle}
24
+ * renderContent={...}
25
+ * />
26
+ * ```
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * // Custom title using AccordionTitle as reference
31
+ * <Accordion
32
+ * renderTitle={({ title, isOpened, onClick }) => (
33
+ * <button onClick={onClick} aria-expanded={isOpened}>
34
+ * <span>{title}</span>
35
+ * <Icon name={isOpened ? "chevron-down" : "chevron-right"} />
36
+ * </button>
37
+ * )}
38
+ * />
39
+ * ```
40
+ *
41
+ * @see {@link Accordion} - Parent component that uses this render function
42
+ */
2
43
  export declare const AccordionTitle: AccordionProps['renderTitle'];
@@ -1,51 +1,249 @@
1
1
  import { SerializedStyles } from '@emotion/react';
2
2
  import { AriaAttributes } from 'react';
3
+ /**
4
+ * Size variants for accordion components
5
+ * Controls visual appearance and spacing
6
+ */
3
7
  export type AccordionSize = 'empty' | 'small' | 'medium' | 'large';
8
+ /**
9
+ * Style mapping for accordion sizes
10
+ */
4
11
  export type SizeStyles = {
5
12
  [K in AccordionSize]: SerializedStyles;
6
13
  };
7
14
  type AccordionGroupChildren = React.ReactElement<React.PropsWithChildren<AccordionViewProps>>;
15
+ /**
16
+ * Props for the AccordionGroup component
17
+ *
18
+ * A container component that manages multiple accordion items and their open/close state.
19
+ * Supports both single and multiple accordion open modes, and provides size variants
20
+ * for different visual appearances.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <AccordionGroupContextProvider>
25
+ * <AccordionGroup size="large" accordionsStayOpen={true}>
26
+ * <Accordion
27
+ * id="first"
28
+ * title="First Accordion"
29
+ * ariaControls="first-panel"
30
+ * renderContent={(props) => (
31
+ * <AccordionContent {...props}>
32
+ * <p>Content for first accordion</p>
33
+ * </AccordionContent>
34
+ * )}
35
+ * renderTitle={AccordionTitle}
36
+ * />
37
+ * <Accordion
38
+ * id="second"
39
+ * title="Second Accordion"
40
+ * ariaControls="second-panel"
41
+ * isOpened
42
+ * renderContent={(props) => (
43
+ * <AccordionContent {...props}>
44
+ * <p>Content for second accordion</p>
45
+ * </AccordionContent>
46
+ * )}
47
+ * renderTitle={AccordionTitle}
48
+ * />
49
+ * </AccordionGroup>
50
+ * </AccordionGroupContextProvider>
51
+ * ```
52
+ */
8
53
  export interface AccordionGroupProps {
54
+ /**
55
+ * Unique identifier for the accordion group
56
+ * Used for accessibility and testing purposes
57
+ */
9
58
  id?: string;
59
+ /**
60
+ * Accordion components as children
61
+ * Each child should be an Accordion component
62
+ */
10
63
  children: AccordionGroupChildren | AccordionGroupChildren[];
64
+ /**
65
+ * Size variant for the accordion group
66
+ * Controls padding, spacing, and visual appearance
67
+ * @default 'empty'
68
+ */
11
69
  size?: AccordionSize;
70
+ /**
71
+ * Whether multiple accordions can be open simultaneously
72
+ * When false, opening one accordion closes others
73
+ * @default true
74
+ */
12
75
  accordionsStayOpen?: boolean;
76
+ /**
77
+ * Custom CSS class name
78
+ */
13
79
  className?: string;
14
80
  }
81
+ /**
82
+ * Props for the Accordion component
83
+ *
84
+ * An individual accordion item that can be expanded or collapsed.
85
+ * Uses render props pattern for flexible content and title rendering.
86
+ *
87
+ * @example
88
+ * ```tsx
89
+ * <Accordion
90
+ * id="accordion-1"
91
+ * title="Click to expand"
92
+ * ariaControls="panel-1"
93
+ * isOpened={false}
94
+ * renderTitle={AccordionTitle}
95
+ * renderContent={(props) => (
96
+ * <AccordionContent {...props}>
97
+ * <p>Accordion content goes here</p>
98
+ * </AccordionContent>
99
+ * )}
100
+ * />
101
+ * ```
102
+ */
15
103
  export interface AccordionProps {
104
+ /**
105
+ * Unique identifier for the accordion
106
+ * Used for state management and accessibility
107
+ */
16
108
  id: number | string;
109
+ /**
110
+ * Size variant for the accordion
111
+ * Inherits from AccordionGroup if not specified
112
+ */
17
113
  size?: AccordionSize;
114
+ /**
115
+ * Render function for the accordion title
116
+ * Receives title data and control props
117
+ */
18
118
  renderTitle: (data: RenderContentProps & {
19
119
  title: string;
20
120
  ariaControls?: string;
21
121
  onClick?: () => void;
22
122
  }) => React.ReactNode;
123
+ /**
124
+ * Render function for the accordion content
125
+ * Receives content props including open state
126
+ */
23
127
  renderContent: (accordion: RenderContentProps) => React.ReactNode;
128
+ /**
129
+ * Custom element type to render as
130
+ * Allows composition with other components
131
+ */
24
132
  as?: React.ElementType;
133
+ /**
134
+ * Custom CSS class name
135
+ */
25
136
  className?: string;
26
137
  }
138
+ /**
139
+ * Props passed to render functions for accordion content
140
+ *
141
+ * Contains accordion state and accessibility attributes
142
+ * that are passed to renderContent and renderTitle functions.
143
+ */
27
144
  export type RenderContentProps = Pick<AccordionProps, 'id' | 'size'> & Pick<AriaAttributes, 'aria-labelledby'> & {
145
+ /**
146
+ * Whether the accordion is currently open
147
+ * @default false
148
+ */
28
149
  isOpened?: boolean;
150
+ /**
151
+ * Custom element type to render as
152
+ */
29
153
  as?: React.ElementType;
154
+ /**
155
+ * Custom CSS class name
156
+ */
30
157
  className?: string;
31
158
  } & Record<string, unknown>;
159
+ /**
160
+ * Extended props for Accordion component view
161
+ *
162
+ * Includes all AccordionProps plus additional view-specific properties
163
+ * like title, open state, and event handlers.
164
+ */
32
165
  export interface AccordionViewProps extends AccordionProps {
166
+ /**
167
+ * ARIA controls attribute
168
+ * Links the accordion header to its content panel
169
+ * Should match the id of the content panel
170
+ */
33
171
  ariaControls?: string;
172
+ /**
173
+ * Whether the accordion is currently open
174
+ * @default false
175
+ */
34
176
  isOpened?: boolean;
177
+ /**
178
+ * Whether the accordion is hidden
179
+ * Used for conditional rendering
180
+ * @default false
181
+ */
35
182
  isHidden?: boolean;
183
+ /**
184
+ * Title text displayed in the accordion header
185
+ */
36
186
  title: string;
187
+ /**
188
+ * Click handler for the accordion header
189
+ * Called when user clicks to toggle accordion
190
+ */
37
191
  onClick?: () => void;
192
+ /**
193
+ * Additional content to render
194
+ */
38
195
  children?: React.ReactNode;
196
+ /**
197
+ * Additional props to pass to content render function
198
+ * Allows passing custom props to AccordionContent
199
+ */
39
200
  contentProps?: Record<string, unknown>;
40
201
  }
202
+ /**
203
+ * Represents an opened accordion in the group state
204
+ *
205
+ * Used to track which accordions are currently open
206
+ * in the AccordionGroup context.
207
+ */
41
208
  export type OpenedAccordion = {
209
+ /**
210
+ * Unique identifier of the opened accordion
211
+ */
42
212
  id: string | number;
43
213
  };
214
+ /**
215
+ * Context props for AccordionGroup
216
+ *
217
+ * Provides state and control functions to accordion components
218
+ * within an AccordionGroup. Used internally by the context provider.
219
+ */
44
220
  export interface AccordionGroupContextProps {
221
+ /**
222
+ * Array of currently opened accordions
223
+ * Contains accordion IDs that are currently expanded
224
+ */
45
225
  openedAccordions: Array<OpenedAccordion> | [];
226
+ /**
227
+ * Whether multiple accordions can stay open
228
+ * When false, only one accordion can be open at a time
229
+ */
46
230
  stayOpen: boolean;
47
- setOpenedAccordions: (accordions: Array<OpenedAccordion>) => void;
231
+ /**
232
+ * Function to set the opened accordions array
233
+ * Used internally for state management
234
+ */
235
+ setOpenedAccordions: React.Dispatch<React.SetStateAction<Array<OpenedAccordion>>>;
236
+ /**
237
+ * Function to toggle an accordion's open state
238
+ * @param accordion - The accordion to toggle
239
+ * @param opened - Optional explicit open state (true/false)
240
+ * If not provided, toggles based on current state
241
+ */
48
242
  toggleOpenedAccordion: (accordion: OpenedAccordion, opened?: boolean) => void;
243
+ /**
244
+ * Function to set whether accordions can stay open
245
+ * Updates the stayOpen behavior dynamically
246
+ */
49
247
  setStayOpen: (isStayOpen: boolean) => void;
50
248
  }
51
249
  export {};
@@ -1,4 +1,37 @@
1
1
  import { CommonProps } from '../../types/emotion';
2
+ /**
3
+ * Avatar - Circular image component for user profiles
4
+ *
5
+ * A simple circular avatar component that displays an image with customizable size.
6
+ * The image is displayed with a circular border-radius and centered within the container.
7
+ *
8
+ * @category Components
9
+ * @subcategory Display
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * // Basic avatar
14
+ * <Avatar size={40} image="/path/to/avatar.jpg" />
15
+ * ```
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * // Large avatar
20
+ * <Avatar size={100} image={user.avatarUrl} />
21
+ * ```
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * // Avatar with custom styling
26
+ * <Avatar
27
+ * size={60}
28
+ * image="/avatar.png"
29
+ * css={{ border: '2px solid blue' }}
30
+ * />
31
+ * ```
32
+ *
33
+ * @see {@link UserProfile} - For complete user profile display with avatar
34
+ */
2
35
  declare const Avatar: import("@emotion/styled").StyledComponent<{
3
36
  theme?: import("@emotion/react").Theme;
4
37
  as?: React.ElementType;
@@ -1,3 +1,64 @@
1
1
  import { ButtonProps } from './types';
2
+ /**
3
+ * Button - Interactive button component for user actions.
4
+ *
5
+ * Variant colors are driven entirely by `theme.palette` — each variant reads
6
+ * `palette.<variant>.main` for the default background, `palette.<variant>.dark`
7
+ * for hover and active states, and `palette.<variant>.light` for focus state.
8
+ * Override any palette entry in a custom theme to restyle a variant without
9
+ * affecting other components.
10
+ *
11
+ * ### Variants (default: `tertiary`)
12
+ * - `primary` — blue, high emphasis, white text
13
+ * - `secondary` — grey, medium emphasis, dark text
14
+ * - `tertiary` — transparent background, dark text, focus outline only (default)
15
+ * - `error` — red, destructive actions, white text
16
+ * - `warning` — orange, caution actions, white text
17
+ * - `success` — green, confirmation actions, white text
18
+ *
19
+ * @category Form Controls
20
+ * @subcategory Action
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * // No variant passed → tertiary (transparent ghost button)
25
+ * <Button text="Cancel" onClick={handleCancel} />
26
+ * ```
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * <Button variant="primary" size="medium" onClick={handleSave}>
31
+ * Save
32
+ * </Button>
33
+ * ```
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * // Full-width block button
38
+ * <Button variant="primary" size="large" block type="submit">
39
+ * Submit Form
40
+ * </Button>
41
+ * ```
42
+ *
43
+ * @example
44
+ * ```tsx
45
+ * // Button with custom children
46
+ * <Button variant="secondary" onClick={handleAction}>
47
+ * <span>Custom Content</span>
48
+ * <Icon name="arrow-right" />
49
+ * </Button>
50
+ * ```
51
+ *
52
+ * @see {@link ButtonGroup} - For grouped button layouts
53
+ * @see {@link Icon} - For button icons
54
+ *
55
+ * @accessibility
56
+ * Supports full ARIA attributes including:
57
+ * - aria-label, aria-labelledby for accessible labels
58
+ * - aria-disabled for disabled state
59
+ * - aria-pressed for toggle buttons
60
+ * - Keyboard navigation (Enter/Space to activate)
61
+ * - Focus management
62
+ */
2
63
  export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
3
64
  export default Button;