@frontify/fondue 12.0.0-beta.319 → 12.0.0-beta.320

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,16 +1,16 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { merge as m } from "../../utilities/merge.es.js";
3
- import { decorationMap as s, wordBreakMap as p, whitespaceMap as f, overflowMap as u, displayMap as c } from "../shared/records.es.js";
4
- const g = {
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { merge as s } from "../../utilities/merge.es.js";
3
+ import { decorationMap as p, wordBreakMap as f, whitespaceMap as u, overflowMap as c, displayMap as g } from "../shared/records.es.js";
4
+ const b = {
5
5
  default: "tw-font-regular",
6
6
  strong: "tw-font-medium",
7
7
  "x-strong": "tw-font-bold"
8
- }, b = {
8
+ }, M = {
9
9
  "x-small": "tw-text-body-x-small",
10
10
  small: "tw-text-body-small",
11
11
  medium: "tw-text-body-medium",
12
12
  large: "tw-text-body-large"
13
- }, M = {
13
+ }, v = {
14
14
  default: "tw-text-text",
15
15
  weak: "tw-text-text-weak",
16
16
  "x-weak": "tw-text-text-x-weak",
@@ -19,7 +19,7 @@ const g = {
19
19
  positive: "tw-text-text-positive",
20
20
  warning: "tw-text-text-warning",
21
21
  interactive: "tw-text-text-interactive"
22
- }, v = ({
22
+ }, y = ({
23
23
  children: a,
24
24
  as: o = "span",
25
25
  weight: x = "default",
@@ -29,27 +29,29 @@ const g = {
29
29
  wordBreak: n = "normal",
30
30
  whitespace: r = "normal",
31
31
  overflow: t = "visible",
32
- display: e
33
- }) => /* @__PURE__ */ d(
32
+ display: e,
33
+ ...d
34
+ }) => /* @__PURE__ */ m(
34
35
  o,
35
36
  {
36
37
  "data-test-id": "text",
37
- className: m([
38
+ className: s([
38
39
  "tw-font-body tw-max-w-full",
39
- g[x],
40
- b[i],
41
- M[w],
42
- s[l],
43
- p[n],
44
- t !== "truncate" && f[r],
45
- u[t],
46
- e && c[e]
40
+ b[x],
41
+ M[i],
42
+ v[w],
43
+ p[l],
44
+ f[n],
45
+ t !== "truncate" && u[r],
46
+ c[t],
47
+ e && g[e]
47
48
  ]),
49
+ ...d,
48
50
  children: a
49
51
  }
50
52
  );
51
- v.displayName = "FondueText";
53
+ y.displayName = "FondueText";
52
54
  export {
53
- v as Text
55
+ y as Text
54
56
  };
55
57
  //# sourceMappingURL=Text.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.es.js","sources":["../../../src/typography/Text/Text.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { merge } from '@utilities/merge';\nimport { ReactElement, ReactNode } from 'react';\nimport { decorationMap, displayMap, overflowMap, whitespaceMap, wordBreakMap } from '../shared/records';\nimport { SharedTypographyProps } from '../shared/types';\n\ntype TextWeight = 'default' | 'strong' | 'x-strong';\ntype TextSize = 'x-small' | 'small' | 'medium' | 'large';\ntype TextColor = 'default' | 'weak' | 'x-weak' | 'disabled' | 'negative' | 'positive' | 'warning' | 'interactive';\n\nexport type TextProps = SharedTypographyProps & {\n size?: TextSize;\n weight?: TextWeight;\n as?: 'a' | 'abbr' | 'address' | 'em' | 'label' | 'li' | 'span' | 'strong' | 'time' | 'p';\n color?: TextColor;\n children?: ReactNode;\n};\n\nconst weightMap: Record<TextWeight, string> = {\n default: 'tw-font-regular',\n strong: 'tw-font-medium',\n 'x-strong': 'tw-font-bold',\n};\n\nconst sizeMap: Record<TextSize, string> = {\n 'x-small': 'tw-text-body-x-small',\n small: 'tw-text-body-small',\n medium: 'tw-text-body-medium',\n large: 'tw-text-body-large',\n};\n\nconst colorMap: Record<TextColor, string> = {\n default: 'tw-text-text',\n weak: 'tw-text-text-weak',\n 'x-weak': 'tw-text-text-x-weak',\n disabled: 'tw-text-text-disabled',\n negative: 'tw-text-text-negative',\n positive: 'tw-text-text-positive',\n warning: 'tw-text-text-warning',\n interactive: 'tw-text-text-interactive',\n};\n\nexport const Text = ({\n children,\n as: Tag = 'span',\n weight = 'default',\n size = 'medium',\n color = 'default',\n decoration = 'none',\n wordBreak = 'normal',\n whitespace = 'normal',\n overflow = 'visible',\n display,\n}: TextProps): ReactElement => (\n <Tag\n data-test-id=\"text\"\n className={merge([\n 'tw-font-body tw-max-w-full',\n weightMap[weight],\n sizeMap[size],\n colorMap[color],\n decorationMap[decoration],\n wordBreakMap[wordBreak],\n overflow !== 'truncate' && whitespaceMap[whitespace],\n overflowMap[overflow],\n display && displayMap[display],\n ])}\n >\n {children}\n </Tag>\n);\nText.displayName = 'FondueText';\n"],"names":["weightMap","sizeMap","colorMap","Text","children","Tag","weight","size","color","decoration","wordBreak","whitespace","overflow","display","jsx","merge","decorationMap","wordBreakMap","whitespaceMap","overflowMap","displayMap"],"mappings":";;;AAmBA,MAAMA,IAAwC;AAAA,EAC1C,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,YAAY;AAChB,GAEMC,IAAoC;AAAA,EACtC,WAAW;AAAA,EACX,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACX,GAEMC,IAAsC;AAAA,EACxC,SAAS;AAAA,EACT,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AAAA,EACT,aAAa;AACjB,GAEaC,IAAO,CAAC;AAAA,EACjB,UAAAC;AAAA,EACA,IAAIC,IAAM;AAAA,EACV,QAAAC,IAAS;AAAA,EACT,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,YAAAC,IAAa;AAAA,EACb,WAAAC,IAAY;AAAA,EACZ,YAAAC,IAAa;AAAA,EACb,UAAAC,IAAW;AAAA,EACX,SAAAC;AACJ,MACI,gBAAAC;AAAA,EAACT;AAAA,EAAA;AAAA,IACG,gBAAa;AAAA,IACb,WAAWU,EAAM;AAAA,MACb;AAAA,MACAf,EAAUM,CAAM;AAAA,MAChBL,EAAQM,CAAI;AAAA,MACZL,EAASM,CAAK;AAAA,MACdQ,EAAcP,CAAU;AAAA,MACxBQ,EAAaP,CAAS;AAAA,MACtBE,MAAa,cAAcM,EAAcP,CAAU;AAAA,MACnDQ,EAAYP,CAAQ;AAAA,MACpBC,KAAWO,EAAWP,CAAO;AAAA,IAAA,CAChC;AAAA,IAEA,UAAAT;AAAA,EAAA;AACL;AAEJD,EAAK,cAAc;"}
1
+ {"version":3,"file":"Text.es.js","sources":["../../../src/typography/Text/Text.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { merge } from '@utilities/merge';\nimport { AriaAttributes, ReactElement, ReactNode } from 'react';\nimport { decorationMap, displayMap, overflowMap, whitespaceMap, wordBreakMap } from '../shared/records';\nimport { SharedTypographyProps } from '../shared/types';\n\ntype TextWeight = 'default' | 'strong' | 'x-strong';\ntype TextSize = 'x-small' | 'small' | 'medium' | 'large';\ntype TextColor = 'default' | 'weak' | 'x-weak' | 'disabled' | 'negative' | 'positive' | 'warning' | 'interactive';\n\nexport type TextProps = SharedTypographyProps &\n AriaAttributes & {\n size?: TextSize;\n weight?: TextWeight;\n as?: 'a' | 'abbr' | 'address' | 'em' | 'label' | 'li' | 'span' | 'strong' | 'time' | 'p';\n color?: TextColor;\n children?: ReactNode;\n };\n\nconst weightMap: Record<TextWeight, string> = {\n default: 'tw-font-regular',\n strong: 'tw-font-medium',\n 'x-strong': 'tw-font-bold',\n};\n\nconst sizeMap: Record<TextSize, string> = {\n 'x-small': 'tw-text-body-x-small',\n small: 'tw-text-body-small',\n medium: 'tw-text-body-medium',\n large: 'tw-text-body-large',\n};\n\nconst colorMap: Record<TextColor, string> = {\n default: 'tw-text-text',\n weak: 'tw-text-text-weak',\n 'x-weak': 'tw-text-text-x-weak',\n disabled: 'tw-text-text-disabled',\n negative: 'tw-text-text-negative',\n positive: 'tw-text-text-positive',\n warning: 'tw-text-text-warning',\n interactive: 'tw-text-text-interactive',\n};\n\nexport const Text = ({\n children,\n as: Tag = 'span',\n weight = 'default',\n size = 'medium',\n color = 'default',\n decoration = 'none',\n wordBreak = 'normal',\n whitespace = 'normal',\n overflow = 'visible',\n display,\n ...props\n}: TextProps): ReactElement => (\n <Tag\n data-test-id=\"text\"\n className={merge([\n 'tw-font-body tw-max-w-full',\n weightMap[weight],\n sizeMap[size],\n colorMap[color],\n decorationMap[decoration],\n wordBreakMap[wordBreak],\n overflow !== 'truncate' && whitespaceMap[whitespace],\n overflowMap[overflow],\n display && displayMap[display],\n ])}\n {...props}\n >\n {children}\n </Tag>\n);\nText.displayName = 'FondueText';\n"],"names":["weightMap","sizeMap","colorMap","Text","children","Tag","weight","size","color","decoration","wordBreak","whitespace","overflow","display","props","jsx","merge","decorationMap","wordBreakMap","whitespaceMap","overflowMap","displayMap"],"mappings":";;;AAoBA,MAAMA,IAAwC;AAAA,EAC1C,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,YAAY;AAChB,GAEMC,IAAoC;AAAA,EACtC,WAAW;AAAA,EACX,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACX,GAEMC,IAAsC;AAAA,EACxC,SAAS;AAAA,EACT,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AAAA,EACT,aAAa;AACjB,GAEaC,IAAO,CAAC;AAAA,EACjB,UAAAC;AAAA,EACA,IAAIC,IAAM;AAAA,EACV,QAAAC,IAAS;AAAA,EACT,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,YAAAC,IAAa;AAAA,EACb,WAAAC,IAAY;AAAA,EACZ,YAAAC,IAAa;AAAA,EACb,UAAAC,IAAW;AAAA,EACX,SAAAC;AAAA,EACA,GAAGC;AACP,MACI,gBAAAC;AAAA,EAACV;AAAA,EAAA;AAAA,IACG,gBAAa;AAAA,IACb,WAAWW,EAAM;AAAA,MACb;AAAA,MACAhB,EAAUM,CAAM;AAAA,MAChBL,EAAQM,CAAI;AAAA,MACZL,EAASM,CAAK;AAAA,MACdS,EAAcR,CAAU;AAAA,MACxBS,EAAaR,CAAS;AAAA,MACtBE,MAAa,cAAcO,EAAcR,CAAU;AAAA,MACnDS,EAAYR,CAAQ;AAAA,MACpBC,KAAWQ,EAAWR,CAAO;AAAA,IAAA,CAChC;AAAA,IACA,GAAGC;AAAA,IAEH,UAAAV;AAAA,EAAA;AACL;AAEJD,EAAK,cAAc;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontify/fondue",
3
- "version": "12.0.0-beta.319",
3
+ "version": "12.0.0-beta.320",
4
4
  "description": "Design system of Frontify",
5
5
  "engines": {
6
6
  "node": ">=16"