@redsift/design-system 6.0.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/CONTRIBUTING.md +382 -0
  2. package/index.d.ts +830 -0
  3. package/index.js +3182 -0
  4. package/index.js.map +1 -0
  5. package/package.json +16 -35
  6. package/style/redsift.css +10 -0
  7. package/esm/_internal/AppBar.js +0 -75
  8. package/esm/_internal/AppBar.js.map +0 -1
  9. package/esm/_internal/AppContainer.js +0 -86
  10. package/esm/_internal/AppContainer.js.map +0 -1
  11. package/esm/_internal/AppContent.js +0 -58
  12. package/esm/_internal/AppContent.js.map +0 -1
  13. package/esm/_internal/AppSidePanel.js +0 -81
  14. package/esm/_internal/AppSidePanel.js.map +0 -1
  15. package/esm/_internal/Badge2.js +0 -73
  16. package/esm/_internal/Badge2.js.map +0 -1
  17. package/esm/_internal/BreadcrumbItem.js +0 -80
  18. package/esm/_internal/BreadcrumbItem.js.map +0 -1
  19. package/esm/_internal/Breadcrumbs2.js +0 -81
  20. package/esm/_internal/Breadcrumbs2.js.map +0 -1
  21. package/esm/_internal/Button2.js +0 -74
  22. package/esm/_internal/Button2.js.map +0 -1
  23. package/esm/_internal/ButtonLink.js +0 -70
  24. package/esm/_internal/ButtonLink.js.map +0 -1
  25. package/esm/_internal/Checkbox2.js +0 -192
  26. package/esm/_internal/Checkbox2.js.map +0 -1
  27. package/esm/_internal/CheckboxGroup.js +0 -150
  28. package/esm/_internal/CheckboxGroup.js.map +0 -1
  29. package/esm/_internal/FloatingActionButton.js +0 -154
  30. package/esm/_internal/FloatingActionButton.js.map +0 -1
  31. package/esm/_internal/Icon2.js +0 -102
  32. package/esm/_internal/Icon2.js.map +0 -1
  33. package/esm/_internal/IconButton.js +0 -90
  34. package/esm/_internal/IconButton.js.map +0 -1
  35. package/esm/_internal/Link2.js +0 -46
  36. package/esm/_internal/Link2.js.map +0 -1
  37. package/esm/_internal/LinkButton.js +0 -53
  38. package/esm/_internal/LinkButton.js.map +0 -1
  39. package/esm/_internal/SideNavigationMenu.js +0 -412
  40. package/esm/_internal/SideNavigationMenu.js.map +0 -1
  41. package/esm/_internal/SideNavigationMenuItem.js +0 -142
  42. package/esm/_internal/SideNavigationMenuItem.js.map +0 -1
  43. package/esm/_internal/_rollupPluginBabelHelpers.js +0 -108
  44. package/esm/_internal/_rollupPluginBabelHelpers.js.map +0 -1
  45. package/esm/_internal/app-bar.js +0 -14
  46. package/esm/_internal/app-bar.js.map +0 -1
  47. package/esm/_internal/app-container.js +0 -17
  48. package/esm/_internal/app-container.js.map +0 -1
  49. package/esm/_internal/app-content.js +0 -8
  50. package/esm/_internal/app-content.js.map +0 -1
  51. package/esm/_internal/app-side-panel.js +0 -18
  52. package/esm/_internal/app-side-panel.js.map +0 -1
  53. package/esm/_internal/badge.js +0 -7
  54. package/esm/_internal/badge.js.map +0 -1
  55. package/esm/_internal/breadcrumb-item.js +0 -9
  56. package/esm/_internal/breadcrumb-item.js.map +0 -1
  57. package/esm/_internal/breadcrumbs.js +0 -10
  58. package/esm/_internal/breadcrumbs.js.map +0 -1
  59. package/esm/_internal/button-link.js +0 -9
  60. package/esm/_internal/button-link.js.map +0 -1
  61. package/esm/_internal/button.js +0 -10
  62. package/esm/_internal/button.js.map +0 -1
  63. package/esm/_internal/checkbox-group.js +0 -8
  64. package/esm/_internal/checkbox-group.js.map +0 -1
  65. package/esm/_internal/checkbox.js +0 -12
  66. package/esm/_internal/checkbox.js.map +0 -1
  67. package/esm/_internal/context.js +0 -6
  68. package/esm/_internal/context.js.map +0 -1
  69. package/esm/_internal/context2.js +0 -6
  70. package/esm/_internal/context2.js.map +0 -1
  71. package/esm/_internal/floating-action-button.js +0 -10
  72. package/esm/_internal/floating-action-button.js.map +0 -1
  73. package/esm/_internal/icon-button.js +0 -10
  74. package/esm/_internal/icon-button.js.map +0 -1
  75. package/esm/_internal/icon.js +0 -7
  76. package/esm/_internal/icon.js.map +0 -1
  77. package/esm/_internal/link-button.js +0 -8
  78. package/esm/_internal/link-button.js.map +0 -1
  79. package/esm/_internal/link.js +0 -7
  80. package/esm/_internal/link.js.map +0 -1
  81. package/esm/_internal/side-navigation-menu-bar.js +0 -14
  82. package/esm/_internal/side-navigation-menu-bar.js.map +0 -1
  83. package/esm/_internal/side-navigation-menu-item.js +0 -11
  84. package/esm/_internal/side-navigation-menu-item.js.map +0 -1
  85. package/esm/_internal/side-navigation-menu.js +0 -13
  86. package/esm/_internal/side-navigation-menu.js.map +0 -1
  87. package/esm/_internal/styles.js +0 -101
  88. package/esm/_internal/styles.js.map +0 -1
  89. package/esm/_internal/styles2.js +0 -17
  90. package/esm/_internal/styles2.js.map +0 -1
  91. package/esm/_internal/types.js +0 -31
  92. package/esm/_internal/types.js.map +0 -1
  93. package/esm/_internal/useAppSidePanel.js +0 -22
  94. package/esm/_internal/useAppSidePanel.js.map +0 -1
  95. package/esm/_internal/useIsLoaded.js +0 -14
  96. package/esm/_internal/useIsLoaded.js.map +0 -1
  97. package/esm/_internal/useSideNavigationMenuBar.js +0 -303
  98. package/esm/_internal/useSideNavigationMenuBar.js.map +0 -1
  99. package/esm/_internal/warnIfNoAccessibleLabelFound.js +0 -21
  100. package/esm/_internal/warnIfNoAccessibleLabelFound.js.map +0 -1
  101. package/esm/index.js +0 -35
  102. package/esm/index.js.map +0 -1
  103. package/types.d.ts +0 -782
package/index.d.ts ADDED
@@ -0,0 +1,830 @@
1
+ import React, { Ref, ReactElement, ComponentProps, RefObject, MutableRefObject, ChangeEvent } from 'react';
2
+ import { PressEvent } from '@react-types/shared';
3
+ import * as styled_components from 'styled-components';
4
+
5
+ /** Component Type. */
6
+ declare type Comp<P, T = HTMLElement> = {
7
+ (props: P & {
8
+ ref?: Ref<T>;
9
+ }): ReactElement | null;
10
+ /** React component type. */
11
+ readonly $$typeof: symbol;
12
+ /** Component default props. */
13
+ defaultProps?: Partial<P>;
14
+ /** Component name. */
15
+ displayName?: string;
16
+ /** Component base class name. */
17
+ className?: string;
18
+ };
19
+ /**
20
+ * JS falsy values.
21
+ * (excluding `NaN` as it can't be distinguished from `number`)
22
+ */
23
+ declare type Falsy = false | undefined | null | 0 | '';
24
+ /** Get types of the values of a record. */
25
+ declare type ValueOf<T extends Record<any, any>> = T[keyof T];
26
+ /**
27
+ * Color palette.
28
+ */
29
+ declare const ColorPalette: {
30
+ readonly primary: "primary";
31
+ readonly secondary: "secondary";
32
+ readonly error: "error";
33
+ readonly warning: "warning";
34
+ readonly info: "info";
35
+ readonly success: "success";
36
+ };
37
+ declare type ColorPalette = ValueOf<typeof ColorPalette>;
38
+ declare type Color = ColorPalette | string;
39
+ /**
40
+ * Theme
41
+ */
42
+ declare const Theme: {
43
+ readonly dark: "dark";
44
+ readonly light: "light";
45
+ };
46
+ declare type Theme = ValueOf<typeof Theme>;
47
+
48
+ /**
49
+ * Component size.
50
+ */
51
+ declare const IconButtonSize: {
52
+ readonly large: "large";
53
+ readonly medium: "medium";
54
+ readonly small: "small";
55
+ };
56
+ declare type IconButtonSize = ValueOf<typeof IconButtonSize>;
57
+ /**
58
+ * Component props.
59
+ */
60
+ interface IconButtonProps extends ComponentProps<'button'> {
61
+ /** Color variant. */
62
+ color?: ColorPalette;
63
+ /**
64
+ * Icon path data (`d` property of the `path` SVG element).<br />
65
+ * See <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths">https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths</a>.<br />
66
+ * Recommended path data come from mdi/js.<br />
67
+ * See <a href="https://www.npmjs.com/package/@mdi/js">https://www.npmjs.com/package/@mdi/js</a>.
68
+ */
69
+ icon: string;
70
+ /** Whether the component is disabled or not. */
71
+ isDisabled?: boolean;
72
+ /** Preferred method to handle click, press and touch. */
73
+ onPress?: (e: PressEvent) => void;
74
+ /** IconButton size. */
75
+ size?: IconButtonSize;
76
+ }
77
+ declare type StyledIconButtonProps = Omit<IconButtonProps, 'isDisabled' | 'color' | 'size' | 'icon'> & {
78
+ $isDisabled: IconButtonProps['isDisabled'];
79
+ $color: IconButtonProps['color'];
80
+ };
81
+
82
+ /**
83
+ * The Icon Button is a component that contains only one icon as a child, without text.
84
+ *
85
+ * This component should use aria-label, aria-labelledby or aria-describedby to make this
86
+ * component usable with a screen reader.
87
+ */
88
+ declare const IconButton: Comp<IconButtonProps, HTMLButtonElement>;
89
+
90
+ /**
91
+ * Component props.
92
+ */
93
+ interface AppBarProps extends Omit<ComponentProps<'header'>, 'title'> {
94
+ /** Title of the page if no one provided automatically */
95
+ fallbackTitle?: string;
96
+ /** Custom props to pass to the IconButton used to expand the side panel. */
97
+ iconButtonProps?: Omit<IconButtonProps, 'icon'>;
98
+ /** Custom ref to pass to the IconButton used to expand the side panel. */
99
+ iconButtonRef?: RefObject<HTMLButtonElement>;
100
+ /** Title of the page */
101
+ title?: string | ReactElement;
102
+ }
103
+ declare type StyledAppBarProps = AppBarProps & {
104
+ $isLoaded: boolean;
105
+ $isSidePanelCollapsed: boolean;
106
+ };
107
+
108
+ /**
109
+ * The AppBar component.
110
+ */
111
+ declare const AppBar: Comp<AppBarProps, HTMLHeadingElement>;
112
+
113
+ /**
114
+ * Context props.
115
+ */
116
+ declare type AppContainerState = {
117
+ /** Collapses the side panel. */
118
+ collapseSidePanel(): void;
119
+ /** Expandes the side panel. */
120
+ expandSidePanel(): void;
121
+ /** Whether the side panel is collapsed. */
122
+ readonly isSidePanelCollapsed: boolean;
123
+ /** Set title of the page. */
124
+ setTitle(title?: string): void;
125
+ /** Page title. */
126
+ readonly title?: string;
127
+ };
128
+ /**
129
+ * Component props.
130
+ */
131
+ interface AppContainerProps extends ComponentProps<'div'> {
132
+ }
133
+
134
+ declare const AppContainerContext: React.Context<AppContainerState | null>;
135
+
136
+ /**
137
+ * The AppContainer component.
138
+ */
139
+ declare const AppContainer: Comp<AppContainerProps, HTMLDivElement>;
140
+
141
+ /**
142
+ * Component props.
143
+ */
144
+ interface AppContentProps extends ComponentProps<'main'> {
145
+ }
146
+ declare type StyledAppContentProps = AppContentProps & {
147
+ $isLoaded: boolean;
148
+ $isSidePanelCollapsed: boolean;
149
+ };
150
+
151
+ /**
152
+ * The AppContent component.
153
+ */
154
+ declare const AppContent: Comp<AppContentProps, HTMLElement>;
155
+
156
+ /**
157
+ * Component props.
158
+ */
159
+ interface AppSidePanelProps extends ComponentProps<'div'> {
160
+ /** Elements to display on top of the navigation menu. Usually a button. */
161
+ featuredElements?: ReactElement | ReactElement[];
162
+ /** Custom props to pass to the IconButton used to collapse the side panel. */
163
+ iconButtonProps?: Omit<IconButtonProps, 'icon'>;
164
+ /** Custom ref to pass to the IconButton used to collapse the side panel. */
165
+ iconButtonRef?: RefObject<HTMLButtonElement>;
166
+ /** Whether the component is collapsed or not. */
167
+ isCollapsed?: boolean;
168
+ /** Place to display the logo app. */
169
+ logo?: ReactElement | ComponentProps<'img'>;
170
+ /** Method called when a click occurs on the top-right close button - which is displayed only if the method is defined. */
171
+ onClose?: (e: PressEvent) => void;
172
+ }
173
+ declare type StyledAppSidePanelProps = Omit<AppSidePanelProps, 'isCollapsed'> & {
174
+ $isCollapsed: boolean;
175
+ };
176
+
177
+ /**
178
+ * The AppSidePanel component.
179
+ */
180
+ declare const AppSidePanel: Comp<AppSidePanelProps, HTMLDivElement>;
181
+
182
+ /**
183
+ * Component size.
184
+ */
185
+ declare const IconSize: {
186
+ readonly large: "large";
187
+ readonly medium: "medium";
188
+ readonly small: "small";
189
+ };
190
+ declare type IconSize = ValueOf<typeof IconSize>;
191
+ /**
192
+ * Component props.
193
+ */
194
+ interface IconProps extends ComponentProps<'i'> {
195
+ /** Indicates whether the element is exposed to an accessibility API. */
196
+ 'aria-hidden'?: boolean | 'false' | 'true';
197
+ /** A screen reader only label for the Icon. */
198
+ 'aria-label'?: string;
199
+ /** Color variant. Either from color palette or hex or rgb strings. */
200
+ color?: Color | string;
201
+ /** Whether the icon has a badge attached to it. */
202
+ badge?: ReactElement;
203
+ /**
204
+ * Icon path data (`d` property of the `path` SVG element).<br />
205
+ * See <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths">https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths</a>.<br />
206
+ * Recommended path data come from mdi/js.<br />
207
+ * See <a href="https://www.npmjs.com/package/@mdi/js">https://www.npmjs.com/package/@mdi/js</a>.
208
+ */
209
+ icon: string;
210
+ /** Icon size. */
211
+ size?: IconSize;
212
+ /** Additional properties to forward to the SVG tag. */
213
+ svgProps?: ComponentProps<'svg'>;
214
+ }
215
+ declare type StyledIconProps = Omit<IconProps, 'color' | 'size' | 'icon' | 'svgProps'> & {
216
+ $color: IconProps['color'];
217
+ $size: IconProps['size'];
218
+ };
219
+
220
+ /**
221
+ * The Icon component.
222
+ */
223
+ declare const Icon: Comp<IconProps, HTMLSpanElement>;
224
+
225
+ /**
226
+ * Context props.
227
+ */
228
+ declare type SideNavigationMenuContextProps = {
229
+ menuItems: Set<HTMLAnchorElement | HTMLButtonElement>;
230
+ };
231
+ /**
232
+ * Reducer props.
233
+ */
234
+ declare type SideNavigationMenuReducerState = {
235
+ isExpanded: boolean;
236
+ currentIndex: number;
237
+ previousIndex: number;
238
+ };
239
+ declare enum SideNavigationMenuReducerActionType {
240
+ Expand = "expand",
241
+ Collapse = "collapse",
242
+ Move = "move"
243
+ }
244
+ declare type SideNavigationMenuReducerAction = {
245
+ type: SideNavigationMenuReducerActionType;
246
+ index?: number;
247
+ };
248
+ /**
249
+ * Component props.
250
+ */
251
+ interface SideNavigationMenuProps extends ComponentProps<'div'> {
252
+ /** Custom props to pass to the button. */
253
+ buttonProps?: ComponentProps<'button'>;
254
+ /** Custom ref to pass to the button. */
255
+ buttonRef?: MutableRefObject<HTMLButtonElement>;
256
+ /** Whether or not the menu contains children that have a badge. */
257
+ hasBadge?: boolean;
258
+ /**
259
+ * Icon path data (`d` property of the `path` SVG element).<br />
260
+ * See <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths">https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths</a>.<br />
261
+ * Recommended path data come from mdi/js.<br />
262
+ * See <a href="https://www.npmjs.com/package/@mdi/js">https://www.npmjs.com/package/@mdi/js</a>.
263
+ */
264
+ icon?: string;
265
+ /** Custom props to pass to the Icon component. */
266
+ iconProps?: Omit<IconProps, 'icon'>;
267
+ /** Custom ref to pass to the Icon component. */
268
+ iconRef?: MutableRefObject<HTMLElement>;
269
+ /** Whether the component is disabled or not. */
270
+ isDisabled?: boolean;
271
+ /** Whether the menu is expanded or not. */
272
+ isExpanded?: boolean;
273
+ /** Custom props to pass to the menu. */
274
+ menuProps?: ComponentProps<'ul'>;
275
+ /** Custom ref to pass to the menu. */
276
+ menuRef?: MutableRefObject<HTMLUListElement>;
277
+ /** Whether the component should hide icons or not. */
278
+ withoutIcons?: boolean;
279
+ }
280
+ declare type StyledSideNavigationMenuProps = Omit<SideNavigationMenuProps, 'isDisabled' | 'isExpanded' | 'withoutIcons'> & {
281
+ $isDisabled: SideNavigationMenuProps['isDisabled'];
282
+ $isExpanded: SideNavigationMenuProps['isExpanded'];
283
+ $withoutIcons: SideNavigationMenuProps['withoutIcons'];
284
+ };
285
+
286
+ /**
287
+ * The SideNavigationMenu component.
288
+ */
289
+ declare const SideNavigationMenu: Comp<SideNavigationMenuProps, HTMLDivElement>;
290
+
291
+ /**
292
+ * Component variant.
293
+ */
294
+ declare const BadgeVariant: {
295
+ readonly dot: "dot";
296
+ readonly standard: "standard";
297
+ };
298
+ declare type BadgeVariant = ValueOf<typeof BadgeVariant>;
299
+ /**
300
+ * Component props.
301
+ */
302
+ interface BadgeProps extends ComponentProps<'div'> {
303
+ /** Whether the badge should automatically break content. */
304
+ autoBreak?: boolean;
305
+ /** Color variant. Either from color palette or hex or rgb strings. */
306
+ color?: Color | string;
307
+ /** Badge variant. */
308
+ variant?: BadgeVariant;
309
+ }
310
+ declare type StyledBadgeProps = Omit<BadgeProps, 'color' | 'variant' | 'autoBreak'> & {
311
+ $autoBreak: BadgeProps['autoBreak'];
312
+ $color: BadgeProps['color'];
313
+ $variant: BadgeProps['variant'];
314
+ };
315
+
316
+ /**
317
+ * The Badge component.
318
+ */
319
+ declare const Badge: Comp<BadgeProps, HTMLDivElement>;
320
+
321
+ /**
322
+ * Component props.
323
+ */
324
+ interface SideNavigationMenuItemProps extends ComponentProps<'a'> {
325
+ /** Prop to pass a custom react component instead of a simple HTML anchor (useful for Nextjs or React Router Link component). */
326
+ as?: 'a' | any;
327
+ /** Text or number that should be displayed inside a badge next to the menu item text. */
328
+ badge?: number | string;
329
+ /** @deprecated Number that should be displayed inside a badge next to the menu item text. */
330
+ badgeNumber?: number;
331
+ /** Custom props to pass to the Badge component, if any. */
332
+ badgeProps?: Omit<BadgeProps, 'ref'>;
333
+ /** Href is required for this component. */
334
+ href: ComponentProps<'a'>['href'];
335
+ /**
336
+ * Icon path data (`d` property of the `path` SVG element).<br />
337
+ * See <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths">https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths</a>.<br />
338
+ * Recommended path data come from mdi/js.<br />
339
+ * See <a href="https://www.npmjs.com/package/@mdi/js">https://www.npmjs.com/package/@mdi/js</a>.
340
+ */
341
+ icon?: string;
342
+ /** Custom props to pass to the Icon component. */
343
+ iconProps?: Omit<IconProps, 'icon'>;
344
+ /** Custom ref to pass to the Icon component. */
345
+ iconRef?: RefObject<HTMLElement>;
346
+ /** Whether the component is active or not. */
347
+ isCurrent?: boolean;
348
+ /** Whether the component is disabled or not. */
349
+ isDisabled?: boolean;
350
+ /** Whether the component is a second-level menu item. */
351
+ isSecondLevel?: boolean;
352
+ /** Whether the component should hide icons or not. */
353
+ withoutIcons?: boolean;
354
+ }
355
+ declare type StyledSideNavigationMenuItemProps = Omit<SideNavigationMenuItemProps, 'isCurrent' | 'isDisabled' | 'isSecondLevel' | 'withoutIcons'> & {
356
+ $isCurrent: SideNavigationMenuItemProps['isCurrent'];
357
+ $isDisabled: SideNavigationMenuItemProps['isDisabled'];
358
+ $isSecondLevel: SideNavigationMenuItemProps['isSecondLevel'];
359
+ $withoutIcons: SideNavigationMenuItemProps['withoutIcons'];
360
+ };
361
+
362
+ /**
363
+ * The SideNavigationMenuItem component.
364
+ */
365
+ declare const SideNavigationMenuItem: Comp<SideNavigationMenuItemProps, HTMLAnchorElement>;
366
+
367
+ /**
368
+ * Context props.
369
+ */
370
+ declare type SideNavigationMenuBarContextProps = {
371
+ menuItems: Set<HTMLAnchorElement | HTMLButtonElement>;
372
+ };
373
+ /**
374
+ * Component props.
375
+ */
376
+ interface SideNavigationMenuBarProps extends ComponentProps<'nav'> {
377
+ /** Whether the component is disabled or not. */
378
+ isDisabled?: boolean;
379
+ /** Custom props to pass to the menubar. */
380
+ menubarProps?: ComponentProps<'ul'>;
381
+ /** Custom ref to pass to the menubar. */
382
+ menubarRef?: MutableRefObject<HTMLUListElement>;
383
+ /** Whether the component should hide icons or not. */
384
+ withoutIcons?: boolean;
385
+ }
386
+ declare type StyledSideNavigationMenuBarProps = Omit<SideNavigationMenuBarProps, 'isDisabled' | 'withoutIcons'> & {
387
+ $isDisabled: SideNavigationMenuBarProps['isDisabled'];
388
+ $marginTop?: number;
389
+ $withoutIcons: SideNavigationMenuBarProps['withoutIcons'];
390
+ };
391
+ /**
392
+ * Hook props.
393
+ */
394
+ interface MenuItem extends Omit<SideNavigationMenuItemProps, 'children'> {
395
+ title: string;
396
+ }
397
+ interface Menu extends Omit<SideNavigationMenuProps, 'children'> {
398
+ title: string;
399
+ children: MenuItem[];
400
+ }
401
+ declare type MenuBarItems = (Menu | MenuItem)[];
402
+
403
+ /**
404
+ * The SideNavigationMenuBar component.
405
+ */
406
+ declare const SideNavigationMenuBar: Comp<SideNavigationMenuBarProps, HTMLElement>;
407
+
408
+ interface UseSideNavigationMenuBarProps {
409
+ items: MenuBarItems;
410
+ isActive?: (href: string) => boolean;
411
+ }
412
+ declare const useSideNavigationMenuBar: ({ items, isActive, }: UseSideNavigationMenuBarProps) => Omit<SideNavigationMenuBarProps, 'ref'>;
413
+
414
+ declare const useAppSidePanel: ({ items, isActive, }: UseSideNavigationMenuBarProps) => Omit<AppSidePanelProps, 'ref'>;
415
+
416
+ /**
417
+ * Component props.
418
+ */
419
+ interface BreadcrumbItemProps extends ComponentProps<'a'> {
420
+ /** Prop to pass a custom react component instead of a simple HTML anchor (useful for Nextjs or React Router Link component). */
421
+ as?: 'a' | any;
422
+ /**
423
+ * Icon path data (`d` property of the `path` SVG element).<br />
424
+ * See <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths">https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths</a>.<br />
425
+ * Recommended path data come from mdi/js.<br />
426
+ * See <a href="https://www.npmjs.com/package/@mdi/js">https://www.npmjs.com/package/@mdi/js</a>.
427
+ */
428
+ icon?: string;
429
+ /** Whether the breadcrumb item is the current page. */
430
+ isCurrent?: boolean;
431
+ /** Whether the component is disabled or not. */
432
+ isDisabled?: boolean;
433
+ /** Theme. */
434
+ theme?: Theme;
435
+ }
436
+ declare type StyledBreadcrumbItemProps = Omit<BreadcrumbItemProps, 'isDisabled' | 'isCurrent'> & {
437
+ $isCurrent: BreadcrumbItemProps['isCurrent'];
438
+ $isDisabled: BreadcrumbItemProps['isDisabled'];
439
+ $theme: BreadcrumbItemProps['theme'];
440
+ };
441
+
442
+ /**
443
+ * The BreadcrumbItem components is a list of links to the parent pages of the current page in hierarchical order.
444
+ */
445
+ declare const BreadcrumbItem: Comp<BreadcrumbItemProps, HTMLAnchorElement>;
446
+
447
+ /**
448
+ * Component props.
449
+ */
450
+ interface BreadcrumbsProps extends ComponentProps<'nav'> {
451
+ /**
452
+ * Icon path data (`d` property of the `path` SVG element).<br />
453
+ * See <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths">https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths</a>.<br />
454
+ * Recommended path data come from mdi/js.<br />
455
+ * See <a href="https://www.npmjs.com/package/@mdi/js">https://www.npmjs.com/package/@mdi/js</a>.
456
+ */
457
+ icon?: string;
458
+ /** Whether the component is disabled or not. */
459
+ isDisabled?: boolean;
460
+ /** Separator. */
461
+ separator?: ReactElement | string;
462
+ /** Theme. */
463
+ theme?: Theme;
464
+ }
465
+ declare type StyledBreadcrumbsProps = Omit<BreadcrumbsProps, 'isDisabled'> & {
466
+ $isDisabled: BreadcrumbsProps['isDisabled'];
467
+ $theme: BreadcrumbsProps['theme'];
468
+ };
469
+
470
+ /**
471
+ * The Breadcrumbs components is a list of links to the parent pages of the current page in hierarchical order.
472
+ */
473
+ declare const Breadcrumbs: Comp<BreadcrumbsProps, HTMLElement>;
474
+
475
+ /**
476
+ * Component variant.
477
+ */
478
+ declare const ButtonVariant: {
479
+ readonly contained: "contained";
480
+ readonly outlined: "outlined";
481
+ readonly text: "text";
482
+ };
483
+ declare type ButtonVariant = ValueOf<typeof ButtonVariant>;
484
+ /**
485
+ * Component size.
486
+ */
487
+ declare const ButtonSize: {
488
+ readonly large: "large";
489
+ readonly medium: "medium";
490
+ readonly small: "small";
491
+ };
492
+ declare type ButtonSize = ValueOf<typeof ButtonSize>;
493
+ /**
494
+ * Component props.
495
+ */
496
+ interface ButtonProps extends ComponentProps<'button'> {
497
+ /** Color variant. */
498
+ color?: ColorPalette;
499
+ /** Whether the component take the full width or not. */
500
+ fullWidth?: boolean;
501
+ /** Whether the component is disabled or not. */
502
+ isDisabled?: boolean;
503
+ /**
504
+ * Icon path data (`d` property of the `path` SVG element).<br />
505
+ * See <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths">https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths</a>.<br />
506
+ * Recommended path data come from mdi/js.<br />
507
+ * See <a href="https://www.npmjs.com/package/@mdi/js">https://www.npmjs.com/package/@mdi/js</a>.
508
+ */
509
+ leftIcon?: string;
510
+ /** Preferred method to handle click, press and touch. */
511
+ onPress?: (e: PressEvent) => void;
512
+ /**
513
+ * Icon path data (`d` property of the `path` SVG element).<br />
514
+ * See <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths">https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths</a>.<br />
515
+ * Recommended path data come from mdi/js.<br />
516
+ * See <a href="https://www.npmjs.com/package/@mdi/js">https://www.npmjs.com/package/@mdi/js</a>.
517
+ */
518
+ rightIcon?: string;
519
+ /** Button size. */
520
+ size?: ButtonSize;
521
+ /** Button variant. */
522
+ variant?: ButtonVariant;
523
+ }
524
+ declare type StyledButtonProps = Omit<ButtonProps, 'isDisabled' | 'variant' | 'color' | 'size' | 'fullWidth'> & {
525
+ $isDisabled: ButtonProps['isDisabled'];
526
+ $variant: ButtonProps['variant'];
527
+ $color: ButtonProps['color'];
528
+ $size: ButtonProps['size'];
529
+ $fullWidth: ButtonProps['fullWidth'];
530
+ };
531
+
532
+ /**
533
+ * Component style.
534
+ */
535
+ declare const StyledButton: styled_components.StyledComponent<"button", any, Omit<ButtonProps, "color" | "isDisabled" | "size" | "variant" | "fullWidth"> & {
536
+ $isDisabled: boolean | undefined;
537
+ $variant: ButtonVariant | undefined;
538
+ $color: ColorPalette | undefined;
539
+ $size: ButtonSize | undefined;
540
+ $fullWidth: boolean | undefined;
541
+ }, never>;
542
+
543
+ /**
544
+ * The Button is a semantic button that looks like a button.
545
+ *
546
+ * For a semantic link that looks like a button, please use the ButtonLink component.
547
+ * For a semantic link that looks like a link, please use the Link component.
548
+ * For a semantic button that looks like a link, please use the LinkButton component.
549
+ */
550
+ declare const Button: Comp<ButtonProps, HTMLButtonElement>;
551
+
552
+ /**
553
+ * Component props.
554
+ */
555
+ interface LinkProps extends ComponentProps<'a'> {
556
+ /** Prop to pass a custom react component instead of a simple HTML anchor (useful for Nextjs or React Router Link component). */
557
+ as?: 'a' | any;
558
+ /** Whether the component is disabled or not. */
559
+ isDisabled?: boolean;
560
+ }
561
+ declare type StyledLinkProps = Omit<LinkProps, 'isDisabled'> & {
562
+ $isDisabled: LinkProps['isDisabled'];
563
+ };
564
+
565
+ /**
566
+ * Component style.
567
+ */
568
+ declare const StyledLink: styled_components.StyledComponent<"a", any, Omit<LinkProps, "isDisabled"> & {
569
+ $isDisabled: boolean | undefined;
570
+ }, never>;
571
+
572
+ /**
573
+ * The Link is a semantic link that looks like a link.
574
+ * Shoud be used for internal and external navigation only.
575
+ *
576
+ * For a semantic link that looks like a button, please use the ButtonLink component.
577
+ * For a semantic button that looks like a button, please use the Button component.
578
+ * For a semantic button that looks like a link, please use the LinkButton component.
579
+ */
580
+ declare const Link: Comp<LinkProps, HTMLAnchorElement>;
581
+
582
+ /**
583
+ * Component props.
584
+ */
585
+ interface ButtonLinkProps extends Omit<LinkProps, 'color'>, Pick<ButtonProps, 'color' | 'leftIcon' | 'rightIcon' | 'size' | 'variant'> {
586
+ }
587
+ declare type StyledButtonLinkProps = Omit<ButtonLinkProps, 'isDisabled' | 'variant' | 'color' | 'size'> & {
588
+ $isDisabled: ButtonLinkProps['isDisabled'];
589
+ $variant: ButtonLinkProps['variant'];
590
+ $color: ButtonLinkProps['color'];
591
+ $size: ButtonLinkProps['size'];
592
+ };
593
+
594
+ /**
595
+ * The ButtonLink is a semantic link that looks like a button.
596
+ *
597
+ * For a semantic button that looks like a button, please use the Button component.
598
+ * For a semantic link that looks like a link, please use the Link component.
599
+ * For a semantic button that looks like a link, please use the LinkButton component.
600
+ */
601
+ declare const ButtonLink: Comp<ButtonLinkProps, HTMLAnchorElement>;
602
+
603
+ /**
604
+ * Context props.
605
+ */
606
+ declare type CheckboxGroupState = {
607
+ /** Adds a value to the set of selected values. */
608
+ addValue(value: string): void;
609
+ /** Whether the checkbox group is disabled or not. */
610
+ readonly isDisabled: boolean;
611
+ /** Whether the checkbox group is read only or not. */
612
+ readonly isReadOnly: boolean;
613
+ /** Removes a value from the set of selected values. */
614
+ removeValue(value: string): void;
615
+ /** Sets the selected values. */
616
+ setValue(value: string[]): void;
617
+ /** Current selected values. */
618
+ readonly value: readonly string[];
619
+ };
620
+ /**
621
+ * Component orientation.
622
+ */
623
+ declare const CheckboxGroupOrientation: {
624
+ readonly horizontal: "horizontal";
625
+ readonly vertical: "vertical";
626
+ };
627
+ declare type CheckboxGroupOrientation = ValueOf<typeof CheckboxGroupOrientation>;
628
+ /**
629
+ * Component props.
630
+ */
631
+ interface CheckboxGroupProps extends Omit<ComponentProps<'div'>, 'onChange'> {
632
+ /**
633
+ * Default selected values.
634
+ * Used for uncontrolled version.
635
+ */
636
+ defaultValues?: string[];
637
+ /** Description of the checkbox group. */
638
+ description?: string;
639
+ /** Whether the component is disabled or not. */
640
+ isDisabled?: boolean;
641
+ /** Whether the component is invalid or not. */
642
+ isInvalid?: boolean;
643
+ /** Whether the component is read only or not. */
644
+ isReadOnly?: boolean;
645
+ /** Whether the component is required or not. */
646
+ isRequired?: boolean;
647
+ /** Label of the checkbox group. */
648
+ label?: string;
649
+ /** Method to handle component change. */
650
+ onChange?(values: string[]): void;
651
+ /** Method to handle component change. */
652
+ orientation?: CheckboxGroupOrientation;
653
+ /** List of possible values. Useful to select all. */
654
+ possibleValues?: string[];
655
+ /**
656
+ * Currently selected values.
657
+ * Used for controlled version.
658
+ */
659
+ value?: string[];
660
+ }
661
+ declare type StyledCheckboxGroupProps = Omit<CheckboxGroupProps, 'isDisabled' | 'isInvalid' | 'isReadOnly' | 'orientation' | 'isRequired'> & {
662
+ $isDisabled: CheckboxGroupProps['isDisabled'];
663
+ $isInvalid: CheckboxGroupProps['isInvalid'];
664
+ $isReadOnly: CheckboxGroupProps['isReadOnly'];
665
+ $isRequired: CheckboxGroupProps['isRequired'];
666
+ $orientation: CheckboxGroupProps['orientation'];
667
+ };
668
+
669
+ /**
670
+ * The CheckboxGroup component.
671
+ * Can be used as controlled or uncontrolled.
672
+ */
673
+ declare const CheckboxGroup: Comp<CheckboxGroupProps, HTMLDivElement>;
674
+
675
+ /**
676
+ * Component size.
677
+ */
678
+ declare const CheckboxSize: {
679
+ readonly large: "large";
680
+ readonly small: "small";
681
+ };
682
+ declare type CheckboxSize = ValueOf<typeof CheckboxSize>;
683
+ /**
684
+ * Component props.
685
+ */
686
+ interface CheckboxProps extends Omit<ComponentProps<'label'>, 'onChange'> {
687
+ /** Whether the component can be autofocused. */
688
+ autoFocus?: boolean;
689
+ /** Color variant. */
690
+ color?: ColorPalette;
691
+ /**
692
+ * Default select status.
693
+ * Used for uncontrolled version.
694
+ * Shouldn't be used inside a group unless isControlled is force to true.
695
+ */
696
+ defaultSelected?: boolean;
697
+ /** Custom props to pass to the input element. */
698
+ inputProps?: ComponentProps<'input'>;
699
+ /** Custom ref object to pass to the input element. */
700
+ inputRef?: MutableRefObject<HTMLInputElement>;
701
+ /** Indicates that the component is forced to be controlled. */
702
+ isControlled?: boolean;
703
+ /** Whether the component is disabled or not. */
704
+ isDisabled?: boolean;
705
+ /** Whether the checkbox status is indeterminate or not. */
706
+ isIndeterminate?: boolean;
707
+ /** Whether the component is invalid or not. */
708
+ isInvalid?: boolean;
709
+ /** Whether the component is read only or not. */
710
+ isReadOnly?: boolean;
711
+ /** Whether the component is required or not. */
712
+ isRequired?: boolean;
713
+ /**
714
+ * Whether the component is selected or not.
715
+ * Used for controlled version.
716
+ * Shouldn't be used inside a group unless isControlled is force to true.
717
+ */
718
+ isSelected?: boolean;
719
+ /** Name to pass to the input element. */
720
+ name?: HTMLInputElement['name'];
721
+ /** Method to handle component change. */
722
+ onChange?(isChecked: boolean, value?: string, name?: string, event?: ChangeEvent<HTMLInputElement>, state?: CheckboxGroupState): void;
723
+ /** Size of the checkbox. */
724
+ size?: CheckboxSize;
725
+ /**
726
+ * Value to pass to the input element.
727
+ * Required within a group.
728
+ */
729
+ value?: HTMLInputElement['value'];
730
+ }
731
+ declare type StyledCheckboxProps = Omit<CheckboxProps, 'color' | 'isDisabled' | 'isInvalid' | 'isSelected' | 'isRequired' | 'size'> & {
732
+ $color: CheckboxProps['color'];
733
+ $isDisabled: CheckboxProps['isDisabled'];
734
+ $isInvalid: CheckboxProps['isInvalid'];
735
+ $isFocusVisible: boolean;
736
+ $isRequired: CheckboxProps['isRequired'];
737
+ $isSelected: CheckboxProps['isSelected'];
738
+ $size: CheckboxProps['size'];
739
+ };
740
+
741
+ /**
742
+ * The Checkbox component.
743
+ * Works both inside a CheckboxGroup or as standalone.
744
+ * Can be used as controlled or uncontrolled.
745
+ */
746
+ declare const Checkbox: Comp<CheckboxProps, HTMLLabelElement>;
747
+
748
+ /**
749
+ * Component variant.
750
+ */
751
+ declare const FloatingActionButtonVariant: {
752
+ readonly round: "round";
753
+ readonly extended: "extended";
754
+ };
755
+ declare type FloatingActionButtonVariant = ValueOf<typeof FloatingActionButtonVariant>;
756
+ /**
757
+ * Component size.
758
+ */
759
+ declare const FloatingActionButtonSize: {
760
+ readonly large: "large";
761
+ readonly medium: "medium";
762
+ readonly small: "small";
763
+ };
764
+ declare type FloatingActionButtonSize = ValueOf<typeof FloatingActionButtonSize>;
765
+ /**
766
+ * Component color.
767
+ */
768
+ declare const FloatingActionButtonColor: {
769
+ readonly primary: "primary";
770
+ readonly secondary: "secondary";
771
+ };
772
+ declare type FloatingActionButtonColor = ValueOf<typeof FloatingActionButtonColor>;
773
+ /**
774
+ * Component props.
775
+ */
776
+ interface FloatingActionButtonProps extends ComponentProps<'button'> {
777
+ /** Color variant. */
778
+ color?: FloatingActionButtonColor;
779
+ /**
780
+ * Icon path data (`d` property of the `path` SVG element).<br />
781
+ * See <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths">https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths</a>.<br />
782
+ * Recommended path data come from mdi/js.<br />
783
+ * See <a href="https://www.npmjs.com/package/@mdi/js">https://www.npmjs.com/package/@mdi/js</a>.
784
+ */
785
+ icon: string;
786
+ /** Whether the component is disabled or not. */
787
+ isDisabled?: boolean;
788
+ /** Preferred method to handle click, press and touch. */
789
+ onPress?: (e: PressEvent) => void;
790
+ /** FloatingActionButton size. */
791
+ size?: FloatingActionButtonSize;
792
+ /** Additional text for extended variant. */
793
+ text?: string;
794
+ /** FloatingActionButton variant. */
795
+ variant?: FloatingActionButtonVariant;
796
+ }
797
+ declare type StyledFloatingActionButtonProps = Omit<FloatingActionButtonProps, 'isDisabled' | 'variant' | 'color' | 'size' | 'icon'> & {
798
+ $isDisabled: FloatingActionButtonProps['isDisabled'];
799
+ $variant: FloatingActionButtonProps['variant'];
800
+ $color: FloatingActionButtonProps['color'];
801
+ $size: FloatingActionButtonProps['size'];
802
+ };
803
+
804
+ /**
805
+ * The Floating Action Button is a specific button which has an icon and can have a text or not.
806
+ *
807
+ * This component should use aria-label, aria-labelledby or aria-describedby to make this
808
+ * component usable with a screen reader in its Round variant (without text).
809
+ */
810
+ declare const FloatingActionButton: Comp<FloatingActionButtonProps, HTMLButtonElement>;
811
+
812
+ /**
813
+ * Component props.
814
+ */
815
+ interface LinkButtonProps extends Omit<ButtonProps, 'color' | 'fullWidth' | 'leftIcon' | 'rightIcon' | 'size' | 'variant'> {
816
+ }
817
+ declare type StyledLinkButtonProps = Omit<LinkButtonProps, 'isDisabled'> & {
818
+ $isDisabled: LinkButtonProps['isDisabled'];
819
+ };
820
+
821
+ /**
822
+ * The LinkButton is a semantic button that looks like a link.
823
+ *
824
+ * For a semantic button that looks like a button, please use the Button component.
825
+ * For a semantic link that looks like a link, please use the Link component.
826
+ * For a semantic link that looks like a button, please use the ButtonLink component.
827
+ */
828
+ declare const LinkButton: Comp<LinkButtonProps, HTMLButtonElement>;
829
+
830
+ export { AppBar, AppBarProps, AppContainer, AppContainerContext, AppContainerProps, AppContainerState, AppContent, AppContentProps, AppSidePanel, AppSidePanelProps, Badge, BadgeProps, BadgeVariant, BreadcrumbItem, BreadcrumbItemProps, Breadcrumbs, BreadcrumbsProps, Button, ButtonLink, ButtonLinkProps, ButtonProps, ButtonSize, ButtonVariant, Checkbox, CheckboxGroup, CheckboxGroupOrientation, CheckboxGroupProps, CheckboxGroupState, CheckboxProps, CheckboxSize, Color, ColorPalette, Comp, Falsy, FloatingActionButton, FloatingActionButtonColor, FloatingActionButtonProps, FloatingActionButtonSize, FloatingActionButtonVariant, Icon, IconButton, IconButtonProps, IconButtonSize, IconProps, IconSize, Link, LinkButton, LinkButtonProps, LinkProps, Menu, MenuBarItems, MenuItem, SideNavigationMenu, SideNavigationMenuBar, SideNavigationMenuBarContextProps, SideNavigationMenuBarProps, SideNavigationMenuContextProps, SideNavigationMenuItem, SideNavigationMenuItemProps, SideNavigationMenuProps, SideNavigationMenuReducerAction, SideNavigationMenuReducerActionType, SideNavigationMenuReducerState, StyledAppBarProps, StyledAppContentProps, StyledAppSidePanelProps, StyledBadgeProps, StyledBreadcrumbItemProps, StyledBreadcrumbsProps, StyledButton, StyledButtonLinkProps, StyledButtonProps, StyledCheckboxGroupProps, StyledCheckboxProps, StyledFloatingActionButtonProps, StyledIconButtonProps, StyledIconProps, StyledLink, StyledLinkButtonProps, StyledLinkProps, StyledSideNavigationMenuBarProps, StyledSideNavigationMenuItemProps, StyledSideNavigationMenuProps, Theme, UseSideNavigationMenuBarProps, ValueOf, useAppSidePanel, useSideNavigationMenuBar };