@ndla/preset-panda 0.0.70 → 0.0.71
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/es/index.mjs +1 -1
- package/es/index.mjs.map +1 -1
- package/es/typography.mjs +0 -7
- package/es/typography.mjs.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/typography.js +0 -7
- package/lib/typography.js.map +1 -1
- package/package.json +2 -2
package/es/index.mjs
CHANGED
|
@@ -9,8 +9,8 @@ import { spacing } from "./spacing.mjs";
|
|
|
9
9
|
import { fontSizes, fontWeights, fonts, lineHeights, textStyles } from "./typography.mjs";
|
|
10
10
|
import { zIndex } from "./zIndex.mjs";
|
|
11
11
|
import { forwardCssPropPlugin } from "./plugins/forwardCssPropPlugin.mjs";
|
|
12
|
-
import { definePreset } from "@pandacss/dev";
|
|
13
12
|
import { breakpoints } from "@ndla/core";
|
|
13
|
+
import { definePreset } from "@pandacss/dev";
|
|
14
14
|
|
|
15
15
|
//#region src/index.ts
|
|
16
16
|
/**
|
package/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { breakpoints } from \"@ndla/core\";\nimport { definePreset } from \"@pandacss/dev\";\nimport { animations, durations, easings, keyframes } from \"./animations\";\nimport { boxShadows } from \"./boxShadows\";\nimport { colors } from \"./colors\";\nimport { conditions } from \"./conditions\";\nimport { globalCss } from \"./globalCss\";\nimport { radii } from \"./radii\";\nimport { semanticTokens } from \"./semanticTokens\";\nimport { spacing } from \"./spacing\";\nimport { fontWeights, textStyles, fonts, fontSizes, lineHeights } from \"./typography\";\nimport { zIndex } from \"./zIndex\";\n\nconst preset = definePreset({\n name: \"ndla/panda\",\n globalCss: globalCss,\n conditions: conditions,\n theme: {\n breakpoints: breakpoints,\n textStyles: textStyles,\n keyframes: keyframes,\n tokens: {\n colors: colors,\n easings: easings,\n durations: durations,\n radii: radii,\n spacing: spacing,\n sizes: spacing,\n lineHeights: lineHeights,\n fontWeights: fontWeights,\n fontSizes: fontSizes,\n fonts: fonts,\n animations: animations,\n shadows: boxShadows,\n zIndex: zIndex,\n },\n semanticTokens: semanticTokens,\n containerSizes: breakpoints,\n },\n});\n\nexport { forwardCssPropPlugin } from \"./plugins/forwardCssPropPlugin\";\n\nexport default preset;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,SAAS,aAAa;CAC1B,MAAM;CACK;CACC;CACZ,OAAO;EACQ;EACD;EACD;EACX,QAAQ;GACE;GACC;GACE;GACJ;GACE;GACT,OAAO;GACM;GACA;GACF;GACJ;GACK;GACZ,SAAS;GACD;GACT;EACe;EAChB,gBAAgB;EACjB;CACF,CAAC;AAIF,kBAAe"}
|
package/es/typography.mjs
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { defineTextStyles, defineTokens } from "@pandacss/dev";
|
|
2
2
|
|
|
3
3
|
//#region src/typography.ts
|
|
4
|
-
/**
|
|
5
|
-
* Copyright (c) 2024-present, NDLA.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
4
|
const fontWeights = defineTokens.fontWeights({
|
|
12
5
|
light: { value: 300 },
|
|
13
6
|
normal: { value: 400 },
|
package/es/typography.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.mjs","names":[],"sources":["../src/typography.ts"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"typography.mjs","names":[],"sources":["../src/typography.ts"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { FontSizeToken, LineHeightToken } from \"@ndla/styled-system/tokens\";\nimport { defineTextStyles, defineTokens } from \"@pandacss/dev\";\n\nexport const fontWeights = defineTokens.fontWeights({\n light: { value: 300 },\n normal: { value: 400 },\n semibold: { value: 600 },\n bold: { value: 670 },\n});\n\nexport const fonts = defineTokens.fonts({\n sans: {\n value: [\n \"Satoshi\",\n \"Helvetica\",\n \"Arial\",\n \"STKaiti\",\n \"'华文楷体'\",\n \"KaiTi\",\n \"SimKai\",\n \"'楷体'\",\n \"KaiU\",\n \"DFKai-SB\",\n \"'標楷體'\",\n \"SongTi\",\n \"'宋体'\",\n \"sans-serif\",\n ],\n },\n serif: {\n value: [\n \"'Source Serif 4 Variable'\",\n \"Times\",\n \"STKaiti\",\n \"'华文楷体'\",\n \"KaiTi\",\n \"SimKai\",\n \"'楷体'\",\n \"KaiU\",\n \"DFKai-SB\",\n \"'標楷體'\",\n \"SongTi\",\n \"'宋体'\",\n \"serif\",\n ],\n },\n code: {\n value: [\"'Source Code Pro Variable'\", \"Monaco\"],\n },\n});\n\nexport const fontSizes = defineTokens.fontSizes({\n // 12px\n xxsmall: { value: \"0.75rem\" },\n // 14px\n xsmall: { value: \"0.875rem\" },\n // 16px\n small: { value: \"1rem\" },\n // 18px\n medium: { value: \"1.125rem\" },\n // 22px\n large: { value: \"1.375rem\" },\n // 26px\n xlarge: { value: \"1.625rem\" },\n // 30px\n xxlarge: { value: \"1.875rem\" },\n // 38px\n \"3xlarge\": { value: \"2.375rem\" },\n // 48px\n \"4xlarge\": { value: \"3rem\" },\n});\n\nexport const lineHeights = defineTokens.lineHeights({\n xxsmall: { value: \"0.75rem\" },\n xsmall: { value: \"1.375rem\" },\n small: { value: \"1.5rem\" },\n medium: { value: \"1.75rem\" },\n large: { value: \"1.875rem\" },\n xlarge: { value: \"2.25rem\" },\n xxlarge: { value: \"2.375rem\" },\n \"3xlarge\": { value: \"3rem\" },\n \"4xlarge\": { value: \"3.75rem\" },\n});\n\nconst sizes = (size: FontSizeToken, lineHeight: LineHeightToken) => {\n return {\n fontSize: size,\n lineHeight,\n _chinese: {\n fontSize: `calc(token(fontSizes.${size}) * 1.11)`,\n lineHeight: `calc(token(lineHeights.${lineHeight}) * 1.11)`,\n },\n };\n};\n\nexport const textStyles = defineTextStyles({\n heading: {\n large: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"bold\",\n letterSpacing: \"-0.01em\",\n ...sizes(\"4xlarge\", \"4xlarge\"),\n mobileWideDown: {\n ...sizes(\"3xlarge\", \"3xlarge\"),\n },\n },\n },\n medium: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"bold\",\n letterSpacing: \"-0.01em\",\n ...sizes(\"3xlarge\", \"3xlarge\"),\n mobileWideDown: {\n letterSpacing: \"-0.01em\",\n ...sizes(\"xxlarge\", \"xxlarge\"),\n },\n },\n },\n small: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"bold\",\n letterSpacing: \"-0.01em\",\n ...sizes(\"xxlarge\", \"xxlarge\"),\n mobileWideDown: {\n ...sizes(\"xlarge\", \"xlarge\"),\n },\n },\n },\n },\n title: {\n large: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"bold\",\n letterSpacing: \"-0.01em\",\n ...sizes(\"xlarge\", \"xlarge\"),\n mobileWideDown: {\n ...sizes(\"large\", \"large\"),\n },\n },\n },\n medium: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"bold\",\n letterSpacing: \"-0.01em\",\n ...sizes(\"large\", \"large\"),\n mobileWideDown: {\n ...sizes(\"medium\", \"small\"),\n },\n },\n },\n small: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"bold\",\n letterSpacing: \"-0.01em\",\n ...sizes(\"medium\", \"small\"),\n },\n },\n },\n body: {\n article: {\n value: {\n fontFamily: \"serif\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"medium\", \"medium\"),\n },\n },\n articleLink: {\n value: {\n fontFamily: \"serif\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"medium\", \"medium\"),\n },\n },\n link: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"medium\", \"medium\"),\n },\n },\n xlarge: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"large\", \"large\"),\n },\n },\n large: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"medium\", \"medium\"),\n },\n },\n medium: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"small\", \"small\"),\n },\n },\n small: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"xsmall\", \"xsmall\"),\n },\n },\n },\n label: {\n large: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"medium\", \"medium\"),\n },\n strong: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"bold\",\n letterSpacing: \"normal\",\n ...sizes(\"medium\", \"medium\"),\n },\n },\n },\n medium: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"small\", \"small\"),\n },\n },\n small: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"xsmall\", \"xsmall\"),\n },\n },\n xsmall: {\n value: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B,EACF;EACD,MAAM,EACJ,OAAO;GACL,YAAY;GACZ,YAAY;GACZ,eAAe;GACf,GAAG,MAAM,UAAU,SAAS;GAC7B,EACF;EACD,QAAQ,EACN,OAAO;GACL,YAAY;GACZ,YAAY;GACZ,eAAe;GACf,GAAG,MAAM,SAAS,QAAQ;GAC3B,EACF;EACD,OAAO,EACL,OAAO;GACL,YAAY;GACZ,YAAY;GACZ,eAAe;GACf,GAAG,MAAM,UAAU,SAAS;GAC7B,EACF;EACD,QAAQ,EACN,OAAO;GACL,YAAY;GACZ,YAAY;GACZ,eAAe;GACf,GAAG,MAAM,SAAS,QAAQ;GAC3B,EACF;EACD,OAAO,EACL,OAAO;GACL,YAAY;GACZ,YAAY;GACZ,eAAe;GACf,GAAG,MAAM,UAAU,SAAS;GAC7B,EACF;EACF;CACD,OAAO;EACL,OAAO;GACL,OAAO;IACL,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,GAAG,MAAM,UAAU,SAAS;IAC7B;GACD,QAAQ,EACN,OAAO;IACL,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,GAAG,MAAM,UAAU,SAAS;IAC7B,EACF;GACF;EACD,QAAQ,EACN,OAAO;GACL,YAAY;GACZ,YAAY;GACZ,eAAe;GACf,GAAG,MAAM,SAAS,QAAQ;GAC3B,EACF;EACD,OAAO,EACL,OAAO;GACL,YAAY;GACZ,YAAY;GACZ,eAAe;GACf,GAAG,MAAM,UAAU,SAAS;GAC7B,EACF;EACD,QAAQ,EACN,OAAO;GACL,YAAY;GACZ,YAAY;GACZ,eAAe;GACf,GAAG,MAAM,WAAW,UAAU;GAC/B,EACF;EACF;CACF,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -10,8 +10,8 @@ const require_spacing = require('./spacing.js');
|
|
|
10
10
|
const require_typography = require('./typography.js');
|
|
11
11
|
const require_zIndex = require('./zIndex.js');
|
|
12
12
|
const require_forwardCssPropPlugin = require('./plugins/forwardCssPropPlugin.js');
|
|
13
|
-
let _pandacss_dev = require("@pandacss/dev");
|
|
14
13
|
let _ndla_core = require("@ndla/core");
|
|
14
|
+
let _pandacss_dev = require("@pandacss/dev");
|
|
15
15
|
|
|
16
16
|
//#region src/index.ts
|
|
17
17
|
/**
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["globalCss","conditions","breakpoints","textStyles","keyframes","colors","easings","durations","radii","spacing","lineHeights","fontWeights","fontSizes","fonts","animations","boxShadows","zIndex","semanticTokens"],"sources":["../src/index.ts"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","names":["globalCss","conditions","breakpoints","textStyles","keyframes","colors","easings","durations","radii","spacing","lineHeights","fontWeights","fontSizes","fonts","animations","boxShadows","zIndex","semanticTokens"],"sources":["../src/index.ts"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { breakpoints } from \"@ndla/core\";\nimport { definePreset } from \"@pandacss/dev\";\nimport { animations, durations, easings, keyframes } from \"./animations\";\nimport { boxShadows } from \"./boxShadows\";\nimport { colors } from \"./colors\";\nimport { conditions } from \"./conditions\";\nimport { globalCss } from \"./globalCss\";\nimport { radii } from \"./radii\";\nimport { semanticTokens } from \"./semanticTokens\";\nimport { spacing } from \"./spacing\";\nimport { fontWeights, textStyles, fonts, fontSizes, lineHeights } from \"./typography\";\nimport { zIndex } from \"./zIndex\";\n\nconst preset = definePreset({\n name: \"ndla/panda\",\n globalCss: globalCss,\n conditions: conditions,\n theme: {\n breakpoints: breakpoints,\n textStyles: textStyles,\n keyframes: keyframes,\n tokens: {\n colors: colors,\n easings: easings,\n durations: durations,\n radii: radii,\n spacing: spacing,\n sizes: spacing,\n lineHeights: lineHeights,\n fontWeights: fontWeights,\n fontSizes: fontSizes,\n fonts: fonts,\n animations: animations,\n shadows: boxShadows,\n zIndex: zIndex,\n },\n semanticTokens: semanticTokens,\n containerSizes: breakpoints,\n },\n});\n\nexport { forwardCssPropPlugin } from \"./plugins/forwardCssPropPlugin\";\n\nexport default preset;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,yCAAsB;CAC1B,MAAM;CACN,WAAWA;CACX,YAAYC;CACZ,OAAO;EACL,aAAaC;EACb,YAAYC;EACZ,WAAWC;EACX,QAAQ;GACN,QAAQC;GACR,SAASC;GACT,WAAWC;GACX,OAAOC;GACP,SAASC;GACT,OAAOA;GACP,aAAaC;GACb,aAAaC;GACb,WAAWC;GACX,OAAOC;GACP,YAAYC;GACZ,SAASC;GACT,QAAQC;GACT;EACD,gBAAgBC;EAChB,gBAAgBf;EACjB;CACF,CAAC;AAIF,kBAAe"}
|
package/lib/typography.js
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
let _pandacss_dev = require("@pandacss/dev");
|
|
2
2
|
|
|
3
3
|
//#region src/typography.ts
|
|
4
|
-
/**
|
|
5
|
-
* Copyright (c) 2024-present, NDLA.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
4
|
const fontWeights = _pandacss_dev.defineTokens.fontWeights({
|
|
12
5
|
light: { value: 300 },
|
|
13
6
|
normal: { value: 400 },
|
package/lib/typography.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.js","names":["defineTokens"],"sources":["../src/typography.ts"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"typography.js","names":["defineTokens"],"sources":["../src/typography.ts"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { FontSizeToken, LineHeightToken } from \"@ndla/styled-system/tokens\";\nimport { defineTextStyles, defineTokens } from \"@pandacss/dev\";\n\nexport const fontWeights = defineTokens.fontWeights({\n light: { value: 300 },\n normal: { value: 400 },\n semibold: { value: 600 },\n bold: { value: 670 },\n});\n\nexport const fonts = defineTokens.fonts({\n sans: {\n value: [\n \"Satoshi\",\n \"Helvetica\",\n \"Arial\",\n \"STKaiti\",\n \"'华文楷体'\",\n \"KaiTi\",\n \"SimKai\",\n \"'楷体'\",\n \"KaiU\",\n \"DFKai-SB\",\n \"'標楷體'\",\n \"SongTi\",\n \"'宋体'\",\n \"sans-serif\",\n ],\n },\n serif: {\n value: [\n \"'Source Serif 4 Variable'\",\n \"Times\",\n \"STKaiti\",\n \"'华文楷体'\",\n \"KaiTi\",\n \"SimKai\",\n \"'楷体'\",\n \"KaiU\",\n \"DFKai-SB\",\n \"'標楷體'\",\n \"SongTi\",\n \"'宋体'\",\n \"serif\",\n ],\n },\n code: {\n value: [\"'Source Code Pro Variable'\", \"Monaco\"],\n },\n});\n\nexport const fontSizes = defineTokens.fontSizes({\n // 12px\n xxsmall: { value: \"0.75rem\" },\n // 14px\n xsmall: { value: \"0.875rem\" },\n // 16px\n small: { value: \"1rem\" },\n // 18px\n medium: { value: \"1.125rem\" },\n // 22px\n large: { value: \"1.375rem\" },\n // 26px\n xlarge: { value: \"1.625rem\" },\n // 30px\n xxlarge: { value: \"1.875rem\" },\n // 38px\n \"3xlarge\": { value: \"2.375rem\" },\n // 48px\n \"4xlarge\": { value: \"3rem\" },\n});\n\nexport const lineHeights = defineTokens.lineHeights({\n xxsmall: { value: \"0.75rem\" },\n xsmall: { value: \"1.375rem\" },\n small: { value: \"1.5rem\" },\n medium: { value: \"1.75rem\" },\n large: { value: \"1.875rem\" },\n xlarge: { value: \"2.25rem\" },\n xxlarge: { value: \"2.375rem\" },\n \"3xlarge\": { value: \"3rem\" },\n \"4xlarge\": { value: \"3.75rem\" },\n});\n\nconst sizes = (size: FontSizeToken, lineHeight: LineHeightToken) => {\n return {\n fontSize: size,\n lineHeight,\n _chinese: {\n fontSize: `calc(token(fontSizes.${size}) * 1.11)`,\n lineHeight: `calc(token(lineHeights.${lineHeight}) * 1.11)`,\n },\n };\n};\n\nexport const textStyles = defineTextStyles({\n heading: {\n large: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"bold\",\n letterSpacing: \"-0.01em\",\n ...sizes(\"4xlarge\", \"4xlarge\"),\n mobileWideDown: {\n ...sizes(\"3xlarge\", \"3xlarge\"),\n },\n },\n },\n medium: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"bold\",\n letterSpacing: \"-0.01em\",\n ...sizes(\"3xlarge\", \"3xlarge\"),\n mobileWideDown: {\n letterSpacing: \"-0.01em\",\n ...sizes(\"xxlarge\", \"xxlarge\"),\n },\n },\n },\n small: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"bold\",\n letterSpacing: \"-0.01em\",\n ...sizes(\"xxlarge\", \"xxlarge\"),\n mobileWideDown: {\n ...sizes(\"xlarge\", \"xlarge\"),\n },\n },\n },\n },\n title: {\n large: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"bold\",\n letterSpacing: \"-0.01em\",\n ...sizes(\"xlarge\", \"xlarge\"),\n mobileWideDown: {\n ...sizes(\"large\", \"large\"),\n },\n },\n },\n medium: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"bold\",\n letterSpacing: \"-0.01em\",\n ...sizes(\"large\", \"large\"),\n mobileWideDown: {\n ...sizes(\"medium\", \"small\"),\n },\n },\n },\n small: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"bold\",\n letterSpacing: \"-0.01em\",\n ...sizes(\"medium\", \"small\"),\n },\n },\n },\n body: {\n article: {\n value: {\n fontFamily: \"serif\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"medium\", \"medium\"),\n },\n },\n articleLink: {\n value: {\n fontFamily: \"serif\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"medium\", \"medium\"),\n },\n },\n link: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"medium\", \"medium\"),\n },\n },\n xlarge: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"large\", \"large\"),\n },\n },\n large: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"medium\", \"medium\"),\n },\n },\n medium: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"small\", \"small\"),\n },\n },\n small: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"xsmall\", \"xsmall\"),\n },\n },\n },\n label: {\n large: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"medium\", \"medium\"),\n },\n strong: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"bold\",\n letterSpacing: \"normal\",\n ...sizes(\"medium\", \"medium\"),\n },\n },\n },\n medium: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"small\", \"small\"),\n },\n },\n small: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"xsmall\", \"xsmall\"),\n },\n },\n xsmall: {\n value: {\n fontFamily: \"sans\",\n fontWeight: \"normal\",\n letterSpacing: \"normal\",\n ...sizes(\"xxsmall\", \"xxsmall\"),\n },\n },\n },\n});\n"],"mappings":";;;AAWA,MAAa,cAAcA,2BAAa,YAAY;CAClD,OAAO,EAAE,OAAO,KAAK;CACrB,QAAQ,EAAE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;GAC3B,EACF;EACD,OAAO,EACL,OAAO;GACL,YAAY;GACZ,YAAY;GACZ,eAAe;GACf,GAAG,MAAM,UAAU,SAAS;GAC7B,EACF;EACD,QAAQ,EACN,OAAO;GACL,YAAY;GACZ,YAAY;GACZ,eAAe;GACf,GAAG,MAAM,SAAS,QAAQ;GAC3B,EACF;EACD,OAAO,EACL,OAAO;GACL,YAAY;GACZ,YAAY;GACZ,eAAe;GACf,GAAG,MAAM,UAAU,SAAS;GAC7B,EACF;EACF;CACD,OAAO;EACL,OAAO;GACL,OAAO;IACL,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,GAAG,MAAM,UAAU,SAAS;IAC7B;GACD,QAAQ,EACN,OAAO;IACL,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,GAAG,MAAM,UAAU,SAAS;IAC7B,EACF;GACF;EACD,QAAQ,EACN,OAAO;GACL,YAAY;GACZ,YAAY;GACZ,eAAe;GACf,GAAG,MAAM,SAAS,QAAQ;GAC3B,EACF;EACD,OAAO,EACL,OAAO;GACL,YAAY;GACZ,YAAY;GACZ,eAAe;GACf,GAAG,MAAM,UAAU,SAAS;GAC7B,EACF;EACD,QAAQ,EACN,OAAO;GACL,YAAY;GACZ,YAAY;GACZ,eAAe;GACf,GAAG,MAAM,WAAW,UAAU;GAC/B,EACF;EACF;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/preset-panda",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.71",
|
|
5
5
|
"description": "Panda preset for NDLA.",
|
|
6
6
|
"license": "GPL-3.0",
|
|
7
7
|
"exports": {
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "305f48a7ac64bc4138e437a0798e8db35bf755ec"
|
|
45
45
|
}
|