@ndlib/component-library 1.0.44 → 1.0.46
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.d.ts +8 -0
- package/dist/components/composites/DropdownLinksV2/DropdownLinksV2.stories.js +27 -0
- package/dist/components/composites/DropdownLinksV2/index.d.ts +15 -0
- package/dist/components/composites/DropdownLinksV2/index.js +27 -0
- package/dist/components/composites/EmptyState/EmptyState.stories.js +1 -1
- package/dist/components/composites/EmptyState/index.js +2 -2
- 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 +4 -4
- 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
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.46",
|
|
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",
|