@micromag/core 0.4.71 → 0.4.74

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.
@@ -1,5 +1,48 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React, { CSSProperties, MouseEventHandler, ForwardedRef } from 'react';
2
+ import * as React$1 from 'react';
3
+ import React__default, { ReactNode, CSSProperties, MouseEventHandler, ForwardedRef, JSX, MouseEvent, ElementType } from 'react';
4
+ import { MessageDescriptor } from 'react-intl';
5
+
6
+ type Label$2 = MessageDescriptor | ReactNode;
7
+
8
+ type MediaElement = HTMLVideoElement | HTMLAudioElement | HTMLMediaElement;
9
+
10
+ interface MenuItem$1 {
11
+ id?: number | string;
12
+ label?: Label$2;
13
+ url?: string;
14
+ external?: boolean;
15
+ active?: boolean;
16
+ }
17
+ interface Button$3 {
18
+ id?: string | number;
19
+ label?: Label$2;
20
+ name?: string;
21
+ theme?: ButtonTheme | null;
22
+ size?: ButtonSize | null;
23
+ href?: string | null;
24
+ external?: boolean;
25
+ direct?: boolean;
26
+ target?: string;
27
+ focusable?: boolean;
28
+ active?: boolean;
29
+ icon?: React.ReactNode | null;
30
+ iconPosition?: 'left' | 'right' | 'inline';
31
+ disabled?: boolean;
32
+ className?: string | null;
33
+ onClick?: (...args: unknown[]) => void;
34
+ }
35
+ type BootstrapTheme = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark';
36
+ type ButtonTheme = BootstrapTheme | 'outline-primary' | 'outline-secondary' | 'outline-success' | 'outline-danger' | 'outline-warning' | 'outline-info' | 'outline-light' | 'outline-dark' | 'outline-link' | null;
37
+ type ButtonSize = 'lg' | 'sm' | null;
38
+
39
+ interface StoryComponent$1 {
40
+ id: string;
41
+ type: string;
42
+ [key: string]: unknown;
43
+ }
44
+
45
+ type RenderContext = 'view' | 'placeholder' | 'edit' | 'preview' | 'static' | 'capture';
3
46
 
4
47
  type ButtonElement = HTMLButtonElement | HTMLAnchorElement;
5
48
  interface ButtonProps {
@@ -10,11 +53,11 @@ interface ButtonProps {
10
53
  external?: boolean;
11
54
  direct?: boolean;
12
55
  target?: string;
13
- label?: Label | null;
14
- children?: Label | null;
56
+ label?: Label$2 | null;
57
+ children?: Label$2 | null;
15
58
  focusable?: boolean;
16
59
  active?: boolean;
17
- icon?: React.ReactNode | null;
60
+ icon?: ReactNode | null;
18
61
  iconPosition?: 'left' | 'right' | 'inline';
19
62
  disabled?: boolean;
20
63
  loading?: boolean;
@@ -37,11 +80,11 @@ interface ButtonProps {
37
80
  declare function Button$2({ type, theme, size, href, external, direct, target, label, children, focusable, active, icon, iconPosition, disabled, loading, disableOnLoading, small, big, withShadow, withoutStyle, withoutBootstrapStyles, withoutTheme, asLink, outline, onClick, className, iconClassName, labelClassName, refButton, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
38
81
 
39
82
  interface ButtonsProps {
40
- buttons?: Button[];
83
+ buttons?: Button$3[];
41
84
  size?: ButtonSize | null;
42
85
  theme?: ButtonTheme;
43
- renderButton?: ((...args: unknown[]) => void) | null;
44
- onClickButton?: ((...args: unknown[]) => void) | null;
86
+ renderButton?: ((button: Button$3, index: number, props: Record<string, unknown>) => JSX.Element) | null;
87
+ onClickButton?: ((e: MouseEvent, button: Button$3, index: any) => void) | null;
45
88
  className?: string | null;
46
89
  buttonClassName?: string | null;
47
90
  }
@@ -69,7 +112,7 @@ interface FormProps {
69
112
  submitButtonTheme?: string | null;
70
113
  cancelButtonTheme?: string | null;
71
114
  buttons?: Button[] | null;
72
- children?: React.ReactNode | null;
115
+ children?: React__default.ReactNode | null;
73
116
  actionsAlign?: 'left' | 'right';
74
117
  withoutActions?: boolean;
75
118
  withoutComplete?: boolean;
@@ -89,9 +132,9 @@ interface FormProps {
89
132
  declare function Form({ action, method, fields: initialFields, initialValue, postForm, submitButtonLabel, submitButtonLoadingLabel, submitButtonTheme, cancelButtonTheme, buttons, children, actionsAlign, withoutActions, withoutComplete, withoutBackButton, onComplete, onResponse, onMessage, onCancel, onCancelHref, onOpenFieldForm, onCloseFieldForm, className, fieldsClassName, actionsClassName, cancelClassName, }: FormProps): react_jsx_runtime.JSX.Element;
90
133
 
91
134
  interface FormPanelProps {
92
- description?: React.ReactNode | null;
135
+ description?: React__default.ReactNode | null;
93
136
  loading?: boolean;
94
- children?: React.ReactNode | null;
137
+ children?: React__default.ReactNode | null;
95
138
  className?: string | null;
96
139
  }
97
140
  declare function FormPanel({ description, loading, children, className, ...props }: FormPanelProps): react_jsx_runtime.JSX.Element;
@@ -159,7 +202,7 @@ interface UnmuteIconProps {
159
202
  declare function UnmuteIcon({ color, className }: UnmuteIconProps): react_jsx_runtime.JSX.Element;
160
203
 
161
204
  interface BreadcrumbProps {
162
- items?: MenuItem[];
205
+ items?: MenuItem$1[];
163
206
  theme?: BootstrapTheme | null;
164
207
  separator?: null | 'arrow';
165
208
  withoutBar?: boolean;
@@ -170,7 +213,7 @@ declare function Breadcrumb({ items, theme, separator, withoutBar, noWrap, class
170
213
 
171
214
  interface DropdownProps {
172
215
  items?: MenuItem[];
173
- children?: React.ReactNode | null;
216
+ children?: React__default.ReactNode | null;
174
217
  visible?: boolean;
175
218
  align?: DropdownAlign | null;
176
219
  className?: string | null;
@@ -184,7 +227,7 @@ interface MenuProps {
184
227
  items?: MenuItem[];
185
228
  tagName?: string;
186
229
  itemTagName?: string;
187
- children?: React.ReactNode | null;
230
+ children?: React__default.ReactNode | null;
188
231
  linkAsItem?: boolean;
189
232
  className?: string | null;
190
233
  itemClassName?: string | null;
@@ -202,16 +245,16 @@ interface MenuProps {
202
245
  declare function Menu({ items, tagName, itemTagName, children, linkAsItem, className, itemClassName, linkClassName, hasSubMenuClassName, subMenuClassName, subMenuItemClassName, subMenuLinkClassName, hasDropdownClassName, dropdownClassName, dropdownItemClassName, dropdownLinkClassName, dropdownAlign, }: MenuProps): react_jsx_runtime.JSX.Element;
203
246
 
204
247
  interface NavbarProps {
205
- brand?: React.ReactNode | null;
248
+ brand?: React__default.ReactNode | null;
206
249
  brandLink?: string | null;
207
- breadcrumbs?: React.ReactNode | null;
250
+ breadcrumbs?: React__default.ReactNode | null;
208
251
  theme?: 'light' | 'dark' | 'primary' | null;
209
252
  size?: 'sm' | 'md' | 'lg';
210
253
  compact?: boolean;
211
254
  noWrap?: boolean;
212
255
  withoutCollapse?: boolean;
213
256
  withoutCollapseToggle?: boolean;
214
- children?: React.ReactNode | null;
257
+ children?: React__default.ReactNode | null;
215
258
  className?: string | null;
216
259
  brandClassName?: string | null;
217
260
  breadCrumbsClassName?: string | null;
@@ -236,7 +279,7 @@ interface PaginationMenuProps {
236
279
  declare function PaginationMenu({ page: parentPage, lastPage: parentLastPage, maxPages: parentMaxPages, total: parentTotal, url, query, withPreviousNext, className, paginationClassName, itemClassName, linkClassName, onClickPage, }: PaginationMenuProps): react_jsx_runtime.JSX.Element;
237
280
 
238
281
  interface TabsMenuProps {
239
- items?: MenuItem[];
282
+ items?: MenuItem$1[];
240
283
  size?: ButtonSize | null;
241
284
  theme?: ButtonTheme;
242
285
  renderItemButton?: ((...args: unknown[]) => void) | null;
@@ -255,15 +298,15 @@ interface ModalProps {
255
298
  id?: string | null;
256
299
  title?: string | null;
257
300
  position?: 'center' | 'top';
258
- children?: React.ReactNode | null;
301
+ children?: React__default.ReactNode | null;
259
302
  }
260
303
  declare function Modal({ id, children, position, title }: ModalProps): react_jsx_runtime.JSX.Element;
261
304
 
262
305
  interface ModalDialogProps {
263
306
  title?: Label | null;
264
- header?: React.ReactNode | null;
265
- children?: React.ReactNode | null;
266
- footer?: React.ReactNode | null;
307
+ header?: React__default.ReactNode | null;
308
+ children?: React__default.ReactNode | null;
309
+ footer?: React__default.ReactNode | null;
267
310
  size?: string | null;
268
311
  buttons?: Button[] | null;
269
312
  onClose?: ((...args: unknown[]) => void) | null;
@@ -275,7 +318,7 @@ declare function ModalDialog({ title, header, children, buttons, footer, size, o
275
318
  interface ModalPortalProps {
276
319
  id?: string | null;
277
320
  data?: Record<string, unknown> | null;
278
- children?: React.ReactNode | null;
321
+ children?: React__default.ReactNode | null;
279
322
  }
280
323
  declare function ModalPortal({ id, data, children }: ModalPortalProps): react_jsx_runtime.JSX.Element;
281
324
 
@@ -287,34 +330,34 @@ declare const _default: {
287
330
  interface PanelProps {
288
331
  id?: string | null;
289
332
  title?: string | null;
290
- children?: React.ReactNode | null;
333
+ children?: React__default.ReactNode | null;
291
334
  }
292
335
  declare function Panel({ id, children, title }: PanelProps): react_jsx_runtime.JSX.Element;
293
336
 
294
337
  interface PanelPortalProps {
295
338
  id?: string | null;
296
339
  data?: Record<string, unknown> | null;
297
- children?: React.ReactNode | null;
340
+ children?: React__default.ReactNode | null;
298
341
  }
299
342
  declare function PanelPortal({ id, data, children }: PanelPortalProps): any;
300
343
 
301
344
  interface CardProps {
302
345
  href?: string | null;
303
- header?: React.ReactNode | null;
304
- image?: React.ReactNode | null;
346
+ header?: React__default.ReactNode | null;
347
+ image?: React__default.ReactNode | null;
305
348
  imageAlt?: string | null;
306
349
  imageOverlay?: boolean;
307
- beforeBody?: React.ReactNode | null;
308
- title?: Label | null;
309
- subtitle?: Label | null;
310
- children?: React.ReactNode | null;
311
- afterBody?: React.ReactNode | null;
350
+ beforeBody?: React__default.ReactNode | null;
351
+ title?: Label$2 | null;
352
+ subtitle?: Label$2 | null;
353
+ children?: React__default.ReactNode | null;
354
+ afterBody?: React__default.ReactNode | null;
312
355
  links?: {
313
- label?: Label;
356
+ label?: Label$2;
314
357
  href?: string;
315
358
  }[] | null;
316
359
  linksInSameBody?: boolean;
317
- footer?: React.ReactNode | null;
360
+ footer?: React__default.ReactNode | null;
318
361
  theme?: null | 'dark' | 'primary' | 'light';
319
362
  className?: string | null;
320
363
  imageClassName?: string | null;
@@ -330,8 +373,8 @@ interface CardProps {
330
373
  declare function Card({ href, header, image, imageAlt, imageOverlay, beforeBody, title, subtitle, children, afterBody, links, linksInSameBody, footer, theme, className, imageClassName, headerClassName, titleClassName, subtitleClassName, bodyClassName, footerClassName, onClick, onClickBody, onClickFooter, }: CardProps): react_jsx_runtime.JSX.Element;
331
374
 
332
375
  interface CollapsablePanelProps {
333
- title?: React.ReactNode | null;
334
- children?: React.ReactNode | null;
376
+ title?: React__default.ReactNode | null;
377
+ children?: React__default.ReactNode | null;
335
378
  className?: string | null;
336
379
  topClassName?: string | null;
337
380
  contentClassName?: string | null;
@@ -351,7 +394,7 @@ declare function Close({ stroke, border, fill, className, }: CloseProps): react_
351
394
  interface DateProps {
352
395
  date?: string | null;
353
396
  withTime?: boolean;
354
- timeSeparator?: React.ReactNode;
397
+ timeSeparator?: ReactNode;
355
398
  }
356
399
  declare function Date({ date, withTime, timeSeparator }: DateProps): react_jsx_runtime.JSX.Element;
357
400
 
@@ -362,7 +405,7 @@ interface DetectorProps {
362
405
  onLeave?: ((...args: unknown[]) => void) | null;
363
406
  onChange?: ((...args: unknown[]) => void) | null;
364
407
  disabled?: boolean;
365
- children?: React.ReactNode | null;
408
+ children?: React__default.ReactNode | null;
366
409
  className?: string | null;
367
410
  }
368
411
  declare function Detector({ throttleDelay, threshold, onEnter, onLeave, onChange, disabled, children, className, }: DetectorProps): react_jsx_runtime.JSX.Element;
@@ -378,7 +421,7 @@ interface ElementComponentProps {
378
421
  declare function ElementComponent({ name, components, props, isPlaceholder, className, placeholderProps, }: ElementComponentProps): react_jsx_runtime.JSX.Element | "Bad component name" | "Bad component";
379
422
 
380
423
  interface EmptyProps {
381
- children?: React.ReactNode | null;
424
+ children?: React__default.ReactNode | null;
382
425
  withoutBorder?: boolean;
383
426
  light?: boolean;
384
427
  className?: string | null;
@@ -395,11 +438,11 @@ interface FontFacesProps {
395
438
  declare function FontFaces({ fonts, formats, }: FontFacesProps): react_jsx_runtime.JSX.Element;
396
439
 
397
440
  interface LabelProps {
398
- children: Label$1;
441
+ children: Label$2;
399
442
  isHtml?: boolean;
400
443
  values?: Record<string, unknown>;
401
444
  }
402
- declare function Label$1({ children, isHtml, values }: LabelProps): any;
445
+ declare function Label$1({ children, isHtml, values }: LabelProps): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode>> | react_jsx_runtime.JSX.Element;
403
446
 
404
447
  interface LinkProps {
405
448
  href?: string;
@@ -413,9 +456,9 @@ interface LinkProps {
413
456
  declare function Link({ href, external, children, target, rel, className, withoutStyle, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
414
457
 
415
458
  interface MediaProps {
416
- thumbnail?: React.ReactNode | null;
459
+ thumbnail?: React__default.ReactNode | null;
417
460
  thumbnailAlign?: 'top' | 'center' | 'bottom';
418
- children?: React.ReactNode | null;
461
+ children?: React__default.ReactNode | null;
419
462
  title?: Label | null;
420
463
  className?: string | null;
421
464
  thumbnailClassName?: string | null;
@@ -430,18 +473,18 @@ interface MetaProps {
430
473
  metadata?: unknown | null;
431
474
  fullTitle?: string | null;
432
475
  suffix?: string;
433
- children?: React.ReactNode | null;
476
+ children?: React__default.ReactNode | null;
434
477
  }
435
478
  declare function Meta({ title, url, metadata, fullTitle, suffix, children, }: MetaProps): react_jsx_runtime.JSX.Element;
436
479
 
437
480
  interface SlideshowProps {
438
- items?: React.ReactNode[];
481
+ items?: React__default.ReactNode[];
439
482
  auto?: boolean;
440
483
  delay?: number;
441
484
  width?: string | number | null;
442
485
  height?: string | number | null;
443
486
  className?: string | null;
444
- children?: React.ReactNode | null;
487
+ children?: React__default.ReactNode | null;
445
488
  }
446
489
  declare function Slideshow({ items, auto, delay, width, height, className, children, }: SlideshowProps): react_jsx_runtime.JSX.Element;
447
490
 
@@ -527,22 +570,22 @@ interface ScreenSizerProps {
527
570
  screenWidth?: number;
528
571
  screenHeight?: number;
529
572
  className?: string | null;
530
- children: React.ReactNode;
573
+ children: ReactNode;
531
574
  }
532
575
  declare function ScreenSizer({ width, height, fit, screenWidth, screenHeight, className, children, }: ScreenSizerProps): react_jsx_runtime.JSX.Element;
533
576
 
534
577
  interface ScreenProps {
535
- screen: StoryComponent;
578
+ screen: StoryComponent$1;
536
579
  renderContext?: RenderContext | null;
537
580
  screenState?: string | null;
538
581
  index?: number | null;
539
582
  active?: boolean;
540
583
  preload?: boolean;
541
584
  current?: boolean;
542
- component?: React.ReactNode | null;
543
- components?: Record<string, Component> | null;
585
+ component?: React__default.ReactNode | null;
586
+ components?: Record<string, ElementType> | null;
544
587
  className?: string | null;
545
- mediaRef?: ((...args: unknown[]) => void) | null;
588
+ mediaRef?: ForwardedRef<MediaElement> | null;
546
589
  }
547
590
  declare function Screen({ screen, renderContext, screenState, index, active, current, preload, components, component, className, mediaRef, }: ScreenProps): react_jsx_runtime.JSX.Element;
548
591
 
@@ -571,10 +614,10 @@ interface ScreenPreviewProps {
571
614
  declare function ScreenPreview({ screen, screenState, width, height, screenWidth, screenHeight, className, withSize, fit, hidden, ...props }: ScreenPreviewProps): react_jsx_runtime.JSX.Element;
572
615
 
573
616
  interface ScreenElementProps {
574
- children?: React.ReactNode | null;
575
- placeholder?: string | React.ReactNode | null;
576
- preview?: React.ReactNode | null;
577
- empty?: React.ReactNode | null;
617
+ children?: React__default.ReactNode | null;
618
+ placeholder?: string | React__default.ReactNode | null;
619
+ preview?: React__default.ReactNode | null;
620
+ empty?: React__default.ReactNode | null;
578
621
  emptyLabel?: Label | null;
579
622
  isEmpty?: boolean;
580
623
  placeholderProps?: Record<string, unknown> | null;
@@ -596,7 +639,7 @@ interface TransitionsProps {
596
639
  transitions?: Transitions$1 | null;
597
640
  onComplete?: ((...args: unknown[]) => void) | null;
598
641
  disabled?: boolean;
599
- children?: React.ReactNode | null;
642
+ children?: React__default.ReactNode | null;
600
643
  }
601
644
  declare function Transitions$1({ fullscreen, playing, delay, transitions, onComplete, disabled, children, }: TransitionsProps): any;
602
645
 
@@ -607,7 +650,7 @@ interface TransitionsStaggerProps {
607
650
  disabled?: boolean;
608
651
  delay?: number;
609
652
  fullscreen?: boolean;
610
- children?: React.ReactNode | null;
653
+ children?: React__default.ReactNode | null;
611
654
  }
612
655
  declare function TransitionsStagger({ transitions, stagger, playing, disabled, delay, fullscreen, children, }: TransitionsStaggerProps): any;
613
656