@dnanpm/styleguide 4.0.0 → 4.0.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.
Files changed (45) hide show
  1. package/build/cjs/components/Button/Button.d.ts +2 -1
  2. package/build/cjs/components/Button/Button.js +22 -16
  3. package/build/cjs/components/ButtonArrow/ButtonArrow.js +1 -1
  4. package/build/cjs/components/ButtonIcon/ButtonIcon.js +2 -1
  5. package/build/cjs/components/ButtonPrimary/ButtonPrimary.js +6 -4
  6. package/build/cjs/components/ButtonSecondary/ButtonSecondary.js +6 -4
  7. package/build/cjs/components/Footer/Components/FooterComponents.js +1 -1
  8. package/build/cjs/components/Hero/Hero.js +25 -23
  9. package/build/cjs/components/MainHeaderNavigation/ChildComponents/LanguageSelector.js +10 -9
  10. package/build/cjs/components/MainHeaderNavigation/ChildComponents/LoginTooltip.js +2 -2
  11. package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.d.ts +1 -3
  12. package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.js +4 -6
  13. package/build/cjs/components/MainHeaderNavigation/ChildComponents/MinicartTooltip.js +4 -8
  14. package/build/cjs/components/MainHeaderNavigation/ChildComponents/PageSearch.js +2 -2
  15. package/build/cjs/components/MainHeaderNavigation/MainHeaderNavigation.js +2 -2
  16. package/build/cjs/components/Pill/Pill.js +3 -1
  17. package/build/cjs/components/Tooltip/Tooltip.js +1 -1
  18. package/build/cjs/themes/theme.d.ts +18 -0
  19. package/build/cjs/themes/theme.js +2 -0
  20. package/build/cjs/themes/themeComponents/layout.d.ts +43 -0
  21. package/build/cjs/themes/themeComponents/layout.js +47 -0
  22. package/build/cjs/themes/themeComponents/navigation.d.ts +0 -1
  23. package/build/es/components/Button/Button.d.ts +2 -1
  24. package/build/es/components/Button/Button.js +22 -16
  25. package/build/es/components/ButtonArrow/ButtonArrow.js +1 -1
  26. package/build/es/components/ButtonIcon/ButtonIcon.js +2 -1
  27. package/build/es/components/ButtonPrimary/ButtonPrimary.js +6 -4
  28. package/build/es/components/ButtonSecondary/ButtonSecondary.js +6 -4
  29. package/build/es/components/Footer/Components/FooterComponents.js +1 -1
  30. package/build/es/components/Hero/Hero.js +26 -24
  31. package/build/es/components/MainHeaderNavigation/ChildComponents/LanguageSelector.js +11 -10
  32. package/build/es/components/MainHeaderNavigation/ChildComponents/LoginTooltip.js +2 -2
  33. package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.d.ts +1 -3
  34. package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.js +4 -6
  35. package/build/es/components/MainHeaderNavigation/ChildComponents/MinicartTooltip.js +5 -9
  36. package/build/es/components/MainHeaderNavigation/ChildComponents/PageSearch.js +2 -2
  37. package/build/es/components/MainHeaderNavigation/MainHeaderNavigation.js +2 -2
  38. package/build/es/components/Pill/Pill.js +3 -1
  39. package/build/es/components/Tooltip/Tooltip.js +1 -1
  40. package/build/es/themes/theme.d.ts +18 -0
  41. package/build/es/themes/theme.js +2 -0
  42. package/build/es/themes/themeComponents/layout.d.ts +43 -0
  43. package/build/es/themes/themeComponents/layout.js +43 -0
  44. package/build/es/themes/themeComponents/navigation.d.ts +0 -1
  45. package/package.json +7 -7
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Page layout constants for consistent sizing across the design system.
3
+ *
4
+ * All values are numbers in pixels. Add 'px' suffix when used in CSS.
5
+ *
6
+ * @example
7
+ * const Container = styled.div`
8
+ * max-width: ${theme.layout.content.maxWidth.wide}px; // 1200px
9
+ * margin: 0 auto;
10
+ * `;
11
+ */
12
+ declare const layout: {
13
+ /** Page-level layout constraints */
14
+ readonly page: {
15
+ /** Minimum page width: 320px */
16
+ readonly minWidth: 320;
17
+ /** Maximum page width: 2560px */
18
+ readonly maxWidth: 2560;
19
+ };
20
+ /** Content area layout constraints */
21
+ readonly content: {
22
+ /** Content max-width values (pure content area without padding) */
23
+ readonly maxWidth: {
24
+ /** Wide/Normal content: 1200px */
25
+ readonly wide: 1200;
26
+ /** Medium content: 860px */
27
+ readonly medium: 860;
28
+ /** Narrow/Small content: 640px */
29
+ readonly narrow: 640;
30
+ };
31
+ /** Container max-width values (content + 80px padding on each side) */
32
+ readonly containerMaxWidth: {
33
+ /** Wide container: 1280px (1200 + 80) */
34
+ readonly wide: 1280;
35
+ /** Medium container: 940px (860 + 80) */
36
+ readonly medium: 940;
37
+ /** Narrow container: 720px (640 + 80) */
38
+ readonly narrow: 720;
39
+ };
40
+ };
41
+ };
42
+ export type LayoutTheme = typeof layout;
43
+ export default layout;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Page layout constants for consistent sizing across the design system.
3
+ *
4
+ * All values are numbers in pixels. Add 'px' suffix when used in CSS.
5
+ *
6
+ * @example
7
+ * const Container = styled.div`
8
+ * max-width: ${theme.layout.content.maxWidth.wide}px; // 1200px
9
+ * margin: 0 auto;
10
+ * `;
11
+ */
12
+ const layout = {
13
+ /** Page-level layout constraints */
14
+ page: {
15
+ /** Minimum page width: 320px */
16
+ minWidth: 320,
17
+ /** Maximum page width: 2560px */
18
+ maxWidth: 2560,
19
+ },
20
+ /** Content area layout constraints */
21
+ content: {
22
+ /** Content max-width values (pure content area without padding) */
23
+ maxWidth: {
24
+ /** Wide/Normal content: 1200px */
25
+ wide: 1200,
26
+ /** Medium content: 860px */
27
+ medium: 860,
28
+ /** Narrow/Small content: 640px */
29
+ narrow: 640,
30
+ },
31
+ /** Container max-width values (content + 80px padding on each side) */
32
+ containerMaxWidth: {
33
+ /** Wide container: 1280px (1200 + 80) */
34
+ wide: 1280,
35
+ /** Medium container: 940px (860 + 80) */
36
+ medium: 940,
37
+ /** Narrow container: 720px (640 + 80) */
38
+ narrow: 720,
39
+ },
40
+ },
41
+ };
42
+
43
+ export { layout as default };
@@ -11,7 +11,6 @@ export declare const mobileLogoSize = "3.75em";
11
11
  export declare const desktopLogoSize = "5.25em";
12
12
  export declare const menuItemMargin = "1rem";
13
13
  export declare const ribbonHeight = "1.5625rem";
14
- export declare const wideMenuBreakpoint = 1280;
15
14
  export declare const IconContainerWidth = "3.75rem";
16
15
  export declare const IconContainerMinWidth = "2.5rem";
17
16
  export declare const navMaxHeight = "3.75rem";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dnanpm/styleguide",
3
3
  "sideEffects": false,
4
- "version": "v4.0.0",
4
+ "version": "v4.0.2",
5
5
  "main": "build/cjs/index.js",
6
6
  "module": "build/es/index.js",
7
7
  "jsnext:main": "build/es/index.js",
@@ -49,7 +49,7 @@
49
49
  "@babel/preset-react": "^7.26.3",
50
50
  "@babel/preset-typescript": "^7.28.5",
51
51
  "@dnanpm/icons": "^2.0.9",
52
- "@eslint/eslintrc": "^3.3.1",
52
+ "@eslint/eslintrc": "^3.3.3",
53
53
  "@eslint/js": "^9.39.1",
54
54
  "@rollup/plugin-commonjs": "^29.0.0",
55
55
  "@rollup/plugin-node-resolve": "^16.0.3",
@@ -66,14 +66,14 @@
66
66
  "@types/react-modal": "^3.13.1",
67
67
  "@types/resize-observer-browser": "^0.1.8",
68
68
  "@typescript-eslint/eslint-plugin": "^8.46.4",
69
- "@typescript-eslint/parser": "^8.46.4",
69
+ "@typescript-eslint/parser": "^8.48.1",
70
70
  "babel-loader": "^9.2.1",
71
71
  "cross-env": "^10.0.0",
72
72
  "css-loader": "^6.11.0",
73
73
  "eslint": "^9.39.1",
74
74
  "eslint-config-prettier": "^10.1.8",
75
75
  "eslint-plugin-import": "^2.32.0",
76
- "eslint-plugin-jsdoc": "^61.2.0",
76
+ "eslint-plugin-jsdoc": "^61.4.1",
77
77
  "eslint-plugin-jsx-a11y": "^6.10.2",
78
78
  "eslint-plugin-react": "^7.37.5",
79
79
  "eslint-plugin-react-hooks": "^7.0.1",
@@ -96,15 +96,15 @@
96
96
  "ts-node": "^10.9.2",
97
97
  "tslib": "^2.8.1",
98
98
  "typescript": "^5.1.6",
99
- "webpack": "^5.102.1"
99
+ "webpack": "^5.103.0"
100
100
  },
101
101
  "dependencies": {
102
102
  "ramda": "^0.32.0",
103
- "react-datepicker": "8.9.0",
103
+ "react-datepicker": "8.10.0",
104
104
  "react-modal": "^3.16.1",
105
105
  "react-select": "^5.8.1",
106
106
  "react-spring": "^8.0.27",
107
- "react-tooltip": "^5.28.1"
107
+ "react-tooltip": "^5.30.0"
108
108
  },
109
109
  "peerDependencies": {
110
110
  "@dnanpm/icons": "^2.x",