@tempoxyz/ds 0.3.0 → 0.3.2
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/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.d.ts +7 -2
- package/dist/web/components/Alert.d.ts.map +1 -1
- package/dist/web/components/Alert.js +12 -7
- package/dist/web/components/Alert.js.map +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 +128 -2
- package/dist/web/components/AppShell.d.ts.map +1 -1
- package/dist/web/components/AppShell.js +122 -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 +49 -1
- 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.css +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 +82 -12
- package/dist/web/components/Button.d.ts.map +1 -1
- package/dist/web/components/Button.js +6 -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 +2 -1
- 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.css +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 +39 -22
- package/dist/web/components/ListGroup.d.ts.map +1 -1
- package/dist/web/components/ListGroup.js +24 -21
- 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 +2 -2
- 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 +60 -2
- package/dist/web/components/SidebarMenu.d.ts.map +1 -1
- package/dist/web/components/SidebarMenu.js +47 -16
- package/dist/web/components/SidebarMenu.js.map +1 -1
- package/dist/web/components/SidebarMenu.js.zyzz.json +1 -1
- package/dist/web/components/Skeleton.css +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 +86 -0
- package/dist/web/components/Surface.d.ts.map +1 -1
- package/dist/web/components/Surface.js +6 -3
- 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.css +1 -1
- 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 +37 -0
- package/dist/web/components/internal/TabBar.d.ts.map +1 -0
- package/dist/web/components/internal/TabBar.js +30 -0
- package/dist/web/components/internal/TabBar.js.map +1 -0
- package/dist/web/components/internal/Text.d.ts +9 -0
- package/dist/web/components/internal/Text.d.ts.map +1 -0
- package/dist/web/components/internal/Text.js +35 -0
- package/dist/web/components/internal/Text.js.map +1 -0
- 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 +51 -6
- 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 +255 -30
- 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/components/AddressCard.tsx +216 -0
- package/src/web/components/AgentLogo.tsx +1 -1
- package/src/web/components/Alert.tsx +25 -5
- package/src/web/components/AmountInput.tsx +1 -1
- package/src/web/components/AppShell.tsx +383 -22
- package/src/web/components/AssetChip.tsx +4 -1
- package/src/web/components/Avatar.tsx +73 -6
- package/src/web/components/Badge.tsx +43 -5
- package/src/web/components/Button.tsx +78 -21
- 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 +9 -2
- 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 +75 -28
- 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 +4 -1
- package/src/web/components/SidebarMenu.tsx +106 -7
- 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 +107 -1
- 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 +56 -0
- package/src/web/components/internal/Text.ts +39 -0
- 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 +34 -10
|
@@ -52,6 +52,7 @@ export namespace SplitButton {
|
|
|
52
52
|
return (
|
|
53
53
|
<splitContext.Provider value={{ size, variant }}>
|
|
54
54
|
<div
|
|
55
|
+
data-size={size ?? 'medium'}
|
|
55
56
|
data-variant={variant ?? 'primary'}
|
|
56
57
|
role="group"
|
|
57
58
|
{...attributes}
|
|
@@ -63,10 +64,11 @@ export namespace SplitButton {
|
|
|
63
64
|
|
|
64
65
|
export namespace Root {
|
|
65
66
|
export type Props = ComponentPropsWithRef<'div'> &
|
|
66
|
-
zyzz.Props.Variants<typeof styles.root> &
|
|
67
|
-
Pick<Button.Props, 'variant'> & {
|
|
67
|
+
zyzz.Props.Variants<typeof styles.root> & {
|
|
68
68
|
/** Size of both buttons. The 24px `xsmall` pill can't join a trigger, so it is left out. */
|
|
69
69
|
size?: Exclude<Button.Props['size'], 'xsmall'> | undefined
|
|
70
|
+
/** Style of both buttons. The `text` style has no fill to join a trigger, so it is left out. */
|
|
71
|
+
variant?: Exclude<Button.Props['variant'], 'text'> | undefined
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
74
|
|
|
@@ -107,11 +109,16 @@ namespace styles {
|
|
|
107
109
|
// and squircle rather than the circle of an icon button.
|
|
108
110
|
'& > [aria-haspopup]': {
|
|
109
111
|
borderBottomLeftRadius: 'none',
|
|
110
|
-
borderBottomRightRadius: '
|
|
112
|
+
borderBottomRightRadius: 'sm',
|
|
111
113
|
borderTopLeftRadius: 'none',
|
|
112
|
-
borderTopRightRadius: '
|
|
114
|
+
borderTopRightRadius: 'sm',
|
|
113
115
|
cornerShape: 'squircle',
|
|
114
116
|
},
|
|
117
|
+
// A small action rounds at xs, so its trigger does too.
|
|
118
|
+
'&[data-size="small"] > [aria-haspopup]': {
|
|
119
|
+
borderBottomRightRadius: 'xs',
|
|
120
|
+
borderTopRightRadius: 'xs',
|
|
121
|
+
},
|
|
115
122
|
'& > [aria-haspopup] > svg': {
|
|
116
123
|
transitionDuration: '240',
|
|
117
124
|
transitionProperty: 'transform',
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from 'react'
|
|
2
|
+
import type * as zyzz from 'zyzz'
|
|
3
|
+
import { style, variants } from '../zyzz.config.js'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A label led by an 8px dot in the color of its `intent`, rendered as a `span` without a fill. It
|
|
7
|
+
* sets no live region, so a status that changes in place needs one around it.
|
|
8
|
+
*
|
|
9
|
+
* - Keep the label to one or two words that name the status, such as Online or Degraded.
|
|
10
|
+
* - Pick the `intent` from the outcome: `positive` for healthy or live, `warning` for degraded,
|
|
11
|
+
* `negative` for down or failed, and `neutral` for idle or unknown.
|
|
12
|
+
* - Use `StatusChip` where the status needs a filled pill, such as in a table row.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <StatusIndicator intent="positive">Operational</StatusIndicator>
|
|
16
|
+
*
|
|
17
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/span | MDN span element}
|
|
18
|
+
* @see {@link https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html | WCAG 2.2 Use of Color}
|
|
19
|
+
* @see {@link https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html | WCAG 2.2 Status Messages}
|
|
20
|
+
*/
|
|
21
|
+
export function StatusIndicator(props: StatusIndicator.Props) {
|
|
22
|
+
const { children, className, intent, vars, ...attributes } = props
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<span
|
|
26
|
+
{...attributes}
|
|
27
|
+
data-intent={intent ?? 'neutral'}
|
|
28
|
+
{...styles.indicator({ className, intent, style: props.style, vars })}
|
|
29
|
+
>
|
|
30
|
+
{/* The label names the status, so the dot is decorative. */}
|
|
31
|
+
<span aria-hidden="true" data-status-indicator-dot="" {...styles.dot()} />
|
|
32
|
+
{children}
|
|
33
|
+
</span>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export namespace StatusIndicator {
|
|
38
|
+
export type Props = ComponentPropsWithRef<'span'> & zyzz.Props.Variants<typeof styles.indicator>
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
namespace styles {
|
|
42
|
+
export const dot = style(
|
|
43
|
+
{
|
|
44
|
+
borderRadius: 'full',
|
|
45
|
+
cornerShape: 'round',
|
|
46
|
+
flexShrink: '0 !custom',
|
|
47
|
+
height: '8',
|
|
48
|
+
width: '8',
|
|
49
|
+
},
|
|
50
|
+
{ id: 'tds/web/status-indicator/dot' },
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
// The label stays secondary at every intent, and the dot takes the intent color.
|
|
54
|
+
export const indicator = variants(
|
|
55
|
+
{
|
|
56
|
+
base: {
|
|
57
|
+
alignItems: 'center',
|
|
58
|
+
color: 'content.secondary',
|
|
59
|
+
columnGap: '8',
|
|
60
|
+
display: 'inline-flex',
|
|
61
|
+
height: '24',
|
|
62
|
+
typography: 'body.b3',
|
|
63
|
+
verticalAlign: 'middle',
|
|
64
|
+
whiteSpace: 'nowrap',
|
|
65
|
+
},
|
|
66
|
+
defaultVariants: { intent: 'neutral' },
|
|
67
|
+
variants: {
|
|
68
|
+
intent: {
|
|
69
|
+
negative: {
|
|
70
|
+
selectors: {
|
|
71
|
+
'& > [data-status-indicator-dot]': { backgroundColor: 'content.negative' },
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
neutral: {
|
|
75
|
+
selectors: {
|
|
76
|
+
'& > [data-status-indicator-dot]': { backgroundColor: 'content.secondary' },
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
positive: {
|
|
80
|
+
selectors: {
|
|
81
|
+
'& > [data-status-indicator-dot]': { backgroundColor: 'content.positive' },
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
warning: {
|
|
85
|
+
selectors: {
|
|
86
|
+
'& > [data-status-indicator-dot]': { backgroundColor: 'content.warning' },
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
{ id: 'tds/web/status-indicator' },
|
|
93
|
+
)
|
|
94
|
+
}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The dark confirmation card that closes an agent or wallet setup flow, with animated streaks
|
|
3
|
+
* behind a title block and an action.
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import type { ComponentPropsWithRef } from 'react'
|
|
7
|
+
import type * as zyzz from 'zyzz'
|
|
8
|
+
import { style } from '../zyzz.config.js'
|
|
9
|
+
import type { Layer, Streak } from './internal/Streaks.js'
|
|
10
|
+
import { Streaks } from './internal/Streaks.js'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* A dark 520px confirmation card for the end of a setup flow. Streaks slide in behind a bottom row
|
|
14
|
+
* of a `SuccessHero.Body` and an action, such as a `Button`. `flow` selects the artwork of the
|
|
15
|
+
* agent or wallet flow. The card keeps its dark colors in both color schemes and renders its
|
|
16
|
+
* content in the dark scheme, so a default `Button` fills light.
|
|
17
|
+
*
|
|
18
|
+
* - Show it once, after the flow funds the agent or wallet, in place of the steps.
|
|
19
|
+
* - Lead with a caption that names what finished, and keep the title to a short sentence.
|
|
20
|
+
* - Use `HeroVisual` beside the steps while the flow runs.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <SuccessHero flow="agent">
|
|
24
|
+
* <SuccessHero.Body>
|
|
25
|
+
* <SuccessHero.Caption>CLAUDE · FUNDED</SuccessHero.Caption>
|
|
26
|
+
* <SuccessHero.Title>You’re ready to go.</SuccessHero.Title>
|
|
27
|
+
* <SuccessHero.Description>$10.00 for Claude to spend.</SuccessHero.Description>
|
|
28
|
+
* </SuccessHero.Body>
|
|
29
|
+
* <Button size="large">Done</Button>
|
|
30
|
+
* </SuccessHero>
|
|
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 SuccessHero(props: SuccessHero.Props) {
|
|
36
|
+
const { children, className, flow = 'agent', vars, ...attributes } = props
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<div {...attributes} {...styles.hero({ className, style: props.style, vars })}>
|
|
40
|
+
<Streaks height={520} layers={flows[flow]} trails={trails} width={1056} />
|
|
41
|
+
<div {...styles.content()}>{children}</div>
|
|
42
|
+
</div>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export namespace SuccessHero {
|
|
47
|
+
export type Props = ComponentPropsWithRef<'div'> &
|
|
48
|
+
zyzz.Props.Variants<typeof styles.hero> & {
|
|
49
|
+
/**
|
|
50
|
+
* Setup flow that the card confirms. `agent` adds the orange trails of the agent.
|
|
51
|
+
* @default 'agent'
|
|
52
|
+
*/
|
|
53
|
+
flow?: keyof typeof flows | undefined
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Stacks the caption, title, and description at the start of the bottom row. */
|
|
57
|
+
export function Body(props: Body.Props) {
|
|
58
|
+
const { className, vars, ...attributes } = props
|
|
59
|
+
|
|
60
|
+
return <div {...attributes} {...styles.body({ className, style: props.style, vars })} />
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export namespace Body {
|
|
64
|
+
export type Props = ComponentPropsWithRef<'div'> & zyzz.Props.Variants<typeof styles.body>
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** A short label above the title that names what finished, such as the funded agent. */
|
|
68
|
+
export function Caption(props: Caption.Props) {
|
|
69
|
+
const { className, vars, ...attributes } = props
|
|
70
|
+
|
|
71
|
+
return <p {...attributes} {...styles.caption({ className, style: props.style, vars })} />
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export namespace Caption {
|
|
75
|
+
export type Props = ComponentPropsWithRef<'p'> & zyzz.Props.Variants<typeof styles.caption>
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** One line of detail under the title, such as the amount and its expiry. */
|
|
79
|
+
export function Description(props: Description.Props) {
|
|
80
|
+
const { className, vars, ...attributes } = props
|
|
81
|
+
|
|
82
|
+
return <p {...attributes} {...styles.description({ className, style: props.style, vars })} />
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export namespace Description {
|
|
86
|
+
export type Props = ComponentPropsWithRef<'p'> & zyzz.Props.Variants<typeof styles.description>
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** The display title of the card, rendered as an `h2`. */
|
|
90
|
+
export function Title(props: Title.Props) {
|
|
91
|
+
const { className, vars, ...attributes } = props
|
|
92
|
+
|
|
93
|
+
return <h2 {...attributes} {...styles.title({ className, style: props.style, vars })} />
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export namespace Title {
|
|
97
|
+
export type Props = ComponentPropsWithRef<'h2'> & zyzz.Props.Variants<typeof styles.title>
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// The streaks of the Figma Success Hero, measured from its 1056 by 520px frame.
|
|
102
|
+
const trails = {
|
|
103
|
+
agent: [
|
|
104
|
+
[214.81, 252.26, 573.73, 2, 'orange', 0.65, 0],
|
|
105
|
+
[144.8, 229.65, 625.43, 3, 'orange', 0.57, 0],
|
|
106
|
+
[123.05, 211.83, 429.03, 3, 'orange', 0.79, 0],
|
|
107
|
+
[204.99, 275.55, 398, 1, 'orange', 0.45, 1],
|
|
108
|
+
[435.07, 237.42, 670.01, 3, 'orange', 0.83, 0],
|
|
109
|
+
[-39.01, 297.89, 531.81, 1, 'orange', 0.52, 1],
|
|
110
|
+
[203.75, 269.57, 467.14, 2, 'orange', 0.49, 0],
|
|
111
|
+
[-54.29, 243.1, 473.44, 1, 'orange', 0.79, 0],
|
|
112
|
+
[600.32, 222.7, 576.86, 1, 'orange', 0.55, 1],
|
|
113
|
+
[73.3, 296.42, 738.02, 3, 'orange', 0.79, 1],
|
|
114
|
+
[565.98, 290.92, 549.88, 1, 'orange', 0.63, 1],
|
|
115
|
+
[112.48, 290.95, 481.65, 2, 'orange', 0.75, 0],
|
|
116
|
+
],
|
|
117
|
+
agentSpark: [
|
|
118
|
+
[-107.41, 288.32, 619.07, 2, 'orange', 0.95, 2],
|
|
119
|
+
[492.26, 250.81, 605.29, 2, 'orange', 0.7, 0],
|
|
120
|
+
[552.7, 272.69, 614.22, 1, 'orange', 0.88, 2],
|
|
121
|
+
[724.14, 261.81, 562.64, 2, 'orange', 0.9, 0],
|
|
122
|
+
[489.05, 252.08, 567.95, 1, 'orange', 0.88, 0],
|
|
123
|
+
[185.83, 244.76, 648.01, 2, 'orange', 0.94, 1],
|
|
124
|
+
],
|
|
125
|
+
agentTrail: [
|
|
126
|
+
[-68.62, 305.64, 639.78, 1, 'white', 0.35, 0],
|
|
127
|
+
[539.45, 350.15, 684.28, 1, 'white', 0.24, 2],
|
|
128
|
+
[517.58, 175.25, 446.06, 1, 'white', 0.41, 0],
|
|
129
|
+
[232.22, 272.23, 679.31, 3, 'white', 0.38, 0],
|
|
130
|
+
[-91.22, 352.64, 663.42, 3, 'sky', 0.44, 2],
|
|
131
|
+
[580.08, 299.14, 426, 2, 'sky', 0.2, 1],
|
|
132
|
+
[245.71, 235.13, 441.76, 2, 'sky', 0.49, 1],
|
|
133
|
+
[652.04, 349.18, 525.21, 1, 'sky', 0.23, 0],
|
|
134
|
+
[165.13, 184.86, 419.33, 1, 'sky', 0.21, 2],
|
|
135
|
+
[256.36, 205.67, 497.14, 1, 'white', 0.21, 0],
|
|
136
|
+
[196.73, 298, 636.47, 1, 'sky', 0.24, 2],
|
|
137
|
+
[-84.62, 172.37, 684, 1, 'white', 0.2, 1],
|
|
138
|
+
[552.28, 180.56, 545.63, 1, 'blue', 0.35, 0],
|
|
139
|
+
[351.9, 191.33, 714.6, 3, 'sky', 0.21, 0],
|
|
140
|
+
[239.51, 200.63, 721.09, 2, 'white', 0.47, 2],
|
|
141
|
+
[238.33, 287.12, 387.71, 1, 'white', 0.34, 1],
|
|
142
|
+
],
|
|
143
|
+
path: [
|
|
144
|
+
[51.57, 281.45, 459.64, 3, 'white', 0.16, 1],
|
|
145
|
+
[34.35, 337.45, 590.96, 1, 'white', 0.1, 0],
|
|
146
|
+
[257.61, 349, 466.81, 1, 'white', 0.16, 1],
|
|
147
|
+
[321.17, 189, 483.3, 1, 'white', 0.13, 1],
|
|
148
|
+
[38.51, 356.11, 647.79, 2, 'white', 0.17, 2],
|
|
149
|
+
[605.26, 221.35, 613.76, 2, 'white', 0.13, 0],
|
|
150
|
+
[131.29, 322.1, 611.77, 1, 'white', 0.11, 1],
|
|
151
|
+
[276.07, 204.68, 384.04, 2, 'white', 0.18, 0],
|
|
152
|
+
[617.62, 162.92, 580.16, 1, 'white', 0.15, 1],
|
|
153
|
+
[573.09, 336.04, 650.09, 1, 'white', 0.09, 2],
|
|
154
|
+
[550.96, 299, 669.11, 3, 'white', 0.13, 0],
|
|
155
|
+
[534.54, 256.65, 703.33, 1, 'white', 0.14, 2],
|
|
156
|
+
[642.76, 269.72, 622.62, 1, 'white', 0.12, 0],
|
|
157
|
+
[377.62, 158.2, 655.19, 2, 'white', 0.14, 2],
|
|
158
|
+
[520.13, 340.55, 737.02, 2, 'white', 0.11, 2],
|
|
159
|
+
[288.36, 297.08, 728.44, 3, 'white', 0.09, 1],
|
|
160
|
+
[285.11, 299.18, 530.54, 1, 'white', 0.17, 1],
|
|
161
|
+
[155.72, 268.74, 553.14, 1, 'white', 0.08, 2],
|
|
162
|
+
],
|
|
163
|
+
wallet: [
|
|
164
|
+
[-12.78, 294.04, 645.79, 3, 'white', 0.45, 1],
|
|
165
|
+
[167.32, 176.11, 588.83, 2, 'white', 0.29, 2],
|
|
166
|
+
[227.04, 294.55, 716.4, 2, 'blue', 0.46, 0],
|
|
167
|
+
[-10.11, 168.69, 402.48, 2, 'blue', 0.35, 2],
|
|
168
|
+
[24.14, 296.69, 528.42, 1, 'sky', 0.49, 2],
|
|
169
|
+
[309.96, 245.44, 382.78, 2, 'sky', 0.5, 2],
|
|
170
|
+
[249.52, 282.36, 473.05, 3, 'white', 0.38, 0],
|
|
171
|
+
[634.65, 172.86, 529.91, 2, 'white', 0.48, 1],
|
|
172
|
+
[-119.23, 235.19, 438.61, 2, 'white', 0.21, 1],
|
|
173
|
+
[-53.39, 313.9, 676.84, 1, 'sky', 0.27, 0],
|
|
174
|
+
[244.77, 279.38, 610.74, 1, 'white', 0.48, 0],
|
|
175
|
+
[223.86, 244.43, 400, 2, 'sky', 0.43, 1],
|
|
176
|
+
[10.71, 246.26, 653.95, 1, 'white', 0.31, 1],
|
|
177
|
+
[111.68, 235.77, 593.39, 1, 'blue', 0.33, 0],
|
|
178
|
+
[80.56, 252.4, 560.4, 1, 'blue', 0.5, 1],
|
|
179
|
+
[685.46, 299.39, 585.79, 1, 'white', 0.41, 2],
|
|
180
|
+
[144.52, 251.39, 467.95, 2, 'sky', 0.24, 2],
|
|
181
|
+
[304.95, 182.11, 390.92, 1, 'sky', 0.4, 2],
|
|
182
|
+
],
|
|
183
|
+
} as const satisfies Record<string, readonly Streak[]>
|
|
184
|
+
|
|
185
|
+
const flows = {
|
|
186
|
+
agent: [
|
|
187
|
+
['path', 18],
|
|
188
|
+
['agent', 12],
|
|
189
|
+
['agentTrail', 16],
|
|
190
|
+
['agentSpark', 6],
|
|
191
|
+
],
|
|
192
|
+
wallet: [
|
|
193
|
+
['path', 18],
|
|
194
|
+
['wallet', 18],
|
|
195
|
+
],
|
|
196
|
+
} as const satisfies Record<string, readonly Layer<keyof typeof trails>[]>
|
|
197
|
+
|
|
198
|
+
namespace styles {
|
|
199
|
+
export const body = style(
|
|
200
|
+
{ display: 'flex', flexDirection: 'column', minWidth: '0', rowGap: '12' },
|
|
201
|
+
{ id: 'tds/web/success-hero/body' },
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
// Figma draws the caption at 50% white, which no variable holds.
|
|
205
|
+
export const caption = style(
|
|
206
|
+
{ color: '#ffffff80 !custom', margin: '0', typography: 'body.b3Strong' },
|
|
207
|
+
{ id: 'tds/web/success-hero/caption' },
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
export const content = style(
|
|
211
|
+
{
|
|
212
|
+
alignItems: 'flex-end',
|
|
213
|
+
columnGap: '32',
|
|
214
|
+
display: 'flex',
|
|
215
|
+
justifyContent: 'space-between',
|
|
216
|
+
marginBlockStart: 'auto !custom',
|
|
217
|
+
position: 'relative',
|
|
218
|
+
},
|
|
219
|
+
{ id: 'tds/web/success-hero/content' },
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
// Figma draws the description at 60% white, which no variable holds.
|
|
223
|
+
export const description = style(
|
|
224
|
+
{ color: '#ffffff99 !custom', margin: '0', typography: 'body.b2' },
|
|
225
|
+
{ id: 'tds/web/success-hero/description' },
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
// The card is dark in both schemes, so its content renders in the dark scheme.
|
|
229
|
+
export const hero = style(
|
|
230
|
+
{
|
|
231
|
+
borderRadius: 'sm',
|
|
232
|
+
boxSizing: 'border-box',
|
|
233
|
+
colorScheme: 'dark !custom',
|
|
234
|
+
display: 'flex',
|
|
235
|
+
flexDirection: 'column',
|
|
236
|
+
isolation: 'isolate !custom',
|
|
237
|
+
minHeight: '32.5rem !custom',
|
|
238
|
+
overflow: 'hidden',
|
|
239
|
+
padding: '48',
|
|
240
|
+
position: 'relative',
|
|
241
|
+
},
|
|
242
|
+
{ id: 'tds/web/success-hero' },
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
export const title = style(
|
|
246
|
+
{ color: 'overlay.content.primary', margin: '0', typography: 'display.d1' },
|
|
247
|
+
{ id: 'tds/web/success-hero/title' },
|
|
248
|
+
)
|
|
249
|
+
}
|
|
@@ -13,6 +13,9 @@ import { variants, vars } from '../zyzz.config.js'
|
|
|
13
13
|
* - A pressable surface should hold no other interactive controls, since nested targets conflict.
|
|
14
14
|
* - A direct child `table` bleeds 12px into the padding at the sides and the bottom, as rows pad
|
|
15
15
|
* their cells, so its text stays on the content edge. The surface draws no border around it.
|
|
16
|
+
* - A direct child `plain` `ListGroup` bleeds into the padding, so a hover fill reaches the edges.
|
|
17
|
+
* Each row is 44px, pads its sides by the surface's padding, and shares the height of the
|
|
18
|
+
* tallest row.
|
|
16
19
|
*
|
|
17
20
|
* @example
|
|
18
21
|
* <Surface>
|
|
@@ -62,7 +65,13 @@ export namespace Surface {
|
|
|
62
65
|
export function Header(props: Header.Props) {
|
|
63
66
|
const { className, vars, ...attributes } = props
|
|
64
67
|
|
|
65
|
-
return
|
|
68
|
+
return (
|
|
69
|
+
<div
|
|
70
|
+
{...attributes}
|
|
71
|
+
data-surface-header=""
|
|
72
|
+
{...styles.header({ className, style: props.style, vars })}
|
|
73
|
+
/>
|
|
74
|
+
)
|
|
66
75
|
}
|
|
67
76
|
|
|
68
77
|
export namespace Header {
|
|
@@ -226,6 +235,40 @@ namespace styles {
|
|
|
226
235
|
// table clips rather than hides its overflow, so a sticky header still sticks to the
|
|
227
236
|
// scrolling ancestor. The surface draws no border around the rows.
|
|
228
237
|
'&:has(> table)': { borderStyle: 'none', overflow: 'clip !custom' },
|
|
238
|
+
// Every row takes the height of the tallest, such as a row that holds a 48px field. The
|
|
239
|
+
// column can shrink below a row's content, so a long value truncates inside the surface.
|
|
240
|
+
'& > [data-list-group][data-variant="plain"]': {
|
|
241
|
+
display: 'grid',
|
|
242
|
+
gridAutoRows: '1fr !custom',
|
|
243
|
+
gridTemplateColumns: 'minmax(0, 1fr) !custom',
|
|
244
|
+
},
|
|
245
|
+
// Rows are 44px, with 4px above and below a 32px control. Their fills stay square, except
|
|
246
|
+
// at the surface's corners, where each size rounds them inside the border.
|
|
247
|
+
'& > [data-list-group][data-variant="plain"] > [data-divider]': {
|
|
248
|
+
borderRadius: 'none',
|
|
249
|
+
minHeight: '44',
|
|
250
|
+
paddingBlock: '4',
|
|
251
|
+
},
|
|
252
|
+
// A row of a title over a description, or of a meter, keeps its own block padding.
|
|
253
|
+
'& > [data-list-group][data-variant="plain"] > [data-divider]:has([data-info])': {
|
|
254
|
+
paddingBlock: '12',
|
|
255
|
+
},
|
|
256
|
+
'& > [data-list-group][data-variant="plain"] > [data-divider]:has([role="meter"])': {
|
|
257
|
+
paddingBlock: '10',
|
|
258
|
+
},
|
|
259
|
+
// The rows already reach the surface's edges, so their highlight fills the row without a
|
|
260
|
+
// bleed and follows its corners.
|
|
261
|
+
'& > [data-list-group][data-variant="plain"] > [data-divider]::after': {
|
|
262
|
+
borderRadius: 'inherit !custom',
|
|
263
|
+
insetInline: '0',
|
|
264
|
+
},
|
|
265
|
+
// After a header, the list rises by the 14px above the text of a one-line row, so the
|
|
266
|
+
// text keeps the header's 20px gap. After other content, the list keeps its place, so its
|
|
267
|
+
// fills never cover that content.
|
|
268
|
+
'& > [data-surface-header] + [data-list-group][data-variant="plain"]:has(> [data-divider])':
|
|
269
|
+
{
|
|
270
|
+
marginBlockStart: 'calc((1rem - 2.75rem) / 2) !custom',
|
|
271
|
+
},
|
|
229
272
|
// A table bleeds by the 12px that its rows pad their edge cells, so the rows sit 12px
|
|
230
273
|
// inside the padding and their text on the content edge.
|
|
231
274
|
'& > table': {
|
|
@@ -267,12 +310,35 @@ namespace styles {
|
|
|
267
310
|
variants: {
|
|
268
311
|
// Each size pads by its own radius, and they scale together. A direct child table with a
|
|
269
312
|
// header bleeds into the top padding, and its header cells take back exactly the padding.
|
|
313
|
+
// A direct child list bleeds into the padding at the sides, and above and below it at the
|
|
314
|
+
// surface's edges once it holds a row, so an empty list keeps the padding. Its rows take
|
|
315
|
+
// back the padding at the sides.
|
|
270
316
|
size: {
|
|
271
317
|
large: {
|
|
272
318
|
borderRadius: 'md',
|
|
273
319
|
padding: '24',
|
|
274
320
|
selectors: {
|
|
275
321
|
'& > table:first-child:has(> thead)': { marginBlockStart: '-24' },
|
|
322
|
+
'& > [data-list-group][data-variant="plain"]': { marginInline: '-24' },
|
|
323
|
+
'& > [data-list-group][data-variant="plain"]:first-child:has(> [data-divider])': {
|
|
324
|
+
marginBlockStart: '-24',
|
|
325
|
+
},
|
|
326
|
+
'& > [data-list-group][data-variant="plain"]:last-child:has(> [data-divider])': {
|
|
327
|
+
marginBlockEnd: '-24',
|
|
328
|
+
},
|
|
329
|
+
'& > [data-list-group][data-variant="plain"]:first-child > [data-divider]:first-child':
|
|
330
|
+
{
|
|
331
|
+
borderStartEndRadius: `calc(${vars.radius.md} - 1px) !custom`,
|
|
332
|
+
borderStartStartRadius: `calc(${vars.radius.md} - 1px) !custom`,
|
|
333
|
+
},
|
|
334
|
+
'& > [data-list-group][data-variant="plain"]:last-child > [data-divider]:last-child':
|
|
335
|
+
{
|
|
336
|
+
borderEndEndRadius: `calc(${vars.radius.md} - 1px) !custom`,
|
|
337
|
+
borderEndStartRadius: `calc(${vars.radius.md} - 1px) !custom`,
|
|
338
|
+
},
|
|
339
|
+
'& > [data-list-group][data-variant="plain"] > [data-divider]': {
|
|
340
|
+
paddingInline: '24',
|
|
341
|
+
},
|
|
276
342
|
'& > table:first-child > thead > tr:first-child > th': {
|
|
277
343
|
paddingBlockStart: '24',
|
|
278
344
|
},
|
|
@@ -283,6 +349,26 @@ namespace styles {
|
|
|
283
349
|
padding: '16',
|
|
284
350
|
selectors: {
|
|
285
351
|
'& > table:first-child:has(> thead)': { marginBlockStart: '-16' },
|
|
352
|
+
'& > [data-list-group][data-variant="plain"]': { marginInline: '-16' },
|
|
353
|
+
'& > [data-list-group][data-variant="plain"]:first-child:has(> [data-divider])': {
|
|
354
|
+
marginBlockStart: '-16',
|
|
355
|
+
},
|
|
356
|
+
'& > [data-list-group][data-variant="plain"]:last-child:has(> [data-divider])': {
|
|
357
|
+
marginBlockEnd: '-16',
|
|
358
|
+
},
|
|
359
|
+
'& > [data-list-group][data-variant="plain"]:first-child > [data-divider]:first-child':
|
|
360
|
+
{
|
|
361
|
+
borderStartEndRadius: `calc(${vars.radius.sm} - 1px) !custom`,
|
|
362
|
+
borderStartStartRadius: `calc(${vars.radius.sm} - 1px) !custom`,
|
|
363
|
+
},
|
|
364
|
+
'& > [data-list-group][data-variant="plain"]:last-child > [data-divider]:last-child':
|
|
365
|
+
{
|
|
366
|
+
borderEndEndRadius: `calc(${vars.radius.sm} - 1px) !custom`,
|
|
367
|
+
borderEndStartRadius: `calc(${vars.radius.sm} - 1px) !custom`,
|
|
368
|
+
},
|
|
369
|
+
'& > [data-list-group][data-variant="plain"] > [data-divider]': {
|
|
370
|
+
paddingInline: '16',
|
|
371
|
+
},
|
|
286
372
|
'& > table:first-child > thead > tr:first-child > th': {
|
|
287
373
|
paddingBlockStart: '16',
|
|
288
374
|
},
|
|
@@ -293,6 +379,26 @@ namespace styles {
|
|
|
293
379
|
padding: '12',
|
|
294
380
|
selectors: {
|
|
295
381
|
'& > table:first-child:has(> thead)': { marginBlockStart: '-12' },
|
|
382
|
+
'& > [data-list-group][data-variant="plain"]': { marginInline: '-12' },
|
|
383
|
+
'& > [data-list-group][data-variant="plain"]:first-child:has(> [data-divider])': {
|
|
384
|
+
marginBlockStart: '-12',
|
|
385
|
+
},
|
|
386
|
+
'& > [data-list-group][data-variant="plain"]:last-child:has(> [data-divider])': {
|
|
387
|
+
marginBlockEnd: '-12',
|
|
388
|
+
},
|
|
389
|
+
'& > [data-list-group][data-variant="plain"]:first-child > [data-divider]:first-child':
|
|
390
|
+
{
|
|
391
|
+
borderStartEndRadius: `calc(${vars.radius.xs} - 1px) !custom`,
|
|
392
|
+
borderStartStartRadius: `calc(${vars.radius.xs} - 1px) !custom`,
|
|
393
|
+
},
|
|
394
|
+
'& > [data-list-group][data-variant="plain"]:last-child > [data-divider]:last-child':
|
|
395
|
+
{
|
|
396
|
+
borderEndEndRadius: `calc(${vars.radius.xs} - 1px) !custom`,
|
|
397
|
+
borderEndStartRadius: `calc(${vars.radius.xs} - 1px) !custom`,
|
|
398
|
+
},
|
|
399
|
+
'& > [data-list-group][data-variant="plain"] > [data-divider]': {
|
|
400
|
+
paddingInline: '12',
|
|
401
|
+
},
|
|
296
402
|
'& > table:first-child > thead > tr:first-child > th': {
|
|
297
403
|
paddingBlockStart: '12',
|
|
298
404
|
},
|
|
@@ -76,40 +76,33 @@ export namespace Switch {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
namespace styles {
|
|
79
|
+
// The thumb is a pill, 16px wider than tall at medium, as the Platform switch draws it.
|
|
79
80
|
export const thumb = style(
|
|
80
81
|
{
|
|
81
|
-
backgroundColor: '
|
|
82
|
+
backgroundColor: 'inverse.content.primary',
|
|
82
83
|
borderRadius: 'full',
|
|
83
|
-
boxShadow: 'small',
|
|
84
84
|
cornerShape: 'round',
|
|
85
85
|
flexShrink: '0 !custom',
|
|
86
|
-
height: '
|
|
86
|
+
height: '20',
|
|
87
87
|
// The thumb stretches its width while pressed, which a transform would distort.
|
|
88
88
|
transitionDuration: '240',
|
|
89
|
-
transitionProperty: 'background-color,
|
|
89
|
+
transitionProperty: 'background-color, translate, width',
|
|
90
90
|
transitionTimingFunction: 'overshoot',
|
|
91
|
-
width: '
|
|
91
|
+
width: '36',
|
|
92
92
|
selectors: {
|
|
93
|
-
'&[data-checked]': {
|
|
94
|
-
|
|
95
|
-
boxShadow: 'none !custom',
|
|
96
|
-
translate: '22px 0 !custom',
|
|
97
|
-
},
|
|
98
|
-
'[data-size="large"] > &': { height: '32', width: '32' },
|
|
93
|
+
'&[data-checked]': { translate: '20' },
|
|
94
|
+
'[data-size="large"] > &': { height: '32', width: '56' },
|
|
99
95
|
'[data-size="large"] > &[data-checked]': { translate: '32' },
|
|
100
|
-
'[data-size="large"]:active:not([data-disabled]) > &': { width: '
|
|
96
|
+
'[data-size="large"]:active:not([data-disabled]) > &': { width: '60px !custom' },
|
|
101
97
|
'[data-size="large"]:active:not([data-disabled]) > &[data-checked]': { translate: '28' },
|
|
102
|
-
'[data-size="medium"]:active:not([data-disabled]) > &': { width: '
|
|
103
|
-
'[data-size="medium"]:active:not([data-disabled]) > &[data-checked]': {
|
|
104
|
-
translate: '16px 0 !custom',
|
|
105
|
-
},
|
|
106
|
-
'[data-size="small"] > &': { height: '20', width: '20' },
|
|
98
|
+
'[data-size="medium"]:active:not([data-disabled]) > &': { width: '40' },
|
|
99
|
+
'[data-size="medium"]:active:not([data-disabled]) > &[data-checked]': { translate: '16' },
|
|
107
100
|
'[data-size="small"] > &[data-checked]': { translate: '16' },
|
|
108
|
-
'[data-size="small"]:active:not([data-disabled]) > &': { width: '
|
|
101
|
+
'[data-size="small"]:active:not([data-disabled]) > &': { width: '40' },
|
|
109
102
|
'[data-size="small"]:active:not([data-disabled]) > &[data-checked]': { translate: '12' },
|
|
110
103
|
},
|
|
111
104
|
'@media (prefers-reduced-motion: reduce)': {
|
|
112
|
-
transitionProperty: 'background-color
|
|
105
|
+
transitionProperty: 'background-color',
|
|
113
106
|
},
|
|
114
107
|
},
|
|
115
108
|
{ id: 'tds/web/switch/thumb' },
|
|
@@ -138,7 +131,7 @@ namespace styles {
|
|
|
138
131
|
'&::after': { content: '"" !custom', inset: '-8', position: 'absolute' },
|
|
139
132
|
'&:focus-visible': { outlineColor: 'border.focus', outlineOffset: '2' },
|
|
140
133
|
'&:hover:not([data-disabled]):not([data-checked])': { backgroundColor: 'line.primary' },
|
|
141
|
-
'&[data-checked]': { backgroundColor: 'content.
|
|
134
|
+
'&[data-checked]': { backgroundColor: 'content.accent' },
|
|
142
135
|
'&[data-checked]:hover:not([data-disabled])': { opacity: 'hover' },
|
|
143
136
|
'&[data-disabled]': { cursor: 'default', opacity: 'disabled' },
|
|
144
137
|
'&[data-invalid]': {
|
|
@@ -153,12 +146,12 @@ namespace styles {
|
|
|
153
146
|
},
|
|
154
147
|
defaultVariants: { size: 'medium' },
|
|
155
148
|
variants: {
|
|
149
|
+
// The padding, thumb width, checked translation and padding of each size add up to the
|
|
150
|
+
// track width. Medium is the 64 by 28px Platform switch.
|
|
156
151
|
size: {
|
|
157
|
-
large: { height: '40', padding: '4', width: '
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
medium: { height: '30px !custom', padding: '3px !custom', width: '52px !custom' },
|
|
161
|
-
small: { height: '24', padding: '2', width: '40' },
|
|
152
|
+
large: { height: '40', padding: '4', width: '96px !custom' },
|
|
153
|
+
medium: { height: '28', padding: '4', width: '64' },
|
|
154
|
+
small: { height: '24', padding: '2', width: '56' },
|
|
162
155
|
},
|
|
163
156
|
},
|
|
164
157
|
},
|