@cdx-ui/components 0.0.1-beta.15 → 0.0.1-beta.17
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/lib/commonjs/components/Text/styles.js +2 -2
- package/lib/commonjs/components/Text/styles.js.map +1 -1
- package/lib/commonjs/figma/Text.figma.js +29 -0
- package/lib/commonjs/figma/Text.figma.js.map +1 -0
- package/lib/module/components/Text/styles.js +2 -2
- package/lib/module/components/Text/styles.js.map +1 -1
- package/lib/module/figma/Text.figma.js +23 -0
- package/lib/module/figma/Text.figma.js.map +1 -0
- package/lib/typescript/figma/Text.figma.d.ts +8 -0
- package/lib/typescript/figma/Text.figma.d.ts.map +1 -0
- package/package.json +4 -4
- package/src/components/Text/styles.ts +2 -2
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.textStyle = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
8
|
var _classVarianceAuthority = require("class-variance-authority");
|
|
9
|
-
const textStyle = exports.textStyle = (0, _classVarianceAuthority.cva)([
|
|
10
|
-
web: 'font-
|
|
9
|
+
const textStyle = exports.textStyle = (0, _classVarianceAuthority.cva)(['text-content-primary', _reactNative.Platform.select({
|
|
10
|
+
web: 'font-body my-0 bg-transparent display-inline no-underline',
|
|
11
11
|
default: ''
|
|
12
12
|
})], {
|
|
13
13
|
variants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","textStyle","exports","cva","Platform","select","web","default","variants","size","xl","lg","md","sm","xs"],"sourceRoot":"../../../../src","sources":["components/Text/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AAEO,MAAME,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,IAAAE,2BAAG,EAC1B,CACE,
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","textStyle","exports","cva","Platform","select","web","default","variants","size","xl","lg","md","sm","xs"],"sourceRoot":"../../../../src","sources":["components/Text/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AAEO,MAAME,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,IAAAE,2BAAG,EAC1B,CACE,sBAAsB,EACtBC,qBAAQ,CAACC,MAAM,CAAC;EACdC,GAAG,EAAE,2DAA2D;EAChEC,OAAO,EAAE;AACX,CAAC,CAAC,CACH,EACD;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE;IACN;EACF;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _figma = _interopRequireDefault(require("figma"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-CDS-V2--React-Native?node-id=400-3
|
|
10
|
+
// source=packages/components/src/components/Text/index.tsx
|
|
11
|
+
// component=Text
|
|
12
|
+
|
|
13
|
+
const instance = _figma.default.selectedInstance;
|
|
14
|
+
|
|
15
|
+
// Figma size values are identical to code size values — no renaming needed.
|
|
16
|
+
const size = instance.getEnum('size', {
|
|
17
|
+
xl: 'xl',
|
|
18
|
+
lg: 'lg',
|
|
19
|
+
md: 'md',
|
|
20
|
+
sm: 'sm',
|
|
21
|
+
xs: 'xs'
|
|
22
|
+
});
|
|
23
|
+
const text = instance.findText('{Text}').textContent;
|
|
24
|
+
var _default = exports.default = {
|
|
25
|
+
id: 'text',
|
|
26
|
+
imports: ["import { Text } from '@cdx-ui/components'"],
|
|
27
|
+
example: _figma.default.code`<Text size="${size}">${text}</Text>`
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=Text.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_figma","_interopRequireDefault","require","e","__esModule","default","instance","figma","selectedInstance","size","getEnum","xl","lg","md","sm","xs","text","findText","textContent","_default","exports","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/Text.figma.ts"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0B,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAH1B;AACA;AACA;;AAGA,MAAMG,QAAQ,GAAGC,cAAK,CAACC,gBAAgB;;AAEvC;AACA,MAAMC,IAAI,GAAGH,QAAQ,CAACI,OAAO,CAAC,MAAM,EAAE;EACpCC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE;AACN,CAAC,CAAC;AAEF,MAAMC,IAAI,GAAIV,QAAQ,CAACW,QAAQ,CAAC,QAAQ,CAAC,CAAgCC,WAAW;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEtE;EACbgB,EAAE,EAAE,MAAM;EACVC,OAAO,EAAE,CAAC,2CAA2C,CAAC;EACtDC,OAAO,EAAEhB,cAAK,CAACiB,IAAI,eAAef,IAAI,KAAKO,IAAI;AACjD,CAAC","ignoreList":[]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
-
export const textStyle = cva([
|
|
6
|
-
web: 'font-
|
|
5
|
+
export const textStyle = cva(['text-content-primary', Platform.select({
|
|
6
|
+
web: 'font-body my-0 bg-transparent display-inline no-underline',
|
|
7
7
|
default: ''
|
|
8
8
|
})], {
|
|
9
9
|
variants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","cva","textStyle","select","web","default","variants","size","xl","lg","md","sm","xs"],"sourceRoot":"../../../../src","sources":["components/Text/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,SAAS,GAAGD,GAAG,CAC1B,CACE,
|
|
1
|
+
{"version":3,"names":["Platform","cva","textStyle","select","web","default","variants","size","xl","lg","md","sm","xs"],"sourceRoot":"../../../../src","sources":["components/Text/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,SAAS,GAAGD,GAAG,CAC1B,CACE,sBAAsB,EACtBD,QAAQ,CAACG,MAAM,CAAC;EACdC,GAAG,EAAE,2DAA2D;EAChEC,OAAO,EAAE;AACX,CAAC,CAAC,CACH,EACD;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE;IACN;EACF;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-CDS-V2--React-Native?node-id=400-3
|
|
4
|
+
// source=packages/components/src/components/Text/index.tsx
|
|
5
|
+
// component=Text
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// Figma size values are identical to code size values — no renaming needed.
|
|
10
|
+
const size = instance.getEnum('size', {
|
|
11
|
+
xl: 'xl',
|
|
12
|
+
lg: 'lg',
|
|
13
|
+
md: 'md',
|
|
14
|
+
sm: 'sm',
|
|
15
|
+
xs: 'xs'
|
|
16
|
+
});
|
|
17
|
+
const text = instance.findText('{Text}').textContent;
|
|
18
|
+
export default {
|
|
19
|
+
id: 'text',
|
|
20
|
+
imports: ["import { Text } from '@cdx-ui/components'"],
|
|
21
|
+
example: figma.code`<Text size="${size}">${text}</Text>`
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=Text.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","size","getEnum","xl","lg","md","sm","xs","text","findText","textContent","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/Text.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA,MAAMC,IAAI,GAAGF,QAAQ,CAACG,OAAO,CAAC,MAAM,EAAE;EACpCC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE;AACN,CAAC,CAAC;AAEF,MAAMC,IAAI,GAAIT,QAAQ,CAACU,QAAQ,CAAC,QAAQ,CAAC,CAAgCC,WAAW;AAEpF,eAAe;EACbC,EAAE,EAAE,MAAM;EACVC,OAAO,EAAE,CAAC,2CAA2C,CAAC;EACtDC,OAAO,EAAEf,KAAK,CAACgB,IAAI,eAAeb,IAAI,KAAKO,IAAI;AACjD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Text.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAe1B,wBAIE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdx-ui/components",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.17",
|
|
4
4
|
"main": "lib/commonjs/index.js",
|
|
5
5
|
"module": "lib/module/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"@gorhom/bottom-sheet": "^5.2.6",
|
|
68
68
|
"class-variance-authority": "^0.7.1",
|
|
69
69
|
"uniwind": "1.6.1",
|
|
70
|
-
"@cdx-ui/primitives": "0.0.1-beta.
|
|
71
|
-
"@cdx-ui/
|
|
72
|
-
"@cdx-ui/
|
|
70
|
+
"@cdx-ui/primitives": "0.0.1-beta.17",
|
|
71
|
+
"@cdx-ui/utils": "0.0.1-beta.17",
|
|
72
|
+
"@cdx-ui/icons": "0.0.1-beta.17"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@types/react": "*",
|
|
@@ -3,9 +3,9 @@ import { cva, type VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
|
|
4
4
|
export const textStyle = cva(
|
|
5
5
|
[
|
|
6
|
-
|
|
6
|
+
'text-content-primary',
|
|
7
7
|
Platform.select({
|
|
8
|
-
web: 'font-
|
|
8
|
+
web: 'font-body my-0 bg-transparent display-inline no-underline',
|
|
9
9
|
default: '',
|
|
10
10
|
}),
|
|
11
11
|
],
|