@tempoxyz/ds 0.3.1 → 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.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 +25 -3
- 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 +125 -15
- 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/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 +14 -3
|
@@ -4,13 +4,15 @@ import type * as zyzz from 'zyzz'
|
|
|
4
4
|
import { style, variants, vars } from '../zyzz.config.js'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* An underlined `role="tablist"` that switches between `role="tabpanel"` views, built on
|
|
8
|
-
* Tabs. Arrow keys move focus between tabs and wrap at the ends. Enter or Space activates the
|
|
7
|
+
* An underlined or pill `role="tablist"` that switches between `role="tabpanel"` views, built on
|
|
8
|
+
* Base UI Tabs. Arrow keys move focus between tabs and wrap at the ends. Enter or Space activates the
|
|
9
9
|
* focused tab unless `activateOnFocus` is set on `List`.
|
|
10
10
|
*
|
|
11
11
|
* - Use for switching views of related content. Use links for page navigation.
|
|
12
12
|
* - Name the list with `aria-label` or `aria-labelledby`.
|
|
13
13
|
* - Keep tab labels short and parallel, such as Overview, Activity and Settings.
|
|
14
|
+
* - Set `variant="pill"` on `List` for filled pill tabs, such as a row of filters. Pill tabs mark
|
|
15
|
+
* the active tab with its fill and take no `Indicator`.
|
|
14
16
|
*
|
|
15
17
|
* @example
|
|
16
18
|
* <Tabs.Root defaultValue="overview">
|
|
@@ -32,7 +34,8 @@ import { style, variants, vars } from '../zyzz.config.js'
|
|
|
32
34
|
export namespace Tabs {
|
|
33
35
|
/**
|
|
34
36
|
* The 2px bar along the bottom of the active tab, which slides to each tab and matches its
|
|
35
|
-
* width. Place it inside `List` after the tabs.
|
|
37
|
+
* width. Place it inside an underline `List` after the tabs. A pill `List` hides it. It ignores
|
|
38
|
+
* pointer events.
|
|
36
39
|
*/
|
|
37
40
|
export function Indicator(props: Indicator.Props) {
|
|
38
41
|
const { className, vars, ...attributes } = props
|
|
@@ -50,17 +53,19 @@ export namespace Tabs {
|
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
/**
|
|
53
|
-
* The `role="tablist"` row
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
+
* The `role="tablist"` row. `variant` sets underline tabs, 4px apart, or filled pill tabs, 8px
|
|
57
|
+
* apart. `size` sets the height of underline tabs to 32, 40 or 56px, and of pill tabs to 32, 40
|
|
58
|
+
* or 48px. `appearance` sets the fills of pill tabs for the surface under them. `expand`
|
|
59
|
+
* stretches the tabs to equal widths across the row. The row scrolls horizontally when tabs
|
|
60
|
+
* overflow.
|
|
56
61
|
*/
|
|
57
62
|
export function List(props: List.Props) {
|
|
58
|
-
const { className, expand, size, vars, ...attributes } = props
|
|
63
|
+
const { appearance, className, expand, size, variant, vars, ...attributes } = props
|
|
59
64
|
|
|
60
65
|
return (
|
|
61
66
|
<BaseUi.Tabs.List
|
|
62
67
|
{...attributes}
|
|
63
|
-
{...styles.list({ className, expand, size, style: props.style, vars })}
|
|
68
|
+
{...styles.list({ appearance, className, expand, size, style: props.style, variant, vars })}
|
|
64
69
|
/>
|
|
65
70
|
)
|
|
66
71
|
}
|
|
@@ -206,8 +211,128 @@ namespace styles {
|
|
|
206
211
|
padding: '4',
|
|
207
212
|
position: 'relative',
|
|
208
213
|
},
|
|
209
|
-
|
|
214
|
+
// The pill sizes follow the Platform Tab: 48, 40 and 32px, padded by 32, 24 and 16px, with
|
|
215
|
+
// a label in Pilat at the size and weight of B2 Strong, or of B3 Strong for small. Each
|
|
216
|
+
// family follows its typography set, which sets the family of the body.
|
|
217
|
+
compoundVariants: [
|
|
218
|
+
{
|
|
219
|
+
when: { size: 'large', variant: 'pill' },
|
|
220
|
+
style: {
|
|
221
|
+
selectors: {
|
|
222
|
+
'& > [role="tab"]': {
|
|
223
|
+
height: '48',
|
|
224
|
+
paddingInline: '32',
|
|
225
|
+
typography: 'body.b2Strong',
|
|
226
|
+
fontFamily: 'heading',
|
|
227
|
+
},
|
|
228
|
+
'& > [role="tab"]:is([data-active], [data-active]:hover)': {
|
|
229
|
+
typography: 'body.b2Strong',
|
|
230
|
+
fontFamily: 'heading',
|
|
231
|
+
},
|
|
232
|
+
'& > [role="tab"] [data-reserve]': {
|
|
233
|
+
typography: 'body.b2Strong',
|
|
234
|
+
fontFamily: 'heading',
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
when: { size: 'medium', variant: 'pill' },
|
|
241
|
+
style: { selectors: { '& > [role="tab"]': { paddingInline: '24' } } },
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
when: { size: 'small', variant: 'pill' },
|
|
245
|
+
style: {
|
|
246
|
+
selectors: {
|
|
247
|
+
'& > [role="tab"]': {
|
|
248
|
+
paddingInline: '16',
|
|
249
|
+
typography: 'body.b3Strong',
|
|
250
|
+
fontFamily: 'heading',
|
|
251
|
+
},
|
|
252
|
+
'& > [role="tab"]:is([data-active], [data-active]:hover)': {
|
|
253
|
+
typography: 'body.b3Strong',
|
|
254
|
+
fontFamily: 'heading',
|
|
255
|
+
},
|
|
256
|
+
'& > [role="tab"] [data-reserve]': {
|
|
257
|
+
typography: 'body.b3Strong',
|
|
258
|
+
fontFamily: 'heading',
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
// Each appearance fills the resting tab with the container of its surface, and the active
|
|
264
|
+
// tab with the opposite background and text. The active selector also matches the hovered
|
|
265
|
+
// active tab, so it outranks the hover color of a tab.
|
|
266
|
+
{
|
|
267
|
+
when: { appearance: 'base', variant: 'pill' },
|
|
268
|
+
style: {
|
|
269
|
+
selectors: {
|
|
270
|
+
'& > [role="tab"]': {
|
|
271
|
+
backgroundColor: 'container.regular',
|
|
272
|
+
color: 'content.primary',
|
|
273
|
+
},
|
|
274
|
+
'& > [role="tab"]:hover:not([data-disabled], [data-active])': {
|
|
275
|
+
backgroundColor: 'container.strong',
|
|
276
|
+
color: 'content.primary',
|
|
277
|
+
},
|
|
278
|
+
'& > [role="tab"]:is([data-active], [data-active]:hover)': {
|
|
279
|
+
backgroundColor: 'inverse.background.primary',
|
|
280
|
+
color: 'inverse.content.primary',
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
// The focus ring of the page blends into an inverse surface, so an inverse tab draws its
|
|
286
|
+
// ring in the inverse text color.
|
|
287
|
+
{
|
|
288
|
+
when: { appearance: 'inverse', variant: 'pill' },
|
|
289
|
+
style: {
|
|
290
|
+
selectors: {
|
|
291
|
+
'& > [role="tab"]': {
|
|
292
|
+
backgroundColor: 'inverse.container.regular',
|
|
293
|
+
color: 'inverse.content.primary',
|
|
294
|
+
},
|
|
295
|
+
'& > [role="tab"]:hover:not([data-disabled], [data-active])': {
|
|
296
|
+
color: 'inverse.content.primary',
|
|
297
|
+
},
|
|
298
|
+
'& > [role="tab"]:focus-visible': { outlineColor: 'inverse.content.primary' },
|
|
299
|
+
'& > [role="tab"]:is([data-active], [data-active]:hover)': {
|
|
300
|
+
backgroundColor: 'background.primary',
|
|
301
|
+
color: 'content.primary',
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
// The overlay fills and text keep the same colors in both schemes. Hover lightens the fill.
|
|
307
|
+
{
|
|
308
|
+
when: { appearance: 'overlay', variant: 'pill' },
|
|
309
|
+
style: {
|
|
310
|
+
selectors: {
|
|
311
|
+
'& > [role="tab"]': {
|
|
312
|
+
backgroundColor: 'overlay.container.regular',
|
|
313
|
+
color: 'overlay.content.primary',
|
|
314
|
+
},
|
|
315
|
+
'& > [role="tab"]:hover:not([data-disabled], [data-active])': {
|
|
316
|
+
backgroundColor: 'overlay.action.secondary.fill.hover',
|
|
317
|
+
color: 'overlay.content.primary',
|
|
318
|
+
},
|
|
319
|
+
'& > [role="tab"]:is([data-active], [data-active]:hover)': {
|
|
320
|
+
backgroundColor: 'background.primary',
|
|
321
|
+
color: 'content.primary',
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
],
|
|
327
|
+
defaultVariants: { appearance: 'base', expand: false, size: 'medium', variant: 'underline' },
|
|
210
328
|
variants: {
|
|
329
|
+
/**
|
|
330
|
+
* The surface under pill tabs: the page for `base`, an inverse surface for `inverse`, and
|
|
331
|
+
* an image or video for `overlay`. Underline tabs ignore it.
|
|
332
|
+
*
|
|
333
|
+
* @default 'base'
|
|
334
|
+
*/
|
|
335
|
+
appearance: { base: {}, inverse: {}, overlay: {} },
|
|
211
336
|
expand: {
|
|
212
337
|
false: {},
|
|
213
338
|
true: {
|
|
@@ -215,7 +340,7 @@ namespace styles {
|
|
|
215
340
|
selectors: { '& > [role="tab"]': { flex: '1 !custom' } },
|
|
216
341
|
},
|
|
217
342
|
},
|
|
218
|
-
// The shared control scale: 32, 40 and 56px. The 40px tab matches the
|
|
343
|
+
// The shared control scale: 32, 40 and 56px. The 40px tab matches the Platform Tab, which
|
|
219
344
|
// has no other size. Small keeps its padding and label, and large pads a B1 label by 12px.
|
|
220
345
|
size: {
|
|
221
346
|
large: {
|
|
@@ -228,6 +353,43 @@ namespace styles {
|
|
|
228
353
|
medium: { selectors: { '& > [role="tab"]': { height: '40' } } },
|
|
229
354
|
small: { selectors: { '& > [role="tab"]': { height: '32' } } },
|
|
230
355
|
},
|
|
356
|
+
// Pill tabs keep one weight, so the active tab changes only its fill and text color. They
|
|
357
|
+
// keep an 80px minimum width and center their label.
|
|
358
|
+
variant: {
|
|
359
|
+
pill: {
|
|
360
|
+
columnGap: '8',
|
|
361
|
+
selectors: {
|
|
362
|
+
'& > [role="tab"]': {
|
|
363
|
+
alignItems: 'center',
|
|
364
|
+
borderRadius: 'full',
|
|
365
|
+
cornerShape: 'round',
|
|
366
|
+
minWidth: '5rem !custom',
|
|
367
|
+
outlineOffset: '2',
|
|
368
|
+
transitionProperty: 'background-color, color, outline-color, scale',
|
|
369
|
+
typography: 'body.b2Strong',
|
|
370
|
+
fontFamily: 'heading',
|
|
371
|
+
},
|
|
372
|
+
'& > [role="tab"]:is([data-active], [data-active]:hover)': {
|
|
373
|
+
typography: 'body.b2Strong',
|
|
374
|
+
fontFamily: 'heading',
|
|
375
|
+
},
|
|
376
|
+
'& > [role="tab"] [data-reserve]': {
|
|
377
|
+
typography: 'body.b2Strong',
|
|
378
|
+
fontFamily: 'heading',
|
|
379
|
+
},
|
|
380
|
+
// The fill marks the active tab, so the list hides the underline indicator.
|
|
381
|
+
'& > span:not([role="tab"])': { display: 'none' },
|
|
382
|
+
},
|
|
383
|
+
'@media (prefers-reduced-motion: reduce)': {
|
|
384
|
+
selectors: {
|
|
385
|
+
'& > [role="tab"]': {
|
|
386
|
+
transitionProperty: 'background-color, color, outline-color',
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
underline: {},
|
|
392
|
+
},
|
|
231
393
|
},
|
|
232
394
|
},
|
|
233
395
|
{ id: 'tds/web/tabs/list' },
|
|
@@ -2,7 +2,7 @@ import type { ComponentPropsWithRef } from 'react'
|
|
|
2
2
|
import type * as zyzz from 'zyzz'
|
|
3
3
|
import { variants } from '../zyzz.config.js'
|
|
4
4
|
|
|
5
|
-
// The Tempo Logo exports from
|
|
5
|
+
// The Tempo Logo exports from TPDS 1.0 Platform, drawn in `currentColor`.
|
|
6
6
|
const artwork = {
|
|
7
7
|
mark: {
|
|
8
8
|
paths: ['M6.88 20H1.413L6.48 4.533H0L1.413 0H19.466L18.053 4.533H11.92L6.88 20Z'],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as BaseUi from '@base-ui/react/input'
|
|
2
2
|
import { type ComponentPropsWithRef, useContext, useMemo, useRef } 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
|
import * as InputGroup from './internal/InputGroup.js'
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -9,7 +9,8 @@ import * as InputGroup from './internal/InputGroup.js'
|
|
|
9
9
|
* place it inside `Field.Root` to get a label, description and error. Focus turns the field
|
|
10
10
|
* elevated with a 1px border. `invalid` fills it red and `success` ends it with a check, each also
|
|
11
11
|
* inherited from `Field.Root`. Entering either state after mount plays a one-shot nudge or pop.
|
|
12
|
-
* For search, put a `Search` icon in `Prefix` and add `Clear`.
|
|
12
|
+
* For search, put a `Search` icon in `Prefix` and add `Clear`. `size="large"` draws the 52px
|
|
13
|
+
* search bar, and `appearance="overlay"` draws the field over an image or video.
|
|
13
14
|
*
|
|
14
15
|
* - Give every control a visible `Field.Label`. A placeholder is not a label.
|
|
15
16
|
* - Set `autoComplete`, `inputMode` and `type` so browsers and keyboards can help fill the field.
|
|
@@ -34,9 +35,20 @@ import * as InputGroup from './internal/InputGroup.js'
|
|
|
34
35
|
export namespace TextInput {
|
|
35
36
|
/** The field surface, rendered as a `div` that holds the other parts. */
|
|
36
37
|
export function Group(props: Group.Props) {
|
|
37
|
-
const {
|
|
38
|
+
const {
|
|
39
|
+
appearance,
|
|
40
|
+
className,
|
|
41
|
+
invalid = false,
|
|
42
|
+
ref,
|
|
43
|
+
size,
|
|
44
|
+
success = false,
|
|
45
|
+
variant,
|
|
46
|
+
vars,
|
|
47
|
+
...attributes
|
|
48
|
+
} = props
|
|
38
49
|
const control = useRef<HTMLInputElement | null>(null)
|
|
39
50
|
const element = useRef<HTMLDivElement | null>(null)
|
|
51
|
+
const surface = styles.group({ appearance, className, size })
|
|
40
52
|
const context = useMemo(() => ({ control, invalid }), [invalid])
|
|
41
53
|
|
|
42
54
|
InputGroup.useEntrance(element)
|
|
@@ -45,7 +57,13 @@ export namespace TextInput {
|
|
|
45
57
|
<InputGroup.Context.Provider value={context}>
|
|
46
58
|
<div
|
|
47
59
|
{...attributes}
|
|
48
|
-
{...
|
|
60
|
+
{...surface}
|
|
61
|
+
{...InputGroup.styles.group({
|
|
62
|
+
className: surface.className,
|
|
63
|
+
style: props.style,
|
|
64
|
+
variant,
|
|
65
|
+
vars,
|
|
66
|
+
})}
|
|
49
67
|
data-invalid={invalid || undefined}
|
|
50
68
|
data-success={success || undefined}
|
|
51
69
|
ref={(node) => {
|
|
@@ -60,7 +78,8 @@ export namespace TextInput {
|
|
|
60
78
|
|
|
61
79
|
export namespace Group {
|
|
62
80
|
export type Props = ComponentPropsWithRef<'div'> &
|
|
63
|
-
zyzz.Props.Variants<typeof InputGroup.styles.group> &
|
|
81
|
+
zyzz.Props.Variants<typeof InputGroup.styles.group> &
|
|
82
|
+
zyzz.Props.Variants<typeof styles.group> & {
|
|
64
83
|
/**
|
|
65
84
|
* Fills the field red and sets `aria-invalid` on `TextInput.Control`.
|
|
66
85
|
*
|
|
@@ -254,6 +273,69 @@ namespace styles {
|
|
|
254
273
|
{ id: 'tds/web/text-input/clear' },
|
|
255
274
|
)
|
|
256
275
|
|
|
276
|
+
/**
|
|
277
|
+
* The surface and size of `TextInput.Group`, applied over the shared field. The rules repeat the
|
|
278
|
+
* element type, so they outrank the shared rules of the same state.
|
|
279
|
+
*/
|
|
280
|
+
export const group = variants(
|
|
281
|
+
{
|
|
282
|
+
base: {
|
|
283
|
+
// A field in a large `Field.Root` insets its content 20px, as the Platform text input does.
|
|
284
|
+
selectors: { '[data-field-size="large"] > &:is(div)': { paddingInline: '20' } },
|
|
285
|
+
},
|
|
286
|
+
// The search bar on the page draws its icons in the primary color.
|
|
287
|
+
compoundVariants: [
|
|
288
|
+
{
|
|
289
|
+
when: { appearance: 'base', size: 'large' },
|
|
290
|
+
style: { selectors: { '& > span > svg': { color: 'content.primary' } } },
|
|
291
|
+
},
|
|
292
|
+
],
|
|
293
|
+
defaultVariants: { appearance: 'base', size: 'medium' },
|
|
294
|
+
variants: {
|
|
295
|
+
/**
|
|
296
|
+
* The surface under the field: the page for `base`, and an image or video for `overlay`.
|
|
297
|
+
* The overlay fill and text keep the same colors in both schemes, and hover lightens the
|
|
298
|
+
* fill.
|
|
299
|
+
*
|
|
300
|
+
* @default 'base'
|
|
301
|
+
*/
|
|
302
|
+
appearance: {
|
|
303
|
+
base: {},
|
|
304
|
+
overlay: {
|
|
305
|
+
selectors: {
|
|
306
|
+
'&:is(div)': {
|
|
307
|
+
backgroundColor: 'overlay.container.regular',
|
|
308
|
+
color: 'overlay.content.primary',
|
|
309
|
+
},
|
|
310
|
+
'&:is(div):hover:not(:has(input:disabled))': {
|
|
311
|
+
backgroundColor: 'overlay.action.secondary.fill.hover',
|
|
312
|
+
},
|
|
313
|
+
'& > input, & > input::placeholder, & > span, & > span > svg, & > button': {
|
|
314
|
+
color: 'overlay.content.primary',
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
/**
|
|
320
|
+
* The height of the field. `medium` is the 48px text field. `large` is the 52px search
|
|
321
|
+
* bar, which insets its content 20px, rounds at `sm` and draws 20px icons.
|
|
322
|
+
*
|
|
323
|
+
* @default 'medium'
|
|
324
|
+
*/
|
|
325
|
+
size: {
|
|
326
|
+
large: {
|
|
327
|
+
selectors: {
|
|
328
|
+
'&:is(div)': { borderRadius: 'sm', height: '52', paddingInline: '20' },
|
|
329
|
+
'& > span > svg': { fontSize: '20' },
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
medium: {},
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
{ id: 'tds/web/text-input/surface' },
|
|
337
|
+
)
|
|
338
|
+
|
|
257
339
|
// The group carries the type, so the control inherits it. Browsers reset the tracking of a form
|
|
258
340
|
// control, so it inherits that too.
|
|
259
341
|
export const control = style(
|
|
@@ -6,7 +6,8 @@ import { variants } from '../zyzz.config.js'
|
|
|
6
6
|
/**
|
|
7
7
|
* A native `textarea` registered as the control of the enclosing `Field.Root`, which supplies its
|
|
8
8
|
* label, description, error and disabled state. It defaults to three rows with vertical resizing,
|
|
9
|
-
* and `variant="outlined"` draws a 1px line instead of the fill.
|
|
9
|
+
* and `variant="outlined"` draws a 1px line instead of the fill. In a large `Field.Root`, it
|
|
10
|
+
* insets its text 20px from the sides and 16px from the top, and is at least 80px tall.
|
|
10
11
|
*
|
|
11
12
|
* - Use it for multi-line answers. Set `rows` to the expected length of the answer.
|
|
12
13
|
* - `resize="auto"` grows the box with its content through `field-sizing`. Browsers without that
|
|
@@ -85,6 +86,13 @@ namespace styles {
|
|
|
85
86
|
cursor: 'default',
|
|
86
87
|
},
|
|
87
88
|
'&:disabled::placeholder': { color: 'content.subtle' },
|
|
89
|
+
// The Platform text input draws its multi-line field 80px tall, with the text 16px from
|
|
90
|
+
// the top inside the 1px border.
|
|
91
|
+
'[data-field-size="large"] > &': {
|
|
92
|
+
minHeight: '80',
|
|
93
|
+
paddingBlock: '15px !custom',
|
|
94
|
+
paddingInline: '20',
|
|
95
|
+
},
|
|
88
96
|
},
|
|
89
97
|
'@media (forced-colors: active)': {
|
|
90
98
|
outlineStyle: 'none !custom',
|
|
@@ -42,6 +42,51 @@ export namespace Toast {
|
|
|
42
42
|
/** Sets the leading icon and its color. `neutral` shows no icon. */
|
|
43
43
|
export type Intent = 'info' | 'negative' | 'neutral' | 'positive' | 'warning'
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* One toast: an elevated card with the icon of its intent, its title and description in Pilat,
|
|
47
|
+
* an optional action, and a Dismiss button. `Toast.Viewport` renders one for each queued toast.
|
|
48
|
+
* Render it yourself only under `Toast.Provider`, such as in a custom viewport, with a `toast`
|
|
49
|
+
* object from the queue. Its `type` sets the intent. The item is absolutely positioned at the
|
|
50
|
+
* bottom of its containing block, as the viewport stacks it.
|
|
51
|
+
*/
|
|
52
|
+
export function Item(props: Item.Props) {
|
|
53
|
+
const { className, toast, vars, ...attributes } = props
|
|
54
|
+
const intent = (toast.type ?? 'neutral') as Intent
|
|
55
|
+
const Glyph = intent === 'neutral' ? undefined : icons[intent]
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<BaseUi.Toast.Root
|
|
59
|
+
{...attributes}
|
|
60
|
+
toast={toast}
|
|
61
|
+
{...styles.root({ className, style: props.style, vars })}
|
|
62
|
+
>
|
|
63
|
+
<BaseUi.Toast.Content {...styles.content()}>
|
|
64
|
+
{Glyph && (
|
|
65
|
+
<span aria-hidden="true" data-icon="" {...styles.icon({ intent })}>
|
|
66
|
+
<Glyph />
|
|
67
|
+
</span>
|
|
68
|
+
)}
|
|
69
|
+
<div {...styles.body()}>
|
|
70
|
+
<BaseUi.Toast.Title {...styles.title()} />
|
|
71
|
+
<BaseUi.Toast.Description {...styles.description()} />
|
|
72
|
+
</div>
|
|
73
|
+
{toast.actionProps && <BaseUi.Toast.Action {...styles.action()} />}
|
|
74
|
+
<BaseUi.Toast.Close aria-label="Dismiss" {...styles.close()}>
|
|
75
|
+
<Close />
|
|
76
|
+
</BaseUi.Toast.Close>
|
|
77
|
+
</BaseUi.Toast.Content>
|
|
78
|
+
</BaseUi.Toast.Root>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export namespace Item {
|
|
83
|
+
export type Props = Omit<ComponentPropsWithRef<'div'>, 'children'> &
|
|
84
|
+
zyzz.Props.Variants<typeof styles.root> & {
|
|
85
|
+
/** The queued toast, whose `title`, `description`, `type` and `actionProps` it renders. */
|
|
86
|
+
toast: BaseUi.Toast.Root.ToastObject
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
45
90
|
/**
|
|
46
91
|
* Holds the toast queue for `Toast.useToast` and `Toast.Viewport` beneath it. The oldest toasts
|
|
47
92
|
* past `limit` stay mounted but hidden.
|
|
@@ -97,9 +142,8 @@ export namespace Toast {
|
|
|
97
142
|
}
|
|
98
143
|
|
|
99
144
|
/**
|
|
100
|
-
* Renders
|
|
101
|
-
*
|
|
102
|
-
* end from 40rem up.
|
|
145
|
+
* Renders a `Toast.Item` for each queued toast in a portal. It spans the bottom edge on narrow
|
|
146
|
+
* screens and sits 20rem wide at the bottom end from 40rem up.
|
|
103
147
|
*/
|
|
104
148
|
export function Viewport(props: Viewport.Props) {
|
|
105
149
|
const { className, vars, ...attributes } = props
|
|
@@ -111,30 +155,9 @@ export namespace Toast {
|
|
|
111
155
|
{...attributes}
|
|
112
156
|
{...styles.viewport({ className, style: props.style, vars })}
|
|
113
157
|
>
|
|
114
|
-
{toasts.map((toast) =>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
return (
|
|
119
|
-
<BaseUi.Toast.Root key={toast.id} toast={toast} {...styles.root()}>
|
|
120
|
-
<BaseUi.Toast.Content {...styles.content()}>
|
|
121
|
-
{Glyph && (
|
|
122
|
-
<span aria-hidden="true" {...styles.icon({ intent })}>
|
|
123
|
-
<Glyph />
|
|
124
|
-
</span>
|
|
125
|
-
)}
|
|
126
|
-
<div {...styles.body()}>
|
|
127
|
-
<BaseUi.Toast.Title {...styles.title()} />
|
|
128
|
-
<BaseUi.Toast.Description {...styles.description()} />
|
|
129
|
-
</div>
|
|
130
|
-
{toast.actionProps && <BaseUi.Toast.Action {...styles.action()} />}
|
|
131
|
-
<BaseUi.Toast.Close aria-label="Dismiss" {...styles.close()}>
|
|
132
|
-
<Close />
|
|
133
|
-
</BaseUi.Toast.Close>
|
|
134
|
-
</BaseUi.Toast.Content>
|
|
135
|
-
</BaseUi.Toast.Root>
|
|
136
|
-
)
|
|
137
|
-
})}
|
|
158
|
+
{toasts.map((toast) => (
|
|
159
|
+
<Item key={toast.id} toast={toast} />
|
|
160
|
+
))}
|
|
138
161
|
</BaseUi.Toast.Viewport>
|
|
139
162
|
</BaseUi.Toast.Portal>
|
|
140
163
|
)
|
|
@@ -159,6 +182,8 @@ namespace styles {
|
|
|
159
182
|
display: 'inline-flex',
|
|
160
183
|
flexShrink: '0 !custom',
|
|
161
184
|
height: '32',
|
|
185
|
+
// The 32px button centers on the 20px first line of the title.
|
|
186
|
+
marginBlock: '-6',
|
|
162
187
|
paddingInline: '12',
|
|
163
188
|
// Weight overrides the typography token, so it stays after it.
|
|
164
189
|
typography: 'body.b3Strong',
|
|
@@ -210,6 +235,8 @@ namespace styles {
|
|
|
210
235
|
fontSize: '16',
|
|
211
236
|
height: '24',
|
|
212
237
|
justifyContent: 'center',
|
|
238
|
+
// The 24px button centers on the 20px first line of the title.
|
|
239
|
+
marginBlock: '-0.125rem !custom',
|
|
213
240
|
padding: '0',
|
|
214
241
|
width: '24',
|
|
215
242
|
outlineColor: 'transparent !custom',
|
|
@@ -232,20 +259,24 @@ namespace styles {
|
|
|
232
259
|
{ id: 'tds/web/toast/close' },
|
|
233
260
|
)
|
|
234
261
|
|
|
262
|
+
// The icon, the action and the Dismiss button center on the first line of the title.
|
|
235
263
|
export const content = style(
|
|
236
264
|
{
|
|
237
|
-
alignItems: '
|
|
265
|
+
alignItems: 'flex-start',
|
|
238
266
|
boxSizing: 'border-box',
|
|
239
267
|
columnGap: '12',
|
|
240
268
|
display: 'flex',
|
|
241
269
|
height: '100% !custom',
|
|
242
270
|
overflow: 'hidden',
|
|
243
271
|
paddingBlock: '16',
|
|
244
|
-
|
|
272
|
+
paddingInlineEnd: '16',
|
|
273
|
+
paddingInlineStart: '20',
|
|
245
274
|
transitionDuration: '200',
|
|
246
275
|
transitionProperty: 'opacity',
|
|
247
276
|
transitionTimingFunction: 'snappy',
|
|
248
277
|
selectors: {
|
|
278
|
+
// A leading icon starts 16px from the edge, and the text 12px after it.
|
|
279
|
+
'&:has(> [data-icon])': { paddingInlineStart: '16' },
|
|
249
280
|
'&[data-behind]': { opacity: '0 !custom', pointerEvents: 'none' },
|
|
250
281
|
'&[data-expanded]': { opacity: '1 !custom' },
|
|
251
282
|
},
|
|
@@ -253,8 +284,10 @@ namespace styles {
|
|
|
253
284
|
{ id: 'tds/web/toast/content' },
|
|
254
285
|
)
|
|
255
286
|
|
|
287
|
+
// The title and description set Pilat at the size of their typography set, so the family
|
|
288
|
+
// follows the set, which sets the family of the body.
|
|
256
289
|
export const description = style(
|
|
257
|
-
{ color: 'content.secondary', margin: '0', typography: 'body.
|
|
290
|
+
{ color: 'content.secondary', margin: '0', typography: 'body.b3Strong', fontFamily: 'heading' },
|
|
258
291
|
{ id: 'tds/web/toast/description' },
|
|
259
292
|
)
|
|
260
293
|
|
|
@@ -278,7 +311,7 @@ namespace styles {
|
|
|
278
311
|
{
|
|
279
312
|
backgroundColor: 'background.elevated',
|
|
280
313
|
borderRadius: 'sm',
|
|
281
|
-
boxShadow: '
|
|
314
|
+
boxShadow: 'large',
|
|
282
315
|
boxSizing: 'border-box',
|
|
283
316
|
color: 'content.primary',
|
|
284
317
|
height: 'var(--toast-frontmost-height, var(--toast-height)) !custom',
|
|
@@ -334,7 +367,7 @@ namespace styles {
|
|
|
334
367
|
)
|
|
335
368
|
|
|
336
369
|
export const title = style(
|
|
337
|
-
{ color: 'content.primary', margin: '0', typography: 'body.b2Strong' },
|
|
370
|
+
{ color: 'content.primary', margin: '0', typography: 'body.b2Strong', fontFamily: 'heading' },
|
|
338
371
|
{ id: 'tds/web/toast/title' },
|
|
339
372
|
)
|
|
340
373
|
|
|
@@ -343,13 +376,13 @@ namespace styles {
|
|
|
343
376
|
insetBlockEnd: '16',
|
|
344
377
|
insetInline: '16',
|
|
345
378
|
margin: 'auto !custom',
|
|
346
|
-
maxWidth: '
|
|
379
|
+
maxWidth: '320',
|
|
347
380
|
position: 'fixed',
|
|
348
381
|
zIndex: 'toast',
|
|
349
382
|
'@media (min-width: 40rem)': {
|
|
350
383
|
insetInlineStart: 'auto !custom',
|
|
351
384
|
margin: '0',
|
|
352
|
-
width: '
|
|
385
|
+
width: '320',
|
|
353
386
|
},
|
|
354
387
|
},
|
|
355
388
|
{ id: 'tds/web/toast/viewport' },
|
|
@@ -96,14 +96,16 @@ export namespace Tooltip {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
namespace styles {
|
|
99
|
+
// An elevated label with an 8px corner, padded 8px above and below and 12px at the sides.
|
|
99
100
|
export const popup = style(
|
|
100
101
|
{
|
|
101
|
-
backgroundColor: '
|
|
102
|
-
borderRadius: '
|
|
102
|
+
backgroundColor: 'background.elevated',
|
|
103
|
+
borderRadius: '2xs',
|
|
104
|
+
boxShadow: 'small',
|
|
103
105
|
boxSizing: 'border-box',
|
|
104
|
-
color: '
|
|
106
|
+
color: 'content.primary',
|
|
105
107
|
maxWidth: '320',
|
|
106
|
-
paddingBlock: '
|
|
108
|
+
paddingBlock: '8',
|
|
107
109
|
paddingInline: '12',
|
|
108
110
|
transformOrigin: 'var(--transform-origin) !custom',
|
|
109
111
|
transitionDuration: '160',
|