@tempoxyz/ds 0.2.6 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/fonts/JetBrainsMono-Bold-latin.woff2 +0 -0
- package/dist/fonts/JetBrainsMono-Bold-other.woff2 +0 -0
- package/dist/fonts/JetBrainsMono-Bold.woff2 +0 -0
- package/dist/fonts/JetBrainsMono-Medium-latin.woff2 +0 -0
- package/dist/fonts/JetBrainsMono-Medium-other.woff2 +0 -0
- package/dist/fonts/JetBrainsMono-Medium.woff2 +0 -0
- package/dist/fonts/JetBrainsMono-Regular-latin.woff2 +0 -0
- package/dist/fonts/JetBrainsMono-Regular-other.woff2 +0 -0
- package/dist/fonts/JetBrainsMono-Regular.woff2 +0 -0
- package/dist/fonts/JetBrainsMono-SemiBold-latin.woff2 +0 -0
- package/dist/fonts/JetBrainsMono-SemiBold-other.woff2 +0 -0
- package/dist/fonts/JetBrainsMono-SemiBold.woff2 +0 -0
- package/dist/fonts/Pilat-Black-latin.woff2 +0 -0
- package/dist/fonts/Pilat-Black-other.woff2 +0 -0
- package/dist/fonts/Pilat-Black.woff2 +0 -0
- package/dist/fonts/Pilat-Bold-latin.woff2 +0 -0
- package/dist/fonts/Pilat-Bold-other.woff2 +0 -0
- package/dist/fonts/Pilat-Bold.woff2 +0 -0
- package/dist/fonts/Pilat-Book-latin.woff2 +0 -0
- package/dist/fonts/Pilat-Book-other.woff2 +0 -0
- package/dist/fonts/Pilat-Book.woff2 +0 -0
- package/dist/fonts/Pilat-Demi-latin.woff2 +0 -0
- package/dist/fonts/Pilat-Demi-other.woff2 +0 -0
- package/dist/fonts/Pilat-Demi.woff2 +0 -0
- package/dist/fonts/Pilat-Heavy-latin.woff2 +0 -0
- package/dist/fonts/Pilat-Heavy-other.woff2 +0 -0
- package/dist/fonts/Pilat-Heavy.woff2 +0 -0
- package/dist/fonts/Pilat-Light-latin.woff2 +0 -0
- package/dist/fonts/Pilat-Light-other.woff2 +0 -0
- package/dist/fonts/Pilat-Light.woff2 +0 -0
- package/dist/fonts/Pilat-Regular-latin.woff2 +0 -0
- package/dist/fonts/Pilat-Regular-other.woff2 +0 -0
- package/dist/fonts/Pilat-Regular.woff2 +0 -0
- package/dist/fonts/Pilat-Thin-latin.woff2 +0 -0
- package/dist/fonts/Pilat-Thin-other.woff2 +0 -0
- package/dist/fonts/Pilat-Thin.woff2 +0 -0
- package/dist/oxlint/rules/PreferComponent.js +6 -6
- package/dist/oxlint/rules/PreferComponent.js.map +1 -1
- package/dist/web/components/Accordion.css +1 -1
- package/dist/web/components/Accordion.d.ts +7 -7
- package/dist/web/components/Accordion.js.map +1 -1
- package/dist/web/components/Accordion.js.zyzz.json +1 -1
- package/dist/web/components/AgentLogo.css +1 -0
- package/dist/web/components/AgentLogo.d.ts +206 -0
- package/dist/web/components/AgentLogo.d.ts.map +1 -0
- package/dist/web/components/AgentLogo.js +86 -0
- package/dist/web/components/AgentLogo.js.map +1 -0
- package/dist/web/components/AgentLogo.js.zyzz.json +1 -0
- package/dist/web/components/Alert.css +1 -0
- package/dist/web/components/Alert.d.ts +161 -0
- package/dist/web/components/Alert.d.ts.map +1 -0
- package/dist/web/components/Alert.js +97 -0
- package/dist/web/components/Alert.js.map +1 -0
- package/dist/web/components/Alert.js.zyzz.json +1 -0
- package/dist/web/components/AlertDialog.d.ts +40 -28
- package/dist/web/components/AlertDialog.d.ts.map +1 -1
- package/dist/web/components/AlertDialog.js +31 -36
- package/dist/web/components/AlertDialog.js.map +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.d.ts +5 -5
- package/dist/web/components/Amount.d.ts.map +1 -1
- package/dist/web/components/Amount.js.map +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 +20 -39
- package/dist/web/components/AmountInput.d.ts.map +1 -1
- package/dist/web/components/AmountInput.js +31 -37
- package/dist/web/components/AmountInput.js.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 +172 -28
- package/dist/web/components/AppShell.d.ts.map +1 -1
- package/dist/web/components/AppShell.js +89 -29
- 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 -0
- package/dist/web/components/AssetChip.d.ts +38 -0
- package/dist/web/components/AssetChip.d.ts.map +1 -0
- package/dist/web/components/AssetChip.js +47 -0
- package/dist/web/components/AssetChip.js.map +1 -0
- package/dist/web/components/AssetChip.js.zyzz.json +1 -0
- package/dist/web/components/Autocomplete.d.ts +2 -2
- package/dist/web/components/Autocomplete.js +4 -4
- package/dist/web/components/Autocomplete.js.map +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 +40 -115
- package/dist/web/components/Avatar.d.ts.map +1 -1
- package/dist/web/components/Avatar.js +19 -32
- 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 -0
- package/dist/web/components/Badge.d.ts +134 -0
- package/dist/web/components/Badge.d.ts.map +1 -0
- package/dist/web/components/Badge.js +38 -0
- package/dist/web/components/Badge.js.map +1 -0
- package/dist/web/components/Badge.js.zyzz.json +1 -0
- package/dist/web/components/Banner.css +1 -1
- package/dist/web/components/Banner.d.ts +12 -12
- package/dist/web/components/Banner.d.ts.map +1 -1
- package/dist/web/components/Banner.js +5 -5
- package/dist/web/components/Banner.js.map +1 -1
- package/dist/web/components/Banner.js.zyzz.json +1 -1
- package/dist/web/components/BarChart.css +1 -0
- package/dist/web/components/BarChart.d.ts +155 -0
- package/dist/web/components/BarChart.d.ts.map +1 -0
- package/dist/web/components/BarChart.js +119 -0
- package/dist/web/components/BarChart.js.map +1 -0
- package/dist/web/components/BarChart.js.zyzz.json +1 -0
- package/dist/web/components/Breadcrumbs.css +1 -1
- package/dist/web/components/Breadcrumbs.d.ts +6 -6
- package/dist/web/components/Breadcrumbs.js.map +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 +167 -32
- package/dist/web/components/Button.d.ts.map +1 -1
- package/dist/web/components/Button.js +14 -9
- package/dist/web/components/Button.js.map +1 -1
- package/dist/web/components/Button.js.zyzz.json +1 -1
- package/dist/web/components/ButtonGroup.css +1 -0
- package/dist/web/components/ButtonGroup.d.ts +56 -0
- package/dist/web/components/ButtonGroup.d.ts.map +1 -0
- package/dist/web/components/ButtonGroup.js +33 -0
- package/dist/web/components/ButtonGroup.js.map +1 -0
- package/dist/web/components/ButtonGroup.js.zyzz.json +1 -0
- package/dist/web/components/Calendar.css +1 -1
- package/dist/web/components/Calendar.d.ts.map +1 -1
- package/dist/web/components/Calendar.js +7 -7
- package/dist/web/components/Calendar.js.map +1 -1
- package/dist/web/components/Calendar.js.zyzz.json +1 -1
- package/dist/web/components/Checkbox.css +1 -1
- package/dist/web/components/Checkbox.d.ts +11 -11
- package/dist/web/components/Checkbox.d.ts.map +1 -1
- package/dist/web/components/Checkbox.js +4 -1
- package/dist/web/components/Checkbox.js.map +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 +44 -16
- package/dist/web/components/ChoiceGroup.d.ts.map +1 -1
- package/dist/web/components/ChoiceGroup.js +32 -8
- 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.d.ts +9 -9
- package/dist/web/components/Choicebox.d.ts.map +1 -1
- package/dist/web/components/Choicebox.js +6 -6
- package/dist/web/components/Choicebox.js.map +1 -1
- package/dist/web/components/Choicebox.js.zyzz.json +1 -1
- package/dist/web/components/Combobox.css +1 -1
- package/dist/web/components/Combobox.d.ts +2 -2
- package/dist/web/components/Combobox.d.ts.map +1 -1
- package/dist/web/components/Combobox.js +8 -8
- package/dist/web/components/Combobox.js.map +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.js +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.d.ts +37 -56
- package/dist/web/components/DatePicker.d.ts.map +1 -1
- package/dist/web/components/DatePicker.js +7 -7
- package/dist/web/components/DatePicker.js.map +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 +189 -20
- package/dist/web/components/Dialog.d.ts.map +1 -1
- package/dist/web/components/Dialog.js +93 -26
- package/dist/web/components/Dialog.js.map +1 -1
- package/dist/web/components/Dialog.js.zyzz.json +1 -1
- package/dist/web/components/Drawer.css +1 -1
- package/dist/web/components/Drawer.d.ts +7 -2
- package/dist/web/components/Drawer.d.ts.map +1 -1
- package/dist/web/components/Drawer.js +12 -6
- package/dist/web/components/Drawer.js.map +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.d.ts +2 -0
- package/dist/web/components/Empty.d.ts.map +1 -1
- package/dist/web/components/Empty.js +5 -3
- package/dist/web/components/Empty.js.map +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 +16 -21
- package/dist/web/components/Field.d.ts.map +1 -1
- package/dist/web/components/Field.js +38 -36
- package/dist/web/components/Field.js.map +1 -1
- package/dist/web/components/Field.js.zyzz.json +1 -1
- package/dist/web/components/Fieldset.css +1 -1
- package/dist/web/components/Fieldset.d.ts +9 -18
- package/dist/web/components/Fieldset.d.ts.map +1 -1
- package/dist/web/components/Fieldset.js +11 -14
- package/dist/web/components/Fieldset.js.map +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.d.ts +13 -19
- package/dist/web/components/Frame.d.ts.map +1 -1
- package/dist/web/components/Frame.js +8 -8
- package/dist/web/components/Frame.js.map +1 -1
- package/dist/web/components/Frame.js.zyzz.json +1 -1
- package/dist/web/components/Gauge.css +1 -1
- package/dist/web/components/Gauge.d.ts +2 -2
- package/dist/web/components/Gauge.d.ts.map +1 -1
- package/dist/web/components/Gauge.js.map +1 -1
- package/dist/web/components/Gauge.js.zyzz.json +1 -1
- package/dist/web/components/Grid.js.zyzz.json +1 -1
- package/dist/web/components/Hex.css +1 -1
- package/dist/web/components/Hex.d.ts +11 -53
- package/dist/web/components/Hex.d.ts.map +1 -1
- package/dist/web/components/Hex.js +5 -7
- package/dist/web/components/Hex.js.map +1 -1
- package/dist/web/components/Hex.js.zyzz.json +1 -1
- package/dist/web/components/IconTile.css +1 -0
- package/dist/web/components/IconTile.d.ts +62 -0
- package/dist/web/components/IconTile.d.ts.map +1 -0
- package/dist/web/components/IconTile.js +28 -0
- package/dist/web/components/IconTile.js.map +1 -0
- package/dist/web/components/IconTile.js.zyzz.json +1 -0
- package/dist/web/components/Identicon.css +1 -1
- package/dist/web/components/Identicon.d.ts +1 -8
- package/dist/web/components/Identicon.d.ts.map +1 -1
- package/dist/web/components/Identicon.js +1 -4
- package/dist/web/components/Identicon.js.map +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 +7 -7
- 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 -0
- package/dist/web/components/ListGroup.d.ts +530 -0
- package/dist/web/components/ListGroup.d.ts.map +1 -0
- package/dist/web/components/ListGroup.js +270 -0
- package/dist/web/components/ListGroup.js.map +1 -0
- package/dist/web/components/ListGroup.js.zyzz.json +1 -0
- package/dist/web/components/LoadingDots.css +1 -1
- package/dist/web/components/LoadingDots.d.ts.map +1 -1
- package/dist/web/components/LoadingDots.js +2 -2
- package/dist/web/components/LoadingDots.js.map +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.d.ts +39 -20
- package/dist/web/components/Menu.d.ts.map +1 -1
- package/dist/web/components/Menu.js +12 -7
- package/dist/web/components/Menu.js.map +1 -1
- package/dist/web/components/Menu.js.zyzz.json +1 -1
- package/dist/web/components/NetworkLogo.css +1 -0
- package/dist/web/components/NetworkLogo.d.ts +58 -0
- package/dist/web/components/NetworkLogo.d.ts.map +1 -0
- package/dist/web/components/NetworkLogo.js +40 -0
- package/dist/web/components/NetworkLogo.js.map +1 -0
- package/dist/web/components/NetworkLogo.js.zyzz.json +1 -0
- package/dist/web/components/NumberField.css +1 -1
- package/dist/web/components/NumberField.d.ts +3 -3
- package/dist/web/components/NumberField.d.ts.map +1 -1
- package/dist/web/components/NumberField.js +5 -5
- package/dist/web/components/NumberField.js.map +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.d.ts +8 -68
- package/dist/web/components/OtpField.d.ts.map +1 -1
- package/dist/web/components/OtpField.js +12 -9
- package/dist/web/components/OtpField.js.map +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.d.ts +16 -14
- package/dist/web/components/Pagination.d.ts.map +1 -1
- package/dist/web/components/Pagination.js +3 -3
- package/dist/web/components/Pagination.js.map +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.map +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 +2 -2
- package/dist/web/components/Progress.d.ts.map +1 -1
- package/dist/web/components/Progress.js +5 -5
- package/dist/web/components/Progress.js.map +1 -1
- package/dist/web/components/Progress.js.zyzz.json +1 -1
- package/dist/web/components/Qr.css +1 -1
- package/dist/web/components/Qr.d.ts +1 -1
- package/dist/web/components/Qr.js.map +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.map +1 -1
- package/dist/web/components/RadioGroup.js +2 -2
- package/dist/web/components/RadioGroup.js.map +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.d.ts +7 -7
- package/dist/web/components/SecretValue.js +1 -1
- package/dist/web/components/SecretValue.js.map +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 +64 -2
- package/dist/web/components/Select.d.ts.map +1 -1
- package/dist/web/components/Select.js +26 -9
- 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.d.ts +17 -3
- package/dist/web/components/Separator.d.ts.map +1 -1
- package/dist/web/components/Separator.js +40 -5
- package/dist/web/components/Separator.js.map +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 +238 -39
- package/dist/web/components/SidebarMenu.d.ts.map +1 -1
- package/dist/web/components/SidebarMenu.js +123 -20
- 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.d.ts +5 -3
- package/dist/web/components/Skeleton.d.ts.map +1 -1
- package/dist/web/components/Skeleton.js +1 -1
- package/dist/web/components/Skeleton.js.map +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.d.ts.map +1 -1
- package/dist/web/components/Slider.js +5 -5
- package/dist/web/components/Slider.js.map +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.d.ts +27 -65
- package/dist/web/components/Snippet.d.ts.map +1 -1
- package/dist/web/components/Snippet.js +47 -10
- package/dist/web/components/Snippet.js.map +1 -1
- package/dist/web/components/Snippet.js.zyzz.json +1 -1
- package/dist/web/components/Spinner.css +1 -1
- package/dist/web/components/Spinner.d.ts +25 -16
- package/dist/web/components/Spinner.d.ts.map +1 -1
- package/dist/web/components/Spinner.js +11 -6
- package/dist/web/components/Spinner.js.map +1 -1
- package/dist/web/components/Spinner.js.zyzz.json +1 -1
- package/dist/web/components/SplitBar.css +1 -0
- package/dist/web/components/SplitBar.d.ts +99 -0
- package/dist/web/components/SplitBar.d.ts.map +1 -0
- package/dist/web/components/SplitBar.js +49 -0
- package/dist/web/components/SplitBar.js.map +1 -0
- package/dist/web/components/SplitBar.js.zyzz.json +1 -0
- package/dist/web/components/SplitButton.css +1 -1
- package/dist/web/components/SplitButton.d.ts +4 -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 -0
- package/dist/web/components/StatusChip.d.ts +162 -0
- package/dist/web/components/StatusChip.d.ts.map +1 -0
- package/dist/web/components/StatusChip.js +37 -0
- package/dist/web/components/StatusChip.js.map +1 -0
- package/dist/web/components/StatusChip.js.zyzz.json +1 -0
- package/dist/web/components/StatusRow.css +1 -0
- package/dist/web/components/StatusRow.d.ts +121 -0
- package/dist/web/components/StatusRow.d.ts.map +1 -0
- package/dist/web/components/StatusRow.js +75 -0
- package/dist/web/components/StatusRow.js.map +1 -0
- package/dist/web/components/StatusRow.js.zyzz.json +1 -0
- package/dist/web/components/Stepper.css +1 -1
- package/dist/web/components/Stepper.d.ts +10 -7
- package/dist/web/components/Stepper.d.ts.map +1 -1
- package/dist/web/components/Stepper.js +5 -4
- package/dist/web/components/Stepper.js.map +1 -1
- package/dist/web/components/Stepper.js.zyzz.json +1 -1
- package/dist/web/components/Surface.css +1 -1
- package/dist/web/components/Surface.d.ts +123 -101
- package/dist/web/components/Surface.d.ts.map +1 -1
- package/dist/web/components/Surface.js +20 -10
- 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 +14 -18
- package/dist/web/components/Switch.d.ts.map +1 -1
- package/dist/web/components/Switch.js +13 -15
- 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 +152 -67
- package/dist/web/components/Table.d.ts.map +1 -1
- package/dist/web/components/Table.js +92 -24
- 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 +49 -42
- package/dist/web/components/Tabs.d.ts.map +1 -1
- package/dist/web/components/Tabs.js +45 -14
- package/dist/web/components/Tabs.js.map +1 -1
- package/dist/web/components/Tabs.js.zyzz.json +1 -1
- package/dist/web/components/TempoLogo.css +1 -0
- package/dist/web/components/TempoLogo.d.ts +47 -0
- package/dist/web/components/TempoLogo.d.ts.map +1 -0
- package/dist/web/components/TempoLogo.js +48 -0
- package/dist/web/components/TempoLogo.js.map +1 -0
- package/dist/web/components/TempoLogo.js.zyzz.json +1 -0
- package/dist/web/components/TextInput.css +1 -0
- package/dist/web/components/{Input.d.ts → TextInput.d.ts} +27 -18
- package/dist/web/components/TextInput.d.ts.map +1 -0
- package/dist/web/components/TextInput.js +138 -0
- package/dist/web/components/TextInput.js.map +1 -0
- package/dist/web/components/TextInput.js.zyzz.json +1 -0
- package/dist/web/components/Textarea.css +1 -1
- package/dist/web/components/Textarea.d.ts +29 -74
- package/dist/web/components/Textarea.d.ts.map +1 -1
- package/dist/web/components/Textarea.js +5 -12
- 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 +4 -4
- package/dist/web/components/Toast.d.ts.map +1 -1
- package/dist/web/components/Toast.js +9 -9
- 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.d.ts +32 -90
- package/dist/web/components/Token.d.ts.map +1 -1
- package/dist/web/components/Token.js +27 -89
- package/dist/web/components/Token.js.map +1 -1
- package/dist/web/components/Token.js.zyzz.json +1 -1
- package/dist/web/components/TokenLogo.css +1 -0
- package/dist/web/components/TokenLogo.d.ts +117 -0
- package/dist/web/components/TokenLogo.d.ts.map +1 -0
- package/dist/web/components/TokenLogo.js +112 -0
- package/dist/web/components/TokenLogo.js.map +1 -0
- package/dist/web/components/TokenLogo.js.zyzz.json +1 -0
- package/dist/web/components/Tooltip.css +1 -1
- 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 -0
- package/dist/web/components/VerificationCode.d.ts +47 -0
- package/dist/web/components/VerificationCode.d.ts.map +1 -0
- package/dist/web/components/VerificationCode.js +55 -0
- package/dist/web/components/VerificationCode.js.map +1 -0
- package/dist/web/components/VerificationCode.js.zyzz.json +1 -0
- package/dist/web/components/Visual.css +1 -0
- package/dist/web/components/Visual.d.ts +65 -0
- package/dist/web/components/Visual.d.ts.map +1 -0
- package/dist/web/components/Visual.js +51 -0
- package/dist/web/components/Visual.js.map +1 -0
- package/dist/web/components/Visual.js.zyzz.json +1 -0
- package/dist/web/components/internal/Field.css +1 -1
- package/dist/web/components/internal/Field.d.ts +41 -87
- package/dist/web/components/internal/Field.d.ts.map +1 -1
- package/dist/web/components/internal/Field.js +8 -7
- package/dist/web/components/internal/Field.js.map +1 -1
- package/dist/web/components/internal/Field.js.zyzz.json +1 -1
- package/dist/web/components/internal/InputGroup.css +1 -1
- package/dist/web/components/internal/InputGroup.d.ts +38 -99
- package/dist/web/components/internal/InputGroup.d.ts.map +1 -1
- package/dist/web/components/internal/InputGroup.js +6 -6
- package/dist/web/components/internal/InputGroup.js.map +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.d.ts +8 -8
- package/dist/web/components/internal/Listbox.js.map +1 -1
- package/dist/web/components/internal/Listbox.js.zyzz.json +1 -1
- package/dist/web/components/internal/RowDisabled.d.ts +3 -0
- package/dist/web/components/internal/RowDisabled.d.ts.map +1 -0
- package/dist/web/components/internal/RowDisabled.js +9 -0
- package/dist/web/components/internal/RowDisabled.js.map +1 -0
- package/dist/web/components/internal/RowsSize.d.ts +2 -3
- package/dist/web/components/internal/RowsSize.d.ts.map +1 -1
- package/dist/web/components/internal/RowsSize.js +3 -3
- package/dist/web/components/internal/RowsSize.js.map +1 -1
- package/dist/web/components/internal/TabBar.d.ts +33 -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 +18 -6
- package/dist/web/index.d.ts.map +1 -1
- package/dist/web/index.js +18 -6
- package/dist/web/index.js.map +1 -1
- package/dist/web/index.js.zyzz.json +1 -1
- package/dist/web/vars.d.ts +612 -704
- package/dist/web/vars.d.ts.map +1 -1
- package/dist/web/vars.js +7 -6
- package/dist/web/vars.js.map +1 -1
- package/dist/web/vars.js.zyzz.json +1 -1
- package/dist/web/zyzz.config.d.ts +3041 -3506
- package/dist/web/zyzz.config.d.ts.map +1 -1
- package/dist/web/zyzz.config.js +29 -3
- package/dist/web/zyzz.config.js.map +1 -1
- package/dist/web/zyzz.config.js.zyzz.json +1 -1
- package/package.json +149 -5
- package/src/fonts/JetBrainsMono-Bold-latin.woff2 +0 -0
- package/src/fonts/JetBrainsMono-Bold-other.woff2 +0 -0
- package/src/fonts/JetBrainsMono-Bold.woff2 +0 -0
- package/src/fonts/JetBrainsMono-Medium-latin.woff2 +0 -0
- package/src/fonts/JetBrainsMono-Medium-other.woff2 +0 -0
- package/src/fonts/JetBrainsMono-Medium.woff2 +0 -0
- package/src/fonts/{Geist-OFL.txt → JetBrainsMono-OFL.txt} +4 -3
- package/src/fonts/JetBrainsMono-Regular-latin.woff2 +0 -0
- package/src/fonts/JetBrainsMono-Regular-other.woff2 +0 -0
- package/src/fonts/JetBrainsMono-Regular.woff2 +0 -0
- package/src/fonts/JetBrainsMono-SemiBold-latin.woff2 +0 -0
- package/src/fonts/JetBrainsMono-SemiBold-other.woff2 +0 -0
- package/src/fonts/JetBrainsMono-SemiBold.woff2 +0 -0
- package/src/fonts/Pilat-Black-latin.woff2 +0 -0
- package/src/fonts/Pilat-Black-other.woff2 +0 -0
- package/src/fonts/Pilat-Black.woff2 +0 -0
- package/src/fonts/Pilat-Bold-latin.woff2 +0 -0
- package/src/fonts/Pilat-Bold-other.woff2 +0 -0
- package/src/fonts/Pilat-Bold.woff2 +0 -0
- package/src/fonts/Pilat-Book-latin.woff2 +0 -0
- package/src/fonts/Pilat-Book-other.woff2 +0 -0
- package/src/fonts/Pilat-Book.woff2 +0 -0
- package/src/fonts/Pilat-Demi-latin.woff2 +0 -0
- package/src/fonts/Pilat-Demi-other.woff2 +0 -0
- package/src/fonts/Pilat-Demi.woff2 +0 -0
- package/src/fonts/Pilat-Heavy-latin.woff2 +0 -0
- package/src/fonts/Pilat-Heavy-other.woff2 +0 -0
- package/src/fonts/Pilat-Heavy.woff2 +0 -0
- package/src/fonts/Pilat-Light-latin.woff2 +0 -0
- package/src/fonts/Pilat-Light-other.woff2 +0 -0
- package/src/fonts/Pilat-Light.woff2 +0 -0
- package/src/fonts/Pilat-Regular-latin.woff2 +0 -0
- package/src/fonts/Pilat-Regular-other.woff2 +0 -0
- package/src/fonts/Pilat-Regular.woff2 +0 -0
- package/src/fonts/Pilat-Thin-latin.woff2 +0 -0
- package/src/fonts/Pilat-Thin-other.woff2 +0 -0
- package/src/fonts/Pilat-Thin.woff2 +0 -0
- package/src/fonts/README.md +15 -2
- package/src/oxlint/rules/PreferComponent.ts +6 -6
- package/src/web/README.md +7 -7
- package/src/web/components/Accordion.tsx +8 -8
- package/src/web/components/AgentLogo.tsx +330 -0
- package/src/web/components/Alert.tsx +321 -0
- package/src/web/components/AlertDialog.tsx +47 -111
- package/src/web/components/Amount.tsx +6 -6
- package/src/web/components/AmountInput.tsx +59 -134
- package/src/web/components/AppShell.tsx +367 -43
- package/src/web/components/AssetChip.tsx +110 -0
- package/src/web/components/Autocomplete.tsx +4 -4
- package/src/web/components/Avatar.tsx +42 -119
- package/src/web/components/Badge.tsx +122 -0
- package/src/web/components/Banner.tsx +13 -11
- package/src/web/components/BarChart.tsx +427 -0
- package/src/web/components/Breadcrumbs.tsx +7 -7
- package/src/web/components/Button.tsx +159 -41
- package/src/web/components/ButtonGroup.tsx +59 -0
- package/src/web/components/Calendar.tsx +15 -13
- package/src/web/components/Checkbox.tsx +14 -11
- package/src/web/components/ChoiceGroup.tsx +107 -26
- package/src/web/components/Choicebox.tsx +30 -28
- package/src/web/components/Combobox.tsx +10 -8
- package/src/web/components/CopyButton.tsx +1 -1
- package/src/web/components/DatePicker.tsx +42 -61
- package/src/web/components/Dialog.tsx +273 -71
- package/src/web/components/Drawer.tsx +45 -18
- package/src/web/components/Empty.tsx +13 -8
- package/src/web/components/Field.tsx +78 -132
- package/src/web/components/Fieldset.tsx +16 -37
- package/src/web/components/Frame.tsx +13 -20
- package/src/web/components/Gauge.tsx +4 -4
- package/src/web/components/Hex.tsx +13 -56
- package/src/web/components/IconTile.tsx +57 -0
- package/src/web/components/Identicon.tsx +1 -10
- package/src/web/components/Kbd.tsx +8 -8
- package/src/web/components/ListGroup.tsx +857 -0
- package/src/web/components/LoadingDots.tsx +1 -0
- package/src/web/components/Menu.tsx +50 -35
- package/src/web/components/NetworkLogo.tsx +208 -0
- package/src/web/components/NumberField.tsx +18 -33
- package/src/web/components/OtpField.tsx +51 -102
- package/src/web/components/Pagination.tsx +16 -14
- package/src/web/components/Popover.tsx +8 -8
- package/src/web/components/Progress.tsx +7 -5
- package/src/web/components/Qr.tsx +1 -1
- package/src/web/components/RadioGroup.tsx +9 -7
- package/src/web/components/SecretValue.tsx +11 -11
- package/src/web/components/Select.tsx +89 -26
- package/src/web/components/Separator.tsx +95 -7
- package/src/web/components/SidebarMenu.tsx +390 -53
- package/src/web/components/Skeleton.tsx +5 -5
- package/src/web/components/Slider.tsx +12 -6
- package/src/web/components/Snippet.tsx +134 -75
- package/src/web/components/Spinner.tsx +38 -12
- package/src/web/components/SplitBar.tsx +158 -0
- package/src/web/components/SplitButton.tsx +26 -17
- package/src/web/components/StatusChip.tsx +138 -0
- package/src/web/components/StatusRow.tsx +162 -0
- package/src/web/components/Stepper.tsx +11 -8
- package/src/web/components/Surface.tsx +172 -93
- package/src/web/components/Switch.tsx +25 -29
- package/src/web/components/Table.tsx +281 -70
- package/src/web/components/Tabs.tsx +93 -50
- package/src/web/components/TempoLogo.tsx +89 -0
- package/src/web/components/{Input.tsx → TextInput.tsx} +87 -118
- package/src/web/components/Textarea.tsx +33 -78
- package/src/web/components/Toast.tsx +24 -22
- package/src/web/components/Token.tsx +106 -172
- package/src/web/components/TokenLogo.tsx +217 -0
- package/src/web/components/Tooltip.tsx +3 -3
- package/src/web/components/VerificationCode.tsx +97 -0
- package/src/web/components/Visual.tsx +166 -0
- package/src/web/components/internal/Field.ts +63 -72
- package/src/web/components/internal/InputGroup.ts +44 -101
- package/src/web/components/internal/Listbox.ts +20 -20
- package/src/web/components/internal/RowDisabled.ts +9 -0
- package/src/web/components/internal/RowsSize.ts +3 -5
- package/src/web/components/internal/TabBar.ts +52 -0
- package/src/web/components/internal/Text.ts +39 -0
- package/src/web/components/visuals/Passkey.svg +21 -0
- package/src/web/index.ts +18 -6
- package/src/web/logos/Base.svg +10 -0
- package/src/web/logos/Ethereum.svg +16 -0
- package/src/web/logos/HyperEVM.svg +27 -0
- package/src/web/logos/Polygon.svg +15 -0
- package/src/web/logos/README.md +14 -0
- package/src/web/logos/Solana.svg +11 -0
- package/src/web/logos/Tempo.svg +11 -0
- package/src/web/vars.ts +493 -534
- package/src/web/zyzz.config.ts +255 -12
- package/dist/fonts/GeistMono-Variable.woff2 +0 -0
- package/dist/web/components/AlertDialog.css +0 -1
- package/dist/web/components/Callout.css +0 -1
- package/dist/web/components/Callout.d.ts +0 -161
- package/dist/web/components/Callout.d.ts.map +0 -1
- package/dist/web/components/Callout.js +0 -83
- package/dist/web/components/Callout.js.map +0 -1
- package/dist/web/components/Callout.js.zyzz.json +0 -1
- package/dist/web/components/IconChip.css +0 -1
- package/dist/web/components/IconChip.d.ts +0 -53
- package/dist/web/components/IconChip.d.ts.map +0 -1
- package/dist/web/components/IconChip.js +0 -27
- package/dist/web/components/IconChip.js.map +0 -1
- package/dist/web/components/IconChip.js.zyzz.json +0 -1
- package/dist/web/components/Input.css +0 -1
- package/dist/web/components/Input.d.ts.map +0 -1
- package/dist/web/components/Input.js +0 -118
- package/dist/web/components/Input.js.map +0 -1
- package/dist/web/components/Input.js.zyzz.json +0 -1
- package/dist/web/components/Rows.css +0 -1
- package/dist/web/components/Rows.d.ts +0 -484
- package/dist/web/components/Rows.d.ts.map +0 -1
- package/dist/web/components/Rows.js +0 -171
- package/dist/web/components/Rows.js.map +0 -1
- package/dist/web/components/Rows.js.zyzz.json +0 -1
- package/dist/web/components/Tag.css +0 -1
- package/dist/web/components/Tag.d.ts +0 -171
- package/dist/web/components/Tag.d.ts.map +0 -1
- package/dist/web/components/Tag.js +0 -52
- package/dist/web/components/Tag.js.map +0 -1
- package/dist/web/components/Tag.js.zyzz.json +0 -1
- package/dist/web/components/internal/FieldVariant.d.ts +0 -4
- package/dist/web/components/internal/FieldVariant.d.ts.map +0 -1
- package/dist/web/components/internal/FieldVariant.js +0 -4
- package/dist/web/components/internal/FieldVariant.js.map +0 -1
- package/src/fonts/GeistMono-Variable.woff2 +0 -0
- package/src/web/components/Callout.tsx +0 -241
- package/src/web/components/IconChip.tsx +0 -54
- package/src/web/components/Rows.tsx +0 -588
- package/src/web/components/Tag.tsx +0 -149
- package/src/web/components/internal/FieldVariant.ts +0 -6
|
@@ -0,0 +1,857 @@
|
|
|
1
|
+
import * as BaseUiMeter from '@base-ui/react/meter'
|
|
2
|
+
import * as BaseUiRadio from '@base-ui/react/radio'
|
|
3
|
+
import * as BaseUiRadioGroup from '@base-ui/react/radio-group'
|
|
4
|
+
import { useRender } from '@base-ui/react/use-render'
|
|
5
|
+
import type { ComponentPropsWithRef, MouseEvent, ReactNode } from 'react'
|
|
6
|
+
import type * as zyzz from 'zyzz'
|
|
7
|
+
import { ChevronRight } from '../icons/ChevronRight.js'
|
|
8
|
+
import { style, variants, vars } from '../zyzz.config.js'
|
|
9
|
+
import * as RowDisabled from './internal/RowDisabled.js'
|
|
10
|
+
import * as RowsSize from './internal/RowsSize.js'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* A stack of rows for the facts a person checks, the choices they tap, and short checklists.
|
|
14
|
+
* `ListGroup` renders `ListGroup.Root`. A row is a `button` when it has an `action` or `onClick`, any element
|
|
15
|
+
* passed to `render` (such as a link), a `label` around a radio when it has a `value`, and a plain
|
|
16
|
+
* `div` otherwise.
|
|
17
|
+
*
|
|
18
|
+
* - Name each group with a `ListGroup.Heading` placed right before it.
|
|
19
|
+
* - Write row text that names the destination, since the chevron is hidden from assistive
|
|
20
|
+
* technology.
|
|
21
|
+
* - Avoid nesting buttons or links inside a pressable row.
|
|
22
|
+
* - Put rows that pick one option, each with a `value`, in a `ListGroup.RadioGroup`.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* <ListGroup.Heading>Fees</ListGroup.Heading>
|
|
26
|
+
* <ListGroup variant="boxed">
|
|
27
|
+
* <ListGroup.Row>
|
|
28
|
+
* <ListGroup.Label>Network fee</ListGroup.Label>
|
|
29
|
+
* 0.001 USDC
|
|
30
|
+
* </ListGroup.Row>
|
|
31
|
+
* </ListGroup>
|
|
32
|
+
*
|
|
33
|
+
* @see {@link https://base-ui.com/react/utils/use-render | Base UI useRender}
|
|
34
|
+
* @see {@link https://base-ui.com/react/components/meter | Base UI Meter}
|
|
35
|
+
* @see {@link https://base-ui.com/react/components/radio | Base UI Radio}
|
|
36
|
+
* @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/radio/ | WAI-ARIA APG Radio Group pattern}
|
|
37
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/list_role | MDN list role}
|
|
38
|
+
* @see {@link https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html | WCAG 2.2 Info and Relationships}
|
|
39
|
+
* @see {@link https://www.w3.org/WAI/WCAG22/Understanding/name-role-value.html | WCAG 2.2 Name, Role, Value}
|
|
40
|
+
* @see {@link https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html | WCAG 2.2 Target Size (Minimum)}
|
|
41
|
+
*/
|
|
42
|
+
export function ListGroup(props: ListGroup.Props) {
|
|
43
|
+
return <ListGroup.Root {...props} />
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export namespace ListGroup {
|
|
47
|
+
export type Props = Root.Props
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Lays out `AssetChip` elements in a row 4px apart, under a `ListGroup.Title` in
|
|
51
|
+
* `ListGroup.Info`, such as the assets that a network supports. It wraps onto more lines when
|
|
52
|
+
* the chips run out of room.
|
|
53
|
+
*/
|
|
54
|
+
export function Chips(props: Chips.Props) {
|
|
55
|
+
const { className, vars, ...attributes } = props
|
|
56
|
+
|
|
57
|
+
return <span {...attributes} {...styles.chips({ className, style: props.style, vars })} />
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export namespace Chips {
|
|
61
|
+
export type Props = ComponentPropsWithRef<'span'> & zyzz.Props.Variants<typeof styles.chips>
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Secondary text under a `ListGroup.Title`, usually inside `ListGroup.Info`. */
|
|
65
|
+
export function Description(props: Description.Props) {
|
|
66
|
+
const { className, vars, ...attributes } = props
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<span
|
|
70
|
+
{...attributes}
|
|
71
|
+
data-description=""
|
|
72
|
+
{...styles.description({ className, style: props.style, vars })}
|
|
73
|
+
/>
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export namespace Description {
|
|
78
|
+
export type Props = ComponentPropsWithRef<'span'> &
|
|
79
|
+
zyzz.Props.Variants<typeof styles.description>
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Names the group of rows that follows it, such as Fees or Contacts, with 8px below. Renders a
|
|
84
|
+
* `div`. Pass a heading element through `render`, such as `<h3 />`, when the group starts a
|
|
85
|
+
* section.
|
|
86
|
+
*/
|
|
87
|
+
export function Heading(props: Heading.Props) {
|
|
88
|
+
const { className, ref, render, vars, ...attributes } = props
|
|
89
|
+
|
|
90
|
+
return useRender({
|
|
91
|
+
defaultTagName: 'div',
|
|
92
|
+
props: { ...attributes, ...styles.heading({ className, style: props.style, vars }) },
|
|
93
|
+
ref,
|
|
94
|
+
render,
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export namespace Heading {
|
|
99
|
+
export type Props = useRender.ComponentProps<'div'> & zyzz.Props.Variants<typeof styles.heading>
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* A leading 16px icon in `content.tertiary`, such as the globe before a suggested prompt. It sets
|
|
104
|
+
* `aria-hidden`, so the row text carries the meaning.
|
|
105
|
+
*/
|
|
106
|
+
export function Icon(props: Icon.Props) {
|
|
107
|
+
const { className, vars, ...attributes } = props
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<span
|
|
111
|
+
aria-hidden="true"
|
|
112
|
+
{...attributes}
|
|
113
|
+
{...styles.icon({ className, style: props.style, vars })}
|
|
114
|
+
/>
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export namespace Icon {
|
|
119
|
+
export type Props = ComponentPropsWithRef<'span'> & zyzz.Props.Variants<typeof styles.icon>
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Stacks a `ListGroup.Title` above a `ListGroup.Description`, beside a leading avatar or logo and a
|
|
124
|
+
* trailing control. A row that holds it pads 12px above and below. `large` sets a 16px title 2px
|
|
125
|
+
* above a monospace description, for the row that introduces a `boxed` group, such as a wallet
|
|
126
|
+
* above its address. Defaults to `size="medium"`.
|
|
127
|
+
*/
|
|
128
|
+
export function Info(props: Info.Props) {
|
|
129
|
+
const { className, size, vars, ...attributes } = props
|
|
130
|
+
|
|
131
|
+
return (
|
|
132
|
+
<span
|
|
133
|
+
{...attributes}
|
|
134
|
+
data-info=""
|
|
135
|
+
{...styles.info({ className, size, style: props.style, vars })}
|
|
136
|
+
/>
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export namespace Info {
|
|
141
|
+
export type Props = ComponentPropsWithRef<'span'> & zyzz.Props.Variants<typeof styles.info>
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** The key of a key-value row. It keeps its width and pushes the content after it to the end. */
|
|
145
|
+
export function Label(props: Label.Props) {
|
|
146
|
+
const { className, vars, ...attributes } = props
|
|
147
|
+
|
|
148
|
+
return (
|
|
149
|
+
<span
|
|
150
|
+
{...attributes}
|
|
151
|
+
data-label=""
|
|
152
|
+
{...styles.label({ className, style: props.style, vars })}
|
|
153
|
+
/>
|
|
154
|
+
)
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export namespace Label {
|
|
158
|
+
export type Props = ComponentPropsWithRef<'span'> & zyzz.Props.Variants<typeof styles.label>
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* A 64px bar that fills to `value` between `min` (0) and `max` (100), followed by its value in
|
|
163
|
+
* a 112px column, so the bars of neighboring rows line up. It renders a Base UI `meter`, such as
|
|
164
|
+
* the share of a spending limit that an agent used.
|
|
165
|
+
*
|
|
166
|
+
* - Name it with `aria-label` or `aria-labelledby`, since the row title does not name it.
|
|
167
|
+
* - The visible value is hidden from assistive technology, which reads `aria-valuetext`. Pass
|
|
168
|
+
* `getAriaValueText` to read the same text, such as `0.001 of 10 USDC`.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* <ListGroup.Row>
|
|
172
|
+
* <AgentLogo agent="claude" />
|
|
173
|
+
* <ListGroup.Info>
|
|
174
|
+
* <ListGroup.Title>Claude</ListGroup.Title>
|
|
175
|
+
* </ListGroup.Info>
|
|
176
|
+
* <ListGroup.Meter aria-label="Spending limit used" value={66}>
|
|
177
|
+
* 6.60 USDC
|
|
178
|
+
* </ListGroup.Meter>
|
|
179
|
+
* </ListGroup.Row>
|
|
180
|
+
*/
|
|
181
|
+
export function Meter(props: Meter.Props) {
|
|
182
|
+
const { children, className, vars, ...attributes } = props
|
|
183
|
+
|
|
184
|
+
return (
|
|
185
|
+
<BaseUiMeter.Meter.Root
|
|
186
|
+
{...attributes}
|
|
187
|
+
{...styles.meter({ className, style: props.style, vars })}
|
|
188
|
+
>
|
|
189
|
+
<BaseUiMeter.Meter.Track {...styles.meterTrack()}>
|
|
190
|
+
<BaseUiMeter.Meter.Indicator {...styles.meterIndicator()} />
|
|
191
|
+
</BaseUiMeter.Meter.Track>
|
|
192
|
+
<BaseUiMeter.Meter.Value
|
|
193
|
+
{...(children !== undefined && { children: () => children })}
|
|
194
|
+
{...styles.meterValue()}
|
|
195
|
+
/>
|
|
196
|
+
</BaseUiMeter.Meter.Root>
|
|
197
|
+
)
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export namespace Meter {
|
|
201
|
+
export type Props = Omit<ComponentPropsWithRef<'div'>, 'children'> &
|
|
202
|
+
zyzz.Props.Variants<typeof styles.meter> &
|
|
203
|
+
Pick<
|
|
204
|
+
BaseUiMeter.Meter.Root.Props,
|
|
205
|
+
'format' | 'getAriaValueText' | 'locale' | 'max' | 'min' | 'value'
|
|
206
|
+
> & {
|
|
207
|
+
/** Visible value after the bar, such as an amount. Absent, it shows the percentage of the range. */
|
|
208
|
+
children?: ReactNode | undefined
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Holds the selected `value` of the rows inside it, each a radio with its own `value`, in a
|
|
214
|
+
* `radiogroup` element. The rows stack 12px apart, each in its own bordered block. The group is
|
|
215
|
+
* one Tab stop, and arrow keys move focus and selection together. Pass the choices as a type
|
|
216
|
+
* argument, such as `ListGroup.RadioGroup<'maya' | 'acme'>`, to narrow `value`, `defaultValue`
|
|
217
|
+
* and `onValueChange`.
|
|
218
|
+
*
|
|
219
|
+
* - Name it with `aria-label` or `aria-labelledby`, phrased as the question it answers.
|
|
220
|
+
* - Each row's text becomes the accessible name of its radio.
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* <ListGroup.RadioGroup aria-label="Account" defaultValue="maya">
|
|
224
|
+
* <ListGroup.Row value="maya">
|
|
225
|
+
* <ListGroup.Info>
|
|
226
|
+
* <ListGroup.Title>Maya Rao</ListGroup.Title>
|
|
227
|
+
* <ListGroup.Description>maya@studio.co</ListGroup.Description>
|
|
228
|
+
* </ListGroup.Info>
|
|
229
|
+
* </ListGroup.Row>
|
|
230
|
+
* </ListGroup.RadioGroup>
|
|
231
|
+
*/
|
|
232
|
+
export function RadioGroup<const value extends string = string>(props: RadioGroup.Props<value>) {
|
|
233
|
+
const { className, vars, ...attributes } = props
|
|
234
|
+
|
|
235
|
+
return (
|
|
236
|
+
<BaseUiRadioGroup.RadioGroup
|
|
237
|
+
{...attributes}
|
|
238
|
+
{...styles.radioGroup({ className, style: props.style, vars })}
|
|
239
|
+
/>
|
|
240
|
+
)
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export namespace RadioGroup {
|
|
244
|
+
export type Props<value extends string = string> = Omit<
|
|
245
|
+
ComponentPropsWithRef<'div'>,
|
|
246
|
+
'defaultValue' | 'onChange'
|
|
247
|
+
> &
|
|
248
|
+
zyzz.Props.Variants<typeof styles.radioGroup> &
|
|
249
|
+
Pick<
|
|
250
|
+
BaseUiRadioGroup.RadioGroup.Props<NoInfer<value>>,
|
|
251
|
+
| 'defaultValue'
|
|
252
|
+
| 'disabled'
|
|
253
|
+
| 'form'
|
|
254
|
+
| 'inputRef'
|
|
255
|
+
| 'name'
|
|
256
|
+
| 'onValueChange'
|
|
257
|
+
| 'readOnly'
|
|
258
|
+
| 'required'
|
|
259
|
+
| 'value'
|
|
260
|
+
>
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* `variant` sets the container. `plain` rows have none and line up with the content around them.
|
|
265
|
+
* `boxed` rows sit in a bordered block with 16px sides and 8px above and below, and a row's
|
|
266
|
+
* hover fill reaches the border. `spaced` rows
|
|
267
|
+
* sit in the same block with 16px all round, 12px apart, with 14px text and no row padding.
|
|
268
|
+
*
|
|
269
|
+
* Rows are 36px with 12px text, which fits a 32px control. `dividers={false}` drops the line
|
|
270
|
+
* between rows, which `spaced` never draws. Variants default to `dividers`, `variant="plain"`.
|
|
271
|
+
* Inside a `Surface`, `plain` rows reach its edges and pad by its padding.
|
|
272
|
+
*/
|
|
273
|
+
export function Root(props: Root.Props) {
|
|
274
|
+
const { className, dividers, variant, vars, ...attributes } = props
|
|
275
|
+
|
|
276
|
+
return (
|
|
277
|
+
<RowsSize.Context value>
|
|
278
|
+
<div
|
|
279
|
+
{...attributes}
|
|
280
|
+
data-list-group=""
|
|
281
|
+
data-variant={variant ?? 'plain'}
|
|
282
|
+
{...styles.root({ className, dividers, style: props.style, variant, vars })}
|
|
283
|
+
/>
|
|
284
|
+
</RowsSize.Context>
|
|
285
|
+
)
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export namespace Root {
|
|
289
|
+
export type Props = ComponentPropsWithRef<'div'> & zyzz.Props.Variants<typeof styles.root>
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Renders a button when pressable, a `label` around a radio when it has a `value`, or a link or
|
|
294
|
+
* other element through `render`. `ref` and attributes reach that element. Children sit 12px
|
|
295
|
+
* apart, such as an `Avatar`, a `ListGroup.Info` and a trailing `Button`. A pressable row's hover
|
|
296
|
+
* fill covers the row, flush with its content. A static row that holds a control, such as a Copy
|
|
297
|
+
* `Button`, takes the same fill on hover and stays static, so the control is the only target.
|
|
298
|
+
* A `Select` in a row hugs its value at the row's end, in the row's type, 32px tall and without a
|
|
299
|
+
* fill of its own.
|
|
300
|
+
*
|
|
301
|
+
* A row with a `value` is a radio of the `ListGroup.RadioGroup` around it, in a 12px block with
|
|
302
|
+
* 16px sides. A press anywhere on the row selects it, and a 16px ring at its end shows the
|
|
303
|
+
* selection.
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* <ListGroup>
|
|
307
|
+
* <ListGroup.Row action="navigation" render={<a href="/activity" />}>
|
|
308
|
+
* Activity
|
|
309
|
+
* </ListGroup.Row>
|
|
310
|
+
* </ListGroup>
|
|
311
|
+
*/
|
|
312
|
+
export function Row(props: Row.Props) {
|
|
313
|
+
const {
|
|
314
|
+
action = 'none',
|
|
315
|
+
children,
|
|
316
|
+
className,
|
|
317
|
+
disabled,
|
|
318
|
+
ref,
|
|
319
|
+
render,
|
|
320
|
+
value,
|
|
321
|
+
vars,
|
|
322
|
+
...attributes
|
|
323
|
+
} = props
|
|
324
|
+
const element = (() => {
|
|
325
|
+
if (value !== undefined) return 'radio'
|
|
326
|
+
if (render !== undefined) return 'render'
|
|
327
|
+
if (action !== 'none' || attributes.onClick !== undefined) return 'button'
|
|
328
|
+
return 'static'
|
|
329
|
+
})()
|
|
330
|
+
const tag = (() => {
|
|
331
|
+
if (element === 'button') return 'button'
|
|
332
|
+
if (element === 'radio') return 'label'
|
|
333
|
+
return 'div'
|
|
334
|
+
})()
|
|
335
|
+
|
|
336
|
+
return useRender({
|
|
337
|
+
defaultTagName: tag,
|
|
338
|
+
props: {
|
|
339
|
+
...attributes,
|
|
340
|
+
...(element === 'button' && { disabled, type: 'button' }),
|
|
341
|
+
...(disabled &&
|
|
342
|
+
(element === 'render' || element === 'static') && { 'aria-disabled': true }),
|
|
343
|
+
// A link or other rendered element has no `disabled` attribute, and the `label` of a radio
|
|
344
|
+
// row takes presses beside its disabled radio, so both ignore the press and keep it from the
|
|
345
|
+
// elements around them. A static row stops the press before it reaches its children, such
|
|
346
|
+
// as a router link, which handle it themselves.
|
|
347
|
+
...(disabled && (element === 'radio' || element === 'render') && { onClick: ignore }),
|
|
348
|
+
...(disabled && element === 'static' && { onClickCapture: ignore }),
|
|
349
|
+
...styles.row({ className, style: props.style, vars }),
|
|
350
|
+
'data-action': action === 'none' || element === 'radio' ? undefined : action,
|
|
351
|
+
'data-disabled': disabled || undefined,
|
|
352
|
+
// A radio row draws its own border, so it never takes a divider.
|
|
353
|
+
'data-divider': element === 'radio' ? undefined : '',
|
|
354
|
+
'data-radio': element === 'radio' ? '' : undefined,
|
|
355
|
+
children: (
|
|
356
|
+
<>
|
|
357
|
+
{/* A disabled `fieldset` disables the native controls of a static row, which takes
|
|
358
|
+
them out of the Tab order and keeps the row's text perceivable. `Switch` and
|
|
359
|
+
`Checkbox` render a `span`, so they read the row's state from the context. */}
|
|
360
|
+
{element === 'static' ? (
|
|
361
|
+
<fieldset disabled={disabled} role="none" {...styles.content()}>
|
|
362
|
+
<RowDisabled.Context value={Boolean(disabled)}>{children}</RowDisabled.Context>
|
|
363
|
+
</fieldset>
|
|
364
|
+
) : (
|
|
365
|
+
<span {...styles.content()}>{children}</span>
|
|
366
|
+
)}
|
|
367
|
+
{action === 'navigation' && element !== 'radio' && (
|
|
368
|
+
<ChevronRight {...styles.indicator()} />
|
|
369
|
+
)}
|
|
370
|
+
{element === 'radio' && (
|
|
371
|
+
<BaseUiRadio.Radio.Root disabled={disabled} value={value} {...styles.radio()} />
|
|
372
|
+
)}
|
|
373
|
+
</>
|
|
374
|
+
),
|
|
375
|
+
},
|
|
376
|
+
ref,
|
|
377
|
+
// A radio row is the `label` of its radio, so another element cannot replace it.
|
|
378
|
+
render: element === 'radio' ? undefined : render,
|
|
379
|
+
})
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export namespace Row {
|
|
383
|
+
export type Props = Omit<useRender.ComponentProps<'div'>, 'children'> &
|
|
384
|
+
zyzz.Props.Variants<typeof styles.row> & {
|
|
385
|
+
/**
|
|
386
|
+
* `navigation` shows a trailing chevron for a row that opens something, and makes the row a
|
|
387
|
+
* button unless `render` is set. A row with a `value` ignores it.
|
|
388
|
+
* @default 'none'
|
|
389
|
+
*/
|
|
390
|
+
action?: 'navigation' | 'none' | undefined
|
|
391
|
+
/** Content of the row, laid out 12px apart. */
|
|
392
|
+
children?: ReactNode | undefined
|
|
393
|
+
/**
|
|
394
|
+
* Dims the row to 40% and disables it: a button row sets `disabled`, a radio row disables
|
|
395
|
+
* its radio and ignores presses, and any other row sets `aria-disabled` and ignores
|
|
396
|
+
* presses. A static row also disables the native controls inside it, such as a Copy
|
|
397
|
+
* `Button`, and every `Switch` and `Checkbox`, which leave the Tab order and ignore presses
|
|
398
|
+
* and input. Its children receive no presses, and its text stays readable.
|
|
399
|
+
* @default false
|
|
400
|
+
*/
|
|
401
|
+
disabled?: boolean | undefined
|
|
402
|
+
/**
|
|
403
|
+
* Makes the row a radio of the `ListGroup.RadioGroup` around it, identified by this value.
|
|
404
|
+
* A radio row ignores `render`. Absent, the row is a button, a link or static content.
|
|
405
|
+
*/
|
|
406
|
+
value?: string | undefined
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/** Primary text of a row, usually inside `ListGroup.Info` above a `ListGroup.Description`. */
|
|
411
|
+
export function Title(props: Title.Props) {
|
|
412
|
+
const { className, vars, ...attributes } = props
|
|
413
|
+
|
|
414
|
+
return (
|
|
415
|
+
<span
|
|
416
|
+
{...attributes}
|
|
417
|
+
data-title=""
|
|
418
|
+
{...styles.title({ className, style: props.style, vars })}
|
|
419
|
+
/>
|
|
420
|
+
)
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export namespace Title {
|
|
424
|
+
export type Props = ComponentPropsWithRef<'span'> & zyzz.Props.Variants<typeof styles.title>
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/** Cancels a press on a disabled row and keeps it from the elements around the row. */
|
|
429
|
+
function ignore(event: MouseEvent<HTMLElement>) {
|
|
430
|
+
event.preventDefault()
|
|
431
|
+
event.stopPropagation()
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
namespace styles {
|
|
435
|
+
export const chips = variants(
|
|
436
|
+
{ base: { columnGap: '4', display: 'flex', flexWrap: 'wrap', rowGap: '4' } },
|
|
437
|
+
{ id: 'tds/web/list-group/chips' },
|
|
438
|
+
)
|
|
439
|
+
|
|
440
|
+
export const content = style(
|
|
441
|
+
{
|
|
442
|
+
alignItems: 'center',
|
|
443
|
+
// The content of a static row is a `fieldset`, whose border, margin, and padding are reset.
|
|
444
|
+
border: 'none !custom',
|
|
445
|
+
columnGap: '12',
|
|
446
|
+
display: 'flex',
|
|
447
|
+
flexGrow: '1 !custom',
|
|
448
|
+
margin: '0',
|
|
449
|
+
minWidth: '0',
|
|
450
|
+
padding: '0',
|
|
451
|
+
textAlign: 'start',
|
|
452
|
+
selectors: {
|
|
453
|
+
// A select in a row reads as the row's value: it hugs its value at the end in the row's
|
|
454
|
+
// type, fits the row's 32px control height, and draws no fill, since the row draws the
|
|
455
|
+
// hover. A disabled or invalid trigger keeps its own fill. Its box ends on the content
|
|
456
|
+
// edge, so it never overflows the container, and its chevron sits 8px inside its focus
|
|
457
|
+
// ring. `:is(*, :focus-visible)` outweighs the trigger's focus padding, so focus never moves
|
|
458
|
+
// the value. `Select.Trigger` marks itself, so text-input comboboxes keep their field and a
|
|
459
|
+
// trigger rendered as another element still matches.
|
|
460
|
+
'& [data-select-trigger][role="combobox"]:is(*, :focus-visible)': {
|
|
461
|
+
flex: '0 1 auto !custom',
|
|
462
|
+
font: 'inherit !custom',
|
|
463
|
+
height: '32',
|
|
464
|
+
letterSpacing: 'inherit !custom',
|
|
465
|
+
marginInlineStart: 'auto !custom',
|
|
466
|
+
minWidth: '0',
|
|
467
|
+
paddingInline: '8',
|
|
468
|
+
width: 'auto !custom',
|
|
469
|
+
},
|
|
470
|
+
'& [data-select-trigger]:not(:disabled, [data-disabled], [data-invalid], [aria-invalid="true"])':
|
|
471
|
+
{
|
|
472
|
+
backgroundColor: 'transparent !custom',
|
|
473
|
+
},
|
|
474
|
+
'& [data-select-trigger] > [data-select-value]': { flex: '0 1 auto !custom' },
|
|
475
|
+
},
|
|
476
|
+
},
|
|
477
|
+
{ id: 'tds/web/list-group/content' },
|
|
478
|
+
)
|
|
479
|
+
|
|
480
|
+
export const description = variants(
|
|
481
|
+
{ base: { color: 'content.secondary', display: 'block', typography: 'body.b3' } },
|
|
482
|
+
{ id: 'tds/web/list-group/description' },
|
|
483
|
+
)
|
|
484
|
+
|
|
485
|
+
export const heading = variants(
|
|
486
|
+
{
|
|
487
|
+
base: {
|
|
488
|
+
color: 'content.tertiary',
|
|
489
|
+
display: 'block',
|
|
490
|
+
margin: '0',
|
|
491
|
+
paddingBlockEnd: '8',
|
|
492
|
+
typography: 'body.b3Strong',
|
|
493
|
+
},
|
|
494
|
+
},
|
|
495
|
+
{ id: 'tds/web/list-group/heading' },
|
|
496
|
+
)
|
|
497
|
+
|
|
498
|
+
export const icon = variants(
|
|
499
|
+
{
|
|
500
|
+
base: {
|
|
501
|
+
color: 'content.tertiary',
|
|
502
|
+
display: 'inline-flex',
|
|
503
|
+
flexShrink: '0 !custom',
|
|
504
|
+
fontSize: '16',
|
|
505
|
+
selectors: { '& > svg': { height: '16', width: '16' } },
|
|
506
|
+
},
|
|
507
|
+
},
|
|
508
|
+
{ id: 'tds/web/list-group/icon' },
|
|
509
|
+
)
|
|
510
|
+
|
|
511
|
+
export const indicator = style(
|
|
512
|
+
{ color: 'content.tertiary', flexShrink: '0 !custom', fontSize: '16' },
|
|
513
|
+
{ id: 'tds/web/list-group/indicator' },
|
|
514
|
+
)
|
|
515
|
+
|
|
516
|
+
export const info = variants(
|
|
517
|
+
{
|
|
518
|
+
base: {
|
|
519
|
+
display: 'flex',
|
|
520
|
+
flexDirection: 'column',
|
|
521
|
+
flexGrow: '1 !custom',
|
|
522
|
+
minWidth: '0',
|
|
523
|
+
rowGap: '4',
|
|
524
|
+
},
|
|
525
|
+
defaultVariants: { size: 'medium' },
|
|
526
|
+
variants: {
|
|
527
|
+
size: {
|
|
528
|
+
large: {
|
|
529
|
+
rowGap: '2',
|
|
530
|
+
selectors: {
|
|
531
|
+
'& > [data-description]': { typography: 'mono.m1' },
|
|
532
|
+
'& > [data-title]': { typography: 'body.b1Strong' },
|
|
533
|
+
},
|
|
534
|
+
},
|
|
535
|
+
medium: {},
|
|
536
|
+
},
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
{ id: 'tds/web/list-group/info' },
|
|
540
|
+
)
|
|
541
|
+
|
|
542
|
+
export const label = variants(
|
|
543
|
+
{
|
|
544
|
+
base: {
|
|
545
|
+
color: 'content.secondary',
|
|
546
|
+
flexShrink: '0 !custom',
|
|
547
|
+
marginInlineEnd: 'auto !custom',
|
|
548
|
+
},
|
|
549
|
+
},
|
|
550
|
+
{ id: 'tds/web/list-group/label' },
|
|
551
|
+
)
|
|
552
|
+
|
|
553
|
+
export const meter = variants(
|
|
554
|
+
{ base: { alignItems: 'center', columnGap: '12', display: 'flex', flexShrink: '0 !custom' } },
|
|
555
|
+
{ id: 'tds/web/list-group/meter' },
|
|
556
|
+
)
|
|
557
|
+
|
|
558
|
+
// Base UI sets the width inline. The track clips the square end of the used part.
|
|
559
|
+
export const meterIndicator = style(
|
|
560
|
+
{
|
|
561
|
+
backgroundColor: 'content.primary',
|
|
562
|
+
transitionDuration: '240',
|
|
563
|
+
transitionProperty: 'width',
|
|
564
|
+
transitionTimingFunction: 'spring',
|
|
565
|
+
'@media (prefers-reduced-motion: reduce)': { transitionProperty: 'none' },
|
|
566
|
+
},
|
|
567
|
+
{ id: 'tds/web/list-group/meter-indicator' },
|
|
568
|
+
)
|
|
569
|
+
|
|
570
|
+
export const meterTrack = style(
|
|
571
|
+
{
|
|
572
|
+
backgroundColor: 'container.strong',
|
|
573
|
+
borderRadius: 'full',
|
|
574
|
+
cornerShape: 'round',
|
|
575
|
+
flexShrink: '0 !custom',
|
|
576
|
+
height: '4',
|
|
577
|
+
overflow: 'hidden',
|
|
578
|
+
width: '64',
|
|
579
|
+
},
|
|
580
|
+
{ id: 'tds/web/list-group/meter-track' },
|
|
581
|
+
)
|
|
582
|
+
|
|
583
|
+
// The value column keeps 112px, so the bars of neighboring rows line up.
|
|
584
|
+
export const meterValue = style(
|
|
585
|
+
{
|
|
586
|
+
color: 'content.primary',
|
|
587
|
+
minWidth: '7rem !custom',
|
|
588
|
+
textAlign: 'end',
|
|
589
|
+
typography: 'body.b3',
|
|
590
|
+
whiteSpace: 'nowrap',
|
|
591
|
+
},
|
|
592
|
+
{ id: 'tds/web/list-group/meter-value' },
|
|
593
|
+
)
|
|
594
|
+
|
|
595
|
+
// A 16px ring that thickens from 1.5px to 5px when checked. The row draws the focus ring.
|
|
596
|
+
export const radio = style(
|
|
597
|
+
{
|
|
598
|
+
borderRadius: 'full',
|
|
599
|
+
boxShadow: 'inset 0 0 0 1.5px currentColor !custom',
|
|
600
|
+
boxSizing: 'border-box',
|
|
601
|
+
color: 'line.secondary',
|
|
602
|
+
cornerShape: 'round',
|
|
603
|
+
display: 'block',
|
|
604
|
+
flexShrink: '0 !custom',
|
|
605
|
+
height: '16',
|
|
606
|
+
outline: 'none !custom',
|
|
607
|
+
transitionDuration: '160',
|
|
608
|
+
transitionProperty: 'box-shadow, color',
|
|
609
|
+
transitionTimingFunction: 'snappy',
|
|
610
|
+
width: '16',
|
|
611
|
+
selectors: {
|
|
612
|
+
'&[data-checked]': {
|
|
613
|
+
boxShadow: 'inset 0 0 0 5px currentColor !custom',
|
|
614
|
+
color: 'content.primary',
|
|
615
|
+
},
|
|
616
|
+
},
|
|
617
|
+
'@media (prefers-reduced-motion: reduce)': { transitionProperty: 'color' },
|
|
618
|
+
},
|
|
619
|
+
{ id: 'tds/web/list-group/radio' },
|
|
620
|
+
)
|
|
621
|
+
|
|
622
|
+
export const radioGroup = variants(
|
|
623
|
+
{
|
|
624
|
+
base: {
|
|
625
|
+
color: 'content.primary',
|
|
626
|
+
display: 'flex',
|
|
627
|
+
flexDirection: 'column',
|
|
628
|
+
rowGap: '12',
|
|
629
|
+
typography: 'body.b2',
|
|
630
|
+
},
|
|
631
|
+
},
|
|
632
|
+
{ id: 'tds/web/list-group/radio-group' },
|
|
633
|
+
)
|
|
634
|
+
|
|
635
|
+
export const root = variants(
|
|
636
|
+
{
|
|
637
|
+
base: {
|
|
638
|
+
boxSizing: 'border-box',
|
|
639
|
+
color: 'content.primary',
|
|
640
|
+
display: 'block',
|
|
641
|
+
typography: 'body.b3',
|
|
642
|
+
selectors: {
|
|
643
|
+
'& [data-divider]': { position: 'relative' },
|
|
644
|
+
'& [data-divider]::before': {
|
|
645
|
+
backgroundColor: 'line.secondary',
|
|
646
|
+
content: '"" !custom',
|
|
647
|
+
height: '1',
|
|
648
|
+
insetBlockStart: '0',
|
|
649
|
+
insetInline: '0',
|
|
650
|
+
pointerEvents: 'none',
|
|
651
|
+
position: 'absolute',
|
|
652
|
+
},
|
|
653
|
+
'& > [data-divider]:first-child::before': { display: 'none' },
|
|
654
|
+
// A title over a description pads 12px, which fits a 40px leading image.
|
|
655
|
+
'& [data-divider]:has([data-info])': { paddingBlock: '12' },
|
|
656
|
+
// A row with a meter pads 10px, which centers a 24px agent logo in 44px.
|
|
657
|
+
'& [data-divider]:has([role="meter"])': { paddingBlock: '10' },
|
|
658
|
+
// A hovered row's fill would otherwise sit between two visible separators.
|
|
659
|
+
'& [data-divider]:is(a[href], button, [role="button"], :has(:where(a[href], :is(button, input, select, textarea, [data-select-trigger]):not(:disabled, [data-disabled])))):not(:disabled, [data-disabled]):hover::before':
|
|
660
|
+
{ display: 'none' },
|
|
661
|
+
'& [data-divider]:is(a[href], button, [role="button"], :has(:where(a[href], :is(button, input, select, textarea, [data-select-trigger]):not(:disabled, [data-disabled])))):not(:disabled, [data-disabled]):hover + [data-divider]::before':
|
|
662
|
+
{ display: 'none' },
|
|
663
|
+
},
|
|
664
|
+
},
|
|
665
|
+
defaultVariants: { dividers: true, variant: 'plain' },
|
|
666
|
+
variants: {
|
|
667
|
+
dividers: {
|
|
668
|
+
false: { selectors: { '& [data-divider]::before': { display: 'none' } } },
|
|
669
|
+
true: {},
|
|
670
|
+
},
|
|
671
|
+
// The block keeps a 16px radius with 16px sides, below the usual one and a half times.
|
|
672
|
+
variant: {
|
|
673
|
+
boxed: {
|
|
674
|
+
backgroundColor: 'background.secondary',
|
|
675
|
+
borderColor: 'line.secondary',
|
|
676
|
+
borderRadius: 'sm',
|
|
677
|
+
borderStyle: 'solid',
|
|
678
|
+
borderWidth: 'regular',
|
|
679
|
+
isolation: 'isolate !custom',
|
|
680
|
+
paddingBlock: '8',
|
|
681
|
+
paddingInline: '16',
|
|
682
|
+
selectors: {
|
|
683
|
+
// A large title leads the group from the block's own top padding.
|
|
684
|
+
'& > [data-divider]:first-child:has([data-info][data-size="large"])': {
|
|
685
|
+
paddingBlockStart: '0',
|
|
686
|
+
},
|
|
687
|
+
// A row's fill is a layer behind the row that reaches the border across the block's
|
|
688
|
+
// 16px sides, and its 8px above the first row and below the last. The row keeps its
|
|
689
|
+
// place, and the fill rounds inside the border at the block's corners.
|
|
690
|
+
'& > [data-divider]::after': {
|
|
691
|
+
backgroundColor: 'transparent !custom',
|
|
692
|
+
content: '"" !custom',
|
|
693
|
+
insetBlock: '0',
|
|
694
|
+
insetInline: '-16',
|
|
695
|
+
position: 'absolute',
|
|
696
|
+
transitionDuration: '160',
|
|
697
|
+
transitionProperty: 'background-color',
|
|
698
|
+
transitionTimingFunction: 'snappy',
|
|
699
|
+
zIndex: '-1 !custom',
|
|
700
|
+
},
|
|
701
|
+
'& > [data-divider]:first-child::after': {
|
|
702
|
+
borderStartEndRadius: `calc(${vars.radius.sm} - 1px) !custom`,
|
|
703
|
+
borderStartStartRadius: `calc(${vars.radius.sm} - 1px) !custom`,
|
|
704
|
+
insetBlockStart: '-8',
|
|
705
|
+
},
|
|
706
|
+
'& > [data-divider]:last-child::after': {
|
|
707
|
+
borderEndEndRadius: `calc(${vars.radius.sm} - 1px) !custom`,
|
|
708
|
+
borderEndStartRadius: `calc(${vars.radius.sm} - 1px) !custom`,
|
|
709
|
+
insetBlockEnd: '-8',
|
|
710
|
+
},
|
|
711
|
+
'& > [data-divider]:is(a[href], button, [role="button"], :has(:where(a[href], :is(button, input, select, textarea, [data-select-trigger]):not(:disabled, [data-disabled])))):not(:disabled, [data-disabled], [data-radio]):hover::after':
|
|
712
|
+
{ backgroundColor: 'container.regular' },
|
|
713
|
+
'& > [data-divider]:is(a[href], button, [role="button"]):not(:disabled, [data-disabled]):active::after':
|
|
714
|
+
{
|
|
715
|
+
backgroundColor: 'container.strong',
|
|
716
|
+
},
|
|
717
|
+
},
|
|
718
|
+
'@media (prefers-reduced-motion: reduce)': {
|
|
719
|
+
selectors: { '& > [data-divider]::after': { transitionProperty: 'none' } },
|
|
720
|
+
},
|
|
721
|
+
},
|
|
722
|
+
plain: {},
|
|
723
|
+
spaced: {
|
|
724
|
+
backgroundColor: 'background.secondary',
|
|
725
|
+
borderColor: 'line.secondary',
|
|
726
|
+
borderRadius: 'sm',
|
|
727
|
+
borderStyle: 'solid',
|
|
728
|
+
borderWidth: 'regular',
|
|
729
|
+
display: 'flex',
|
|
730
|
+
flexDirection: 'column',
|
|
731
|
+
padding: '16',
|
|
732
|
+
rowGap: '12',
|
|
733
|
+
typography: 'body.b2',
|
|
734
|
+
selectors: {
|
|
735
|
+
'& [data-divider]::before': { display: 'none' },
|
|
736
|
+
'& [data-divider], & [data-divider]:is(:has([data-info]), :has([role="meter"]))': {
|
|
737
|
+
minHeight: '0',
|
|
738
|
+
paddingBlock: '0',
|
|
739
|
+
},
|
|
740
|
+
},
|
|
741
|
+
},
|
|
742
|
+
},
|
|
743
|
+
},
|
|
744
|
+
},
|
|
745
|
+
{ id: 'tds/web/list-group/root' },
|
|
746
|
+
)
|
|
747
|
+
|
|
748
|
+
// 36px, with block padding that leaves room for a 32px control.
|
|
749
|
+
export const row = variants(
|
|
750
|
+
{
|
|
751
|
+
base: {
|
|
752
|
+
alignItems: 'center',
|
|
753
|
+
backgroundColor: 'transparent !custom',
|
|
754
|
+
border: 'none !custom',
|
|
755
|
+
boxSizing: 'border-box',
|
|
756
|
+
color: 'inherit !custom',
|
|
757
|
+
columnGap: '12',
|
|
758
|
+
display: 'flex',
|
|
759
|
+
font: 'inherit !custom',
|
|
760
|
+
minHeight: '36',
|
|
761
|
+
outlineColor: 'transparent !custom',
|
|
762
|
+
outlineOffset: '0',
|
|
763
|
+
outlineStyle: 'solid !custom',
|
|
764
|
+
outlineWidth: '2',
|
|
765
|
+
paddingBlock: '2',
|
|
766
|
+
paddingInline: '0',
|
|
767
|
+
textAlign: 'start',
|
|
768
|
+
textDecoration: 'none !custom',
|
|
769
|
+
transitionDuration: '160',
|
|
770
|
+
transitionProperty: 'background-color, box-shadow, opacity, outline-color, outline-offset',
|
|
771
|
+
transitionTimingFunction: 'snappy',
|
|
772
|
+
width: '100% !custom',
|
|
773
|
+
selectors: {
|
|
774
|
+
// The row keeps Figma's List Row geometry, flush with its content, and its fill bleeds
|
|
775
|
+
// 12px past the content at each side. A shadow on each side draws the bleed: an outer
|
|
776
|
+
// shadow never paints under the row, so a translucent fill never doubles. A dialog body
|
|
777
|
+
// scrolls and clips at its 4px padding, so the bleed there is 4px, except in a surface,
|
|
778
|
+
// whose rows draw none. A boxed group draws the fill behind its rows. A static row that holds an enabled control takes the same fill
|
|
779
|
+
// on hover, without becoming pressable.
|
|
780
|
+
'&:is(a[href], button, [role="button"], :has(:where(a[href], :is(button, input, select, textarea, [data-select-trigger]):not(:disabled, [data-disabled])))):not([data-radio])':
|
|
781
|
+
{ borderRadius: 'xs' },
|
|
782
|
+
'&:is(a[href], button, [role="button"], :has(:where(a[href], :is(button, input, select, textarea, [data-select-trigger]):not(:disabled, [data-disabled])))):not(:disabled, [data-disabled], [data-radio], [data-variant="boxed"] > *):hover':
|
|
783
|
+
{
|
|
784
|
+
backgroundColor: 'container.regular',
|
|
785
|
+
boxShadow: `-12px 0 0 0 ${vars.color.container.regular}, 12px 0 0 0 ${vars.color.container.regular} !custom`,
|
|
786
|
+
},
|
|
787
|
+
'&:is(a[href], button, [role="button"]):not(:disabled, [data-disabled])': {
|
|
788
|
+
cursor: 'pointer',
|
|
789
|
+
},
|
|
790
|
+
'&:is(a[href], button, [role="button"]):not(:disabled, [data-disabled], [data-variant="boxed"] > *):active':
|
|
791
|
+
{
|
|
792
|
+
backgroundColor: 'container.strong',
|
|
793
|
+
boxShadow: `-12px 0 0 0 ${vars.color.container.strong}, 12px 0 0 0 ${vars.color.container.strong} !custom`,
|
|
794
|
+
},
|
|
795
|
+
':is([data-dialog-body], [data-dialog-body] :not([data-surface-size])) > [data-list-group]:not([data-variant="boxed"]) > &:is(a[href], button, [role="button"], :has(:where(a[href], :is(button, input, select, textarea, [data-select-trigger]):not(:disabled, [data-disabled])))):not(:disabled, [data-disabled], [data-radio]):hover':
|
|
796
|
+
{
|
|
797
|
+
boxShadow: `-4px 0 0 0 ${vars.color.container.regular}, 4px 0 0 0 ${vars.color.container.regular} !custom`,
|
|
798
|
+
},
|
|
799
|
+
':is([data-dialog-body], [data-dialog-body] :not([data-surface-size])) > [data-list-group]:not([data-variant="boxed"]) > &:is(a[href], button, [role="button"]):not(:disabled, [data-disabled]):active':
|
|
800
|
+
{
|
|
801
|
+
boxShadow: `-4px 0 0 0 ${vars.color.container.strong}, 4px 0 0 0 ${vars.color.container.strong} !custom`,
|
|
802
|
+
},
|
|
803
|
+
'&:is(a[href], button, [role="button"]):focus-visible': {
|
|
804
|
+
outlineColor: 'border.focus',
|
|
805
|
+
outlineOffset: '-2',
|
|
806
|
+
},
|
|
807
|
+
// A radio row is a bordered block whose border thickens when checked and focused, as
|
|
808
|
+
// Figma lays out its stroke, so the row grows by 1px a side for focus.
|
|
809
|
+
'&[data-radio]': {
|
|
810
|
+
backgroundColor: 'background.elevated',
|
|
811
|
+
borderColor: 'line.secondary',
|
|
812
|
+
borderRadius: 'xs',
|
|
813
|
+
borderStyle: 'solid',
|
|
814
|
+
borderWidth: 'regular',
|
|
815
|
+
cursor: 'pointer',
|
|
816
|
+
paddingBlock: '12',
|
|
817
|
+
paddingInline: '16',
|
|
818
|
+
transitionProperty: 'background-color, border-color, opacity, scale !custom',
|
|
819
|
+
userSelect: 'none',
|
|
820
|
+
},
|
|
821
|
+
'&[data-radio]:hover:not(:has(> [data-checked], > :focus-visible, > [data-disabled]))': {
|
|
822
|
+
borderColor: 'line.primary',
|
|
823
|
+
},
|
|
824
|
+
'&[data-radio]:has(> [data-checked])': {
|
|
825
|
+
borderColor: 'content.primary',
|
|
826
|
+
borderWidth: '1.5px !custom',
|
|
827
|
+
},
|
|
828
|
+
'&[data-radio]:has(> [data-checked]):hover:not(:has(> [data-disabled]))': {
|
|
829
|
+
backgroundColor: 'container.regular',
|
|
830
|
+
},
|
|
831
|
+
'&[data-radio]:has(> [role="radio"]:focus-visible)': {
|
|
832
|
+
borderColor: 'border.focus',
|
|
833
|
+
borderWidth: 'thick',
|
|
834
|
+
},
|
|
835
|
+
'&[data-radio]:active:not(:has(> [data-disabled]))': { scale: 'press' },
|
|
836
|
+
'&[data-disabled], &[data-radio]:has(> [data-disabled])': {
|
|
837
|
+
cursor: 'default',
|
|
838
|
+
opacity: 'disabled',
|
|
839
|
+
},
|
|
840
|
+
},
|
|
841
|
+
'@media (prefers-reduced-motion: reduce)': {
|
|
842
|
+
transitionProperty: 'background-color, box-shadow, opacity, outline-color',
|
|
843
|
+
selectors: {
|
|
844
|
+
'&[data-radio]': { transitionProperty: 'background-color, border-color, opacity' },
|
|
845
|
+
'&[data-radio]:active': { scale: 'none !custom' },
|
|
846
|
+
},
|
|
847
|
+
},
|
|
848
|
+
},
|
|
849
|
+
},
|
|
850
|
+
{ id: 'tds/web/list-group/row' },
|
|
851
|
+
)
|
|
852
|
+
|
|
853
|
+
export const title = variants(
|
|
854
|
+
{ base: { color: 'content.primary', display: 'block', typography: 'body.b2Strong' } },
|
|
855
|
+
{ id: 'tds/web/list-group/title' },
|
|
856
|
+
)
|
|
857
|
+
}
|