@cdx-ui/components 0.1.4 → 0.1.6
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/README.md +1 -1
- package/coverage.svg +1 -1
- package/lib/commonjs/components/ToggleButton/index.js +249 -0
- package/lib/commonjs/components/ToggleButton/index.js.map +1 -0
- package/lib/commonjs/components/ToggleButton/styles.js +155 -0
- package/lib/commonjs/components/ToggleButton/styles.js.map +1 -0
- package/lib/commonjs/components/index.js +12 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/figma/Calendar.figma.js +28 -0
- package/lib/commonjs/figma/Calendar.figma.js.map +1 -0
- package/lib/commonjs/figma/Carousel.NextButton.figma.js +27 -0
- package/lib/commonjs/figma/Carousel.NextButton.figma.js.map +1 -0
- package/lib/commonjs/figma/Carousel.Pagination.figma.js +22 -0
- package/lib/commonjs/figma/Carousel.Pagination.figma.js.map +1 -0
- package/lib/commonjs/figma/Carousel.PrevButton.figma.js +27 -0
- package/lib/commonjs/figma/Carousel.PrevButton.figma.js.map +1 -0
- package/lib/commonjs/figma/Carousel.figma.js +37 -0
- package/lib/commonjs/figma/Carousel.figma.js.map +1 -0
- package/lib/commonjs/figma/Checkbox.Group.figma.js +24 -0
- package/lib/commonjs/figma/Checkbox.Group.figma.js.map +1 -0
- package/lib/commonjs/figma/CurrencyInput.figma.js +54 -0
- package/lib/commonjs/figma/CurrencyInput.figma.js.map +1 -0
- package/lib/commonjs/figma/DateField.figma.js +58 -0
- package/lib/commonjs/figma/DateField.figma.js.map +1 -0
- package/lib/commonjs/figma/DatePicker.figma.js +88 -0
- package/lib/commonjs/figma/DatePicker.figma.js.map +1 -0
- package/lib/commonjs/figma/DateRangePicker.figma.js +85 -0
- package/lib/commonjs/figma/DateRangePicker.figma.js.map +1 -0
- package/lib/commonjs/figma/DateTimeField.figma.js +69 -0
- package/lib/commonjs/figma/DateTimeField.figma.js.map +1 -0
- package/lib/commonjs/figma/Field.Checkbox.figma.js +52 -0
- package/lib/commonjs/figma/Field.Checkbox.figma.js.map +1 -0
- package/lib/commonjs/figma/Field.DateField.figma.js +57 -0
- package/lib/commonjs/figma/Field.DateField.figma.js.map +1 -0
- package/lib/commonjs/figma/Field.DateTimeField.figma.js +57 -0
- package/lib/commonjs/figma/Field.DateTimeField.figma.js.map +1 -0
- package/lib/commonjs/figma/Image.figma.js +22 -0
- package/lib/commonjs/figma/Image.figma.js.map +1 -0
- package/lib/commonjs/figma/MonthCalendar.figma.js +18 -0
- package/lib/commonjs/figma/MonthCalendar.figma.js.map +1 -0
- package/lib/commonjs/figma/ProgressBar.figma.js +54 -0
- package/lib/commonjs/figma/ProgressBar.figma.js.map +1 -0
- package/lib/commonjs/figma/ProgressCircle.figma.js +73 -0
- package/lib/commonjs/figma/ProgressCircle.figma.js.map +1 -0
- package/lib/commonjs/figma/RangeCalendar.figma.js +36 -0
- package/lib/commonjs/figma/RangeCalendar.figma.js.map +1 -0
- package/lib/commonjs/figma/Skeleton.figma.js +31 -0
- package/lib/commonjs/figma/Skeleton.figma.js.map +1 -0
- package/lib/commonjs/figma/Slider.Marker.figma.js +21 -0
- package/lib/commonjs/figma/Slider.Marker.figma.js.map +1 -0
- package/lib/commonjs/figma/Slider.MarkerGroup.figma.js +22 -0
- package/lib/commonjs/figma/Slider.MarkerGroup.figma.js.map +1 -0
- package/lib/commonjs/figma/Slider.Thumb.figma.js +22 -0
- package/lib/commonjs/figma/Slider.Thumb.figma.js.map +1 -0
- package/lib/commonjs/figma/Slider.figma.js +69 -0
- package/lib/commonjs/figma/Slider.figma.js.map +1 -0
- package/lib/commonjs/figma/Switch.figma.js +36 -0
- package/lib/commonjs/figma/Switch.figma.js.map +1 -0
- package/lib/commonjs/figma/Tabs.SegmentedControl.Segment.figma.js +34 -0
- package/lib/commonjs/figma/Tabs.SegmentedControl.Segment.figma.js.map +1 -0
- package/lib/commonjs/figma/Tabs.SegmentedControl.figma.js +43 -0
- package/lib/commonjs/figma/Tabs.SegmentedControl.figma.js.map +1 -0
- package/lib/commonjs/figma/Tabs.Tab.figma.js +34 -0
- package/lib/commonjs/figma/Tabs.Tab.figma.js.map +1 -0
- package/lib/commonjs/figma/Tabs.figma.js +39 -0
- package/lib/commonjs/figma/Tabs.figma.js.map +1 -0
- package/lib/commonjs/figma/Tile.Description.figma.js +23 -0
- package/lib/commonjs/figma/Tile.Description.figma.js.map +1 -0
- package/lib/commonjs/figma/Tile.Group.figma.js +45 -0
- package/lib/commonjs/figma/Tile.Group.figma.js.map +1 -0
- package/lib/commonjs/figma/Tile.LeadingSlot.figma.js +23 -0
- package/lib/commonjs/figma/Tile.LeadingSlot.figma.js.map +1 -0
- package/lib/commonjs/figma/Tile.Title.figma.js +23 -0
- package/lib/commonjs/figma/Tile.Title.figma.js.map +1 -0
- package/lib/commonjs/figma/Tile.TrailingSlot.figma.js +23 -0
- package/lib/commonjs/figma/Tile.TrailingSlot.figma.js.map +1 -0
- package/lib/commonjs/figma/Tile.figma.js +57 -0
- package/lib/commonjs/figma/Tile.figma.js.map +1 -0
- package/lib/commonjs/figma/Toast.Button.figma.js +32 -0
- package/lib/commonjs/figma/Toast.Button.figma.js.map +1 -0
- package/lib/commonjs/figma/Toast.Close.figma.js +20 -0
- package/lib/commonjs/figma/Toast.Close.figma.js.map +1 -0
- package/lib/commonjs/figma/Toast.figma.js +81 -0
- package/lib/commonjs/figma/Toast.figma.js.map +1 -0
- package/lib/commonjs/figma/Tooltip.Content.figma.js +30 -0
- package/lib/commonjs/figma/Tooltip.Content.figma.js.map +1 -0
- package/lib/commonjs/figma/Tooltip.figma.js +46 -0
- package/lib/commonjs/figma/Tooltip.figma.js.map +1 -0
- package/lib/commonjs/figma/VirtualizedList.figma.js +31 -0
- package/lib/commonjs/figma/VirtualizedList.figma.js.map +1 -0
- package/lib/module/components/ToggleButton/index.js +245 -0
- package/lib/module/components/ToggleButton/index.js.map +1 -0
- package/lib/module/components/ToggleButton/styles.js +152 -0
- package/lib/module/components/ToggleButton/styles.js.map +1 -0
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/figma/Calendar.figma.js +22 -0
- package/lib/module/figma/Calendar.figma.js.map +1 -0
- package/lib/module/figma/Carousel.NextButton.figma.js +21 -0
- package/lib/module/figma/Carousel.NextButton.figma.js.map +1 -0
- package/lib/module/figma/Carousel.Pagination.figma.js +18 -0
- package/lib/module/figma/Carousel.Pagination.figma.js.map +1 -0
- package/lib/module/figma/Carousel.PrevButton.figma.js +21 -0
- package/lib/module/figma/Carousel.PrevButton.figma.js.map +1 -0
- package/lib/module/figma/Carousel.figma.js +31 -0
- package/lib/module/figma/Carousel.figma.js.map +1 -0
- package/lib/module/figma/Checkbox.Group.figma.js +18 -0
- package/lib/module/figma/Checkbox.Group.figma.js.map +1 -0
- package/lib/module/figma/CurrencyInput.figma.js +48 -0
- package/lib/module/figma/CurrencyInput.figma.js.map +1 -0
- package/lib/module/figma/DateField.figma.js +52 -0
- package/lib/module/figma/DateField.figma.js.map +1 -0
- package/lib/module/figma/DatePicker.figma.js +82 -0
- package/lib/module/figma/DatePicker.figma.js.map +1 -0
- package/lib/module/figma/DateRangePicker.figma.js +79 -0
- package/lib/module/figma/DateRangePicker.figma.js.map +1 -0
- package/lib/module/figma/DateTimeField.figma.js +63 -0
- package/lib/module/figma/DateTimeField.figma.js.map +1 -0
- package/lib/module/figma/Field.Checkbox.figma.js +46 -0
- package/lib/module/figma/Field.Checkbox.figma.js.map +1 -0
- package/lib/module/figma/Field.DateField.figma.js +51 -0
- package/lib/module/figma/Field.DateField.figma.js.map +1 -0
- package/lib/module/figma/Field.DateTimeField.figma.js +51 -0
- package/lib/module/figma/Field.DateTimeField.figma.js.map +1 -0
- package/lib/module/figma/Image.figma.js +18 -0
- package/lib/module/figma/Image.figma.js.map +1 -0
- package/lib/module/figma/MonthCalendar.figma.js +14 -0
- package/lib/module/figma/MonthCalendar.figma.js.map +1 -0
- package/lib/module/figma/ProgressBar.figma.js +48 -0
- package/lib/module/figma/ProgressBar.figma.js.map +1 -0
- package/lib/module/figma/ProgressCircle.figma.js +67 -0
- package/lib/module/figma/ProgressCircle.figma.js.map +1 -0
- package/lib/module/figma/RangeCalendar.figma.js +30 -0
- package/lib/module/figma/RangeCalendar.figma.js.map +1 -0
- package/lib/module/figma/Skeleton.figma.js +25 -0
- package/lib/module/figma/Skeleton.figma.js.map +1 -0
- package/lib/module/figma/Slider.Marker.figma.js +17 -0
- package/lib/module/figma/Slider.Marker.figma.js.map +1 -0
- package/lib/module/figma/Slider.MarkerGroup.figma.js +18 -0
- package/lib/module/figma/Slider.MarkerGroup.figma.js.map +1 -0
- package/lib/module/figma/Slider.Thumb.figma.js +18 -0
- package/lib/module/figma/Slider.Thumb.figma.js.map +1 -0
- package/lib/module/figma/Slider.figma.js +63 -0
- package/lib/module/figma/Slider.figma.js.map +1 -0
- package/lib/module/figma/Switch.figma.js +30 -0
- package/lib/module/figma/Switch.figma.js.map +1 -0
- package/lib/module/figma/Tabs.SegmentedControl.Segment.figma.js +28 -0
- package/lib/module/figma/Tabs.SegmentedControl.Segment.figma.js.map +1 -0
- package/lib/module/figma/Tabs.SegmentedControl.figma.js +37 -0
- package/lib/module/figma/Tabs.SegmentedControl.figma.js.map +1 -0
- package/lib/module/figma/Tabs.Tab.figma.js +28 -0
- package/lib/module/figma/Tabs.Tab.figma.js.map +1 -0
- package/lib/module/figma/Tabs.figma.js +33 -0
- package/lib/module/figma/Tabs.figma.js.map +1 -0
- package/lib/module/figma/Tile.Description.figma.js +17 -0
- package/lib/module/figma/Tile.Description.figma.js.map +1 -0
- package/lib/module/figma/Tile.Group.figma.js +39 -0
- package/lib/module/figma/Tile.Group.figma.js.map +1 -0
- package/lib/module/figma/Tile.LeadingSlot.figma.js +17 -0
- package/lib/module/figma/Tile.LeadingSlot.figma.js.map +1 -0
- package/lib/module/figma/Tile.Title.figma.js +17 -0
- package/lib/module/figma/Tile.Title.figma.js.map +1 -0
- package/lib/module/figma/Tile.TrailingSlot.figma.js +17 -0
- package/lib/module/figma/Tile.TrailingSlot.figma.js.map +1 -0
- package/lib/module/figma/Tile.figma.js +51 -0
- package/lib/module/figma/Tile.figma.js.map +1 -0
- package/lib/module/figma/Toast.Button.figma.js +26 -0
- package/lib/module/figma/Toast.Button.figma.js.map +1 -0
- package/lib/module/figma/Toast.Close.figma.js +15 -0
- package/lib/module/figma/Toast.Close.figma.js.map +1 -0
- package/lib/module/figma/Toast.figma.js +75 -0
- package/lib/module/figma/Toast.figma.js.map +1 -0
- package/lib/module/figma/Tooltip.Content.figma.js +24 -0
- package/lib/module/figma/Tooltip.Content.figma.js.map +1 -0
- package/lib/module/figma/Tooltip.figma.js +40 -0
- package/lib/module/figma/Tooltip.figma.js.map +1 -0
- package/lib/module/figma/VirtualizedList.figma.js +25 -0
- package/lib/module/figma/VirtualizedList.figma.js.map +1 -0
- package/lib/typescript/components/ToggleButton/index.d.ts +78 -0
- package/lib/typescript/components/ToggleButton/index.d.ts.map +1 -0
- package/lib/typescript/components/ToggleButton/styles.d.ts +30 -0
- package/lib/typescript/components/ToggleButton/styles.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/figma/Calendar.figma.d.ts +8 -0
- package/lib/typescript/figma/Calendar.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Carousel.NextButton.figma.d.ts +11 -0
- package/lib/typescript/figma/Carousel.NextButton.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Carousel.Pagination.figma.d.ts +11 -0
- package/lib/typescript/figma/Carousel.Pagination.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Carousel.PrevButton.figma.d.ts +11 -0
- package/lib/typescript/figma/Carousel.PrevButton.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Carousel.figma.d.ts +8 -0
- package/lib/typescript/figma/Carousel.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Checkbox.Group.figma.d.ts +8 -0
- package/lib/typescript/figma/Checkbox.Group.figma.d.ts.map +1 -0
- package/lib/typescript/figma/CurrencyInput.figma.d.ts +8 -0
- package/lib/typescript/figma/CurrencyInput.figma.d.ts.map +1 -0
- package/lib/typescript/figma/DateField.figma.d.ts +8 -0
- package/lib/typescript/figma/DateField.figma.d.ts.map +1 -0
- package/lib/typescript/figma/DatePicker.figma.d.ts +8 -0
- package/lib/typescript/figma/DatePicker.figma.d.ts.map +1 -0
- package/lib/typescript/figma/DateRangePicker.figma.d.ts +8 -0
- package/lib/typescript/figma/DateRangePicker.figma.d.ts.map +1 -0
- package/lib/typescript/figma/DateTimeField.figma.d.ts +8 -0
- package/lib/typescript/figma/DateTimeField.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Field.Checkbox.figma.d.ts +8 -0
- package/lib/typescript/figma/Field.Checkbox.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Field.DateField.figma.d.ts +8 -0
- package/lib/typescript/figma/Field.DateField.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Field.DateTimeField.figma.d.ts +8 -0
- package/lib/typescript/figma/Field.DateTimeField.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Image.figma.d.ts +11 -0
- package/lib/typescript/figma/Image.figma.d.ts.map +1 -0
- package/lib/typescript/figma/MonthCalendar.figma.d.ts +8 -0
- package/lib/typescript/figma/MonthCalendar.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ProgressBar.figma.d.ts +8 -0
- package/lib/typescript/figma/ProgressBar.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ProgressCircle.figma.d.ts +11 -0
- package/lib/typescript/figma/ProgressCircle.figma.d.ts.map +1 -0
- package/lib/typescript/figma/RangeCalendar.figma.d.ts +8 -0
- package/lib/typescript/figma/RangeCalendar.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Skeleton.figma.d.ts +11 -0
- package/lib/typescript/figma/Skeleton.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Slider.Marker.figma.d.ts +11 -0
- package/lib/typescript/figma/Slider.Marker.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Slider.MarkerGroup.figma.d.ts +8 -0
- package/lib/typescript/figma/Slider.MarkerGroup.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Slider.Thumb.figma.d.ts +11 -0
- package/lib/typescript/figma/Slider.Thumb.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Slider.figma.d.ts +8 -0
- package/lib/typescript/figma/Slider.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Switch.figma.d.ts +8 -0
- package/lib/typescript/figma/Switch.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Tabs.SegmentedControl.Segment.figma.d.ts +8 -0
- package/lib/typescript/figma/Tabs.SegmentedControl.Segment.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Tabs.SegmentedControl.figma.d.ts +8 -0
- package/lib/typescript/figma/Tabs.SegmentedControl.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Tabs.Tab.figma.d.ts +8 -0
- package/lib/typescript/figma/Tabs.Tab.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Tabs.figma.d.ts +8 -0
- package/lib/typescript/figma/Tabs.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Tile.Description.figma.d.ts +11 -0
- package/lib/typescript/figma/Tile.Description.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Tile.Group.figma.d.ts +8 -0
- package/lib/typescript/figma/Tile.Group.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Tile.LeadingSlot.figma.d.ts +8 -0
- package/lib/typescript/figma/Tile.LeadingSlot.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Tile.Title.figma.d.ts +11 -0
- package/lib/typescript/figma/Tile.Title.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Tile.TrailingSlot.figma.d.ts +8 -0
- package/lib/typescript/figma/Tile.TrailingSlot.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Tile.figma.d.ts +8 -0
- package/lib/typescript/figma/Tile.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Toast.Button.figma.d.ts +14 -0
- package/lib/typescript/figma/Toast.Button.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Toast.Close.figma.d.ts +11 -0
- package/lib/typescript/figma/Toast.Close.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Toast.figma.d.ts +8 -0
- package/lib/typescript/figma/Toast.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Tooltip.Content.figma.d.ts +8 -0
- package/lib/typescript/figma/Tooltip.Content.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Tooltip.figma.d.ts +8 -0
- package/lib/typescript/figma/Tooltip.figma.d.ts.map +1 -0
- package/lib/typescript/figma/VirtualizedList.figma.d.ts +8 -0
- package/lib/typescript/figma/VirtualizedList.figma.d.ts.map +1 -0
- package/package.json +6 -6
- package/src/components/ToggleButton/index.tsx +346 -0
- package/src/components/ToggleButton/styles.ts +191 -0
- package/src/components/index.ts +1 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=8820-6202
|
|
4
|
+
// source=packages/components/src/components/Tile/index.tsx
|
|
5
|
+
// component=Tile.LeadingSlot
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// Figma `direction` only arranges placeholder content; Tile.LeadingSlot has no direction prop.
|
|
10
|
+
const childrenSlot = instance.getSlot('children');
|
|
11
|
+
const children = childrenSlot ? figma.helpers.react.renderChildren(childrenSlot) : null;
|
|
12
|
+
export default {
|
|
13
|
+
id: 'tile-leading-slot',
|
|
14
|
+
imports: ["import { Tile } from '@cdx-ui/components'"],
|
|
15
|
+
example: figma.code`<Tile.LeadingSlot>${children}</Tile.LeadingSlot>`
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=Tile.LeadingSlot.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","childrenSlot","getSlot","children","helpers","react","renderChildren","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/Tile.LeadingSlot.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA,MAAMC,YAAY,GAAGF,QAAQ,CAACG,OAAO,CAAC,UAAU,CAAC;AACjD,MAAMC,QAAQ,GAAGF,YAAY,GAAGH,KAAK,CAACM,OAAO,CAACC,KAAK,CAACC,cAAc,CAACL,YAAY,CAAC,GAAG,IAAI;AAEvF,eAAe;EACbM,EAAE,EAAE,mBAAmB;EACvBC,OAAO,EAAE,CAAC,2CAA2C,CAAC;EACtDC,OAAO,EAAEX,KAAK,CAACY,IAAI,qBAAqBP,QAAQ;AAClD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=8820-6257
|
|
4
|
+
// source=packages/components/src/components/Tile/index.tsx
|
|
5
|
+
// component=Tile.Title
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const title = instance.findText('{title}').textContent;
|
|
9
|
+
export default {
|
|
10
|
+
id: 'tile-title',
|
|
11
|
+
imports: ["import { Tile } from '@cdx-ui/components'"],
|
|
12
|
+
example: figma.code`<Tile.Title>${title}</Tile.Title>`,
|
|
13
|
+
metadata: {
|
|
14
|
+
nestable: true
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=Tile.Title.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","title","findText","textContent","id","imports","example","code","metadata","nestable"],"sourceRoot":"../../../src","sources":["figma/Tile.Title.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,eAAe;EACbC,EAAE,EAAE,YAAY;EAChBC,OAAO,EAAE,CAAC,2CAA2C,CAAC;EACtDC,OAAO,EAAER,KAAK,CAACS,IAAI,eAAeN,KAAK,eAAe;EACtDO,QAAQ,EAAE;IAAEC,QAAQ,EAAE;EAAK;AAC7B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=8820-6209
|
|
4
|
+
// source=packages/components/src/components/Tile/index.tsx
|
|
5
|
+
// component=Tile.TrailingSlot
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// Figma `direction` only arranges placeholder content; Tile.TrailingSlot has no direction prop.
|
|
10
|
+
const childrenSlot = instance.getSlot('children');
|
|
11
|
+
const children = childrenSlot ? figma.helpers.react.renderChildren(childrenSlot) : null;
|
|
12
|
+
export default {
|
|
13
|
+
id: 'tile-trailing-slot',
|
|
14
|
+
imports: ["import { Tile } from '@cdx-ui/components'"],
|
|
15
|
+
example: figma.code`<Tile.TrailingSlot>${children}</Tile.TrailingSlot>`
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=Tile.TrailingSlot.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","childrenSlot","getSlot","children","helpers","react","renderChildren","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/Tile.TrailingSlot.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA,MAAMC,YAAY,GAAGF,QAAQ,CAACG,OAAO,CAAC,UAAU,CAAC;AACjD,MAAMC,QAAQ,GAAGF,YAAY,GAAGH,KAAK,CAACM,OAAO,CAACC,KAAK,CAACC,cAAc,CAACL,YAAY,CAAC,GAAG,IAAI;AAEvF,eAAe;EACbM,EAAE,EAAE,oBAAoB;EACxBC,OAAO,EAAE,CAAC,2CAA2C,CAAC;EACtDC,OAAO,EAAEX,KAAK,CAACY,IAAI,sBAAsBP,QAAQ;AACnD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=8843-7101
|
|
4
|
+
// source=packages/components/src/components/Tile/index.tsx
|
|
5
|
+
// component=Tile
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// Inside a Tile.Group the indicator style is inferred from the group's `type`; standalone tiles
|
|
10
|
+
// default to a checkbox indicator, so only the radio (`single`) style needs to be explicit.
|
|
11
|
+
const indicatorType = instance.getEnum('type', {
|
|
12
|
+
single: 'radio',
|
|
13
|
+
multiple: undefined
|
|
14
|
+
});
|
|
15
|
+
const isSelected = instance.getEnum('isSelected', {
|
|
16
|
+
true: true,
|
|
17
|
+
false: undefined
|
|
18
|
+
});
|
|
19
|
+
const isDisabled = instance.getEnum('isDisabled', {
|
|
20
|
+
true: true,
|
|
21
|
+
false: undefined
|
|
22
|
+
});
|
|
23
|
+
const isSelectedProp = figma.helpers.react.renderProp('isSelected', isSelected);
|
|
24
|
+
const disabledProp = figma.helpers.react.renderProp('disabled', isDisabled);
|
|
25
|
+
const indicatorTypeProp = figma.helpers.react.renderProp('indicatorType', indicatorType);
|
|
26
|
+
const showLeadingSlot = instance.getBoolean('Show LeadingSlot?');
|
|
27
|
+
const showTrailingSlot = instance.getBoolean('Show TrailingSlot?');
|
|
28
|
+
const showIndicator = instance.getBoolean('Show Indicator?');
|
|
29
|
+
const title = instance.findText('{title}', {
|
|
30
|
+
traverseInstances: true
|
|
31
|
+
}).textContent;
|
|
32
|
+
// Must match the value derivation in Tile.Group.figma.ts so the group's defaultValue selects this tile.
|
|
33
|
+
const value = title.trim().toLowerCase().replace(/\s+/g, '-');
|
|
34
|
+
const leadingInstance = instance.findInstance('Tile.LeadingSlot');
|
|
35
|
+
const leadingSnippet = showLeadingSlot && leadingInstance.type === 'INSTANCE' ? leadingInstance.executeTemplate().example : null;
|
|
36
|
+
const trailingInstance = instance.findInstance('Tile.TrailingSlot');
|
|
37
|
+
const trailingSnippet = showTrailingSlot && trailingInstance.type === 'INSTANCE' ? trailingInstance.executeTemplate().example : null;
|
|
38
|
+
const contentSlot = instance.getSlot('Tile.Content');
|
|
39
|
+
const contentChildren = contentSlot ? figma.helpers.react.renderChildren(contentSlot) : null;
|
|
40
|
+
export default {
|
|
41
|
+
id: 'tile',
|
|
42
|
+
imports: ["import { Tile } from '@cdx-ui/components'"],
|
|
43
|
+
example: figma.code`
|
|
44
|
+
<Tile value="${value}"${isSelectedProp}${disabledProp}>
|
|
45
|
+
${leadingSnippet}
|
|
46
|
+
<Tile.Content>${contentChildren}</Tile.Content>
|
|
47
|
+
${trailingSnippet}
|
|
48
|
+
${showIndicator ? figma.code`<Tile.Indicator${indicatorTypeProp} />` : null}
|
|
49
|
+
</Tile>`
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=Tile.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","indicatorType","getEnum","single","multiple","undefined","isSelected","true","false","isDisabled","isSelectedProp","helpers","react","renderProp","disabledProp","indicatorTypeProp","showLeadingSlot","getBoolean","showTrailingSlot","showIndicator","title","findText","traverseInstances","textContent","value","trim","toLowerCase","replace","leadingInstance","findInstance","leadingSnippet","type","executeTemplate","example","trailingInstance","trailingSnippet","contentSlot","getSlot","contentChildren","renderChildren","id","imports","code"],"sourceRoot":"../../../src","sources":["figma/Tile.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA;AACA,MAAMC,aAAa,GAAGF,QAAQ,CAACG,OAAO,CAAC,MAAM,EAAE;EAC7CC,MAAM,EAAE,OAAO;EACfC,QAAQ,EAAEC;AACZ,CAAC,CAAC;AACF,MAAMC,UAAU,GAAGP,QAAQ,CAACG,OAAO,CAAC,YAAY,EAAE;EAChDK,IAAI,EAAE,IAAI;EACVC,KAAK,EAAEH;AACT,CAAC,CAAC;AACF,MAAMI,UAAU,GAAGV,QAAQ,CAACG,OAAO,CAAC,YAAY,EAAE;EAChDK,IAAI,EAAE,IAAI;EACVC,KAAK,EAAEH;AACT,CAAC,CAAC;AAEF,MAAMK,cAAc,GAAGZ,KAAK,CAACa,OAAO,CAACC,KAAK,CAACC,UAAU,CAAC,YAAY,EAAEP,UAAU,CAAC;AAC/E,MAAMQ,YAAY,GAAGhB,KAAK,CAACa,OAAO,CAACC,KAAK,CAACC,UAAU,CAAC,UAAU,EAAEJ,UAAU,CAAC;AAC3E,MAAMM,iBAAiB,GAAGjB,KAAK,CAACa,OAAO,CAACC,KAAK,CAACC,UAAU,CAAC,eAAe,EAAEZ,aAAa,CAAC;AAExF,MAAMe,eAAe,GAAGjB,QAAQ,CAACkB,UAAU,CAAC,mBAAmB,CAAC;AAChE,MAAMC,gBAAgB,GAAGnB,QAAQ,CAACkB,UAAU,CAAC,oBAAoB,CAAC;AAClE,MAAME,aAAa,GAAGpB,QAAQ,CAACkB,UAAU,CAAC,iBAAiB,CAAC;AAE5D,MAAMG,KAAK,GACTr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// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=12772-30603
|
|
4
|
+
// source=packages/components/src/components/Toast/index.tsx
|
|
5
|
+
// component=Toast.Action
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// Toast.Action wraps its string children in Button.Label and derives the button color from the
|
|
10
|
+
// toast, so only the label carries over from the nested Figma Button.
|
|
11
|
+
const label = instance.findText('Button.Label', {
|
|
12
|
+
traverseInstances: true
|
|
13
|
+
}).textContent;
|
|
14
|
+
export default {
|
|
15
|
+
id: 'toast-button',
|
|
16
|
+
imports: ["import { Toast } from '@cdx-ui/components'"],
|
|
17
|
+
example: figma.code`<Toast.Action onPress={() => {}}>${label}</Toast.Action>`,
|
|
18
|
+
// `label` lets the parent Toast template emit `actionLabel` in the `toast.show()` config form.
|
|
19
|
+
metadata: {
|
|
20
|
+
nestable: true,
|
|
21
|
+
props: {
|
|
22
|
+
label
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=Toast.Button.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","label","findText","traverseInstances","textContent","id","imports","example","code","metadata","nestable","props"],"sourceRoot":"../../../src","sources":["figma/Toast.Button.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA;AACA,MAAMC,KAAK,GACTF,QAAQ,CAACG,QAAQ,CAAC,cAAc,EAAE;EAAEC,iBAAiB,EAAE;AAAK,CAAC,CAAC,CAC9DC,WAAW;AAEb,eAAe;EACbC,EAAE,EAAE,cAAc;EAClBC,OAAO,EAAE,CAAC,4CAA4C,CAAC;EACvDC,OAAO,EAAET,KAAK,CAACU,IAAI,oCAAoCP,KAAK,iBAAiB;EAC7E;EACAQ,QAAQ,EAAE;IAAEC,QAAQ,EAAE,IAAI;IAAEC,KAAK,EAAE;MAAEV;IAAM;EAAE;AAC/C,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=5437-4322
|
|
4
|
+
// source=packages/components/src/components/Toast/index.tsx
|
|
5
|
+
// component=Toast.Close
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
export default {
|
|
8
|
+
id: 'toast-close',
|
|
9
|
+
imports: ["import { Toast } from '@cdx-ui/components'"],
|
|
10
|
+
example: figma.code`<Toast.Close />`,
|
|
11
|
+
metadata: {
|
|
12
|
+
nestable: true
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Toast.Close.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","id","imports","example","code","metadata","nestable"],"sourceRoot":"../../../src","sources":["figma/Toast.Close.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,eAAe;EACbC,EAAE,EAAE,aAAa;EACjBC,OAAO,EAAE,CAAC,4CAA4C,CAAC;EACvDC,OAAO,EAAEH,KAAK,CAACI,IAAI,iBAAiB;EACpCC,QAAQ,EAAE;IAAEC,QAAQ,EAAE;EAAK;AAC7B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=5170-8043
|
|
4
|
+
// source=packages/components/src/components/Toast/index.tsx
|
|
5
|
+
// component=Toast
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// `Viewport` previews the responsive width only; the toast provider handles layout per platform.
|
|
10
|
+
const color = instance.getEnum('severity', {
|
|
11
|
+
neutral: undefined,
|
|
12
|
+
danger: 'danger',
|
|
13
|
+
warning: 'warning',
|
|
14
|
+
success: 'success',
|
|
15
|
+
info: 'info'
|
|
16
|
+
});
|
|
17
|
+
const showIcon = instance.getBoolean('Show Icon?');
|
|
18
|
+
const showTitle = instance.getBoolean('Show Title?');
|
|
19
|
+
const showTrailingSlot = instance.getBoolean('Show TrailingSlot?');
|
|
20
|
+
const icon = instance.getInstanceSwap('icon');
|
|
21
|
+
const iconResult = showIcon && icon?.type === 'INSTANCE' ? icon.executeTemplate() : undefined;
|
|
22
|
+
const iconName = iconResult?.metadata?.props?.componentName;
|
|
23
|
+
const iconSnippet = iconName ?? iconResult?.example;
|
|
24
|
+
const title = instance.findText('Toast.Title').textContent;
|
|
25
|
+
const description = instance.findText('Toast.Description').textContent;
|
|
26
|
+
const trailingSlot = instance.getSlot('Toast.TrailingSlot');
|
|
27
|
+
const trailingChildren = showTrailingSlot && trailingSlot ? figma.helpers.react.renderChildren(trailingSlot) : null;
|
|
28
|
+
const iconSymbolId = icon?.type === 'INSTANCE' ? icon.symbolId : undefined;
|
|
29
|
+
const trailingInstances = showTrailingSlot ? instance.findConnectedInstances(node => node.hasCodeConnect() && node.symbolId !== iconSymbolId).filter(node => node.type === 'INSTANCE') : [];
|
|
30
|
+
const actionButtons = trailingInstances.filter(node => node.codeConnectId() === 'toast-button');
|
|
31
|
+
const actionLabel = actionButtons.length === 1 ? actionButtons[0].executeTemplate().metadata?.props?.label : undefined;
|
|
32
|
+
|
|
33
|
+
// The `toast.show()` config form renders at most one action and no close button, and its `icon`
|
|
34
|
+
// option takes a component reference, so anything else in the design needs the `component` form.
|
|
35
|
+
// Unconnected layers in the trailing slot are invisible to `findConnectedInstances`.
|
|
36
|
+
const isIconExpressible = !showIcon || !iconResult || iconName !== undefined;
|
|
37
|
+
const isTrailingExpressible = !showTrailingSlot || trailingInstances.length === 0 || trailingInstances.length === 1 && actionLabel !== undefined;
|
|
38
|
+
const useConfigForm = isIconExpressible && isTrailingExpressible;
|
|
39
|
+
const quote = text => {
|
|
40
|
+
const escaped = text.replace(/\\/g, '\\\\');
|
|
41
|
+
if (!escaped.includes("'")) return `'${escaped}'`;
|
|
42
|
+
if (!escaped.includes('"')) return `"${escaped}"`;
|
|
43
|
+
return `'${escaped.replace(/'/g, "\\'")}'`;
|
|
44
|
+
};
|
|
45
|
+
const iconImports = iconName ? [`import { ${iconName} } from '@cdx-ui/icons'`] : [];
|
|
46
|
+
const colorOption = color ? figma.code`\n color: '${color}',` : null;
|
|
47
|
+
const iconOption = iconName ? figma.code`\n icon: ${iconName},` : null;
|
|
48
|
+
const labelOption = showTitle ? figma.code`\n label: ${quote(title)},` : null;
|
|
49
|
+
const actionOptions = showTrailingSlot && actionLabel !== undefined ? figma.code`\n actionLabel: ${quote(actionLabel)},\n onActionPress: ({ hide }) => hide(),` : null;
|
|
50
|
+
const configExample = figma.code`
|
|
51
|
+
const { toast } = useToast();
|
|
52
|
+
|
|
53
|
+
toast.show({${colorOption}${iconOption}${labelOption}
|
|
54
|
+
description: ${quote(description)},${actionOptions}
|
|
55
|
+
});`;
|
|
56
|
+
const colorProp = figma.helpers.react.renderProp('color', color);
|
|
57
|
+
const componentExample = figma.code`
|
|
58
|
+
const { toast } = useToast();
|
|
59
|
+
|
|
60
|
+
toast.show({
|
|
61
|
+
component: (props) => (
|
|
62
|
+
<Toast {...props}${colorProp}>
|
|
63
|
+
${iconSnippet ? figma.code`<Toast.Icon as={${iconSnippet}} />` : null}
|
|
64
|
+
${showTitle ? figma.code`<Toast.Title>${title}</Toast.Title>` : null}
|
|
65
|
+
<Toast.Description>${description}</Toast.Description>
|
|
66
|
+
${trailingChildren}
|
|
67
|
+
</Toast>
|
|
68
|
+
),
|
|
69
|
+
});`;
|
|
70
|
+
export default {
|
|
71
|
+
id: 'toast',
|
|
72
|
+
imports: useConfigForm ? ["import { useToast } from '@cdx-ui/components'", ...iconImports] : ["import { Toast, useToast } from '@cdx-ui/components'", ...iconImports],
|
|
73
|
+
example: useConfigForm ? configExample : componentExample
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=Toast.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","color","getEnum","neutral","undefined","danger","warning","success","info","showIcon","getBoolean","showTitle","showTrailingSlot","icon","getInstanceSwap","iconResult","type","executeTemplate","iconName","metadata","props","componentName","iconSnippet","example","title","findText","textContent","description","trailingSlot","getSlot","trailingChildren","helpers","react","renderChildren","iconSymbolId","symbolId","trailingInstances","findConnectedInstances","node","hasCodeConnect","filter","actionButtons","codeConnectId","actionLabel","length","label","isIconExpressible","isTrailingExpressible","useConfigForm","quote","text","escaped","replace","includes","iconImports","colorOption","code","iconOption","labelOption","actionOptions","configExample","colorProp","renderProp","componentExample","id","imports"],"sourceRoot":"../../../src","sources":["figma/Toast.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA,MAAMC,KAAK,GAAGF,QAAQ,CAACG,OAAO,CAAC,UAAU,EAAE;EACzCC,OAAO,EAAEC,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,OAAO,EAAE,SAAS;EAClBC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE;AACR,CAAC,CAAC;AAEF,MAAMC,QAAQ,GAAGV,QAAQ,CAACW,UAAU,CAAC,YAAY,CAAC;AAClD,MAAMC,SAAS,GAAGZ,QAAQ,CAACW,UAAU,CAAC,aAAa,CAAC;AACpD,MAAME,gBAAgB,GAAGb,QAAQ,CAACW,UAAU,CAAC,oBAAoB,CAAC;AAElE,MAAMG,IAAI,GAAGd,QAAQ,CAACe,eAAe,CAAC,MAAM,CAAC;AAC7C,MAAMC,UAAU,GAA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C,GAC3F,IAAI;AAEV,MAAMiB,aAAa,GAAG9D,KAAK,CAAC0D,IAAI;AAChC;AACA;AACA,cAAcD,WAAW,GAAGE,UAAU,GAAGC,WAAW;AACpD,iBAAiBT,KAAK,CAACtB,WAAW,CAAC,IAAIgC,aAAa;AACpD,IAAI;AAEJ,MAAME,SAAS,GAAG/D,KAAK,CAACiC,OAAO,CAACC,KAAK,CAAC8B,UAAU,CAAC,OAAO,EAAE7D,KAAK,CAAC;AAEhE,MAAM8D,gBAAgB,GAAGjE,KAAK,CAAC0D,IAAI;AACnC;AACA;AACA;AACA;AACA,uBAAuBK,SAAS;AAChC,QAAQvC,WAAW,GAAGxB,KAAK,CAAC0D,IAAI,mBAAmBlC,WAAW,MAAM,GAAG,IAAI;AAC3E,QAAQX,SAAS,GAAGb,KAAK,CAAC0D,IAAI,gBAAgBhC,KAAK,gBAAgB,GAAG,IAAI;AAC1E,2BAA2BG,WAAW;AACtC,QAAQG,gBAAgB;AACxB;AACA;AACA,IAAI;AAEJ,eAAe;EACbkC,EAAE,EAAE,OAAO;EACXC,OAAO,EAAEjB,aAAa,GAClB,CAAC,+CAA+C,EAAE,GAAGM,WAAW,CAAC,GACjE,CAAC,sDAAsD,EAAE,GAAGA,WAAW,CAAC;EAC5E/B,OAAO,EAAEyB,aAAa,GAAGY,aAAa,GAAGG;AAC3C,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=12980-8437
|
|
4
|
+
// source=packages/components/src/components/Tooltip/index.tsx
|
|
5
|
+
// component=Tooltip.Content
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// `placement` is set on the parent Tooltip in code (see Tooltip.figma.ts); the content only
|
|
10
|
+
// mirrors it in Figma so the arrow points the right way.
|
|
11
|
+
const showArrow = instance.getBoolean('Show Arrow?');
|
|
12
|
+
const textLayer = instance.findText('{text}');
|
|
13
|
+
const contentSlot = instance.getSlot('content');
|
|
14
|
+
const children = textLayer.type === 'TEXT' ? textLayer.textContent : contentSlot ? figma.helpers.react.renderChildren(contentSlot) : null;
|
|
15
|
+
export default {
|
|
16
|
+
id: 'tooltip-content',
|
|
17
|
+
imports: ["import { Tooltip } from '@cdx-ui/components'"],
|
|
18
|
+
example: figma.code`
|
|
19
|
+
<Tooltip.Content>
|
|
20
|
+
${showArrow ? figma.code`<Tooltip.Arrow />` : null}
|
|
21
|
+
${children}
|
|
22
|
+
</Tooltip.Content>`
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=Tooltip.Content.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","showArrow","getBoolean","textLayer","findText","contentSlot","getSlot","children","type","textContent","helpers","react","renderChildren","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/Tooltip.Content.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA;AACA,MAAMC,SAAS,GAAGF,QAAQ,CAACG,UAAU,CAAC,aAAa,CAAC;AAEpD,MAAMC,SAAS,GAAGJ,QAAQ,CAACK,QAAQ,CAAC,QAAQ,CAAC;AAC7C,MAAMC,WAAW,GAAGN,QAAQ,CAACO,OAAO,CAAC,SAAS,CAAC;AAC/C,MAAMC,QAAQ,GACZJ,SAAS,CAACK,IAAI,KAAK,MAAM,GACrBL,SAAS,CAACM,WAAW,GACrBJ,WAAW,GACTP,KAAK,CAACY,OAAO,CAACC,KAAK,CAACC,cAAc,CAACP,WAAW,CAAC,GAC/C,IAAI;AAEZ,eAAe;EACbQ,EAAE,EAAE,iBAAiB;EACrBC,OAAO,EAAE,CAAC,8CAA8C,CAAC;EACzDC,OAAO,EAAEjB,KAAK,CAACkB,IAAI;AACrB;AACA,IAAIf,SAAS,GAAGH,KAAK,CAACkB,IAAI,mBAAmB,GAAG,IAAI;AACpD,IAAIT,QAAQ;AACZ;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=12996-1099
|
|
4
|
+
// source=packages/components/src/components/Tooltip/index.tsx
|
|
5
|
+
// component=Tooltip
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// `isOpen` only previews the open state in Figma; the tooltip opens from its trigger at runtime.
|
|
10
|
+
const placement = instance.getEnum('placement', {
|
|
11
|
+
top: undefined,
|
|
12
|
+
'top-start': 'top-start',
|
|
13
|
+
'top-end': 'top-end',
|
|
14
|
+
bottom: 'bottom',
|
|
15
|
+
'bottom-start': 'bottom-start',
|
|
16
|
+
'bottom-end': 'bottom-end',
|
|
17
|
+
left: 'left',
|
|
18
|
+
'left-start': 'left-start',
|
|
19
|
+
'left-end': 'left-end',
|
|
20
|
+
right: 'right',
|
|
21
|
+
'right-start': 'right-start',
|
|
22
|
+
'right-end': 'right-end'
|
|
23
|
+
});
|
|
24
|
+
const placementProp = figma.helpers.react.renderProp('placement', placement);
|
|
25
|
+
const trigger = instance.getInstanceSwap('Instance');
|
|
26
|
+
const triggerSnippet = trigger?.type === 'INSTANCE' ? trigger.executeTemplate().example : null;
|
|
27
|
+
const content = instance.findInstance('Tooltip.Content');
|
|
28
|
+
const contentSnippet = content.type === 'INSTANCE' ? content.executeTemplate().example : null;
|
|
29
|
+
export default {
|
|
30
|
+
id: 'tooltip',
|
|
31
|
+
imports: ["import { Tooltip } from '@cdx-ui/components'"],
|
|
32
|
+
example: figma.code`
|
|
33
|
+
<Tooltip${placementProp}>
|
|
34
|
+
<Tooltip.Trigger asChild>
|
|
35
|
+
${triggerSnippet}
|
|
36
|
+
</Tooltip.Trigger>
|
|
37
|
+
${contentSnippet}
|
|
38
|
+
</Tooltip>`
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=Tooltip.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","placement","getEnum","top","undefined","bottom","left","right","placementProp","helpers","react","renderProp","trigger","getInstanceSwap","triggerSnippet","type","executeTemplate","example","content","findInstance","contentSnippet","id","imports","code"],"sourceRoot":"../../../src","sources":["figma/Tooltip.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA,MAAMC,SAAS,GAAGF,QAAQ,CAACG,OAAO,CAAC,WAAW,EAAE;EAC9CC,GAAG,EAAEC,SAAS;EACd,WAAW,EAAE,WAAW;EACxB,SAAS,EAAE,SAAS;EACpBC,MAAM,EAAE,QAAQ;EAChB,cAAc,EAAE,cAAc;EAC9B,YAAY,EAAE,YAAY;EAC1BC,IAAI,EAAE,MAAM;EACZ,YAAY,EAAE,YAAY;EAC1B,UAAU,EAAE,UAAU;EACtBC,KAAK,EAAE,OAAO;EACd,aAAa,EAAE,aAAa;EAC5B,WAAW,EAAE;AACf,CAAC,CAAC;AACF,MAAMC,aAAa,GAAGV,KAAK,CAACW,OAAO,CAACC,KAAK,CAACC,UAAU,CAAC,WAAW,EAAEV,SAAS,CAAC;AAE5E,MAAMW,OAAO,GAAGb,QAAQ,CAACc,eAAe,CAAC,UAAU,CAAC;AACpD,MAAMC,cAAc,GAAGF,OAAO,EAAEG,IAAI,KAAK,UAAU,GAAGH,OAAO,CAACI,eAAe,CAAC,CAAC,CAACC,OAAO,GAAG,IAAI;AAE9F,MAAMC,OAAO,GAAGnB,QAAQ,CAACoB,YAAY,CAAC,iBAAiB,CAAC;AACxD,MAAMC,cAAc,GAAGF,OAAO,CAACH,IAAI,KAAK,UAAU,GAAGG,OAAO,CAACF,eAAe,CAAC,CAAC,CAACC,OAAO,GAAG,IAAI;AAE7F,eAAe;EACbI,EAAE,EAAE,SAAS;EACbC,OAAO,EAAE,CAAC,8CAA8C,CAAC;EACzDL,OAAO,EAAEnB,KAAK,CAACyB,IAAI;AACrB,UAAUf,aAAa;AACvB;AACA,MAAMM,cAAc;AACpB;AACA,IAAIM,cAAc;AAClB;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=4040-4933
|
|
4
|
+
// source=packages/components/src/components/VirtualizedList/index.tsx
|
|
5
|
+
// component=VirtualizedList
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// Figma names this component FlatList. VirtualizedList is data-driven, so the `items` slot's
|
|
10
|
+
// first row is rendered once through `renderItem`.
|
|
11
|
+
const firstItem = instance.findInstance('ListItem');
|
|
12
|
+
const itemSnippet = firstItem.type === 'INSTANCE' ? firstItem.executeTemplate().example : null;
|
|
13
|
+
export default {
|
|
14
|
+
id: 'virtualized-list',
|
|
15
|
+
imports: ["import { VirtualizedList } from '@cdx-ui/components'"],
|
|
16
|
+
example: figma.code`
|
|
17
|
+
<VirtualizedList
|
|
18
|
+
data={items}
|
|
19
|
+
keyExtractor={(item) => item.id}
|
|
20
|
+
renderItem={({ item }) => (
|
|
21
|
+
${itemSnippet}
|
|
22
|
+
)}
|
|
23
|
+
/>`
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=VirtualizedList.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","firstItem","findInstance","itemSnippet","type","executeTemplate","example","id","imports","code"],"sourceRoot":"../../../src","sources":["figma/VirtualizedList.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA;AACA,MAAMC,SAAS,GAAGF,QAAQ,CAACG,YAAY,CAAC,UAAU,CAAC;AACnD,MAAMC,WAAW,GAAGF,SAAS,CAACG,IAAI,KAAK,UAAU,GAAGH,SAAS,CAACI,eAAe,CAAC,CAAC,CAACC,OAAO,GAAG,IAAI;AAE9F,eAAe;EACbC,EAAE,EAAE,kBAAkB;EACtBC,OAAO,EAAE,CAAC,sDAAsD,CAAC;EACjEF,OAAO,EAAER,KAAK,CAACW,IAAI;AACrB;AACA;AACA;AACA;AACA,MAAMN,WAAW;AACjB;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React, { type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
import { Text, View, type TextProps } from 'react-native';
|
|
3
|
+
import { type IToggleButtonGroupMultipleProps, type IToggleButtonGroupSingleProps, type IToggleButtonProps } from '@cdx-ui/primitives';
|
|
4
|
+
import { type IconProps } from '../Icon';
|
|
5
|
+
import { type IconSlotPosition } from '../../utils/positionToDataIcon';
|
|
6
|
+
import { type ToggleButtonGroupVariantProps, type ToggleButtonVariantProps } from './styles';
|
|
7
|
+
export type ToggleButtonVariant = 'default' | 'outline' | 'ghost';
|
|
8
|
+
export type ToggleButtonShape = NonNullable<ToggleButtonVariantProps['shape']>;
|
|
9
|
+
export interface ToggleButtonProps extends IToggleButtonProps {
|
|
10
|
+
/**
|
|
11
|
+
* Visual style. `default` is a muted filled surface; `outline` adds a border; `ghost` is transparent.
|
|
12
|
+
* @default 'default'
|
|
13
|
+
*/
|
|
14
|
+
variant?: ToggleButtonVariant;
|
|
15
|
+
/**
|
|
16
|
+
* Corner geometry — mirrors `Avatar.shape`.
|
|
17
|
+
* @default 'circle'
|
|
18
|
+
*/
|
|
19
|
+
shape?: ToggleButtonShape;
|
|
20
|
+
/**
|
|
21
|
+
* Height and padding scale.
|
|
22
|
+
* @default 'default'
|
|
23
|
+
*/
|
|
24
|
+
size?: 'small' | 'default' | 'large';
|
|
25
|
+
className?: string;
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
declare const ToggleButtonRoot: React.ForwardRefExoticComponent<ToggleButtonProps & React.RefAttributes<View>>;
|
|
29
|
+
export interface ToggleButtonLabelProps extends TextProps {
|
|
30
|
+
/** Render the consumer's child in place of the default `Text` host. */
|
|
31
|
+
asChild?: boolean;
|
|
32
|
+
className?: string;
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
}
|
|
35
|
+
declare const ToggleButtonLabel: React.ForwardRefExoticComponent<ToggleButtonLabelProps & React.RefAttributes<Text>>;
|
|
36
|
+
export interface ToggleButtonIconProps extends Omit<IconProps, 'children' | 'as'> {
|
|
37
|
+
/** Render a custom element instead of the default icon. */
|
|
38
|
+
asChild?: boolean;
|
|
39
|
+
/** Forge icon component to render. */
|
|
40
|
+
as?: IconProps['as'];
|
|
41
|
+
/** Leading or trailing placement relative to the label. */
|
|
42
|
+
position?: IconSlotPosition;
|
|
43
|
+
/**
|
|
44
|
+
* Render the filled icon variant. Defaults to the toggle's selected state.
|
|
45
|
+
* Icons without filled path data stay outlined.
|
|
46
|
+
*/
|
|
47
|
+
filled?: boolean;
|
|
48
|
+
}
|
|
49
|
+
declare const ToggleButtonIcon: {
|
|
50
|
+
({ asChild, className, style, as, position, filled, ...props }: ToggleButtonIconProps): import("react/jsx-runtime").JSX.Element | null;
|
|
51
|
+
displayName: string;
|
|
52
|
+
};
|
|
53
|
+
type ToggleButtonGroupSingleStyledProps = IToggleButtonGroupSingleProps & ToggleButtonGroupVariantProps & {
|
|
54
|
+
className?: string;
|
|
55
|
+
children: ReactElement | ReactElement[];
|
|
56
|
+
/**
|
|
57
|
+
* Collapse gaps and adjoining corners into a single segmented control.
|
|
58
|
+
* @default true
|
|
59
|
+
*/
|
|
60
|
+
isAttached?: boolean;
|
|
61
|
+
};
|
|
62
|
+
type ToggleButtonGroupMultipleStyledProps = IToggleButtonGroupMultipleProps & ToggleButtonGroupVariantProps & {
|
|
63
|
+
className?: string;
|
|
64
|
+
children: ReactElement | ReactElement[];
|
|
65
|
+
/**
|
|
66
|
+
* Collapse gaps and adjoining corners into a single segmented control.
|
|
67
|
+
* @default true
|
|
68
|
+
*/
|
|
69
|
+
isAttached?: boolean;
|
|
70
|
+
};
|
|
71
|
+
export type ToggleButtonGroupProps = ToggleButtonGroupSingleStyledProps | ToggleButtonGroupMultipleStyledProps;
|
|
72
|
+
declare const ToggleButtonGroup: React.ForwardRefExoticComponent<ToggleButtonGroupProps & React.RefAttributes<View>>;
|
|
73
|
+
export declare const ToggleButton: typeof ToggleButtonRoot & {
|
|
74
|
+
Label: typeof ToggleButtonLabel;
|
|
75
|
+
Icon: typeof ToggleButtonIcon;
|
|
76
|
+
};
|
|
77
|
+
export { ToggleButtonGroup };
|
|
78
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ToggleButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAuB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACtF,OAAO,EAAE,IAAI,EAAE,IAAI,EAAkB,KAAK,SAAS,EAAkB,MAAM,cAAc,CAAC;AAC1F,OAAO,EAOL,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;AAQ5B,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,EAOL,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,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AY,EAAE,CAAC;IACxC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEJ,KAAK,oCAAoC,GAAG,+BAA+B,GACzE,6BAA6B,GAAG;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IACxC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEJ,MAAM,MAAM,sBAAsB,GAC9B,kCAAkC,GAClC,oCAAoC,CAAC;AAgCzC,QAAA,MAAM,iBAAiB,qFAkDtB,CAAC;AAIF,eAAO,MAAM,YAAY,EAGnB,OAAO,gBAAgB,GAAG;IAC9B,KAAK,EAAE,OAAO,iBAAiB,CAAC;IAChC,IAAI,EAAE,OAAO,gBAAgB,CAAC;CAC/B,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type VariantProps } from '@cdx-ui/utils';
|
|
2
|
+
export declare const toggleButtonRootVariants: (props?: ({
|
|
3
|
+
variant?: "default" | "outline" | "ghost" | null | undefined;
|
|
4
|
+
shape?: "circle" | "rounded" | null | undefined;
|
|
5
|
+
size?: "small" | "default" | "large" | null | undefined;
|
|
6
|
+
iconOnly?: boolean | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
/**
|
|
9
|
+
* Classes for an item inside an attached group. Every item after the first overlaps its
|
|
10
|
+
* predecessor by one border width so adjoining borders collapse into a single line; the
|
|
11
|
+
* interacted or selected item is raised so its full border stays visible.
|
|
12
|
+
*/
|
|
13
|
+
export declare const toggleButtonAttachedVariants: (props?: ({
|
|
14
|
+
orientation?: "vertical" | "horizontal" | null | undefined;
|
|
15
|
+
position?: "middle" | "only" | "first" | "last" | null | undefined;
|
|
16
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
|
+
export type ToggleButtonAttachedPosition = NonNullable<VariantProps<typeof toggleButtonAttachedVariants>['position']>;
|
|
18
|
+
export declare const toggleButtonGroupVariants: (props?: ({
|
|
19
|
+
orientation?: "vertical" | "horizontal" | null | undefined;
|
|
20
|
+
isAttached?: boolean | null | undefined;
|
|
21
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
22
|
+
export declare const toggleButtonLabelVariants: (props?: ({
|
|
23
|
+
size?: "small" | "default" | "large" | null | undefined;
|
|
24
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
25
|
+
export declare const toggleButtonIconVariants: (props?: ({
|
|
26
|
+
size?: "small" | "default" | "large" | null | undefined;
|
|
27
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
28
|
+
export type ToggleButtonVariantProps = VariantProps<typeof toggleButtonRootVariants>;
|
|
29
|
+
export type ToggleButtonGroupVariantProps = VariantProps<typeof toggleButtonGroupVariants>;
|
|
30
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ToggleButton/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAsBvD,eAAO,MAAM,wBAAwB;;;;;8EAmEpC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;;;8EAgCxC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,WAAW,CACpD,YAAY,CAAC,OAAO,4BAA4B,CAAC,CAAC,UAAU,CAAC,CAC9D,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;8EAepC,CAAC;AAaH,eAAO,MAAM,yBAAyB;;8EAWpC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;8EAWnC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,YAAY,CAAC,OAAO,wBAAwB,CAAC,CAAC;AACrF,MAAM,MAAM,6BAA6B,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cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Calendar.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Calendar.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAW1B,wBAME"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import figma from 'figma';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: string;
|
|
4
|
+
imports: string[];
|
|
5
|
+
example: figma.TemplateStringResult;
|
|
6
|
+
metadata: {
|
|
7
|
+
nestable: boolean;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=Carousel.NextButton.figma.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Carousel.NextButton.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Carousel.NextButton.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;AAU1B,wBAKE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import figma from 'figma';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: string;
|
|
4
|
+
imports: string[];
|
|
5
|
+
example: figma.TemplateStringResult;
|
|
6
|
+
metadata: {
|
|
7
|
+
nestable: boolean;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=Carousel.Pagination.figma.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Carousel.Pagination.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Carousel.Pagination.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;AAI1B,wBAKE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import figma from 'figma';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: string;
|
|
4
|
+
imports: string[];
|
|
5
|
+
example: figma.TemplateStringResult;
|
|
6
|
+
metadata: {
|
|
7
|
+
nestable: boolean;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=Carousel.PrevButton.figma.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Carousel.PrevButton.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Carousel.PrevButton.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;AAU1B,wBAKE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Carousel.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Carousel.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAiB1B,wBAWE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.Group.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Checkbox.Group.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAO1B,wBAOE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CurrencyInput.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/CurrencyInput.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAuC1B,wBAUE"}
|