@ndlib/component-library 1.0.45 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/composites/Card/Card.stories.js +7 -7
- package/dist/components/composites/Card/Card.test.js +1 -1
- package/dist/components/composites/Card/index.js +10 -10
- package/dist/components/composites/CardV2/CardV2.stories.js +14 -14
- package/dist/components/composites/CardV2/CardV2.test.js +1 -1
- package/dist/components/composites/CardV2/index.js +11 -11
- package/dist/components/composites/DragDropList/DragDrop.test.js +1 -1
- package/dist/components/composites/DragDropList/DragDropList.stories.d.ts +2 -3
- package/dist/components/composites/DragDropList/DragDropList.stories.js +2 -2
- package/dist/components/composites/DragDropList/index.d.ts +1 -2
- package/dist/components/composites/DragDropList/index.js +5 -5
- package/dist/components/composites/DropdownLinks/DropdownLinks.stories.js +3 -3
- package/dist/components/composites/DropdownLinks/DropdownLinks.test.js +1 -1
- package/dist/components/composites/DropdownLinks/index.js +2 -2
- package/dist/components/composites/DropdownLinksV2/DropdownLinksV2.stories.js +3 -3
- package/dist/components/composites/DropdownLinksV2/index.js +2 -2
- package/dist/components/composites/EmptyState/EmptyState.stories.js +1 -1
- package/dist/components/composites/EmptyState/index.js +2 -2
- package/dist/components/composites/EmptyStateV2/EmptyStateV2.module.css +10 -0
- package/dist/components/composites/EmptyStateV2/EmptyStateV2.stories.d.ts +10 -0
- package/dist/components/composites/EmptyStateV2/EmptyStateV2.stories.js +33 -0
- package/dist/components/composites/EmptyStateV2/index.d.ts +15 -0
- package/dist/components/composites/EmptyStateV2/index.js +36 -0
- package/dist/components/composites/Modal/Modal.stories.js +2 -2
- package/dist/components/composites/Modal/Modal.test.js +4 -4
- package/dist/components/composites/Modal/index.js +5 -5
- package/dist/components/composites/ModalV2/ModalV2.stories.js +2 -2
- package/dist/components/composites/ModalV2/ModalV2.test.js +4 -4
- package/dist/components/composites/ModalV2/index.js +5 -5
- package/dist/components/composites/NavMenu/demo.js +1 -1
- package/dist/components/composites/NavMenu/index.js +6 -6
- package/dist/components/composites/NavMenuV2/demoV2.js +2 -2
- package/dist/components/composites/NavMenuV2/index.js +3 -3
- package/dist/components/composites/Seo/SeoDataDisplay/index.js +1 -1
- package/dist/components/composites/Seo/index.js +1 -1
- package/dist/components/composites/SnackBar/examples.js +7 -7
- package/dist/components/composites/SnackBar/index.js +4 -4
- package/dist/components/composites/StructuredData/index.d.ts +0 -1
- package/dist/components/composites/StructuredData/index.js +1 -1
- package/dist/components/elements/Alerts/Alerts.stories.js +2 -2
- package/dist/components/elements/Alerts/index.js +2 -2
- package/dist/components/elements/AlertsV2/AlertsV2.stories.js +2 -2
- package/dist/components/elements/AlertsV2/index.js +1 -1
- package/dist/components/elements/ArrowLink/ArrowLink.stories.js +1 -1
- package/dist/components/elements/ArrowLink/ArrowLink.test.js +5 -5
- package/dist/components/elements/ArrowLink/index.d.ts +0 -1
- package/dist/components/elements/ArrowLink/index.js +3 -3
- package/dist/components/elements/ArrowLinkV2/ArrowLinkV2.stories.js +1 -1
- package/dist/components/elements/ArrowLinkV2/index.d.ts +0 -1
- package/dist/components/elements/ArrowLinkV2/index.js +1 -1
- package/dist/components/elements/AutoComplete/AutoComplete.stories.js +1 -1
- package/dist/components/elements/BoxV2/BoxV2.stories.js +1 -1
- package/dist/components/elements/BoxV2/index.d.ts +2 -2
- package/dist/components/elements/BrandingBar/index.d.ts +0 -1
- package/dist/components/elements/BrandingBar/index.js +4 -4
- package/dist/components/elements/BrandingBarV2/index.js +1 -1
- package/dist/components/elements/Button/Button.stories.js +9 -9
- package/dist/components/elements/Button/Button.test.js +1 -1
- package/dist/components/elements/Button/index.d.ts +14 -14
- package/dist/components/elements/Button/index.js +4 -4
- package/dist/components/elements/ButtonV2/ButtonV2.stories.js +9 -9
- package/dist/components/elements/ButtonV2/ButtonV2.test.js +1 -1
- package/dist/components/elements/ButtonV2/index.d.ts +15 -15
- package/dist/components/elements/ButtonV2/index.js +2 -2
- package/dist/components/elements/CheckboxGroup/index.js +2 -2
- package/dist/components/elements/CheckboxGroupV2/index.js +2 -2
- package/dist/components/elements/ColumnV2/index.d.ts +2 -2
- package/dist/components/elements/ColumnV2/index.js +1 -1
- package/dist/components/elements/ConsentBanner/ConsentBanner.stories.js +1 -1
- package/dist/components/elements/ConsentBanner/index.js +4 -4
- package/dist/components/elements/DatePicker/DatePicker.stories.js +3 -3
- package/dist/components/elements/DatePicker/index.d.ts +3 -3
- package/dist/components/elements/DatePickerV2/DatePickerV2.stories.js +3 -3
- package/dist/components/elements/DatePickerV2/index.d.ts +3 -3
- package/dist/components/elements/Dropdown/Dropdown.stories.js +3 -3
- package/dist/components/elements/Dropdown/index.js +2 -2
- package/dist/components/elements/DropdownV2/DropdownV2.stories.js +3 -3
- package/dist/components/elements/DropdownV2/index.js +2 -2
- package/dist/components/elements/Group/index.js +1 -1
- package/dist/components/elements/GroupV2/index.js +1 -1
- package/dist/components/elements/Heading/Heading.stories.js +3 -3
- package/dist/components/elements/Heading/Heading.test.js +2 -2
- package/dist/components/elements/HeadingV2/HeadingV2.stories.js +3 -3
- package/dist/components/elements/HeadingV2/HeadingV2.test.js +2 -2
- package/dist/components/elements/Icon/Icon.stories.js +1 -1
- package/dist/components/elements/IconV2/IconV2.stories.js +1 -1
- package/dist/components/elements/Label/Label.stories.js +1 -1
- package/dist/components/elements/Label/Label.test.js +5 -5
- package/dist/components/elements/LabelV2/LabelV2.stories.js +1 -1
- package/dist/components/elements/LabelV2/LabelV2.test.js +5 -5
- package/dist/components/elements/Link/Link.stories.js +1 -1
- package/dist/components/elements/Link/Link.test.js +7 -7
- package/dist/components/elements/List/List.stories.js +5 -5
- package/dist/components/elements/List/List.test.js +2 -2
- package/dist/components/elements/List/index.js +5 -5
- package/dist/components/elements/ListBox/index.d.ts +2 -17
- package/dist/components/elements/ListBox/index.js +3 -3
- package/dist/components/elements/ListBoxV2/index.d.ts +2 -18
- package/dist/components/elements/ListBoxV2/index.js +2 -2
- package/dist/components/elements/ListV2/ListV2.stories.js +5 -5
- package/dist/components/elements/ListV2/index.js +5 -5
- package/dist/components/elements/Markdown/index.d.ts +0 -1
- package/dist/components/elements/Markdown/index.js +2 -2
- package/dist/components/elements/MarkdownV2/index.d.ts +0 -1
- package/dist/components/elements/MarkdownV2/index.js +2 -2
- package/dist/components/elements/MonthPicker/MonthPicker.stories.js +2 -2
- package/dist/components/elements/MonthPickerV2/MonthPickerV2.stories.js +2 -2
- package/dist/components/elements/Paragraph/Paragraph.stories.js +2 -2
- package/dist/components/elements/ParagraphV2/ParagraphV2.stories.js +2 -2
- package/dist/components/elements/Pill/Pill.stories.js +3 -3
- package/dist/components/elements/Pill/index.d.ts +6 -6
- package/dist/components/elements/Pill/index.js +2 -2
- package/dist/components/elements/PillV2/PillV2.stories.js +3 -3
- package/dist/components/elements/PillV2/index.d.ts +6 -6
- package/dist/components/elements/PillV2/index.js +1 -1
- package/dist/components/elements/RadioGroup/index.js +2 -2
- package/dist/components/elements/RadioGroupV2/index.js +2 -2
- package/dist/components/elements/RawHtml/index.d.ts +0 -1
- package/dist/components/elements/ReadMore/ReadMore.stories.js +4 -4
- package/dist/components/elements/ReadMore/index.js +3 -3
- package/dist/components/elements/ReadMoreV2/ReadMoreV2.stories.js +4 -4
- package/dist/components/elements/ReadMoreV2/index.js +3 -3
- package/dist/components/elements/RowV2/index.d.ts +4 -4
- package/dist/components/elements/RowV2/index.js +1 -1
- package/dist/components/elements/Select/Select.stories.js +3 -3
- package/dist/components/elements/Select/index.js +7 -7
- package/dist/components/elements/SelectV2/SelectV2.stories.js +3 -3
- package/dist/components/elements/SelectV2/index.js +4 -4
- package/dist/components/elements/Spinner/Spinner.stories.js +1 -1
- package/dist/components/elements/Spinner/index.d.ts +0 -1
- package/dist/components/elements/SpinnerV2/SpinnerV2.stories.js +1 -1
- package/dist/components/elements/SpinnerV2/index.d.ts +0 -1
- package/dist/components/elements/TabList/example.js +2 -2
- package/dist/components/elements/TabList/index.js +2 -2
- package/dist/components/elements/TabListV2/example.js +2 -2
- package/dist/components/elements/TabListV2/index.js +2 -2
- package/dist/components/elements/Table/Table.stories.js +18 -18
- package/dist/components/elements/Table/Table.test.js +1 -1
- package/dist/components/elements/Table/index.d.ts +0 -1
- package/dist/components/elements/Table/index.js +8 -8
- package/dist/components/elements/TextInput/TextInput.stories.js +4 -4
- package/dist/components/elements/TextInput/TextInput.test.js +2 -2
- package/dist/components/elements/TextInput/index.d.ts +10 -10
- package/dist/components/elements/TextInput/index.js +7 -7
- package/dist/components/elements/TextInputV2/TextInputV2.stories.js +4 -4
- package/dist/components/elements/TextInputV2/TextInputV2.test.js +1 -1
- package/dist/components/elements/TextInputV2/index.d.ts +11 -11
- package/dist/components/elements/TextInputV2/index.js +4 -4
- package/dist/components/elements/layout/Box.d.ts +2 -2
- package/dist/components/elements/layout/Box.stories.js +1 -1
- package/dist/components/elements/layout/Column.d.ts +2 -2
- package/dist/components/elements/layout/Column.js +1 -1
- package/dist/components/elements/layout/Flex.stories.js +4 -4
- package/dist/components/elements/layout/Flex.test.js +2 -2
- package/dist/components/elements/layout/Row.d.ts +3 -3
- package/dist/components/elements/layout/Row.js +1 -1
- package/dist/components/elements/option.d.ts +0 -1
- package/dist/components/providers/alerts.js +1 -1
- package/dist/components/providers/componentConfig.js +1 -1
- package/dist/components/providers/componentConfigV2.js +1 -1
- package/dist/components/providers/dialogs.js +2 -2
- package/dist/components/providers/env.js +2 -2
- package/dist/components/providers/media.js +2 -2
- package/dist/components/providers/mediaV2.js +2 -2
- package/dist/components/providers/menu.js +1 -1
- package/dist/components/providers/snackBar.d.ts +0 -1
- package/dist/components/providers/snackBar.js +2 -2
- package/dist/components/providers/ui.js +1 -1
- package/dist/components/providers/uiV2.js +1 -1
- package/dist/components/providers/uniqueIds.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/theme/Color.stories.js +1 -1
- package/dist/theme/Typography.stories.js +1 -1
- package/dist/theme/colors.d.ts +2 -2
- package/dist/theme/colors.js +4 -2
- package/dist/theme/css-variables.css +2 -2
- package/dist/theme/index.d.ts +7 -90
- package/dist/theme/index.js +2 -2
- package/dist/theme/typography.d.ts +1 -1
- package/dist/utils/test.js +2 -2
- package/package.json +5 -5
|
@@ -11,6 +11,6 @@ import StructuredData from '../composites/StructuredData';
|
|
|
11
11
|
import { SnackBarProvider } from './snackBar';
|
|
12
12
|
import { UniqueIdProvider } from './uniqueIds';
|
|
13
13
|
export const UiProviderV2 = ({ structuredData, env, components, alertsConfig, children, includeTheme = true, loadFonts, loadGlobalStyles, useHydrationPatch, ssrBreakpoint, }) => {
|
|
14
|
-
const core = (_jsxs(EnvironmentProvider,
|
|
14
|
+
const core = (_jsxs(EnvironmentProvider, { env: env, children: [_jsx(MediaSizeProviderV2, { ssrBreakpoint: ssrBreakpoint, useHydrationPatch: useHydrationPatch, children: _jsx(ComponentConfigProviderV2, { config: components || {}, children: _jsx(UniqueIdProvider, { children: _jsx(SnackBarProvider, { children: _jsx(DialogsProvider, { children: _jsx(AlertsProvider, Object.assign({}, alertsConfig, { children: children })) }) }) }) }) }), loadGlobalStyles && _jsx(GlobalStylesV2, {}), loadFonts && _jsx(FontLoader, {}), structuredData && _jsx(StructuredData, Object.assign({}, structuredData))] }));
|
|
15
15
|
return includeTheme ? _jsx(ThemeProviderV2, { children: core }) : core;
|
|
16
16
|
};
|
|
@@ -3,7 +3,7 @@ import { createContext, useContext, useMemo, useRef } from 'react';
|
|
|
3
3
|
const UniqueIdContext = createContext({});
|
|
4
4
|
export const UniqueIdProvider = ({ children, }) => {
|
|
5
5
|
const countIndexRef = useRef({});
|
|
6
|
-
return (_jsx(UniqueIdContext.Provider,
|
|
6
|
+
return (_jsx(UniqueIdContext.Provider, { value: countIndexRef.current, children: children }));
|
|
7
7
|
};
|
|
8
8
|
export const useUniqueId = (prefix) => {
|
|
9
9
|
const countIndex = useContext(UniqueIdContext);
|
package/dist/index.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ export { SnackBar } from './components/composites/SnackBar';
|
|
|
69
69
|
export { NavMenu } from './components/composites/NavMenu';
|
|
70
70
|
export { NavMenuV2 } from './components/composites/NavMenuV2';
|
|
71
71
|
export { EmptyState, EMPTY_STATE_SIZE, } from './components/composites/EmptyState';
|
|
72
|
+
export { EmptyStateV2, EMPTY_STATEV2_SIZE, } from './components/composites/EmptyStateV2';
|
|
72
73
|
export { DropdownLinks } from './components/composites/DropdownLinks';
|
|
73
74
|
export { DropdownLinksV2 } from './components/composites/DropdownLinksV2';
|
|
74
75
|
export { Modal } from './components/composites/Modal';
|
package/dist/index.js
CHANGED
|
@@ -68,6 +68,7 @@ export { SnackBar } from './components/composites/SnackBar';
|
|
|
68
68
|
export { NavMenu } from './components/composites/NavMenu';
|
|
69
69
|
export { NavMenuV2 } from './components/composites/NavMenuV2';
|
|
70
70
|
export { EmptyState, EMPTY_STATE_SIZE, } from './components/composites/EmptyState';
|
|
71
|
+
export { EmptyStateV2, EMPTY_STATEV2_SIZE, } from './components/composites/EmptyStateV2';
|
|
71
72
|
export { DropdownLinks } from './components/composites/DropdownLinks';
|
|
72
73
|
export { DropdownLinksV2 } from './components/composites/DropdownLinksV2';
|
|
73
74
|
export { Modal } from './components/composites/Modal';
|
|
@@ -70,5 +70,5 @@ const colors = [
|
|
|
70
70
|
{ color: COLOR.ALERT_WARNING_BORDER, label: 'ALERT_WARNING_BORDER' },
|
|
71
71
|
];
|
|
72
72
|
export const Default = {
|
|
73
|
-
render: () => (_jsx(Row,
|
|
73
|
+
render: () => (_jsx(Row, { sx: { flexWrap: 'wrap' }, children: colors.map((color) => (_jsxs(Group, { type: GROUP_TYPE.GROUP, sx: { mr: 3, mt: 0, flexBasis: '100px' }, children: [_jsx(Label, { size: LABEL_SIZE.SM, children: color.label }), _jsx(ColorSquare, { color: color.color })] }, color.label))) })),
|
|
74
74
|
};
|
|
@@ -41,6 +41,6 @@ const randomElement = (arr) => {
|
|
|
41
41
|
export const Default = {
|
|
42
42
|
render: () => (_jsx(Group, { children: types.map((t) => {
|
|
43
43
|
const style = getTypographyStyles(t.type);
|
|
44
|
-
return (_jsxs(Group,
|
|
44
|
+
return (_jsxs(Group, { sx: { mb: '1rem' }, children: [_jsx(Label, { size: LABEL_SIZE.SM, children: t.label }), _jsx(Box, { sx: { p: 3, boxShadow: '0px 0px 8px 1px #dddddd' }, children: _jsx("div", { sx: style, children: randomElement(pangrams) }) })] }));
|
|
45
45
|
}) })),
|
|
46
46
|
};
|
package/dist/theme/colors.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare enum COLOR {
|
|
|
18
18
|
LIGHT_GRAY = "lightGray",
|
|
19
19
|
EXTRA_LIGHT_GRAY = "extraLightGray",
|
|
20
20
|
EXTRA_EXTRA_LIGHT_GRAY = "extraExtraLightGray",
|
|
21
|
-
SUCCESS = "
|
|
21
|
+
SUCCESS = "success",
|
|
22
22
|
ND_BLUE = "ndBlue",
|
|
23
23
|
ND_BLUE_DARK = "ndBlueDark",
|
|
24
24
|
ND_BLUE_LIGHT = "ndBlueLight",
|
|
@@ -53,7 +53,7 @@ export declare enum COLOR {
|
|
|
53
53
|
ALERT_WARNING_BG = "alertWarningBg",
|
|
54
54
|
ALERT_WARNING_BORDER = "alertWarningBorder",
|
|
55
55
|
ALERT_SUCCESS_BG = "alertSuccessBg",
|
|
56
|
-
ALERT_SUCCESS_BORDER = "
|
|
56
|
+
ALERT_SUCCESS_BORDER = "alertSuccessBorder"
|
|
57
57
|
}
|
|
58
58
|
export declare const colors: {
|
|
59
59
|
[key in COLOR]: string;
|
package/dist/theme/colors.js
CHANGED
|
@@ -19,7 +19,7 @@ export var COLOR;
|
|
|
19
19
|
COLOR["LIGHT_GRAY"] = "lightGray";
|
|
20
20
|
COLOR["EXTRA_LIGHT_GRAY"] = "extraLightGray";
|
|
21
21
|
COLOR["EXTRA_EXTRA_LIGHT_GRAY"] = "extraExtraLightGray";
|
|
22
|
-
COLOR["SUCCESS"] = "
|
|
22
|
+
COLOR["SUCCESS"] = "success";
|
|
23
23
|
COLOR["ND_BLUE"] = "ndBlue";
|
|
24
24
|
COLOR["ND_BLUE_DARK"] = "ndBlueDark";
|
|
25
25
|
COLOR["ND_BLUE_LIGHT"] = "ndBlueLight";
|
|
@@ -54,7 +54,7 @@ export var COLOR;
|
|
|
54
54
|
COLOR["ALERT_WARNING_BG"] = "alertWarningBg";
|
|
55
55
|
COLOR["ALERT_WARNING_BORDER"] = "alertWarningBorder";
|
|
56
56
|
COLOR["ALERT_SUCCESS_BG"] = "alertSuccessBg";
|
|
57
|
-
COLOR["ALERT_SUCCESS_BORDER"] = "
|
|
57
|
+
COLOR["ALERT_SUCCESS_BORDER"] = "alertSuccessBorder";
|
|
58
58
|
})(COLOR || (COLOR = {}));
|
|
59
59
|
export const colors = {
|
|
60
60
|
[COLOR.TEXT]: '#333333',
|
|
@@ -76,6 +76,7 @@ export const colors = {
|
|
|
76
76
|
[COLOR.LIGHT_GRAY]: '#d2d2d2',
|
|
77
77
|
[COLOR.EXTRA_LIGHT_GRAY]: '#e2e2e2',
|
|
78
78
|
[COLOR.EXTRA_EXTRA_LIGHT_GRAY]: '#f2f2f2',
|
|
79
|
+
[COLOR.SUCCESS]: '#00823E',
|
|
79
80
|
[COLOR.ND_GOLD]: '#ae9142',
|
|
80
81
|
[COLOR.ND_GOLD_LIGHT]: '#d39f10',
|
|
81
82
|
[COLOR.ND_GOLD_DARK]: '#8c7535',
|
|
@@ -110,4 +111,5 @@ export const colors = {
|
|
|
110
111
|
[COLOR.ALERT_WARNING_BG]: '#fc7279',
|
|
111
112
|
[COLOR.ALERT_WARNING_BORDER]: '#ad5458',
|
|
112
113
|
[COLOR.ALERT_SUCCESS_BG]: '#edffea',
|
|
114
|
+
[COLOR.ALERT_SUCCESS_BORDER]: '#00823E',
|
|
113
115
|
};
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
--lightGray: #d2d2d2;
|
|
19
19
|
--extraLightGray: #e2e2e2;
|
|
20
20
|
--extraExtraLightGray: #f2f2f2;
|
|
21
|
-
--
|
|
21
|
+
--success: #00823E;
|
|
22
22
|
--ndBlue: #0c2340;
|
|
23
23
|
--ndBlueDark: #081629;
|
|
24
24
|
--ndBlueLight: #143865;
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
--alertWarningBg: #fc7279;
|
|
54
54
|
--alertWarningBorder: #ad5458;
|
|
55
55
|
--alertSuccessBg: #edffea;
|
|
56
|
-
--
|
|
56
|
+
--alertSuccessBorder: #00823E;
|
|
57
57
|
}
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare const theme: {
|
|
|
36
36
|
lightGray: string;
|
|
37
37
|
extraLightGray: string;
|
|
38
38
|
extraExtraLightGray: string;
|
|
39
|
-
|
|
39
|
+
success: string;
|
|
40
40
|
ndBlue: string;
|
|
41
41
|
ndBlueDark: string;
|
|
42
42
|
ndBlueLight: string;
|
|
@@ -58,6 +58,7 @@ export declare const theme: {
|
|
|
58
58
|
ndSecondary4: string;
|
|
59
59
|
ndSecondary5: string;
|
|
60
60
|
ndSecondary6: string;
|
|
61
|
+
ndTertiary1: string;
|
|
61
62
|
ndTertiary2: string;
|
|
62
63
|
ndTertiary3: string;
|
|
63
64
|
ndTertiary4: string;
|
|
@@ -70,6 +71,7 @@ export declare const theme: {
|
|
|
70
71
|
alertWarningBg: string;
|
|
71
72
|
alertWarningBorder: string;
|
|
72
73
|
alertSuccessBg: string;
|
|
74
|
+
alertSuccessBorder: string;
|
|
73
75
|
};
|
|
74
76
|
space: string[];
|
|
75
77
|
boxShadow: typeof BOX_SHADOW;
|
|
@@ -125,7 +127,7 @@ export declare const themeV2: {
|
|
|
125
127
|
lightGray: string;
|
|
126
128
|
extraLightGray: string;
|
|
127
129
|
extraExtraLightGray: string;
|
|
128
|
-
|
|
130
|
+
success: string;
|
|
129
131
|
ndBlue: string;
|
|
130
132
|
ndBlueDark: string;
|
|
131
133
|
ndBlueLight: string;
|
|
@@ -147,6 +149,7 @@ export declare const themeV2: {
|
|
|
147
149
|
ndSecondary4: string;
|
|
148
150
|
ndSecondary5: string;
|
|
149
151
|
ndSecondary6: string;
|
|
152
|
+
ndTertiary1: string;
|
|
150
153
|
ndTertiary2: string;
|
|
151
154
|
ndTertiary3: string;
|
|
152
155
|
ndTertiary4: string;
|
|
@@ -159,6 +162,7 @@ export declare const themeV2: {
|
|
|
159
162
|
alertWarningBg: string;
|
|
160
163
|
alertWarningBorder: string;
|
|
161
164
|
alertSuccessBg: string;
|
|
165
|
+
alertSuccessBorder: string;
|
|
162
166
|
};
|
|
163
167
|
space: string[];
|
|
164
168
|
boxShadow: typeof BOX_SHADOW;
|
|
@@ -243,94 +247,7 @@ export type StyledElementPropsV2<E extends Element, CustomProps = object, Childr
|
|
|
243
247
|
} & Omit<React.HTMLAttributes<E>, 'children' | 'onChange'> & CustomProps & {
|
|
244
248
|
htmlFor?: string;
|
|
245
249
|
};
|
|
246
|
-
export declare const useTheme: () =>
|
|
247
|
-
colors: {
|
|
248
|
-
text: string;
|
|
249
|
-
lightText: string;
|
|
250
|
-
background: string;
|
|
251
|
-
transparent: string;
|
|
252
|
-
primary: string;
|
|
253
|
-
textOnPrimary: string;
|
|
254
|
-
primaryHighlight: string;
|
|
255
|
-
secondary: string;
|
|
256
|
-
textOnSecondary: string;
|
|
257
|
-
secondaryHighlight: string;
|
|
258
|
-
white: string;
|
|
259
|
-
warmWhite: string;
|
|
260
|
-
warmWhiteDark: string;
|
|
261
|
-
black: string;
|
|
262
|
-
darkGray: string;
|
|
263
|
-
gray: string;
|
|
264
|
-
lightGray: string;
|
|
265
|
-
extraLightGray: string;
|
|
266
|
-
extraExtraLightGray: string;
|
|
267
|
-
ndTertiary1: string;
|
|
268
|
-
ndBlue: string;
|
|
269
|
-
ndBlueDark: string;
|
|
270
|
-
ndBlueLight: string;
|
|
271
|
-
ndBlueBright: string;
|
|
272
|
-
ndGold: string;
|
|
273
|
-
ndGoldLight: string;
|
|
274
|
-
ndGoldDark: string;
|
|
275
|
-
ndGreem: string;
|
|
276
|
-
ndGreenLight: string;
|
|
277
|
-
ndSkyBlue: string;
|
|
278
|
-
ndSkyBlueDark: string;
|
|
279
|
-
ndSkyBlueLight: string;
|
|
280
|
-
ndMetallicGold: string;
|
|
281
|
-
ndMetallicGoldLight: string;
|
|
282
|
-
ndProvostBlue: string;
|
|
283
|
-
ndSecondary1: string;
|
|
284
|
-
ndSecondary2: string;
|
|
285
|
-
ndSecondary3: string;
|
|
286
|
-
ndSecondary4: string;
|
|
287
|
-
ndSecondary5: string;
|
|
288
|
-
ndSecondary6: string;
|
|
289
|
-
ndTertiary2: string;
|
|
290
|
-
ndTertiary3: string;
|
|
291
|
-
ndTertiary4: string;
|
|
292
|
-
ndTertiary5: string;
|
|
293
|
-
ndTertiary6: string;
|
|
294
|
-
alertInformationalBg: string;
|
|
295
|
-
alertInformationalBorder: string;
|
|
296
|
-
alertInformationalYellowBg: string;
|
|
297
|
-
alertInformationalYellowBorder: string;
|
|
298
|
-
alertWarningBg: string;
|
|
299
|
-
alertWarningBorder: string;
|
|
300
|
-
alertSuccessBg: string;
|
|
301
|
-
};
|
|
302
|
-
space: string[];
|
|
303
|
-
boxShadow: typeof BOX_SHADOW;
|
|
304
|
-
breakpoints: string[];
|
|
305
|
-
zIndex: typeof Z_INDEX;
|
|
306
|
-
fonts: {
|
|
307
|
-
branded: string;
|
|
308
|
-
branded2: string;
|
|
309
|
-
serif: string;
|
|
310
|
-
normal: string;
|
|
311
|
-
};
|
|
312
|
-
fontSizes: {
|
|
313
|
-
xxs: string;
|
|
314
|
-
xs: string;
|
|
315
|
-
sm: string;
|
|
316
|
-
ms: string;
|
|
317
|
-
md: string;
|
|
318
|
-
ml: string;
|
|
319
|
-
lg: string;
|
|
320
|
-
xl: string;
|
|
321
|
-
xxl: string;
|
|
322
|
-
};
|
|
323
|
-
lineHeights: {
|
|
324
|
-
normal: number;
|
|
325
|
-
condensed: number;
|
|
326
|
-
extraCondensed: number;
|
|
327
|
-
};
|
|
328
|
-
fontWeights: {
|
|
329
|
-
normal: number;
|
|
330
|
-
heading: number;
|
|
331
|
-
bold: number;
|
|
332
|
-
};
|
|
333
|
-
};
|
|
250
|
+
export declare const useTheme: () => Theme;
|
|
334
251
|
export declare const ThemeProvider: React.FC<PropsWithChildren>;
|
|
335
252
|
export declare const useThemeV2: () => ThemeV2;
|
|
336
253
|
export declare const ThemeProviderV2: React.FC<PropsWithChildren>;
|
package/dist/theme/index.js
CHANGED
|
@@ -35,7 +35,7 @@ export const useTheme = () => {
|
|
|
35
35
|
return theme;
|
|
36
36
|
};
|
|
37
37
|
export const ThemeProvider = ({ children }) => {
|
|
38
|
-
return _jsx(ThemeUIProvider,
|
|
38
|
+
return _jsx(ThemeUIProvider, { theme: theme, children: children });
|
|
39
39
|
};
|
|
40
40
|
const ThemeV2Context = createContext(themeV2);
|
|
41
41
|
export const useThemeV2 = () => {
|
|
@@ -47,5 +47,5 @@ export const useThemeV2 = () => {
|
|
|
47
47
|
};
|
|
48
48
|
export const ThemeProviderV2 = ({ children }) => {
|
|
49
49
|
const value = useMemo(() => themeV2, []);
|
|
50
|
-
return (_jsx(ThemeV2Context.Provider,
|
|
50
|
+
return (_jsx(ThemeV2Context.Provider, { value: value, children: children }));
|
|
51
51
|
};
|
|
@@ -97,6 +97,6 @@ export declare const typographyStyleMap: {
|
|
|
97
97
|
export declare const getTypographyStyles: (typography?: TYPOGRAPHY_TYPE) => {
|
|
98
98
|
fontFamily: FONT;
|
|
99
99
|
fontSize: FONT_SIZE;
|
|
100
|
-
fontWeight?: FONT_WEIGHT
|
|
100
|
+
fontWeight?: FONT_WEIGHT;
|
|
101
101
|
lineHeight: LINE_HEIGHT;
|
|
102
102
|
};
|
package/dist/utils/test.js
CHANGED
|
@@ -3,7 +3,7 @@ import { render as rtlRender } from '@testing-library/react';
|
|
|
3
3
|
import { UiProvider } from '../components/providers/ui';
|
|
4
4
|
export const render = (component, configParam) => {
|
|
5
5
|
const config = configParam || {};
|
|
6
|
-
return rtlRender(_jsx(UiProvider,
|
|
6
|
+
return rtlRender(_jsx(UiProvider, { env: config.env, components: config.components, alertsConfig: {
|
|
7
7
|
disable: true,
|
|
8
|
-
}
|
|
8
|
+
}, children: component }));
|
|
9
9
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndlib/component-library",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.47",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"files": [
|
|
@@ -60,15 +60,15 @@
|
|
|
60
60
|
"@testing-library/jest-dom": "^5.16.5",
|
|
61
61
|
"@testing-library/react": "^14.0.0",
|
|
62
62
|
"@testing-library/user-event": "^14.4.3",
|
|
63
|
+
"@types/minimatch": "^6.0.0",
|
|
63
64
|
"@types/pretty": "^2.0.1",
|
|
64
65
|
"@types/react": "18.2.7",
|
|
65
|
-
"@types/react-beautiful-dnd": "^13.1.5",
|
|
66
66
|
"@types/react-datepicker": "^4.15.0",
|
|
67
67
|
"@types/react-dom": "18.2.7",
|
|
68
68
|
"@types/react-modal": "^3.16.0",
|
|
69
69
|
"@types/sanitize-html": "^2.9.0",
|
|
70
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
71
|
-
"@typescript-eslint/parser": "^
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
71
|
+
"@typescript-eslint/parser": "^7.18.0",
|
|
72
72
|
"@vitejs/plugin-react-swc": "^3.0.0",
|
|
73
73
|
"@vitest/coverage-c8": "^0.33.0",
|
|
74
74
|
"@vitest/coverage-istanbul": "^1.6.0",
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
99
|
"@floating-ui/react": "^0.24.5",
|
|
100
|
+
"@hello-pangea/dnd": "^17.0.0",
|
|
100
101
|
"clsx": "^2.1.1",
|
|
101
|
-
"react-beautiful-dnd": "^13.1.1",
|
|
102
102
|
"react-datepicker": "^4.16.0",
|
|
103
103
|
"react-markdown": "^8.0.7",
|
|
104
104
|
"react-modal": "^3.16.1",
|