@hlf-fe/pulmo-ui 1.0.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.
Files changed (44) hide show
  1. package/README.md +54 -0
  2. package/dist/App.d.ts +3 -0
  3. package/dist/App.js +10 -0
  4. package/dist/components/buttons/button/button.d.ts +25 -0
  5. package/dist/components/buttons/button/button.js +80 -0
  6. package/dist/components/buttons/button/button.stories.d.ts +9 -0
  7. package/dist/components/buttons/button/button.stories.js +30 -0
  8. package/dist/hoc/withDefaultTheme.d.ts +1 -0
  9. package/dist/hoc/withDefaultTheme.js +12 -0
  10. package/dist/index.d.ts +3 -0
  11. package/dist/index.js +3 -0
  12. package/dist/main.d.ts +1 -0
  13. package/dist/main.js +6 -0
  14. package/dist/stories/Button.d.ts +14 -0
  15. package/dist/stories/Button.js +20 -0
  16. package/dist/stories/Button.stories.d.ts +23 -0
  17. package/dist/stories/Button.stories.js +44 -0
  18. package/dist/stories/Header.d.ts +12 -0
  19. package/dist/stories/Header.js +4 -0
  20. package/dist/stories/Header.stories.d.ts +18 -0
  21. package/dist/stories/Header.stories.js +26 -0
  22. package/dist/stories/Page.d.ts +3 -0
  23. package/dist/stories/Page.js +7 -0
  24. package/dist/stories/Page.stories.d.ts +12 -0
  25. package/dist/stories/Page.stories.js +24 -0
  26. package/dist/styles/mixins.d.ts +50 -0
  27. package/dist/styles/mixins.js +353 -0
  28. package/dist/styles/styles/mixins/theme-mixins.d.ts +5 -0
  29. package/dist/styles/styles/mixins/theme-mixins.js +37 -0
  30. package/dist/styles/styles/mixins/units.d.ts +3 -0
  31. package/dist/styles/styles/mixins/units.js +3 -0
  32. package/dist/styles/styles/mixins.d.ts +48 -0
  33. package/dist/styles/styles/mixins.js +336 -0
  34. package/dist/styles/styles/theme.d.ts +135 -0
  35. package/dist/styles/styles/theme.js +77 -0
  36. package/dist/styles/theme.d.ts +135 -0
  37. package/dist/styles/theme.js +84 -0
  38. package/dist/styles/types.d.ts +3 -0
  39. package/dist/styles/types.js +1 -0
  40. package/dist/styles/units.d.ts +3 -0
  41. package/dist/styles/units.js +3 -0
  42. package/dist/styles/withDefaultTheme.d.ts +1 -0
  43. package/dist/styles/withDefaultTheme.js +12 -0
  44. package/package.json +67 -0
@@ -0,0 +1,84 @@
1
+ import { rem } from "./units";
2
+ export const BREAKPOINT_VALUES = {
3
+ XS: 360,
4
+ S: 576,
5
+ S_ALT: 676,
6
+ M: 768,
7
+ L: 1024,
8
+ XL: 1200,
9
+ XXL: 1440,
10
+ };
11
+ export const VARIABLES = {
12
+ siteWidthS: rem(BREAKPOINT_VALUES.S_ALT),
13
+ siteWidth: rem(BREAKPOINT_VALUES.L),
14
+ siteWidthXL: rem(BREAKPOINT_VALUES.XL),
15
+ siteMaxWidth: rem(1920),
16
+ mobileNavHeight: 56,
17
+ };
18
+ export const THEME_SPACING = {
19
+ sm: rem(16),
20
+ md: rem(24),
21
+ lg: rem(32),
22
+ xl: rem(40),
23
+ };
24
+ export const SPACING = {
25
+ spacingXXS: rem(6),
26
+ spacingXS: rem(8),
27
+ spacingS: rem(12),
28
+ spacingM: rem(16),
29
+ spacingL: rem(32),
30
+ spacingXL: rem(40),
31
+ spacingXXL: rem(48),
32
+ };
33
+ export const FONTS = {
34
+ valueRegular: '"ValueRegular", Arial, sans-serif',
35
+ valueMedium: '"ValueMedium", Arial, sans-serif',
36
+ valueBold: '"ValueBold", Arial, sans-serif',
37
+ };
38
+ export const COLORS = {
39
+ skyBlue: "#d1e4ed",
40
+ black: "#000",
41
+ blackLight: "#333333",
42
+ blackGray: "#858585",
43
+ blueLight: "#d1e3ed",
44
+ blueLightGray: "#dfeff7",
45
+ blue: "#4195be",
46
+ blueNavy: "#0C4670",
47
+ blackCoral: "#5A5F61",
48
+ cadetBlue: "#A4B6BF",
49
+ grayLight: "#f2f2f2",
50
+ gray: "#d3d3d3",
51
+ grayDark: "#8e8e8e",
52
+ grayTransparent: "rgba(51,51,51,.15)",
53
+ grayPale: "#dddddd",
54
+ green: "#59b290",
55
+ white: "#fff",
56
+ offWhite: "#fafafa",
57
+ redLight: "#ff6e6e",
58
+ red: "#ea2337",
59
+ redSecondary: "#ec1b2e",
60
+ redDark: "#be3639",
61
+ redHover: "#c11021",
62
+ redClear: "#d81125",
63
+ redWCAG: "#E71328",
64
+ pink: "#fbdfd9",
65
+ lightBlue: "#e4eef4",
66
+ mediumBlue: "#76B2CE",
67
+ mint: "#d6ebe3",
68
+ lilac: "#F5ECF5",
69
+ lavender: "#e6d1e5",
70
+ purple: "#9B4391",
71
+ smokeGray: "#f7f7f7",
72
+ yellowLight: "#ffecc4",
73
+ yellow: "#ffe5b1",
74
+ yellowDark: "#ffd379",
75
+ };
76
+ export const FONT_SIZES = {};
77
+ export const THEME_SETTINGS = {
78
+ ...BREAKPOINT_VALUES,
79
+ ...VARIABLES,
80
+ ...FONTS,
81
+ ...COLORS,
82
+ ...FONT_SIZES,
83
+ ...SPACING,
84
+ };
@@ -0,0 +1,3 @@
1
+ export type Arrow = {
2
+ color?: string;
3
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare const relUnit: (absoluteUnit: number) => number;
2
+ export declare const rem: (absoluteUnit: number) => string;
3
+ export declare const em: (absoluteUnit: number) => string;
@@ -0,0 +1,3 @@
1
+ export const relUnit = (absoluteUnit) => absoluteUnit / 16;
2
+ export const rem = (absoluteUnit) => `${relUnit(absoluteUnit)}rem`;
3
+ export const em = (absoluteUnit) => `${relUnit(absoluteUnit)}em`;
@@ -0,0 +1 @@
1
+ export declare const withDefaultTheme: (Component: React.FC<any>) => (props: any) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useContext } from "react";
3
+ import { THEME_SETTINGS } from "./theme";
4
+ import { ThemeContext, ThemeProvider } from "styled-components";
5
+ export const withDefaultTheme = (Component) => {
6
+ return (props) => {
7
+ const theme = useContext(ThemeContext);
8
+ if (theme)
9
+ return _jsx(Component, Object.assign({}, props));
10
+ return (_jsx(ThemeProvider, { theme: THEME_SETTINGS, children: _jsx(Component, Object.assign({}, props)) }));
11
+ };
12
+ };
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@hlf-fe/pulmo-ui",
3
+ "private": false,
4
+ "version": "1.0.0",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "dev": "npm-run-all --parallel storybook watch",
14
+ "build": "tsc -b tsconfig.app.json",
15
+ "watch": "tsc -b tsconfig.app.json --watch",
16
+ "lint": "eslint .",
17
+ "preview": "vite preview",
18
+ "storybook": "storybook dev -p 6006",
19
+ "build-storybook": "storybook build"
20
+ },
21
+ "dependencies": {
22
+ "gatsby": "^5.14.3",
23
+ "npm-run-all": "^4.1.5",
24
+ "react": "^18.2.0",
25
+ "react-dom": "^18.2.0",
26
+ "styled-components": "^6.1.18"
27
+ },
28
+ "peerDependencies": {
29
+ "react": "^18.2.0",
30
+ "react-dom": "^18.2.0",
31
+ "gatsby": "^5.14.3",
32
+ "styled-components": "^6.1.0"
33
+ },
34
+ "devDependencies": {
35
+ "@chromatic-com/storybook": "^3.2.6",
36
+ "@eslint/js": "^9.25.0",
37
+ "@storybook/addon-essentials": "^8.6.12",
38
+ "@storybook/addon-onboarding": "^8.6.12",
39
+ "@storybook/blocks": "^8.6.12",
40
+ "@storybook/experimental-addon-test": "^8.6.12",
41
+ "@storybook/react": "^8.6.12",
42
+ "@storybook/react-vite": "^8.6.12",
43
+ "@storybook/test": "^8.6.12",
44
+ "@types/node": "^22.15.17",
45
+ "@types/react": "^18.3.21",
46
+ "@types/react-dom": "^18.3.7",
47
+ "@vitejs/plugin-react": "^4.4.1",
48
+ "@vitest/browser": "^3.1.3",
49
+ "@vitest/coverage-v8": "^3.1.3",
50
+ "eslint": "^9.25.0",
51
+ "eslint-plugin-react-hooks": "^5.2.0",
52
+ "eslint-plugin-react-refresh": "^0.4.19",
53
+ "eslint-plugin-storybook": "^0.12.0",
54
+ "globals": "^16.0.0",
55
+ "playwright": "^1.52.0",
56
+ "storybook": "^8.6.12",
57
+ "typescript": "~5.8.3",
58
+ "typescript-eslint": "^8.30.1",
59
+ "vite": "^6.3.5",
60
+ "vitest": "^3.1.3"
61
+ },
62
+ "eslintConfig": {
63
+ "extends": [
64
+ "plugin:storybook/recommended"
65
+ ]
66
+ }
67
+ }