@ludo.ninja/components 2.0.15 → 2.0.16

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,5 +1,10 @@
1
1
  import { ReactNode } from "react";
2
- export declare const getFontsLayout: () => {
2
+ export declare const fallbackPoppins = "LocalPoppinsFont, sans-serif";
3
+ export declare const fallbackDMSans = "LocalDMSansFont";
4
+ export declare const getFontsLayout: ({ poppinsFont, dmsansFont }: {
5
+ poppinsFont: any;
6
+ dmsansFont: any;
7
+ }) => {
3
8
  FontsInitializeLayout: ({ children }: {
4
9
  children: ReactNode;
5
10
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GlobalFontsFallback = exports.getFontsLayout = void 0;
3
+ exports.GlobalFontsFallback = exports.getFontsLayout = exports.fallbackDMSans = exports.fallbackPoppins = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
- const google_1 = require("next/font/google");
6
+ // import { DM_Sans, Poppins } from "next/font/google";
7
7
  const styled_components_1 = require("styled-components");
8
8
  const vars_1 = require("./vars");
9
9
  // const poppinsFont = Poppins({
@@ -11,22 +11,23 @@ const vars_1 = require("./vars");
11
11
  // style: ['normal'],
12
12
  // weight: ['200', '300', '400', '500', '600', '700', '800'],
13
13
  // });
14
- const fallbackPoppins = "LocalPoppinsFont, sans-serif";
15
- const fallbackDMSans = "LocalDMSansFont";
16
- const getFontsLayout = () => {
17
- const poppinsFont = (0, google_1.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
- const dmsansFont = (0, google_1.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
- });
14
+ exports.fallbackPoppins = "LocalPoppinsFont, sans-serif";
15
+ exports.fallbackDMSans = "LocalDMSansFont";
16
+ const getFontsLayout = ({ poppinsFont, dmsansFont }) => {
17
+ // const 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
+ //
24
+ // const dmsansFont = DM_Sans({
25
+ // subsets: ["latin"],
26
+ // style: ["normal", "italic"],
27
+ // weight: ["400", "500", "600", "700"],
28
+ // variable: "--DMSansFont", //dmsansFontVarCss.variable
29
+ // fallback: ["LocalDMSansFont"], // fallbackDMSans
30
+ // });
30
31
  const FontsInitializeLayout = ({ children }) => {
31
32
  (0, react_1.useEffect)(() => {
32
33
  // update fonts to react portal elements
@@ -43,7 +44,7 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
43
44
  /* poppins-200 - latin */
44
45
  @font-face {
45
46
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
46
- font-family: ${fallbackPoppins};
47
+ font-family: ${exports.fallbackPoppins};
47
48
  font-style: normal;
48
49
  font-weight: 200;
49
50
  src: url('/fonts/poppins-v21-latin-200.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
@@ -51,7 +52,7 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
51
52
  /* poppins-300 - latin */
52
53
  @font-face {
53
54
  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-family: ${exports.fallbackPoppins};
55
56
  font-style: normal;
56
57
  font-weight: 300;
57
58
  src: url('/fonts/poppins-v21-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
@@ -59,7 +60,7 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
59
60
  /* poppins-regular - latin */
60
61
  @font-face {
61
62
  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-family: ${exports.fallbackPoppins};
63
64
  font-style: normal;
64
65
  font-weight: 400;
65
66
  src: url('/fonts/poppins-v21-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
@@ -67,7 +68,7 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
67
68
  /* poppins-500 - latin */
68
69
  @font-face {
69
70
  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-family: ${exports.fallbackPoppins};
71
72
  font-style: normal;
72
73
  font-weight: 500;
73
74
  src: url('/fonts/poppins-v21-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
@@ -75,7 +76,7 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
75
76
  /* poppins-600 - latin */
76
77
  @font-face {
77
78
  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-family: ${exports.fallbackPoppins};
79
80
  font-style: normal;
80
81
  font-weight: 600;
81
82
  src: url('/fonts/poppins-v21-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
@@ -83,7 +84,7 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
83
84
  /* poppins-700 - latin */
84
85
  @font-face {
85
86
  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-family: ${exports.fallbackPoppins};
87
88
  font-style: normal;
88
89
  font-weight: 700;
89
90
  src: url('/fonts/poppins-v21-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
@@ -91,7 +92,7 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
91
92
  /* poppins-800 - latin */
92
93
  @font-face {
93
94
  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-family: ${exports.fallbackPoppins};
95
96
  font-style: normal;
96
97
  font-weight: 800;
97
98
  src: url('/fonts/poppins-v21-latin-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
@@ -99,7 +100,7 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
99
100
  /* dm-sans-regular - latin */
100
101
  @font-face {
101
102
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
102
- font-family: ${fallbackDMSans};
103
+ font-family: ${exports.fallbackDMSans};
103
104
  font-style: normal;
104
105
  font-weight: 400;
105
106
  src: url('/fonts/dm-sans-v15-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
@@ -107,7 +108,7 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
107
108
  /* dm-sans-italic - latin */
108
109
  @font-face {
109
110
  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-family: ${exports.fallbackDMSans};
111
112
  font-style: italic;
112
113
  font-weight: 400;
113
114
  src: url('/fonts/dm-sans-v15-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
@@ -115,7 +116,7 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
115
116
  /* dm-sans-500 - latin */
116
117
  @font-face {
117
118
  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-family: ${exports.fallbackDMSans};
119
120
  font-style: normal;
120
121
  font-weight: 500;
121
122
  src: url('/fonts/dm-sans-v15-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
@@ -123,7 +124,7 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
123
124
  /* dm-sans-500italic - latin */
124
125
  @font-face {
125
126
  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-family: ${exports.fallbackDMSans};
127
128
  font-style: italic;
128
129
  font-weight: 500;
129
130
  src: url('/fonts/dm-sans-v15-latin-500italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
@@ -131,7 +132,7 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
131
132
  /* dm-sans-600 - latin */
132
133
  @font-face {
133
134
  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-family: ${exports.fallbackDMSans};
135
136
  font-style: normal;
136
137
  font-weight: 600;
137
138
  src: url('/fonts/dm-sans-v15-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
@@ -139,7 +140,7 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
139
140
  /* dm-sans-600italic - latin */
140
141
  @font-face {
141
142
  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-family: ${exports.fallbackDMSans};
143
144
  font-style: italic;
144
145
  font-weight: 600;
145
146
  src: url('/fonts/dm-sans-v15-latin-600italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
@@ -147,7 +148,7 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
147
148
  /* dm-sans-700 - latin */
148
149
  @font-face {
149
150
  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-family: ${exports.fallbackDMSans};
151
152
  font-style: normal;
152
153
  font-weight: 700;
153
154
  src: url('/fonts/dm-sans-v15-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
@@ -155,7 +156,7 @@ exports.GlobalFontsFallback = (0, styled_components_1.css) `
155
156
  /* dm-sans-700italic - latin */
156
157
  @font-face {
157
158
  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-family: ${exports.fallbackDMSans};
159
160
  font-style: italic;
160
161
  font-weight: 700;
161
162
  src: url('/fonts/dm-sans-v15-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.0.15",
3
+ "version": "2.0.16",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",