@nulogy/components 11.1.0 → 11.3.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/main.js +4538 -1047
- package/dist/main.module.js +4583 -1095
- package/dist/src/BottomSheet/BottomSheet.d.ts +1 -2
- package/dist/src/BottomSheet/BottomSheet.parts.d.ts +2 -2
- package/dist/src/BottomSheet/BottomSheet.styled.d.ts +2 -2
- package/dist/src/BottomSheet/index.d.ts +3 -0
- package/dist/src/BottomSheet/stories/BottomSheet.actions.story.d.ts +6 -0
- package/dist/src/BottomSheet/stories/BottomSheet.content.story.d.ts +6 -0
- package/dist/src/BottomSheet/stories/BottomSheet.features.story.d.ts +6 -0
- package/dist/src/BottomSheet/stories/BottomSheet.parts.story.d.ts +6 -0
- package/dist/src/BottomSheet/stories/BottomSheet.story.d.ts +6 -0
- package/dist/src/BrandedNavBar/NavBarBackground.d.ts +1 -1
- package/dist/src/Button/Button.d.ts +3 -2
- package/dist/src/Button/ControlIcon.d.ts +2 -1
- package/dist/src/Button/IconicButton.d.ts +2 -1
- package/dist/src/Checkbox/Checkbox.d.ts +1 -1
- package/dist/src/DatePicker/DatePickerStyles.d.ts +1 -1
- package/dist/src/Divider/Divider.d.ts +4 -1
- package/dist/src/Divider/Divider.story.d.ts +2 -1
- package/dist/src/DropdownMenu/DropdownButton.d.ts +1 -1
- package/dist/src/DropdownMenu/DropdownMenuContainer.d.ts +1 -1
- package/dist/src/FieldLabel/FramedIcon.d.ts +2 -1
- package/dist/src/Icon/Icon.d.ts +2 -1
- package/dist/src/Input/InputField.d.ts +3 -2
- package/dist/src/Modal/ModalContent.d.ts +1 -1
- package/dist/src/Modal/ModalHeader.d.ts +1 -1
- package/dist/src/NDSProvider/ComponentVariantContext.d.ts +1 -1
- package/dist/src/NDSProvider/FeatureFlagsContext.d.ts +11 -0
- package/dist/src/NDSProvider/GlobalStyles.d.ts +1 -1
- package/dist/src/NDSProvider/GlobalStylesComposer.d.ts +1 -1
- package/dist/src/NDSProvider/NDSProvider.d.ts +4 -2
- package/dist/src/Select/customReactSelectStyles.d.ts +2 -2
- package/dist/src/Textarea/StyledTextarea.d.ts +1 -1
- package/dist/src/Toggle/Toggle.d.ts +1 -1
- package/dist/src/Toggle/ToggleButton.d.ts +1 -1
- package/dist/src/Tooltip/Tooltip.story.d.ts +1 -0
- package/dist/src/Tooltip/TooltipContainer.d.ts +1 -1
- package/dist/src/TopBar/TopBar.d.ts +16 -0
- package/dist/src/TopBar/TopBar.styled.d.ts +18 -0
- package/dist/src/TopBar/components/BackLink.d.ts +7 -0
- package/dist/src/TopBar/components/Menu.d.ts +6 -0
- package/dist/src/TopBar/components/MenuItem.d.ts +11 -0
- package/dist/src/TopBar/components/PageTitle.d.ts +3 -0
- package/dist/src/TopBar/constants.d.ts +3 -0
- package/dist/src/TopBar/stories/TopBar.backButton.story.d.ts +19 -0
- package/dist/src/TopBar/stories/TopBar.menu.story.d.ts +22 -0
- package/dist/src/TopBar/stories/TopBar.story.d.ts +19 -0
- package/dist/src/TopBar/stories/fixtures.d.ts +2 -0
- package/dist/src/hooks/useMediaQuery/useMediaQuery.d.ts +3 -1
- package/dist/src/index.d.ts +5 -2
- package/dist/src/theme/NDSThemeProvider.d.ts +5 -0
- package/dist/src/theme/index.d.ts +2 -0
- package/dist/src/{NDSProvider → theme}/mergeThemes.util.d.ts +1 -1
- package/dist/src/theme/theme.d.ts +5 -0
- package/dist/src/{theme.type.d.ts → theme/theme.type.d.ts} +16 -2
- package/dist/src/theme/useNDSTheme.d.ts +19 -0
- package/dist/src/utils/story/dashed.d.ts +1 -1
- package/package.json +8 -6
- package/dist/src/NDSProvider/useNDSTheme.d.ts +0 -12
- package/dist/src/VisualTests/KitchenSink.story.d.ts +0 -6
- package/dist/src/theme.d.ts +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RecursivePartial } from "
|
|
1
|
+
import { RecursivePartial } from "../utils/ts/recursivePartial";
|
|
2
2
|
interface Colors {
|
|
3
3
|
black: string;
|
|
4
4
|
blackBlue: string;
|
|
@@ -28,6 +28,7 @@ interface FontSizes {
|
|
|
28
28
|
smaller: string;
|
|
29
29
|
small: string;
|
|
30
30
|
medium: string;
|
|
31
|
+
base: string;
|
|
31
32
|
large: string;
|
|
32
33
|
larger: string;
|
|
33
34
|
largest: string;
|
|
@@ -35,6 +36,13 @@ interface FontSizes {
|
|
|
35
36
|
heading2: string;
|
|
36
37
|
heading3: string;
|
|
37
38
|
heading4: string;
|
|
39
|
+
xxs: string;
|
|
40
|
+
xs: string;
|
|
41
|
+
sm: string;
|
|
42
|
+
md: string;
|
|
43
|
+
lg: string;
|
|
44
|
+
xl: string;
|
|
45
|
+
xxl: string;
|
|
38
46
|
}
|
|
39
47
|
interface LineHeights {
|
|
40
48
|
base: string;
|
|
@@ -96,7 +104,7 @@ interface Radii {
|
|
|
96
104
|
medium: string;
|
|
97
105
|
large: string;
|
|
98
106
|
circle: string;
|
|
99
|
-
|
|
107
|
+
pill: string;
|
|
100
108
|
}
|
|
101
109
|
export interface Breakpoints {
|
|
102
110
|
extraSmall: string;
|
|
@@ -104,6 +112,12 @@ export interface Breakpoints {
|
|
|
104
112
|
medium: string;
|
|
105
113
|
large: string;
|
|
106
114
|
extraLarge: string;
|
|
115
|
+
phonePortrait: string;
|
|
116
|
+
phoneLandscape: string;
|
|
117
|
+
tabletPortrait: string;
|
|
118
|
+
tabletLandscape: string;
|
|
119
|
+
laptop: string;
|
|
120
|
+
desktop: string;
|
|
107
121
|
}
|
|
108
122
|
interface ZIndices {
|
|
109
123
|
content: number;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
2
|
+
import { FeatureFlags } from "../NDSProvider/FeatureFlagsContext";
|
|
3
|
+
import { Breakpoints, DefaultNDSThemeType, ThemeType } from "./theme.type";
|
|
4
|
+
export declare const buildBreakPoints: (breakpointsConfig: Readonly<Breakpoints>) => {
|
|
5
|
+
map: <T>(fn: (value: string) => T) => T[];
|
|
6
|
+
extraSmall: string;
|
|
7
|
+
small: string;
|
|
8
|
+
medium: string;
|
|
9
|
+
large: string;
|
|
10
|
+
extraLarge: string;
|
|
11
|
+
phonePortrait: string;
|
|
12
|
+
phoneLandscape: string;
|
|
13
|
+
tabletPortrait: string;
|
|
14
|
+
tabletLandscape: string;
|
|
15
|
+
laptop: string;
|
|
16
|
+
desktop: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const getThemeByVariant: (variant: ComponentVariant, isTabletSize: boolean, featureFlags: FeatureFlags) => DefaultNDSThemeType;
|
|
19
|
+
export declare function useNDSTheme(variant?: ComponentVariant, customTheme?: ThemeType): DefaultNDSThemeType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StyledComponent } from "styled-components";
|
|
2
2
|
import { ComponentType } from "react";
|
|
3
|
-
import { DefaultNDSThemeType } from "../../theme
|
|
3
|
+
import { DefaultNDSThemeType } from "../../theme";
|
|
4
4
|
/**
|
|
5
5
|
* A styled utility that adds a dashed border around a component
|
|
6
6
|
* to highlight its boundaries. To be used in Storybook exclusively.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nulogy/components",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.0",
|
|
4
4
|
"description": "Component library for the Nulogy Design System - http://nulogy.design",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -9,14 +9,15 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"ci": "yarn && yarn build && yarn test && yarn run check",
|
|
11
11
|
"new": "plop",
|
|
12
|
-
"generate:theme": "npx tsx src/scripts/generateTheme.ts && prettier -w src/theme.ts",
|
|
12
|
+
"generate:theme": "npx tsx src/scripts/generateTheme.ts && prettier -w src/theme/theme.ts",
|
|
13
13
|
"start": "concurrently \"yarn build --watch\" \"yarn start:storybook\"",
|
|
14
14
|
"start:cypress": "yarn concurrently --kill-others \"yarn start --ci\" \"yarn wait-on http://localhost:9999 && cypress open\"",
|
|
15
15
|
"start:storybook": "start-storybook -p 9999",
|
|
16
16
|
"clean:storybook": "rm -rf node_modules/.cache/storybook && rm -rf ./storybook-static",
|
|
17
17
|
"build": "rollup -c",
|
|
18
18
|
"build:storybook": "build-storybook",
|
|
19
|
-
"
|
|
19
|
+
"warn:prepush": "echo \"Make sure you also run all the other CI steps before pushing by running 'yarn ci'\"",
|
|
20
|
+
"check": "yarn warn:prepush && yarn check:types && yarn check:lint && yarn check:format",
|
|
20
21
|
"check:types": "tsc && cd cypress && tsc --noEmit",
|
|
21
22
|
"check:lint": "eslint --config ./.eslintrc .'*/**/*.{js,ts,tsx}'",
|
|
22
23
|
"check:format": "prettier -c .",
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
"@babel/preset-env": "7.3.1",
|
|
69
70
|
"@babel/preset-typescript": "^7.10.4",
|
|
70
71
|
"@nulogy/eslint-config-nulogy": "^1.0.0",
|
|
71
|
-
"@nulogy/icons": "4.
|
|
72
|
+
"@nulogy/icons": "^4.37.2",
|
|
72
73
|
"@rollup/plugin-babel": "^5.0.0",
|
|
73
74
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
74
75
|
"@semantic-release/changelog": "^6.0.2",
|
|
@@ -82,7 +83,8 @@
|
|
|
82
83
|
"@storybook/addon-docs": "6.1.9",
|
|
83
84
|
"@storybook/addon-knobs": "^6.1.9",
|
|
84
85
|
"@storybook/addon-storysource": "^6.1.9",
|
|
85
|
-
"@storybook/addon-
|
|
86
|
+
"@storybook/addon-toolbars": "^6.1.9",
|
|
87
|
+
"@storybook/addon-viewport": "^6.1.9",
|
|
86
88
|
"@storybook/codemod": "^6.1.9",
|
|
87
89
|
"@storybook/react": "^6.3.12",
|
|
88
90
|
"@storybook/theming": "^6.1.9",
|
|
@@ -172,7 +174,7 @@
|
|
|
172
174
|
},
|
|
173
175
|
"husky": {
|
|
174
176
|
"hooks": {
|
|
175
|
-
"pre-push": "yarn run
|
|
177
|
+
"pre-push": "yarn run check"
|
|
176
178
|
}
|
|
177
179
|
},
|
|
178
180
|
"jest": {
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ThemeType, DefaultNDSThemeType, Breakpoints } from "../theme.type";
|
|
2
|
-
import { ComponentVariant } from "./ComponentVariantContext";
|
|
3
|
-
export declare const buildBreakPoints: (breakpointsConfig: Readonly<Breakpoints>) => {
|
|
4
|
-
map: <T>(fn: (value: string) => T) => T[];
|
|
5
|
-
extraSmall: string;
|
|
6
|
-
small: string;
|
|
7
|
-
medium: string;
|
|
8
|
-
large: string;
|
|
9
|
-
extraLarge: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const getThemeByVariant: (variant: ComponentVariant, isTabletSize: boolean) => DefaultNDSThemeType;
|
|
12
|
-
export declare function useNDSTheme(variant?: ComponentVariant, customTheme?: ThemeType): DefaultNDSThemeType;
|
package/dist/src/theme.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DefaultNDSThemeType } from "./theme.type";
|
|
2
|
-
type ThemeKey = "desktop" | "tablet" | "phone";
|
|
3
|
-
export declare const themes: Record<ThemeKey, DefaultNDSThemeType>;
|
|
4
|
-
export declare const desktop: DefaultNDSThemeType, tablet: DefaultNDSThemeType, phone: DefaultNDSThemeType;
|
|
5
|
-
export {};
|