@cdx-ui/components 0.0.1-beta.119 → 0.0.1-beta.120

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.
@@ -11,10 +11,10 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
11
11
  // component=Card.Header
12
12
 
13
13
  const instance = _figma.default.selectedInstance;
14
- const showActions = instance.getBoolean('Show Actions?');
15
- const actionsSlot = instance.getSlot('Actions');
16
14
  const title = instance.findText('{Title}').textContent;
17
- const actions = showActions && actionsSlot ? _figma.default.helpers.react.renderChildren(actionsSlot) : null;
15
+ const showActions = instance.getBoolean('Show Actions?');
16
+ const actionsInstance = showActions ? instance.getInstanceSwap('Actions') : null;
17
+ const actionsSnippet = actionsInstance?.type === 'INSTANCE' ? actionsInstance.executeTemplate().example : null;
18
18
  var _default = exports.default = {
19
19
  id: 'card-header',
20
20
  // Must match Card.figma.ts when the card nests this template (identical strings → deduped imports).
@@ -22,7 +22,7 @@ var _default = exports.default = {
22
22
  example: _figma.default.code`
23
23
  <Card.Header>
24
24
  <Heading size="sm">${title}</Heading>
25
- ${actions}
25
+ ${actionsSnippet}
26
26
  </Card.Header>`
27
27
  };
28
28
  //# sourceMappingURL=Card.Header.figma.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_figma","_interopRequireDefault","require","e","__esModule","default","instance","figma","selectedInstance","showActions","getBoolean","actionsSlot","getSlot","title","findText","textContent","actions","helpers","react","renderChildren","_default","exports","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/Card.Header.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,MAAMC,WAAW,GAAGH,QAAQ,CAACI,UAAU,CAAC,eAAe,CAAC;AACxD,MAAMC,WAAW,GAAGL,QAAQ,CAACM,OAAO,CAAC,SAAS,CAAC;AAC/C,MAAMC,KAAK,GAAIP,QAAQ,CAACQ,QAAQ,CAAC,SAAS,CAAC,CAAgCC,WAAW;AAEtF,MAAMC,OAAO,GAAGP,WAAW,IAAIE,WAAW,GAAGJ,cAAK,CAACU,OAAO,CAACC,KAAK,CAACC,cAAc,CAACR,WAAW,CAAC,GAAG,IAAI;AAAC,IAAAS,QAAA,GAAAC,OAAA,CAAAhB,OAAA,GAErF;EACbiB,EAAE,EAAE,aAAa;EACjB;EACAC,OAAO,EAAE,CAAC,oDAAoD,CAAC;EAC/DC,OAAO,EAAEjB,cAAK,CAACkB,IAAI;AACrB;AACA,uBAAuBZ,KAAK;AAC5B,IAAIG,OAAO;AACX;AACA,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_figma","_interopRequireDefault","require","e","__esModule","default","instance","figma","selectedInstance","title","findText","textContent","showActions","getBoolean","actionsInstance","getInstanceSwap","actionsSnippet","type","executeTemplate","example","_default","exports","id","imports","code"],"sourceRoot":"../../../src","sources":["figma/Card.Header.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,MAAMC,KAAK,GAAIH,QAAQ,CAACI,QAAQ,CAAC,SAAS,CAAC,CAAgCC,WAAW;AAEtF,MAAMC,WAAW,GAAGN,QAAQ,CAACO,UAAU,CAAC,eAAe,CAAC;AACxD,MAAMC,eAAe,GAAGF,WAAW,GAAGN,QAAQ,CAACS,eAAe,CAAC,SAAS,CAAC,GAAG,IAAI;AAChF,MAAMC,cAAc,GAClBF,eAAe,EAAEG,IAAI,KAAK,UAAU,GAAGH,eAAe,CAACI,eAAe,CAAC,CAAC,CAACC,OAAO,GAAG,IAAI;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAhB,OAAA,GAE3E;EACbiB,EAAE,EAAE,aAAa;EACjB;EACAC,OAAO,EAAE,CAAC,oDAAoD,CAAC;EAC/DJ,OAAO,EAAEZ,cAAK,CAACiB,IAAI;AACrB;AACA,uBAAuBf,KAAK;AAC5B,IAAIO,cAAc;AAClB;AACA,CAAC","ignoreList":[]}
@@ -5,10 +5,10 @@
5
5
  // component=Card.Header
6
6
  import figma from 'figma';
7
7
  const instance = figma.selectedInstance;
8
- const showActions = instance.getBoolean('Show Actions?');
9
- const actionsSlot = instance.getSlot('Actions');
10
8
  const title = instance.findText('{Title}').textContent;
11
- const actions = showActions && actionsSlot ? figma.helpers.react.renderChildren(actionsSlot) : null;
9
+ const showActions = instance.getBoolean('Show Actions?');
10
+ const actionsInstance = showActions ? instance.getInstanceSwap('Actions') : null;
11
+ const actionsSnippet = actionsInstance?.type === 'INSTANCE' ? actionsInstance.executeTemplate().example : null;
12
12
  export default {
13
13
  id: 'card-header',
14
14
  // Must match Card.figma.ts when the card nests this template (identical strings → deduped imports).
@@ -16,7 +16,7 @@ export default {
16
16
  example: figma.code`
17
17
  <Card.Header>
18
18
  <Heading size="sm">${title}</Heading>
19
- ${actions}
19
+ ${actionsSnippet}
20
20
  </Card.Header>`
21
21
  };
22
22
  //# sourceMappingURL=Card.Header.figma.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["figma","instance","selectedInstance","showActions","getBoolean","actionsSlot","getSlot","title","findText","textContent","actions","helpers","react","renderChildren","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/Card.Header.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,WAAW,GAAGF,QAAQ,CAACG,UAAU,CAAC,eAAe,CAAC;AACxD,MAAMC,WAAW,GAAGJ,QAAQ,CAACK,OAAO,CAAC,SAAS,CAAC;AAC/C,MAAMC,KAAK,GAAIN,QAAQ,CAACO,QAAQ,CAAC,SAAS,CAAC,CAAgCC,WAAW;AAEtF,MAAMC,OAAO,GAAGP,WAAW,IAAIE,WAAW,GAAGL,KAAK,CAACW,OAAO,CAACC,KAAK,CAACC,cAAc,CAACR,WAAW,CAAC,GAAG,IAAI;AAEnG,eAAe;EACbS,EAAE,EAAE,aAAa;EACjB;EACAC,OAAO,EAAE,CAAC,oDAAoD,CAAC;EAC/DC,OAAO,EAAEhB,KAAK,CAACiB,IAAI;AACrB;AACA,uBAAuBV,KAAK;AAC5B,IAAIG,OAAO;AACX;AACA,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["figma","instance","selectedInstance","title","findText","textContent","showActions","getBoolean","actionsInstance","getInstanceSwap","actionsSnippet","type","executeTemplate","example","id","imports","code"],"sourceRoot":"../../../src","sources":["figma/Card.Header.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,KAAK,GAAIF,QAAQ,CAACG,QAAQ,CAAC,SAAS,CAAC,CAAgCC,WAAW;AAEtF,MAAMC,WAAW,GAAGL,QAAQ,CAACM,UAAU,CAAC,eAAe,CAAC;AACxD,MAAMC,eAAe,GAAGF,WAAW,GAAGL,QAAQ,CAACQ,eAAe,CAAC,SAAS,CAAC,GAAG,IAAI;AAChF,MAAMC,cAAc,GAClBF,eAAe,EAAEG,IAAI,KAAK,UAAU,GAAGH,eAAe,CAACI,eAAe,CAAC,CAAC,CAACC,OAAO,GAAG,IAAI;AAEzF,eAAe;EACbC,EAAE,EAAE,aAAa;EACjB;EACAC,OAAO,EAAE,CAAC,oDAAoD,CAAC;EAC/DF,OAAO,EAAEb,KAAK,CAACgB,IAAI;AACrB;AACA,uBAAuBb,KAAK;AAC5B,IAAIO,cAAc;AAClB;AACA,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Card.Header.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Card.Header.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAU1B,wBASE"}
1
+ {"version":3,"file":"Card.Header.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Card.Header.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAW1B,wBASE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdx-ui/components",
3
- "version": "0.0.1-beta.119",
3
+ "version": "0.0.1-beta.120",
4
4
  "main": "lib/commonjs/index.js",
5
5
  "module": "lib/module/index.js",
6
6
  "react-native": "src/index.ts",
@@ -76,9 +76,9 @@
76
76
  "class-variance-authority": "^0.7.1",
77
77
  "react-native-reanimated-carousel": "5.0.0-beta.5",
78
78
  "uniwind": "1.10.0",
79
- "@cdx-ui/primitives": "0.0.1-beta.119",
80
- "@cdx-ui/icons": "0.0.1-beta.119",
81
- "@cdx-ui/utils": "0.0.1-beta.119"
79
+ "@cdx-ui/utils": "0.0.1-beta.120",
80
+ "@cdx-ui/icons": "0.0.1-beta.120",
81
+ "@cdx-ui/primitives": "0.0.1-beta.120"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@react-navigation/bottom-tabs": "*",