@dnanpm/styleguide 3.12.0 → 3.12.2
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/build/cjs/components/Breadcrumb/Breadcrumb.d.ts +42 -0
- package/build/cjs/components/Breadcrumb/Breadcrumb.js +90 -0
- package/build/cjs/components/Carousel/Carousel.d.ts +11 -14
- package/build/cjs/components/Carousel/Carousel.js +52 -40
- package/build/cjs/components/DateTimePicker/DateTimePicker.js +4 -0
- package/build/cjs/components/Hero/Hero.d.ts +0 -6
- package/build/cjs/components/Hero/Hero.js +3 -3
- package/build/cjs/components/NotificationBadge/NotificationBadge.js +4 -0
- package/build/cjs/components/PriorityNavigation/PriorityNavigation.js +4 -0
- package/build/cjs/components/Skeleton/Skeleton.d.ts +63 -0
- package/build/cjs/components/Skeleton/Skeleton.js +73 -0
- package/build/cjs/components/Tooltip/Tooltip.js +1 -1
- package/build/cjs/components/index.d.ts +2 -0
- package/build/cjs/index.js +4 -0
- package/build/cjs/themes/globalStyles.js +1 -0
- package/build/cjs/themes/theme.d.ts +9 -2
- package/build/cjs/themes/themeComponents/breakpoints.d.ts +9 -4
- package/build/cjs/utils/styledUtils.d.ts +22 -1
- package/build/cjs/utils/styledUtils.js +26 -6
- package/build/es/components/Breadcrumb/Breadcrumb.d.ts +42 -0
- package/build/es/components/Breadcrumb/Breadcrumb.js +82 -0
- package/build/es/components/Carousel/Carousel.d.ts +11 -14
- package/build/es/components/Carousel/Carousel.js +52 -40
- package/build/es/components/DateTimePicker/DateTimePicker.js +4 -0
- package/build/es/components/Hero/Hero.d.ts +0 -6
- package/build/es/components/Hero/Hero.js +3 -3
- package/build/es/components/NotificationBadge/NotificationBadge.js +4 -0
- package/build/es/components/PriorityNavigation/PriorityNavigation.js +4 -0
- package/build/es/components/Skeleton/Skeleton.d.ts +63 -0
- package/build/es/components/Skeleton/Skeleton.js +65 -0
- package/build/es/components/Tooltip/Tooltip.js +1 -1
- package/build/es/components/index.d.ts +2 -0
- package/build/es/index.js +2 -0
- package/build/es/themes/globalStyles.js +1 -0
- package/build/es/themes/theme.d.ts +9 -2
- package/build/es/themes/themeComponents/breakpoints.d.ts +9 -4
- package/build/es/utils/styledUtils.d.ts +22 -1
- package/build/es/utils/styledUtils.js +26 -6
- package/package.json +14 -10
|
@@ -9,7 +9,14 @@ declare const theme: {
|
|
|
9
9
|
unit: string;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
breakpoints:
|
|
12
|
+
breakpoints: {
|
|
13
|
+
readonly xxl: 1440;
|
|
14
|
+
readonly xl: 1200;
|
|
15
|
+
readonly lg: 992;
|
|
16
|
+
readonly md: 768;
|
|
17
|
+
readonly sm: 576;
|
|
18
|
+
readonly xs: 480;
|
|
19
|
+
};
|
|
13
20
|
color: {
|
|
14
21
|
default: {
|
|
15
22
|
pink: string;
|
|
@@ -155,7 +162,7 @@ declare const theme: {
|
|
|
155
162
|
h1: string;
|
|
156
163
|
h2: string;
|
|
157
164
|
};
|
|
158
|
-
media: Record<
|
|
165
|
+
media: Record<"xxl" | "xl" | "lg" | "md" | "sm" | "xs", (l: TemplateStringsArray, ...p: (string | number)[]) => ReturnType<typeof import("styled-components").css>>;
|
|
159
166
|
radius: {
|
|
160
167
|
default: string;
|
|
161
168
|
s: string;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
declare const breakpoints: {
|
|
2
|
+
readonly xxl: 1440;
|
|
3
|
+
readonly xl: 1200;
|
|
4
|
+
readonly lg: 992;
|
|
5
|
+
readonly md: 768;
|
|
6
|
+
readonly sm: 576;
|
|
7
|
+
readonly xs: 480;
|
|
8
|
+
};
|
|
9
|
+
export type ViewBreakpoints = typeof breakpoints;
|
|
5
10
|
export default breakpoints;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { css } from '../themes/styled';
|
|
1
2
|
export declare const getMultipliedSize: (base: {
|
|
2
3
|
value: number;
|
|
3
4
|
unit: string;
|
|
@@ -6,4 +7,24 @@ export declare const getDividedSize: (base: {
|
|
|
6
7
|
value: number;
|
|
7
8
|
unit: string;
|
|
8
9
|
}, divide: number) => string;
|
|
9
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Media query helpers for responsive design.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const StyledDiv = styled.div`
|
|
16
|
+
* font-size: 1rem;
|
|
17
|
+
* ${media.md`font-size: 1.2rem;`}
|
|
18
|
+
* ${media.lg`font-size: 1.5rem;`}
|
|
19
|
+
* `;
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* Available breakpoints:
|
|
23
|
+
* - `xs`: 480px
|
|
24
|
+
* - `sm`: 576px
|
|
25
|
+
* - `md`: 768px
|
|
26
|
+
* - `lg`: 992px
|
|
27
|
+
* - `xl`: 1200px
|
|
28
|
+
* - `xxl`: 1440px
|
|
29
|
+
*/
|
|
30
|
+
export declare const media: Record<"xxl" | "xl" | "lg" | "md" | "sm" | "xs", (l: TemplateStringsArray, ...p: (string | number)[]) => ReturnType<typeof css>>;
|
|
@@ -3,12 +3,32 @@ import breakpoints from '../themes/themeComponents/breakpoints.js';
|
|
|
3
3
|
|
|
4
4
|
const getMultipliedSize = (base, multiply) => `${multiply * base.value}${base.unit}`;
|
|
5
5
|
const getDividedSize = (base, divide) => `${base.value / divide}${base.unit}`;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Media query helpers for responsive design.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const StyledDiv = styled.div`
|
|
12
|
+
* font-size: 1rem;
|
|
13
|
+
* ${media.md`font-size: 1.2rem;`}
|
|
14
|
+
* ${media.lg`font-size: 1.5rem;`}
|
|
15
|
+
* `;
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* Available breakpoints:
|
|
19
|
+
* - `xs`: 480px
|
|
20
|
+
* - `sm`: 576px
|
|
21
|
+
* - `md`: 768px
|
|
22
|
+
* - `lg`: 992px
|
|
23
|
+
* - `xl`: 1200px
|
|
24
|
+
* - `xxl`: 1440px
|
|
25
|
+
*/
|
|
26
|
+
const media = Object.keys(breakpoints).reduce((acc, key) => {
|
|
27
|
+
acc[key] = (literals, ...placeholders) => css `
|
|
28
|
+
@media (min-width: ${breakpoints[key]}px) {
|
|
29
|
+
${css(literals, ...placeholders)}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
12
32
|
return acc;
|
|
13
33
|
}, {});
|
|
14
34
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dnanpm/styleguide",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "v3.12.
|
|
4
|
+
"version": "v3.12.2",
|
|
5
5
|
"main": "build/cjs/index.js",
|
|
6
6
|
"module": "build/es/index.js",
|
|
7
7
|
"jsnext:main": "build/es/index.js",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
],
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
|
-
"url": "git@github.com:DNA-Online-Services/styleguide.git"
|
|
21
|
+
"url": "git@github.com:DNA-Online-Services/styleguide.git",
|
|
22
|
+
"directory": "packages/styleguide"
|
|
22
23
|
},
|
|
23
24
|
"scripts": {
|
|
24
25
|
"build": "rm -rf build && rollup -c",
|
|
@@ -48,15 +49,15 @@
|
|
|
48
49
|
"@babel/preset-react": "^7.26.3",
|
|
49
50
|
"@babel/preset-typescript": "^7.27.1",
|
|
50
51
|
"@dnanpm/icons": "^2.0.9",
|
|
51
|
-
"@rollup/plugin-commonjs": "^
|
|
52
|
-
"@rollup/plugin-node-resolve": "^
|
|
52
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
53
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
53
54
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
54
55
|
"@testing-library/jest-dom": "^6.6.3",
|
|
55
56
|
"@testing-library/react": "^16.3.0",
|
|
56
57
|
"@testing-library/user-event": "^14.5.2",
|
|
57
58
|
"@types/jest": "^30.0.0",
|
|
58
59
|
"@types/node": "^17.0.45",
|
|
59
|
-
"@types/ramda": "^0.
|
|
60
|
+
"@types/ramda": "^0.31.1",
|
|
60
61
|
"@types/react": "^18.3.11",
|
|
61
62
|
"@types/react-dom": "^18.3.1",
|
|
62
63
|
"@types/react-modal": "^3.13.1",
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
"eslint-config-airbnb-typescript": "^17.1.0",
|
|
72
73
|
"eslint-config-prettier": "^10.1.8",
|
|
73
74
|
"eslint-plugin-import": "2.32.0",
|
|
74
|
-
"eslint-plugin-jsdoc": "^
|
|
75
|
+
"eslint-plugin-jsdoc": "^61.1.4",
|
|
75
76
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
76
77
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
77
78
|
"eslint-plugin-react": "^7.37.4",
|
|
@@ -88,18 +89,18 @@
|
|
|
88
89
|
"react-dom": "^18.3.1",
|
|
89
90
|
"react-styleguidist": "^13.1.4",
|
|
90
91
|
"rollup": "^3.29.4",
|
|
91
|
-
"rollup-plugin-import-css": "^
|
|
92
|
+
"rollup-plugin-import-css": "^4.1.0",
|
|
92
93
|
"style-loader": "^3.3.3",
|
|
93
94
|
"styled-components": "^6.1.19",
|
|
94
95
|
"ts-jest": "^29.3.2",
|
|
95
96
|
"ts-node": "^10.9.2",
|
|
96
97
|
"tslib": "^2.8.1",
|
|
97
98
|
"typescript": "^5.1.6",
|
|
98
|
-
"webpack": "^5.
|
|
99
|
+
"webpack": "^5.102.1"
|
|
99
100
|
},
|
|
100
101
|
"dependencies": {
|
|
101
|
-
"ramda": "^0.
|
|
102
|
-
"react-datepicker": "8.
|
|
102
|
+
"ramda": "^0.32.0",
|
|
103
|
+
"react-datepicker": "8.8.0",
|
|
103
104
|
"react-modal": "^3.16.1",
|
|
104
105
|
"react-select": "^5.8.1",
|
|
105
106
|
"react-spring": "^8.0.27",
|
|
@@ -110,5 +111,8 @@
|
|
|
110
111
|
"react": ">=17.x <=19.x",
|
|
111
112
|
"react-dom": ">=17.x <=19.x",
|
|
112
113
|
"styled-components": "6.x"
|
|
114
|
+
},
|
|
115
|
+
"engines": {
|
|
116
|
+
"node": ">=20"
|
|
113
117
|
}
|
|
114
118
|
}
|