@ludo.ninja/components 0.1.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.
package/.eslintrc.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "next/core-web-vitals"
3
+ }
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2
+
3
+ ## Getting Started
4
+
5
+ First, run the development server:
6
+
7
+ ```bash
8
+ npm run dev
9
+ # or
10
+ yarn dev
11
+ # or
12
+ pnpm dev
13
+ # or
14
+ bun dev
15
+ ```
16
+
17
+ Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18
+
19
+ You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
20
+
21
+ [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
22
+
23
+ The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
24
+
25
+ This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
26
+
27
+ ## Learn More
28
+
29
+ To learn more about Next.js, take a look at the following resources:
30
+
31
+ - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
32
+ - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
33
+
34
+ You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
35
+
36
+ ## Deploy on Vercel
37
+
38
+ The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
39
+
40
+ Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
@@ -0,0 +1,42 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ import { useEffect } from 'react';
7
+ import { DM_Sans, Poppins } from 'next/font/google';
8
+ import { css } from 'styled-components';
9
+ import { poppinsFontVarCss } from '@/fonts/vars';
10
+ // const poppinsFont = Poppins({
11
+ // subsets: ['latin'],
12
+ // style: ['normal'],
13
+ // weight: ['200', '300', '400', '500', '600', '700', '800'],
14
+ // });
15
+ var fallbackPoppins = 'LocalPoppinsFont, sans-serif';
16
+ var fallbackDMSans = 'LocalDMSansFont';
17
+ var poppinsFont = Poppins({
18
+ subsets: ['latin'],
19
+ weight: ['200', '300', '400', '500', '600', '700', '800'],
20
+ variable: '--PoppinsFont', //poppinsFontVarCss.variable
21
+ fallback: ['LocalPoppinsFont, sans-serif'], // fallbackPoppins
22
+ });
23
+ var dmsansFont = DM_Sans({
24
+ subsets: ['latin'],
25
+ style: ['normal', 'italic'],
26
+ weight: ['400', '500', '600', '700'],
27
+ variable: '--DMSansFont', //dmsansFontVarCss.variable
28
+ fallback: ['LocalDMSansFont'], // fallbackDMSans
29
+ });
30
+ var FontsInitializeLayout = function (_a) {
31
+ var children = _a.children;
32
+ useEffect(function () {
33
+ // update fonts to react portal elements
34
+ document.body.classList.add(poppinsFont.variable);
35
+ document.body.classList.add(dmsansFont.variable);
36
+ document.body.style.fontFamily = poppinsFontVarCss.css; // initial font family
37
+ }, []);
38
+ return (_jsx("main", { style: { fontFamily: poppinsFontVarCss.css }, className: "".concat(dmsansFont.variable, " ").concat(poppinsFont.variable), children: children }));
39
+ };
40
+ export var GlobalFontsFallback = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* poppins-200 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 200;\n src: url('/fonts/poppins-v21-latin-200.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* poppins-300 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 300;\n src: url('/fonts/poppins-v21-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* poppins-regular - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 400;\n src: url('/fonts/poppins-v21-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* poppins-500 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 500;\n src: url('/fonts/poppins-v21-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* poppins-600 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 600;\n src: url('/fonts/poppins-v21-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* poppins-700 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 700;\n src: url('/fonts/poppins-v21-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* poppins-800 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 800;\n src: url('/fonts/poppins-v21-latin-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-regular - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 400;\n src: url('/fonts/dm-sans-v15-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-italic - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: italic;\n font-weight: 400;\n src: url('/fonts/dm-sans-v15-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-500 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 500;\n src: url('/fonts/dm-sans-v15-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-500italic - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: italic;\n font-weight: 500;\n src: url('/fonts/dm-sans-v15-latin-500italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-600 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 600;\n src: url('/fonts/dm-sans-v15-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-600italic - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: italic;\n font-weight: 600;\n src: url('/fonts/dm-sans-v15-latin-600italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-700 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 700;\n src: url('/fonts/dm-sans-v15-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-700italic - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: italic;\n font-weight: 700;\n src: url('/fonts/dm-sans-v15-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n"], ["\n /* poppins-200 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 200;\n src: url('/fonts/poppins-v21-latin-200.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* poppins-300 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 300;\n src: url('/fonts/poppins-v21-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* poppins-regular - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 400;\n src: url('/fonts/poppins-v21-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* poppins-500 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 500;\n src: url('/fonts/poppins-v21-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* poppins-600 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 600;\n src: url('/fonts/poppins-v21-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* poppins-700 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 700;\n src: url('/fonts/poppins-v21-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* poppins-800 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 800;\n src: url('/fonts/poppins-v21-latin-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-regular - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 400;\n src: url('/fonts/dm-sans-v15-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-italic - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: italic;\n font-weight: 400;\n src: url('/fonts/dm-sans-v15-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-500 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 500;\n src: url('/fonts/dm-sans-v15-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-500italic - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: italic;\n font-weight: 500;\n src: url('/fonts/dm-sans-v15-latin-500italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-600 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 600;\n src: url('/fonts/dm-sans-v15-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-600italic - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: italic;\n font-weight: 600;\n src: url('/fonts/dm-sans-v15-latin-600italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-700 - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: normal;\n font-weight: 700;\n src: url('/fonts/dm-sans-v15-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n /* dm-sans-700italic - latin */\n @font-face {\n font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */\n font-family: ", ";\n font-style: italic;\n font-weight: 700;\n src: url('/fonts/dm-sans-v15-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */\n }\n"])), fallbackPoppins, fallbackPoppins, fallbackPoppins, fallbackPoppins, fallbackPoppins, fallbackPoppins, fallbackPoppins, fallbackDMSans, fallbackDMSans, fallbackDMSans, fallbackDMSans, fallbackDMSans, fallbackDMSans, fallbackDMSans, fallbackDMSans);
41
+ export default FontsInitializeLayout;
42
+ var templateObject_1;
@@ -0,0 +1 @@
1
+ export { dmsansFontVarCss, poppinsFontVarCss, } from '@ludo.ninja/ui/build/fonts/vars';
@@ -0,0 +1,16 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ export default function App(_a) {
14
+ var Component = _a.Component, pageProps = _a.pageProps;
15
+ return _jsx(Component, __assign({}, pageProps));
16
+ }
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Html, Head, Main, NextScript } from "next/document";
3
+ export default function Document() {
4
+ return (_jsxs(Html, { lang: "en", children: [_jsx(Head, {}), _jsxs("body", { children: [_jsx(Main, {}), _jsx(NextScript, {})] })] }));
5
+ }
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import Head from "next/head";
3
+ export default function Home() {
4
+ return (_jsx(_Fragment, { children: _jsxs(Head, { children: [_jsx("title", { children: "Create Next App" }), _jsx("meta", { name: "description", content: "Generated by create next app" }), _jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), _jsx("link", { rel: "icon", href: "/favicon.ico" })] }) }));
5
+ }
@@ -0,0 +1,21 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import { createGlobalStyle } from 'styled-components';
6
+ import { GlobalFontsFallback } from '@/fonts/FontsInitializeLayout';
7
+ var GlobalStyle = createGlobalStyle(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n :root {\n --app-height: 100vh;\n }\n\n html {\n font-size: 0.625rem;\n min-height: var(--app-height);\n -webkit-font-smoothing: antialiased;\n scroll-behavior: smooth;\n }\n\n body {\n font-family: 'Poppins', sans-serif;\n letter-spacing: -0.015em;\n padding: 0;\n background: ", ";\n border: 0;\n margin: 0;\n min-height: var(--app-height);\n position: relative;\n\n &.dark-theme {\n .react-loading-skeleton {\n --base-color: #3A3D4C !important;\n --highlight-color: #292C39 !important;\n }\n }\n }\n\n p {\n padding: 0;\n margin: 0;\n }\n\n a {\n text-decoration: none;\n }\n\n .modal-dialog {\n max-width: 100%;\n width: fit-content;\n }\n\n .modal-dg {\n display: flex;\n align-content: center;\n justify-content: center;\n }\n\n .modal-content {\n border-radius: 2.2rem !important;\n overflow: hidden;\n outline: none;\n border: 0;\n }\n\n ::selection {\n color: ", ";\n background-color: ", ";\n }\n\n ::-webkit-scrollbar {\n height: 2px;\n width: 4px;\n }\n\n ::-webkit-scrollbar-thumb {\n background: ", ";\n }\n\n ", "\n"], ["\n :root {\n --app-height: 100vh;\n }\n\n html {\n font-size: 0.625rem;\n min-height: var(--app-height);\n -webkit-font-smoothing: antialiased;\n scroll-behavior: smooth;\n }\n\n body {\n font-family: 'Poppins', sans-serif;\n letter-spacing: -0.015em;\n padding: 0;\n background: ", ";\n border: 0;\n margin: 0;\n min-height: var(--app-height);\n position: relative;\n\n &.dark-theme {\n .react-loading-skeleton {\n --base-color: #3A3D4C !important;\n --highlight-color: #292C39 !important;\n }\n }\n }\n\n p {\n padding: 0;\n margin: 0;\n }\n\n a {\n text-decoration: none;\n }\n\n .modal-dialog {\n max-width: 100%;\n width: fit-content;\n }\n\n .modal-dg {\n display: flex;\n align-content: center;\n justify-content: center;\n }\n\n .modal-content {\n border-radius: 2.2rem !important;\n overflow: hidden;\n outline: none;\n border: 0;\n }\n\n ::selection {\n color: ", ";\n background-color: ", ";\n }\n\n ::-webkit-scrollbar {\n height: 2px;\n width: 4px;\n }\n\n ::-webkit-scrollbar-thumb {\n background: ", ";\n }\n\n ", "\n"])), function (_a) {
8
+ var theme = _a.theme;
9
+ return theme.colors.bg;
10
+ }, function (_a) {
11
+ var theme = _a.theme;
12
+ return theme.colors.naturalWhite;
13
+ }, function (_a) {
14
+ var theme = _a.theme;
15
+ return theme.colors.accent;
16
+ }, function (_a) {
17
+ var theme = _a.theme;
18
+ return theme.colors.scrollBar;
19
+ }, GlobalFontsFallback);
20
+ export default GlobalStyle;
21
+ var templateObject_1;
@@ -0,0 +1 @@
1
+ export { default as GlobalStyle } from '@/styles/globalStyles';
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ declare const FontsInitializeLayout: ({ children }: {
3
+ children: ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const GlobalFontsFallback: import("styled-components").RuleSet<object>;
6
+ export default FontsInitializeLayout;
@@ -0,0 +1 @@
1
+ export { dmsansFontVarCss, poppinsFontVarCss, } from '@ludo.ninja/ui/build/fonts/vars';
@@ -0,0 +1,2 @@
1
+ import type { AppProps } from "next/app";
2
+ export default function App({ Component, pageProps }: AppProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Document(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Home(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const GlobalStyle: import("react").NamedExoticComponent<import("styled-components").ExecutionProps & object>;
3
+ export default GlobalStyle;
@@ -0,0 +1 @@
1
+ export { default as GlobalStyle } from '@/styles/globalStyles';
@@ -0,0 +1,6 @@
1
+ /** @type {import('next').NextConfig} */
2
+ const nextConfig = {
3
+ reactStrictMode: true,
4
+ };
5
+
6
+ export default nextConfig;
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@ludo.ninja/components",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "main": "dist/index.js",
6
+ "types": "dist/types/index.d.ts",
7
+ "scripts": {
8
+ "dev": "next dev",
9
+ "build": "tsc",
10
+ "start": "next start",
11
+ "lint": "next lint",
12
+ "publish": "npm publish --access=public -workspace @ludo.ninja/components",
13
+ "prepare": "npm run build"
14
+ },
15
+ "dependencies": {
16
+ "next": "^13.5.2",
17
+ "react": "^18.3.1",
18
+ "react-dom": "^18.2.0",
19
+ "styled-components": "^5.3.6",
20
+ "@types/styled-components": "^5.1.26"
21
+ },
22
+ "devDependencies": {
23
+ "@types/react": "^18.3.1",
24
+ "@types/react-dom": "18.0.10",
25
+ "eslint": "^8",
26
+ "eslint-config-next": "14.2.4",
27
+ "typescript": "^5"
28
+ }
29
+ }
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-11-8-18-19-18zm-10 15c2-4 5-7 10-7s8 3 9 7h-19zm-39 3c0 6 4 10 10 10 4 0 7-2 9-5l8 5c-3 5-9 8-17 8-11 0-19-7-19-18s8-18 19-18c8 0 14 3 17 8l-8 5c-2-3-5-5-9-5-6 0-10 4-10 10zm83-29v46h-9V5h9zM37 0l37 64H0L37 0zm92 5-27 48L74 5h10l18 30 17-30h10zm59 12v10l-3-1c-6 0-10 4-10 10v15h-9V17h9v9c0-5 6-9 13-9z"/></svg>
@@ -0,0 +1,173 @@
1
+ import React, { ReactNode, useEffect } from 'react';
2
+
3
+ import { DM_Sans, Poppins } from 'next/font/google';
4
+
5
+ import { css } from 'styled-components';
6
+
7
+ import { poppinsFontVarCss } from '@/fonts/vars';
8
+
9
+ // const poppinsFont = Poppins({
10
+ // subsets: ['latin'],
11
+ // style: ['normal'],
12
+ // weight: ['200', '300', '400', '500', '600', '700', '800'],
13
+ // });
14
+
15
+ const fallbackPoppins = 'LocalPoppinsFont, sans-serif';
16
+ const fallbackDMSans = 'LocalDMSansFont';
17
+
18
+ const poppinsFont = Poppins({
19
+ subsets: ['latin'],
20
+ weight: ['200', '300', '400', '500', '600', '700', '800'],
21
+ variable: '--PoppinsFont', //poppinsFontVarCss.variable
22
+ fallback: ['LocalPoppinsFont, sans-serif'], // fallbackPoppins
23
+ });
24
+
25
+ const dmsansFont = DM_Sans({
26
+ subsets: ['latin'],
27
+ style: ['normal', 'italic'],
28
+ weight: ['400', '500', '600', '700'],
29
+ variable: '--DMSansFont', //dmsansFontVarCss.variable
30
+ fallback: ['LocalDMSansFont'], // fallbackDMSans
31
+ });
32
+
33
+ const FontsInitializeLayout = ({ children }: { children: ReactNode }) => {
34
+ useEffect(() => {
35
+ // update fonts to react portal elements
36
+ document.body.classList.add(poppinsFont.variable);
37
+ document.body.classList.add(dmsansFont.variable);
38
+ document.body.style.fontFamily = poppinsFontVarCss.css; // initial font family
39
+ }, []);
40
+
41
+ return (
42
+ <main
43
+ style={{ fontFamily: poppinsFontVarCss.css }} // initial font family
44
+ className={`${dmsansFont.variable} ${poppinsFont.variable}`}
45
+ >
46
+ {children}
47
+ </main>
48
+ );
49
+ };
50
+ export const GlobalFontsFallback = css`
51
+ /* poppins-200 - latin */
52
+ @font-face {
53
+ font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
54
+ font-family: ${fallbackPoppins};
55
+ font-style: normal;
56
+ font-weight: 200;
57
+ src: url('/fonts/poppins-v21-latin-200.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
58
+ }
59
+ /* poppins-300 - latin */
60
+ @font-face {
61
+ font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
62
+ font-family: ${fallbackPoppins};
63
+ font-style: normal;
64
+ font-weight: 300;
65
+ src: url('/fonts/poppins-v21-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
66
+ }
67
+ /* poppins-regular - latin */
68
+ @font-face {
69
+ font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
70
+ font-family: ${fallbackPoppins};
71
+ font-style: normal;
72
+ font-weight: 400;
73
+ src: url('/fonts/poppins-v21-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
74
+ }
75
+ /* poppins-500 - latin */
76
+ @font-face {
77
+ font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
78
+ font-family: ${fallbackPoppins};
79
+ font-style: normal;
80
+ font-weight: 500;
81
+ src: url('/fonts/poppins-v21-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
82
+ }
83
+ /* poppins-600 - latin */
84
+ @font-face {
85
+ font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
86
+ font-family: ${fallbackPoppins};
87
+ font-style: normal;
88
+ font-weight: 600;
89
+ src: url('/fonts/poppins-v21-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
90
+ }
91
+ /* poppins-700 - latin */
92
+ @font-face {
93
+ font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
94
+ font-family: ${fallbackPoppins};
95
+ font-style: normal;
96
+ font-weight: 700;
97
+ src: url('/fonts/poppins-v21-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
98
+ }
99
+ /* poppins-800 - latin */
100
+ @font-face {
101
+ font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
102
+ font-family: ${fallbackPoppins};
103
+ font-style: normal;
104
+ font-weight: 800;
105
+ src: url('/fonts/poppins-v21-latin-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
106
+ }
107
+ /* dm-sans-regular - latin */
108
+ @font-face {
109
+ font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
110
+ font-family: ${fallbackDMSans};
111
+ font-style: normal;
112
+ font-weight: 400;
113
+ src: url('/fonts/dm-sans-v15-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
114
+ }
115
+ /* dm-sans-italic - latin */
116
+ @font-face {
117
+ font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
118
+ font-family: ${fallbackDMSans};
119
+ font-style: italic;
120
+ font-weight: 400;
121
+ src: url('/fonts/dm-sans-v15-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
122
+ }
123
+ /* dm-sans-500 - latin */
124
+ @font-face {
125
+ font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
126
+ font-family: ${fallbackDMSans};
127
+ font-style: normal;
128
+ font-weight: 500;
129
+ src: url('/fonts/dm-sans-v15-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
130
+ }
131
+ /* dm-sans-500italic - latin */
132
+ @font-face {
133
+ font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
134
+ font-family: ${fallbackDMSans};
135
+ font-style: italic;
136
+ font-weight: 500;
137
+ src: url('/fonts/dm-sans-v15-latin-500italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
138
+ }
139
+ /* dm-sans-600 - latin */
140
+ @font-face {
141
+ font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
142
+ font-family: ${fallbackDMSans};
143
+ font-style: normal;
144
+ font-weight: 600;
145
+ src: url('/fonts/dm-sans-v15-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
146
+ }
147
+ /* dm-sans-600italic - latin */
148
+ @font-face {
149
+ font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
150
+ font-family: ${fallbackDMSans};
151
+ font-style: italic;
152
+ font-weight: 600;
153
+ src: url('/fonts/dm-sans-v15-latin-600italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
154
+ }
155
+ /* dm-sans-700 - latin */
156
+ @font-face {
157
+ font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
158
+ font-family: ${fallbackDMSans};
159
+ font-style: normal;
160
+ font-weight: 700;
161
+ src: url('/fonts/dm-sans-v15-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
162
+ }
163
+ /* dm-sans-700italic - latin */
164
+ @font-face {
165
+ font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
166
+ font-family: ${fallbackDMSans};
167
+ font-style: italic;
168
+ font-weight: 700;
169
+ src: url('/fonts/dm-sans-v15-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
170
+ }
171
+ `;
172
+
173
+ export default FontsInitializeLayout;
@@ -0,0 +1,4 @@
1
+ export {
2
+ dmsansFontVarCss,
3
+ poppinsFontVarCss,
4
+ } from '@ludo.ninja/ui/build/fonts/vars';
@@ -0,0 +1,5 @@
1
+ import type { AppProps } from "next/app";
2
+
3
+ export default function App({ Component, pageProps }: AppProps) {
4
+ return <Component {...pageProps} />;
5
+ }
@@ -0,0 +1,13 @@
1
+ import { Html, Head, Main, NextScript } from "next/document";
2
+
3
+ export default function Document() {
4
+ return (
5
+ <Html lang="en">
6
+ <Head />
7
+ <body>
8
+ <Main />
9
+ <NextScript />
10
+ </body>
11
+ </Html>
12
+ );
13
+ }
@@ -0,0 +1,15 @@
1
+ import Head from "next/head";
2
+
3
+
4
+ export default function Home() {
5
+ return (
6
+ <>
7
+ <Head>
8
+ <title>Create Next App</title>
9
+ <meta name="description" content="Generated by create next app" />
10
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
11
+ <link rel="icon" href="/favicon.ico" />
12
+ </Head>
13
+ </>
14
+ );
15
+ }
@@ -0,0 +1,79 @@
1
+ import { createGlobalStyle } from 'styled-components';
2
+
3
+ import { GlobalFontsFallback } from '@/fonts/FontsInitializeLayout';
4
+
5
+ const GlobalStyle = createGlobalStyle`
6
+ :root {
7
+ --app-height: 100vh;
8
+ }
9
+
10
+ html {
11
+ font-size: 0.625rem;
12
+ min-height: var(--app-height);
13
+ -webkit-font-smoothing: antialiased;
14
+ scroll-behavior: smooth;
15
+ }
16
+
17
+ body {
18
+ font-family: 'Poppins', sans-serif;
19
+ letter-spacing: -0.015em;
20
+ padding: 0;
21
+ background: ${({ theme }) => theme.colors.bg};
22
+ border: 0;
23
+ margin: 0;
24
+ min-height: var(--app-height);
25
+ position: relative;
26
+
27
+ &.dark-theme {
28
+ .react-loading-skeleton {
29
+ --base-color: #3A3D4C !important;
30
+ --highlight-color: #292C39 !important;
31
+ }
32
+ }
33
+ }
34
+
35
+ p {
36
+ padding: 0;
37
+ margin: 0;
38
+ }
39
+
40
+ a {
41
+ text-decoration: none;
42
+ }
43
+
44
+ .modal-dialog {
45
+ max-width: 100%;
46
+ width: fit-content;
47
+ }
48
+
49
+ .modal-dg {
50
+ display: flex;
51
+ align-content: center;
52
+ justify-content: center;
53
+ }
54
+
55
+ .modal-content {
56
+ border-radius: 2.2rem !important;
57
+ overflow: hidden;
58
+ outline: none;
59
+ border: 0;
60
+ }
61
+
62
+ ::selection {
63
+ color: ${({ theme }) => theme.colors.naturalWhite};
64
+ background-color: ${({ theme }) => theme.colors.accent};
65
+ }
66
+
67
+ ::-webkit-scrollbar {
68
+ height: 2px;
69
+ width: 4px;
70
+ }
71
+
72
+ ::-webkit-scrollbar-thumb {
73
+ background: ${({ theme }) => theme.colors.scrollBar};
74
+ }
75
+
76
+ ${GlobalFontsFallback}
77
+ `;
78
+
79
+ export default GlobalStyle;
@@ -0,0 +1 @@
1
+ export { default as GlobalStyle } from '@/styles/globalStyles';
package/tsconfig.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "allowJs": true,
6
+ "skipLibCheck": true,
7
+ "esModuleInterop": true,
8
+ "allowSyntheticDefaultImports": true,
9
+ "strict": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "noFallthroughCasesInSwitch": true,
12
+ "module": "esnext",
13
+ "moduleResolution": "node",
14
+ "resolveJsonModule": true,
15
+ "isolatedModules": true,
16
+ "noEmit": false,
17
+ "jsx": "react-jsx",
18
+ "declaration": true,
19
+ "declarationDir": "./dist/types",
20
+ "outDir": "./dist",
21
+ "baseUrl": ".",
22
+ "paths": {
23
+ "@/pages/*": ["src/pages/*"],
24
+ "@/pages-components-with-unique-build/*": [
25
+ "src/pages-components-with-unique-build/*"
26
+ ],
27
+ "@/hooks/*": ["src/hooks/*"],
28
+ "@/context/*": ["src/context/*"],
29
+ "@/modules/*": ["src/modules/*"],
30
+ "@/api/*": ["src/api/*"],
31
+ "@/layouts/*": ["src/layouts/*"],
32
+ "@/styles/*": ["src/styles/*"],
33
+ "@/components/*": ["src/components/*"],
34
+ "@/system/*": ["src/system/*"],
35
+ "@/utils/*": ["src/utils/*"],
36
+ "@/dto/*": ["src/dto/*"],
37
+ "@/entities/*": ["src/entities/*"],
38
+ "@/public/*": ["public/*"],
39
+ "@/constants/*": ["src/constants/*"],
40
+ "@/fonts/*": ["src/fonts/*"],
41
+ "@/store/*": ["src/store/*"],
42
+ "@/store": ["src/store/index.ts"],
43
+ "@system": ["src/system/index.ts"]
44
+ }
45
+ },
46
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
47
+ "exclude": ["node_modules", "dist"]
48
+ }