@narmi/design_system 4.5.2 → 4.6.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.
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +2 -2
- package/dist/index.js.map +1 -1
- package/dist/style.css +3 -3
- package/dist/style.css.map +1 -1
- package/dist/tokens/css/rgbColors.css +1 -1
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/js/colors.js +1 -1
- package/dist/tokens/js/manifest.js +1 -1
- package/dist/tokens/js/reactNativeWeb.js +1 -1
- package/dist/types/Alert/index.d.ts +25 -0
- package/dist/types/Alert/index.d.ts.map +1 -0
- package/dist/types/Button/Spinner.d.ts +17 -0
- package/dist/types/Button/Spinner.d.ts.map +1 -0
- package/dist/types/Button/index.d.ts +53 -0
- package/dist/types/Button/index.d.ts.map +1 -0
- package/dist/types/Checkbox/index.d.ts +54 -0
- package/dist/types/Checkbox/index.d.ts.map +1 -0
- package/dist/types/ContentCard/index.d.ts +51 -0
- package/dist/types/ContentCard/index.d.ts.map +1 -0
- package/dist/types/Dialog/index.d.ts +36 -0
- package/dist/types/Dialog/index.d.ts.map +1 -0
- package/dist/types/LoadingSkeleton/index.d.ts +34 -0
- package/dist/types/LoadingSkeleton/index.d.ts.map +1 -0
- package/dist/types/Radio/index.d.ts +30 -0
- package/dist/types/Radio/index.d.ts.map +1 -0
- package/dist/types/RadioButtons/index.d.ts +74 -0
- package/dist/types/RadioButtons/index.d.ts.map +1 -0
- package/dist/types/Tabs/Arrow.d.ts +8 -0
- package/dist/types/Tabs/Arrow.d.ts.map +1 -0
- package/dist/types/Tabs/TabsList.d.ts +13 -0
- package/dist/types/Tabs/TabsList.d.ts.map +1 -0
- package/dist/types/Tabs/TabsPanel.d.ts +12 -0
- package/dist/types/Tabs/TabsPanel.d.ts.map +1 -0
- package/dist/types/Tabs/TabsTab.d.ts +11 -0
- package/dist/types/Tabs/TabsTab.d.ts.map +1 -0
- package/dist/types/Tabs/context.d.ts +14 -0
- package/dist/types/Tabs/context.d.ts.map +1 -0
- package/dist/types/Tabs/index.d.ts +37 -0
- package/dist/types/Tabs/index.d.ts.map +1 -0
- package/dist/types/Tooltip/index.d.ts +26 -0
- package/dist/types/Tooltip/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +11 -10
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +20 -17
package/dist/tokens/js/colors.js
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { IconName } from "../types/Icon.types";
|
|
3
|
+
interface AlertProps {
|
|
4
|
+
/** The alert is only visible when this prop is set to `true` */
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
/** Renders a dismiss button when `true` */
|
|
7
|
+
isDismissable?: boolean;
|
|
8
|
+
/** Callback for user dismissal actions */
|
|
9
|
+
onUserDismiss?: () => void;
|
|
10
|
+
/** Variant of Alert to use */
|
|
11
|
+
kind?: "info" | "error" | "success" | "warn";
|
|
12
|
+
/** Override the default icon of the alert */
|
|
13
|
+
icon?: IconName | null;
|
|
14
|
+
/** Message content of the Alert */
|
|
15
|
+
children?: React.ReactNode | string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Inline system message, for a specific region of a page.
|
|
19
|
+
* The `isActive` prop is used to hide and show the Alert to ensure the Alert
|
|
20
|
+
* is always rendered in an [ARIA live region](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions)
|
|
21
|
+
* for accessibility.
|
|
22
|
+
*/
|
|
23
|
+
declare const Alert: ({ isActive, isDismissable, onUserDismiss, kind, icon, children, }: AlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default Alert;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Alert/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAIpD,UAAU,UAAU;IAClB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IAC7C,6CAA6C;IAC7C,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACvB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;CACrC;AAED;;;;;GAKG;AACH,QAAA,MAAM,KAAK,sEAOR,UAAU,4CAsCZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface SpinnerProps {
|
|
2
|
+
/**
|
|
3
|
+
* Square size of spinner as unitless number
|
|
4
|
+
*/
|
|
5
|
+
size?: number;
|
|
6
|
+
/**
|
|
7
|
+
* Width of animated stroke
|
|
8
|
+
*/
|
|
9
|
+
strokeWidth?: number;
|
|
10
|
+
/**
|
|
11
|
+
* CSS color value
|
|
12
|
+
*/
|
|
13
|
+
color?: string | undefined;
|
|
14
|
+
}
|
|
15
|
+
declare const Spinner: ({ size, strokeWidth, color, }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default Spinner;
|
|
17
|
+
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/Button/Spinner.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,OAAO,kCAIV,YAAY,4CAsBd,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { IconName } from "../types/Icon.types";
|
|
3
|
+
interface ButtonProps {
|
|
4
|
+
/** Renders the button label */
|
|
5
|
+
label: string;
|
|
6
|
+
/** style of button to render */
|
|
7
|
+
kind: "primary" | "secondary" | "tonal" | "negative" | "menu" | "plain";
|
|
8
|
+
/** Click callback, with event object passed as argument */
|
|
9
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
10
|
+
/**
|
|
11
|
+
* The html element to render as the root node of `Button`.
|
|
12
|
+
*
|
|
13
|
+
* When rendering as an "a" you **MUST** pass an `href` attribute
|
|
14
|
+
* for the anchor to be valid.
|
|
15
|
+
*/
|
|
16
|
+
as?: "a" | "button";
|
|
17
|
+
/** disables the button when set to `true` */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** disables the button and adds a loading spinner when set to `true` */
|
|
20
|
+
isLoading?: boolean;
|
|
21
|
+
/** type attribute of button element */
|
|
22
|
+
type?: "submit" | "button" | "reset";
|
|
23
|
+
/** size variant of button */
|
|
24
|
+
size?: "xs" | "s" | "m";
|
|
25
|
+
/** Name of Narmi icon to place at the start of the label */
|
|
26
|
+
startIcon?: IconName | null;
|
|
27
|
+
/** Name of Narmi icon to place at the end of the label */
|
|
28
|
+
endIcon?: IconName | null;
|
|
29
|
+
/** Optional value for `data-testid` attribute */
|
|
30
|
+
testId?: string;
|
|
31
|
+
/** Optional value for setting the aria-label. If unset label will be used. */
|
|
32
|
+
ariaLabel?: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* **⚠️ DEPRECATED**
|
|
35
|
+
*
|
|
36
|
+
* Passing children to render the button label will be removed
|
|
37
|
+
* in a future release. Use the `label` prop instead.
|
|
38
|
+
*/
|
|
39
|
+
children?: React.ReactNode | string | undefined;
|
|
40
|
+
[x: string]: unknown;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Narmi style action buttons.
|
|
44
|
+
*
|
|
45
|
+
* Button renders as a `button` element by default, but can render as an `a` element
|
|
46
|
+
* via the `as` prop.
|
|
47
|
+
*
|
|
48
|
+
* This component supports rest props; any additional props on button will be
|
|
49
|
+
* passed through to the root node of `Button`.
|
|
50
|
+
*/
|
|
51
|
+
declare const Button: ({ isLoading, disabled, kind, type, size, startIcon, endIcon, testId, children, label, onClick, as, ariaLabel, ...otherProps }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export default Button;
|
|
53
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,UAAU,WAAW;IACnB,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;IACxE,2DAA2D;IAC3D,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACxC;;;;;OAKG;IACH,EAAE,CAAC,EAAE,GAAG,GAAG,QAAQ,CAAC;IACpB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uCAAuC;IACvC,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,6BAA6B;IAC7B,IAAI,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC;IACxB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC5B,0DAA0D;IAC1D,OAAO,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IAChD,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,QAAA,MAAM,MAAM,kIAeT,WAAW,4CA0Eb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface CheckboxProps {
|
|
3
|
+
/** Content of `label` element */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Markdown to use in place of the `label` field */
|
|
6
|
+
markdownLabel?: string;
|
|
7
|
+
/** Change callback invoked when the value of the `input` changes */
|
|
8
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
+
/** `id` attribute of `input` */
|
|
10
|
+
id?: string | number;
|
|
11
|
+
/** `name` attribute of `input` */
|
|
12
|
+
name?: string;
|
|
13
|
+
/**
|
|
14
|
+
* ⚠️ DEPRECATED
|
|
15
|
+
*
|
|
16
|
+
* Uncontrolled Checkbox props will be removed in a future release.
|
|
17
|
+
* Use `checked` instead to use Checkbox as a fully controlled input.
|
|
18
|
+
*/
|
|
19
|
+
defaultChecked?: boolean;
|
|
20
|
+
/** Sets the checkbox checked value */
|
|
21
|
+
checked?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Checkbox renders in
|
|
24
|
+
* [indeterminate state](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes)
|
|
25
|
+
* when `true`.
|
|
26
|
+
*/
|
|
27
|
+
indeterminate?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Checkbox renders as disabled and ignores click/check events.
|
|
30
|
+
*/
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/** Sets the `value` attribute of the `input` */
|
|
33
|
+
value?: string;
|
|
34
|
+
/** Sets whether the checkbox has an error. To be used with multiple checkboxes */
|
|
35
|
+
hasError?: boolean;
|
|
36
|
+
/** Text of error message to display under the checkbox */
|
|
37
|
+
error?: string;
|
|
38
|
+
/** Optional value for `data-testid` attribute */
|
|
39
|
+
testId?: string;
|
|
40
|
+
/**
|
|
41
|
+
* `normal` - visually matches a checkbox input
|
|
42
|
+
*
|
|
43
|
+
* `condensed` - like `normal`, but without added top margin when there are multiple checkboxes
|
|
44
|
+
*
|
|
45
|
+
* `card` - visually present as a toggleable card
|
|
46
|
+
*/
|
|
47
|
+
kind?: "normal" | "condensed" | "card" | "table";
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Narmi styled checkbox with built-in label.
|
|
51
|
+
*/
|
|
52
|
+
declare const Checkbox: ({ label, markdownLabel, onChange, id, name, defaultChecked, checked, disabled, indeterminate, value, hasError, error, kind, testId, ...rest }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export default Checkbox;
|
|
54
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Checkbox/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAM3D,UAAU,aAAa;IACrB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D,gCAAgC;IAChC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sCAAsC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;CAClD;AAED;;GAEG;AACH,QAAA,MAAM,QAAQ,kJAgBX,aAAa,4CA0Gf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ContentCardProps {
|
|
3
|
+
/** Accepts any content as children */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* Amount of padding to add on all sides of card.
|
|
7
|
+
* For custom padding control, use `none` and compose your own element(s)
|
|
8
|
+
* in ContentCard children.
|
|
9
|
+
*/
|
|
10
|
+
paddingSize?: "xs" | "s" | "m" | "l" | "xl" | "none";
|
|
11
|
+
/**
|
|
12
|
+
* Kind of card to render.
|
|
13
|
+
*
|
|
14
|
+
* `plain`: flat, rounded rect
|
|
15
|
+
*
|
|
16
|
+
* `elevated`: rounded rect with shadow
|
|
17
|
+
*
|
|
18
|
+
* `toggle`: toggle button (checkbox-like)
|
|
19
|
+
*
|
|
20
|
+
* `button`: action button (button-like)
|
|
21
|
+
*
|
|
22
|
+
* `bordered`: flat, rounded rect with border
|
|
23
|
+
*/
|
|
24
|
+
kind?: "plain" | "elevated" | "toggle" | "button" | "bordered" | "interactive";
|
|
25
|
+
/**
|
|
26
|
+
* Amount of border radius to add on all sides of card.
|
|
27
|
+
*/
|
|
28
|
+
radiusSize?: "s" | "m" | "l";
|
|
29
|
+
onClick?: () => void;
|
|
30
|
+
/**
|
|
31
|
+
* Only applicable for `toggle` type.
|
|
32
|
+
* Renders card in visually selected state with appropriate attributes.
|
|
33
|
+
*/
|
|
34
|
+
isSelected?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Only applicable for `toggle` type.
|
|
37
|
+
* Renders card in visually selected state with appropriate attributes.
|
|
38
|
+
*/
|
|
39
|
+
testId?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Narmi style content containers, with support for rendering as an interactive button.
|
|
43
|
+
*/
|
|
44
|
+
declare const ContentCard: {
|
|
45
|
+
({ kind, paddingSize, onClick, isSelected, children, testId, radiusSize, }: ContentCardProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
propTypes: {
|
|
47
|
+
onClick: (props: any, propName: any) => Error;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export default ContentCard;
|
|
51
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ContentCard/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,gBAAgB;IACxB,sCAAsC;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,WAAW,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,MAAM,CAAC;IACrD;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,EACD,OAAO,GACP,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,aAAa,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,QAAA,MAAM,WAAW;gFAQd,gBAAgB;;;;CAyClB,CAAC;AA4BF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface DialogProps {
|
|
3
|
+
/** Scrollable contents of the Dialog */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** Heading in the top of the Dialog */
|
|
6
|
+
title: string;
|
|
7
|
+
/** Optional notification content to render pinned under the header */
|
|
8
|
+
notification?: React.ReactNode;
|
|
9
|
+
/** Contents of Dialog footer, typically reserved for action buttons */
|
|
10
|
+
footer?: React.ReactNode;
|
|
11
|
+
/** Visual style for Dialog header */
|
|
12
|
+
headerStyle?: "bordered" | "plain" | "banner";
|
|
13
|
+
/** Controls open/close state of the modal. Use the `onUserDismiss` callback to update. */
|
|
14
|
+
isOpen?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Callback to handle user taking an action to dismiss the modal
|
|
17
|
+
* (click outside, Escape key, click close button)
|
|
18
|
+
*/
|
|
19
|
+
onUserDismiss: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* Sets a custom modal width.
|
|
22
|
+
* Use the full CSS value with the unit (e.g. "400px")
|
|
23
|
+
*/
|
|
24
|
+
width?: string;
|
|
25
|
+
/** Optional value for `data-testid` attribute */
|
|
26
|
+
testId?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Renders a centered modal dialog with an overlay
|
|
30
|
+
*
|
|
31
|
+
* This component uses a `ReactDOM` portal to render it as a direct
|
|
32
|
+
* child of `document.body`.
|
|
33
|
+
*/
|
|
34
|
+
declare const Dialog: ({ isOpen, onUserDismiss, title, headerStyle, children, notification, footer, width, testId, }: DialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export default Dialog;
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Dialog/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA0B3D,MAAM,WAAW,WAAW;IAC1B,wCAAwC;IACxC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,uEAAuE;IACvE,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,qCAAqC;IACrC,WAAW,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC9C,0FAA0F;IAC1F,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,QAAA,MAAM,MAAM,kGAUT,WAAW,4CAwHb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface LoadingSkeletonProps {
|
|
3
|
+
/** Loadable content area - will render normally unless `isLoading` is true. */
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
/** When `true`, the child content is replaced by the skeleton imitation. */
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
/** The mask type that best represents the content. */
|
|
8
|
+
content?: "paragraph" | "headerText";
|
|
9
|
+
/**
|
|
10
|
+
* Only applies if `content` prop is set to `paragraph`.
|
|
11
|
+
* The number of lines to be shown by the skeleton.
|
|
12
|
+
*/
|
|
13
|
+
lines?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Only applies if `content` prop is set to `paragraph`.
|
|
16
|
+
* When `true`, a skeletal title row will be shown above the first line.
|
|
17
|
+
*/
|
|
18
|
+
showTitle?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Only applies if `content` prop is set to `headerText`.
|
|
21
|
+
* The size of the skeletal header text.
|
|
22
|
+
*/
|
|
23
|
+
size?: "small" | "medium" | "large";
|
|
24
|
+
/** Optional value for `data-testid` attribute */
|
|
25
|
+
testId?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Used to mask a limited block of loadable content. When `isLoading` is set to true,
|
|
29
|
+
* the content area will be replaced by a shadowed, skeletal imitation of the
|
|
30
|
+
* pending content.
|
|
31
|
+
*/
|
|
32
|
+
declare const LoadingSkeleton: ({ children, isLoading, content, lines, showTitle, size, testId, }: LoadingSkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export default LoadingSkeleton;
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/LoadingSkeleton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,oBAAoB;IAC5B,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,4EAA4E;IAC5E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sDAAsD;IACtD,OAAO,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;IACrC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,QAAA,MAAM,eAAe,sEAQlB,oBAAoB,4CAgBtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface RadioProps {
|
|
3
|
+
/** The `name` attribute for radio input. Use this to group radio sets. */
|
|
4
|
+
name: string;
|
|
5
|
+
/** The `value attribute for the radio input */
|
|
6
|
+
value: string;
|
|
7
|
+
/** Custom label for the Radio input*/
|
|
8
|
+
children: React.ReactNode | string;
|
|
9
|
+
/**
|
|
10
|
+
* Optional callback when the Radio is checked by a user.
|
|
11
|
+
* Called with the `value` of the currently checked input
|
|
12
|
+
*/
|
|
13
|
+
onCheck: (value: string) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Optional prop to set the Radio to checked, making the Radio fully controlled.
|
|
16
|
+
* When fully controlled track the checked state by value in the parent component.
|
|
17
|
+
* e.g. `checked={currentlyCheckedValue === thisRadioValue}`
|
|
18
|
+
*/
|
|
19
|
+
checked?: boolean;
|
|
20
|
+
/** Disables the input when `true` */
|
|
21
|
+
isDisabled?: boolean;
|
|
22
|
+
/** Error text */
|
|
23
|
+
error?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Single radio input that takes arbitrary JSX children as a label.
|
|
27
|
+
*/
|
|
28
|
+
declare const Radio: ({ name, value, isDisabled, onCheck, checked, children, error, }: RadioProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export default Radio;
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Radio/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,UAAU,UAAU;IAClB,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IACnC;;;OAGG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qCAAqC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,QAAA,MAAM,KAAK,oEAQR,UAAU,4CA+BZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type OptionType = {
|
|
3
|
+
value: string;
|
|
4
|
+
details?: string;
|
|
5
|
+
} | string;
|
|
6
|
+
interface RadioButtonsProps {
|
|
7
|
+
/** Map of label strings to input values
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* type OptionType = {
|
|
11
|
+
* value: string;
|
|
12
|
+
* details?: string;
|
|
13
|
+
* }
|
|
14
|
+
* | string;
|
|
15
|
+
* ```
|
|
16
|
+
* */
|
|
17
|
+
options: Record<string, OptionType>;
|
|
18
|
+
/** name of radiogroup */
|
|
19
|
+
name: string;
|
|
20
|
+
/** initially selected option by input value (uncontrolled) */
|
|
21
|
+
initialValue?: unknown;
|
|
22
|
+
/**
|
|
23
|
+
* selected option by input value (fully controlled)
|
|
24
|
+
* When passing a `value` prop, you must use the `onChange`
|
|
25
|
+
* handler to update the `value`
|
|
26
|
+
*/
|
|
27
|
+
value?: string;
|
|
28
|
+
/** change callback invoked with input value */
|
|
29
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
30
|
+
/**
|
|
31
|
+
* `normal` - display input and label normally
|
|
32
|
+
*
|
|
33
|
+
* `card` - display input and label as a toggleable card
|
|
34
|
+
*
|
|
35
|
+
* `input-card` - display toggleable card with a faux radio input
|
|
36
|
+
*
|
|
37
|
+
* `checkmark` - uses a checkmark icon instead of a faux radio
|
|
38
|
+
*/
|
|
39
|
+
kind?: "normal" | "row" | "row-start" | "card" | "input-card" | "checkmark";
|
|
40
|
+
/**
|
|
41
|
+
* Error message. When passed, the `error` prop will
|
|
42
|
+
* render the radio group in an error state.
|
|
43
|
+
*/
|
|
44
|
+
error?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Always show details. When `true`, the details will
|
|
47
|
+
* always be shown, regardless of if an radio button is selected.
|
|
48
|
+
* When `false`, the details will only be shown when a radio
|
|
49
|
+
* button is selected. Defaults to `false`
|
|
50
|
+
*/
|
|
51
|
+
alwaysShowDetails?: boolean;
|
|
52
|
+
/** Optional value for `data-testid` attribute */
|
|
53
|
+
testId?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
The Narmi RadioButtons component expects an "options" Prop, which is an object where the keys are the radiobutton
|
|
57
|
+
labels and the values are the radiobutton values. An "initialvalue" Prop can be passed to set a default checked
|
|
58
|
+
radiobutton.
|
|
59
|
+
```
|
|
60
|
+
options={{
|
|
61
|
+
"First Label": { value: "firstValue", details: "This is the explanation of the firstValue" },
|
|
62
|
+
"Second Label": { value: "secondValue", details: "This is the explanation of the secondValue" }
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The other options configuration without details would be:
|
|
67
|
+
```
|
|
68
|
+
options={{ "First Label": "firstValue", "Second Label": "secondValue" }}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
*/
|
|
72
|
+
declare const RadioButtons: ({ options, name, initialValue, value, kind, onChange, testId, error, alwaysShowDetails, ...containerProps }: RadioButtonsProps) => import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
export default RadioButtons;
|
|
74
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/RadioButtons/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,KAAK,UAAU,GACX;IACE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GACD,MAAM,CAAC;AAEX,UAAU,iBAAiB;IACzB;;;;;;;;;SASK;IACL,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACpC,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,WAAW,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,CAAC;IAC5E;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;EAgBE;AACF,QAAA,MAAM,YAAY,gHAWf,iBAAiB,4CA2GnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Arrow.d.ts","sourceRoot":"","sources":["../../../src/Tabs/Arrow.tsx"],"names":[],"mappings":"AAKA,UAAU,UAAU;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,QAAA,MAAM,KAAK,iCAAkC,UAAU,4CAyBtD,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface TabsListProps {
|
|
3
|
+
/** Children must be of type `Tabs.Tab` */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* Amount of padding to apply on the x axis to indent tabs
|
|
7
|
+
* from edges of the `Tabs.Panel`
|
|
8
|
+
* */
|
|
9
|
+
xPadding?: "xxs" | "xs" | "s" | "m" | "l" | "xl" | "none";
|
|
10
|
+
}
|
|
11
|
+
declare const TabsList: ({ children, xPadding }: TabsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default TabsList;
|
|
13
|
+
//# sourceMappingURL=TabsList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabsList.d.ts","sourceRoot":"","sources":["../../../src/Tabs/TabsList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAM1E,MAAM,WAAW,aAAa;IAC5B,0CAA0C;IAC1C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;SAGK;IACL,QAAQ,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,MAAM,CAAC;CAC3D;AAED,QAAA,MAAM,QAAQ,2BAAqC,aAAa,4CAqI/D,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface TabsPanelProps {
|
|
3
|
+
/** The content of the tab panel (any node type) */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** String ID used to link the `Tabs.Panel` to a `Tabs.Tab` */
|
|
6
|
+
tabId: string;
|
|
7
|
+
/** Optional value for `data-testid` attribute */
|
|
8
|
+
testId?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const TabsPanel: ({ children, tabId, testId }: TabsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default TabsPanel;
|
|
12
|
+
//# sourceMappingURL=TabsPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabsPanel.d.ts","sourceRoot":"","sources":["../../../src/Tabs/TabsPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAGrD,MAAM,WAAW,cAAc;IAC7B,mDAAmD;IACnD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,SAAS,gCAAiC,cAAc,4CA4B7D,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface TabsTabProps {
|
|
2
|
+
/** Label of the tab button */
|
|
3
|
+
label: string;
|
|
4
|
+
/** String ID used to link the `Tabs.Tab` to a `Tabs.Panel` */
|
|
5
|
+
tabId: string;
|
|
6
|
+
/** Optional value for `data-testid` attribute */
|
|
7
|
+
testId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const TabsTab: ({ label, tabId, testId }: TabsTabProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default TabsTab;
|
|
11
|
+
//# sourceMappingURL=TabsTab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabsTab.d.ts","sourceRoot":"","sources":["../../../src/Tabs/TabsTab.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,OAAO,6BAA8B,YAAY,4CAyCtD,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface TabsContextProps {
|
|
2
|
+
tabIds: string[];
|
|
3
|
+
setTabIds: (ids: string[]) => void;
|
|
4
|
+
currentIndex: number;
|
|
5
|
+
hasPanels: boolean;
|
|
6
|
+
setHasPanels: (hasPanels: boolean) => void;
|
|
7
|
+
changeTabs: (index: string) => void;
|
|
8
|
+
tabsListRef: React.RefObject<HTMLElement>;
|
|
9
|
+
isResponsive: boolean;
|
|
10
|
+
setIsResponsive: (isResponsive: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const TabsContext: import("react").Context<TabsContextProps>;
|
|
13
|
+
export default TabsContext;
|
|
14
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/Tabs/context.ts"],"names":[],"mappings":"AAEA,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAEnC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAE3C,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAE1C,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;CAClD;AAED,QAAA,MAAM,WAAW,2CAmBf,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface TabsProps {
|
|
3
|
+
/**
|
|
4
|
+
* Direct children of `Tabs` should be one of:
|
|
5
|
+
* `Tabs.List` or `Tabs.Panel`
|
|
6
|
+
*/
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
/** Sets _default_ tab selection by index in source order */
|
|
9
|
+
defaultSelectedIndex?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Sets selected tab by index, making Tabs **fully controlled**.
|
|
12
|
+
* When using this prop, you must use the `onTabChange` callback
|
|
13
|
+
* to update the value of this prop to update the selected tab.
|
|
14
|
+
*/
|
|
15
|
+
selectedIndex?: number;
|
|
16
|
+
/** Callback invoked with the index of the tab the user is moving selection to */
|
|
17
|
+
onTabChange?: (index: number) => void;
|
|
18
|
+
/** Shows bottom border when `true` */
|
|
19
|
+
hasBorder?: boolean;
|
|
20
|
+
/** Optional value for `data-testid` attribute */
|
|
21
|
+
testId?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Component that handles tabs and tab panels based on WAI-ARIA [best practices](https://www.w3.org/TR/wai-aria-practices/#tabpanel)
|
|
25
|
+
* for the "tabs" design pattern.
|
|
26
|
+
*
|
|
27
|
+
* The `Tabs` component manages its own state, changing the visible tab panel based
|
|
28
|
+
* on user events. Use the `onTabChange` callback to add any custom behaviors.
|
|
29
|
+
*/
|
|
30
|
+
declare const Tabs: {
|
|
31
|
+
({ children, defaultSelectedIndex, selectedIndex, onTabChange, hasBorder, testId, }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
List: ({ children, xPadding }: import("./TabsList").TabsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
Tab: ({ label, tabId, testId }: import("./TabsTab").TabsTabProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
Panel: ({ children, tabId, testId }: import("./TabsPanel").TabsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
};
|
|
36
|
+
export default Tabs;
|
|
37
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Tabs/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAQ3D,UAAU,SAAS;IACjB;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,4DAA4D;IAC5D,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iFAAiF;IACjF,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,QAAA,MAAM,IAAI;yFAOP,SAAS;;;;CAoEX,CAAC;AAMF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface TooltipProps {
|
|
3
|
+
/** The root node of JSX passed into Tooltip as children will act as the tooltip trigger */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** Message shown inside the tooltip */
|
|
6
|
+
text: string;
|
|
7
|
+
/** Sets preferred side of the trigger the tooltip should appear */
|
|
8
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
9
|
+
/** CSS `display` value for the element that wraps the Tooltip children */
|
|
10
|
+
wrapperDisplay?: "inline-flex" | "inline-block" | "inline" | "block" | "flex";
|
|
11
|
+
/** Sets maximum width of tooltip. Use a full CSS value string (e.g. "300px")*/
|
|
12
|
+
maxWidth?: string;
|
|
13
|
+
/** If isOpen is set the component becomes a controlled component */
|
|
14
|
+
isOpen?: boolean;
|
|
15
|
+
/** Optional value for `data-testid` attribute */
|
|
16
|
+
testId?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Renders a text-only tooltip on hover or focus of a trigger.
|
|
20
|
+
*
|
|
21
|
+
* The tooltip will position itself based on the `side` prop, but will
|
|
22
|
+
* automatically reposition to avoid collisions with viewport edges.
|
|
23
|
+
*/
|
|
24
|
+
declare const Tooltip: ({ side, text, children, wrapperDisplay, maxWidth, testId, isOpen, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default Tooltip;
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Tooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,MAAM,WAAW,YAAY;IAC3B,2FAA2F;IAC3F,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,0EAA0E;IAC1E,cAAc,CAAC,EAAE,aAAa,GAAG,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IAC9E,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,QAAA,MAAM,OAAO,wEAQV,YAAY,4CAuEd,CAAC;AAEF,eAAe,OAAO,CAAC"}
|