@narmi/design_system 6.17.5 → 6.17.7
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/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/tokens/css/rgbColors.css +1 -1
- package/dist/tokens/css/rgbColors.scss +1 -1
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.scss +1 -1
- package/dist/tokens/js/colors.esm.js +1 -1
- package/dist/tokens/js/colors.js +1 -1
- package/dist/tokens/js/manifest.esm.js +1 -1
- package/dist/tokens/js/manifest.js +1 -1
- package/dist/tokens/js/reactNativeWeb.js +1 -1
- package/dist/types/FieldToken/index.d.ts +23 -0
- package/dist/types/FieldToken/index.d.ts.map +1 -0
- package/dist/types/FormSection/index.d.ts +5 -4
- package/dist/types/FormSection/index.d.ts.map +1 -1
- package/dist/types/IconButton/index.d.ts +72 -0
- package/dist/types/IconButton/index.d.ts.map +1 -0
- package/dist/types/LoadingShim/index.d.ts +31 -0
- package/dist/types/LoadingShim/index.d.ts.map +1 -0
- package/dist/types/ResponsiveFlex/index.d.ts +52 -0
- package/dist/types/ResponsiveFlex/index.d.ts.map +1 -0
- package/dist/types/TimelineEvent/index.d.ts +75 -0
- package/dist/types/TimelineEvent/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/util/AsElement.d.ts +44 -0
- package/dist/types/util/AsElement.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/tokens/js/colors.js
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface FieldTokenProps {
|
|
3
|
+
/** Label text of tag. */
|
|
4
|
+
label: string;
|
|
5
|
+
/**
|
|
6
|
+
* Callback for user dismissal action,
|
|
7
|
+
* called with token label as the argument
|
|
8
|
+
*/
|
|
9
|
+
onDismiss?: (label: string) => void;
|
|
10
|
+
/** Optional value for `data-testid` attribute */
|
|
11
|
+
testId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Disabled state for FieldToken
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Shared component to render "tokens" inside inputs, active filters,
|
|
19
|
+
* or other user selections we want to tokenize.
|
|
20
|
+
*/
|
|
21
|
+
declare const FieldToken: React.ForwardRefExoticComponent<FieldTokenProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export default FieldToken;
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FieldToken/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,WAAW,eAAe;IAC9B,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,QAAA,MAAM,UAAU,wFA8Cf,CAAC;AAkBF,eAAe,UAAU,CAAC"}
|
|
@@ -2,8 +2,9 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { default as PropTypes } from 'prop-types';
|
|
3
3
|
interface FormSectionProps {
|
|
4
4
|
/** Title of form section */
|
|
5
|
-
title
|
|
6
|
-
|
|
5
|
+
title?: string;
|
|
6
|
+
/** Optional content rendered below the section heading */
|
|
7
|
+
children?: React.ReactNode;
|
|
7
8
|
}
|
|
8
9
|
/**
|
|
9
10
|
* A sectioning element for forms that renders a label and line above the section
|
|
@@ -12,8 +13,8 @@ declare const FormSection: {
|
|
|
12
13
|
({ title, children }: FormSectionProps): React.JSX.Element;
|
|
13
14
|
propTypes: {
|
|
14
15
|
/** Title of form section */
|
|
15
|
-
title: PropTypes.
|
|
16
|
-
children: PropTypes.
|
|
16
|
+
title: PropTypes.Requireable<string>;
|
|
17
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
17
18
|
};
|
|
18
19
|
};
|
|
19
20
|
export default FormSection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormSection/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,UAAU,gBAAgB;IACxB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormSection/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,UAAU,gBAAgB;IACxB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AACH,QAAA,MAAM,WAAW;0BAAyB,gBAAgB;;QAkCxD,4BAA4B;;;;CAH7B,CAAC;AAQF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as PropTypes } from 'prop-types';
|
|
3
|
+
import { VALID_ICON_NAMES } from '../icons/iconNames';
|
|
4
|
+
import { IconName } from '../types/Icon.types';
|
|
5
|
+
export { VALID_ICON_NAMES };
|
|
6
|
+
export type IconButtonKind = "action" | "plain" | "themed";
|
|
7
|
+
export interface IconButtonProps {
|
|
8
|
+
/** Name of Narmi icon */
|
|
9
|
+
name: IconName;
|
|
10
|
+
/** Renders the icon button label */
|
|
11
|
+
label?: string;
|
|
12
|
+
/** disables the icon button when set to `true` */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** style of icon button to render */
|
|
15
|
+
kind?: IconButtonKind;
|
|
16
|
+
/** type attribute for underlying HTML button element */
|
|
17
|
+
type?: string;
|
|
18
|
+
/** Optional text size of the icon in the icon button defaults different for different kinds (plain/action)*/
|
|
19
|
+
textSize?: "xs" | "s" | "m" | "l";
|
|
20
|
+
/** Click callback, with event object passed as argument */
|
|
21
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
22
|
+
/** Optional value for `data-testid` attribute */
|
|
23
|
+
testId?: string;
|
|
24
|
+
/** className for adding classNames to the icon button */
|
|
25
|
+
className?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The html element to render as the root node of `Button`.
|
|
28
|
+
*
|
|
29
|
+
* When rendering as an "a" you **MUST** pass an `href` attribute
|
|
30
|
+
* for the anchor to be valid.
|
|
31
|
+
*/
|
|
32
|
+
as?: "a" | "button";
|
|
33
|
+
[x: string]: unknown;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Narmi style Icon Button.
|
|
37
|
+
*
|
|
38
|
+
* Icon Button renders a button with a central Narmi icon
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
declare const IconButton: {
|
|
42
|
+
({ disabled, kind, textSize, testId, label, name, onClick, type, as, ...otherProps }: IconButtonProps): React.JSX.Element;
|
|
43
|
+
propTypes: {
|
|
44
|
+
/** Name of Narmi icon */
|
|
45
|
+
name: PropTypes.Validator<string>;
|
|
46
|
+
/** Renders the icon button label */
|
|
47
|
+
label: PropTypes.Requireable<string>;
|
|
48
|
+
/** disables the icon button when set to `true` */
|
|
49
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
50
|
+
/** style of icon button to render */
|
|
51
|
+
kind: PropTypes.Requireable<string>;
|
|
52
|
+
/** type attribute for underlying HTML button element */
|
|
53
|
+
type: PropTypes.Requireable<string>;
|
|
54
|
+
/** Optional text size of the icon in the icon button defaults different for different kinds (plain/action)*/
|
|
55
|
+
textSize: PropTypes.Requireable<string>;
|
|
56
|
+
/** Click callback, with event object passed as argument */
|
|
57
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
58
|
+
/** Optional value for `data-testid` attribute */
|
|
59
|
+
testId: PropTypes.Requireable<string>;
|
|
60
|
+
/** className for adding classNames to the icon button */
|
|
61
|
+
className: PropTypes.Requireable<string>;
|
|
62
|
+
/**
|
|
63
|
+
* The html element to render as the root node of `Button`.
|
|
64
|
+
*
|
|
65
|
+
* When rendering as an "a" you **MUST** pass an `href` attribute
|
|
66
|
+
* for the anchor to be valid.
|
|
67
|
+
*/
|
|
68
|
+
as: PropTypes.Requireable<string>;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export default IconButton;
|
|
72
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/IconButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE3D,MAAM,WAAW,eAAe;IAC9B,yBAAyB;IACzB,IAAI,EAAE,QAAQ,CAAC;IACf,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qCAAqC;IACrC,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6GAA6G;IAC7G,QAAQ,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAClC,2DAA2D;IAC3D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,EAAE,CAAC,EAAE,GAAG,GAAG,QAAQ,CAAC;IACpB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,QAAA,MAAM,UAAU;0FAWb,eAAe;;QA0BhB,yBAAyB;;QAEzB,oCAAoC;;QAEpC,kDAAkD;;QAElD,qCAAqC;;QAErC,wDAAwD;;QAExD,6GAA6G;;QAE7G,2DAA2D;;QAE3D,iDAAiD;;QAEjD,0DAA0D;;QAE1D;;;;;WAKG;;;CA1BJ,CAAC;AA8BF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as PropTypes } from 'prop-types';
|
|
3
|
+
export interface LoadingShimProps {
|
|
4
|
+
/** Loadable content area - will render normally unless `isLoading` is true */
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/** When `true`, the loading shim appears over child content */
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
/** Optional value for `data-testid` attribute */
|
|
9
|
+
testId?: string;
|
|
10
|
+
/** Size of the loading indicator */
|
|
11
|
+
size?: "s" | "l";
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Used to wrap a block of loadable content. When `isLoading` is set to true,
|
|
15
|
+
* the content area will have an overlay and loading animation.
|
|
16
|
+
*/
|
|
17
|
+
declare const LoadingShim: {
|
|
18
|
+
({ isLoading, children, testId, size, }: LoadingShimProps): React.JSX.Element;
|
|
19
|
+
propTypes: {
|
|
20
|
+
/** Loadable content area - will render normally unless `isLoading` is true */
|
|
21
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
22
|
+
/** When `true`, the loading shim appears over child content */
|
|
23
|
+
isLoading: PropTypes.Requireable<boolean>;
|
|
24
|
+
/** Optional value for `data-testid` attribute */
|
|
25
|
+
testId: PropTypes.Requireable<string>;
|
|
26
|
+
/** Size of the loading indicator */
|
|
27
|
+
size: PropTypes.Requireable<string>;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export default LoadingShim;
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/LoadingShim/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,MAAM,WAAW,gBAAgB;IAC/B,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,+DAA+D;IAC/D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CAClB;AAED;;;GAGG;AACH,QAAA,MAAM,WAAW;6CAKd,gBAAgB;;QAgCjB,8EAA8E;;QAE9E,+DAA+D;;QAE/D,iDAAiD;;QAEjD,oCAAoC;;;CATrC,CAAC;AAaF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as PropTypes } from 'prop-types';
|
|
3
|
+
/** Standard Narmi breakpoint names */
|
|
4
|
+
export type ResponsiveFlexSize = "s" | "m" | "l" | "xl";
|
|
5
|
+
export type ResponsiveFlexGap = "xs" | "s" | "m" | "l" | "xl";
|
|
6
|
+
export type ResponsiveFlexDirection = "row" | "column";
|
|
7
|
+
export type FlexDirection = ResponsiveFlexDirection | "row-reverse" | "column-reverse";
|
|
8
|
+
export interface GetFlexDirectionArgs {
|
|
9
|
+
viewportMatches: Record<ResponsiveFlexSize, boolean>;
|
|
10
|
+
direction: ResponsiveFlexDirection;
|
|
11
|
+
toColumnAt?: ResponsiveFlexSize;
|
|
12
|
+
toRowAt?: ResponsiveFlexSize;
|
|
13
|
+
reverseAt?: ResponsiveFlexSize;
|
|
14
|
+
}
|
|
15
|
+
export declare const getFlexDirection: ({ viewportMatches, direction, toColumnAt, toRowAt, reverseAt, }: GetFlexDirectionArgs) => FlexDirection;
|
|
16
|
+
export interface ResponsiveFlexProps {
|
|
17
|
+
/** Implicit flex children */
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
/** Size of flex gap by token size (e.g. "xl") */
|
|
20
|
+
gapSize?: ResponsiveFlexGap;
|
|
21
|
+
/** Initial flex direction */
|
|
22
|
+
direction?: ResponsiveFlexDirection;
|
|
23
|
+
/** Breakpoint at which to reverse order of flex items */
|
|
24
|
+
reverseAt?: ResponsiveFlexSize;
|
|
25
|
+
/** Breakpoint at which to change flex direction to column */
|
|
26
|
+
toColumnAt?: ResponsiveFlexSize;
|
|
27
|
+
/** Breakpoint at which to change flex direction to row */
|
|
28
|
+
toRowAt?: ResponsiveFlexSize;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Responsive layout helper that allows developers to declaratively control
|
|
32
|
+
* how flex items behave at different standard viewport sizes.
|
|
33
|
+
*/
|
|
34
|
+
declare const ResponsiveFlex: {
|
|
35
|
+
({ children, direction, gapSize, reverseAt, toColumnAt, toRowAt, }: ResponsiveFlexProps): React.JSX.Element;
|
|
36
|
+
propTypes: {
|
|
37
|
+
/** Implicit flex children */
|
|
38
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike[]>;
|
|
39
|
+
/** Size of flex gap by token size (e.g. "xl") */
|
|
40
|
+
gapSize: PropTypes.Requireable<string>;
|
|
41
|
+
/** Initial flex direction */
|
|
42
|
+
direction: PropTypes.Requireable<string>;
|
|
43
|
+
/** Breakpoint at which to reverse order of flex items */
|
|
44
|
+
reverseAt: PropTypes.Requireable<string>;
|
|
45
|
+
/** Breakpoint at which to change flex direction to column */
|
|
46
|
+
toColumnAt: PropTypes.Requireable<string>;
|
|
47
|
+
/** Breakpoint at which to change flex direction to row */
|
|
48
|
+
toRowAt: PropTypes.Requireable<string>;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export default ResponsiveFlex;
|
|
52
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ResponsiveFlex/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAOnC,sCAAsC;AACtC,MAAM,MAAM,kBAAkB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;AACxD,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;AAC9D,MAAM,MAAM,uBAAuB,GAAG,KAAK,GAAG,QAAQ,CAAC;AACvD,MAAM,MAAM,aAAa,GACrB,uBAAuB,GACvB,aAAa,GACb,gBAAgB,CAAC;AAErB,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,MAAM,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACrD,SAAS,EAAE,uBAAuB,CAAC;IACnC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,SAAS,CAAC,EAAE,kBAAkB,CAAC;CAChC;AAED,eAAO,MAAM,gBAAgB,GAAI,iEAM9B,oBAAoB,KAAG,aAiBzB,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,iDAAiD;IACjD,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,8BAA8B;IAC9B,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC,yDAAyD;IACzD,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,6DAA6D;IAC7D,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,0DAA0D;IAC1D,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED;;;GAGG;AACH,QAAA,MAAM,cAAc;wEAOjB,mBAAmB;;QAyBpB,6BAA6B;;QAE7B,iDAAiD;;QAEjD,8BAA8B;;QAE9B,yDAAyD;;QAEzD,6DAA6D;;QAE7D,0DAA0D;;;CAb3D,CAAC;AAiBF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as PropTypes } from 'prop-types';
|
|
3
|
+
import { VALID_ICON_NAMES } from '../icons/iconNames';
|
|
4
|
+
import { IconName } from '../types/Icon.types';
|
|
5
|
+
export { VALID_ICON_NAMES };
|
|
6
|
+
export type TimelineEventKind = "node" | "start" | "pending";
|
|
7
|
+
export interface TimelineEventProps {
|
|
8
|
+
/**
|
|
9
|
+
* Timeline node variant.
|
|
10
|
+
*/
|
|
11
|
+
kind?: TimelineEventKind;
|
|
12
|
+
/**
|
|
13
|
+
* Name of NDS icon to render inside the timeline node
|
|
14
|
+
*/
|
|
15
|
+
icon?: IconName;
|
|
16
|
+
/**
|
|
17
|
+
* Pass an image url to render the timeline node
|
|
18
|
+
* as an avatar
|
|
19
|
+
*/
|
|
20
|
+
imgUrl?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Initial to render in the timeline node
|
|
23
|
+
* Overridden by:
|
|
24
|
+
* - icon
|
|
25
|
+
* - imgUrl
|
|
26
|
+
*/
|
|
27
|
+
initial?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Timeline event content (any JSX)
|
|
30
|
+
*/
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Hover tooltip content for the icon
|
|
34
|
+
*/
|
|
35
|
+
tooltip?: string;
|
|
36
|
+
/** Render a custom circle node on the line */
|
|
37
|
+
renderNode?: () => React.ReactNode;
|
|
38
|
+
}
|
|
39
|
+
declare const TimelineEvent: {
|
|
40
|
+
({ kind, icon, imgUrl, initial, tooltip, children, renderNode, }: TimelineEventProps): React.JSX.Element;
|
|
41
|
+
propTypes: {
|
|
42
|
+
/**
|
|
43
|
+
* Timeline node variant.
|
|
44
|
+
*/
|
|
45
|
+
kind: PropTypes.Requireable<string>;
|
|
46
|
+
/**
|
|
47
|
+
* Name of NDS icon to render inside the timeline node
|
|
48
|
+
*/
|
|
49
|
+
icon: PropTypes.Requireable<string>;
|
|
50
|
+
/**
|
|
51
|
+
* Pass an image url to render the timeline node
|
|
52
|
+
* as an avatar
|
|
53
|
+
*/
|
|
54
|
+
imgUrl: PropTypes.Requireable<string>;
|
|
55
|
+
/**
|
|
56
|
+
* Initial to render in the timeline node
|
|
57
|
+
* Overridden by:
|
|
58
|
+
* - icon
|
|
59
|
+
* - imgUrl
|
|
60
|
+
*/
|
|
61
|
+
initial: PropTypes.Requireable<string>;
|
|
62
|
+
/**
|
|
63
|
+
* Timeline event content (any JSX)
|
|
64
|
+
*/
|
|
65
|
+
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
66
|
+
/**
|
|
67
|
+
* Hover tooltip content for the icon
|
|
68
|
+
*/
|
|
69
|
+
tooltip: PropTypes.Requireable<string>;
|
|
70
|
+
/** Render a custom circle node on the line */
|
|
71
|
+
renderNode: PropTypes.Requireable<(...args: any[]) => any>;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export default TimelineEvent;
|
|
75
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/TimelineEvent/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAE7D,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;CACpC;AAED,QAAA,MAAM,aAAa;sEAQhB,kBAAkB;;QAmEnB;;WAEG;;QAEH;;WAEG;;QAEH;;;WAGG;;QAEH;;;;;WAKG;;QAEH;;WAEG;;QAKH;;WAEG;;QAEH,8CAA8C;;;CAlC/C,CAAC;AAsCF,eAAe,aAAa,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -15,11 +15,14 @@ import { default as DisabledShim } from './DisabledShim';
|
|
|
15
15
|
import { default as Error } from './Error';
|
|
16
16
|
import { default as DropdownTrigger } from './DropdownTrigger';
|
|
17
17
|
import { default as Field } from './Field';
|
|
18
|
+
import { default as FieldToken } from './FieldToken';
|
|
18
19
|
import { default as FormSection } from './FormSection';
|
|
20
|
+
import { default as IconButton } from './IconButton';
|
|
19
21
|
import { default as Pagination } from './Pagination';
|
|
20
22
|
import { default as ProgressBar } from './ProgressBar';
|
|
21
23
|
import { default as Radio } from './Radio';
|
|
22
24
|
import { default as RadioButtons } from './RadioButtons';
|
|
25
|
+
import { default as ResponsiveFlex } from './ResponsiveFlex';
|
|
23
26
|
import { default as Row } from './Row';
|
|
24
27
|
import { default as SeparatorList } from './SeparatorList';
|
|
25
28
|
import { default as Slider } from './Slider';
|
|
@@ -27,12 +30,14 @@ import { default as Snackbar } from './Snackbar';
|
|
|
27
30
|
import { default as Spinner } from './Spinner';
|
|
28
31
|
import { default as SplitButton } from './SplitButton';
|
|
29
32
|
import { default as LoadingSkeleton } from './LoadingSkeleton';
|
|
33
|
+
import { default as LoadingShim } from './LoadingShim';
|
|
30
34
|
import { default as Table } from './Table';
|
|
31
35
|
import { default as TableAutocomplete } from './TableAutocomplete';
|
|
32
36
|
import { default as TableDateInput } from './TableDateInput';
|
|
33
37
|
import { default as TableInput } from './TableInput';
|
|
34
38
|
import { default as TableSelect } from './TableSelect';
|
|
35
39
|
import { default as Tabs } from './Tabs';
|
|
40
|
+
import { default as TimelineEvent } from './TimelineEvent';
|
|
36
41
|
import { default as Tooltip } from './Tooltip';
|
|
37
42
|
import { default as TruncatedAccount } from './TruncatedAccount';
|
|
38
43
|
import { default as useSupportsAnchorPositioning } from './hooks/useSupportsAnchorPositioning';
|
|
@@ -48,19 +53,14 @@ declare const CollapsibleCard: any;
|
|
|
48
53
|
declare const Combobox: any;
|
|
49
54
|
declare const DateInput: any;
|
|
50
55
|
declare const Drawer: any;
|
|
51
|
-
declare const FieldToken: any;
|
|
52
|
-
declare const IconButton: any;
|
|
53
56
|
declare const Input: any;
|
|
54
|
-
declare const LoadingShim: any;
|
|
55
57
|
declare const MenuButton: any;
|
|
56
58
|
declare const MultiSelect: any;
|
|
57
59
|
declare const Popover: any;
|
|
58
|
-
declare const ResponsiveFlex: any;
|
|
59
60
|
declare const Select: any;
|
|
60
61
|
declare const Sidebar: any;
|
|
61
62
|
declare const Tag: any;
|
|
62
63
|
declare const TextInput: any;
|
|
63
|
-
declare const TimelineEvent: any;
|
|
64
64
|
declare const Toggle: any;
|
|
65
65
|
declare const TokenInput: any;
|
|
66
66
|
export * from './types/Icon.types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,QAAQ,MAA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,MAAM,EACN,eAAe,EACf,KAAK,EACL,KAAK,EACL,UAAU,EACV,WAAW,EACX,UAAU,EACV,KAAK,EACL,WAAW,EACX,eAAe,EACf,UAAU,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,OAAO,EACP,cAAc,EACd,MAAM,EACN,OAAO,EACP,OAAO,EACP,WAAW,EACX,KAAK,EACL,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,WAAW,EACX,IAAI,EACJ,GAAG,EACH,SAAS,EACT,aAAa,EACb,MAAM,EACN,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,4BAA4B,EAC5B,YAAY,EACZ,UAAU,GACX,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as PropTypes } from 'prop-types';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the href if it uses a safe protocol, or undefined if it
|
|
5
|
+
* uses a potentially dangerous scheme (javascript:, data:, etc).
|
|
6
|
+
*
|
|
7
|
+
* Accepts `unknown` rather than `string` on purpose: this is a security
|
|
8
|
+
* guard, and it must keep rejecting non-string input that reaches it from
|
|
9
|
+
* untyped call sites at runtime.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getSafeHref: (href?: unknown) => string | null | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* This is not a complete list of HTML elements;
|
|
14
|
+
* only the elements we want to support in `as` props.
|
|
15
|
+
*/
|
|
16
|
+
export declare const VALID_ELEMENTS: string[];
|
|
17
|
+
export interface AsElementProps {
|
|
18
|
+
/** element to render */
|
|
19
|
+
elementType?: React.ElementType;
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Any additional props are spread onto the rendered element.
|
|
23
|
+
* `AsElement` is a passthrough, so this is intentionally open-ended.
|
|
24
|
+
*/
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Utility to conditionally render different HTML elements
|
|
29
|
+
* in our components. Useful for exposing `as` props:
|
|
30
|
+
*
|
|
31
|
+
* `<Row as="ul"><Row.Item as="li" /></Row>
|
|
32
|
+
*
|
|
33
|
+
* @usage <AsElement elementName="ul" otherProp="this gets passed through">
|
|
34
|
+
*/
|
|
35
|
+
declare const AsElement: {
|
|
36
|
+
({ elementType, children, ...rest }: AsElementProps): React.JSX.Element;
|
|
37
|
+
propTypes: {
|
|
38
|
+
/** element to render */
|
|
39
|
+
elementType: PropTypes.Validator<NonNullable<NonNullable<string | ((...args: any[]) => any)>>>;
|
|
40
|
+
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export default AsElement;
|
|
44
|
+
//# sourceMappingURL=AsElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AsElement.d.ts","sourceRoot":"","sources":["../../../src/util/AsElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,IAAI,GAAG,SAU5D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,UAkB1B,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,yBAAyB;IACzB,WAAW,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,SAAS;yCAIZ,cAAc;;QA6Bf,yBAAyB;;;;CAH1B,CAAC;AAcF,eAAe,SAAS,CAAC"}
|