@usefui/components 1.5.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 +233 -0
- package/LICENSE +21 -0
- package/README.md +0 -0
- package/babel.config.js +12 -0
- package/dist/index.d.mts +1299 -0
- package/dist/index.d.ts +1299 -0
- package/dist/index.js +3701 -0
- package/dist/index.mjs +3586 -0
- package/package.json +44 -0
- package/src/__tests__/Accordion.test.tsx +106 -0
- package/src/__tests__/Avatar.test.tsx +89 -0
- package/src/__tests__/Badge.test.tsx +58 -0
- package/src/__tests__/Button.test.tsx +88 -0
- package/src/__tests__/Checkbox.test.tsx +106 -0
- package/src/__tests__/Collapsible.test.tsx +79 -0
- package/src/__tests__/Dialog.test.tsx +109 -0
- package/src/__tests__/Dropdown.test.tsx +159 -0
- package/src/__tests__/Field.test.tsx +100 -0
- package/src/__tests__/OTPField.test.tsx +199 -0
- package/src/__tests__/Overlay.test.tsx +70 -0
- package/src/__tests__/Page.test.tsx +98 -0
- package/src/__tests__/Portal.test.tsx +28 -0
- package/src/__tests__/Sheet.test.tsx +125 -0
- package/src/__tests__/Switch.test.tsx +90 -0
- package/src/__tests__/Tabs.test.tsx +129 -0
- package/src/__tests__/Toggle.test.tsx +67 -0
- package/src/__tests__/Toolbar.test.tsx +147 -0
- package/src/__tests__/Tooltip.test.tsx +88 -0
- package/src/accordion/Accordion.stories.tsx +89 -0
- package/src/accordion/hooks/index.tsx +39 -0
- package/src/accordion/index.tsx +170 -0
- package/src/avatar/Avatar.stories.tsx +62 -0
- package/src/avatar/index.tsx +90 -0
- package/src/avatar/styles/index.ts +79 -0
- package/src/badge/Badge.stories.tsx +60 -0
- package/src/badge/index.tsx +58 -0
- package/src/badge/styles/index.ts +109 -0
- package/src/button/Button.stories.tsx +47 -0
- package/src/button/index.tsx +79 -0
- package/src/button/styles/index.ts +180 -0
- package/src/checkbox/Checkbox.stories.tsx +100 -0
- package/src/checkbox/hooks/index.tsx +40 -0
- package/src/checkbox/index.tsx +147 -0
- package/src/checkbox/styles/index.ts +139 -0
- package/src/collapsible/Collapsible.stories.tsx +95 -0
- package/src/collapsible/hooks/index.tsx +50 -0
- package/src/collapsible/index.tsx +137 -0
- package/src/dialog/Dialog.stories.tsx +73 -0
- package/src/dialog/hooks/index.tsx +35 -0
- package/src/dialog/index.tsx +221 -0
- package/src/dialog/styles/index.ts +72 -0
- package/src/divider/index.ts +10 -0
- package/src/dropdown/Dropdown.stories.tsx +100 -0
- package/src/dropdown/hooks/index.tsx +64 -0
- package/src/dropdown/index.tsx +316 -0
- package/src/dropdown/styles/index.ts +90 -0
- package/src/field/Field.stories.tsx +146 -0
- package/src/field/hooks/index.tsx +28 -0
- package/src/field/index.tsx +183 -0
- package/src/field/styles/index.ts +166 -0
- package/src/index.ts +33 -0
- package/src/otp-field/OTPField.stories.tsx +50 -0
- package/src/otp-field/hooks/index.tsx +13 -0
- package/src/otp-field/index.tsx +234 -0
- package/src/otp-field/styles/index.ts +33 -0
- package/src/otp-field/types/index.ts +23 -0
- package/src/overlay/Overlay.stories.tsx +59 -0
- package/src/overlay/index.tsx +58 -0
- package/src/overlay/styles/index.ts +26 -0
- package/src/page/Page.stories.tsx +85 -0
- package/src/page/index.tsx +265 -0
- package/src/page/styles/index.ts +59 -0
- package/src/portal/Portal.stories.tsx +27 -0
- package/src/portal/index.tsx +36 -0
- package/src/scrollarea/Scrollarea.stories.tsx +99 -0
- package/src/scrollarea/index.tsx +27 -0
- package/src/scrollarea/styles/index.ts +71 -0
- package/src/sheet/Sheet.stories.tsx +86 -0
- package/src/sheet/hooks/index.tsx +47 -0
- package/src/sheet/index.tsx +190 -0
- package/src/sheet/styles/index.ts +69 -0
- package/src/switch/Switch.stories.tsx +96 -0
- package/src/switch/hooks/index.tsx +33 -0
- package/src/switch/index.tsx +122 -0
- package/src/switch/styles/index.ts +118 -0
- package/src/table/index.tsx +138 -0
- package/src/table/styles/index.ts +48 -0
- package/src/tabs/Tabs.stories.tsx +87 -0
- package/src/tabs/hooks/index.tsx +35 -0
- package/src/tabs/index.tsx +161 -0
- package/src/tabs/styles/index.ts +9 -0
- package/src/toggle/Toggle.stories.tsx +118 -0
- package/src/toggle/index.tsx +55 -0
- package/src/toggle/styles/index.ts +0 -0
- package/src/toolbar/Toolbar.stories.tsx +89 -0
- package/src/toolbar/hooks/index.tsx +35 -0
- package/src/toolbar/index.tsx +243 -0
- package/src/toolbar/styles/index.ts +129 -0
- package/src/tooltip/Tooltip.stories.tsx +60 -0
- package/src/tooltip/index.tsx +177 -0
- package/src/tooltip/styles/index.ts +38 -0
- package/src/utils/index.ts +2 -0
- package/tsconfig.json +18 -0
- package/vitest.config.ts +16 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1299 @@
|
|
|
1
|
+
import React$1 from 'react';
|
|
2
|
+
import * as styled_components from 'styled-components';
|
|
3
|
+
|
|
4
|
+
interface IReactChildren {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type TComponentHeight = "fullscreen" | "display" | "auto";
|
|
9
|
+
type TComponentAPI = boolean | string | number | null | unknown;
|
|
10
|
+
type TComponentSize = "small" | "medium" | "large";
|
|
11
|
+
type TComponentSide = "top" | "right" | "bottom" | "left";
|
|
12
|
+
type TComponentVariant = "primary" | "secondary" | "tertiary" | "mono" | "border" | "ghost";
|
|
13
|
+
type TKeyBinding = "ctrlKey" | "metaKey" | "altKey" | "shiftKey";
|
|
14
|
+
interface IComponentAPI {
|
|
15
|
+
id: string;
|
|
16
|
+
states: Record<string, TComponentAPI | Record<string, TComponentAPI> | any>;
|
|
17
|
+
methods: Record<string, (args?: TComponentAPI | any) => void>;
|
|
18
|
+
}
|
|
19
|
+
interface IComponentStyling {
|
|
20
|
+
raw?: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface IComponentSize {
|
|
23
|
+
sizing?: TComponentSize;
|
|
24
|
+
}
|
|
25
|
+
interface IComponentVariant {
|
|
26
|
+
variant?: TComponentVariant;
|
|
27
|
+
}
|
|
28
|
+
interface IComponentControlProperties {
|
|
29
|
+
shortcut?: boolean;
|
|
30
|
+
hotkey?: string;
|
|
31
|
+
bindkey?: TKeyBinding;
|
|
32
|
+
}
|
|
33
|
+
interface IComponentSpacing {
|
|
34
|
+
spacing?: TComponentSize;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface IButtonProperties extends IComponentStyling, IComponentSize, IComponentVariant, React$1.ComponentPropsWithRef<"button"> {
|
|
38
|
+
rawicon?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Buttons are used to initialize an action.
|
|
42
|
+
*
|
|
43
|
+
* **Best practices:**
|
|
44
|
+
*
|
|
45
|
+
* - Define the hierarchy of buttons with different variants.
|
|
46
|
+
* - Button label must be short and understandable.
|
|
47
|
+
*
|
|
48
|
+
* @param {IButtonProperties} props - The props for the Button component.
|
|
49
|
+
* @param {boolean} props.raw - Define whether the component is styled or not.
|
|
50
|
+
* @param {boolean} props.rawicon - Define whether the component is styles its svg children.
|
|
51
|
+
* @param {ComponentSizeEnum} props.sizing - The size of the component. Defaults to `medium`.
|
|
52
|
+
* @param {string} props.variant - The style definition used by the component.
|
|
53
|
+
* @param {ReactNode} props.children - The content to be rendered inside the button.
|
|
54
|
+
* @returns {ReactElement} The Button component.
|
|
55
|
+
*/
|
|
56
|
+
declare const Button: React$1.ForwardRefExoticComponent<Omit<IButtonProperties, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
57
|
+
|
|
58
|
+
interface IAccordionComposition {
|
|
59
|
+
Root: typeof AccordionRoot;
|
|
60
|
+
Trigger: typeof AccordionTrigger;
|
|
61
|
+
Content: typeof AccordionContent;
|
|
62
|
+
}
|
|
63
|
+
interface IAccordionProperties extends IComponentSpacing, React$1.ComponentProps<"div"> {
|
|
64
|
+
}
|
|
65
|
+
interface IAccordionTriggerProperties extends IButtonProperties {
|
|
66
|
+
value: string;
|
|
67
|
+
}
|
|
68
|
+
interface IAccordionContentProperties extends IAccordionProperties {
|
|
69
|
+
defaultOpen?: boolean;
|
|
70
|
+
value: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Accordions are used to expand and collapse sections of content.
|
|
74
|
+
*
|
|
75
|
+
* **Best practices:**
|
|
76
|
+
*
|
|
77
|
+
* - Use a clear and descriptive title for each accordion section.
|
|
78
|
+
* - Ensure that the accordion can be operated using only the keyboard.
|
|
79
|
+
* - Ensure that the focus is properly managed when the accordion section is expanded/collapsed.
|
|
80
|
+
*
|
|
81
|
+
* @param {IAccordionProperties} props - The props for the Accordion component.
|
|
82
|
+
* @param {ReactNode} props.children - The content to be rendered inside the accordion.
|
|
83
|
+
* @returns {ReactElement} The Accordion component.
|
|
84
|
+
*/
|
|
85
|
+
declare const Accordion: {
|
|
86
|
+
(props: IAccordionProperties): React$1.JSX.Element;
|
|
87
|
+
displayName: string;
|
|
88
|
+
Root: {
|
|
89
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
90
|
+
displayName: string;
|
|
91
|
+
};
|
|
92
|
+
Trigger: {
|
|
93
|
+
(props: IAccordionTriggerProperties): React$1.JSX.Element;
|
|
94
|
+
displayName: string;
|
|
95
|
+
};
|
|
96
|
+
Content: {
|
|
97
|
+
(props: IAccordionContentProperties): React$1.JSX.Element;
|
|
98
|
+
displayName: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
declare const AccordionRoot: {
|
|
102
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
103
|
+
displayName: string;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Accordion.Trigger is used to triggers the expansion and collapse of the associated Accordion.Content component.
|
|
107
|
+
*
|
|
108
|
+
* **Best practices:**
|
|
109
|
+
*
|
|
110
|
+
* - Use a clear and descriptive title for the trigger that accurately conveys the content of the associated accordion section.
|
|
111
|
+
* - Ensure that the trigger can be operated using only the keyboard.
|
|
112
|
+
* - Ensure that the focus is properly managed when the trigger is activated.
|
|
113
|
+
*
|
|
114
|
+
* @param {IAccordionTriggerProperties} props - The props for the Accordion.Trigger component.
|
|
115
|
+
* @param {string} props.value - The value used to bind the Accordion.Trigger and Accordion.Content components.
|
|
116
|
+
* @param {ReactNode} props.children - The content to be rendered inside the accordion trigger.
|
|
117
|
+
* @returns {ReactElement} The Accordion.Trigger component.
|
|
118
|
+
*/
|
|
119
|
+
declare const AccordionTrigger: {
|
|
120
|
+
(props: IAccordionTriggerProperties): React$1.JSX.Element;
|
|
121
|
+
displayName: string;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Accordion.Content is used to contains the content of the associated Accordion.Trigger component.
|
|
125
|
+
*
|
|
126
|
+
* **Best practices:**
|
|
127
|
+
*
|
|
128
|
+
* - Ensure that the content is hidden when the associated accordion section is collapsed.
|
|
129
|
+
* - Ensure that the content is properly focused when the associated accordion section is expanded.
|
|
130
|
+
*
|
|
131
|
+
* @param {IAccordionContentProperties} props - The props for the Accordion.Content component.
|
|
132
|
+
* @param {string} props.value - The value used to bind the Accordion.Content and Accordion.Trigger components.
|
|
133
|
+
* @param {boolean} props.defaultOpen - The initial open state of the accordion content. Defaults to false.
|
|
134
|
+
* @param {IComponentSpacing} props.spacing - The value used by the accordion's content spacings.
|
|
135
|
+
* @param {ReactNode} props.children - The content to be rendered inside the accordion.
|
|
136
|
+
* @returns {ReactElement} The Accordion.Content component.
|
|
137
|
+
*/
|
|
138
|
+
declare const AccordionContent: {
|
|
139
|
+
(props: IAccordionContentProperties): React$1.JSX.Element;
|
|
140
|
+
displayName: string;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
declare enum AvataStatusEnum {
|
|
144
|
+
Online = "online",
|
|
145
|
+
Away = "away",
|
|
146
|
+
Busy = "busy",
|
|
147
|
+
Offline = "offline"
|
|
148
|
+
}
|
|
149
|
+
interface IAvatarProperties extends IComponentStyling, IComponentSize, React$1.HTMLAttributes<HTMLDivElement> {
|
|
150
|
+
src?: string;
|
|
151
|
+
alt?: string;
|
|
152
|
+
status?: "online" | "away" | "busy" | "offline";
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Avatar are used to represents a user or an entity on an interface.
|
|
156
|
+
*
|
|
157
|
+
* **Best practices:**
|
|
158
|
+
*
|
|
159
|
+
* - Use the appropriate size to match the context and the importance of the information.
|
|
160
|
+
* - Always provide an `alt` attribute for accessibility when using an image.
|
|
161
|
+
* - Indicate the user's activity status.
|
|
162
|
+
*
|
|
163
|
+
* @param {IAvatarProperties} props - The props for the Avatar component.
|
|
164
|
+
* @param {boolean} props.raw - Whether the avatar is styled or not.
|
|
165
|
+
* @param {ComponentSizeEnum} props.sizing - The size of the avatar. Defaults to ComponentSizeEnum.Medium.
|
|
166
|
+
* @param {string} props.status - The status of the user represented by the avatar.
|
|
167
|
+
* @param {string} props.src - The source URL of the image to be displayed in the avatar.
|
|
168
|
+
* @param {string} props.alt - The alternative text for the image in the avatar.
|
|
169
|
+
* @param {ReactNode} props.children - The content to be rendered inside the avatar.
|
|
170
|
+
* @returns {ReactElement} The Avatar component.
|
|
171
|
+
*/
|
|
172
|
+
declare const Avatar: {
|
|
173
|
+
(props: IAvatarProperties): React$1.JSX.Element;
|
|
174
|
+
displayName: string;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
interface IBadgeProperties extends IComponentStyling, React$1.ComponentProps<"div"> {
|
|
178
|
+
variant?: "primary" | "secondary" | "border" | "error" | "warning" | "success" | "meta";
|
|
179
|
+
shape?: "square" | "smooth" | "round";
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Badges are used to convey data or states to the users.
|
|
183
|
+
*
|
|
184
|
+
* **Best practices:**
|
|
185
|
+
*
|
|
186
|
+
* - Define the hierarchy of badges with different variants.
|
|
187
|
+
* - Badge label must convey short and understandable information.
|
|
188
|
+
*
|
|
189
|
+
* @param {IBadgeProperties} props - The props for the Badge component.
|
|
190
|
+
* @param {boolean} props.raw - Define whether the component is styled or not.
|
|
191
|
+
* @param {ComponentSizeEnum} props.shape - The shape of the component. Defaults to `smooth`.
|
|
192
|
+
* @param {string} props.variant - The style definition used by the component.
|
|
193
|
+
* @param {ReactNode} props.children - The content to be rendered inside the Badge.
|
|
194
|
+
* @returns {ReactElement} The Badge component.
|
|
195
|
+
*/
|
|
196
|
+
declare const Badge: {
|
|
197
|
+
(props: IBadgeProperties): React$1.JSX.Element;
|
|
198
|
+
displayName: string;
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
interface ICheckboxComposition {
|
|
202
|
+
Root: typeof CheckboxRoot;
|
|
203
|
+
Indicator: typeof CheckboxIndicator;
|
|
204
|
+
}
|
|
205
|
+
interface ICheckboxProperties extends IComponentStyling, IComponentSize, IComponentVariant, React$1.ComponentProps<"input"> {
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Checkbox are used to select one or more options from a set.
|
|
209
|
+
*
|
|
210
|
+
* **Best practices:**
|
|
211
|
+
*
|
|
212
|
+
* - Use a clear and descriptive label for each checkbox.
|
|
213
|
+
*
|
|
214
|
+
* @param {ICheckboxProperties} props - The props for the Checkbox component.
|
|
215
|
+
* @param {boolean} props.raw - Whether the checkbox is styled or not. Defaults to `false`.
|
|
216
|
+
* @param {ComponentSizeEnum} props.sizing - The size of the checkbox. Defaults to `medium`.
|
|
217
|
+
* @param {ComponentVariantEnum} props.variant - The styles used by the checkbox. Defaults to `tertiary`.
|
|
218
|
+
* @param {boolean} props.defaultChecked - The initial checked state of the checkbox..
|
|
219
|
+
* @param {ReactNode} props.children - The content to be rendered inside the checkbox.
|
|
220
|
+
* @returns {ReactElement} The Checkbox component.
|
|
221
|
+
*/
|
|
222
|
+
declare const Checkbox: {
|
|
223
|
+
(props: ICheckboxProperties): React$1.JSX.Element;
|
|
224
|
+
displayName: string;
|
|
225
|
+
Root: {
|
|
226
|
+
(props: IReactChildren): React$1.JSX.Element;
|
|
227
|
+
displayName: string;
|
|
228
|
+
};
|
|
229
|
+
Indicator: {
|
|
230
|
+
(props: React$1.ComponentProps<"span">): React$1.JSX.Element;
|
|
231
|
+
displayName: string;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
declare const CheckboxRoot: {
|
|
235
|
+
(props: IReactChildren): React$1.JSX.Element;
|
|
236
|
+
displayName: string;
|
|
237
|
+
};
|
|
238
|
+
declare const CheckboxIndicator: {
|
|
239
|
+
(props: React$1.ComponentProps<"span">): React$1.JSX.Element;
|
|
240
|
+
displayName: string;
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
interface ICollapsibleComposition {
|
|
244
|
+
Root: typeof CollapsibleRoot;
|
|
245
|
+
Trigger: typeof CollapsibleTrigger;
|
|
246
|
+
Content: typeof CollapsibleContent;
|
|
247
|
+
}
|
|
248
|
+
interface ICollapsibleProperties extends React$1.ComponentProps<"div"> {
|
|
249
|
+
defaultOpen?: boolean;
|
|
250
|
+
showFirstChild?: boolean;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Collapsible is a component that can be expanded or collapsed by its child trigger component.
|
|
254
|
+
*
|
|
255
|
+
* **Best practices:**
|
|
256
|
+
*
|
|
257
|
+
* - Use semantic HTML elements inside the collapsible content.
|
|
258
|
+
* - Ensure that the collapsible content is hidden from screen readers when it is collapsed.
|
|
259
|
+
* - Provide a clear and descriptive label for the trigger element that accurately conveys the content of the collapsible section.
|
|
260
|
+
*
|
|
261
|
+
* @returns {ReactElement} The Collapsible component.
|
|
262
|
+
*/
|
|
263
|
+
declare const Collapsible: {
|
|
264
|
+
(props: ICollapsibleProperties): React$1.JSX.Element;
|
|
265
|
+
displayName: string;
|
|
266
|
+
Root: {
|
|
267
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
268
|
+
displayName: string;
|
|
269
|
+
};
|
|
270
|
+
Trigger: {
|
|
271
|
+
(props: IButtonProperties): React$1.JSX.Element;
|
|
272
|
+
displayName: string;
|
|
273
|
+
};
|
|
274
|
+
Content: {
|
|
275
|
+
(props: ICollapsibleProperties): React$1.JSX.Element;
|
|
276
|
+
displayName: string;
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
declare const CollapsibleRoot: {
|
|
280
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
281
|
+
displayName: string;
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* Collapsible.Trigger is used to triggers the expansion and collapse of the associated Collapsible.Content component.
|
|
285
|
+
*
|
|
286
|
+
* **Best practices:**
|
|
287
|
+
*
|
|
288
|
+
* - Use a clear and descriptive title for the trigger that accurately conveys the content of the associated Collapsible section.
|
|
289
|
+
* - Ensure that the trigger can be operated using only the keyboard.
|
|
290
|
+
* - Ensure that the focus is properly managed when the trigger is activated.
|
|
291
|
+
*
|
|
292
|
+
* @param {IButtonProperties} props - The props for the Collapsible.Trigger component.
|
|
293
|
+
* @returns {ReactElement} The Collapsible.Trigger component.
|
|
294
|
+
*/
|
|
295
|
+
declare const CollapsibleTrigger: {
|
|
296
|
+
(props: IButtonProperties): React$1.JSX.Element;
|
|
297
|
+
displayName: string;
|
|
298
|
+
};
|
|
299
|
+
/**
|
|
300
|
+
* Collapsible.Content is used to contains the content of the associated Collapsible.Trigger component.
|
|
301
|
+
*
|
|
302
|
+
* **Best practices:**
|
|
303
|
+
*
|
|
304
|
+
* - Ensure that the content is hidden when the associated Collapsible section is collapsed.
|
|
305
|
+
* - Ensure that the content is properly focused when the associated Collapsible section is expanded.
|
|
306
|
+
*
|
|
307
|
+
* @param {ICollapsibleProperties} props - The props for the Collapsible.Content component.components.
|
|
308
|
+
* @param {boolean} props.defaultOpen - The initial open state of the Collapsible content. Defaults to false.
|
|
309
|
+
* @param {boolean} props.showFirstChild - The props used to render the first child component whether the component is closed or not.
|
|
310
|
+
* @param {ReactNode} props.children - The content to be rendered inside the Collapsible.
|
|
311
|
+
* @returns {ReactElement} The Collapsible.Content component.
|
|
312
|
+
*/
|
|
313
|
+
declare const CollapsibleContent: {
|
|
314
|
+
(props: ICollapsibleProperties): React$1.JSX.Element;
|
|
315
|
+
displayName: string;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
interface IDialogItemProperties extends IComponentStyling, IComponentSize, IScrollAreaProperties, React$1.ComponentProps<"dialog"> {
|
|
319
|
+
lock?: boolean;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Dialog are used displays a modal window to the user on top of the current layer.
|
|
323
|
+
*
|
|
324
|
+
* **Best practices:**
|
|
325
|
+
*
|
|
326
|
+
* - Ensure that the dialog is visible and accessible to all users, including those using assistive technologies.
|
|
327
|
+
* - Use keyboard shortcuts to provide an alternative way of interacting with the dialog.
|
|
328
|
+
* - Ensure that the dialog is responsive and adapts to different screen sizes and orientations.
|
|
329
|
+
*
|
|
330
|
+
* @param {IDialogItemProperties} props - The props for the Dialog component.
|
|
331
|
+
* @param {boolean} props.raw - Define whether the component is styled or not.
|
|
332
|
+
* @param {ComponentSizeEnum} props.sizing - The size of the component.
|
|
333
|
+
* @param {boolean} props.open - Whether the dialog is open or not.
|
|
334
|
+
* @param {ReactNode} props.children - The content to be rendered inside the dialog.
|
|
335
|
+
* @returns {ReactElement} The Dialog component.
|
|
336
|
+
*/
|
|
337
|
+
declare const Dialog: {
|
|
338
|
+
(props: IDialogItemProperties): React$1.JSX.Element;
|
|
339
|
+
displayName: string;
|
|
340
|
+
Root: {
|
|
341
|
+
({ children }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
342
|
+
displayName: string;
|
|
343
|
+
};
|
|
344
|
+
Trigger: {
|
|
345
|
+
(props: IButtonProperties): React$1.JSX.Element;
|
|
346
|
+
displayName: string;
|
|
347
|
+
};
|
|
348
|
+
Control: {
|
|
349
|
+
(props: IButtonProperties): React$1.JSX.Element;
|
|
350
|
+
displayName: string;
|
|
351
|
+
};
|
|
352
|
+
Menu: {
|
|
353
|
+
(props: IDialogItemProperties): React$1.JSX.Element;
|
|
354
|
+
displayName: string;
|
|
355
|
+
};
|
|
356
|
+
Overlay: {
|
|
357
|
+
(props: IOverlayProperties): React$1.JSX.Element;
|
|
358
|
+
displayName: string;
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
declare const DialogRoot: {
|
|
362
|
+
({ children }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
363
|
+
displayName: string;
|
|
364
|
+
};
|
|
365
|
+
declare const DialogOverlay: {
|
|
366
|
+
(props: IOverlayProperties): React$1.JSX.Element;
|
|
367
|
+
displayName: string;
|
|
368
|
+
};
|
|
369
|
+
/**
|
|
370
|
+
* Dialog.Trigger is used to trigger the render of the associated Dialog component.
|
|
371
|
+
*
|
|
372
|
+
* **Best practices:**
|
|
373
|
+
*
|
|
374
|
+
* - Use a clear and descriptive title for the trigger that accurately conveys the content of the associated Dialog.
|
|
375
|
+
* - Ensure that the trigger can be operated using only the keyboard.
|
|
376
|
+
* - Ensure that the focus is properly managed when the trigger is activated.
|
|
377
|
+
*
|
|
378
|
+
* @param {IButtonProperties} props - The props for the Dialog.Trigger component.
|
|
379
|
+
* @returns {ReactElement} The Dialog.Trigger component.
|
|
380
|
+
*/
|
|
381
|
+
declare const DialogTrigger: {
|
|
382
|
+
(props: IButtonProperties): React$1.JSX.Element;
|
|
383
|
+
displayName: string;
|
|
384
|
+
};
|
|
385
|
+
declare const DialogMenu: {
|
|
386
|
+
(props: IDialogItemProperties): React$1.JSX.Element;
|
|
387
|
+
displayName: string;
|
|
388
|
+
};
|
|
389
|
+
/**
|
|
390
|
+
* Dialog.Control is used to trigger action inside the associated Dialog component.
|
|
391
|
+
*
|
|
392
|
+
* **Best practices:**
|
|
393
|
+
*
|
|
394
|
+
* - Use a clear and descriptive title for the trigger that accurately conveys the content of the associated action.
|
|
395
|
+
* - Ensure that the trigger can be operated using only the keyboard.
|
|
396
|
+
* - Ensure that the focus is properly managed when the trigger is activated.
|
|
397
|
+
*
|
|
398
|
+
* @param {IButtonProperties} props - The props for the Dialog.Control component.
|
|
399
|
+
* @returns {ReactElement} The Dialog.Control component.
|
|
400
|
+
*/
|
|
401
|
+
declare const DialogControl: {
|
|
402
|
+
(props: IButtonProperties): React$1.JSX.Element;
|
|
403
|
+
displayName: string;
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
declare const Divider: styled_components.StyledComponent<"hr", any, {}, never>;
|
|
407
|
+
|
|
408
|
+
interface IDropdownContentProperties extends IComponentStyling, IComponentSize, React$1.ComponentPropsWithRef<"ul"> {
|
|
409
|
+
defaultOpen?: boolean;
|
|
410
|
+
}
|
|
411
|
+
interface IDropdownItemProperties extends IComponentStyling, React$1.ComponentProps<"li"> {
|
|
412
|
+
radio?: boolean;
|
|
413
|
+
disabled?: boolean;
|
|
414
|
+
onClick?: (event: React$1.MouseEvent<HTMLLIElement> | React$1.KeyboardEvent<HTMLLIElement>) => void;
|
|
415
|
+
onKeyDown?: (event: React$1.KeyboardEvent<HTMLLIElement>) => void;
|
|
416
|
+
}
|
|
417
|
+
interface IDropdownComposition {
|
|
418
|
+
Root: typeof DropdownMenuRoot;
|
|
419
|
+
Trigger: typeof DropdownMenuTrigger;
|
|
420
|
+
Content: typeof DropdownMenuContent;
|
|
421
|
+
Item: typeof DropdownMenuItem;
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Dropdown are used to expand and collapse list of actions.
|
|
425
|
+
*
|
|
426
|
+
* **Best practices:**
|
|
427
|
+
*
|
|
428
|
+
* - Use semantic HTML elements to structure the dropdown menu content.
|
|
429
|
+
* - Ensure that the dropdown menu can be opened and closed using the keyboard.
|
|
430
|
+
* - Ensure that the dropdown menu is visibly focused when opened using the keyboard.
|
|
431
|
+
* - Ensure that the dropdown menu is dismissed when the user clicks outside of it or presses the Esc key.
|
|
432
|
+
*
|
|
433
|
+
* @param {React.ComponentProps<"div">} props - The props for the DropdownMenu component.
|
|
434
|
+
* @param {ReactNode} props.children - The content to be rendered inside the dropdown menu.
|
|
435
|
+
* @returns {ReactElement} The DropdownMenu component.
|
|
436
|
+
*/
|
|
437
|
+
declare const DropdownMenu: {
|
|
438
|
+
({ children }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
439
|
+
displayName: string;
|
|
440
|
+
Root: {
|
|
441
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
442
|
+
displayName: string;
|
|
443
|
+
};
|
|
444
|
+
Trigger: {
|
|
445
|
+
(props: IButtonProperties): React$1.JSX.Element;
|
|
446
|
+
displayName: string;
|
|
447
|
+
};
|
|
448
|
+
Content: React$1.ForwardRefExoticComponent<Omit<IDropdownContentProperties, "ref"> & React$1.RefAttributes<HTMLUListElement>>;
|
|
449
|
+
Item: {
|
|
450
|
+
(props: IDropdownItemProperties): React$1.JSX.Element;
|
|
451
|
+
displayName: string;
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
declare const DropdownMenuRoot: {
|
|
455
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
456
|
+
displayName: string;
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* DropdownMenu.Trigger is used to triggers the expansion and collapse of the associated DropdownMenu.Content component.
|
|
460
|
+
*
|
|
461
|
+
* **Best practices:**
|
|
462
|
+
*
|
|
463
|
+
* - Use a clear and descriptive title for the trigger that accurately conveys the content of the associated dropdown section.
|
|
464
|
+
* - Ensure that the trigger can be operated using only the keyboard.
|
|
465
|
+
* - Ensure that the focus is properly managed when the trigger is activated.
|
|
466
|
+
*
|
|
467
|
+
* @param {IButtonProperties} props - The props for the DropdownMenu.Trigger component.components.
|
|
468
|
+
* @param {ReactNode} props.children - The content to be rendered inside the dropdown trigger.
|
|
469
|
+
* @returns {ReactElement} The DropdownMenu.Trigger component.
|
|
470
|
+
*/
|
|
471
|
+
declare const DropdownMenuTrigger: {
|
|
472
|
+
(props: IButtonProperties): React$1.JSX.Element;
|
|
473
|
+
displayName: string;
|
|
474
|
+
};
|
|
475
|
+
/**
|
|
476
|
+
* DropdownMenu.Content is used to contains the content of the associated DropdownMenu.Trigger component.
|
|
477
|
+
*
|
|
478
|
+
* **Best practices:**
|
|
479
|
+
*
|
|
480
|
+
* - Ensure that the content is hidden when the associated dropdown menu is collapsed.
|
|
481
|
+
* - Ensure that the content is properly focused when the associated dropdown menu is expanded.
|
|
482
|
+
*
|
|
483
|
+
* @param {IDropdownContentProperties} props - The props for the DropdownMenu.Content component.
|
|
484
|
+
* @param {boolean} props.raw - Define whether the component is styled or not.
|
|
485
|
+
* @param {ComponentSizeEnum} props.sizing - The size of the component.
|
|
486
|
+
* @param {boolean} props.defaultOpen - The initial open state of the dropdown menu. Defaults to false.
|
|
487
|
+
* @param {ReactNode} props.children - The content to be rendered inside the dropdown menu.
|
|
488
|
+
* @returns {ReactElement} The DropdownMenu.Content component.
|
|
489
|
+
*/
|
|
490
|
+
declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<Omit<IDropdownContentProperties, "ref"> & React$1.RefAttributes<HTMLUListElement>>;
|
|
491
|
+
/**
|
|
492
|
+
* DropdownMenu.Item is used to handle action inside DropdownMenu.Content.
|
|
493
|
+
*
|
|
494
|
+
* @param {IDropdownItemProperties} props - The props for the DropdownMenu.Item component.
|
|
495
|
+
* @param {boolean} props.raw - Define whether the component is styled or not.
|
|
496
|
+
* @param {boolean} props.radio - Define whether the component is collapses the dropdown menu on click or not.
|
|
497
|
+
* @returns {ReactElement} The DropdownMenu.Content component.
|
|
498
|
+
*/
|
|
499
|
+
declare const DropdownMenuItem: {
|
|
500
|
+
(props: IDropdownItemProperties): React$1.JSX.Element;
|
|
501
|
+
displayName: string;
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
declare enum MetaVariantEnum {
|
|
505
|
+
Default = "default",
|
|
506
|
+
Hint = "hint",
|
|
507
|
+
Emphasis = "emphasis",
|
|
508
|
+
Error = "error"
|
|
509
|
+
}
|
|
510
|
+
type TMetaVariant = "default" | "hint" | "emphasis" | "error";
|
|
511
|
+
interface IField extends React$1.ComponentProps<"input">, IComponentSize, IComponentVariant, IComponentStyling {
|
|
512
|
+
hint?: string;
|
|
513
|
+
error?: string;
|
|
514
|
+
}
|
|
515
|
+
interface IFieldLabel extends React$1.ComponentProps<"label">, IComponentStyling {
|
|
516
|
+
optional?: boolean;
|
|
517
|
+
}
|
|
518
|
+
interface IFieldMeta extends React$1.ComponentProps<"small">, IComponentStyling {
|
|
519
|
+
variant?: TMetaVariant;
|
|
520
|
+
}
|
|
521
|
+
interface IFieldComposition {
|
|
522
|
+
Root: typeof FieldRoot;
|
|
523
|
+
Wrapper: typeof FieldWrapper;
|
|
524
|
+
Label: typeof FieldLabel;
|
|
525
|
+
Meta: typeof FieldMeta;
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Fields are input element that provides additional functionality such as error and hint messages.
|
|
529
|
+
*
|
|
530
|
+
* **Best practices:**
|
|
531
|
+
*
|
|
532
|
+
* - Provide clear and descriptive labels for all input elements.
|
|
533
|
+
* - Ensure that error and hint messages are visible and easily identifiable by users.
|
|
534
|
+
*
|
|
535
|
+
* @param {IField} props - The props for the Field component.
|
|
536
|
+
* @param {boolean} props.raw - Define whether the component is styled or not.
|
|
537
|
+
* @param {ComponentSizeEnum} props.sizing - The size of the component. Defaults to `medium`.
|
|
538
|
+
* @param {string} props.variant - The style definition used by the component.
|
|
539
|
+
* @param {string} props.error - The error message to display.
|
|
540
|
+
* @param {string} props.hint - The hint message to display.
|
|
541
|
+
* @returns {ReactElement} The Field component.
|
|
542
|
+
*/
|
|
543
|
+
declare const Field: {
|
|
544
|
+
(props: IField): React$1.JSX.Element;
|
|
545
|
+
displayName: string;
|
|
546
|
+
Root: {
|
|
547
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
548
|
+
displayName: string;
|
|
549
|
+
};
|
|
550
|
+
Wrapper: {
|
|
551
|
+
({ children, ...restProps }: IReactChildren & React$1.ComponentProps<"fieldset">): React$1.JSX.Element;
|
|
552
|
+
displayName: string;
|
|
553
|
+
};
|
|
554
|
+
Label: {
|
|
555
|
+
(props: IFieldLabel): React$1.JSX.Element;
|
|
556
|
+
displayName: string;
|
|
557
|
+
};
|
|
558
|
+
Meta: {
|
|
559
|
+
(props: IFieldMeta): React$1.JSX.Element;
|
|
560
|
+
displayName: string;
|
|
561
|
+
};
|
|
562
|
+
};
|
|
563
|
+
declare const FieldRoot: {
|
|
564
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
565
|
+
displayName: string;
|
|
566
|
+
};
|
|
567
|
+
declare const FieldWrapper: {
|
|
568
|
+
({ children, ...restProps }: IReactChildren & React$1.ComponentProps<"fieldset">): React$1.JSX.Element;
|
|
569
|
+
displayName: string;
|
|
570
|
+
};
|
|
571
|
+
/**
|
|
572
|
+
* Labels are component used to describe the expected value of an input.
|
|
573
|
+
*
|
|
574
|
+
* **Best practices:**
|
|
575
|
+
*
|
|
576
|
+
* - Provide a clear and descriptive label for each input.
|
|
577
|
+
* - The `required` criteria of an input must be reflected in the label.
|
|
578
|
+
*
|
|
579
|
+
* @param {IFieldLabel} props - The props for the Field.Label component.
|
|
580
|
+
* @param {boolean} props.raw - Define whether the component is styled or not.
|
|
581
|
+
* @param {boolean} props.optional - Whether the form field is required or not.
|
|
582
|
+
* @param {string} props.children - The label text.
|
|
583
|
+
* @returns {ReactElement} The Field.Label component.
|
|
584
|
+
*/
|
|
585
|
+
declare const FieldLabel: {
|
|
586
|
+
(props: IFieldLabel): React$1.JSX.Element;
|
|
587
|
+
displayName: string;
|
|
588
|
+
};
|
|
589
|
+
/**
|
|
590
|
+
* Meta are component used to bring more context about an input's usage.
|
|
591
|
+
*
|
|
592
|
+
* @param {IFieldMeta} props - The props for the Field.Meta component.
|
|
593
|
+
* @param {boolean} props.raw - Define whether the component is styled or not.
|
|
594
|
+
* @param {TMetaVariant} props.variant - The style definition used by the component.
|
|
595
|
+
* @param {string} props.children - The meta text.
|
|
596
|
+
* @returns {ReactElement} The Field.Meta component.
|
|
597
|
+
*/
|
|
598
|
+
declare const FieldMeta: {
|
|
599
|
+
(props: IFieldMeta): React$1.JSX.Element;
|
|
600
|
+
displayName: string;
|
|
601
|
+
};
|
|
602
|
+
|
|
603
|
+
interface OTPFieldProps {
|
|
604
|
+
name?: string;
|
|
605
|
+
id?: string;
|
|
606
|
+
children: React.ReactNode;
|
|
607
|
+
length?: number;
|
|
608
|
+
onComplete?: (value: string) => void;
|
|
609
|
+
}
|
|
610
|
+
interface OTPFieldSlotProps {
|
|
611
|
+
index: number;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
interface IOTPFieldComposition {
|
|
615
|
+
Slot: typeof OTPFieldSlot;
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* A field for entering one-time passwords.
|
|
619
|
+
* This component holds the state and logic for the entire OTP input group.
|
|
620
|
+
*
|
|
621
|
+
* @param {OTPFieldProps} props - The props for the OTPField component.
|
|
622
|
+
* @param {ReactNode} props.children - The content to be rendered, typically OTPField.Group.
|
|
623
|
+
* @param {number} [props.length=6] - The number of characters in the OTP.
|
|
624
|
+
* @param {function} [props.onComplete] - Callback fired when all inputs are filled.
|
|
625
|
+
* @returns {ReactElement} The OTPField component.
|
|
626
|
+
*/
|
|
627
|
+
declare const OTPField: {
|
|
628
|
+
({ children, length, onComplete }: OTPFieldProps): React$1.JSX.Element;
|
|
629
|
+
displayName: string;
|
|
630
|
+
Group: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLSpanElement> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
631
|
+
Slot: {
|
|
632
|
+
({ index, ...props }: OTPFieldSlotProps & React$1.InputHTMLAttributes<HTMLInputElement>): React$1.JSX.Element | null;
|
|
633
|
+
displayName: string;
|
|
634
|
+
};
|
|
635
|
+
};
|
|
636
|
+
/**
|
|
637
|
+
* Represents a single character input slot in the OTP field.
|
|
638
|
+
*
|
|
639
|
+
* @param {OTPFieldSlotProps & React.InputHTMLAttributes<HTMLInputElement>} props - The props for the OTPField.Slot component.
|
|
640
|
+
* @param {number} props.index - The zero-based index of the slot.
|
|
641
|
+
* @returns {ReactElement} The OTPField.Slot component.
|
|
642
|
+
*/
|
|
643
|
+
declare const OTPFieldSlot: {
|
|
644
|
+
({ index, ...props }: OTPFieldSlotProps & React$1.InputHTMLAttributes<HTMLInputElement>): React$1.JSX.Element | null;
|
|
645
|
+
displayName: string;
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
interface IOverlayProperties extends IComponentStyling, React$1.ComponentProps<"div"> {
|
|
649
|
+
visible?: boolean;
|
|
650
|
+
closeOnInteract?: boolean;
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Overlay are used to display content on top of the current layer.
|
|
654
|
+
*
|
|
655
|
+
* **Best practices:**
|
|
656
|
+
*
|
|
657
|
+
* - Use semantic HTML elements to structure the content of the overlay.
|
|
658
|
+
* - Ensure that the overlay is visible and accessible to all users, including those using assistive technologies.
|
|
659
|
+
* - Use keyboard shortcuts to provide an alternative way of interacting with the overlay.
|
|
660
|
+
* - Ensure that the overlay is responsive and adapts to different screen sizes and orientations.
|
|
661
|
+
*
|
|
662
|
+
* @param {IOverlayProperties} props - The props for the Overlay component.
|
|
663
|
+
* @param {boolean} props.raw - Define whether the component is styled or not.
|
|
664
|
+
* @param {boolean} props.visible - Whether the component is visible or not.
|
|
665
|
+
* @param {boolean} props.closeOnInteract - Whether the overlay should be closed when the user interacts with it.
|
|
666
|
+
* @param {function} props.onClick - The callback function to be invoked when the overlay is clicked.
|
|
667
|
+
* @returns {ReactElement} The Overlay component.
|
|
668
|
+
*/
|
|
669
|
+
declare const Overlay: {
|
|
670
|
+
(props: IOverlayProperties): React$1.JSX.Element;
|
|
671
|
+
displayName: string;
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
interface IPageToolsProperties extends IToolbarBodyProperties, IToolbarSectionProperties {
|
|
675
|
+
trigger?: React$1.ReactNode | string;
|
|
676
|
+
triggerProps?: IButtonProperties;
|
|
677
|
+
fixed?: boolean;
|
|
678
|
+
}
|
|
679
|
+
interface IPageWrapperProperties {
|
|
680
|
+
$menus?: number;
|
|
681
|
+
$navigations?: number;
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* Pages are structured components used to build User Interface layouts.
|
|
685
|
+
*
|
|
686
|
+
* @param {React.ComponentProps<"div">} props - The props for the Page component.
|
|
687
|
+
* @returns {ReactElement} The Page component.
|
|
688
|
+
*/
|
|
689
|
+
declare const Page: {
|
|
690
|
+
(props: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
691
|
+
displayName: string;
|
|
692
|
+
Navigation: {
|
|
693
|
+
(props: React$1.ComponentProps<"nav">): React$1.JSX.Element;
|
|
694
|
+
displayName: string;
|
|
695
|
+
};
|
|
696
|
+
Tools: {
|
|
697
|
+
(props: IPageToolsProperties): React$1.JSX.Element;
|
|
698
|
+
displayName: string;
|
|
699
|
+
};
|
|
700
|
+
Wrapper: {
|
|
701
|
+
(props: IPageWrapperProperties & React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
702
|
+
displayName: string;
|
|
703
|
+
};
|
|
704
|
+
Content: {
|
|
705
|
+
(props: React$1.ComponentProps<"div"> & IScrollAreaProperties): React$1.JSX.Element;
|
|
706
|
+
displayName: string;
|
|
707
|
+
};
|
|
708
|
+
Panel: {
|
|
709
|
+
(props: IPageToolsProperties): React$1.JSX.Element;
|
|
710
|
+
displayName: string;
|
|
711
|
+
};
|
|
712
|
+
Menu: {
|
|
713
|
+
(props: React$1.ComponentProps<"menu">): React$1.JSX.Element;
|
|
714
|
+
displayName: string;
|
|
715
|
+
};
|
|
716
|
+
};
|
|
717
|
+
/**
|
|
718
|
+
* Navigations are used to hold links and actions.
|
|
719
|
+
*
|
|
720
|
+
* @param {React.ComponentProps<"div">} props - The props for the Page.Navigation component.
|
|
721
|
+
* @returns {ReactElement} The Page.Navigation component.
|
|
722
|
+
*/
|
|
723
|
+
declare const PageNavigation: {
|
|
724
|
+
(props: React$1.ComponentProps<"nav">): React$1.JSX.Element;
|
|
725
|
+
displayName: string;
|
|
726
|
+
};
|
|
727
|
+
/**
|
|
728
|
+
* Toolbar are component that provides a set of tools or actions for the user.
|
|
729
|
+
*
|
|
730
|
+
* **Best practices:**
|
|
731
|
+
*
|
|
732
|
+
* - Use semantic HTML elements to structure the content of the Page.Toolbar.
|
|
733
|
+
* - Ensure that the Page.Toolbar is visible and accessible to all users, including those using assistive technologies.
|
|
734
|
+
* - Use keyboard shortcuts to provide an alternative way of interacting with the Page.Toolbar.
|
|
735
|
+
* - Ensure that the Page.Toolbar is responsive and adapts to different screen sizes and orientations.
|
|
736
|
+
*
|
|
737
|
+
* @param {IPageToolsProperties} props - The props for the Page.Toolbar component.
|
|
738
|
+
* @param {boolean} props.raw - Define whether the component is styled or not.
|
|
739
|
+
* @param {string} props.shortcut - The key combination used as keyboard shortcuts to trigger the Page.Toolbar.
|
|
740
|
+
* @param {string} props.hotkey - The key to use in the key combination for the keyboard shortcuts.
|
|
741
|
+
* @param {KeyBindingEnum} props.bindkey - The modifier key to use in the key combination.
|
|
742
|
+
* @param {ComponentSizeEnum} props.sizing - The size of the Page.Toolbar.
|
|
743
|
+
* @param {ComponentHeightEnum} props.height - The height definition of the Page.Toolbar.
|
|
744
|
+
* @param {TComponentSide} props.side - The side of the Page.Toolbar.
|
|
745
|
+
* @param {boolean} props.defaultOpen - Whether the Page.Toolbar should be open by default.
|
|
746
|
+
* @param {ReactNode} props.children - The content to be rendered inside the Page.Toolbar.
|
|
747
|
+
* @returns {ReactElement} The Page.Toolbar component.
|
|
748
|
+
*/
|
|
749
|
+
declare const PageTools: {
|
|
750
|
+
(props: IPageToolsProperties): React$1.JSX.Element;
|
|
751
|
+
displayName: string;
|
|
752
|
+
};
|
|
753
|
+
declare const PageContent: {
|
|
754
|
+
(props: React$1.ComponentProps<"div"> & IScrollAreaProperties): React$1.JSX.Element;
|
|
755
|
+
displayName: string;
|
|
756
|
+
};
|
|
757
|
+
declare const PageWrapper: {
|
|
758
|
+
(props: IPageWrapperProperties & React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
759
|
+
displayName: string;
|
|
760
|
+
};
|
|
761
|
+
/**
|
|
762
|
+
* Panel are component that provides a set of tools or actions for the user.
|
|
763
|
+
*
|
|
764
|
+
* **Best practices:**
|
|
765
|
+
*
|
|
766
|
+
* - Use semantic HTML elements to structure the content of the Page.Panel.
|
|
767
|
+
* - Ensure that the Page.Panel is visible and accessible to all users, including those using assistive technologies.
|
|
768
|
+
* - Use keyboard shortcuts to provide an alternative way of interacting with the Page.Panel.
|
|
769
|
+
* - Ensure that the Page.Panel is responsive and adapts to different screen sizes and orientations.
|
|
770
|
+
*
|
|
771
|
+
* @param {IPageToolsProperties} props - The props for the Page.Panel component.
|
|
772
|
+
* @param {boolean} props.raw - Define whether the component is styled or not.
|
|
773
|
+
* @param {string} props.shortcut - The key combination used as keyboard shortcuts to trigger the Page.Panel.
|
|
774
|
+
* @param {string} props.hotkey - The key to use in the key combination for the keyboard shortcuts.
|
|
775
|
+
* @param {KeyBindingEnum} props.bindkey - The modifier key to use in the key combination.
|
|
776
|
+
* @param {ComponentSizeEnum} props.sizing - The size of the Page.Panel.
|
|
777
|
+
* @param {ComponentHeightEnum} props.height - The height definition of the Page.Panel.
|
|
778
|
+
* @param {TComponentSide} props.side - The side of the Page.Panel.
|
|
779
|
+
* @param {boolean} props.defaultOpen - Whether the Page.Panel should be open by default.
|
|
780
|
+
* @param {ReactNode} props.children - The content to be rendered inside the Page.Panel.
|
|
781
|
+
* @returns {ReactElement} The Page.Panel component.
|
|
782
|
+
*/
|
|
783
|
+
declare const PagePanel: {
|
|
784
|
+
(props: IPageToolsProperties): React$1.JSX.Element;
|
|
785
|
+
displayName: string;
|
|
786
|
+
};
|
|
787
|
+
/**
|
|
788
|
+
* Menus are used to hold links and actions.
|
|
789
|
+
*
|
|
790
|
+
* @param {React.ComponentProps<"menu">} props - The props for the Page.Menu component.
|
|
791
|
+
* @returns {ReactElement} The Page.Menu component.
|
|
792
|
+
*/
|
|
793
|
+
declare const PageMenu: {
|
|
794
|
+
(props: React$1.ComponentProps<"menu">): React$1.JSX.Element;
|
|
795
|
+
displayName: string;
|
|
796
|
+
};
|
|
797
|
+
|
|
798
|
+
interface IPortalProperties {
|
|
799
|
+
container: string;
|
|
800
|
+
children?: React$1.ReactNode;
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* Portal are used to render children into a DOM node that exists outside the DOM hierarchy of the parent component.
|
|
804
|
+
*
|
|
805
|
+
* @param {IPortalProperties} props - The props for the Portal component.
|
|
806
|
+
* @param {string} props.container - The ID of the DOM element to render the portal into.
|
|
807
|
+
* @param {ReactNode} props.children - The content to be rendered inside the portal.
|
|
808
|
+
* @returns {ReactElement} The Portal component.
|
|
809
|
+
*/
|
|
810
|
+
declare const Portal: {
|
|
811
|
+
(props: IPortalProperties): React$1.ReactPortal | null;
|
|
812
|
+
displayName: string;
|
|
813
|
+
};
|
|
814
|
+
|
|
815
|
+
interface ISheetProperties extends IComponentStyling, IComponentSize, IComponentControlProperties, React$1.ComponentProps<"dialog"> {
|
|
816
|
+
side?: "left" | "right";
|
|
817
|
+
lock?: boolean;
|
|
818
|
+
overlay?: boolean;
|
|
819
|
+
closeOnInteract?: boolean;
|
|
820
|
+
open?: boolean;
|
|
821
|
+
}
|
|
822
|
+
interface ISheetComposition {
|
|
823
|
+
Root: typeof SheetRoot;
|
|
824
|
+
Trigger: typeof SheetTrigger;
|
|
825
|
+
}
|
|
826
|
+
declare const SheetRoot: {
|
|
827
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
828
|
+
displayName: string;
|
|
829
|
+
};
|
|
830
|
+
/**
|
|
831
|
+
* Sheets are component that provides additional information in a top layer.
|
|
832
|
+
*
|
|
833
|
+
* **Best practices:**
|
|
834
|
+
*
|
|
835
|
+
* - Use semantic HTML elements to structure the content of the sheet.
|
|
836
|
+
* - Ensure that the sheet is visible and accessible to all users, including those using assistive technologies.
|
|
837
|
+
* - Use keyboard shortcuts to provide an alternative way of interacting with the sheet.
|
|
838
|
+
* - Ensure that the sheet is responsive and adapts to different screen sizes and orientations.
|
|
839
|
+
*
|
|
840
|
+
* @param {ISheetProperties} props - The props for the Sheet component.
|
|
841
|
+
* @param {boolean} props.raw - Define whether the component is styled or not.
|
|
842
|
+
* @param {string} props.shortcut - The key combination used as keyboard shortcuts to trigger the sheet.
|
|
843
|
+
* @param {string} props.hotkey - The key to use in the key combination for the keyboard shortcuts.
|
|
844
|
+
* @param {KeyBindingEnum} props.bindkey - The modifier key to use in the key combination.
|
|
845
|
+
* @param {TComponentSide} props.sizing - The size of the sheet.
|
|
846
|
+
* @param {ComponentSideEnum} props.side - The side of the sheet.
|
|
847
|
+
* @param {boolean} props.open - Whether the sheet should be open by default.
|
|
848
|
+
* @param {boolean} props.lock - Whether the sheet blocks the scroll once opened. True by default.
|
|
849
|
+
* @param {boolean} props.overlay - Whether the sheet has an overlay between the page and the sheet itself.
|
|
850
|
+
* @param {boolean} props.closeOnInteract - Whether the over should be closed if interacted with.
|
|
851
|
+
* @param {ReactNode} props.children - The content to be rendered inside the sheet.
|
|
852
|
+
* @returns {ReactElement} The Sheet component.
|
|
853
|
+
*/
|
|
854
|
+
declare const Sheet: {
|
|
855
|
+
(props: ISheetProperties): React$1.JSX.Element;
|
|
856
|
+
displayName: string;
|
|
857
|
+
Root: {
|
|
858
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
859
|
+
displayName: string;
|
|
860
|
+
};
|
|
861
|
+
Trigger: {
|
|
862
|
+
(props: IButtonProperties): React$1.JSX.Element;
|
|
863
|
+
displayName: string;
|
|
864
|
+
};
|
|
865
|
+
};
|
|
866
|
+
/**
|
|
867
|
+
* Sheet.Trigger are used to triggers the expansion and collapse of the associated Sheet component.
|
|
868
|
+
*
|
|
869
|
+
* **Best practices:**
|
|
870
|
+
*
|
|
871
|
+
* - Use a clear and descriptive title for the trigger that accurately conveys the content of the associated sheet section.
|
|
872
|
+
* - Ensure that the trigger can be operated using only the keyboard.
|
|
873
|
+
* - Ensure that the focus is properly managed when the trigger is activated.
|
|
874
|
+
*
|
|
875
|
+
* @param {IButtonProperties} props - The props for the Sheet.Trigger component.
|
|
876
|
+
* @param {ReactNode} props.children - The content to be rendered inside the Sheet trigger.
|
|
877
|
+
* @returns {ReactElement} The Sheet.Trigger component.
|
|
878
|
+
*/
|
|
879
|
+
declare const SheetTrigger: {
|
|
880
|
+
(props: IButtonProperties): React$1.JSX.Element;
|
|
881
|
+
displayName: string;
|
|
882
|
+
};
|
|
883
|
+
|
|
884
|
+
interface IScrollAreaProperties extends React$1.ComponentProps<any> {
|
|
885
|
+
scrollbar?: boolean;
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Add native scroll functionality to custom components.
|
|
889
|
+
*/
|
|
890
|
+
declare const ScrollArea: ({ scrollbar, children, ...restProps }: IScrollAreaProperties) => React$1.JSX.Element;
|
|
891
|
+
|
|
892
|
+
interface ISwitchComposition {
|
|
893
|
+
Root: typeof SwitchRoot;
|
|
894
|
+
Thumb: typeof SwitchThumb;
|
|
895
|
+
}
|
|
896
|
+
interface ISwitchProperties extends React$1.ComponentProps<"button">, IComponentSize, IComponentVariant, IComponentStyling {
|
|
897
|
+
defaultChecked?: boolean;
|
|
898
|
+
}
|
|
899
|
+
interface ISwitchThumbProperties extends React$1.ComponentProps<"span">, IComponentSize, IComponentStyling {
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* Switch are toggle components that allows the user to turn a setting on or off.
|
|
903
|
+
*
|
|
904
|
+
* **Best practices:**
|
|
905
|
+
*
|
|
906
|
+
* - Use a clear and descriptive label for each switch.
|
|
907
|
+
* - The interaction must have predictable behavior.
|
|
908
|
+
*
|
|
909
|
+
* @param {ISwitchProperties} props - The props for the Switch component.
|
|
910
|
+
* @param {boolean} props.raw - Whether the switch should be rendered without any styles.
|
|
911
|
+
* @param {ComponentSizeEnum} props.sizing - The size of the switch.
|
|
912
|
+
* @param {ComponentVariantEnum} props.variant - The variant of the switch.
|
|
913
|
+
* @param {boolean} props.defaultChecked - The initial state of the switch.
|
|
914
|
+
* @param {ReactNode} props.children - The content to be rendered inside the switch.
|
|
915
|
+
* @returns {ReactElement} The Switch component.
|
|
916
|
+
*/
|
|
917
|
+
declare const Switch: {
|
|
918
|
+
(props: ISwitchProperties): React$1.JSX.Element;
|
|
919
|
+
displayName: string;
|
|
920
|
+
Root: {
|
|
921
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
922
|
+
displayName: string;
|
|
923
|
+
};
|
|
924
|
+
Thumb: {
|
|
925
|
+
(props: ISwitchThumbProperties): React$1.JSX.Element;
|
|
926
|
+
displayName: string;
|
|
927
|
+
};
|
|
928
|
+
};
|
|
929
|
+
declare const SwitchRoot: {
|
|
930
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
931
|
+
displayName: string;
|
|
932
|
+
};
|
|
933
|
+
declare const SwitchThumb: {
|
|
934
|
+
(props: ISwitchThumbProperties): React$1.JSX.Element;
|
|
935
|
+
displayName: string;
|
|
936
|
+
};
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* Table component that provides a scrollable table with styled elements.
|
|
940
|
+
*
|
|
941
|
+
* @param {IScrollAreaProperties & React.ComponentProps<"table">} props - The props for the Table component
|
|
942
|
+
* @returns {React.ReactElement} The Table component
|
|
943
|
+
*/
|
|
944
|
+
declare const Table: {
|
|
945
|
+
({ children, ...restProps }: IScrollAreaProperties & React$1.ComponentProps<"table">): React$1.JSX.Element;
|
|
946
|
+
displayName: string;
|
|
947
|
+
Head: {
|
|
948
|
+
({ children, ...restProps }: React$1.ComponentProps<"thead">): React$1.JSX.Element;
|
|
949
|
+
displayName: string;
|
|
950
|
+
};
|
|
951
|
+
Body: {
|
|
952
|
+
({ children, ...restProps }: React$1.ComponentProps<"tbody">): React$1.JSX.Element;
|
|
953
|
+
displayName: string;
|
|
954
|
+
};
|
|
955
|
+
HeadCell: {
|
|
956
|
+
({ children, ...restProps }: React$1.ComponentProps<"th">): React$1.JSX.Element;
|
|
957
|
+
displayName: string;
|
|
958
|
+
};
|
|
959
|
+
Row: {
|
|
960
|
+
({ children, ...restProps }: React$1.ComponentProps<"tr">): React$1.JSX.Element;
|
|
961
|
+
displayName: string;
|
|
962
|
+
};
|
|
963
|
+
Cell: {
|
|
964
|
+
({ children, ...restProps }: React$1.ComponentProps<"td">): React$1.JSX.Element;
|
|
965
|
+
displayName: string;
|
|
966
|
+
};
|
|
967
|
+
Footer: {
|
|
968
|
+
({ children, ...restProps }: React$1.ComponentProps<"tfoot">): React$1.JSX.Element;
|
|
969
|
+
displayName: string;
|
|
970
|
+
};
|
|
971
|
+
};
|
|
972
|
+
/**
|
|
973
|
+
* Table head component
|
|
974
|
+
*
|
|
975
|
+
* @param {React.ComponentProps<"thead">} props - The props for the TableHead component
|
|
976
|
+
* @returns {React.ReactElement} The TableHead component
|
|
977
|
+
*/
|
|
978
|
+
declare const TableHead: {
|
|
979
|
+
({ children, ...restProps }: React$1.ComponentProps<"thead">): React$1.JSX.Element;
|
|
980
|
+
displayName: string;
|
|
981
|
+
};
|
|
982
|
+
/**
|
|
983
|
+
* Table body component
|
|
984
|
+
*
|
|
985
|
+
* @param {React.ComponentProps<"tbody">} props - The props for the TableBody component
|
|
986
|
+
* @returns {React.ReactElement} The TableBody component
|
|
987
|
+
*/
|
|
988
|
+
declare const TableBody: {
|
|
989
|
+
({ children, ...restProps }: React$1.ComponentProps<"tbody">): React$1.JSX.Element;
|
|
990
|
+
displayName: string;
|
|
991
|
+
};
|
|
992
|
+
/**
|
|
993
|
+
* Table head cell component
|
|
994
|
+
*
|
|
995
|
+
* @param {React.ComponentProps<"th">} props - The props for the TableHeadCell component
|
|
996
|
+
* @returns {React.ReactElement} The TableHeadCell component
|
|
997
|
+
*/
|
|
998
|
+
declare const TableHeadCell: {
|
|
999
|
+
({ children, ...restProps }: React$1.ComponentProps<"th">): React$1.JSX.Element;
|
|
1000
|
+
displayName: string;
|
|
1001
|
+
};
|
|
1002
|
+
/**
|
|
1003
|
+
* Table row component
|
|
1004
|
+
*
|
|
1005
|
+
* @param {React.ComponentProps<"tr">} props - The props for the TableRow component
|
|
1006
|
+
* @returns {React.ReactElement} The TableRow component
|
|
1007
|
+
*/
|
|
1008
|
+
declare const TableRow: {
|
|
1009
|
+
({ children, ...restProps }: React$1.ComponentProps<"tr">): React$1.JSX.Element;
|
|
1010
|
+
displayName: string;
|
|
1011
|
+
};
|
|
1012
|
+
/**
|
|
1013
|
+
* Table cell component
|
|
1014
|
+
*
|
|
1015
|
+
* @param {React.ComponentProps<"td">} props - The props for the TableCell component
|
|
1016
|
+
* @returns {React.ReactElement} The TableCell component
|
|
1017
|
+
*/
|
|
1018
|
+
declare const TableCell: {
|
|
1019
|
+
({ children, ...restProps }: React$1.ComponentProps<"td">): React$1.JSX.Element;
|
|
1020
|
+
displayName: string;
|
|
1021
|
+
};
|
|
1022
|
+
/**
|
|
1023
|
+
* Table footer component
|
|
1024
|
+
*
|
|
1025
|
+
* @param {React.ComponentProps<"tfoot">} props - The props for the TableFooter component
|
|
1026
|
+
* @returns {React.ReactElement} The TableFooter component
|
|
1027
|
+
*/
|
|
1028
|
+
declare const TableFooter: {
|
|
1029
|
+
({ children, ...restProps }: React$1.ComponentProps<"tfoot">): React$1.JSX.Element;
|
|
1030
|
+
displayName: string;
|
|
1031
|
+
};
|
|
1032
|
+
|
|
1033
|
+
interface ITabsProperties extends React$1.ComponentProps<"div"> {
|
|
1034
|
+
value?: string;
|
|
1035
|
+
defaultOpen?: string;
|
|
1036
|
+
}
|
|
1037
|
+
interface ITabsComposition {
|
|
1038
|
+
Root: typeof TabsRoot;
|
|
1039
|
+
Trigger: typeof TabsTrigger;
|
|
1040
|
+
Content: typeof TabsContent;
|
|
1041
|
+
}
|
|
1042
|
+
/**
|
|
1043
|
+
* Tabs are components for a set of tab panels that allows the user to switch between them.
|
|
1044
|
+
*
|
|
1045
|
+
* **Best practices:**
|
|
1046
|
+
*
|
|
1047
|
+
* - Ensure that the tabs can be navigated and activated using the keyboard.
|
|
1048
|
+
* - Ensure that the focus is managed correctly when switching between tabs.
|
|
1049
|
+
* - Ensure that the active tab is visibly indicated and that its content is visible and focusable.
|
|
1050
|
+
*
|
|
1051
|
+
* @param {ITabsProperties} props - The props for the Tabs component.
|
|
1052
|
+
* @param {string} props.defaultOpen - The value of the tab panel that should be open by default.
|
|
1053
|
+
* @param {ReactNode} props.children - The content to be rendered inside the tabs component.
|
|
1054
|
+
* @returns {ReactElement} The Tabs component.
|
|
1055
|
+
*/
|
|
1056
|
+
declare const Tabs: {
|
|
1057
|
+
(props: ITabsProperties): React$1.JSX.Element;
|
|
1058
|
+
displayName: string;
|
|
1059
|
+
Root: {
|
|
1060
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
1061
|
+
displayName: string;
|
|
1062
|
+
};
|
|
1063
|
+
Trigger: {
|
|
1064
|
+
(props: IButtonProperties): React$1.JSX.Element;
|
|
1065
|
+
displayName: string;
|
|
1066
|
+
};
|
|
1067
|
+
Content: {
|
|
1068
|
+
(props: ITabsProperties): React$1.JSX.Element;
|
|
1069
|
+
displayName: string;
|
|
1070
|
+
};
|
|
1071
|
+
};
|
|
1072
|
+
declare const TabsRoot: {
|
|
1073
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
1074
|
+
displayName: string;
|
|
1075
|
+
};
|
|
1076
|
+
/**
|
|
1077
|
+
* Tabs.Trigger is used to triggers the expansion and collapse of the associated Tabs.Content component.
|
|
1078
|
+
*
|
|
1079
|
+
* **Best practices:**
|
|
1080
|
+
*
|
|
1081
|
+
* - Use a clear and descriptive title for the trigger that accurately conveys the content of the associated tab panel.
|
|
1082
|
+
* - Ensure that the trigger can be operated using only the keyboard.
|
|
1083
|
+
* - Ensure that the focus is properly managed when the trigger is activated.
|
|
1084
|
+
*
|
|
1085
|
+
* @param {IButtonProperties} props - The props for the Tabs.Trigger component.
|
|
1086
|
+
* @param {string} props.value - The value used to bind the Tabs.Trigger and Tabs.Content components.
|
|
1087
|
+
* @param {ReactNode} props.children - The content to be rendered inside the tabs trigger.
|
|
1088
|
+
* @returns {ReactElement} The Tabs.Trigger component.
|
|
1089
|
+
*/
|
|
1090
|
+
declare const TabsTrigger: {
|
|
1091
|
+
(props: IButtonProperties): React$1.JSX.Element;
|
|
1092
|
+
displayName: string;
|
|
1093
|
+
};
|
|
1094
|
+
/**
|
|
1095
|
+
* Tabs.Content is used to contains the content of the associated Tabs.Trigger component.
|
|
1096
|
+
*
|
|
1097
|
+
* **Best practices:**
|
|
1098
|
+
*
|
|
1099
|
+
* - Ensure that the content is hidden when the associated tab panel is collapsed.
|
|
1100
|
+
* - Ensure that the content is properly focused when the associated tab panel is expanded.
|
|
1101
|
+
*
|
|
1102
|
+
* @param {ITabsProperties} props - The props for the Tabs.Content component.
|
|
1103
|
+
* @param {string} props.value - The value used to bind the Tabs.Content and Tabs.Trigger components.
|
|
1104
|
+
* @param {ReactNode} props.children - The content to be rendered inside the tab.
|
|
1105
|
+
* @returns {ReactElement} The Tabs.Content component.
|
|
1106
|
+
*/
|
|
1107
|
+
declare const TabsContent: {
|
|
1108
|
+
(props: ITabsProperties): React$1.JSX.Element;
|
|
1109
|
+
displayName: string;
|
|
1110
|
+
};
|
|
1111
|
+
|
|
1112
|
+
interface IToggleProperties extends IButtonProperties {
|
|
1113
|
+
defaultChecked?: boolean;
|
|
1114
|
+
}
|
|
1115
|
+
/**
|
|
1116
|
+
* Toggle are button that can be switched on or off.
|
|
1117
|
+
*
|
|
1118
|
+
* **Best practices:**
|
|
1119
|
+
*
|
|
1120
|
+
* - Define the checked state of toggles with different variants, labels.
|
|
1121
|
+
* - The interaction must have predictable behavior.
|
|
1122
|
+
*
|
|
1123
|
+
* @param {IToggleProperties} props - The props for the Toggle component.
|
|
1124
|
+
* @param {boolean} props.defaultChecked - The initial checked state of the toggle. Defaults to false.
|
|
1125
|
+
* @param {ReactNode} props.children - The content to be rendered inside the toggle button.
|
|
1126
|
+
* @returns {ReactElement} The Toggle component.
|
|
1127
|
+
*/
|
|
1128
|
+
declare const Toggle: {
|
|
1129
|
+
(props: IToggleProperties): React$1.JSX.Element;
|
|
1130
|
+
displayName: string;
|
|
1131
|
+
};
|
|
1132
|
+
|
|
1133
|
+
interface IToolbarBodyProperties extends IComponentStyling, IComponentSize, IComponentControlProperties, React$1.ComponentProps<"aside"> {
|
|
1134
|
+
defaultOpen?: boolean;
|
|
1135
|
+
side?: TComponentSide;
|
|
1136
|
+
height?: TComponentHeight;
|
|
1137
|
+
}
|
|
1138
|
+
interface IToolbarSectionProperties extends React$1.ComponentProps<"section"> {
|
|
1139
|
+
showoncollapse?: boolean;
|
|
1140
|
+
}
|
|
1141
|
+
interface IToolbarItemProperties extends React$1.ComponentProps<"div"> {
|
|
1142
|
+
showfirstchild?: boolean;
|
|
1143
|
+
}
|
|
1144
|
+
interface IToolbarComposition {
|
|
1145
|
+
Root: typeof ToolbarRoot;
|
|
1146
|
+
Trigger: typeof ToolbarTrigger;
|
|
1147
|
+
Item: typeof ToolbarItem;
|
|
1148
|
+
Section: typeof ToolbarSection;
|
|
1149
|
+
}
|
|
1150
|
+
/**
|
|
1151
|
+
* Toolbar are component that provides a set of tools or actions for the user.
|
|
1152
|
+
*
|
|
1153
|
+
* **Best practices:**
|
|
1154
|
+
*
|
|
1155
|
+
* - Use semantic HTML elements to structure the content of the toolbar.
|
|
1156
|
+
* - Ensure that the toolbar is visible and accessible to all users, including those using assistive technologies.
|
|
1157
|
+
* - Use keyboard shortcuts to provide an alternative way of interacting with the toolbar.
|
|
1158
|
+
* - Ensure that the toolbar is responsive and adapts to different screen sizes and orientations.
|
|
1159
|
+
*
|
|
1160
|
+
* @param {IToolbarBodyProperties} props - The props for the Toolbar component.
|
|
1161
|
+
* @param {boolean} props.raw - Define whether the component is styled or not.
|
|
1162
|
+
* @param {string} props.shortcut - The key combination used as keyboard shortcuts to trigger the toolbar.
|
|
1163
|
+
* @param {string} props.hotkey - The key to use in the key combination for the keyboard shortcuts.
|
|
1164
|
+
* @param {KeyBindingEnum} props.bindkey - The modifier key to use in the key combination.
|
|
1165
|
+
* @param {TComponentSide} props.sizing - The size of the toolbar.
|
|
1166
|
+
* @param {ComponentHeightEnum} props.height - The height definition of the toolbar.
|
|
1167
|
+
* @param {ComponentSideEnum} props.side - The side of the toolbar.
|
|
1168
|
+
* @param {boolean} props.defaultOpen - Whether the toolbar should be open by default.
|
|
1169
|
+
* @param {ReactNode} props.children - The content to be rendered inside the toolbar.
|
|
1170
|
+
* @returns {ReactElement} The Toolbar component.
|
|
1171
|
+
*/
|
|
1172
|
+
declare const Toolbar: {
|
|
1173
|
+
(props: IToolbarBodyProperties): React$1.JSX.Element;
|
|
1174
|
+
displayName: string;
|
|
1175
|
+
Root: {
|
|
1176
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
1177
|
+
displayName: string;
|
|
1178
|
+
};
|
|
1179
|
+
Trigger: {
|
|
1180
|
+
(props: IButtonProperties): React$1.JSX.Element;
|
|
1181
|
+
displayName: string;
|
|
1182
|
+
};
|
|
1183
|
+
Item: {
|
|
1184
|
+
(props: IToolbarItemProperties): React$1.JSX.Element;
|
|
1185
|
+
displayName: string;
|
|
1186
|
+
};
|
|
1187
|
+
Section: {
|
|
1188
|
+
(props: IToolbarSectionProperties): React$1.JSX.Element;
|
|
1189
|
+
displayName: string;
|
|
1190
|
+
};
|
|
1191
|
+
};
|
|
1192
|
+
declare const ToolbarRoot: {
|
|
1193
|
+
({ children }: IReactChildren): React$1.JSX.Element;
|
|
1194
|
+
displayName: string;
|
|
1195
|
+
};
|
|
1196
|
+
/**
|
|
1197
|
+
* Toolbar.Trigger are used to triggers the expansion and collapse of the associated Toolbar component.
|
|
1198
|
+
*
|
|
1199
|
+
* **Best practices:**
|
|
1200
|
+
*
|
|
1201
|
+
* - Use a clear and descriptive title for the trigger that accurately conveys the content of the associated toolbar section.
|
|
1202
|
+
* - Ensure that the trigger can be operated using only the keyboard.
|
|
1203
|
+
* - Ensure that the focus is properly managed when the trigger is activated.
|
|
1204
|
+
*
|
|
1205
|
+
* @param {IButtonProperties} props - The props for the Toolbar.Trigger component.
|
|
1206
|
+
* @param {ReactNode} props.children - The content to be rendered inside the Toolbar trigger.
|
|
1207
|
+
* @returns {ReactElement} The Toolbar.Trigger component.
|
|
1208
|
+
*/
|
|
1209
|
+
declare const ToolbarTrigger: {
|
|
1210
|
+
(props: IButtonProperties): React$1.JSX.Element;
|
|
1211
|
+
displayName: string;
|
|
1212
|
+
};
|
|
1213
|
+
/**
|
|
1214
|
+
* ToolbarSection are used to hold components within a toolbar.
|
|
1215
|
+
*
|
|
1216
|
+
* **Best practices:**
|
|
1217
|
+
*
|
|
1218
|
+
* - Use semantic HTML elements to structure the content of the toolbar section.
|
|
1219
|
+
* - Ensure that the toolbar section is visible and accessible to all users, including those using assistive technologies.
|
|
1220
|
+
*
|
|
1221
|
+
* @param {IToolbarSectionProperties} props - The props for the Toolbar.Section component.
|
|
1222
|
+
* @param {boolean} props.showoncollapse - Whether the section should be shown only when the toolbar is collapsed.
|
|
1223
|
+
* @param {ReactNode} props.children - The content to be rendered inside the toolbar section.
|
|
1224
|
+
* @returns {ReactElement} The Toolbar.Section component.
|
|
1225
|
+
*/
|
|
1226
|
+
declare const ToolbarSection: {
|
|
1227
|
+
(props: IToolbarSectionProperties): React$1.JSX.Element;
|
|
1228
|
+
displayName: string;
|
|
1229
|
+
};
|
|
1230
|
+
/**
|
|
1231
|
+
* ToolbarItem is a component that represents an item within a toolbar.
|
|
1232
|
+
*
|
|
1233
|
+
* **Best practices:**
|
|
1234
|
+
*
|
|
1235
|
+
* - Use semantic HTML elements to structure the content of the toolbar item.
|
|
1236
|
+
* - Ensure that the toolbar item is visible and accessible to all users, including those using assistive technologies.
|
|
1237
|
+
* - Ensure that the toolbar item is focusable and can be interacted with using the keyboard.
|
|
1238
|
+
*
|
|
1239
|
+
* @param {IToolbarItemProperties} props - The props for the Toolbar.Item component.
|
|
1240
|
+
* @param {boolean} props.showfirstchild - Whether to show only the first child of the toolbar item when the toolbar is collapsed.
|
|
1241
|
+
* @param {ReactNode} props.children - The content to be rendered inside the toolbar item.
|
|
1242
|
+
* @returns {ReactElement} The Toolbar.Item component.
|
|
1243
|
+
*/
|
|
1244
|
+
declare const ToolbarItem: {
|
|
1245
|
+
(props: IToolbarItemProperties): React$1.JSX.Element;
|
|
1246
|
+
displayName: string;
|
|
1247
|
+
};
|
|
1248
|
+
|
|
1249
|
+
interface ITooltipProperties extends IComponentStyling, React$1.ComponentProps<"span"> {
|
|
1250
|
+
delay?: number;
|
|
1251
|
+
content: string;
|
|
1252
|
+
children: React$1.ReactNode;
|
|
1253
|
+
}
|
|
1254
|
+
/**
|
|
1255
|
+
* Tooltips are used to convey additional information while hovering a component.
|
|
1256
|
+
*
|
|
1257
|
+
* **Best practices:**
|
|
1258
|
+
*
|
|
1259
|
+
* - Ensure that the content is short and readable.
|
|
1260
|
+
*
|
|
1261
|
+
* @param {ITooltipProperties} props - The props for the Tooltip component.
|
|
1262
|
+
* @param {boolean} props.raw - Define whether the component is styled or not.
|
|
1263
|
+
* @param {number} props.delay - The delay in ms awaited until the Tooltip is displayed. Default to 200ms.
|
|
1264
|
+
* @param {string} props.content - The additional content to be rendered inside the Tooltip.
|
|
1265
|
+
* @param {ReactNode} props.children - The content to be rendered as Tooltip children.
|
|
1266
|
+
* @returns {ReactElement} The Tooltip component.
|
|
1267
|
+
*/
|
|
1268
|
+
declare const Tooltip: {
|
|
1269
|
+
({ delay, content, children, ...restProps }: ITooltipProperties): React$1.JSX.Element;
|
|
1270
|
+
displayName: string;
|
|
1271
|
+
};
|
|
1272
|
+
|
|
1273
|
+
declare const useAccordion: () => IComponentAPI;
|
|
1274
|
+
|
|
1275
|
+
declare const useCheckbox: () => IComponentAPI;
|
|
1276
|
+
|
|
1277
|
+
declare const useCollapsible: () => IComponentAPI;
|
|
1278
|
+
|
|
1279
|
+
declare const useDialog: () => IComponentAPI;
|
|
1280
|
+
|
|
1281
|
+
declare const useDropdownMenu: () => IComponentAPI;
|
|
1282
|
+
|
|
1283
|
+
declare const useField: () => IComponentAPI;
|
|
1284
|
+
|
|
1285
|
+
type MethodsType = React$1.Dispatch<React$1.SetStateAction<boolean>> | any;
|
|
1286
|
+
interface IContextProperties {
|
|
1287
|
+
id: Record<string, string>;
|
|
1288
|
+
states: Record<string, string | boolean>;
|
|
1289
|
+
methods: Record<string, MethodsType>;
|
|
1290
|
+
}
|
|
1291
|
+
declare const useSheet: () => IContextProperties;
|
|
1292
|
+
|
|
1293
|
+
declare const useSwitch: () => IComponentAPI;
|
|
1294
|
+
|
|
1295
|
+
declare const useTabs: () => IComponentAPI;
|
|
1296
|
+
|
|
1297
|
+
declare const useToolbar: () => IComponentAPI;
|
|
1298
|
+
|
|
1299
|
+
export { Accordion, AccordionContent, AccordionRoot, AccordionTrigger, AvataStatusEnum, Avatar, Badge, Button, Checkbox, CheckboxIndicator, CheckboxRoot, Collapsible, CollapsibleContent, CollapsibleRoot, CollapsibleTrigger, Dialog, DialogControl, DialogMenu, DialogOverlay, DialogRoot, DialogTrigger, Divider, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuRoot, DropdownMenuTrigger, Field, FieldLabel, FieldMeta, FieldRoot, FieldWrapper, type IAccordionComposition, type IAccordionContentProperties, type IAccordionProperties, type IAccordionTriggerProperties, type IAvatarProperties, type IButtonProperties, type ICheckboxComposition, type ICheckboxProperties, type ICollapsibleComposition, type ICollapsibleProperties, type IDialogItemProperties, type IDropdownComposition, type IDropdownContentProperties, type IDropdownItemProperties, type IField, type IFieldComposition, type IFieldLabel, type IFieldMeta, type IOTPFieldComposition, type IOverlayProperties, type IPageToolsProperties, type IPageWrapperProperties, type IPortalProperties, type IScrollAreaProperties, type ISheetComposition, type ISheetProperties, type ISwitchComposition, type ISwitchProperties, type ISwitchThumbProperties, type ITabsComposition, type ITabsProperties, type IToggleProperties, type IToolbarBodyProperties, type IToolbarComposition, type IToolbarItemProperties, type IToolbarSectionProperties, MetaVariantEnum, OTPField, OTPFieldSlot, Overlay, Page, PageContent, PageMenu, PageNavigation, PagePanel, PageTools, PageWrapper, Portal, ScrollArea, Sheet, SheetRoot, SheetTrigger, Switch, SwitchRoot, SwitchThumb, type TMetaVariant, Table, TableBody, TableCell, TableFooter, TableHead, TableHeadCell, TableRow, Tabs, TabsContent, TabsRoot, TabsTrigger, Toggle, Toolbar, ToolbarItem, ToolbarRoot, ToolbarSection, ToolbarTrigger, Tooltip, useAccordion, useCheckbox, useCollapsible, useDialog, useDropdownMenu, useField, useSheet, useSwitch, useTabs, useToolbar };
|