etudes 14.2.0 → 14.4.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.
@@ -12,7 +12,7 @@ export type AccordionSelection = Record<number, number[]>;
12
12
  /**
13
13
  * Type describing the data of each section in {@link Accordion}.
14
14
  */
15
- export type AccordionSection<T> = Pick<CollectionProps<T>, 'isSelectionTogglable' | 'itemLength' | 'itemPadding' | 'items' | 'layout' | 'numSegments'> & {
15
+ export type AccordionSectionProps<T> = Pick<CollectionProps<T>, 'isSelectionTogglable' | 'itemLength' | 'itemPadding' | 'items' | 'layout' | 'numSegments'> & {
16
16
  /**
17
17
  * Padding (in pixels) between the section header and the internal collection.
18
18
  */
@@ -37,7 +37,7 @@ export type AccordionItemProps<T> = CollectionItemProps<T>;
37
37
  * Type describing the props of each `HeaderComponent` provided to
38
38
  * {@link Accordion}.
39
39
  */
40
- export type AccordionHeaderProps<I, S extends AccordionSection<I> = AccordionSection<I>> = HTMLAttributes<HTMLElement> & {
40
+ export type AccordionHeaderProps<I, S extends AccordionSectionProps<I> = AccordionSectionProps<I>> = HTMLAttributes<HTMLElement> & {
41
41
  /**
42
42
  * The index of the corresponding section.
43
43
  */
@@ -61,7 +61,7 @@ export type AccordionHeaderProps<I, S extends AccordionSection<I> = AccordionSec
61
61
  /**
62
62
  * Type describing the props of {@link Accordion}.
63
63
  */
64
- export type AccordionProps<I, S extends AccordionSection<I> = AccordionSection<I>> = HTMLAttributes<HTMLDivElement> & {
64
+ export type AccordionProps<I, S extends AccordionSectionProps<I> = AccordionSectionProps<I>> = HTMLAttributes<HTMLDivElement> & {
65
65
  /**
66
66
  * Specifies if expanded sections should automatically collapse upon expanding
67
67
  * another section.
@@ -204,9 +204,10 @@ export type AccordionProps<I, S extends AccordionSection<I> = AccordionSection<I
204
204
  * @exports AccordionHeader Component for each section header.
205
205
  * @exports AccordionExpandIcon Component for the expand icon of each section.
206
206
  * @exports AccordionCollapseIcon Component for the collapse icon of each
207
+ * @exports AccordionSection Component for each section.
207
208
  * @exports AccordionItem Component for each item in each section.
208
209
  */
209
- export declare const Accordion: <I, S extends AccordionSection<I> = AccordionSection<I>>(props: Readonly<AccordionProps<I, S> & {
210
+ export declare const Accordion: <I, S extends AccordionSectionProps<I> = AccordionSectionProps<I>>(props: Readonly<AccordionProps<I, S> & {
210
211
  ref?: Ref<HTMLDivElement>;
211
212
  }>) => ReactElement;
212
213
  /**
@@ -230,6 +231,10 @@ export declare const AccordionCollapseIcon: {
230
231
  ({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
231
232
  displayName: string;
232
233
  };
234
+ /**
235
+ * Component for each section in an {@link Accordion}.
236
+ */
237
+ export declare const AccordionSection: ({ children, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
233
238
  /**
234
239
  * Component for each item of each section of an {@link Accordion}.
235
240
  */
@@ -72,7 +72,7 @@ export type CollectionProps<T> = HTMLAttributes<HTMLDivElement> & {
72
72
  /**
73
73
  * Generically typed data of each item.
74
74
  */
75
- items: T[];
75
+ items?: T[];
76
76
  /**
77
77
  * Specifies the layout appearance of this component.
78
78
  *
@@ -87,26 +87,33 @@ export type DropdownProps<T> = HTMLAttributes<HTMLDivElement> & CollectionProps<
87
87
  * supports both horizontal and vertical orientations. Provide `items` and
88
88
  * `ItemComponent` props to populate.
89
89
  *
90
+ * @exports DropdownCollection Component containing the items.
91
+ * @exports DropdownItem Component for each item.
90
92
  * @exports DropdownToggle Component for the toggle button.
91
- * @exports DropdownExpandIcon Component for the expand icon.
92
93
  * @exports DropdownCollapseIcon Component for the collapse icon.
93
- * @exports DropdownItem Component for each item.
94
+ * @exports DropdownExpandIcon Component for the expand icon.
94
95
  */
95
96
  export declare const Dropdown: <T>(props: Readonly<DropdownProps<T> & {
96
97
  ref?: Ref<HTMLDivElement>;
97
98
  }>) => ReactElement;
98
99
  /**
99
- * Component for the toggle button of a {@link Dropdown}.
100
+ * Component containing the items in a {@link Dropdown}.
100
101
  */
101
- export declare const DropdownToggle: {
102
- ({ children, ...props }: HTMLAttributes<HTMLButtonElement> & DropdownToggleProps): import("react/jsx-runtime").JSX.Element;
102
+ export declare const DropdownCollection: <T>(props: Readonly<CollectionProps<T> & {
103
+ ref?: Ref<HTMLDivElement>;
104
+ }>) => ReactElement;
105
+ /**
106
+ * Component for each item in a {@link Dropdown}.
107
+ */
108
+ export declare const DropdownItem: {
109
+ ({ children, selectionMode, onActivateAt, ...props }: HTMLAttributes<HTMLDivElement | HTMLButtonElement> & Pick<CollectionProps<any>, "selectionMode" | "onActivateAt">): import("react/jsx-runtime").JSX.Element;
103
110
  displayName: string;
104
111
  };
105
112
  /**
106
- * Component for the expand icon of a {@link Dropdown}.
113
+ * Component for the toggle button of a {@link Dropdown}.
107
114
  */
108
- export declare const DropdownExpandIcon: {
109
- ({ children, style, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
115
+ export declare const DropdownToggle: {
116
+ ({ children, ...props }: HTMLAttributes<HTMLButtonElement> & DropdownToggleProps): import("react/jsx-runtime").JSX.Element;
110
117
  displayName: string;
111
118
  };
112
119
  /**
@@ -117,9 +124,9 @@ export declare const DropdownCollapseIcon: {
117
124
  displayName: string;
118
125
  };
119
126
  /**
120
- * Component for each item in a {@link Dropdown}.
127
+ * Component for the expand icon of a {@link Dropdown}.
121
128
  */
122
- export declare const DropdownItem: {
123
- ({ children, selectionMode, onActivateAt, ...props }: HTMLAttributes<HTMLDivElement | HTMLButtonElement> & Pick<CollectionProps<any>, "selectionMode" | "onActivateAt">): import("react/jsx-runtime").JSX.Element;
129
+ export declare const DropdownExpandIcon: {
130
+ ({ children, style, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
124
131
  displayName: string;
125
132
  };