@tempoxyz/ds 0.3.1 → 0.3.4
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 +7 -0
- package/dist/web/components/Accordion.css +1 -1
- package/dist/web/components/Accordion.js.zyzz.json +1 -1
- package/dist/web/components/AddressCard.css +1 -0
- package/dist/web/components/AddressCard.d.ts +85 -0
- package/dist/web/components/AddressCard.d.ts.map +1 -0
- package/dist/web/components/AddressCard.js +79 -0
- package/dist/web/components/AddressCard.js.map +1 -0
- package/dist/web/components/AddressCard.js.zyzz.json +1 -0
- package/dist/web/components/AgentLogo.js +1 -1
- package/dist/web/components/AgentLogo.js.map +1 -1
- package/dist/web/components/AgentLogo.js.zyzz.json +1 -1
- package/dist/web/components/Alert.css +1 -1
- package/dist/web/components/Alert.js.zyzz.json +1 -1
- package/dist/web/components/AlertDialog.js.zyzz.json +1 -1
- package/dist/web/components/Amount.css +1 -1
- package/dist/web/components/Amount.js.zyzz.json +1 -1
- package/dist/web/components/AmountInput.css +1 -1
- package/dist/web/components/AmountInput.d.ts +1 -1
- package/dist/web/components/AmountInput.d.ts.map +1 -1
- package/dist/web/components/AmountInput.js.zyzz.json +1 -1
- package/dist/web/components/AppShell.css +1 -1
- package/dist/web/components/AppShell.d.ts +21 -3
- package/dist/web/components/AppShell.d.ts.map +1 -1
- package/dist/web/components/AppShell.js +74 -32
- package/dist/web/components/AppShell.js.map +1 -1
- package/dist/web/components/AppShell.js.zyzz.json +1 -1
- package/dist/web/components/AssetChip.css +1 -1
- package/dist/web/components/AssetChip.d.ts.map +1 -1
- package/dist/web/components/AssetChip.js.map +1 -1
- package/dist/web/components/AssetChip.js.zyzz.json +1 -1
- package/dist/web/components/Autocomplete.js.zyzz.json +1 -1
- package/dist/web/components/Avatar.css +1 -1
- package/dist/web/components/Avatar.d.ts +68 -6
- package/dist/web/components/Avatar.d.ts.map +1 -1
- package/dist/web/components/Avatar.js +27 -7
- package/dist/web/components/Avatar.js.map +1 -1
- package/dist/web/components/Avatar.js.zyzz.json +1 -1
- package/dist/web/components/Badge.css +1 -1
- package/dist/web/components/Badge.d.ts +48 -0
- package/dist/web/components/Badge.d.ts.map +1 -1
- package/dist/web/components/Badge.js +5 -3
- package/dist/web/components/Badge.js.map +1 -1
- package/dist/web/components/Badge.js.zyzz.json +1 -1
- package/dist/web/components/Banner.js.zyzz.json +1 -1
- package/dist/web/components/BarChart.css +1 -1
- package/dist/web/components/BarChart.js.zyzz.json +1 -1
- package/dist/web/components/Breadcrumbs.css +1 -1
- package/dist/web/components/Breadcrumbs.js.zyzz.json +1 -1
- package/dist/web/components/Button.css +1 -1
- package/dist/web/components/Button.d.ts +72 -6
- package/dist/web/components/Button.d.ts.map +1 -1
- package/dist/web/components/Button.js +5 -3
- package/dist/web/components/Button.js.map +1 -1
- package/dist/web/components/Button.js.zyzz.json +1 -1
- package/dist/web/components/ButtonGroup.js.zyzz.json +1 -1
- package/dist/web/components/Calendar.css +1 -1
- package/dist/web/components/Calendar.js.zyzz.json +1 -1
- package/dist/web/components/Callout.css +1 -0
- package/dist/web/components/Callout.d.ts +23 -0
- package/dist/web/components/Callout.d.ts.map +1 -0
- package/dist/web/components/Callout.js +26 -0
- package/dist/web/components/Callout.js.map +1 -0
- package/dist/web/components/Callout.js.zyzz.json +1 -0
- package/dist/web/components/Checkbox.css +1 -1
- package/dist/web/components/Checkbox.js.zyzz.json +1 -1
- package/dist/web/components/CheckboxGroup.js.zyzz.json +1 -1
- package/dist/web/components/ChoiceGroup.css +1 -1
- package/dist/web/components/ChoiceGroup.d.ts +17 -10
- package/dist/web/components/ChoiceGroup.d.ts.map +1 -1
- package/dist/web/components/ChoiceGroup.js +5 -5
- package/dist/web/components/ChoiceGroup.js.map +1 -1
- package/dist/web/components/ChoiceGroup.js.zyzz.json +1 -1
- package/dist/web/components/Choicebox.css +1 -1
- package/dist/web/components/Choicebox.js.zyzz.json +1 -1
- package/dist/web/components/Code.css +1 -0
- package/dist/web/components/Code.d.ts +25 -0
- package/dist/web/components/Code.d.ts.map +1 -0
- package/dist/web/components/Code.js +28 -0
- package/dist/web/components/Code.js.map +1 -0
- package/dist/web/components/Code.js.zyzz.json +1 -0
- package/dist/web/components/Combobox.css +1 -1
- package/dist/web/components/Combobox.js.zyzz.json +1 -1
- package/dist/web/components/Container.js.zyzz.json +1 -1
- package/dist/web/components/CopyButton.d.ts +8 -1
- package/dist/web/components/CopyButton.d.ts.map +1 -1
- package/dist/web/components/CopyButton.js.map +1 -1
- package/dist/web/components/CopyButton.js.zyzz.json +1 -1
- package/dist/web/components/DatePicker.css +1 -1
- package/dist/web/components/DatePicker.js.zyzz.json +1 -1
- package/dist/web/components/Dialog.css +1 -1
- package/dist/web/components/Dialog.d.ts.map +1 -1
- package/dist/web/components/Dialog.js +1 -0
- package/dist/web/components/Dialog.js.map +1 -1
- package/dist/web/components/Dialog.js.zyzz.json +1 -1
- package/dist/web/components/Drawer.js.zyzz.json +1 -1
- package/dist/web/components/Empty.css +1 -1
- package/dist/web/components/Empty.js.zyzz.json +1 -1
- package/dist/web/components/Field.css +1 -1
- package/dist/web/components/Field.d.ts +41 -5
- package/dist/web/components/Field.d.ts.map +1 -1
- package/dist/web/components/Field.js +19 -13
- package/dist/web/components/Field.js.map +1 -1
- package/dist/web/components/Field.js.zyzz.json +1 -1
- package/dist/web/components/Fieldset.js.zyzz.json +1 -1
- package/dist/web/components/Frame.css +1 -1
- package/dist/web/components/Frame.js.zyzz.json +1 -1
- package/dist/web/components/Gauge.js.zyzz.json +1 -1
- package/dist/web/components/GetStartedVisual.css +1 -0
- package/dist/web/components/GetStartedVisual.d.ts +59 -0
- package/dist/web/components/GetStartedVisual.d.ts.map +1 -0
- package/dist/web/components/GetStartedVisual.js +31 -0
- package/dist/web/components/GetStartedVisual.js.map +1 -0
- package/dist/web/components/GetStartedVisual.js.zyzz.json +1 -0
- package/dist/web/components/Grid.js.zyzz.json +1 -1
- package/dist/web/components/HeroVisual.css +1 -0
- package/dist/web/components/HeroVisual.d.ts +96 -0
- package/dist/web/components/HeroVisual.d.ts.map +1 -0
- package/dist/web/components/HeroVisual.js +202 -0
- package/dist/web/components/HeroVisual.js.map +1 -0
- package/dist/web/components/HeroVisual.js.zyzz.json +1 -0
- package/dist/web/components/Hex.css +1 -1
- package/dist/web/components/Hex.js.zyzz.json +1 -1
- package/dist/web/components/IconTile.js.zyzz.json +1 -1
- package/dist/web/components/Identicon.js.zyzz.json +1 -1
- package/dist/web/components/Inline.js.zyzz.json +1 -1
- package/dist/web/components/Inset.js.zyzz.json +1 -1
- package/dist/web/components/Kbd.css +1 -1
- package/dist/web/components/Kbd.d.ts +8 -7
- package/dist/web/components/Kbd.d.ts.map +1 -1
- package/dist/web/components/Kbd.js +1 -1
- package/dist/web/components/Kbd.js.map +1 -1
- package/dist/web/components/Kbd.js.zyzz.json +1 -1
- package/dist/web/components/ListGroup.css +1 -1
- package/dist/web/components/ListGroup.d.ts +35 -65
- package/dist/web/components/ListGroup.d.ts.map +1 -1
- package/dist/web/components/ListGroup.js +9 -10
- package/dist/web/components/ListGroup.js.map +1 -1
- package/dist/web/components/ListGroup.js.zyzz.json +1 -1
- package/dist/web/components/LoadingDots.js.zyzz.json +1 -1
- package/dist/web/components/Menu.css +1 -1
- package/dist/web/components/Menu.js.zyzz.json +1 -1
- package/dist/web/components/NativeSelect.css +1 -0
- package/dist/web/components/NativeSelect.d.ts +50 -0
- package/dist/web/components/NativeSelect.d.ts.map +1 -0
- package/dist/web/components/NativeSelect.js +50 -0
- package/dist/web/components/NativeSelect.js.map +1 -0
- package/dist/web/components/NativeSelect.js.zyzz.json +1 -0
- package/dist/web/components/NetworkLogo.js.zyzz.json +1 -1
- package/dist/web/components/NumberField.css +1 -1
- package/dist/web/components/NumberField.js.zyzz.json +1 -1
- package/dist/web/components/OtpField.css +1 -1
- package/dist/web/components/OtpField.js.zyzz.json +1 -1
- package/dist/web/components/Pagination.css +1 -1
- package/dist/web/components/Pagination.js.zyzz.json +1 -1
- package/dist/web/components/Popover.css +1 -1
- package/dist/web/components/Popover.js.zyzz.json +1 -1
- package/dist/web/components/Progress.css +1 -1
- package/dist/web/components/Progress.d.ts +1 -1
- package/dist/web/components/Progress.d.ts.map +1 -1
- package/dist/web/components/Progress.js +2 -1
- package/dist/web/components/Progress.js.map +1 -1
- package/dist/web/components/Progress.js.zyzz.json +1 -1
- package/dist/web/components/Qr.js.zyzz.json +1 -1
- package/dist/web/components/RadioGroup.css +1 -1
- package/dist/web/components/RadioGroup.d.ts +1 -1
- package/dist/web/components/RadioGroup.js.zyzz.json +1 -1
- package/dist/web/components/SecretValue.css +1 -1
- package/dist/web/components/SecretValue.js.zyzz.json +1 -1
- package/dist/web/components/Select.css +1 -1
- package/dist/web/components/Select.d.ts +1 -1
- package/dist/web/components/Select.d.ts.map +1 -1
- package/dist/web/components/Select.js.map +1 -1
- package/dist/web/components/Select.js.zyzz.json +1 -1
- package/dist/web/components/Separator.css +1 -1
- package/dist/web/components/Separator.js.zyzz.json +1 -1
- package/dist/web/components/SidebarMenu.css +1 -1
- package/dist/web/components/SidebarMenu.d.ts +8 -2
- package/dist/web/components/SidebarMenu.d.ts.map +1 -1
- package/dist/web/components/SidebarMenu.js +10 -10
- package/dist/web/components/SidebarMenu.js.map +1 -1
- package/dist/web/components/SidebarMenu.js.zyzz.json +1 -1
- package/dist/web/components/Skeleton.js.zyzz.json +1 -1
- package/dist/web/components/Slider.css +1 -1
- package/dist/web/components/Slider.js.zyzz.json +1 -1
- package/dist/web/components/Snippet.css +1 -1
- package/dist/web/components/Snippet.js.zyzz.json +1 -1
- package/dist/web/components/Spinner.js.zyzz.json +1 -1
- package/dist/web/components/SplitBar.css +1 -1
- package/dist/web/components/SplitBar.js.zyzz.json +1 -1
- package/dist/web/components/SplitButton.css +1 -1
- package/dist/web/components/SplitButton.d.ts +3 -1
- package/dist/web/components/SplitButton.d.ts.map +1 -1
- package/dist/web/components/SplitButton.js +2 -2
- package/dist/web/components/SplitButton.js.map +1 -1
- package/dist/web/components/SplitButton.js.zyzz.json +1 -1
- package/dist/web/components/Stack.js.zyzz.json +1 -1
- package/dist/web/components/StatusChip.css +1 -1
- package/dist/web/components/StatusChip.js.zyzz.json +1 -1
- package/dist/web/components/StatusIndicator.css +1 -0
- package/dist/web/components/StatusIndicator.d.ts +74 -0
- package/dist/web/components/StatusIndicator.d.ts.map +1 -0
- package/dist/web/components/StatusIndicator.js +32 -0
- package/dist/web/components/StatusIndicator.js.map +1 -0
- package/dist/web/components/StatusIndicator.js.zyzz.json +1 -0
- package/dist/web/components/StatusRow.css +1 -1
- package/dist/web/components/StatusRow.js.zyzz.json +1 -1
- package/dist/web/components/Stepper.js.zyzz.json +1 -1
- package/dist/web/components/SuccessHero.css +1 -0
- package/dist/web/components/SuccessHero.d.ts +74 -0
- package/dist/web/components/SuccessHero.d.ts.map +1 -0
- package/dist/web/components/SuccessHero.js +167 -0
- package/dist/web/components/SuccessHero.js.map +1 -0
- package/dist/web/components/SuccessHero.js.zyzz.json +1 -0
- package/dist/web/components/Surface.css +1 -1
- package/dist/web/components/Surface.d.ts +3 -2
- package/dist/web/components/Surface.d.ts.map +1 -1
- package/dist/web/components/Surface.js +2 -2
- package/dist/web/components/Surface.js.map +1 -1
- package/dist/web/components/Surface.js.zyzz.json +1 -1
- package/dist/web/components/Switch.css +1 -1
- package/dist/web/components/Switch.d.ts +6 -6
- package/dist/web/components/Switch.d.ts.map +1 -1
- package/dist/web/components/Switch.js +3 -2
- package/dist/web/components/Switch.js.map +1 -1
- package/dist/web/components/Switch.js.zyzz.json +1 -1
- package/dist/web/components/Table.css +1 -1
- package/dist/web/components/Table.d.ts +85 -0
- package/dist/web/components/Table.d.ts.map +1 -1
- package/dist/web/components/Table.js +14 -6
- package/dist/web/components/Table.js.map +1 -1
- package/dist/web/components/Table.js.zyzz.json +1 -1
- package/dist/web/components/Tabs.css +1 -1
- package/dist/web/components/Tabs.d.ts +183 -6
- package/dist/web/components/Tabs.d.ts.map +1 -1
- package/dist/web/components/Tabs.js +18 -13
- package/dist/web/components/Tabs.js.map +1 -1
- package/dist/web/components/Tabs.js.zyzz.json +1 -1
- package/dist/web/components/TempoLogo.js +1 -1
- package/dist/web/components/TempoLogo.js.map +1 -1
- package/dist/web/components/TempoLogo.js.zyzz.json +1 -1
- package/dist/web/components/TextInput.css +1 -1
- package/dist/web/components/TextInput.d.ts +80 -2
- package/dist/web/components/TextInput.d.ts.map +1 -1
- package/dist/web/components/TextInput.js +19 -7
- package/dist/web/components/TextInput.js.map +1 -1
- package/dist/web/components/TextInput.js.zyzz.json +1 -1
- package/dist/web/components/Textarea.css +1 -1
- package/dist/web/components/Textarea.d.ts +7 -1
- package/dist/web/components/Textarea.d.ts.map +1 -1
- package/dist/web/components/Textarea.js +3 -2
- package/dist/web/components/Textarea.js.map +1 -1
- package/dist/web/components/Textarea.js.zyzz.json +1 -1
- package/dist/web/components/Toast.css +1 -1
- package/dist/web/components/Toast.d.ts +16 -3
- package/dist/web/components/Toast.d.ts.map +1 -1
- package/dist/web/components/Toast.js +29 -17
- package/dist/web/components/Toast.js.map +1 -1
- package/dist/web/components/Toast.js.zyzz.json +1 -1
- package/dist/web/components/Token.css +1 -1
- package/dist/web/components/Token.js.zyzz.json +1 -1
- package/dist/web/components/TokenLogo.js.zyzz.json +1 -1
- package/dist/web/components/Tooltip.css +1 -1
- package/dist/web/components/Tooltip.d.ts.map +1 -1
- package/dist/web/components/Tooltip.js +3 -2
- package/dist/web/components/Tooltip.js.map +1 -1
- package/dist/web/components/Tooltip.js.zyzz.json +1 -1
- package/dist/web/components/VerificationCode.css +1 -1
- package/dist/web/components/VerificationCode.js.zyzz.json +1 -1
- package/dist/web/components/Visual.js.zyzz.json +1 -1
- package/dist/web/components/internal/Field.css +1 -1
- package/dist/web/components/internal/Field.js.zyzz.json +1 -1
- package/dist/web/components/internal/GetStartedArtwork.d.ts +10 -0
- package/dist/web/components/internal/GetStartedArtwork.d.ts.map +1 -0
- package/dist/web/components/internal/GetStartedArtwork.js +11 -0
- package/dist/web/components/internal/GetStartedArtwork.js.map +1 -0
- package/dist/web/components/internal/InputGroup.js.zyzz.json +1 -1
- package/dist/web/components/internal/Listbox.css +1 -1
- package/dist/web/components/internal/Listbox.js.zyzz.json +1 -1
- package/dist/web/components/internal/Streaks.css +1 -0
- package/dist/web/components/internal/Streaks.d.ts +48 -0
- package/dist/web/components/internal/Streaks.d.ts.map +1 -0
- package/dist/web/components/internal/Streaks.js +48 -0
- package/dist/web/components/internal/Streaks.js.map +1 -0
- package/dist/web/components/internal/Streaks.js.zyzz.json +1 -0
- package/dist/web/components/internal/TabBar.d.ts +7 -3
- package/dist/web/components/internal/TabBar.d.ts.map +1 -1
- package/dist/web/components/internal/TabBar.js.map +1 -1
- package/dist/web/index.d.ts +8 -0
- package/dist/web/index.d.ts.map +1 -1
- package/dist/web/index.js +8 -0
- package/dist/web/index.js.map +1 -1
- package/dist/web/index.js.zyzz.json +1 -1
- package/dist/web/vars.d.ts +27 -5
- package/dist/web/vars.d.ts.map +1 -1
- package/dist/web/vars.js.map +1 -1
- package/dist/web/vars.js.zyzz.json +1 -1
- package/dist/web/zyzz.config.d.ts +135 -25
- package/dist/web/zyzz.config.d.ts.map +1 -1
- package/dist/web/zyzz.config.js.zyzz.json +1 -1
- package/package.json +1 -1
- package/src/web/README.md +1 -1
- package/src/web/components/AddressCard.tsx +216 -0
- package/src/web/components/AgentLogo.tsx +1 -1
- package/src/web/components/AmountInput.tsx +1 -1
- package/src/web/components/AppShell.tsx +127 -31
- package/src/web/components/AssetChip.tsx +4 -1
- package/src/web/components/Avatar.tsx +73 -6
- package/src/web/components/Badge.tsx +39 -3
- package/src/web/components/Button.tsx +64 -11
- package/src/web/components/Callout.tsx +45 -0
- package/src/web/components/ChoiceGroup.tsx +26 -12
- package/src/web/components/Code.tsx +42 -0
- package/src/web/components/CopyButton.tsx +8 -4
- package/src/web/components/Dialog.tsx +2 -1
- package/src/web/components/Field.tsx +53 -20
- package/src/web/components/GetStartedVisual.tsx +66 -0
- package/src/web/components/HeroVisual.tsx +304 -0
- package/src/web/components/Kbd.tsx +16 -9
- package/src/web/components/ListGroup.tsx +47 -81
- package/src/web/components/NativeSelect.tsx +167 -0
- package/src/web/components/Progress.tsx +3 -2
- package/src/web/components/RadioGroup.tsx +1 -1
- package/src/web/components/Select.tsx +2 -1
- package/src/web/components/SidebarMenu.tsx +9 -4
- package/src/web/components/SplitButton.tsx +11 -4
- package/src/web/components/StatusIndicator.tsx +94 -0
- package/src/web/components/SuccessHero.tsx +249 -0
- package/src/web/components/Surface.tsx +5 -3
- package/src/web/components/Switch.tsx +18 -25
- package/src/web/components/Table.tsx +69 -1
- package/src/web/components/Tabs.tsx +172 -10
- package/src/web/components/TempoLogo.tsx +1 -1
- package/src/web/components/TextInput.tsx +87 -5
- package/src/web/components/Textarea.tsx +9 -1
- package/src/web/components/Toast.tsx +67 -34
- package/src/web/components/Tooltip.tsx +6 -4
- package/src/web/components/internal/GetStartedArtwork.tsx +356 -0
- package/src/web/components/internal/Streaks.tsx +173 -0
- package/src/web/components/internal/TabBar.ts +7 -3
- package/src/web/components/visuals/GetStartedConnect.svg +36 -0
- package/src/web/components/visuals/GetStartedFunds.svg +31 -0
- package/src/web/components/visuals/GetStartedPasskey.svg +34 -0
- package/src/web/components/visuals/README.md +15 -0
- package/src/web/index.ts +8 -0
- package/src/web/logos/README.md +1 -1
- package/src/web/vars.ts +20 -9
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as BaseUi from '@base-ui/react/field'
|
|
2
2
|
import { type ComponentPropsWithRef, useRef, useState } from 'react'
|
|
3
3
|
import type * as zyzz from 'zyzz'
|
|
4
|
-
import { style } from '../zyzz.config.js'
|
|
4
|
+
import { style, variants } from '../zyzz.config.js'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Labeled form field. The label sits 12px above the control and the message 12px below it, and a
|
|
8
|
-
* shown error replaces the description.
|
|
8
|
+
* shown error replaces the description. `size="large"` sets the label in the regular weight with
|
|
9
|
+
* its secondary label beside it, sets the messages at 14px, and insets text controls 20px.
|
|
9
10
|
*
|
|
10
11
|
* - Give every control a visible `Field.Label`. Base UI links it to the control.
|
|
11
12
|
* - Base UI adds `Field.Description` and a shown `Field.Error` to the control's `aria-describedby`.
|
|
@@ -44,6 +45,7 @@ export namespace Field {
|
|
|
44
45
|
actionsRef = actions,
|
|
45
46
|
className,
|
|
46
47
|
onInvalidCapture,
|
|
48
|
+
size = 'medium',
|
|
47
49
|
success = false,
|
|
48
50
|
validationMode,
|
|
49
51
|
vars,
|
|
@@ -54,9 +56,10 @@ export namespace Field {
|
|
|
54
56
|
return (
|
|
55
57
|
<BaseUi.Field.Root
|
|
56
58
|
{...attributes}
|
|
57
|
-
{...styles.root({ className, style: props.style, vars })}
|
|
59
|
+
{...styles.root({ className, size, style: props.style, vars })}
|
|
58
60
|
actionsRef={actionsRef}
|
|
59
61
|
data-field=""
|
|
62
|
+
data-field-size={size}
|
|
60
63
|
data-success={success || undefined}
|
|
61
64
|
onInvalidCapture={(event) => {
|
|
62
65
|
onInvalidCapture?.(event)
|
|
@@ -117,8 +120,8 @@ export namespace Field {
|
|
|
117
120
|
}
|
|
118
121
|
|
|
119
122
|
/**
|
|
120
|
-
* Regular-weight text at the end of the label row, such as "Optional".
|
|
121
|
-
* `Field.Label`, so it joins the control's accessible name.
|
|
123
|
+
* Regular-weight text at the end of the label row, such as "Optional". In a large field it follows
|
|
124
|
+
* the label 4px after it. Place it inside `Field.Label`, so it joins the control's accessible name.
|
|
122
125
|
*/
|
|
123
126
|
export function SecondaryLabel(props: SecondaryLabel.Props) {
|
|
124
127
|
const { className, vars, ...attributes } = props
|
|
@@ -137,7 +140,10 @@ export namespace Field {
|
|
|
137
140
|
zyzz.Props.Variants<typeof styles.secondaryLabel>
|
|
138
141
|
}
|
|
139
142
|
|
|
140
|
-
/**
|
|
143
|
+
/**
|
|
144
|
+
* Hint text rendered as a `p`. It fades out while a `Field.Error` is shown. In a large field it
|
|
145
|
+
* takes the tertiary color at 14px.
|
|
146
|
+
*/
|
|
141
147
|
export function Description(props: Description.Props) {
|
|
142
148
|
const { className, vars, ...attributes } = props
|
|
143
149
|
|
|
@@ -221,6 +227,7 @@ namespace styles {
|
|
|
221
227
|
transform: 'translateY(-4px) !custom',
|
|
222
228
|
transitionDuration: '150',
|
|
223
229
|
},
|
|
230
|
+
'[data-field-size="large"] > &': { color: 'content.tertiary', typography: 'body.b2' },
|
|
224
231
|
// An accepted value reads its message in the positive color, as an error does in negative.
|
|
225
232
|
'[data-success] > &': { color: 'content.positive' },
|
|
226
233
|
'[data-disabled] &': { color: 'content.subtle' },
|
|
@@ -247,6 +254,7 @@ namespace styles {
|
|
|
247
254
|
transitionTimingFunction: 'snappy',
|
|
248
255
|
typography: 'body.b3',
|
|
249
256
|
selectors: {
|
|
257
|
+
'[data-field-size="large"] > &': { typography: 'body.b2' },
|
|
250
258
|
'&[data-ending-style]': {
|
|
251
259
|
color: 'content.secondary',
|
|
252
260
|
filter: 'blur(2px) !custom',
|
|
@@ -277,8 +285,15 @@ namespace styles {
|
|
|
277
285
|
{ id: 'tds/web/field/error' },
|
|
278
286
|
)
|
|
279
287
|
|
|
288
|
+
// An option's label takes the regular weight, 12px from its control, as the Platform checkbox
|
|
289
|
+
// draws it.
|
|
280
290
|
export const item = style(
|
|
281
|
-
{
|
|
291
|
+
{
|
|
292
|
+
alignItems: 'center',
|
|
293
|
+
columnGap: '12',
|
|
294
|
+
display: 'flex',
|
|
295
|
+
selectors: { '& > label': { typography: 'body.b2' } },
|
|
296
|
+
},
|
|
282
297
|
{ id: 'tds/web/field/item' },
|
|
283
298
|
)
|
|
284
299
|
|
|
@@ -291,25 +306,40 @@ namespace styles {
|
|
|
291
306
|
typography: 'body.b2Strong',
|
|
292
307
|
selectors: {
|
|
293
308
|
'&:has(> [data-field-secondary])': { columnGap: '8', display: 'flex' },
|
|
309
|
+
'[data-field-size="large"] > &': { typography: 'body.b2' },
|
|
310
|
+
'[data-field-size="large"] > &:has(> [data-field-secondary])': { columnGap: '4' },
|
|
294
311
|
'[data-disabled] &': { color: 'content.tertiary' },
|
|
295
312
|
},
|
|
296
313
|
},
|
|
297
314
|
{ id: 'tds/web/field/label' },
|
|
298
315
|
)
|
|
299
316
|
|
|
300
|
-
export const root =
|
|
317
|
+
export const root = variants(
|
|
301
318
|
{
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
319
|
+
base: {
|
|
320
|
+
// A field stretched by its row keeps label, control and messages together at the top.
|
|
321
|
+
alignContent: 'start',
|
|
322
|
+
display: 'grid',
|
|
323
|
+
gridTemplateColumns: 'minmax(0, 1fr) !custom',
|
|
324
|
+
position: 'relative',
|
|
325
|
+
rowGap: '12',
|
|
326
|
+
selectors: {
|
|
327
|
+
// A list of options reads as one block under its label, so it sits further away than one control.
|
|
328
|
+
'&:has(> [role="radiogroup"], > [role="group"] [role="checkbox"])': { rowGap: '16' },
|
|
329
|
+
// The message of a code sits 8px below its slots, as the Code Input design places it.
|
|
330
|
+
'&:has(> [data-otp-field])': { rowGap: '8' },
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
defaultVariants: { size: 'medium' },
|
|
334
|
+
variants: {
|
|
335
|
+
/**
|
|
336
|
+
* The type of the label and messages, and the inset of text controls. `large` sets the
|
|
337
|
+
* label in the regular weight, the messages at 14px, and the 20px inset of the Platform
|
|
338
|
+
* text input.
|
|
339
|
+
*
|
|
340
|
+
* @default 'medium'
|
|
341
|
+
*/
|
|
342
|
+
size: { large: {}, medium: {} },
|
|
313
343
|
},
|
|
314
344
|
},
|
|
315
345
|
{ id: 'tds/web/field' },
|
|
@@ -321,7 +351,10 @@ namespace styles {
|
|
|
321
351
|
color: 'content.secondary',
|
|
322
352
|
marginInlineStart: 'auto !custom',
|
|
323
353
|
typography: 'body.b2',
|
|
324
|
-
selectors: {
|
|
354
|
+
selectors: {
|
|
355
|
+
'[data-field-size="large"] > label > &': { marginInlineStart: '0' },
|
|
356
|
+
'[data-disabled] &': { color: 'content.tertiary' },
|
|
357
|
+
},
|
|
325
358
|
},
|
|
326
359
|
{ id: 'tds/web/field/secondary-label' },
|
|
327
360
|
)
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An illustration of one get started step, such as connecting an agent or adding funds.
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
import type { ComponentPropsWithRef } from 'react'
|
|
6
|
+
import { useId } from 'react'
|
|
7
|
+
import type * as zyzz from 'zyzz'
|
|
8
|
+
import { variants } from '../zyzz.config.js'
|
|
9
|
+
import { artwork } from './internal/GetStartedArtwork.js'
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A 320 by 160px illustration of one get started step on a dark ground: `connect` links two
|
|
13
|
+
* nodes, `funds` rings a coin with dots, and `passkey` arcs over a key point. The artwork keeps
|
|
14
|
+
* its colors in both color schemes and is hidden from assistive technology.
|
|
15
|
+
*
|
|
16
|
+
* - Place one visual at the top of each get started card, above the title of its step.
|
|
17
|
+
* - Name the step in the text of the card, since the artwork has no text alternative.
|
|
18
|
+
* - Use `Visual` for the top of a modal.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <GetStartedVisual step="funds" />
|
|
22
|
+
*
|
|
23
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/svg | MDN svg element}
|
|
24
|
+
* @see {@link https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html | WCAG 2.2 Non-text Content}
|
|
25
|
+
*/
|
|
26
|
+
export function GetStartedVisual(props: GetStartedVisual.Props) {
|
|
27
|
+
const { className, step, vars, ...attributes } = props
|
|
28
|
+
const id = useId()
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<div {...attributes} {...styles.visual({ className, step, style: props.style, vars })}>
|
|
32
|
+
<svg aria-hidden="true" fill="none" height="160" viewBox="0 0 320 160" width="320">
|
|
33
|
+
{artwork[step ?? 'connect'](id)}
|
|
34
|
+
</svg>
|
|
35
|
+
</div>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export namespace GetStartedVisual {
|
|
40
|
+
export type Props = Omit<ComponentPropsWithRef<'div'>, 'children'> &
|
|
41
|
+
zyzz.Props.Variants<typeof styles.visual>
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
namespace styles {
|
|
45
|
+
// Radius `xs` clips the artwork, which the Figma export draws to the square edge.
|
|
46
|
+
export const visual = variants(
|
|
47
|
+
{
|
|
48
|
+
base: {
|
|
49
|
+
borderRadius: 'xs',
|
|
50
|
+
display: 'flex',
|
|
51
|
+
height: '160',
|
|
52
|
+
justifyContent: 'center',
|
|
53
|
+
overflow: 'hidden',
|
|
54
|
+
width: '320',
|
|
55
|
+
selectors: { '& > svg': { display: 'block', flexShrink: '0 !custom' } },
|
|
56
|
+
},
|
|
57
|
+
defaultVariants: { step: 'connect' },
|
|
58
|
+
/**
|
|
59
|
+
* Get started step that the artwork shows.
|
|
60
|
+
* @default 'connect'
|
|
61
|
+
*/
|
|
62
|
+
variants: { step: { connect: {}, funds: {}, passkey: {} } },
|
|
63
|
+
},
|
|
64
|
+
{ id: 'tds/web/get-started-visual' },
|
|
65
|
+
)
|
|
66
|
+
}
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A dark hero card of animated streaks that follows the steps of an agent or wallet setup flow.
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
import type { ComponentPropsWithRef } from 'react'
|
|
6
|
+
import { createContext, use } from 'react'
|
|
7
|
+
import type * as zyzz from 'zyzz'
|
|
8
|
+
import { style, variants } from '../zyzz.config.js'
|
|
9
|
+
import type { Layer, Streak } from './internal/Streaks.js'
|
|
10
|
+
import { Streaks } from './internal/Streaks.js'
|
|
11
|
+
import { TempoLogo } from './TempoLogo.js'
|
|
12
|
+
|
|
13
|
+
const HeroVisualContext = createContext<{ step: HeroVisual.Step }>({ step: 'connect' })
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A dark 520px card of animated streaks with the Tempo wordmark at the top and a title block at
|
|
17
|
+
* the bottom, beside an agent or wallet setup flow. `step` selects the artwork: each later step
|
|
18
|
+
* adds streaks, which slide in from the start, and fades its layers up. The title stays dim until
|
|
19
|
+
* the `funded`, `secure`, and `wallet-funded` steps, which complete a flow. The card keeps its
|
|
20
|
+
* dark colors in both color schemes and renders its content in the dark scheme.
|
|
21
|
+
*
|
|
22
|
+
* - Place one hero beside the steps of the flow, and advance `step` with them.
|
|
23
|
+
* - Compose `HeroVisual.Caption`, `HeroVisual.Title`, and `HeroVisual.Description` as children.
|
|
24
|
+
* - Use `SuccessHero` for the confirmation after the flow finishes.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* <HeroVisual step="fund">
|
|
28
|
+
* <HeroVisual.Title>Your agent</HeroVisual.Title>
|
|
29
|
+
* <HeroVisual.Description>One command, and it can pay its own way.</HeroVisual.Description>
|
|
30
|
+
* </HeroVisual>
|
|
31
|
+
*
|
|
32
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/svg | MDN svg element}
|
|
33
|
+
* @see {@link https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html | WCAG 2.2 Non-text Content}
|
|
34
|
+
*/
|
|
35
|
+
export function HeroVisual(props: HeroVisual.Props) {
|
|
36
|
+
const { children, className, step = 'connect', vars, ...attributes } = props
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<HeroVisualContext value={{ step }}>
|
|
40
|
+
<div {...attributes} {...styles.hero({ className, style: props.style, vars })}>
|
|
41
|
+
<Streaks height={520} layers={steps[step]} trails={trails} width={500} />
|
|
42
|
+
<TempoLogo {...styles.logo()} />
|
|
43
|
+
<div {...styles.body()}>{children}</div>
|
|
44
|
+
</div>
|
|
45
|
+
</HeroVisualContext>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export namespace HeroVisual {
|
|
50
|
+
export type Props = ComponentPropsWithRef<'div'> &
|
|
51
|
+
zyzz.Props.Variants<typeof styles.hero> & {
|
|
52
|
+
/**
|
|
53
|
+
* Step of the setup flow that the artwork shows. The agent flow runs `connect`, `approve`,
|
|
54
|
+
* `fund`, `funding`, and `funded`, and the wallet flow runs `wallet`, `wallet-funding`,
|
|
55
|
+
* `wallet-funded`, and `secure`.
|
|
56
|
+
* @default 'connect'
|
|
57
|
+
*/
|
|
58
|
+
step?: Step | undefined
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Step of the setup flow that a `HeroVisual` shows. */
|
|
62
|
+
export type Step = keyof typeof steps
|
|
63
|
+
|
|
64
|
+
/** A short label above the title, such as the name of the agent. */
|
|
65
|
+
export function Caption(props: Caption.Props) {
|
|
66
|
+
const { className, vars, ...attributes } = props
|
|
67
|
+
|
|
68
|
+
return <p {...attributes} {...styles.caption({ className, style: props.style, vars })} />
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export namespace Caption {
|
|
72
|
+
export type Props = ComponentPropsWithRef<'p'> & zyzz.Props.Variants<typeof styles.caption>
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** One line of supporting text under the title. */
|
|
76
|
+
export function Description(props: Description.Props) {
|
|
77
|
+
const { className, vars, ...attributes } = props
|
|
78
|
+
|
|
79
|
+
return <p {...attributes} {...styles.description({ className, style: props.style, vars })} />
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export namespace Description {
|
|
83
|
+
export type Props = ComponentPropsWithRef<'p'> & zyzz.Props.Variants<typeof styles.description>
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The display title of the card, rendered as an `h2`. It is dim until the step completes the
|
|
88
|
+
* flow.
|
|
89
|
+
*/
|
|
90
|
+
export function Title(props: Title.Props) {
|
|
91
|
+
const { className, vars, ...attributes } = props
|
|
92
|
+
const { step } = use(HeroVisualContext)
|
|
93
|
+
const complete = step === 'funded' || step === 'secure' || step === 'wallet-funded'
|
|
94
|
+
|
|
95
|
+
return (
|
|
96
|
+
<h2 {...attributes} {...styles.title({ className, complete, style: props.style, vars })} />
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export namespace Title {
|
|
101
|
+
export type Props = ComponentPropsWithRef<'h2'> &
|
|
102
|
+
Omit<zyzz.Props.Variants<typeof styles.title>, 'complete'>
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// The streaks of the Figma Hero Visual, measured from its 500 by 520px frame. Names follow the
|
|
107
|
+
// step that adds each trail.
|
|
108
|
+
const trails = {
|
|
109
|
+
approve: [
|
|
110
|
+
[101.71, 252.26, 271.65, 2, 'orange', 0.48, 0],
|
|
111
|
+
[68.56, 229.65, 296.13, 3, 'orange', 0.43, 0],
|
|
112
|
+
[58.27, 211.83, 203.14, 3, 'orange', 0.57, 0],
|
|
113
|
+
],
|
|
114
|
+
connect: [
|
|
115
|
+
[24.42, 281.45, 217.63, 3, 'white', 0.14, 1],
|
|
116
|
+
[16.26, 337.45, 279.81, 1, 'white', 0.09, 0],
|
|
117
|
+
[121.97, 349, 221.03, 1, 'white', 0.14, 1],
|
|
118
|
+
[152.07, 189, 228.84, 1, 'white', 0.12, 1],
|
|
119
|
+
[18.23, 356.11, 306.72, 2, 'white', 0.15, 2],
|
|
120
|
+
[286.58, 221.35, 290.61, 2, 'white', 0.12, 0],
|
|
121
|
+
[62.17, 322.1, 289.66, 1, 'white', 0.1, 1],
|
|
122
|
+
[130.71, 204.68, 181.84, 2, 'white', 0.16, 0],
|
|
123
|
+
[292.43, 162.92, 274.7, 1, 'white', 0.14, 1],
|
|
124
|
+
[271.35, 336.04, 307.81, 1, 'white', 0.08, 2],
|
|
125
|
+
],
|
|
126
|
+
fund: [
|
|
127
|
+
[101.71, 252.26, 271.65, 2, 'orange', 0.65, 0],
|
|
128
|
+
[68.56, 229.65, 296.13, 3, 'orange', 0.57, 0],
|
|
129
|
+
[58.27, 211.83, 203.14, 3, 'orange', 0.79, 0],
|
|
130
|
+
[97.06, 275.55, 188.45, 1, 'orange', 0.45, 1],
|
|
131
|
+
[206, 237.42, 317.24, 3, 'orange', 0.83, 0],
|
|
132
|
+
[-18.47, 297.89, 251.8, 1, 'orange', 0.52, 1],
|
|
133
|
+
[96.47, 269.57, 221.18, 2, 'orange', 0.49, 0],
|
|
134
|
+
[-25.71, 243.1, 224.17, 1, 'orange', 0.79, 0],
|
|
135
|
+
[284.24, 222.7, 273.13, 1, 'orange', 0.55, 1],
|
|
136
|
+
[34.71, 296.42, 349.44, 3, 'orange', 0.79, 1],
|
|
137
|
+
[267.98, 290.92, 260.36, 1, 'orange', 0.63, 1],
|
|
138
|
+
[53.26, 290.95, 228.05, 2, 'orange', 0.75, 0],
|
|
139
|
+
],
|
|
140
|
+
funded: [
|
|
141
|
+
[-32.49, 305.64, 302.93, 1, 'white', 0.35, 0],
|
|
142
|
+
[255.42, 350.15, 324, 1, 'white', 0.24, 2],
|
|
143
|
+
[245.07, 175.25, 211.2, 1, 'white', 0.41, 0],
|
|
144
|
+
[109.95, 272.23, 321.64, 3, 'white', 0.38, 0],
|
|
145
|
+
[-43.19, 352.64, 314.12, 3, 'sky', 0.44, 2],
|
|
146
|
+
[274.66, 299.14, 201.71, 2, 'sky', 0.2, 1],
|
|
147
|
+
[116.34, 235.13, 209.17, 2, 'sky', 0.49, 1],
|
|
148
|
+
[308.73, 349.18, 248.68, 1, 'sky', 0.23, 0],
|
|
149
|
+
[78.19, 184.86, 198.55, 1, 'sky', 0.21, 2],
|
|
150
|
+
[121.38, 205.67, 235.39, 1, 'white', 0.21, 0],
|
|
151
|
+
[93.15, 298, 301.36, 1, 'sky', 0.24, 2],
|
|
152
|
+
[-40.07, 172.37, 323.87, 1, 'white', 0.2, 1],
|
|
153
|
+
[261.5, 180.56, 258.35, 1, 'blue', 0.35, 0],
|
|
154
|
+
[166.62, 191.33, 338.35, 3, 'sky', 0.21, 0],
|
|
155
|
+
[113.41, 200.63, 341.42, 2, 'white', 0.47, 2],
|
|
156
|
+
[112.84, 287.12, 183.57, 1, 'white', 0.34, 1],
|
|
157
|
+
],
|
|
158
|
+
ignite: [[60, 257.4, 350, 2, 'orange', 0.9, 1]],
|
|
159
|
+
path: [
|
|
160
|
+
[24.42, 281.45, 217.63, 3, 'white', 0.16, 1],
|
|
161
|
+
[16.26, 337.45, 279.81, 1, 'white', 0.1, 0],
|
|
162
|
+
[121.97, 349, 221.03, 1, 'white', 0.16, 1],
|
|
163
|
+
[152.07, 189, 228.84, 1, 'white', 0.13, 1],
|
|
164
|
+
[18.23, 356.11, 306.72, 2, 'white', 0.17, 2],
|
|
165
|
+
[286.58, 221.35, 290.61, 2, 'white', 0.13, 0],
|
|
166
|
+
[62.17, 322.1, 289.66, 1, 'white', 0.11, 1],
|
|
167
|
+
[130.71, 204.68, 181.84, 2, 'white', 0.18, 0],
|
|
168
|
+
[292.43, 162.92, 274.7, 1, 'white', 0.15, 1],
|
|
169
|
+
[271.35, 336.04, 307.81, 1, 'white', 0.09, 2],
|
|
170
|
+
[260.87, 299, 316.81, 3, 'white', 0.13, 0],
|
|
171
|
+
[253.1, 256.65, 333.02, 1, 'white', 0.14, 2],
|
|
172
|
+
[304.34, 269.72, 294.8, 1, 'white', 0.12, 0],
|
|
173
|
+
[178.8, 158.2, 310.22, 2, 'white', 0.14, 2],
|
|
174
|
+
[246.27, 340.55, 348.97, 2, 'white', 0.11, 2],
|
|
175
|
+
[136.54, 297.08, 344.9, 3, 'white', 0.09, 1],
|
|
176
|
+
[134.99, 299.18, 251.2, 1, 'white', 0.17, 1],
|
|
177
|
+
[73.73, 268.74, 261.9, 1, 'white', 0.08, 2],
|
|
178
|
+
],
|
|
179
|
+
secure: [[60, 257.4, 350, 2, 'white', 0.9, 1]],
|
|
180
|
+
wallet: [
|
|
181
|
+
[-6.05, 294.04, 305.77, 3, 'white', 0.45, 1],
|
|
182
|
+
[79.23, 176.11, 278.8, 2, 'white', 0.29, 2],
|
|
183
|
+
[107.5, 294.55, 339.21, 2, 'blue', 0.46, 0],
|
|
184
|
+
[-4.79, 168.69, 190.57, 2, 'blue', 0.35, 2],
|
|
185
|
+
[11.43, 296.69, 250.2, 1, 'sky', 0.49, 2],
|
|
186
|
+
[146.76, 245.44, 181.24, 2, 'sky', 0.5, 2],
|
|
187
|
+
[118.14, 282.36, 223.98, 3, 'white', 0.38, 0],
|
|
188
|
+
[300.5, 172.86, 250.9, 2, 'white', 0.48, 1],
|
|
189
|
+
[-56.46, 235.19, 207.67, 2, 'white', 0.21, 1],
|
|
190
|
+
[-25.28, 313.9, 320.47, 1, 'sky', 0.27, 0],
|
|
191
|
+
[115.89, 279.38, 289.18, 1, 'white', 0.48, 0],
|
|
192
|
+
[105.99, 244.43, 189.39, 2, 'sky', 0.43, 1],
|
|
193
|
+
[5.07, 246.26, 309.63, 1, 'white', 0.31, 1],
|
|
194
|
+
[52.88, 235.77, 280.96, 1, 'blue', 0.33, 0],
|
|
195
|
+
],
|
|
196
|
+
} as const satisfies Record<string, readonly Streak[]>
|
|
197
|
+
|
|
198
|
+
const steps = {
|
|
199
|
+
approve: [
|
|
200
|
+
['path', 14],
|
|
201
|
+
['approve', 3],
|
|
202
|
+
['ignite', 1],
|
|
203
|
+
],
|
|
204
|
+
connect: [['connect', 10]],
|
|
205
|
+
fund: [
|
|
206
|
+
['path', 16],
|
|
207
|
+
['fund', 8],
|
|
208
|
+
],
|
|
209
|
+
funded: [
|
|
210
|
+
['path', 18],
|
|
211
|
+
['fund', 12],
|
|
212
|
+
['funded', 16],
|
|
213
|
+
],
|
|
214
|
+
funding: [
|
|
215
|
+
['path', 18],
|
|
216
|
+
['fund', 10],
|
|
217
|
+
['funded', 8, 0.45],
|
|
218
|
+
],
|
|
219
|
+
secure: [
|
|
220
|
+
['path', 18],
|
|
221
|
+
['wallet', 14, 0.9],
|
|
222
|
+
['secure', 1],
|
|
223
|
+
],
|
|
224
|
+
wallet: [
|
|
225
|
+
['path', 14],
|
|
226
|
+
['wallet', 4, 0.35],
|
|
227
|
+
],
|
|
228
|
+
'wallet-funded': [
|
|
229
|
+
['path', 16],
|
|
230
|
+
['wallet', 12, 0.85],
|
|
231
|
+
],
|
|
232
|
+
'wallet-funding': [
|
|
233
|
+
['path', 16],
|
|
234
|
+
['wallet', 8, 0.55],
|
|
235
|
+
],
|
|
236
|
+
} as const satisfies Record<string, readonly Layer<keyof typeof trails>[]>
|
|
237
|
+
|
|
238
|
+
namespace styles {
|
|
239
|
+
export const body = style(
|
|
240
|
+
{
|
|
241
|
+
display: 'flex',
|
|
242
|
+
flexDirection: 'column',
|
|
243
|
+
marginBlockStart: 'auto !custom',
|
|
244
|
+
position: 'relative',
|
|
245
|
+
rowGap: '8',
|
|
246
|
+
},
|
|
247
|
+
{ id: 'tds/web/hero-visual/body' },
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
// Figma draws the caption at 50% white, which no variable holds.
|
|
251
|
+
export const caption = style(
|
|
252
|
+
{ color: '#ffffff80 !custom', margin: '0', typography: 'body.b3Strong' },
|
|
253
|
+
{ id: 'tds/web/hero-visual/caption' },
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
export const description = style(
|
|
257
|
+
{ color: 'neutral.tint.056', margin: '0', typography: 'body.b2' },
|
|
258
|
+
{ id: 'tds/web/hero-visual/description' },
|
|
259
|
+
)
|
|
260
|
+
|
|
261
|
+
// The card is dark in both schemes, so its content renders in the dark scheme.
|
|
262
|
+
export const hero = style(
|
|
263
|
+
{
|
|
264
|
+
borderRadius: 'sm',
|
|
265
|
+
boxSizing: 'border-box',
|
|
266
|
+
colorScheme: 'dark !custom',
|
|
267
|
+
display: 'flex',
|
|
268
|
+
flexDirection: 'column',
|
|
269
|
+
isolation: 'isolate !custom',
|
|
270
|
+
minHeight: '32.5rem !custom',
|
|
271
|
+
overflow: 'hidden',
|
|
272
|
+
padding: '40',
|
|
273
|
+
position: 'relative',
|
|
274
|
+
},
|
|
275
|
+
{ id: 'tds/web/hero-visual' },
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
// The wordmark sits at 14px tall, where the default logo is 20px.
|
|
279
|
+
export const logo = style(
|
|
280
|
+
{
|
|
281
|
+
color: 'overlay.content.primary',
|
|
282
|
+
height: '0.875rem !custom',
|
|
283
|
+
position: 'relative',
|
|
284
|
+
width: '63.022px !custom',
|
|
285
|
+
},
|
|
286
|
+
{ id: 'tds/web/hero-visual/logo' },
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
// Figma dims the title to 35% white until the flow completes, which no variable holds.
|
|
290
|
+
export const title = variants(
|
|
291
|
+
{
|
|
292
|
+
base: {
|
|
293
|
+
color: '#ffffff59 !custom',
|
|
294
|
+
margin: '0',
|
|
295
|
+
transitionDuration: '320',
|
|
296
|
+
transitionProperty: 'color !custom',
|
|
297
|
+
transitionTimingFunction: 'out',
|
|
298
|
+
typography: 'display.d1',
|
|
299
|
+
},
|
|
300
|
+
variants: { complete: { false: {}, true: { color: 'overlay.content.primary' } } },
|
|
301
|
+
},
|
|
302
|
+
{ id: 'tds/web/hero-visual/title' },
|
|
303
|
+
)
|
|
304
|
+
}
|
|
@@ -134,27 +134,34 @@ namespace styles {
|
|
|
134
134
|
base: {
|
|
135
135
|
alignItems: 'center',
|
|
136
136
|
backgroundColor: 'container.regular',
|
|
137
|
+
border: '1px solid !custom',
|
|
138
|
+
borderColor: 'line.secondary',
|
|
137
139
|
borderRadius: '2xs',
|
|
138
|
-
boxShadow: 'small',
|
|
139
140
|
boxSizing: 'border-box',
|
|
140
141
|
color: 'content.secondary',
|
|
141
142
|
columnGap: '4',
|
|
142
143
|
display: 'inline-flex',
|
|
143
144
|
justifyContent: 'center',
|
|
145
|
+
typography: 'body.b3',
|
|
144
146
|
whiteSpace: 'nowrap',
|
|
145
147
|
},
|
|
146
148
|
defaultVariants: { size: 'medium' },
|
|
147
149
|
variants: {
|
|
148
|
-
//
|
|
150
|
+
// The 1px border sits inside the padding, so each size keeps the width of its Figma key.
|
|
149
151
|
size: {
|
|
150
|
-
large: {
|
|
151
|
-
|
|
152
|
-
height: '
|
|
153
|
-
minWidth: '
|
|
154
|
-
paddingInline: '
|
|
155
|
-
|
|
152
|
+
large: {
|
|
153
|
+
color: 'content.primary',
|
|
154
|
+
height: '32',
|
|
155
|
+
minWidth: '32',
|
|
156
|
+
paddingInline: 'calc(0.75rem - 1px) !custom',
|
|
157
|
+
},
|
|
158
|
+
medium: { height: '24', minWidth: '24', paddingInline: 'calc(0.5rem - 1px) !custom' },
|
|
159
|
+
small: {
|
|
160
|
+
borderRadius: '3xs',
|
|
161
|
+
height: '20',
|
|
162
|
+
minWidth: '20',
|
|
163
|
+
paddingInline: 'calc(0.25rem - 1px) !custom',
|
|
156
164
|
},
|
|
157
|
-
small: { height: '20', minWidth: '20', paddingInline: '4', typography: 'body.b3' },
|
|
158
165
|
},
|
|
159
166
|
},
|
|
160
167
|
},
|