@seed-design/react 0.2.1 → 0.2.2

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.
@@ -14,7 +14,7 @@ function handleColor(color) {
14
14
  return void 0;
15
15
  }
16
16
  const [type, value] = color.split(".");
17
- return vars.vars.$color[type][value] ?? void 0;
17
+ return vars.vars.$color[type]?.[value] ?? color;
18
18
  }
19
19
  function handleFontWeight(fontWeight) {
20
20
  if (!fontWeight) {
@@ -10,15 +10,15 @@ export interface TextProps extends Omit<TextVariantProps, "maxLines">, React.HTM
10
10
  /**
11
11
  * The color of the text.
12
12
  */
13
- color?: ScopedColorFg | ScopedColorPalette;
13
+ color?: ScopedColorFg | ScopedColorPalette | (string & {});
14
14
  /**
15
15
  * The font size of the text. Partially overrides the textStyle.
16
16
  */
17
- fontSize?: FontSize;
17
+ fontSize?: FontSize | (string & {});
18
18
  /**
19
19
  * The line height of the text. Partially overrides the textStyle.
20
20
  */
21
- lineHeight?: LineHeight;
21
+ lineHeight?: LineHeight | (string & {});
22
22
  /**
23
23
  * The font weight of the text. Partially overrides the textStyle.
24
24
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAoCpC,MAAM,WAAW,SACf,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,EACxC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACvC;;;OAGG;IACH,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAA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AAE,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAEpC;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAExC;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CACrC;AAYD,eAAO,MAAM,IAAI,mFAmDhB,CAAC"}
@@ -10,7 +10,7 @@ function handleColor(color) {
10
10
  return void 0;
11
11
  }
12
12
  const [type, value] = color.split(".");
13
- return vars.$color[type][value] ?? void 0;
13
+ return vars.$color[type]?.[value] ?? color;
14
14
  }
15
15
  function handleFontWeight(fontWeight) {
16
16
  if (!fontWeight) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seed-design/react",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/daangn/seed-design.git",
@@ -17,7 +17,7 @@ function handleColor(color: string | undefined) {
17
17
  }
18
18
  const [type, value] = color.split(".");
19
19
  // @ts-ignore
20
- return vars.$color[type][value] ?? undefined;
20
+ return vars.$color[type]?.[value] ?? color;
21
21
  }
22
22
 
23
23
  function handleFontWeight(fontWeight: string | undefined) {
@@ -56,17 +56,17 @@ export interface TextProps
56
56
  /**
57
57
  * The color of the text.
58
58
  */
59
- color?: ScopedColorFg | ScopedColorPalette;
59
+ color?: ScopedColorFg | ScopedColorPalette | (string & {});
60
60
 
61
61
  /**
62
62
  * The font size of the text. Partially overrides the textStyle.
63
63
  */
64
- fontSize?: FontSize;
64
+ fontSize?: FontSize | (string & {});
65
65
 
66
66
  /**
67
67
  * The line height of the text. Partially overrides the textStyle.
68
68
  */
69
- lineHeight?: LineHeight;
69
+ lineHeight?: LineHeight | (string & {});
70
70
 
71
71
  /**
72
72
  * The font weight of the text. Partially overrides the textStyle.