@courtneyring/components-library 0.1.0 → 1.0.1

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 (57) hide show
  1. package/README.md +60 -27
  2. package/dist/ScrollTrigger-DDbij8gI.js +3102 -0
  3. package/dist/animations/FadeIn.js +26 -0
  4. package/dist/animations/FadeInMotion.js +4785 -0
  5. package/dist/assets/Background.css +1 -0
  6. package/dist/assets/Banner.css +1 -0
  7. package/dist/assets/BorderedBackground.css +1 -0
  8. package/dist/assets/Button.css +1 -0
  9. package/dist/assets/Container.css +1 -0
  10. package/dist/assets/Fifty.css +1 -0
  11. package/dist/assets/Footer.css +1 -0
  12. package/dist/assets/ImageTextBlock.css +1 -0
  13. package/dist/assets/List.css +1 -0
  14. package/dist/assets/MenuButton.css +1 -0
  15. package/dist/assets/Navbar.css +1 -0
  16. package/dist/assets/Note.css +1 -0
  17. package/dist/assets/Overlay.css +1 -0
  18. package/dist/assets/OverlayHero.css +1 -0
  19. package/dist/assets/PageContainer.css +1 -0
  20. package/dist/assets/Promo.css +1 -0
  21. package/dist/assets/PromoGroup.css +1 -0
  22. package/dist/assets/Timeline.css +1 -0
  23. package/dist/assets/icons/checkmark.svg +3 -0
  24. package/dist/components/Background/Background.js +55 -0
  25. package/dist/components/Banner/Banner.js +14 -0
  26. package/dist/components/BorderedBackground/BorderedBackground.js +40 -0
  27. package/dist/components/Button/Button.js +30 -13
  28. package/dist/components/Container/Container.js +9 -0
  29. package/dist/components/Fifty/Fifty.js +33 -0
  30. package/dist/components/Fifty/Fifty.stories.js +32 -0
  31. package/dist/components/Footer/Footer.js +13 -0
  32. package/dist/components/Icon/Icon.js +13 -0
  33. package/dist/components/ImageTextBlock/ImageTextBlock.js +39 -0
  34. package/dist/components/List/List.js +20 -0
  35. package/dist/components/MenuButton/MenuButton.js +18 -0
  36. package/dist/components/Navbar/Navbar.js +416 -0
  37. package/dist/components/Note/Note.js +26 -0
  38. package/dist/components/Overlay/Overlay.js +31 -0
  39. package/dist/components/OverlayHero/OverlayHero.js +24 -0
  40. package/dist/components/PageContainer/PageContainer.js +25 -0
  41. package/dist/components/Promo/Promo.js +24 -0
  42. package/dist/components/PromoGroup/PromoGroup.js +9 -0
  43. package/dist/components/Timeline/Timeline.js +53 -0
  44. package/dist/hooks/useFadeIn.js +27 -0
  45. package/dist/hooks/useRepeatable.js +32 -0
  46. package/dist/hooks/useResize.js +19 -0
  47. package/dist/hooks/useResponsive.js +15 -0
  48. package/dist/index-BIlioXmW.js +47 -0
  49. package/dist/index-BlCqcUwj.js +29 -0
  50. package/dist/main.js +30 -0
  51. package/dist/utils/breakpoints.js +8 -0
  52. package/dist/utils/gsapSetup.js +7 -0
  53. package/dist/utils/parse.js +12 -0
  54. package/package.json +38 -25
  55. package/dist/components/Button/Button.d.ts +0 -12
  56. package/dist/exports.d.ts +0 -1
  57. package/dist/exports.js +0 -18
@@ -0,0 +1,32 @@
1
+ import { useState as k, useEffect as j } from "react";
2
+ const L = ({ componentType: o, copy: l, length: a }) => {
3
+ const [f, i] = k([]), b = {
4
+ promo: {
5
+ header: "Header",
6
+ body: "Body",
7
+ linkUrl: "LinkUrl",
8
+ linkLabel: "LinkLabel",
9
+ icon: "Icon"
10
+ },
11
+ textBlock: {
12
+ title: "Title",
13
+ body: "Body"
14
+ }
15
+ }, n = ({ componentType: e, copy: t, i: r }) => {
16
+ let u = b[`${e}`], s = {};
17
+ for (let [d, c] of Object.entries(u))
18
+ s[d] = t[`${e}${c}${r + 1}`];
19
+ return s;
20
+ };
21
+ return j(() => {
22
+ let e = [];
23
+ for (let t = 0; t < a; t++) {
24
+ let r = n({ componentType: o, copy: l, i: t });
25
+ e.push(r);
26
+ }
27
+ i(e);
28
+ }, [o, l, a]), f;
29
+ };
30
+ export {
31
+ L as default
32
+ };
@@ -0,0 +1,19 @@
1
+ import { useState as t, useEffect as r } from "react";
2
+ const o = () => {
3
+ const [e, i] = t({
4
+ innerWidth: typeof window < "u" && window.innerWidth,
5
+ innerHeight: typeof window < "u" && window.innerHeight
6
+ });
7
+ return r(() => {
8
+ const n = () => {
9
+ i({
10
+ innerWidth: window.innerWidth,
11
+ innerHeight: window.innerHeight
12
+ });
13
+ };
14
+ return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
15
+ }, [e]), e;
16
+ };
17
+ export {
18
+ o as default
19
+ };
@@ -0,0 +1,15 @@
1
+ import { useState as u, useEffect as f } from "react";
2
+ import c from "./useResize.js";
3
+ const a = (s) => {
4
+ const [e, o] = u(!1), r = c(), { innerWidth: t, innerHeight: i } = r;
5
+ return f(() => {
6
+ const n = s({
7
+ innerWidth: t,
8
+ innerHeight: i
9
+ });
10
+ n !== e && o(n);
11
+ }, [e, t, i, s]), e;
12
+ };
13
+ export {
14
+ a as default
15
+ };
@@ -0,0 +1,47 @@
1
+ function c(e) {
2
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
3
+ }
4
+ var o = { exports: {} };
5
+ /*!
6
+ Copyright (c) 2018 Jed Watson.
7
+ Licensed under the MIT License (MIT), see
8
+ http://jedwatson.github.io/classnames
9
+ */
10
+ var i;
11
+ function p() {
12
+ return i || (i = 1, (function(e) {
13
+ (function() {
14
+ var u = {}.hasOwnProperty;
15
+ function s() {
16
+ for (var t = "", r = 0; r < arguments.length; r++) {
17
+ var n = arguments[r];
18
+ n && (t = a(t, f(n)));
19
+ }
20
+ return t;
21
+ }
22
+ function f(t) {
23
+ if (typeof t == "string" || typeof t == "number")
24
+ return t;
25
+ if (typeof t != "object")
26
+ return "";
27
+ if (Array.isArray(t))
28
+ return s.apply(null, t);
29
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
30
+ return t.toString();
31
+ var r = "";
32
+ for (var n in t)
33
+ u.call(t, n) && t[n] && (r = a(r, n));
34
+ return r;
35
+ }
36
+ function a(t, r) {
37
+ return r ? t ? t + " " + r : t + r : t;
38
+ }
39
+ e.exports ? (s.default = s, e.exports = s) : window.classNames = s;
40
+ })();
41
+ })(o)), o.exports;
42
+ }
43
+ var l = p();
44
+ const m = /* @__PURE__ */ c(l);
45
+ export {
46
+ m as c
47
+ };
@@ -0,0 +1,29 @@
1
+ import { useRef as u, useLayoutEffect as x, useEffect as S } from "react";
2
+ import { g as h } from "./ScrollTrigger-DDbij8gI.js";
3
+ /*!
4
+ * @gsap/react 2.1.2
5
+ * https://gsap.com
6
+ *
7
+ * Copyright 2008-2025, GreenSock. All rights reserved.
8
+ * Subject to the terms at https://gsap.com/standard-license or for
9
+ * Club GSAP members, the agreement issued with that membership.
10
+ * @author: Jack Doyle, jack@greensock.com
11
+ */
12
+ let c = typeof document < "u" ? x : S, p = (e) => e && !Array.isArray(e) && typeof e == "object", o = [], A = {}, m = h;
13
+ const g = (e, t = o) => {
14
+ let r = A;
15
+ p(e) ? (r = e, e = null, t = "dependencies" in r ? r.dependencies : o) : p(t) && (r = t, t = "dependencies" in r ? r.dependencies : o), e && typeof e != "function" && console.warn("First parameter must be a function or config object");
16
+ const { scope: f, revertOnUpdate: y } = r, s = u(!1), n = u(m.context(() => {
17
+ }, f)), a = u((d) => n.current.add(null, d)), i = t && t.length && !y;
18
+ return i && c(() => (s.current = !0, () => n.current.revert()), o), c(() => {
19
+ if (e && n.current.add(e, f), !i || !s.current)
20
+ return () => n.current.revert();
21
+ }, t), { context: n.current, contextSafe: a.current };
22
+ };
23
+ g.register = (e) => {
24
+ m = e;
25
+ };
26
+ g.headless = !0;
27
+ export {
28
+ g as u
29
+ };
package/dist/main.js ADDED
@@ -0,0 +1,30 @@
1
+ import { default as e } from "./components/Background/Background.js";
2
+ import { default as a } from "./components/Banner/Banner.js";
3
+ import { default as u } from "./components/BorderedBackground/BorderedBackground.js";
4
+ import { default as m } from "./components/Button/Button.js";
5
+ import { default as p } from "./components/Container/Container.js";
6
+ import { default as x } from "./components/Fifty/Fifty.js";
7
+ import { default as B } from "./components/Footer/Footer.js";
8
+ import { default as g } from "./components/ImageTextBlock/ImageTextBlock.js";
9
+ import { default as k } from "./components/List/List.js";
10
+ import { default as F } from "./components/OverlayHero/OverlayHero.js";
11
+ import { default as v } from "./components/Note/Note.js";
12
+ import { default as G } from "./components/Promo/Promo.js";
13
+ import { default as I } from "./components/PromoGroup/PromoGroup.js";
14
+ import { default as M } from "./components/MenuButton/MenuButton.js";
15
+ export {
16
+ e as Background,
17
+ a as Banner,
18
+ u as BorderedBackground,
19
+ m as Button,
20
+ p as Container,
21
+ x as Fifty,
22
+ B as Footer,
23
+ g as ImageTextBlock,
24
+ k as List,
25
+ M as MenuButton,
26
+ v as Note,
27
+ F as OverlayHero,
28
+ G as Promo,
29
+ I as PromoGroup
30
+ };
@@ -0,0 +1,8 @@
1
+ const t = ({ innerWidth: s }) => s >= 992, e = ({ innerWidth: s }) => s > 1200, o = ({ innerWidth: s }) => s >= 992 && s < 1200, r = ({ innerWidth: s }) => s >= 768 && s < 992, n = ({ innerWidth: s }) => s < 768;
2
+ export {
3
+ t as isDesktop,
4
+ e as isLargeDesktop,
5
+ n as isMobile,
6
+ o as isSmallDesktop,
7
+ r as isTablet
8
+ };
@@ -0,0 +1,7 @@
1
+ import { g as r, S as e } from "../ScrollTrigger-DDbij8gI.js";
2
+ function i() {
3
+ return r.core.globals().ScrollTrigger || r.registerPlugin(e), r;
4
+ }
5
+ export {
6
+ i as ensureGsapRegistered
7
+ };
@@ -0,0 +1,12 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import o from "react";
3
+ function c(r) {
4
+ return o.isValidElement(r);
5
+ }
6
+ const m = (r) => (Array.isArray(r) ? r : [r]).map(
7
+ (e, a) => c(e) ? /* @__PURE__ */ t(o.Fragment, { children: e }, `seg-${a}`) : /* @__PURE__ */ t("p", { children: e }, `seg-${a}`)
8
+ );
9
+ export {
10
+ m as default,
11
+ c as isReactElement
12
+ };
package/package.json CHANGED
@@ -1,35 +1,48 @@
1
1
  {
2
2
  "name": "@courtneyring/components-library",
3
- "version": "0.1.0",
4
- "main": "./dist/exports.js",
5
- "files": [
6
- "./dist"
7
- ],
8
- "exports": {
9
- ".": "./dist/exports.js"
10
- },
3
+ "version": "1.0.1",
4
+ "type": "module",
5
+ "exports": {
6
+ ".": {
7
+ "default": "./dist/main.jsx"
8
+ }
9
+ },
10
+ "files": [
11
+ "dist"
12
+ ],
11
13
  "scripts": {
12
- "next:dev": "next dev",
13
- "next:build": "next build",
14
- "next:start": "next start",
14
+ "dev": "vite",
15
+ "build": "vite build --watch",
16
+ "lint": "eslint .",
17
+ "preview": "vite preview",
15
18
  "storybook": "storybook dev -p 6006",
16
- "build-storybook": "storybook build",
17
- "build": "rm -rf dist && tsc -p tsconfig.build.json"
18
-
19
+ "build-storybook": "storybook build"
19
20
  },
20
21
  "dependencies": {
21
- "next": "15.5.3",
22
- "react": "19.1.0",
23
- "react-dom": "19.1.0"
22
+ "@gsap/react": "^2.1.2",
23
+ "classnames": "^2.5.1",
24
+ "gsap": "^3.13.0",
25
+ "moment": "^2.30.1",
26
+ "motion": "^12.26.2",
27
+ "react": "^19.1.1",
28
+ "react-dom": "^19.1.1"
24
29
  },
25
30
  "devDependencies": {
26
- "@storybook/nextjs": "^9.1.7",
27
- "sass": "^1.93.1",
28
- "storybook": "^9.1.7"
29
- },
30
- "peerDependencies": {
31
- "next": "15.5.3",
32
- "react": "19.1.0",
33
- "react-dom": "19.1.0"
31
+ "@chromatic-com/storybook": "^4.1.1",
32
+ "@eslint/js": "^9.36.0",
33
+ "@storybook/addon-a11y": "^9.1.10",
34
+ "@storybook/addon-docs": "^9.1.10",
35
+ "@storybook/react-vite": "^9.1.10",
36
+ "@vitejs/plugin-react": "^5.1.2",
37
+ "eslint": "^9.36.0",
38
+ "eslint-plugin-react-hooks": "^5.2.0",
39
+ "eslint-plugin-react-refresh": "^0.4.22",
40
+ "eslint-plugin-storybook": "^9.1.10",
41
+ "glob": "^11.1.0",
42
+ "globals": "^16.4.0",
43
+ "sass-embedded": "^1.93.2",
44
+ "storybook": "^9.1.10",
45
+ "vite": "^7.1.7",
46
+ "vite-plugin-lib-inject-css": "^2.2.2"
34
47
  }
35
48
  }
@@ -1,12 +0,0 @@
1
- export default Button;
2
- declare function Button({ children, fn, href, target, hollow, variation, textDecoration, label, value, }: {
3
- children: any;
4
- fn: any;
5
- href: any;
6
- target: any;
7
- hollow?: boolean | undefined;
8
- variation?: string | undefined;
9
- textDecoration: any;
10
- label: any;
11
- value: any;
12
- }): import("react/jsx-runtime").JSX.Element;
package/dist/exports.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./components/Button/Button";
package/dist/exports.js DELETED
@@ -1,18 +0,0 @@
1
- "use strict";
2
- 'use client';
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
- };
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- __exportStar(require("./components/Button/Button"), exports);