@narmi/design_system 6.18.0-beta.0 → 6.18.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/docs/Formatters.md +0 -55
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/style.css.map +1 -1
- package/dist/tokens/css/rgbColors.css +9 -8
- package/dist/tokens/css/rgbColors.scss +9 -8
- package/dist/tokens/css/tokens.css +171 -204
- package/dist/tokens/css/tokens.scss +171 -204
- package/dist/tokens/js/colors.esm.js +78 -75
- package/dist/tokens/js/colors.js +104 -103
- package/dist/tokens/js/manifest.esm.js +129 -126
- package/dist/tokens/js/manifest.js +130 -123
- package/dist/tokens/js/reactNativeWeb.js +69 -62
- package/dist/tokens/json/tokens.json +61 -61
- package/dist/types/Alert/index.d.ts +1 -1
- package/dist/types/Alert/index.d.ts.map +1 -1
- package/dist/types/Checkbox/index.d.ts +1 -1
- package/dist/types/Checkbox/index.d.ts.map +1 -1
- package/dist/types/ContentCard/index.d.ts +2 -2
- package/dist/types/ContentCard/index.d.ts.map +1 -1
- package/dist/types/Count/index.d.ts +1 -1
- package/dist/types/Count/index.d.ts.map +1 -1
- package/dist/types/DisabledShim/index.d.ts +1 -1
- package/dist/types/DisabledShim/index.d.ts.map +1 -1
- package/dist/types/Error/index.d.ts +20 -0
- package/dist/types/Error/index.d.ts.map +1 -0
- 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 +21 -0
- package/dist/types/FormSection/index.d.ts.map +1 -0
- 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/LoadingSkeleton/index.d.ts +1 -1
- package/dist/types/LoadingSkeleton/index.d.ts.map +1 -1
- package/dist/types/Pagination/index.d.ts +69 -0
- package/dist/types/Pagination/index.d.ts.map +1 -0
- package/dist/types/Pagination/usePagination.d.ts +39 -0
- package/dist/types/Pagination/usePagination.d.ts.map +1 -0
- package/dist/types/ProgressBar/index.d.ts +1 -1
- package/dist/types/ProgressBar/index.d.ts.map +1 -1
- package/dist/types/Radio/index.d.ts +2 -2
- package/dist/types/Radio/index.d.ts.map +1 -1
- package/dist/types/ResponsiveFlex/index.d.ts +52 -0
- package/dist/types/ResponsiveFlex/index.d.ts.map +1 -0
- package/dist/types/SeparatorList/index.d.ts +1 -1
- package/dist/types/SeparatorList/index.d.ts.map +1 -1
- package/dist/types/Slider/index.d.ts +2 -2
- package/dist/types/Slider/index.d.ts.map +1 -1
- package/dist/types/Snackbar/index.d.ts +7 -3
- package/dist/types/Snackbar/index.d.ts.map +1 -1
- package/dist/types/TimelineEvent/index.d.ts +75 -0
- package/dist/types/TimelineEvent/index.d.ts.map +1 -0
- package/dist/types/TruncatedAccount/index.d.ts +1 -1
- package/dist/types/TruncatedAccount/index.d.ts.map +1 -1
- package/dist/types/formatters/formatDate.d.ts +17 -0
- package/dist/types/formatters/formatDate.d.ts.map +1 -0
- package/dist/types/formatters/formatNumber.d.ts +22 -0
- package/dist/types/formatters/formatNumber.d.ts.map +1 -0
- package/dist/types/hooks/useLockBodyScroll/index.d.ts +7 -0
- package/dist/types/hooks/useLockBodyScroll/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +81 -12
- 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 +4 -4
- package/dist/types/Field/FauxInput/index.d.ts +0 -20
- package/dist/types/Field/FauxInput/index.d.ts.map +0 -1
- package/dist/types/Field/Select/SelectItem.d.ts +0 -15
- package/dist/types/Field/Select/SelectItem.d.ts.map +0 -1
- package/dist/types/Field/Select/index.d.ts +0 -24
- package/dist/types/Field/Select/index.d.ts.map +0 -1
- package/dist/types/Field/Text/index.d.ts +0 -14
- package/dist/types/Field/Text/index.d.ts.map +0 -1
- package/dist/types/Table/util/pinning.d.ts +0 -7
- package/dist/types/Table/util/pinning.d.ts.map +0 -1
|
@@ -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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/TruncatedAccount/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/TruncatedAccount/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,qBAAqB;IACpC,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,QAAA,MAAM,gBAAgB,GAAI,+BAIvB,qBAAqB,sBAkBvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wrapper for `Intl.DateTimeFormat` with options configured for Narmi applications.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* import { formatDate } from '@narmi/design_system';
|
|
6
|
+
*
|
|
7
|
+
* formatDate(new Date('July 4, 2022'), 'short'); // '7/4/22'
|
|
8
|
+
* formatDate(new Date('7/4/2022'), 'long'); // 'July 4, 2022'
|
|
9
|
+
*
|
|
10
|
+
* @param date native date object
|
|
11
|
+
* @param style formatting style (`short` or `long`)
|
|
12
|
+
* @returns date string formatted for display
|
|
13
|
+
*/
|
|
14
|
+
export type FormatDateStyle = "short" | "long";
|
|
15
|
+
declare const formatDate: (date: Date, style?: FormatDateStyle) => string;
|
|
16
|
+
export default formatDate;
|
|
17
|
+
//# sourceMappingURL=formatDate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatDate.d.ts","sourceRoot":"","sources":["../../../src/formatters/formatDate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,CAAC;AAE/C,QAAA,MAAM,UAAU,GAAI,MAAM,IAAI,EAAE,QAAO,eAAyB,KAAG,MAelE,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wrapper for `Intl.NumberFormat` with options configured for Narmi applications.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* import { formatNumber } from '@narmi/design_system';
|
|
6
|
+
*
|
|
7
|
+
* formatNumber(1234.56, 'currency'); // '$1,234.56'
|
|
8
|
+
* formatNumber(34.4, 'currency'); // '$34.40'
|
|
9
|
+
* formatNumber(-12, 'currency'); // '-$12.00'
|
|
10
|
+
* formatNumber('0.0342', 'percent'); // '3.42%'
|
|
11
|
+
* formatNumber(0.0023, 'percent'); // '0.23%'
|
|
12
|
+
* formatNumber(0.215555, 'percent'); // '21.56%'
|
|
13
|
+
*
|
|
14
|
+
* @param input string or number to format into a number string
|
|
15
|
+
* @param style format style (`currency` or `percent`)
|
|
16
|
+
* @returns number string formatted for display
|
|
17
|
+
*/
|
|
18
|
+
export type FormatNumberStyle = "currency" | "percent";
|
|
19
|
+
export type FormatNumberSignDisplay = "auto" | "never" | "always" | "exceptZero";
|
|
20
|
+
declare const formatNumber: (input: string | number, style?: FormatNumberStyle, signDisplay?: FormatNumberSignDisplay, showCents?: boolean) => string;
|
|
21
|
+
export default formatNumber;
|
|
22
|
+
//# sourceMappingURL=formatNumber.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatNumber.d.ts","sourceRoot":"","sources":["../../../src/formatters/formatNumber.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,SAAS,CAAC;AACvD,MAAM,MAAM,uBAAuB,GAC/B,MAAM,GACN,OAAO,GACP,QAAQ,GACR,YAAY,CAAC;AAEjB,QAAA,MAAM,YAAY,GAChB,OAAO,MAAM,GAAG,MAAM,EACtB,QAAO,iBAA8B,EACrC,cAAa,uBAAgC,EAC7C,YAAW,OAAc,KACxB,MA+CF,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for locking body scrolling while a component is mounted
|
|
3
|
+
* @param isActive - applies scroll locking when `true`
|
|
4
|
+
*/
|
|
5
|
+
declare const useLockBodyScroll: (isActive: boolean) => void;
|
|
6
|
+
export default useLockBodyScroll;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useLockBodyScroll/index.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,QAAA,MAAM,iBAAiB,GAAI,UAAU,OAAO,KAAG,IAS9C,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -12,10 +12,17 @@ import { default as ContextMenu } from './ContextMenu';
|
|
|
12
12
|
import { default as Count } from './Count';
|
|
13
13
|
import { default as Dialog } from './Dialog';
|
|
14
14
|
import { default as DisabledShim } from './DisabledShim';
|
|
15
|
+
import { default as Error } from './Error';
|
|
16
|
+
import { default as DropdownTrigger } from './DropdownTrigger';
|
|
15
17
|
import { default as Field } from './Field';
|
|
18
|
+
import { default as FieldToken } from './FieldToken';
|
|
19
|
+
import { default as FormSection } from './FormSection';
|
|
20
|
+
import { default as IconButton } from './IconButton';
|
|
21
|
+
import { default as Pagination } from './Pagination';
|
|
16
22
|
import { default as ProgressBar } from './ProgressBar';
|
|
17
23
|
import { default as Radio } from './Radio';
|
|
18
24
|
import { default as RadioButtons } from './RadioButtons';
|
|
25
|
+
import { default as ResponsiveFlex } from './ResponsiveFlex';
|
|
19
26
|
import { default as Row } from './Row';
|
|
20
27
|
import { default as SeparatorList } from './SeparatorList';
|
|
21
28
|
import { default as Slider } from './Slider';
|
|
@@ -23,17 +30,22 @@ import { default as Snackbar } from './Snackbar';
|
|
|
23
30
|
import { default as Spinner } from './Spinner';
|
|
24
31
|
import { default as SplitButton } from './SplitButton';
|
|
25
32
|
import { default as LoadingSkeleton } from './LoadingSkeleton';
|
|
33
|
+
import { default as LoadingShim } from './LoadingShim';
|
|
26
34
|
import { default as Table } from './Table';
|
|
27
35
|
import { default as TableAutocomplete } from './TableAutocomplete';
|
|
28
36
|
import { default as TableDateInput } from './TableDateInput';
|
|
29
37
|
import { default as TableInput } from './TableInput';
|
|
30
38
|
import { default as TableSelect } from './TableSelect';
|
|
31
39
|
import { default as Tabs } from './Tabs';
|
|
40
|
+
import { default as TimelineEvent } from './TimelineEvent';
|
|
32
41
|
import { default as Tooltip } from './Tooltip';
|
|
33
42
|
import { default as TruncatedAccount } from './TruncatedAccount';
|
|
34
43
|
import { default as useSupportsAnchorPositioning } from './hooks/useSupportsAnchorPositioning';
|
|
35
44
|
import { default as useBreakpoints } from './hooks/useBreakpoints';
|
|
36
45
|
import { default as useDropdownLayer } from './hooks/useDropdownLayer';
|
|
46
|
+
import { default as formatDate } from './formatters/formatDate';
|
|
47
|
+
import { default as useLockBodyScroll } from './hooks/useLockBodyScroll';
|
|
48
|
+
import { default as formatNumber } from './formatters/formatNumber';
|
|
37
49
|
/**
|
|
38
50
|
* Untyped Components
|
|
39
51
|
*/
|
|
@@ -41,28 +53,85 @@ declare const CollapsibleCard: any;
|
|
|
41
53
|
declare const Combobox: any;
|
|
42
54
|
declare const DateInput: any;
|
|
43
55
|
declare const Drawer: any;
|
|
44
|
-
declare const DropdownTrigger: any;
|
|
45
|
-
declare const Error: any;
|
|
46
|
-
declare const FieldToken: any;
|
|
47
|
-
declare const FormSection: any;
|
|
48
|
-
declare const IconButton: any;
|
|
49
56
|
declare const Input: any;
|
|
50
|
-
declare const LoadingShim: any;
|
|
51
57
|
declare const MenuButton: any;
|
|
52
58
|
declare const MultiSelect: any;
|
|
53
|
-
declare const Pagination: any;
|
|
54
59
|
declare const Popover: any;
|
|
55
|
-
declare const ResponsiveFlex: any;
|
|
56
60
|
declare const Select: any;
|
|
57
61
|
declare const Sidebar: any;
|
|
58
62
|
declare const Tag: any;
|
|
59
63
|
declare const TextInput: any;
|
|
60
|
-
declare const TimelineEvent: any;
|
|
61
64
|
declare const Toggle: any;
|
|
62
65
|
declare const TokenInput: any;
|
|
63
|
-
declare const useLockBodyScroll: any;
|
|
64
|
-
declare const formatNumber: any;
|
|
65
|
-
declare const formatDate: any;
|
|
66
66
|
export * from './types/Icon.types';
|
|
67
|
+
/**
|
|
68
|
+
* Public types
|
|
69
|
+
*
|
|
70
|
+
* Prop types for every exported component, so consumers can name them when
|
|
71
|
+
* writing wrappers. `export type` is required here: `isolatedModules` is on.
|
|
72
|
+
*
|
|
73
|
+
* Components still in the untyped block above have no prop types to export
|
|
74
|
+
* yet; they land as each is converted.
|
|
75
|
+
*/
|
|
76
|
+
export type { AccordionProps } from './Accordion';
|
|
77
|
+
export type { AccordionSetProps } from './AccordionSet';
|
|
78
|
+
export type { AlertProps } from './Alert';
|
|
79
|
+
export type { AnchoredDialogProps } from './AnchoredDialog';
|
|
80
|
+
export type { AutocompleteModalProps } from './AutocompleteModal';
|
|
81
|
+
export type { AutoCompleteProps, AutoCompleteItem, } from './AutocompleteModal/AutoComplete';
|
|
82
|
+
export type { AvatarProps } from './Avatar';
|
|
83
|
+
export type { ButtonProps, ButtonKind } from './Button';
|
|
84
|
+
export type { CheckboxProps } from './Checkbox';
|
|
85
|
+
export type { ChipProps } from './Chip';
|
|
86
|
+
export type { ContentCardProps } from './ContentCard';
|
|
87
|
+
export type { ContextMenuProps } from './ContextMenu';
|
|
88
|
+
export type { ContextMenuItemProps } from './ContextMenu/ContextMenuItem';
|
|
89
|
+
export type { CountProps } from './Count';
|
|
90
|
+
export type { DialogProps } from './Dialog';
|
|
91
|
+
export type { DisabledShimProps } from './DisabledShim';
|
|
92
|
+
export type { DropdownTriggerProps } from './DropdownTrigger';
|
|
93
|
+
export type { ErrorProps } from './Error';
|
|
94
|
+
export type { FieldProps } from './Field/types';
|
|
95
|
+
export type { FieldTextProps } from './Field/Text';
|
|
96
|
+
export type { FieldMaskName } from './Field/masks';
|
|
97
|
+
export type { FieldTokenProps } from './FieldToken';
|
|
98
|
+
export type { FormSectionProps } from './FormSection';
|
|
99
|
+
export type { IconButtonProps, IconButtonKind } from './IconButton';
|
|
100
|
+
export type { LoadingShimProps } from './LoadingShim';
|
|
101
|
+
export type { LoadingSkeletonProps } from './LoadingSkeleton';
|
|
102
|
+
export type { PaginationProps } from './Pagination';
|
|
103
|
+
export type { ProgressBarProps } from './ProgressBar';
|
|
104
|
+
export type { RadioProps, RadioKind } from './Radio';
|
|
105
|
+
export type { RadioButtonsProps, RadioButtonsKind, RadioButtonsLayouts, } from './RadioButtons';
|
|
106
|
+
export type { ResponsiveFlexProps, ResponsiveFlexSize, ResponsiveFlexGap, ResponsiveFlexDirection, } from './ResponsiveFlex';
|
|
107
|
+
export type { RowProps } from './Row';
|
|
108
|
+
export type { RowItemProps } from './Row/RowItem';
|
|
109
|
+
export type { SeparatorListProps } from './SeparatorList';
|
|
110
|
+
export type { SliderProps } from './Slider';
|
|
111
|
+
export type { SnackbarProps } from './Snackbar';
|
|
112
|
+
export type { SpinnerProps } from './Spinner';
|
|
113
|
+
export type { SplitButtonMenuProps } from './SplitButton/SplitButtonMenu';
|
|
114
|
+
export type { SplitButtonPopoverProps } from './SplitButton/SplitButtonPopover';
|
|
115
|
+
export type { TableProps, ColLayoutConfig } from './Table';
|
|
116
|
+
export type { CellProps as TableCellProps } from './Table/Cell';
|
|
117
|
+
export type { HeaderCellProps as TableHeaderCellProps } from './Table/HeaderCell';
|
|
118
|
+
export type { TableRowProps } from './Table/Row';
|
|
119
|
+
export type { TableAutocompleteProps, TableAutocompleteItem, } from './TableAutocomplete';
|
|
120
|
+
export type { TableAutocompleteItemProps } from './TableAutocomplete/Item';
|
|
121
|
+
export type { TableDateInputProps } from './TableDateInput';
|
|
122
|
+
export type { TableInputProps } from './TableInput';
|
|
123
|
+
export type { TableSelectProps, TableSelectItem } from './TableSelect';
|
|
124
|
+
export type { TableSelectItemProps } from './TableSelect/Item';
|
|
125
|
+
export type { TabsKind } from './Tabs/context';
|
|
126
|
+
export type { TabsListProps } from './Tabs/TabsList';
|
|
127
|
+
export type { TabsPanelProps } from './Tabs/TabsPanel';
|
|
128
|
+
export type { TabsTabProps } from './Tabs/TabsTab';
|
|
129
|
+
export type { TimelineEventProps, TimelineEventKind } from './TimelineEvent';
|
|
130
|
+
export type { TooltipProps } from './Tooltip';
|
|
131
|
+
export type { TruncatedAccountProps } from './TruncatedAccount';
|
|
132
|
+
export type { UseBreakpointsResult } from './hooks/useBreakpoints';
|
|
133
|
+
export type { UseDropdownLayerResult, UseDropdownLayerOptions, } from './hooks/useDropdownLayer';
|
|
134
|
+
export type { FormatDateStyle } from './formatters/formatDate';
|
|
135
|
+
export type { FormatNumberStyle, FormatNumberSignDisplay, } from './formatters/formatNumber';
|
|
67
136
|
export { Accordion, AccordionSet, AutocompleteModal, Avatar, Button, Checkbox, Chip, ContentCard, ContextMenu, Count, DisabledShim, Radio, RadioButtons, Row, SeparatorList, Slider, Snackbar, Alert, AnchoredDialog, CollapsibleCard, Combobox, DateInput, Dialog, Drawer, DropdownTrigger, Error, Field, FieldToken, FormSection, IconButton, Input, LoadingShim, LoadingSkeleton, MenuButton, MultiSelect, Pagination, ProgressBar, Popover, ResponsiveFlex, Select, Sidebar, Spinner, SplitButton, Table, TableAutocomplete, TableDateInput, TableInput, TableSelect, Tabs, Tag, TextInput, TimelineEvent, Toggle, TokenInput, Tooltip, TruncatedAccount, useBreakpoints, useDropdownLayer, useLockBodyScroll, useSupportsAnchorPositioning, formatNumber, formatDate, };
|
|
68
137
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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,M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
|
@@ -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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narmi/design_system",
|
|
3
|
-
"version": "6.18.0
|
|
3
|
+
"version": "6.18.0",
|
|
4
4
|
"description": "⚡ A consistent look-and-feel and extensible interface for Narmi experiences 🔥",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"style": "dist/style.css",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"build:types": "node ./scripts/buildTypes.mjs",
|
|
22
22
|
"build:jsdoc": "node ./scripts/jsDoc.mjs",
|
|
23
23
|
"build:classdoc": "node ./scripts/classManifest.mjs",
|
|
24
|
-
"build:tokens": "
|
|
24
|
+
"build:tokens": "style-dictionary build --config=./tokens/config.js",
|
|
25
25
|
"build:css": "sass src/index.scss dist/style.css --style=compressed --source-map",
|
|
26
26
|
"build:components": "vite build && node ./scripts/copyAssets.mjs",
|
|
27
27
|
"build": "npm run build:icon-names && npm run build:tokens && npx tsc && npm run build:css && npm run build:jsdoc && npm run build:components && npm run build:classdoc",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"test": "vitest run",
|
|
31
31
|
"test:watch": "vitest",
|
|
32
32
|
"lint": "eslint \"./src/**\" \"./scripts/**\" \"./tokens/**\" --no-error-on-unmatched-pattern",
|
|
33
|
+
"typecheck": "tsc -p tsconfig.check.json",
|
|
33
34
|
"release": "semantic-release",
|
|
34
35
|
"storybook": "storybook dev -p 6006",
|
|
35
36
|
"build-storybook": "storybook build --stats-json",
|
|
@@ -99,9 +100,8 @@
|
|
|
99
100
|
"sass": "^1.45.0",
|
|
100
101
|
"semantic-release": "^25.0.3",
|
|
101
102
|
"storybook": "^10.4.5",
|
|
102
|
-
"style-dictionary": "^
|
|
103
|
+
"style-dictionary": "^3.9.2",
|
|
103
104
|
"tinycolor2": "^1.4.2",
|
|
104
|
-
"tsx": "^4.23.1",
|
|
105
105
|
"typescript": "^5.2.2",
|
|
106
106
|
"use-clipboard-copy": "^0.2.0",
|
|
107
107
|
"vite": "^8.0.16",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface FauxInputProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
/** When true, renders active (focused) border styling */
|
|
5
|
-
isActive?: boolean;
|
|
6
|
-
isDisabled?: boolean;
|
|
7
|
-
hasError?: boolean;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Internal presentational component.
|
|
12
|
-
* Renders a `<button>` styled to look like `.nds-field-input-box`.
|
|
13
|
-
* Used by Field.Select (and future dropdown-based Field variants)
|
|
14
|
-
* as the anchor/trigger element.
|
|
15
|
-
*
|
|
16
|
-
* Accepts arbitrary props (e.g. from downshift's getToggleButtonProps)
|
|
17
|
-
* which are spread onto the underlying `<button>`.
|
|
18
|
-
*/
|
|
19
|
-
export declare const FauxInput: React.ForwardRefExoticComponent<Omit<FauxInputProps & Record<string, any>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Field/FauxInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,6HAiCrB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface FieldSelectItemProps {
|
|
3
|
-
/** The value submitted when this item is selected */
|
|
4
|
-
value: string;
|
|
5
|
-
/** Display content for the option */
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Compound child for Field.Select.
|
|
10
|
-
* Renders its children directly — all positioning and interaction
|
|
11
|
-
* is handled by the parent FieldSelect via downshift.
|
|
12
|
-
*/
|
|
13
|
-
declare const FieldSelectItem: React.FC<FieldSelectItemProps>;
|
|
14
|
-
export default FieldSelectItem;
|
|
15
|
-
//# sourceMappingURL=SelectItem.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectItem.d.ts","sourceRoot":"","sources":["../../../../src/Field/Select/SelectItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,oBAAoB;IACnC,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;GAIG;AACH,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAEnD,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { FieldProps } from '../types';
|
|
3
|
-
import { FieldSelectItemProps } from './SelectItem';
|
|
4
|
-
export interface FieldSelectProps extends Pick<FieldProps, "id" | "label" | "errors" | "isDisabled"> {
|
|
5
|
-
/** Currently selected value (controlled) */
|
|
6
|
-
value: string;
|
|
7
|
-
/** Called with the new value when selection changes */
|
|
8
|
-
onChange: (value: string) => void;
|
|
9
|
-
/** Placeholder text when no value is selected */
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
/** Field.Select.Item elements */
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Field.Select renders a dropdown select styled consistently with Field.Text.
|
|
16
|
-
* It uses downshift's `useSelect` for keyboard navigation and ARIA,
|
|
17
|
-
* and `useDropdownLayer` for dropdown positioning.
|
|
18
|
-
*/
|
|
19
|
-
export declare const FieldSelect: {
|
|
20
|
-
({ label, id, value, onChange, placeholder, errors, isDisabled, children, }: FieldSelectProps): React.JSX.Element;
|
|
21
|
-
displayName: string;
|
|
22
|
-
Item: React.FC<FieldSelectItemProps>;
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Field/Select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AASpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC5C,UAAU,EACV,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,YAAY,CACzC;IACC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AASD;;;;GAIG;AACH,eAAO,MAAM,WAAW;iFASrB,gBAAgB;;;CA4GlB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { MaskitoOptions } from '@maskito/core';
|
|
3
|
-
import { FieldProps } from '../types';
|
|
4
|
-
export interface FieldTextProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "id" | "disabled" | "aria-invalid" | "aria-describedby">, FieldProps {
|
|
5
|
-
value: string;
|
|
6
|
-
onChange: (value: string) => void;
|
|
7
|
-
mask?: MaskitoOptions;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Field.Text renders a decorative shell containing a native text input.
|
|
11
|
-
* It automatically handles ARIA orchestration and optional input masking.
|
|
12
|
-
*/
|
|
13
|
-
export declare const FieldText: React.ForwardRefExoticComponent<FieldTextProps & React.RefAttributes<HTMLInputElement>>;
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Field/Text/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AASlD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,cACf,SACE,IAAI,CACF,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EACzC,UAAU,GACV,OAAO,GACP,IAAI,GACJ,UAAU,GACV,cAAc,GACd,kBAAkB,CACrB,EACD,UAAU;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,yFA0GrB,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ColVisibilityContextProps } from './colVisibilityContext';
|
|
2
|
-
export type PinStatus = "start" | "end" | undefined;
|
|
3
|
-
/**
|
|
4
|
-
* Determines if a cell at a given column index is pinned.
|
|
5
|
-
*/
|
|
6
|
-
export declare function getPinStatus(colIndex: number, ctx: ColVisibilityContextProps): PinStatus;
|
|
7
|
-
//# sourceMappingURL=pinning.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pinning.d.ts","sourceRoot":"","sources":["../../../../src/Table/util/pinning.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;AAEpD;;GAEG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,yBAAyB,GAC7B,SAAS,CAMX"}
|