@nimbus-ds/patterns 1.0.0-rc.1

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,28 @@
1
+ # Changelog
2
+
3
+ Nimbus is an open-source Design System created by Tiendanube / Nuvesmhop’s team to empower and enhance more stories every day, with simplicity, accessibility, consistency and performance.
4
+
5
+ ## 2022-04-06 `1.0.0`
6
+
7
+ #### πŸŽ‰ New features
8
+
9
+ - Added `@nimbus-ds/app-shell` to pattern pack. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
10
+ - Added `@nimbus-ds/callout-card` to pattern pack. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
11
+ - Added `@nimbus-ds/data-list` to pattern pack. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
12
+ - Added `@nimbus-ds/data-table` to pattern pack. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
13
+ - Added `@nimbus-ds/empty-message` to pattern pack. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
14
+ - Added `@nimbus-ds/formfield` to pattern pack. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
15
+ - Added `@nimbus-ds/interactive-list` to pattern pack. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
16
+ - Added `@nimbus-ds/layout` to pattern pack. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
17
+ - Added `@nimbus-ds/menu` to pattern pack. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
18
+ - Added `@nimbus-ds/menubutton` to pattern pack. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
19
+ - Added `@nimbus-ds/nav-tabs` to pattern pack. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
20
+ - Added `@nimbus-ds/page` to pattern pack. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
21
+ - Added `@nimbus-ds/productupdates` to pattern pack. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
22
+ - Added `@nimbus-ds/sidemodal` to pattern pack. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
23
+ - Added `@nimbus-ds/thumbnail-with-action` to pattern pack. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
24
+
25
+ #### πŸ“š 3rd party library updates
26
+
27
+ - Added `@nimbus-ds/components@4.x`. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
28
+ - Added `@nimbus-ds/icons@1.x`. ([#33](https://github.com/TiendaNube/nimbus-patterns/pull/33) by [@juniorconquista](https://github.com/juniorconquista))
package/README.md ADDED
@@ -0,0 +1,235 @@
1
+ # `@nimbus-ds/patterns`
2
+
3
+ [![@nimbus-ds/patterns](https://img.shields.io/npm/v/@nimbus-ds/patterns?label=%40nimbus-ds%2Fpatterns)](https://www.npmjs.com/package/@nimbus-ds/patterns)
4
+
5
+ Nimbus components is a component library built with [React](https://reactjs.org), designed to help our teams and ecosystem build better products for our merchants.
6
+
7
+ ## πŸš€ Getting started
8
+
9
+ Install `@nimbus-ds/patterns` using any package manager.
10
+
11
+ ```sh
12
+ $ yarn add @nimbus-ds/patterns
13
+ # or
14
+ $ npm install @nimbus-ds/patterns
15
+ ```
16
+
17
+ ## πŸ’» Usage
18
+
19
+ ```jsx
20
+ import { Button } from "@nimbus-ds/patterns";
21
+
22
+ const ComponentExample = () => <Button>Hello World</Button>;
23
+ ```
24
+
25
+ For more information about our components, check out our [Storybook](https://tiendanube.github.io/nimbus-design-system/).
26
+
27
+ ### Folder & file structures πŸ“ πŸ“„
28
+
29
+ - For best practices in structure files please read this [document](https://redux.js.org/style-guide/style-guide#structure-files-as-feature-folders-with-single-file-logic)
30
+ - When creating a new component, do so inside the **src/atomic** or **src/composite** directory
31
+
32
+ ```
33
+ β”œβ”€ πŸ“ src
34
+ β”‚ └─ πŸ“ components
35
+ ```
36
+
37
+ - Every directory must contain a πŸ“„ **CHANGELOG.md** which serves to document all changes and changes made to each component.
38
+
39
+ ```
40
+ β”œβ”€ πŸ“ src
41
+ β”‚ β”œβ”€ πŸ“ components
42
+ β”‚ β”‚ β”œβ”€ πŸ“ ComponentExample
43
+ β”‚ β”‚ β”‚ β”œβ”€ πŸ“ src
44
+ β”‚ β”‚ β”‚ └─ CHANGELOG.md
45
+ ```
46
+
47
+ - Every directory should contain a πŸ“„ **README.md** which serves to document the installation steps and a brief summary of each component.
48
+
49
+ ```
50
+ β”œβ”€ πŸ“ src
51
+ β”‚ β”œβ”€ πŸ“ components
52
+ β”‚ β”‚ β”œβ”€ πŸ“ ComponentExample
53
+ β”‚ β”‚ β”‚ β”œβ”€ πŸ“ src
54
+ β”‚ β”‚ β”‚ β”œβ”€ CHANGELOG.md
55
+ β”‚ β”‚ β”‚ └─ README.md
56
+ ```
57
+
58
+ - The directory should have the same name as the component. The component file should have the name of the component in Pascal Case format and the extension `.tsx`
59
+
60
+ ```
61
+ β”œβ”€ πŸ“ src
62
+ β”‚ β”œβ”€ πŸ“ components
63
+ β”‚ β”‚ β”œβ”€ πŸ“ ComponentExample
64
+ β”‚ β”‚ β”‚ β”œβ”€ πŸ“ src
65
+ β”‚ β”‚ β”‚ β”‚ └─ ComponentExample.tsx
66
+ β”‚ β”‚ β”‚ β”œβ”€ CHANGELOG.md
67
+ β”‚ β”‚ β”‚ └─ README.md
68
+ ```
69
+
70
+ - Every directory should contain a πŸ“„ **index.ts** which serves as an entry point for the module, component, utils and/or hooks.
71
+
72
+ ```
73
+ β”œβ”€ πŸ“ src
74
+ β”‚ β”œβ”€ πŸ“ components
75
+ β”‚ β”‚ β”œβ”€ πŸ“ ComponentExample
76
+ β”‚ β”‚ β”‚ β”œβ”€ πŸ“ src
77
+ β”‚ β”‚ β”‚ β”‚ β”œβ”€ index.ts
78
+ β”‚ β”‚ β”‚ β”‚ └─ ComponentExample.tsx
79
+ β”‚ β”‚ β”‚ β”œβ”€ CHANGELOG.md
80
+ β”‚ β”‚ β”‚ └─ README.md
81
+ ```
82
+
83
+ - Every component, utils and/or hooks should come with a test. The test must have the same name as the file being tested and the extension must be `.spec.tsx`
84
+
85
+ ```
86
+ β”œβ”€ πŸ“ src
87
+ β”‚ β”œβ”€ πŸ“ components
88
+ β”‚ β”‚ β”œβ”€ πŸ“ ComponentExample
89
+ β”‚ β”‚ β”‚ β”œβ”€ πŸ“ src
90
+ β”‚ β”‚ β”‚ β”‚ β”œβ”€ index.ts
91
+ β”‚ β”‚ β”‚ β”‚ β”œβ”€ ComponentExample.tsx
92
+ β”‚ β”‚ β”‚ β”‚ └─ componentExample.spec.tsx
93
+ β”‚ β”‚ β”‚ β”œβ”€ CHANGELOG.md
94
+ β”‚ β”‚ β”‚ └─ README.md
95
+ ```
96
+
97
+ - Every component must come with documentation. The documentation must have the same name as the file being documented and the extension must be `.stories.tsx`.
98
+
99
+ ```
100
+ β”œβ”€ πŸ“ src
101
+ β”‚ β”œβ”€ πŸ“ components
102
+ β”‚ β”‚ β”œβ”€ πŸ“ ComponentExample
103
+ β”‚ β”‚ β”‚ β”œβ”€ πŸ“ src
104
+ β”‚ β”‚ β”‚ β”‚ β”œβ”€ index.ts
105
+ β”‚ β”‚ β”‚ β”‚ β”œβ”€ ComponentExample.tsx
106
+ β”‚ β”‚ β”‚ β”‚ β”œβ”€ componentExample.spec.tsx
107
+ β”‚ β”‚ β”‚ β”‚ └─ componentExample.stories.tsx
108
+ β”‚ β”‚ β”‚ β”œβ”€ CHANGELOG.md
109
+ β”‚ β”‚ β”‚ └─ README.md
110
+ ```
111
+
112
+ - Every component must come with a typing. The type must have the same name as the file being documented and the extension must be `.types.tsx`.
113
+
114
+ ```
115
+ β”œβ”€ πŸ“ src
116
+ β”‚ β”œβ”€ πŸ“ components
117
+ β”‚ β”‚ β”œβ”€ πŸ“ ComponentExample
118
+ β”‚ β”‚ β”‚ β”œβ”€ πŸ“ src
119
+ β”‚ β”‚ β”‚ β”‚ β”œβ”€ index.ts
120
+ β”‚ β”‚ β”‚ β”‚ β”œβ”€ ComponentExample.tsx
121
+ β”‚ β”‚ β”‚ β”‚ β”œβ”€ componentExample.spec.tsx
122
+ β”‚ β”‚ β”‚ β”‚ β”œβ”€ componentExample.stories.tsx
123
+ β”‚ β”‚ β”‚ β”‚ └─ componentExample.types.ts
124
+ β”‚ β”‚ β”‚ β”œβ”€ CHANGELOG.md
125
+ β”‚ β”‚ β”‚ └─ README.md
126
+ ```
127
+
128
+ - If a component has one or more children components, a subdirectory **πŸ“ components** must be created inside de main directory of the component.
129
+
130
+ ```
131
+ β”œβ”€ πŸ“ src
132
+ β”‚ β”œβ”€ πŸ“ components
133
+ β”‚ β”‚ β”œβ”€ πŸ“ ComponentExample
134
+ β”‚ β”‚ β”‚ β”œβ”€ πŸ“ src
135
+ β”‚ β”‚ β”‚ β”‚ β”œβ”€ πŸ“ components
136
+ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€ πŸ“ ComponentChild
137
+ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€ index.ts
138
+ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€ ComponentChild.tsx
139
+ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€ componentChild.spec.tsx
140
+ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─ componentExample.types.ts
141
+ β”‚ β”‚ β”‚ β”‚ β”‚ └─ index.ts
142
+ β”‚ β”‚ β”‚ β”‚ β”œβ”€ index.ts
143
+ β”‚ β”‚ β”‚ β”‚ β”œβ”€ ComponentExample.tsx
144
+ β”‚ β”‚ β”‚ β”‚ β”œβ”€ componentExample.spec.tsx
145
+ β”‚ β”‚ β”‚ β”‚ β”œβ”€ componentExample.stories.tsx
146
+ β”‚ β”‚ β”‚ β”‚ └─ componentExample.types.ts
147
+ β”‚ β”‚ β”‚ β”œβ”€ CHANGELOG.md
148
+ β”‚ β”‚ β”‚ └─ README.md
149
+ ```
150
+
151
+ ### Component coding πŸ€– ⌨️
152
+
153
+ - The component should have the same name as the file using Pascal Case format. It should be declared in a Arrow Function, always typying the expected answer and making the default export at the end of the file.
154
+
155
+ ```jsx
156
+ // ComponentExample.tsx
157
+ import React from "react";
158
+
159
+ const ComponentExample: React.FC = () => <div>...</div>;
160
+
161
+ export { ComponentExample };
162
+ ```
163
+
164
+ - If the component has props, they will be imported from the corresponding `.definitions.ts` file adding initial prefix corresponding to their type. Example interface ` ILogin`, type `TLogin`, enum `ELogin`.
165
+
166
+ ```jsx
167
+ // ComponentExample.tsx
168
+ import React from "react";
169
+ import { ComponentExampleProps } from "./componentExampleProps.types";
170
+
171
+ const ComponentExample: React.FC<ComponentExampleProps> = ({
172
+ title,
173
+ description,
174
+ }) => (
175
+ <div>
176
+ <h1>{title}</h1>
177
+ <p>{description}</p>
178
+ </div>
179
+ );
180
+
181
+ export { ComponentExample };
182
+ ```
183
+
184
+ ### Testing πŸ§ͺπŸ”¬
185
+
186
+ - For testing best practices, please read this [document](https://kentcdodds.com/blog/common-mistakes-with-react-testing-library).
187
+ - To create a test is necessary to import from the testing library both the render and the screen.
188
+
189
+ ```jsx
190
+ import { render, screen } from "@testing-library/react";
191
+ ```
192
+
193
+ - The component to be tested should also be imported.
194
+
195
+ ```jsx
196
+ import { render, screen } from "@testing-library/react";
197
+ import { ComponentExample } from "./ComponentExample";
198
+ ```
199
+
200
+ - The heading of the tests must be written following the order Given-When-Then [Documentation](https://cucumber.io/docs/gherkin/reference/)
201
+ - **Given** represents a precondition
202
+ - **When** an action
203
+ - **Then** a result or consequence of the action (user acceptance criteria).
204
+ - **And** a result or consequence of other consequence (user acceptance criteria).
205
+ - **But** a result which should not be possibly observable
206
+
207
+ ```jsx
208
+ import { render, screen } from "@testing-library/react";
209
+ import { ComponentExample } from "./ComponentExample";
210
+
211
+ describe("GIVEN <ComponentExample />", () => {
212
+ describe("WHEN rendered", () => {
213
+ it("THEN should display the correct text", () => {
214
+ ...
215
+ });
216
+ });
217
+ });
218
+ ```
219
+
220
+ - In this first instance, we will verify the right rendering of the component by checking the text in each of the elements.
221
+
222
+ ```jsx
223
+ import { render, screen } from "@testing-library/react";
224
+ import { ComponentExample } from "./ComponentExample";
225
+
226
+ describe("GIVEN <ComponentExample />", () => {
227
+ describe("WHEN rendered", () => {
228
+ it("THEN should display the correct text", () => {
229
+ render(<ComponentExample title="title" description="description" />);
230
+ expect(screen.getByText(/title/i)).toBeInTheDocument();
231
+ expect(screen.getByText(/description/i)).toBeInTheDocument();
232
+ });
233
+ });
234
+ });
235
+ ```
@@ -0,0 +1,325 @@
1
+ // Generated by dts-bundle-generator v8.0.0
2
+
3
+ import { BoxProps, ButtonProps, CheckboxProps, IconButtonProps, Link, PaginationProps, PopoverProps, RadioProps, SidebarProps, TableProps, TableRowProps, ThumbnailProps, ToggleProps } from '@nimbus-ds/components';
4
+ import { IconProps } from '@nimbus-ds/icons';
5
+ import { PolymorphicForwardRefComponent } from '@nimbus-ds/typings';
6
+ import React from 'react';
7
+ import { ButtonHTMLAttributes, ComponentPropsWithRef, FC, HTMLAttributes, MouseEventHandler, ReactNode } from 'react';
8
+
9
+ export interface AppShellHeaderProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
10
+ /** Optional content for the left-hand-side slot */
11
+ leftSlot?: ReactNode;
12
+ /** Optional content for the right-hand-side slot */
13
+ rightSlot?: ReactNode;
14
+ }
15
+ declare const AppShellHeader: React.FC<AppShellHeaderProps>;
16
+ export interface AppShellComponents {
17
+ Header: typeof AppShellHeader;
18
+ }
19
+ export interface AppShellProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
20
+ /** Content for the body of the application */
21
+ children: ReactNode;
22
+ /** Optional slot for left sidebar menu */
23
+ menu?: ReactNode;
24
+ }
25
+ export declare const AppShell: React.FC<AppShellProps> & AppShellComponents;
26
+ export interface CalloutCardProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
27
+ /** CalloutCard color */
28
+ appearance: "primary" | "success" | "warning" | "danger" | "neutral";
29
+ icon: FC<IconProps>;
30
+ /** Title */
31
+ title: string;
32
+ /** Subtitle */
33
+ subtitle: string;
34
+ /** Subtitle */
35
+ link?: ComponentPropsWithRef<typeof Link>;
36
+ /** Event fired when clicking the component */
37
+ onClick?: MouseEventHandler<HTMLElement>;
38
+ }
39
+ export declare const CalloutCard: React.FC<CalloutCardProps>;
40
+ export interface DataListRowProperties {
41
+ /** Optional padding for the row */
42
+ padding?: "small" | "base" | "none";
43
+ /** Content of the row */
44
+ children: ReactNode;
45
+ }
46
+ export type DataListRowProps = DataListRowProperties & Omit<HTMLAttributes<HTMLElement>, "color"> & Omit<BoxProps, "padding">;
47
+ declare const DataListRow: React.FC<DataListRowProps>;
48
+ export interface DataListComponents {
49
+ Row: typeof DataListRow;
50
+ }
51
+ export interface DataListProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
52
+ /** Content of the List component */
53
+ children: ReactNode;
54
+ }
55
+ export declare const DataList: React.FC<DataListProps> & DataListComponents;
56
+ export interface DataTableBulkActionsProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
57
+ /** Properties of the checkbox element rendered in the Bulk Actions component */
58
+ checkbox: Omit<CheckboxProps, "label" | "id">;
59
+ /** Optional link element rendered next to the Bulk Actions controller */
60
+ link?: ReactNode;
61
+ /** Action component that controls the Bulk Actions */
62
+ action: ReactNode;
63
+ /** Lable for the checkbox element */
64
+ label: string;
65
+ }
66
+ declare const DataTableBulkActions: React.FC<DataTableBulkActionsProps>;
67
+ export interface DataTableFooterProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
68
+ /** Left-hand side text intended for displaying an item count */
69
+ itemCount: string;
70
+ /** Pagination element rendered on the right-side of the footer */
71
+ pagination?: PaginationProps;
72
+ }
73
+ declare const DataTableFooter: React.FC<DataTableFooterProps>;
74
+ export interface DataTableHeaderProps extends HTMLAttributes<HTMLElement> {
75
+ /** Checkbox element rendered on the table header that controls all rows */
76
+ checkbox: CheckboxProps;
77
+ /** Row content */
78
+ children: ReactNode;
79
+ }
80
+ declare const DataTableHeader: React.FC<DataTableHeaderProps>;
81
+ export type DataTableRowExtends = TableRowProps & HTMLAttributes<HTMLElement>;
82
+ export interface DataTableRowProps extends DataTableRowExtends {
83
+ /** Checkbox element rendered on the row that controls whether the row is selected */
84
+ checkbox: CheckboxProps;
85
+ /** Content of the row */
86
+ children: ReactNode;
87
+ }
88
+ declare const DataTableRow: React.FC<DataTableRowProps>;
89
+ export type DataTableExtend = TableProps & HTMLAttributes<HTMLElement>;
90
+ export interface DataTableComponents {
91
+ BulkActions: typeof DataTableBulkActions;
92
+ Header: typeof DataTableHeader;
93
+ Footer: typeof DataTableFooter;
94
+ Row: typeof DataTableRow;
95
+ }
96
+ export interface DataTableProps extends DataTableExtend {
97
+ /** Bulk actions component rendered with a sticky position over the top of the table element */
98
+ bulkActions?: ReactNode;
99
+ /** Table header content */
100
+ header: ReactNode;
101
+ /** Optional table footer content */
102
+ footer?: ReactNode;
103
+ /** Table body content */
104
+ children: ReactNode;
105
+ }
106
+ export declare const DataTable: React.FC<DataTableProps> & DataTableComponents;
107
+ export interface EmptyMessageProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
108
+ /** Optional node that contains an illustration for the component. Will stack vertically on mobile and horizontally on desktop. */
109
+ illustration?: ReactNode;
110
+ /** Optional icon to display on top of the text. */
111
+ icon?: ReactNode;
112
+ /** Title of the component */
113
+ title: string;
114
+ /** Optional content text for additional context. */
115
+ text?: string;
116
+ /** Optional node to showcase buttons or actions. */
117
+ actions?: ReactNode;
118
+ }
119
+ export declare const EmptyMessage: React.FC<EmptyMessageProps>;
120
+ export interface InteractiveListStructureProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
121
+ /** Title of the list item element. Also used to generate the ID for the interactive element */
122
+ title: string;
123
+ /** Determines if the title is visible or not */
124
+ showTitle?: boolean;
125
+ /** Description of the list item element */
126
+ description?: string;
127
+ /** Custom content for the list item element */
128
+ children?: ReactNode;
129
+ }
130
+ declare const InteractiveListStructure: React.FC<InteractiveListStructureProps>;
131
+ export interface InteractiveListCheckboxItemProperties {
132
+ /** Checkbox props inherited from Nimbus components */
133
+ checkbox: CheckboxProps;
134
+ }
135
+ export type InteractiveListCheckboxItemProps = InteractiveListCheckboxItemProperties & Omit<HTMLAttributes<HTMLElement>, "color"> & InteractiveListStructureProps;
136
+ declare const InteractiveListCheckboxItem: React.FC<InteractiveListCheckboxItemProps>;
137
+ export interface InteractiveListRadioItemProperties {
138
+ /** Radio props inherited from Nimbus components */
139
+ radio: RadioProps;
140
+ }
141
+ export type InteractiveListRadioItemProps = InteractiveListRadioItemProperties & Omit<HTMLAttributes<HTMLElement>, "color"> & InteractiveListStructureProps;
142
+ declare const InteractiveListRadioItem: React.FC<InteractiveListRadioItemProps>;
143
+ export interface InteractiveListToggleItemProperties {
144
+ /** Toggle props inherited from Nimbus components */
145
+ toggle: ToggleProps;
146
+ }
147
+ export type InteractiveListToggleItemProps = InteractiveListToggleItemProperties & Omit<HTMLAttributes<HTMLElement>, "color"> & InteractiveListStructureProps;
148
+ declare const InteractiveListToggleItem: React.FC<InteractiveListToggleItemProps>;
149
+ export interface InteractiveListButtonItemProperties {
150
+ /** Button props inherited from Nimbus components */
151
+ iconButton: Omit<IconButtonProps, "backgroundColor" | "borderColor" | "size" | "source">;
152
+ }
153
+ export type InteractiveListButtonItemProps = InteractiveListButtonItemProperties & Omit<HTMLAttributes<HTMLElement>, "color"> & InteractiveListStructureProps;
154
+ declare const InteractiveListButtonItem: React.FC<InteractiveListButtonItemProps>;
155
+ export interface InteractiveListComponents {
156
+ Structure: typeof InteractiveListStructure;
157
+ ButtonItem: typeof InteractiveListButtonItem;
158
+ CheckboxItem: typeof InteractiveListCheckboxItem;
159
+ ToggleItem: typeof InteractiveListToggleItem;
160
+ RadioItem: typeof InteractiveListRadioItem;
161
+ }
162
+ export interface InteractiveListProps extends HTMLAttributes<HTMLElement> {
163
+ /** Content of the InteractiveList */
164
+ children: ReactNode;
165
+ }
166
+ export declare const InteractiveList: React.FC<InteractiveListProps> & InteractiveListComponents;
167
+ export interface LayoutSectionProperties {
168
+ /** Content of the section body */
169
+ children: ReactNode;
170
+ }
171
+ export type LayoutSectionProps = LayoutSectionProperties & Omit<BoxProps, "children" | "boxSizing" | "display" | "flexDirection"> & Omit<HTMLAttributes<HTMLElement>, "color">;
172
+ declare const LayoutSection: React.FC<LayoutSectionProps>;
173
+ export interface LayoutComponents {
174
+ Section: typeof LayoutSection;
175
+ }
176
+ export interface LayoutProperties {
177
+ /** Content to be rendered inside the layout. */
178
+ children: ReactNode;
179
+ /** Number of columns to be rendered for the children */
180
+ columns?: "1" | "2 - symmetric" | "2 - asymmetric" | "3";
181
+ }
182
+ export type LayoutProps = LayoutProperties & Omit<BoxProps, "children" | "boxSizing" | "display" | "gridTemplateColumns"> & HTMLAttributes<HTMLElement>;
183
+ export declare const Layout: React.FC<LayoutProps> & LayoutComponents;
184
+ export interface MenuButtonBaseProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "color"> {
185
+ /** Text label for the button */
186
+ label: string;
187
+ /** Function executed when clicking the button */
188
+ onClick?: () => void;
189
+ /** Sets an icon element on the left of the button */
190
+ startIcon?: FC<IconProps>;
191
+ /** Sets the state of the button as active/inactive */
192
+ active?: boolean;
193
+ /** Inner components displayed on the right of the button component */
194
+ children?: ReactNode;
195
+ }
196
+ export declare const MenuButton: PolymorphicForwardRefComponent<"a" | "button", MenuButtonBaseProps>;
197
+ export type MenuButtonProps = ComponentPropsWithRef<typeof MenuButton>;
198
+ export interface MenuHeaderProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
199
+ /** Content of the menu header */
200
+ children: ReactNode;
201
+ }
202
+ declare const MenuHeader: React.FC<MenuHeaderProps>;
203
+ export interface MenuBodyProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
204
+ /** Content of the menu body */
205
+ children: ReactNode;
206
+ }
207
+ declare const MenuBody: React.FC<MenuBodyProps>;
208
+ export type MenuFooterProps = Omit<MenuButtonProps, "children">;
209
+ declare const MenuFooter: React.FC<MenuFooterProps>;
210
+ export interface MenuSectionProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
211
+ /** Optional title of the section */
212
+ title?: string;
213
+ /** Content of the menu section */
214
+ children: ReactNode;
215
+ }
216
+ declare const MenuSection: React.FC<MenuSectionProps>;
217
+ export interface MenuComponents {
218
+ Section: typeof MenuSection;
219
+ Button: typeof MenuButton;
220
+ Header: typeof MenuHeader;
221
+ Body: typeof MenuBody;
222
+ Footer: typeof MenuFooter;
223
+ }
224
+ export interface MenuProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
225
+ /** Content of the menu */
226
+ children: ReactNode;
227
+ }
228
+ export declare const Menu: React.FC<MenuProps> & MenuComponents;
229
+ export interface NavTabsItemProperties {
230
+ /** Icon element to be rendered inside the button */
231
+ icon: ReactNode;
232
+ /** Controls whether the button is active or not */
233
+ active?: boolean;
234
+ /** Displays a small badge on top of the button */
235
+ badge?: boolean;
236
+ /** Function executed on click */
237
+ onClick: () => void;
238
+ }
239
+ export type NavTabsItemProps = NavTabsItemProperties & Omit<HTMLAttributes<HTMLElement>, "color"> & BoxProps;
240
+ declare const NavTabsItem: React.FC<NavTabsItemProps>;
241
+ export interface NavTabsComponents {
242
+ Item: typeof NavTabsItem;
243
+ }
244
+ export interface NavTabsProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
245
+ /** Content to be rendered inside the Nav element */
246
+ children: ReactNode;
247
+ }
248
+ export declare const NavTabs: React.FC<NavTabsProps> & NavTabsComponents;
249
+ export interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
250
+ /** Main title of the page. Corresponds to an h1 HTML tag */
251
+ title: string;
252
+ /** Optional subtitle for the page */
253
+ subtitle?: string;
254
+ /** Button stack that appears on the right-hand side of the title */
255
+ buttonStack?: ReactNode;
256
+ /** Optional header content that appears underneath the title and button stack */
257
+ children?: ReactNode;
258
+ }
259
+ declare const PageHeader: React.FC<PageHeaderProps>;
260
+ export interface PageBodyProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
261
+ /** Content of the page body */
262
+ children: ReactNode;
263
+ }
264
+ declare const PageBody: React.FC<PageBodyProps>;
265
+ export interface PageComponents {
266
+ Header: typeof PageHeader;
267
+ Body: typeof PageBody;
268
+ }
269
+ export interface PageProps extends Omit<HTMLAttributes<HTMLElement>, "color"> {
270
+ /** Content to be rendered inside the page body. */
271
+ children: ReactNode;
272
+ /** Optional parameter to define a maximum width of the page content. */
273
+ maxWidth?: string;
274
+ }
275
+ export declare const Page: React.FC<PageProps> & PageComponents;
276
+ export interface ProductUpdatesProperties {
277
+ /** Title of the Popover */
278
+ title: string;
279
+ /** Content text of the Popover */
280
+ text: string;
281
+ /** Optional content for the body of the Popover */
282
+ bodyContent?: ReactNode;
283
+ /** Optional bottom link to dismiss the Popover. If unset, an IconButton with an X will appear on the superior right corner. */
284
+ dismissLink?: ReactNode;
285
+ }
286
+ export type ProductUpdatesProps = ProductUpdatesProperties & Omit<PopoverProps, "content" | "appearance" | "padding" | "enabledDismiss"> & HTMLAttributes<HTMLElement>;
287
+ export declare const ProductUpdates: React.FC<ProductUpdatesProps>;
288
+ export type SideModalPadding = "none" | "base";
289
+ export interface SideModalProperties {
290
+ /** Title */
291
+ title?: string;
292
+ /** Action Title (ReactNode) */
293
+ titleAction?: ReactNode;
294
+ /** Action Header (ReactNode) */
295
+ headerAction?: ReactNode;
296
+ /** Icon Header (ReactNode) */
297
+ headerIcon?: ReactNode;
298
+ /** Body Content (ReactNode) */
299
+ children?: ReactNode;
300
+ /** Header padding */
301
+ paddingHeader?: SideModalPadding;
302
+ /** Body padding */
303
+ paddingBody?: SideModalPadding;
304
+ /** Footer padding */
305
+ paddingFooter?: SideModalPadding;
306
+ /** Footer element actions */
307
+ footer?: {
308
+ primaryAction: ButtonProps;
309
+ secondaryAction: ButtonProps;
310
+ };
311
+ }
312
+ export type SideModalProps = SideModalProperties & Pick<SidebarProps, "position" | "onRemove" | "open" | "padding" | "maxWidth"> & HTMLAttributes<HTMLElement>;
313
+ export declare const SideModal: React.FC<SideModalProps>;
314
+ export interface ThumbnailWithActionProperties {
315
+ /** Thumbnail component properties */
316
+ thumbnail: ThumbnailProps;
317
+ /** Element to be rendered inside the Thumbnail */
318
+ children: ReactNode;
319
+ /** Optional position of the element */
320
+ contentPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
321
+ }
322
+ export type ThumbnailWithActionProps = ThumbnailWithActionProperties & Omit<HTMLAttributes<HTMLElement>, "color"> & BoxProps;
323
+ export declare const ThumbnailWithAction: React.FC<ThumbnailWithActionProps>;
324
+
325
+ export {};