@coinbase/cds-web 9.1.3 → 9.2.0
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/CHANGELOG.md +7 -0
- package/dts/alpha/select/DefaultSelectControl.d.ts.map +1 -1
- package/dts/alpha/select/Select.d.ts.map +1 -1
- package/dts/alpha/select/types.d.ts +16 -2
- package/dts/alpha/select/types.d.ts.map +1 -1
- package/esm/alpha/select/DefaultSelectControl.js +30 -12
- package/esm/alpha/select/Select.js +17 -3
- package/package.json +3 -3
- package/dts/accordion/__figma__/Accordion.figma.d.ts +0 -2
- package/dts/accordion/__figma__/Accordion.figma.d.ts.map +0 -1
- package/dts/alpha/__figma__/Select.figma.d.ts +0 -2
- package/dts/alpha/__figma__/Select.figma.d.ts.map +0 -1
- package/dts/alpha/data-card/__figma__/DataCard.figma.d.ts +0 -2
- package/dts/alpha/data-card/__figma__/DataCard.figma.d.ts.map +0 -1
- package/dts/buttons/__figma__/AvatarButton.figma.d.ts +0 -2
- package/dts/buttons/__figma__/AvatarButton.figma.d.ts.map +0 -1
- package/dts/buttons/__figma__/Button.figma.d.ts +0 -2
- package/dts/buttons/__figma__/Button.figma.d.ts.map +0 -1
- package/dts/buttons/__figma__/ButtonGroup.figma.d.ts +0 -2
- package/dts/buttons/__figma__/ButtonGroup.figma.d.ts.map +0 -1
- package/dts/buttons/__figma__/IconButton.figma.d.ts +0 -2
- package/dts/buttons/__figma__/IconButton.figma.d.ts.map +0 -1
- package/dts/buttons/__figma__/TileButton.figma.d.ts +0 -2
- package/dts/buttons/__figma__/TileButton.figma.d.ts.map +0 -1
- package/dts/cards/ContentCard/__figma__/ContentCard.figma.d.ts +0 -2
- package/dts/cards/ContentCard/__figma__/ContentCard.figma.d.ts.map +0 -1
- package/dts/cards/ContentCard/__figma__/ContentCardBody.figma.d.ts +0 -2
- package/dts/cards/ContentCard/__figma__/ContentCardBody.figma.d.ts.map +0 -1
- package/dts/cards/ContentCard/__figma__/ContentCardFooter.figma.d.ts +0 -2
- package/dts/cards/ContentCard/__figma__/ContentCardFooter.figma.d.ts.map +0 -1
- package/dts/cards/ContentCard/__figma__/ContentCardHeader.figma.d.ts +0 -2
- package/dts/cards/ContentCard/__figma__/ContentCardHeader.figma.d.ts.map +0 -1
- package/dts/cards/MediaCard/__figma__/MediaCard.figma.d.ts +0 -2
- package/dts/cards/MediaCard/__figma__/MediaCard.figma.d.ts.map +0 -1
- package/dts/cards/MessagingCard/__figma__/MessagingCard.figma.d.ts +0 -2
- package/dts/cards/MessagingCard/__figma__/MessagingCard.figma.d.ts.map +0 -1
- package/dts/cards/__figma__/AnnouncementCard.figma.d.ts +0 -2
- package/dts/cards/__figma__/AnnouncementCard.figma.d.ts.map +0 -1
- package/dts/cards/__figma__/ContainedAssetCard.figma.d.ts +0 -2
- package/dts/cards/__figma__/ContainedAssetCard.figma.d.ts.map +0 -1
- package/dts/cards/__figma__/FloatingAssetCard.figma.d.ts +0 -2
- package/dts/cards/__figma__/FloatingAssetCard.figma.d.ts.map +0 -1
- package/dts/cards/__figma__/NudgeCard.figma.d.ts +0 -2
- package/dts/cards/__figma__/NudgeCard.figma.d.ts.map +0 -1
- package/dts/cards/__figma__/UpsellCard.figma.d.ts +0 -2
- package/dts/cards/__figma__/UpsellCard.figma.d.ts.map +0 -1
- package/dts/carousel/__figma__/Carousel.figma.d.ts +0 -2
- package/dts/carousel/__figma__/Carousel.figma.d.ts.map +0 -1
- package/dts/cells/__figma__/ContentCell.figma.d.ts +0 -2
- package/dts/cells/__figma__/ContentCell.figma.d.ts.map +0 -1
- package/dts/cells/__figma__/ListCell.figma.d.ts +0 -2
- package/dts/cells/__figma__/ListCell.figma.d.ts.map +0 -1
- package/dts/chips/__figma__/InputChip.figma.d.ts +0 -2
- package/dts/chips/__figma__/InputChip.figma.d.ts.map +0 -1
- package/dts/chips/__figma__/SelectChip.figma.d.ts +0 -2
- package/dts/chips/__figma__/SelectChip.figma.d.ts.map +0 -1
- package/dts/chips/__figma__/TabbedChips.figma.d.ts +0 -2
- package/dts/chips/__figma__/TabbedChips.figma.d.ts.map +0 -1
- package/dts/coachmark/__figma__/Coachmark.figma.d.ts +0 -2
- package/dts/coachmark/__figma__/Coachmark.figma.d.ts.map +0 -1
- package/dts/controls/__figma__/Checkbox.figma.d.ts +0 -2
- package/dts/controls/__figma__/Checkbox.figma.d.ts.map +0 -1
- package/dts/controls/__figma__/CheckboxCell.figma.d.ts +0 -2
- package/dts/controls/__figma__/CheckboxCell.figma.d.ts.map +0 -1
- package/dts/controls/__figma__/CheckboxGroup.figma.d.ts +0 -2
- package/dts/controls/__figma__/CheckboxGroup.figma.d.ts.map +0 -1
- package/dts/controls/__figma__/NativeTextArea.figma.d.ts +0 -2
- package/dts/controls/__figma__/NativeTextArea.figma.d.ts.map +0 -1
- package/dts/controls/__figma__/RadioCell.figma.d.ts +0 -2
- package/dts/controls/__figma__/RadioCell.figma.d.ts.map +0 -1
- package/dts/controls/__figma__/RadioGroup.figma.d.ts +0 -2
- package/dts/controls/__figma__/RadioGroup.figma.d.ts.map +0 -1
- package/dts/controls/__figma__/SearchInput.figma.d.ts +0 -2
- package/dts/controls/__figma__/SearchInput.figma.d.ts.map +0 -1
- package/dts/controls/__figma__/SelectOption.figma.d.ts +0 -2
- package/dts/controls/__figma__/SelectOption.figma.d.ts.map +0 -1
- package/dts/controls/__figma__/Switch.figma.d.ts +0 -2
- package/dts/controls/__figma__/Switch.figma.d.ts.map +0 -1
- package/dts/controls/__figma__/TextInput.figma.d.ts +0 -2
- package/dts/controls/__figma__/TextInput.figma.d.ts.map +0 -1
- package/dts/dates/__figma__/DatePicker.figma.d.ts +0 -2
- package/dts/dates/__figma__/DatePicker.figma.d.ts.map +0 -1
- package/dts/dots/__figma__/DotCount.figma.d.ts +0 -2
- package/dts/dots/__figma__/DotCount.figma.d.ts.map +0 -1
- package/dts/dots/__figma__/DotStatusColor.figma.d.ts +0 -2
- package/dts/dots/__figma__/DotStatusColor.figma.d.ts.map +0 -1
- package/dts/dots/__figma__/DotSymbol.figma.d.ts +0 -2
- package/dts/dots/__figma__/DotSymbol.figma.d.ts.map +0 -1
- package/dts/dropdown/__figma__/Dropdown.figma.d.ts +0 -2
- package/dts/dropdown/__figma__/Dropdown.figma.d.ts.map +0 -1
- package/dts/icons/__figma__/Icon.figma.d.ts +0 -2
- package/dts/icons/__figma__/Icon.figma.d.ts.map +0 -1
- package/dts/icons/__figma__/LogoMark.figma.d.ts +0 -2
- package/dts/icons/__figma__/LogoMark.figma.d.ts.map +0 -1
- package/dts/icons/__figma__/LogoWordmark.figma.d.ts +0 -2
- package/dts/icons/__figma__/LogoWordmark.figma.d.ts.map +0 -1
- package/dts/icons/__figma__/SubBrandLogoMark.figma.d.ts +0 -2
- package/dts/icons/__figma__/SubBrandLogoMark.figma.d.ts.map +0 -1
- package/dts/icons/__figma__/SubBrandLogoWordmark.figma.d.ts +0 -2
- package/dts/icons/__figma__/SubBrandLogoWordmark.figma.d.ts.map +0 -1
- package/dts/illustrations/__figma__/HeroSquare.figma.d.ts +0 -2
- package/dts/illustrations/__figma__/HeroSquare.figma.d.ts.map +0 -1
- package/dts/illustrations/__figma__/Pictogram.figma.d.ts +0 -2
- package/dts/illustrations/__figma__/Pictogram.figma.d.ts.map +0 -1
- package/dts/illustrations/__figma__/SpotIcon.figma.d.ts +0 -2
- package/dts/illustrations/__figma__/SpotIcon.figma.d.ts.map +0 -1
- package/dts/illustrations/__figma__/SpotRectangle.figma.d.ts +0 -2
- package/dts/illustrations/__figma__/SpotRectangle.figma.d.ts.map +0 -1
- package/dts/illustrations/__figma__/SpotSquare.figma.d.ts +0 -2
- package/dts/illustrations/__figma__/SpotSquare.figma.d.ts.map +0 -1
- package/dts/layout/__figma__/Divider.figma.d.ts +0 -2
- package/dts/layout/__figma__/Divider.figma.d.ts.map +0 -1
- package/dts/layout/__figma__/Fallback.figma.d.ts +0 -2
- package/dts/layout/__figma__/Fallback.figma.d.ts.map +0 -1
- package/dts/media/__figma__/Avatar.figma.d.ts +0 -2
- package/dts/media/__figma__/Avatar.figma.d.ts.map +0 -1
- package/dts/multi-content-module/__figma__/MultiContentModule.figma.d.ts +0 -2
- package/dts/multi-content-module/__figma__/MultiContentModule.figma.d.ts.map +0 -1
- package/dts/navigation/__figma__/NavLink.figma.d.ts +0 -2
- package/dts/navigation/__figma__/NavLink.figma.d.ts.map +0 -1
- package/dts/navigation/__figma__/NavigationBar.figma.d.ts +0 -2
- package/dts/navigation/__figma__/NavigationBar.figma.d.ts.map +0 -1
- package/dts/navigation/__figma__/NavigationTitle.figma.d.ts +0 -2
- package/dts/navigation/__figma__/NavigationTitle.figma.d.ts.map +0 -1
- package/dts/navigation/__figma__/Sidebar.figma.d.ts +0 -2
- package/dts/navigation/__figma__/Sidebar.figma.d.ts.map +0 -1
- package/dts/navigation/__figma__/SidebarItem.figma.d.ts +0 -2
- package/dts/navigation/__figma__/SidebarItem.figma.d.ts.map +0 -1
- package/dts/overlays/__figma__/Alert.figma.d.ts +0 -2
- package/dts/overlays/__figma__/Alert.figma.d.ts.map +0 -1
- package/dts/overlays/__figma__/Toast.figma.d.ts +0 -2
- package/dts/overlays/__figma__/Toast.figma.d.ts.map +0 -1
- package/dts/overlays/modal/__figma__/FullscreenModal.figma.d.ts +0 -2
- package/dts/overlays/modal/__figma__/FullscreenModal.figma.d.ts.map +0 -1
- package/dts/overlays/modal/__figma__/Modal.figma.d.ts +0 -2
- package/dts/overlays/modal/__figma__/Modal.figma.d.ts.map +0 -1
- package/dts/overlays/tooltip/__figma__/Tooltip.figma.d.ts +0 -2
- package/dts/overlays/tooltip/__figma__/Tooltip.figma.d.ts.map +0 -1
- package/dts/overlays/tray/__figma__/Tray.figma.d.ts +0 -2
- package/dts/overlays/tray/__figma__/Tray.figma.d.ts.map +0 -1
- package/dts/page/__figma__/PageFooter.figma.d.ts +0 -2
- package/dts/page/__figma__/PageFooter.figma.d.ts.map +0 -1
- package/dts/page/__figma__/PageHeader.figma.d.ts +0 -2
- package/dts/page/__figma__/PageHeader.figma.d.ts.map +0 -1
- package/dts/pagination/__figma__/Pagination.figma.d.ts +0 -2
- package/dts/pagination/__figma__/Pagination.figma.d.ts.map +0 -1
- package/dts/perf/component-config/Button.component-config.perf-test.d.ts +0 -2
- package/dts/perf/component-config/Button.component-config.perf-test.d.ts.map +0 -1
- package/dts/perf/component-config/ComponentConfigProvider.perf-test.d.ts +0 -2
- package/dts/perf/component-config/ComponentConfigProvider.perf-test.d.ts.map +0 -1
- package/dts/perf/component-config/ComponentConfigStickerSheet.perf-test.d.ts +0 -2
- package/dts/perf/component-config/ComponentConfigStickerSheet.perf-test.d.ts.map +0 -1
- package/dts/section-header/__figma__/SectionHeader.figma.d.ts +0 -2
- package/dts/section-header/__figma__/SectionHeader.figma.d.ts.map +0 -1
- package/dts/tables/__figma__/TableCell.figma.d.ts +0 -2
- package/dts/tables/__figma__/TableCell.figma.d.ts.map +0 -1
- package/dts/tabs/__figma__/SegmentedTabs.figma.d.ts +0 -2
- package/dts/tabs/__figma__/SegmentedTabs.figma.d.ts.map +0 -1
- package/dts/tabs/__figma__/TabNavigation.figma.d.ts +0 -2
- package/dts/tabs/__figma__/TabNavigation.figma.d.ts.map +0 -1
- package/dts/tag/__figma__/Tag.figma.d.ts +0 -2
- package/dts/tag/__figma__/Tag.figma.d.ts.map +0 -1
- package/dts/typography/__figma__/Link.figma.d.ts +0 -2
- package/dts/typography/__figma__/Link.figma.d.ts.map +0 -1
- package/dts/visualizations/__figma__/ProgressBar.figma.d.ts +0 -2
- package/dts/visualizations/__figma__/ProgressBar.figma.d.ts.map +0 -1
- package/dts/visualizations/__figma__/ProgressCircle.figma.d.ts +0 -2
- package/dts/visualizations/__figma__/ProgressCircle.figma.d.ts.map +0 -1
- package/dts/visualizations/sparkline/__figma__/Sparkline.figma.d.ts +0 -2
- package/dts/visualizations/sparkline/__figma__/Sparkline.figma.d.ts.map +0 -1
- package/dts/visualizations/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.d.ts +0 -2
- package/dts/visualizations/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.d.ts.map +0 -1
- package/dts/visualizations/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.d.ts +0 -2
- package/dts/visualizations/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.d.ts.map +0 -1
- package/esm/accordion/__figma__/Accordion.figma.js +0 -47
- package/esm/alpha/__figma__/Select.figma.js +0 -68
- package/esm/alpha/data-card/__figma__/DataCard.figma.js +0 -29
- package/esm/buttons/__figma__/AvatarButton.figma.js +0 -30
- package/esm/buttons/__figma__/Button.figma.js +0 -63
- package/esm/buttons/__figma__/ButtonGroup.figma.js +0 -54
- package/esm/buttons/__figma__/IconButton.figma.js +0 -35
- package/esm/buttons/__figma__/TileButton.figma.js +0 -29
- package/esm/cards/ContentCard/__figma__/ContentCard.figma.js +0 -37
- package/esm/cards/ContentCard/__figma__/ContentCardBody.figma.js +0 -55
- package/esm/cards/ContentCard/__figma__/ContentCardFooter.figma.js +0 -150
- package/esm/cards/ContentCard/__figma__/ContentCardHeader.figma.js +0 -29
- package/esm/cards/MediaCard/__figma__/MediaCard.figma.js +0 -50
- package/esm/cards/MessagingCard/__figma__/MessagingCard.figma.js +0 -42
- package/esm/cards/__figma__/AnnouncementCard.figma.js +0 -20
- package/esm/cards/__figma__/ContainedAssetCard.figma.js +0 -45
- package/esm/cards/__figma__/FloatingAssetCard.figma.js +0 -36
- package/esm/cards/__figma__/NudgeCard.figma.js +0 -60
- package/esm/cards/__figma__/UpsellCard.figma.js +0 -59
- package/esm/carousel/__figma__/Carousel.figma.js +0 -36
- package/esm/cells/__figma__/ContentCell.figma.js +0 -40
- package/esm/cells/__figma__/ListCell.figma.js +0 -79
- package/esm/chips/__figma__/InputChip.figma.js +0 -31
- package/esm/chips/__figma__/SelectChip.figma.js +0 -46
- package/esm/chips/__figma__/TabbedChips.figma.js +0 -55
- package/esm/coachmark/__figma__/Coachmark.figma.js +0 -49
- package/esm/controls/__figma__/Checkbox.figma.js +0 -32
- package/esm/controls/__figma__/CheckboxCell.figma.js +0 -43
- package/esm/controls/__figma__/CheckboxGroup.figma.js +0 -27
- package/esm/controls/__figma__/NativeTextArea.figma.js +0 -30
- package/esm/controls/__figma__/RadioCell.figma.js +0 -83
- package/esm/controls/__figma__/RadioGroup.figma.js +0 -47
- package/esm/controls/__figma__/SearchInput.figma.js +0 -44
- package/esm/controls/__figma__/SelectOption.figma.js +0 -38
- package/esm/controls/__figma__/Switch.figma.js +0 -20
- package/esm/controls/__figma__/TextInput.figma.js +0 -130
- package/esm/dates/__figma__/DatePicker.figma.js +0 -46
- package/esm/dots/__figma__/DotCount.figma.js +0 -19
- package/esm/dots/__figma__/DotStatusColor.figma.js +0 -27
- package/esm/dots/__figma__/DotSymbol.figma.js +0 -49
- package/esm/dropdown/__figma__/Dropdown.figma.js +0 -20
- package/esm/icons/__figma__/Icon.figma.js +0 -3909
- package/esm/icons/__figma__/LogoMark.figma.js +0 -23
- package/esm/icons/__figma__/LogoWordmark.figma.js +0 -35
- package/esm/icons/__figma__/SubBrandLogoMark.figma.js +0 -51
- package/esm/icons/__figma__/SubBrandLogoWordmark.figma.js +0 -52
- package/esm/illustrations/__figma__/HeroSquare.figma.js +0 -2103
- package/esm/illustrations/__figma__/Pictogram.figma.js +0 -1773
- package/esm/illustrations/__figma__/SpotIcon.figma.js +0 -339
- package/esm/illustrations/__figma__/SpotRectangle.figma.js +0 -1101
- package/esm/illustrations/__figma__/SpotSquare.figma.js +0 -1191
- package/esm/layout/__figma__/Divider.figma.js +0 -31
- package/esm/layout/__figma__/Fallback.figma.js +0 -25
- package/esm/media/__figma__/Avatar.figma.js +0 -61
- package/esm/multi-content-module/__figma__/MultiContentModule.figma.js +0 -39
- package/esm/navigation/__figma__/NavLink.figma.js +0 -58
- package/esm/navigation/__figma__/NavigationBar.figma.js +0 -284
- package/esm/navigation/__figma__/NavigationTitle.figma.js +0 -18
- package/esm/navigation/__figma__/Sidebar.figma.js +0 -40
- package/esm/navigation/__figma__/SidebarItem.figma.js +0 -24
- package/esm/overlays/__figma__/Alert.figma.js +0 -37
- package/esm/overlays/__figma__/Toast.figma.js +0 -51
- package/esm/overlays/modal/__figma__/FullscreenModal.figma.css +0 -1
- package/esm/overlays/modal/__figma__/FullscreenModal.figma.js +0 -104
- package/esm/overlays/modal/__figma__/Modal.figma.js +0 -81
- package/esm/overlays/tooltip/__figma__/Tooltip.figma.js +0 -93
- package/esm/overlays/tray/__figma__/Tray.figma.js +0 -191
- package/esm/page/__figma__/PageFooter.figma.js +0 -61
- package/esm/page/__figma__/PageHeader.figma.js +0 -57
- package/esm/pagination/__figma__/Pagination.figma.js +0 -22
- package/esm/perf/component-config/Button.component-config.perf-test.js +0 -43
- package/esm/perf/component-config/ComponentConfigProvider.perf-test.js +0 -134
- package/esm/perf/component-config/ComponentConfigStickerSheet.perf-test.js +0 -332
- package/esm/perf/component-config/README.md +0 -8
- package/esm/section-header/__figma__/SectionHeader.figma.js +0 -58
- package/esm/tables/__figma__/TableCell.figma.js +0 -116
- package/esm/tabs/__figma__/SegmentedTabs.figma.js +0 -82
- package/esm/tabs/__figma__/TabNavigation.figma.js +0 -82
- package/esm/tag/__figma__/Tag.figma.js +0 -90
- package/esm/typography/__figma__/Link.figma.js +0 -32
- package/esm/visualizations/__figma__/ProgressBar.figma.js +0 -103
- package/esm/visualizations/__figma__/ProgressCircle.figma.js +0 -29
- package/esm/visualizations/sparkline/__figma__/Sparkline.figma.js +0 -24
- package/esm/visualizations/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.js +0 -89
- package/esm/visualizations/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.js +0 -108
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react-hooks/rules-of-hooks */
|
|
2
|
-
import React, { useCallback } from 'react';
|
|
3
|
-
import { figma } from '@figma/code-connect';
|
|
4
|
-
import { Button } from '../../buttons';
|
|
5
|
-
import { PortalProvider } from '../PortalProvider';
|
|
6
|
-
import { Toast } from '../Toast';
|
|
7
|
-
import { useToast } from '../useToast';
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
figma.connect(Toast, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=8500%3A674', {
|
|
10
|
-
imports: ["import { useToast } from '@coinbase/cds-web/overlays/useToast'"],
|
|
11
|
-
props: {
|
|
12
|
-
hideCloseButton: figma.boolean('close', {
|
|
13
|
-
true: undefined,
|
|
14
|
-
false: true
|
|
15
|
-
}),
|
|
16
|
-
content: figma.nestedProps('string.toast', {
|
|
17
|
-
string: figma.enum('Ready-made', {
|
|
18
|
-
Custom: figma.string('string'),
|
|
19
|
-
Transaction: figma.textContent('toast-label'),
|
|
20
|
-
'Copied to clipboard': figma.textContent('toast-label'),
|
|
21
|
-
Reward: figma.textContent('toast-label')
|
|
22
|
-
})
|
|
23
|
-
}),
|
|
24
|
-
action: figma.boolean('action', {
|
|
25
|
-
true: {
|
|
26
|
-
label: 'Button',
|
|
27
|
-
onPress: () => {}
|
|
28
|
-
},
|
|
29
|
-
false: undefined
|
|
30
|
-
})
|
|
31
|
-
},
|
|
32
|
-
example: () => {
|
|
33
|
-
const toast = useToast();
|
|
34
|
-
const handleShowToast = useCallback(() => {
|
|
35
|
-
toast.show('Toast content', {
|
|
36
|
-
action: {
|
|
37
|
-
label: 'Action',
|
|
38
|
-
onPress: () => {}
|
|
39
|
-
},
|
|
40
|
-
onWillHide: () => {},
|
|
41
|
-
onDidHide: () => {}
|
|
42
|
-
});
|
|
43
|
-
}, [toast]);
|
|
44
|
-
return /*#__PURE__*/_jsx(PortalProvider, {
|
|
45
|
-
children: /*#__PURE__*/_jsx(Button, {
|
|
46
|
-
onClick: handleShowToast,
|
|
47
|
-
children: "Show Toast"
|
|
48
|
-
})
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@layer cds{.FullscreenModal-f10q9hg9{margin-inline-start:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
-
import { useCallback, useRef, useState } from 'react';
|
|
7
|
-
import { figma } from '@figma/code-connect';
|
|
8
|
-
import { Button } from '../../../buttons';
|
|
9
|
-
import { FullscreenModal } from '../FullscreenModal';
|
|
10
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
figma.connect(FullscreenModal, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=302%3A20262', {
|
|
12
|
-
imports: ["import { FullscreenModal } from '@coinbase/cds-web/overlays/Modal/FullscreenModal'"],
|
|
13
|
-
variant: {
|
|
14
|
-
layout: 'primary + secondary'
|
|
15
|
-
},
|
|
16
|
-
props: {
|
|
17
|
-
showSecondaryContentDivider: figma.boolean('show divider'),
|
|
18
|
-
secondaryContent: figma.instance('🔄 secondary content'),
|
|
19
|
-
primaryContent: figma.instance('🔄 primary content')
|
|
20
|
-
},
|
|
21
|
-
example: function Example(props) {
|
|
22
|
-
const [visible, setVisible] = useState(true);
|
|
23
|
-
const triggerRef = useRef(null);
|
|
24
|
-
const focusTrigger = useCallback(() => {
|
|
25
|
-
var _triggerRef$current;
|
|
26
|
-
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 || _triggerRef$current.focus();
|
|
27
|
-
}, []);
|
|
28
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
29
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
30
|
-
ref: triggerRef,
|
|
31
|
-
onClick: () => setVisible(true),
|
|
32
|
-
children: "Open Modal"
|
|
33
|
-
}), /*#__PURE__*/_jsx(FullscreenModal, _objectSpread({
|
|
34
|
-
onDidClose: focusTrigger,
|
|
35
|
-
onRequestClose: () => setVisible(false),
|
|
36
|
-
title: "Modal title",
|
|
37
|
-
visible: visible
|
|
38
|
-
}, props))]
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
figma.connect(FullscreenModal, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=302%3A20262', {
|
|
43
|
-
imports: ["import { FullscreenModal } from '@coinbase/cds-web/overlays/Modal/FullscreenModal'"],
|
|
44
|
-
variant: {
|
|
45
|
-
layout: 'primary left aligned'
|
|
46
|
-
},
|
|
47
|
-
props: {
|
|
48
|
-
showSecondaryContentDivider: figma.boolean('show divider'),
|
|
49
|
-
primaryContent: figma.instance('🔄 primary content')
|
|
50
|
-
},
|
|
51
|
-
example: function Example(props) {
|
|
52
|
-
const [visible, setVisible] = useState(true);
|
|
53
|
-
const triggerRef = useRef(null);
|
|
54
|
-
const focusTrigger = useCallback(() => {
|
|
55
|
-
var _triggerRef$current2;
|
|
56
|
-
(_triggerRef$current2 = triggerRef.current) === null || _triggerRef$current2 === void 0 || _triggerRef$current2.focus();
|
|
57
|
-
}, []);
|
|
58
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
59
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
60
|
-
ref: triggerRef,
|
|
61
|
-
onClick: () => setVisible(true),
|
|
62
|
-
children: "Open Modal"
|
|
63
|
-
}), /*#__PURE__*/_jsx(FullscreenModal, _objectSpread({
|
|
64
|
-
onDidClose: focusTrigger,
|
|
65
|
-
onRequestClose: () => setVisible(false),
|
|
66
|
-
title: "Modal title",
|
|
67
|
-
visible: visible
|
|
68
|
-
}, props))]
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
figma.connect(FullscreenModal, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=302%3A20262', {
|
|
73
|
-
imports: ["import { FullscreenModal } from '@coinbase/cds-web/overlays/Modal/FullscreenModal'"],
|
|
74
|
-
variant: {
|
|
75
|
-
layout: 'primary centered'
|
|
76
|
-
},
|
|
77
|
-
props: {
|
|
78
|
-
showSecondaryContentDivider: figma.boolean('show divider'),
|
|
79
|
-
secondaryContent: figma.instance('🔄 secondary content'),
|
|
80
|
-
primaryContent: figma.instance('🔄 primary content')
|
|
81
|
-
},
|
|
82
|
-
example: function Example(props) {
|
|
83
|
-
const [visible, setVisible] = useState(true);
|
|
84
|
-
const triggerRef = useRef(null);
|
|
85
|
-
const focusTrigger = useCallback(() => {
|
|
86
|
-
var _triggerRef$current3;
|
|
87
|
-
(_triggerRef$current3 = triggerRef.current) === null || _triggerRef$current3 === void 0 || _triggerRef$current3.focus();
|
|
88
|
-
}, []);
|
|
89
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
90
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
91
|
-
ref: triggerRef,
|
|
92
|
-
onClick: () => setVisible(true),
|
|
93
|
-
children: "Open Modal"
|
|
94
|
-
}), /*#__PURE__*/_jsx(FullscreenModal, _objectSpread({
|
|
95
|
-
contentContainerClassName: "FullscreenModal-f10q9hg9",
|
|
96
|
-
onDidClose: focusTrigger,
|
|
97
|
-
onRequestClose: () => setVisible(false),
|
|
98
|
-
title: "Modal title",
|
|
99
|
-
visible: visible
|
|
100
|
-
}, props))]
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
import "./FullscreenModal.figma.css";
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
const _excluded = ["modalHeader", "modalFooter", "children"];
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
8
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
9
|
-
import { useCallback, useRef, useState } from 'react';
|
|
10
|
-
import { figma } from '@figma/code-connect';
|
|
11
|
-
import { Button } from '../../../buttons';
|
|
12
|
-
import { Modal } from '../Modal';
|
|
13
|
-
import { ModalBody } from '../ModalBody';
|
|
14
|
-
import { ModalFooter } from '../ModalFooter';
|
|
15
|
-
import { ModalHeader } from '../ModalHeader';
|
|
16
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
17
|
-
figma.connect(Modal, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=68-1065&m=dev', {
|
|
18
|
-
imports: ["import { Modal } from '@coinbase/cds-web/overlays/Modal/Modal'", "import { ModalHeader } from '@coinbase/cds-web/overlays/Modal/ModalHeader'", "import { ModalFooter } from '@coinbase/cds-web/overlays/Modal/ModalFooter'", "import { ModalBody } from '@coinbase/cds-web/overlays/Modal/ModalBody'"],
|
|
19
|
-
props: {
|
|
20
|
-
modalHeader: figma.nestedProps('.Modal Header', {
|
|
21
|
-
// onBackButtonPress: figma.boolean('show back button', {
|
|
22
|
-
// true: () => {},
|
|
23
|
-
// false: undefined,
|
|
24
|
-
// }),
|
|
25
|
-
title: figma.boolean('show title', {
|
|
26
|
-
true: figma.string('title'),
|
|
27
|
-
false: undefined
|
|
28
|
-
})
|
|
29
|
-
}),
|
|
30
|
-
modalFooter: figma.nestedProps('.Modal Footer', {
|
|
31
|
-
secondaryAction: figma.boolean('show secondary', {
|
|
32
|
-
true: /*#__PURE__*/_jsx(Button, {
|
|
33
|
-
variant: "secondary",
|
|
34
|
-
children: "Button"
|
|
35
|
-
}),
|
|
36
|
-
false: undefined
|
|
37
|
-
})
|
|
38
|
-
}),
|
|
39
|
-
children: figma.instance('🔄 replace me'),
|
|
40
|
-
hideDividers: figma.enum('height defined by', {
|
|
41
|
-
content: true,
|
|
42
|
-
container: undefined
|
|
43
|
-
})
|
|
44
|
-
},
|
|
45
|
-
example: function Example(_ref) {
|
|
46
|
-
let {
|
|
47
|
-
modalHeader,
|
|
48
|
-
modalFooter,
|
|
49
|
-
children
|
|
50
|
-
} = _ref,
|
|
51
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
52
|
-
const [visible, setVisible] = useState(true);
|
|
53
|
-
const triggerRef = useRef(null);
|
|
54
|
-
const focusTrigger = useCallback(() => {
|
|
55
|
-
var _triggerRef$current;
|
|
56
|
-
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 || _triggerRef$current.focus();
|
|
57
|
-
}, []);
|
|
58
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
59
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
60
|
-
ref: triggerRef,
|
|
61
|
-
onClick: () => setVisible(true),
|
|
62
|
-
children: "Open Modal"
|
|
63
|
-
}), /*#__PURE__*/_jsxs(Modal, _objectSpread(_objectSpread({
|
|
64
|
-
onDidClose: focusTrigger,
|
|
65
|
-
onRequestClose: () => setVisible(false),
|
|
66
|
-
visible: visible
|
|
67
|
-
}, props), {}, {
|
|
68
|
-
children: [/*#__PURE__*/_jsx(ModalHeader, {
|
|
69
|
-
title: modalHeader.title
|
|
70
|
-
}), /*#__PURE__*/_jsx(ModalBody, {
|
|
71
|
-
children: children
|
|
72
|
-
}), /*#__PURE__*/_jsx(ModalFooter, {
|
|
73
|
-
primaryAction: /*#__PURE__*/_jsx(Button, {
|
|
74
|
-
children: "Button"
|
|
75
|
-
}),
|
|
76
|
-
secondaryAction: modalFooter.secondaryAction
|
|
77
|
-
})]
|
|
78
|
-
}))]
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
});
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { figma } from '@figma/code-connect';
|
|
2
|
-
import { Button } from '../../../buttons';
|
|
3
|
-
import { Text } from '../../../typography';
|
|
4
|
-
import { Tooltip } from '../Tooltip';
|
|
5
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
figma.connect(Tooltip, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=715%3A14162', {
|
|
7
|
-
imports: ["import { Tooltip } from '@coinbase/cds-web/overlays'", "import { Button } from '@coinbase/cds-web/buttons/Button'"],
|
|
8
|
-
variant: {
|
|
9
|
-
type: 'body'
|
|
10
|
-
},
|
|
11
|
-
props: {
|
|
12
|
-
content: figma.nestedProps('string.tooltip', {
|
|
13
|
-
description: figma.enum('Ready-made', {
|
|
14
|
-
Custom: figma.string('description'),
|
|
15
|
-
Congestion: figma.textContent('body-option'),
|
|
16
|
-
'Crypto prices': figma.textContent('body-option'),
|
|
17
|
-
'Exchange rate': figma.textContent('body-option'),
|
|
18
|
-
'Gain/loss': figma.textContent('body-option'),
|
|
19
|
-
'Max slippage': figma.textContent('body-option'),
|
|
20
|
-
Network: figma.textContent('body-option'),
|
|
21
|
-
'Network fee': figma.textContent('body-option'),
|
|
22
|
-
'Trading activity': figma.textContent('body-option'),
|
|
23
|
-
'Transaction estimate': figma.textContent('body-option')
|
|
24
|
-
})
|
|
25
|
-
})
|
|
26
|
-
},
|
|
27
|
-
example: _ref => {
|
|
28
|
-
let {
|
|
29
|
-
content
|
|
30
|
-
} = _ref;
|
|
31
|
-
return /*#__PURE__*/_jsx(Tooltip, {
|
|
32
|
-
content: content.description,
|
|
33
|
-
children: /*#__PURE__*/_jsx(Button, {
|
|
34
|
-
children: "Default"
|
|
35
|
-
})
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
figma.connect(Tooltip, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=715%3A14162', {
|
|
40
|
-
imports: ["import { Tooltip } from '@coinbase/cds-web/overlays'", "import { Button } from '@coinbase/cds-web/buttons/Button'"],
|
|
41
|
-
variant: {
|
|
42
|
-
type: 'title + body'
|
|
43
|
-
},
|
|
44
|
-
props: {
|
|
45
|
-
content: figma.nestedProps('string.tooltip', {
|
|
46
|
-
title: figma.enum('Ready-made', {
|
|
47
|
-
Custom: figma.string('title'),
|
|
48
|
-
Congestion: figma.textContent('title-option'),
|
|
49
|
-
'Crypto prices': figma.textContent('title-option'),
|
|
50
|
-
'Exchange rate': figma.textContent('title-option'),
|
|
51
|
-
'Gain/loss': figma.textContent('title-option'),
|
|
52
|
-
'Max slippage': figma.textContent('title-option'),
|
|
53
|
-
Network: figma.textContent('title-option'),
|
|
54
|
-
'Network fee': figma.textContent('title-option'),
|
|
55
|
-
'Trading activity': figma.textContent('title-option'),
|
|
56
|
-
'Transaction estimate': figma.textContent('title-option')
|
|
57
|
-
}),
|
|
58
|
-
description: figma.enum('Ready-made', {
|
|
59
|
-
Custom: figma.string('description'),
|
|
60
|
-
Congestion: figma.textContent('body-option'),
|
|
61
|
-
'Crypto prices': figma.textContent('body-option'),
|
|
62
|
-
'Exchange rate': figma.textContent('body-option'),
|
|
63
|
-
'Gain/loss': figma.textContent('body-option'),
|
|
64
|
-
'Max slippage': figma.textContent('body-option'),
|
|
65
|
-
Network: figma.textContent('body-option'),
|
|
66
|
-
'Network fee': figma.textContent('body-option'),
|
|
67
|
-
'Trading activity': figma.textContent('body-option'),
|
|
68
|
-
'Transaction estimate': figma.textContent('body-option')
|
|
69
|
-
})
|
|
70
|
-
})
|
|
71
|
-
},
|
|
72
|
-
example: _ref2 => {
|
|
73
|
-
let {
|
|
74
|
-
content
|
|
75
|
-
} = _ref2;
|
|
76
|
-
return /*#__PURE__*/_jsx(Tooltip, {
|
|
77
|
-
content: /*#__PURE__*/_jsxs(_Fragment, {
|
|
78
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
79
|
-
as: "p",
|
|
80
|
-
font: "headline",
|
|
81
|
-
children: content.title
|
|
82
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
83
|
-
as: "p",
|
|
84
|
-
font: "body",
|
|
85
|
-
children: content.description
|
|
86
|
-
})]
|
|
87
|
-
}),
|
|
88
|
-
children: /*#__PURE__*/_jsx(Button, {
|
|
89
|
-
children: "Default"
|
|
90
|
-
})
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
});
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import { useId, useState } from 'react';
|
|
2
|
-
import { figma } from '@figma/code-connect';
|
|
3
|
-
import { Button } from '../../../buttons';
|
|
4
|
-
import { useBreakpoints } from '../../../hooks/useBreakpoints';
|
|
5
|
-
import { Pictogram } from '../../../illustrations/Pictogram';
|
|
6
|
-
import { Box } from '../../../layout';
|
|
7
|
-
import { VStack } from '../../../layout/VStack';
|
|
8
|
-
import { PageFooter } from '../../../page/PageFooter';
|
|
9
|
-
import { Text } from '../../../typography/Text';
|
|
10
|
-
import { Tray } from '../Tray';
|
|
11
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
const FIGMA_URL = 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E2%9C%A8-CDS-Components?node-id=74148-11495&m=dev';
|
|
13
|
-
figma.connect(Tray, FIGMA_URL, {
|
|
14
|
-
variant: {
|
|
15
|
-
type: 'standard'
|
|
16
|
-
},
|
|
17
|
-
imports: ["import { Tray } from '@coinbase/cds-web/overlays/tray/Tray'", "import { PageFooter } from '@coinbase/cds-web/page/PageFooter'", "import { useBreakpoints } from '@coinbase/cds-web/hooks/useBreakpoints'"],
|
|
18
|
-
props: {
|
|
19
|
-
title: figma.textContent('SectionHeader')
|
|
20
|
-
},
|
|
21
|
-
example: function StandardExample(_ref) {
|
|
22
|
-
let {
|
|
23
|
-
title
|
|
24
|
-
} = _ref;
|
|
25
|
-
const [visible, setVisible] = useState(false);
|
|
26
|
-
const {
|
|
27
|
-
isPhone
|
|
28
|
-
} = useBreakpoints();
|
|
29
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
30
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
31
|
-
onClick: () => setVisible(true),
|
|
32
|
-
children: "Open Tray"
|
|
33
|
-
}), visible && /*#__PURE__*/_jsx(Tray, {
|
|
34
|
-
footer: _ref2 => {
|
|
35
|
-
let {
|
|
36
|
-
handleClose
|
|
37
|
-
} = _ref2;
|
|
38
|
-
return /*#__PURE__*/_jsx(PageFooter, {
|
|
39
|
-
borderedTop: true,
|
|
40
|
-
action: /*#__PURE__*/_jsx(Button, {
|
|
41
|
-
block: isPhone,
|
|
42
|
-
onClick: handleClose,
|
|
43
|
-
children: "Close"
|
|
44
|
-
}),
|
|
45
|
-
justifyContent: isPhone ? 'center' : 'flex-end'
|
|
46
|
-
});
|
|
47
|
-
},
|
|
48
|
-
onCloseComplete: () => setVisible(false),
|
|
49
|
-
pin: isPhone ? 'bottom' : 'right',
|
|
50
|
-
showHandleBar: isPhone,
|
|
51
|
-
title: title,
|
|
52
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
53
|
-
color: "fgMuted",
|
|
54
|
-
paddingBottom: 2,
|
|
55
|
-
children: "Content goes here."
|
|
56
|
-
})
|
|
57
|
-
})]
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
figma.connect(Tray, FIGMA_URL, {
|
|
62
|
-
variant: {
|
|
63
|
-
type: 'illustration'
|
|
64
|
-
},
|
|
65
|
-
imports: ["import { Tray } from '@coinbase/cds-web/overlays/tray/Tray'", "import { Pictogram } from '@coinbase/cds-web/illustrations/Pictogram'", "import { useBreakpoints } from '@coinbase/cds-web/hooks/useBreakpoints'"],
|
|
66
|
-
props: {
|
|
67
|
-
sectionTitle: figma.textContent('SectionHeader')
|
|
68
|
-
},
|
|
69
|
-
example: function IllustrationExample(_ref3) {
|
|
70
|
-
let {
|
|
71
|
-
sectionTitle
|
|
72
|
-
} = _ref3;
|
|
73
|
-
const [visible, setVisible] = useState(false);
|
|
74
|
-
const {
|
|
75
|
-
isPhone
|
|
76
|
-
} = useBreakpoints();
|
|
77
|
-
const titleId = useId();
|
|
78
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
79
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
80
|
-
onClick: () => setVisible(true),
|
|
81
|
-
children: "Open Tray"
|
|
82
|
-
}), visible && /*#__PURE__*/_jsx(Tray, {
|
|
83
|
-
accessibilityLabelledBy: titleId,
|
|
84
|
-
onCloseComplete: () => setVisible(false),
|
|
85
|
-
pin: isPhone ? 'bottom' : 'right',
|
|
86
|
-
showHandleBar: isPhone,
|
|
87
|
-
title: /*#__PURE__*/_jsxs(VStack, {
|
|
88
|
-
gap: {
|
|
89
|
-
phone: 1.5,
|
|
90
|
-
tablet: 2,
|
|
91
|
-
desktop: 2
|
|
92
|
-
},
|
|
93
|
-
children: [/*#__PURE__*/_jsx(Pictogram, {
|
|
94
|
-
name: "addWallet"
|
|
95
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
96
|
-
font: "title3",
|
|
97
|
-
id: titleId,
|
|
98
|
-
children: sectionTitle
|
|
99
|
-
})]
|
|
100
|
-
}),
|
|
101
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
102
|
-
color: "fgMuted",
|
|
103
|
-
font: "body",
|
|
104
|
-
paddingBottom: 2,
|
|
105
|
-
children: "Content goes here."
|
|
106
|
-
})
|
|
107
|
-
})]
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
figma.connect(Tray, FIGMA_URL, {
|
|
112
|
-
variant: {
|
|
113
|
-
type: 'full-bleed image'
|
|
114
|
-
},
|
|
115
|
-
imports: ["import { Tray } from '@coinbase/cds-web/overlays/tray/Tray'", "import { useBreakpoints } from '@coinbase/cds-web/hooks/useBreakpoints'"],
|
|
116
|
-
props: {
|
|
117
|
-
sectionTitle: figma.textContent('SectionHeader')
|
|
118
|
-
},
|
|
119
|
-
example: function FullBleedImageExample(_ref4) {
|
|
120
|
-
let {
|
|
121
|
-
sectionTitle
|
|
122
|
-
} = _ref4;
|
|
123
|
-
const [visible, setVisible] = useState(false);
|
|
124
|
-
const {
|
|
125
|
-
isPhone
|
|
126
|
-
} = useBreakpoints();
|
|
127
|
-
const titleId = useId();
|
|
128
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
129
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
130
|
-
onClick: () => setVisible(true),
|
|
131
|
-
children: "Open Tray"
|
|
132
|
-
}), visible && /*#__PURE__*/_jsx(Tray, {
|
|
133
|
-
accessibilityLabelledBy: titleId,
|
|
134
|
-
header: /*#__PURE__*/_jsx(Text, {
|
|
135
|
-
font: "title3",
|
|
136
|
-
id: titleId,
|
|
137
|
-
paddingTop: 2,
|
|
138
|
-
paddingX: {
|
|
139
|
-
base: 4,
|
|
140
|
-
phone: 3
|
|
141
|
-
},
|
|
142
|
-
children: sectionTitle
|
|
143
|
-
}),
|
|
144
|
-
onCloseComplete: () => setVisible(false),
|
|
145
|
-
pin: isPhone ? 'bottom' : 'right',
|
|
146
|
-
showHandleBar: isPhone,
|
|
147
|
-
styles: {
|
|
148
|
-
handleBar: {
|
|
149
|
-
position: 'absolute',
|
|
150
|
-
top: 0,
|
|
151
|
-
left: 0,
|
|
152
|
-
right: 0,
|
|
153
|
-
zIndex: 1
|
|
154
|
-
},
|
|
155
|
-
closeButton: {
|
|
156
|
-
position: 'absolute',
|
|
157
|
-
top: 'var(--space-4)',
|
|
158
|
-
right: 'var(--space-4)',
|
|
159
|
-
zIndex: 1
|
|
160
|
-
},
|
|
161
|
-
header: {
|
|
162
|
-
paddingTop: 0
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
title: /*#__PURE__*/_jsx(Box, {
|
|
166
|
-
flexGrow: 1,
|
|
167
|
-
marginX: {
|
|
168
|
-
base: -4,
|
|
169
|
-
phone: -3
|
|
170
|
-
},
|
|
171
|
-
children: /*#__PURE__*/_jsx("img", {
|
|
172
|
-
alt: "Full Bleed",
|
|
173
|
-
height: 180,
|
|
174
|
-
src: "image.jpg",
|
|
175
|
-
style: {
|
|
176
|
-
objectFit: 'cover',
|
|
177
|
-
pointerEvents: 'none'
|
|
178
|
-
},
|
|
179
|
-
width: "100%"
|
|
180
|
-
})
|
|
181
|
-
}),
|
|
182
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
183
|
-
color: "fgMuted",
|
|
184
|
-
font: "body",
|
|
185
|
-
paddingBottom: 2,
|
|
186
|
-
children: "Content goes here."
|
|
187
|
-
})
|
|
188
|
-
})]
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
});
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { figma } from '@figma/code-connect';
|
|
3
|
-
import { Button } from '../../buttons/Button';
|
|
4
|
-
import { ButtonGroup } from '../../buttons/ButtonGroup';
|
|
5
|
-
import { PageFooter } from '../PageFooter';
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
const url = 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=17685%3A3266';
|
|
8
|
-
figma.connect(PageFooter, url, {
|
|
9
|
-
imports: ["import { PageFooter } from '@coinbase/cds-web/page/PageFooter'", "import { Button } from '@coinbase/cds-web/buttons/Button'"],
|
|
10
|
-
variant: {
|
|
11
|
-
'# of actions': '1'
|
|
12
|
-
},
|
|
13
|
-
props: {
|
|
14
|
-
action: figma.children('Button'),
|
|
15
|
-
legalText: figma.boolean('show legal text', {
|
|
16
|
-
true: 'Your legal text here.',
|
|
17
|
-
false: undefined
|
|
18
|
-
})
|
|
19
|
-
},
|
|
20
|
-
example: _ref => {
|
|
21
|
-
let {
|
|
22
|
-
legalText
|
|
23
|
-
} = _ref;
|
|
24
|
-
return /*#__PURE__*/_jsx(PageFooter, {
|
|
25
|
-
action: /*#__PURE__*/_jsx(Button, {
|
|
26
|
-
variant: "primary",
|
|
27
|
-
children: "Next"
|
|
28
|
-
}),
|
|
29
|
-
legalText: legalText
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
figma.connect(PageFooter, url, {
|
|
34
|
-
imports: ["import { PageFooter } from '@coinbase/cds-web/page/PageFooter'", "import { Button } from '@coinbase/cds-web/buttons/Button'", "import { ButtonGroup } from '@coinbase/cds-web/buttons/ButtonGroup'"],
|
|
35
|
-
variant: {
|
|
36
|
-
'# of actions': '2'
|
|
37
|
-
},
|
|
38
|
-
props: {
|
|
39
|
-
legalText: figma.boolean('show legal text', {
|
|
40
|
-
true: 'Your legal text here.',
|
|
41
|
-
false: undefined
|
|
42
|
-
})
|
|
43
|
-
},
|
|
44
|
-
example: _ref2 => {
|
|
45
|
-
let {
|
|
46
|
-
legalText
|
|
47
|
-
} = _ref2;
|
|
48
|
-
return /*#__PURE__*/_jsx(PageFooter, {
|
|
49
|
-
action: /*#__PURE__*/_jsxs(ButtonGroup, {
|
|
50
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
51
|
-
variant: "secondary",
|
|
52
|
-
children: "Back"
|
|
53
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
54
|
-
variant: "primary",
|
|
55
|
-
children: "Next"
|
|
56
|
-
})]
|
|
57
|
-
}),
|
|
58
|
-
legalText: legalText
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
});
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { figma } from '@figma/code-connect';
|
|
2
|
-
import { Button, IconButton } from '../../buttons';
|
|
3
|
-
import { HStack } from '../../layout';
|
|
4
|
-
import { PageHeader } from '../PageHeader';
|
|
5
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
figma.connect(PageHeader, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=17685%3A3171', {
|
|
7
|
-
imports: ["import { PageHeader } from '@coinbase/cds-web/page/PageHeader'", "import { HStack } from '@coinbase/cds-web/layout/HStack'"],
|
|
8
|
-
props: {
|
|
9
|
-
start: figma.boolean('show start', {
|
|
10
|
-
true: figma.enum('type', {
|
|
11
|
-
L1: figma.children('Logo*'),
|
|
12
|
-
L2: /*#__PURE__*/_jsx(IconButton, {
|
|
13
|
-
compact: true,
|
|
14
|
-
name: "backArrow",
|
|
15
|
-
variant: "secondary"
|
|
16
|
-
})
|
|
17
|
-
}),
|
|
18
|
-
false: undefined
|
|
19
|
-
}),
|
|
20
|
-
title: figma.boolean('stepper', {
|
|
21
|
-
true: 'Stepper',
|
|
22
|
-
false: figma.boolean('show page title', {
|
|
23
|
-
true: 'Page title',
|
|
24
|
-
false: undefined
|
|
25
|
-
})
|
|
26
|
-
})
|
|
27
|
-
},
|
|
28
|
-
example: _ref => {
|
|
29
|
-
let {
|
|
30
|
-
title,
|
|
31
|
-
start
|
|
32
|
-
} = _ref;
|
|
33
|
-
return /*#__PURE__*/_jsx(PageHeader, {
|
|
34
|
-
end: /*#__PURE__*/_jsxs(HStack, {
|
|
35
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
36
|
-
compact: true,
|
|
37
|
-
transparent: true,
|
|
38
|
-
flush: "start",
|
|
39
|
-
variant: "primary",
|
|
40
|
-
children: "Button"
|
|
41
|
-
}), /*#__PURE__*/_jsx(IconButton, {
|
|
42
|
-
compact: true,
|
|
43
|
-
transparent: true,
|
|
44
|
-
name: "externalLink",
|
|
45
|
-
variant: "secondary"
|
|
46
|
-
}), /*#__PURE__*/_jsx(IconButton, {
|
|
47
|
-
compact: true,
|
|
48
|
-
transparent: true,
|
|
49
|
-
name: "close",
|
|
50
|
-
variant: "secondary"
|
|
51
|
-
})]
|
|
52
|
-
}),
|
|
53
|
-
start: start,
|
|
54
|
-
title: title
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
-
import { figma } from '@figma/code-connect';
|
|
7
|
-
import { Pagination } from '../Pagination';
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
figma.connect(Pagination, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E2%9C%A8-CDS-Components?node-id=49607-6651&m=dev', {
|
|
10
|
-
imports: ["import { Pagination } from '@coinbase/cds-web/pagination/Pagination'"],
|
|
11
|
-
props: {
|
|
12
|
-
totalPages: figma.enum('number of pages', {
|
|
13
|
-
'5< pages': 5,
|
|
14
|
-
'5+ pages': 8,
|
|
15
|
-
'50+ pages': 100
|
|
16
|
-
})
|
|
17
|
-
},
|
|
18
|
-
example: props => /*#__PURE__*/_jsx(Pagination, _objectSpread({
|
|
19
|
-
activePage: 1,
|
|
20
|
-
onChange: () => {}
|
|
21
|
-
}, props))
|
|
22
|
-
});
|