@axos-web-dev/shared-components 0.0.7 → 0.0.8

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.
@@ -1,7 +1,7 @@
1
1
  import { PropsWithChildren } from "react";
2
2
  import { FormProps } from ".";
3
3
  export interface renderFormProps extends FormProps, PropsWithChildren {
4
- formName?: string;
4
+ form?: string;
5
5
  }
6
6
  export declare const renderSwitch: (form: string | undefined, props: FormProps) => import("react/jsx-runtime").JSX.Element;
7
7
  export declare const RenderWebForm: (props: renderFormProps) => import("react/jsx-runtime").JSX.Element;
@@ -11,7 +11,7 @@ const renderSwitch = (form = "Contact Form", props) => {
11
11
  }
12
12
  };
13
13
  const RenderWebForm = (props) => {
14
- return /* @__PURE__ */ jsx(Fragment, { children: renderSwitch(props.formName, props) });
14
+ return /* @__PURE__ */ jsx(Fragment, { children: renderSwitch(props.form, props) });
15
15
  };
16
16
  export {
17
17
  RenderWebForm,
@@ -6,8 +6,8 @@ export interface FormProps extends PropsWithChildren {
6
6
  [index: string]: string;
7
7
  }) => void;
8
8
  icon?: boolean;
9
- headline?: ReactNode;
10
- disclosure?: ReactNode;
9
+ headline?: ReactNode | string;
10
+ disclosure?: ReactNode | string;
11
11
  variant?: QuaternaryTypes;
12
12
  validateEmail: (email: string) => Promise<boolean>;
13
13
  callToAction: Omit<ChevronProps, "targetUrl">;
@@ -7,12 +7,13 @@ import { containerIconBillboard, layout, billboard_icon, content, headerIconBill
7
7
  const IconBillboard = (props) => {
8
8
  const {
9
9
  callToActionRow,
10
- variant,
10
+ variant: fullVariant = "primary",
11
11
  side = false,
12
12
  items,
13
13
  headline,
14
14
  body
15
15
  } = props;
16
+ const variant = getVariant(fullVariant);
16
17
  return /* @__PURE__ */ jsxs("div", { className: containerIconBillboard({ variant }), children: [
17
18
  /* @__PURE__ */ jsxs("div", { className: layout({ side }), children: [
18
19
  /* @__PURE__ */ jsx("div", { className: billboard_icon, children: props.icon }),
@@ -25,52 +25,61 @@ const IconBillboardSet = ({
25
25
  bodyCopy && /* @__PURE__ */ jsx(Fragment, { children: bodyCopy })
26
26
  ] }),
27
27
  /* @__PURE__ */ jsx("div", { className: section_container, children: iconBillboards.map(
28
- ({ id, icon, headline: headline2, bodyCopy: bodyCopy2, bullets, callToActionRow }) => /* @__PURE__ */ jsxs("div", { className: containerIconBillboard({ variant }), children: [
29
- /* @__PURE__ */ jsxs("div", { className: layout({ side }), children: [
30
- icon && /* @__PURE__ */ jsx("div", { className: billboard_icon, children: /* @__PURE__ */ jsx(
31
- "img",
32
- {
33
- src: icon == null ? void 0 : icon.src,
34
- className: "img_fluid",
35
- alt: icon == null ? void 0 : icon.alt
36
- }
37
- ) }),
38
- /* @__PURE__ */ jsxs("div", { className: content, children: [
39
- /* @__PURE__ */ jsxs("div", { className: headerIconBillboard, children: [
40
- /* @__PURE__ */ jsx("div", { className: title({ variant }), children: headline2 }),
41
- /* @__PURE__ */ jsx("div", { children: bodyCopy2 })
28
+ ({ id, icon, headline: headline2, bodyCopy: bodyCopy2, bullets, callToActionRow }) => /* @__PURE__ */ jsxs(
29
+ "div",
30
+ {
31
+ className: containerIconBillboard({
32
+ variant: getVariant(variant)
33
+ }),
34
+ children: [
35
+ /* @__PURE__ */ jsxs("div", { className: layout({ side }), children: [
36
+ icon && /* @__PURE__ */ jsx("div", { className: billboard_icon, children: /* @__PURE__ */ jsx(
37
+ "img",
38
+ {
39
+ src: icon == null ? void 0 : icon.src,
40
+ className: "img_fluid",
41
+ alt: icon == null ? void 0 : icon.alt
42
+ }
43
+ ) }),
44
+ /* @__PURE__ */ jsxs("div", { className: content, children: [
45
+ /* @__PURE__ */ jsxs("div", { className: headerIconBillboard, children: [
46
+ /* @__PURE__ */ jsx("div", { className: title({ variant }), children: headline2 }),
47
+ /* @__PURE__ */ jsx("div", { children: bodyCopy2 })
48
+ ] }),
49
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("ul", { className: list, children: bullets.map((item) => /* @__PURE__ */ jsx(BulletItem, { id: item.id, children: item.copy }, item.id)) }) })
50
+ ] })
42
51
  ] }),
43
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("ul", { className: list, children: bullets.map((item) => /* @__PURE__ */ jsx(BulletItem, { id: item.id, children: item.copy }, item.id)) }) })
44
- ] })
45
- ] }),
46
- callToActionRow && /* @__PURE__ */ jsx("div", { className: buttons, children: callToActionRow.map(
47
- ({
48
- id: id2,
49
- variant: variant2,
50
- displayText,
51
- targetUrl,
52
- type
53
- }) => type === "Button" ? /* @__PURE__ */ jsx(
54
- Button,
55
- {
56
- targetUrl,
57
- color: getVariant(variant2),
58
- size: "medium",
59
- rounded: "medium",
60
- children: displayText
61
- },
62
- id2
63
- ) : /* @__PURE__ */ jsx(
64
- Chevron,
65
- {
66
- targetUrl,
67
- variant: getVariant(variant2),
68
- children: displayText
69
- },
70
- id2
71
- )
72
- ) })
73
- ] }, id)
52
+ callToActionRow && /* @__PURE__ */ jsx("div", { className: buttons, children: callToActionRow.map(
53
+ ({
54
+ id: id2,
55
+ variant: variant2,
56
+ displayText,
57
+ targetUrl,
58
+ type
59
+ }) => type === "Button" ? /* @__PURE__ */ jsx(
60
+ Button,
61
+ {
62
+ targetUrl,
63
+ color: getVariant(variant2),
64
+ size: "medium",
65
+ rounded: "medium",
66
+ children: displayText
67
+ },
68
+ id2
69
+ ) : /* @__PURE__ */ jsx(
70
+ Chevron,
71
+ {
72
+ targetUrl,
73
+ variant: getVariant(variant2),
74
+ children: displayText
75
+ },
76
+ id2
77
+ )
78
+ ) })
79
+ ]
80
+ },
81
+ id
82
+ )
74
83
  ) }),
75
84
  additionalDetails && /* @__PURE__ */ jsx("div", { className: section_text, children: /* @__PURE__ */ jsx(Fragment, { children: additionalDetails }) })
76
85
  ] });
@@ -86,7 +86,6 @@
86
86
  object-fit: cover;
87
87
  aspect-ratio: 1 / 1;
88
88
  min-width: 600px;
89
- max-height: 480px;
90
89
  }
91
90
  ._1m7m2an {
92
91
  padding: 32px 28px;
package/package.json CHANGED
@@ -1,105 +1,105 @@
1
- {
2
- "name": "@axos-web-dev/shared-components",
3
- "description": "Axos shared components library for web.",
4
- "version": "0.0.7",
5
- "type": "module",
6
- "module": "dist/main.js",
7
- "types": "dist/main.d.ts",
8
- "files": [
9
- "dist"
10
- ],
11
- "sideEffects": [
12
- "dist/assets/**/*.css"
13
- ],
14
- "scripts": {
15
- "dev": "vite",
16
- "build": "tsc --p ./tsconfig.build.json && vite build",
17
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
18
- "preview": "vite preview",
19
- "prepublishOnly": "npm run build",
20
- "check-types": "tsc --pretty --noEmit",
21
- "check-format": "prettier --check .",
22
- "check-lint": "eslint . --ext ts --ext tsx --ext js",
23
- "format": "prettier --write .",
24
- "test-all": "npm run check-format && npm run check-lint && npm run check-types && npm run build",
25
- "prepare": "husky install",
26
- "storybook": "storybook dev -p 6006",
27
- "build-storybook": "storybook build",
28
- "npm:link": "npm run build && npm link"
29
- },
30
- "dependencies": {
31
- "@hookform/resolvers": "^3.3.4",
32
- "@storybook/builder-vite": "^7.6.13",
33
- "@storybook/preview-api": "^7.6.16",
34
- "@vanilla-extract/css": "^1.14.1",
35
- "@vanilla-extract/recipes": "^0.5.1",
36
- "clsx": "^2.1.0",
37
- "react-hook-form": "^7.51.1",
38
- "react-markdown": "^9.0.1",
39
- "react-use": "^17.5.0",
40
- "typed-css-modules": "^0.9.1",
41
- "vite-plugin-svgr": "^4.2.0",
42
- "zod": "^3.22.4",
43
- "zustand": "^4.5.0"
44
- },
45
- "peerDependencies": {
46
- "@vanilla-extract/css": "^1.14.1",
47
- "@vanilla-extract/css-utils": "^0.1.3",
48
- "@vanilla-extract/recipes": "^0.5.1",
49
- "@vanilla-extract/vite-plugin": "^4.0.3",
50
- "next": "14.0.4",
51
- "react": "^18.2.0",
52
- "react-dom": "^18.2.0"
53
- },
54
- "devDependencies": {
55
- "@rollup/plugin-alias": "^5.1.0",
56
- "@storybook/addon-essentials": "^7.6.13",
57
- "@storybook/addon-interactions": "^7.6.13",
58
- "@storybook/addon-links": "^7.6.13",
59
- "@storybook/addon-onboarding": "^1.0.11",
60
- "@storybook/addon-themes": "^7.6.10",
61
- "@storybook/blocks": "^7.6.13",
62
- "@storybook/react": "^7.6.13",
63
- "@storybook/react-vite": "^7.6.13",
64
- "@storybook/test": "^7.6.13",
65
- "@svgr/core": "^8.1.0",
66
- "@svgr/plugin-prettier": "^8.1.0",
67
- "@svgr/plugin-svgo": "^8.1.0",
68
- "@types/node": "^20.11.16",
69
- "@types/react": "^18.2.43",
70
- "@types/react-dom": "^18.2.17",
71
- "@typescript-eslint/eslint-plugin": "^6.14.0",
72
- "@typescript-eslint/parser": "^6.14.0",
73
- "@vanilla-extract/css-utils": "^0.1.3",
74
- "@vanilla-extract/recipes": "^0.5.1",
75
- "@vanilla-extract/vite-plugin": "^4.0.3",
76
- "@vitejs/plugin-react-swc": "^3.5.0",
77
- "esbuild-vanilla-image-loader": "^0.1.3",
78
- "eslint": "^8.55.0",
79
- "eslint-plugin-react-hooks": "^4.6.0",
80
- "eslint-plugin-react-refresh": "^0.4.5",
81
- "eslint-plugin-storybook": "^0.6.15",
82
- "glob": "^10.3.10",
83
- "husky": "^8.0.0",
84
- "prettier": "3.2.5",
85
- "react": "^18.2.0",
86
- "react-dom": "^18.2.0",
87
- "rollup-plugin-preserve-directives": "^0.4.0",
88
- "rollup-plugin-svg-import": "^3.0.0",
89
- "rollup-plugin-svgo": "^2.0.0",
90
- "storybook": "^7.6.13",
91
- "typescript": "^5.2.2",
92
- "typescript-plugin-css-modules": "^5.1.0",
93
- "vite": "^5.0.8",
94
- "vite-plugin-dts": "^3.7.3",
95
- "vite-plugin-lib-inject-css": "^1.3.0",
96
- "vite-plugin-setting-css-module": "^1.1.4",
97
- "vite-tsconfig-paths": "^4.3.1"
98
- },
99
- "main": "index.js",
100
- "directories": {
101
- "lib": "lib"
102
- },
103
- "author": "axos-web-dev",
104
- "license": "ISC"
105
- }
1
+ {
2
+ "name": "@axos-web-dev/shared-components",
3
+ "description": "Axos shared components library for web.",
4
+ "version": "0.0.8",
5
+ "type": "module",
6
+ "module": "dist/main.js",
7
+ "types": "dist/main.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "sideEffects": [
12
+ "dist/assets/**/*.css"
13
+ ],
14
+ "scripts": {
15
+ "dev": "vite",
16
+ "build": "tsc --p ./tsconfig.build.json && vite build",
17
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
18
+ "preview": "vite preview",
19
+ "prepublishOnly": "npm run build",
20
+ "check-types": "tsc --pretty --noEmit",
21
+ "check-format": "prettier --check .",
22
+ "check-lint": "eslint . --ext ts --ext tsx --ext js",
23
+ "format": "prettier --write .",
24
+ "test-all": "npm run check-format && npm run check-lint && npm run check-types && npm run build",
25
+ "prepare": "husky install",
26
+ "storybook": "storybook dev -p 6006",
27
+ "build-storybook": "storybook build",
28
+ "npm:link": "npm run build && npm link"
29
+ },
30
+ "dependencies": {
31
+ "@hookform/resolvers": "^3.3.4",
32
+ "@storybook/builder-vite": "^7.6.13",
33
+ "@storybook/preview-api": "^7.6.16",
34
+ "@vanilla-extract/css": "^1.14.1",
35
+ "@vanilla-extract/recipes": "^0.5.1",
36
+ "clsx": "^2.1.0",
37
+ "react-hook-form": "^7.51.1",
38
+ "react-markdown": "^9.0.1",
39
+ "react-use": "^17.5.0",
40
+ "typed-css-modules": "^0.9.1",
41
+ "vite-plugin-svgr": "^4.2.0",
42
+ "zod": "^3.22.4",
43
+ "zustand": "^4.5.0"
44
+ },
45
+ "peerDependencies": {
46
+ "@vanilla-extract/css": "^1.14.1",
47
+ "@vanilla-extract/css-utils": "^0.1.3",
48
+ "@vanilla-extract/recipes": "^0.5.1",
49
+ "@vanilla-extract/vite-plugin": "^4.0.3",
50
+ "next": "14.0.4",
51
+ "react": "^18.2.0",
52
+ "react-dom": "^18.2.0"
53
+ },
54
+ "devDependencies": {
55
+ "@rollup/plugin-alias": "^5.1.0",
56
+ "@storybook/addon-essentials": "^7.6.13",
57
+ "@storybook/addon-interactions": "^7.6.13",
58
+ "@storybook/addon-links": "^7.6.13",
59
+ "@storybook/addon-onboarding": "^1.0.11",
60
+ "@storybook/addon-themes": "^7.6.10",
61
+ "@storybook/blocks": "^7.6.13",
62
+ "@storybook/react": "^7.6.13",
63
+ "@storybook/react-vite": "^7.6.13",
64
+ "@storybook/test": "^7.6.13",
65
+ "@svgr/core": "^8.1.0",
66
+ "@svgr/plugin-prettier": "^8.1.0",
67
+ "@svgr/plugin-svgo": "^8.1.0",
68
+ "@types/node": "^20.11.16",
69
+ "@types/react": "^18.2.43",
70
+ "@types/react-dom": "^18.2.17",
71
+ "@typescript-eslint/eslint-plugin": "^6.14.0",
72
+ "@typescript-eslint/parser": "^6.14.0",
73
+ "@vanilla-extract/css-utils": "^0.1.3",
74
+ "@vanilla-extract/recipes": "^0.5.1",
75
+ "@vanilla-extract/vite-plugin": "^4.0.3",
76
+ "@vitejs/plugin-react-swc": "^3.5.0",
77
+ "esbuild-vanilla-image-loader": "^0.1.3",
78
+ "eslint": "^8.55.0",
79
+ "eslint-plugin-react-hooks": "^4.6.0",
80
+ "eslint-plugin-react-refresh": "^0.4.5",
81
+ "eslint-plugin-storybook": "^0.6.15",
82
+ "glob": "^10.3.10",
83
+ "husky": "^8.0.0",
84
+ "prettier": "3.2.5",
85
+ "react": "^18.2.0",
86
+ "react-dom": "^18.2.0",
87
+ "rollup-plugin-preserve-directives": "^0.4.0",
88
+ "rollup-plugin-svg-import": "^3.0.0",
89
+ "rollup-plugin-svgo": "^2.0.0",
90
+ "storybook": "^7.6.13",
91
+ "typescript": "^5.2.2",
92
+ "typescript-plugin-css-modules": "^5.1.0",
93
+ "vite": "^5.0.8",
94
+ "vite-plugin-dts": "^3.7.3",
95
+ "vite-plugin-lib-inject-css": "^1.3.0",
96
+ "vite-plugin-setting-css-module": "^1.1.4",
97
+ "vite-tsconfig-paths": "^4.3.1"
98
+ },
99
+ "main": "index.js",
100
+ "directories": {
101
+ "lib": "lib"
102
+ },
103
+ "author": "axos-web-dev",
104
+ "license": "ISC"
105
+ }