react-magma-dom 4.9.0-next.7 → 4.9.0-next.9
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/dist/components/Button/index.d.ts +2 -1
- package/dist/components/Checkbox/index.d.ts +2 -1
- package/dist/components/InputBase/index.d.ts +1 -1
- package/dist/components/Label/index.d.ts +2 -1
- package/dist/components/NavTabs/NavTab.d.ts +2 -1
- package/dist/components/Paragraph/index.d.ts +2 -1
- package/dist/components/SkipLink/index.d.ts +1 -1
- package/dist/components/Table/TableCell.d.ts +2 -1
- package/dist/components/Tabs/Tab.d.ts +1 -1
- package/dist/components/Toggle/index.d.ts +2 -1
- package/dist/components/Typography/index.d.ts +2 -1
- package/dist/esm/index.js +39 -55
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +1 -5
- package/dist/properties.json +3 -3
- package/dist/react-magma-dom.cjs.development.js +1 -1
- package/dist/react-magma-dom.cjs.development.js.map +1 -1
- package/dist/react-magma-dom.cjs.production.min.js +1 -1
- package/dist/react-magma-dom.cjs.production.min.js.map +1 -1
- package/dist/theme/styled.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
2
3
|
export declare enum ButtonVariant {
|
|
3
4
|
solid = "solid",
|
|
4
5
|
link = "link"
|
|
@@ -80,7 +81,7 @@ interface BaseButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
80
81
|
/**
|
|
81
82
|
* @internal
|
|
82
83
|
*/
|
|
83
|
-
theme?:
|
|
84
|
+
theme?: ThemeInterface;
|
|
84
85
|
/**
|
|
85
86
|
* The type attribute of the button
|
|
86
87
|
* ButtonType.button
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
2
3
|
export declare enum CheckboxTextPosition {
|
|
3
4
|
left = "left",
|
|
4
5
|
right = "right"
|
|
@@ -88,6 +89,6 @@ export declare const StyledFakeInput: import("@emotion/styled").StyledComponent<
|
|
|
88
89
|
hasError?: boolean;
|
|
89
90
|
hideFocus?: boolean;
|
|
90
91
|
textPosition?: CheckboxTextPosition;
|
|
91
|
-
theme?:
|
|
92
|
+
theme?: ThemeInterface;
|
|
92
93
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
93
94
|
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
2
3
|
import { InputIconPosition, InputSize } from '../InputBase';
|
|
3
4
|
export declare enum LabelPosition {
|
|
4
5
|
left = "left",
|
|
@@ -16,7 +17,7 @@ export interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement>
|
|
|
16
17
|
* @default InputSize.medium
|
|
17
18
|
*/
|
|
18
19
|
size?: InputSize;
|
|
19
|
-
theme?:
|
|
20
|
+
theme?: ThemeInterface;
|
|
20
21
|
/**
|
|
21
22
|
* @internal
|
|
22
23
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
2
3
|
import { XOR } from '../../utils';
|
|
3
4
|
import { TabsIconPosition } from '../Tabs';
|
|
4
5
|
import { TabsOrientation, TabsTextTransform } from '../Tabs/shared';
|
|
@@ -38,7 +39,7 @@ export interface BaseNavTabProps extends React.HTMLAttributes<HTMLAnchorElement>
|
|
|
38
39
|
/**
|
|
39
40
|
* @internal
|
|
40
41
|
*/
|
|
41
|
-
theme?:
|
|
42
|
+
theme?: ThemeInterface;
|
|
42
43
|
}
|
|
43
44
|
export interface NavTabChildrenProps extends BaseNavTabProps {
|
|
44
45
|
children?: JSX.Element | string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
2
3
|
import { TypographyVisualStyle, TypographyColor, TypographyContextVariant } from '../Typography';
|
|
3
4
|
/**
|
|
4
5
|
* @children required
|
|
@@ -37,7 +38,7 @@ export interface ParagraphProps extends React.HTMLAttributes<HTMLParagraphElemen
|
|
|
37
38
|
/**
|
|
38
39
|
* @internal
|
|
39
40
|
*/
|
|
40
|
-
theme?:
|
|
41
|
+
theme?: ThemeInterface;
|
|
41
42
|
/**
|
|
42
43
|
* Applies visual styles including font-size, font-weight, line-height and margins
|
|
43
44
|
* @default TypographyVisualStyle.bodyMedium
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { Omit } from '../../utils';
|
|
3
3
|
import { HyperlinkProps } from '../Hyperlink';
|
|
4
4
|
export declare const TARGET_ID = "reactMagmaMainContent";
|
|
5
|
-
export interface SkipLinkProps extends Omit<HyperlinkProps, 'children'> {
|
|
5
|
+
export interface SkipLinkProps extends Omit<HyperlinkProps, 'children' | 'to'> {
|
|
6
6
|
/**
|
|
7
7
|
* The text in the skip link
|
|
8
8
|
* @default "Skip Navigation"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TableCellAlign } from './Table';
|
|
3
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
3
4
|
export interface TableCellProps extends React.HTMLAttributes<HTMLTableCellElement> {
|
|
4
5
|
/**
|
|
5
6
|
* Text alignment of the cell content. Right alignment should be used for numeric values
|
|
@@ -17,5 +18,5 @@ export interface TableCellProps extends React.HTMLAttributes<HTMLTableCellElemen
|
|
|
17
18
|
width?: string | number;
|
|
18
19
|
}
|
|
19
20
|
export declare const baseTableCellStyle: (props: any) => import("@emotion/react").SerializedStyles;
|
|
20
|
-
export declare function buildCellPaddingStyle(density: any, theme:
|
|
21
|
+
export declare function buildCellPaddingStyle(density: any, theme: ThemeInterface): string;
|
|
21
22
|
export declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
@@ -20,7 +20,7 @@ export interface TabProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
20
20
|
/**
|
|
21
21
|
* @internal
|
|
22
22
|
*/
|
|
23
|
-
theme?:
|
|
23
|
+
theme?: ThemeInterface;
|
|
24
24
|
}
|
|
25
25
|
export declare const StyledTabsChild: import("@emotion/styled").StyledComponent<{
|
|
26
26
|
theme?: import("@emotion/react").Theme;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
2
3
|
export declare enum ToggleTextPosition {
|
|
3
4
|
left = "left",
|
|
4
5
|
right = "right"
|
|
@@ -52,7 +53,7 @@ export interface ToggleProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
52
53
|
/**
|
|
53
54
|
* @internal
|
|
54
55
|
*/
|
|
55
|
-
theme?:
|
|
56
|
+
theme?: ThemeInterface;
|
|
56
57
|
/**
|
|
57
58
|
* Style properties for the part of the component that slides back and forth on the track
|
|
58
59
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
2
3
|
export interface TypographyProps<T = HTMLParagraphElement> extends React.HTMLAttributes<T> {
|
|
3
4
|
as?: string;
|
|
4
5
|
children?: any;
|
|
@@ -14,7 +15,7 @@ export interface TypographyProps<T = HTMLParagraphElement> extends React.HTMLAtt
|
|
|
14
15
|
* @internal
|
|
15
16
|
*/
|
|
16
17
|
testId?: string;
|
|
17
|
-
theme?:
|
|
18
|
+
theme?: ThemeInterface;
|
|
18
19
|
visualStyle?: TypographyVisualStyle;
|
|
19
20
|
}
|
|
20
21
|
export declare enum TypographyColor {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { css, ClassNames, jsx, Global } from '@emotion/react';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import React__default, { createContext, useContext, forwardRef, createElement, Children, cloneElement, useState, useRef, useEffect, Fragment, useCallback, useMemo, useLayoutEffect, isValidElement } from 'react';
|
|
3
4
|
import _styled from '@emotion/styled/base';
|
|
4
|
-
import { css, ClassNames, jsx, Global } from '@emotion/react';
|
|
5
5
|
import { CloseIcon, InfoIcon, CheckCircleIcon, WarningIcon, ErrorIcon, ChevronRightIcon, ClearIcon, CheckBoxIcon, CheckBoxOutlineBlankIcon, IndeterminateCheckBoxIcon, NorthIcon, SouthIcon, SortDoubleArrowIcon, ArrowDropDownIcon, WestIcon, EastIcon, ArrowBackIcon, ArrowForwardIcon, KeyboardIcon, EventIcon, ArrowDropUpIcon, ArrowRightIcon, ArrowLeftIcon, CheckIcon, ExpandMoreIcon, ExpandLessIcon, ArrowBackIosIcon, ArrowForwardIosIcon, RadioButtonCheckedIcon, RadioButtonUncheckedIcon, SearchIcon, CancelIcon, ScheduleIcon, FolderIcon, ArticleIcon } from 'react-magma-icons';
|
|
6
6
|
import { v4 } from 'uuid';
|
|
7
7
|
import ReactDOM__default, { flushSync } from 'react-dom';
|
|
@@ -420,53 +420,41 @@ var isPropValid = /* #__PURE__ */memoize(function (prop) {
|
|
|
420
420
|
/* Z+1 */);
|
|
421
421
|
|
|
422
422
|
function _extends$1() {
|
|
423
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function (
|
|
424
|
-
for (var
|
|
425
|
-
var
|
|
426
|
-
for (var
|
|
427
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
428
|
-
target[key] = source[key];
|
|
429
|
-
}
|
|
430
|
-
}
|
|
423
|
+
return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
|
|
424
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
425
|
+
var t = arguments[e];
|
|
426
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
431
427
|
}
|
|
432
|
-
return
|
|
433
|
-
};
|
|
434
|
-
return _extends$1.apply(this, arguments);
|
|
428
|
+
return n;
|
|
429
|
+
}, _extends$1.apply(null, arguments);
|
|
435
430
|
}
|
|
436
431
|
|
|
437
|
-
function _assertThisInitialized(
|
|
438
|
-
if (
|
|
439
|
-
|
|
440
|
-
}
|
|
441
|
-
return self;
|
|
432
|
+
function _assertThisInitialized(e) {
|
|
433
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
434
|
+
return e;
|
|
442
435
|
}
|
|
443
436
|
|
|
444
|
-
function _setPrototypeOf(
|
|
445
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
};
|
|
449
|
-
return _setPrototypeOf(o, p);
|
|
437
|
+
function _setPrototypeOf(t, e) {
|
|
438
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
439
|
+
return t.__proto__ = e, t;
|
|
440
|
+
}, _setPrototypeOf(t, e);
|
|
450
441
|
}
|
|
451
442
|
|
|
452
|
-
function _inheritsLoose(
|
|
453
|
-
|
|
454
|
-
subClass.prototype.constructor = subClass;
|
|
455
|
-
_setPrototypeOf(subClass, superClass);
|
|
443
|
+
function _inheritsLoose(t, o) {
|
|
444
|
+
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
|
|
456
445
|
}
|
|
457
446
|
|
|
458
|
-
function _getPrototypeOf(
|
|
459
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function
|
|
460
|
-
return
|
|
461
|
-
};
|
|
462
|
-
return _getPrototypeOf(o);
|
|
447
|
+
function _getPrototypeOf(t) {
|
|
448
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
449
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
450
|
+
}, _getPrototypeOf(t);
|
|
463
451
|
}
|
|
464
452
|
|
|
465
|
-
function _isNativeFunction(
|
|
453
|
+
function _isNativeFunction(t) {
|
|
466
454
|
try {
|
|
467
|
-
return Function.toString.call(
|
|
468
|
-
} catch (
|
|
469
|
-
return
|
|
455
|
+
return -1 !== Function.toString.call(t).indexOf("[native code]");
|
|
456
|
+
} catch (n) {
|
|
457
|
+
return "function" == typeof t;
|
|
470
458
|
}
|
|
471
459
|
}
|
|
472
460
|
|
|
@@ -487,31 +475,27 @@ function _construct(t, e, r) {
|
|
|
487
475
|
return r && _setPrototypeOf(p, r.prototype), p;
|
|
488
476
|
}
|
|
489
477
|
|
|
490
|
-
function _wrapNativeSuper(
|
|
491
|
-
var
|
|
492
|
-
_wrapNativeSuper = function _wrapNativeSuper(
|
|
493
|
-
if (
|
|
494
|
-
if (typeof
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
499
|
-
_cache.set(Class, Wrapper);
|
|
478
|
+
function _wrapNativeSuper(t) {
|
|
479
|
+
var r = "function" == typeof Map ? new Map() : void 0;
|
|
480
|
+
return _wrapNativeSuper = function _wrapNativeSuper(t) {
|
|
481
|
+
if (null === t || !_isNativeFunction(t)) return t;
|
|
482
|
+
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
|
|
483
|
+
if (void 0 !== r) {
|
|
484
|
+
if (r.has(t)) return r.get(t);
|
|
485
|
+
r.set(t, Wrapper);
|
|
500
486
|
}
|
|
501
487
|
function Wrapper() {
|
|
502
|
-
return _construct(
|
|
488
|
+
return _construct(t, arguments, _getPrototypeOf(this).constructor);
|
|
503
489
|
}
|
|
504
|
-
Wrapper.prototype = Object.create(
|
|
490
|
+
return Wrapper.prototype = Object.create(t.prototype, {
|
|
505
491
|
constructor: {
|
|
506
492
|
value: Wrapper,
|
|
507
|
-
enumerable:
|
|
508
|
-
writable:
|
|
509
|
-
configurable:
|
|
493
|
+
enumerable: !1,
|
|
494
|
+
writable: !0,
|
|
495
|
+
configurable: !0
|
|
510
496
|
}
|
|
511
|
-
});
|
|
512
|
-
|
|
513
|
-
};
|
|
514
|
-
return _wrapNativeSuper(Class);
|
|
497
|
+
}), _setPrototypeOf(Wrapper, t);
|
|
498
|
+
}, _wrapNativeSuper(t);
|
|
515
499
|
}
|
|
516
500
|
|
|
517
501
|
// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
|