rift-ds 1.34.0 → 1.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/behaviors/chat-card.css +6 -0
- package/behaviors/direction.css +6 -0
- package/behaviors/locale.d.ts +9 -0
- package/behaviors/locale.js +2 -0
- package/behaviors/shell.css +6 -0
- package/behaviors/shortcuts.js +2 -2
- package/behaviors/visually-hidden.css +6 -0
- package/bin/templates/blocks/app/dashboard/page.tsx +1 -1
- package/bin/templates/blocks/app/settings/ProfileForm.tsx +1 -1
- package/bin/templates/blocks/app/sign-in/page.tsx +3 -3
- package/bin/templates/blocks/components/blocks/AppShell.module.css +10 -6
- package/chat/ChatAgentPane.css +6 -0
- package/chat/ChatTabs.js +1 -1
- package/chat/ChatWidget.css +6 -0
- package/chat/ChatWidget.d.ts +2 -2
- package/chat/ChatWidget.js +1 -1
- package/chat/DemoWelcome.js +2 -2
- package/chat/FollowupSuggestions.js +1 -1
- package/chat/demo.css +6 -0
- package/chat/queries.js +1 -1
- package/chat/selection.css +6 -0
- package/components/Accordion/Accordion.css +6 -0
- package/components/ActionBar/ActionBar.css +84 -0
- package/components/ActionBar/ActionBar.d.ts +40 -0
- package/components/ActionBar/ActionBar.js +29 -0
- package/components/ActionCard/ActionCard.css +6 -0
- package/components/ActionReadout/ActionReadout.css +6 -0
- package/components/AgentPlan/AgentPlan.css +6 -0
- package/components/AgentRail/AgentRail.css +6 -0
- package/components/AgentStatus/AgentStatus.css +12 -7
- package/components/AiButton/AiButton.css +17 -11
- package/components/AiButton/AiButton.js +1 -1
- package/components/Alert/Alert.css +22 -0
- package/components/Alert/Alert.d.ts +2 -2
- package/components/Alert/Alert.js +3 -1
- package/components/AlertDialog/AlertDialog.css +6 -0
- package/components/AnchorNav/AnchorNav.css +6 -0
- package/components/AnimatedNumber/AnimatedNumber.css +5 -0
- package/components/AppLayout/AppLayout.css +6 -0
- package/components/AppSidebar/AppSidebar.css +159 -5
- package/components/AppSidebar/AppSidebar.d.ts +13 -1
- package/components/AppSidebar/AppSidebar.js +17 -7
- package/components/ArtifactCard/ArtifactCard.css +6 -0
- package/components/ArtifactPanel/ArtifactPanel.css +6 -0
- package/components/Attachment/Attachment.css +6 -0
- package/components/Attachment/AttachmentGroup.js +4 -1
- package/components/Avatar/Avatar.css +6 -0
- package/components/AvatarGroup/AvatarGroup.css +6 -0
- package/components/BackToTop/BackToTop.css +6 -0
- package/components/Badge/Badge.css +6 -0
- package/components/Banner/Banner.css +6 -0
- package/components/BentoTile/BentoTile.css +6 -0
- package/components/BottomNav/BottomNav.css +6 -0
- package/components/Breadcrumb/Breadcrumb.css +6 -0
- package/components/Button/Button.css +6 -0
- package/components/Button/Button.d.ts +7 -1
- package/components/Button/Button.js +2 -1
- package/components/ButtonGroup/ButtonGroup.css +6 -0
- package/components/Card/Card.css +6 -0
- package/components/CardStack/CardStack.css +5 -0
- package/components/Carousel/Carousel.css +6 -0
- package/components/Chart/Chart.css +9 -1
- package/components/ChatHeader/ChatHeader.css +6 -0
- package/components/ChatMarker/ChatMarker.css +6 -0
- package/components/ChatMessage/ChatMessage.css +6 -0
- package/components/ChatThread/ChatThread.css +6 -0
- package/components/ChatThread/ChatThread.d.ts +5 -1
- package/components/ChatThread/ChatThread.js +1 -1
- package/components/Checkbox/Checkbox.css +6 -0
- package/components/Checkbox/Checkbox.js +1 -1
- package/components/Checklist/Checklist.css +6 -0
- package/components/Chip/Chip.css +6 -0
- package/components/CodeBlock/CodeBlock.css +6 -0
- package/components/CodeDiff/CodeDiff.css +5 -0
- package/components/ColorPicker/ColorPicker.css +6 -0
- package/components/ColourSwatch/ColourSwatch.css +6 -0
- package/components/Combobox/Combobox.css +6 -0
- package/components/CommandPalette/CommandPalette.css +6 -0
- package/components/CommandPaletteTrigger/CommandPaletteTrigger.css +6 -0
- package/components/Composer/Composer.css +6 -0
- package/components/ContactCard/ContactCard.css +6 -0
- package/components/ContextMenu/ContextMenu.css +6 -0
- package/components/ContextMenu/ContextMenu.d.ts +5 -1
- package/components/ContextMenu/ContextMenu.js +2 -1
- package/components/ContributionGraph/ContributionGraph.css +6 -0
- package/components/ContributionGraph/ContributionGraph.d.ts +7 -1
- package/components/ContributionGraph/ContributionGraph.js +4 -18
- package/components/ContributionGraph/weeks.d.ts +8 -0
- package/components/ContributionGraph/weeks.js +25 -0
- package/components/CurrencyInput/CurrencyInput.css +6 -0
- package/components/DataTable/DataTable.css +6 -0
- package/components/DataTable/DataTable.js +7 -3
- package/components/DateInput/DateInput.css +6 -0
- package/components/DatePicker/DatePicker.css +6 -0
- package/components/DateRangePicker/DateRangePicker.css +6 -0
- package/components/Deadline/Deadline.css +6 -0
- package/components/DecisionRow/DecisionRow.css +6 -0
- package/components/DescriptionList/DescriptionList.css +6 -0
- package/components/Dialog/Dialog.css +6 -0
- package/components/Divider/Divider.css +6 -0
- package/components/DocumentChip/DocumentChip.css +6 -0
- package/components/DocumentChip/DocumentChip.js +1 -1
- package/components/DocumentViewer/DocumentViewer.css +6 -0
- package/components/Drawer/Drawer.css +6 -0
- package/components/Dropdown/ChosenMark.css +6 -0
- package/components/Dropdown/Dropdown.css +6 -0
- package/components/Dropdown/Dropdown.js +1 -1
- package/components/DropdownMenu/DropdownMenu.css +6 -0
- package/components/EmptyState/EmptyState.css +6 -0
- package/components/EntityCard/EntityCard.css +6 -0
- package/components/EntitySwitcher/EntitySwitcher.css +17 -3
- package/components/EntitySwitcher/EntitySwitcher.js +1 -1
- package/components/ErrorSummary/ErrorSummary.css +6 -0
- package/components/ErrorSummary/ErrorSummary.js +3 -1
- package/components/EventCalendar/EventCalendar.css +158 -0
- package/components/EventCalendar/EventCalendar.d.ts +50 -4
- package/components/EventCalendar/EventCalendar.js +154 -23
- package/components/EventCalendar/eventTime.d.ts +31 -0
- package/components/EventCalendar/eventTime.js +42 -0
- package/components/Field/Field.css +6 -0
- package/components/Figure/Figure.css +6 -0
- package/components/FileInput/FileInput.css +6 -0
- package/components/FileInput/FileInput.d.ts +12 -4
- package/components/FileInput/FileInput.js +27 -4
- package/components/FilterBar/FilterBar.css +9 -1
- package/components/FormSection/FormSection.css +6 -0
- package/components/FunnelChart/FunnelChart.css +6 -0
- package/components/GanttChart/GanttChart.css +6 -0
- package/components/Gauge/Gauge.css +6 -0
- package/components/Globe/Globe.css +6 -0
- package/components/Grid/Grid.css +6 -0
- package/components/Heading/Heading.css +6 -0
- package/components/HoverCard/HoverCard.css +6 -0
- package/components/Icon/Icon.css +6 -0
- package/components/IconButton/IconButton.css +6 -0
- package/components/IconButton/IconButton.d.ts +7 -1
- package/components/IconButton/IconButton.js +2 -1
- package/components/ImageCompare/ImageCompare.css +6 -0
- package/components/Input/Input.css +52 -4
- package/components/Input/Input.d.ts +8 -0
- package/components/Input/Input.js +3 -0
- package/components/Inspector/Inspector.css +6 -0
- package/components/Instructions/Instructions.css +6 -0
- package/components/InterruptCard/InterruptCard.css +6 -0
- package/components/Kbd/Kbd.css +6 -0
- package/components/LegendTile/LegendTile.css +6 -0
- package/components/Lightbox/Lightbox.css +6 -0
- package/components/Link/Link.css +9 -1
- package/components/LinkList/LinkList.css +6 -0
- package/components/List/List.css +6 -0
- package/components/MapCallout/MapCallout.css +6 -0
- package/components/MapLegend/MapLegend.css +6 -0
- package/components/MaskedInput/MaskedInput.css +6 -0
- package/components/MegaMenu/MegaMenu.css +6 -0
- package/components/Mention/Mention.css +6 -0
- package/components/Mention/Mention.js +1 -1
- package/components/Menubar/Menubar.css +6 -0
- package/components/MessageActions/MessageActions.css +6 -0
- package/components/MessageCard/MessageCard.css +6 -0
- package/components/Meter/Meter.css +6 -0
- package/components/ModelPicker/ModelPicker.css +6 -0
- package/components/MotionSwatch/MotionSwatch.css +6 -0
- package/components/Nav/Nav.css +6 -0
- package/components/NavList/NavList.css +6 -0
- package/components/NotificationCenter/NotificationCenter.css +6 -0
- package/components/NumberInput/NumberInput.css +6 -0
- package/components/OrgChart/OrgChart.css +6 -0
- package/components/PageHeader/PageHeader.css +6 -0
- package/components/Pagination/Pagination.css +6 -0
- package/components/Panel/Panel.css +6 -0
- package/components/PinInput/PinInput.css +6 -0
- package/components/PixelAvatar/PixelAvatar.css +6 -0
- package/components/Popover/Popover.css +6 -0
- package/components/Popover/Popover.d.ts +5 -1
- package/components/Popover/Popover.js +3 -1
- package/components/ProgressBar/ProgressBar.css +6 -0
- package/components/ProgressBar/ProgressBar.d.ts +5 -1
- package/components/ProgressBar/ProgressBar.js +1 -1
- package/components/ProgressiveBlur/ProgressiveBlur.css +6 -0
- package/components/PromptSuggestions/PromptSuggestions.css +5 -0
- package/components/PromptSuggestions/PromptSuggestions.d.ts +5 -1
- package/components/PromptSuggestions/PromptSuggestions.js +1 -1
- package/components/Prose/Prose.css +6 -0
- package/components/QuestionCard/QuestionCard.css +5 -0
- package/components/Quote/Quote.css +6 -0
- package/components/RadioButton/RadioButton.css +6 -0
- package/components/Rating/Rating.css +6 -0
- package/components/Reasoning/Reasoning.css +6 -0
- package/components/ResourceTimeline/ResourceTimeline.css +6 -0
- package/components/ResourceTimeline/ResourceTimeline.js +2 -2
- package/components/RichDropdown/RichDropdown.css +6 -0
- package/components/SectionTitle/SectionTitle.css +6 -0
- package/components/SegmentedControl/SegmentedControl.css +126 -3
- package/components/SegmentedControl/SegmentedControl.d.ts +9 -0
- package/components/SegmentedControl/SegmentedControl.js +11 -1
- package/components/SelectionCard/SelectionCard.css +6 -0
- package/components/ShaderField/ShaderField.css +6 -0
- package/components/ShaderField/ShaderField.js +2 -0
- package/components/ShaderScene/ShaderScene.css +6 -0
- package/components/ShaderScene/ShaderScene.d.ts +3 -3
- package/components/ShaderScene/scenes.d.ts +17 -0
- package/components/ShaderScene/scenes.js +175 -1
- package/components/SidebarPanel/SidebarPanel.css +6 -0
- package/components/SignaturePad/SignaturePad.css +6 -0
- package/components/SiteFooter/SiteFooter.css +6 -0
- package/components/SiteHeader/SiteHeader.css +6 -0
- package/components/SiteLayout/SiteLayout.css +6 -0
- package/components/Skeleton/Skeleton.css +6 -0
- package/components/Slider/Slider.css +6 -0
- package/components/SourceChip/SourceChip.css +6 -0
- package/components/SourceTrail/SourceTrail.css +6 -0
- package/components/SpacingSwatch/SpacingSwatch.css +6 -0
- package/components/Sparkline/Sparkline.css +6 -0
- package/components/Spinner/Spinner.css +6 -0
- package/components/SplitButton/SplitButton.css +6 -0
- package/components/SplitButton/SplitButton.d.ts +7 -1
- package/components/SplitButton/SplitButton.js +3 -1
- package/components/SplitPane/SplitPane.css +6 -0
- package/components/Stack/Stack.css +6 -0
- package/components/Stat/Stat.css +25 -1
- package/components/Stat/Stat.d.ts +5 -0
- package/components/Stat/Stat.js +9 -3
- package/components/StatusDot/StatusDot.css +6 -0
- package/components/Stepper/Stepper.css +6 -0
- package/components/StreamingText/StreamingText.css +6 -0
- package/components/Swatch/Swatch.css +6 -0
- package/components/Table/Table.css +15 -1
- package/components/TableToolbar/TableToolbar.css +6 -0
- package/components/TableToolbar/TableToolbar.js +2 -2
- package/components/Tabs/Tabs.css +6 -0
- package/components/TagInput/TagInput.css +6 -0
- package/components/Text/Text.css +6 -0
- package/components/Textarea/Textarea.css +5 -0
- package/components/ThemePicker/ThemePicker.css +6 -0
- package/components/ThemeToggle/ThemeToggle.css +6 -0
- package/components/ThemeToggle/ThemeToggle.d.ts +1 -1
- package/components/ThreadPanel/ThreadPanel.css +6 -0
- package/components/ThreadTabs/ThreadTabs.css +6 -0
- package/components/ThreadTabs/ThreadTabs.d.ts +5 -1
- package/components/ThreadTabs/ThreadTabs.js +2 -1
- package/components/TimePicker/TimePicker.css +6 -0
- package/components/Timeline/Timeline.css +18 -18
- package/components/Toast/Toast.css +6 -0
- package/components/Toast/Toast.js +1 -1
- package/components/ToggleGroup/ToggleGroup.css +6 -0
- package/components/ToggleGroup/ToggleGroup.d.ts +5 -1
- package/components/ToggleSwitch/ToggleSwitch.css +21 -3
- package/components/ToggleSwitch/ToggleSwitch.d.ts +1 -1
- package/components/ToggleSwitch/ToggleSwitch.js +2 -2
- package/components/ToolCall/ToolCall.css +6 -0
- package/components/Toolbar/Toolbar.css +6 -0
- package/components/Tooltip/Tooltip.css +6 -0
- package/components/TopAppBar/TopAppBar.css +6 -0
- package/components/TreeView/TreeView.css +6 -0
- package/components/TypographySwatch/TypographySwatch.css +6 -0
- package/components/UsageCard/UsageCard.css +6 -0
- package/components/Waveform/Waveform.css +6 -0
- package/components/Widget/Widget.css +6 -0
- package/components/Wizard/Wizard.css +6 -0
- package/components/WorldMap/WorldMap.css +6 -0
- package/components/registry.json +21 -4
- package/components/registry.json.d.ts +21 -4
- package/components/registry.json.js +1 -1
- package/fonts/material-symbols.css +10 -0
- package/index.d.ts +1 -0
- package/index.js +2 -0
- package/package.json +1 -1
- package/tokens/base.css +11 -2
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ An open source React design system built for AI products and coding agents: comp
|
|
|
13
13
|
|
|
14
14
|
## Why Rift DS
|
|
15
15
|
|
|
16
|
-
- **<!-- component-count -->
|
|
16
|
+
- **<!-- component-count -->195<!-- /component-count --> components.** Buttons, forms and tables through to charts, navigation and overlays, each typed and documented with live examples. Every one forwards a ref and your own attributes to its element, state you can own works controlled or uncontrolled (a modal opens when your app says so, by design), and every word a component writes has a prop you can localise. The build checks the first two on every component, and the words wherever they sit in markup. React and React DOM are the only required peer dependencies.
|
|
17
17
|
- **A matching <!-- figma-kit-link -->[Figma kit](https://www.figma.com/community/file/1701820123445795117)<!-- /figma-kit-link -->.** Every component has a page in it, with a sticker sheet of its states, built on variables named after the same tokens. Duplicate it from the Figma Community to design with the same system.
|
|
18
18
|
- **AI patterns, the whole chat and templates, ready to use.** Composer, streaming chat thread, tool calls, reasoning and thread panel are in the box, the complete AI chat ships assembled as one widget that one command scaffolds, and the docs site has complete template screens built from them.
|
|
19
19
|
- **Fully themeable.** The shipped themes are complete looks to start from, each in light and dark. One `data-brand` attribute applies a theme, and a few CSS overrides make your own.
|
|
@@ -107,18 +107,19 @@ import 'rift-ds/tokens/presets/presets.css';
|
|
|
107
107
|
- **Page colours**: the token stylesheet defines custom properties and styles no element, so paint the page once: set `background: var(--color-bg-page-primary)`, `color: var(--color-text-primary)` and `font-family: var(--font-family-primary)` on `body`. Without it a dark theme lands as dark components on a white page.
|
|
108
108
|
- **Your own brand**: every semantic token chains to a primitive, so overriding one primitive re-themes everything built on it. The [playground](https://rift-ds.com/playground) restyles the system live and copies out a complete, paste-ready override.
|
|
109
109
|
- **One part of a shipped theme**: the token and theme stylesheets sit in cascade layers (`rift.tokens`, then `rift.preset`), so any rule of your own outranks them whatever its selector. A plain `:root { --font-family-primary: … }` keeps a preset's colours with your face, in light and dark alike. To set a default that a preset still replaces, declare it inside `@layer rift.tokens { … }`.
|
|
110
|
+
- **Overriding component styles**: component styles sit in a third layer, `rift.components`, after the two token layers, so your own CSS outside a layer always beats them, whatever its selector and in whatever order your bundler loads the sheets. `className` is the supported hook: `.my-table { … }` on `<Table className="my-table" />` holds in development and production alike. That reaches your resets too: a bare `* { margin: 0 }` would strip the components' spacing, so put a reset inside `@layer rift.tokens { … }`, or import `tokens/base.css`, which is already there.
|
|
110
111
|
- **Fonts**: the base theme bundles no text face, and the whole scale chains to `--font-family-primary` (split heading and body faces via `--font-family-heading` and `--font-family-body`); point them at any font you load. Only the preset stylesheets carry faces, each self-hosting its own, and only the presets you import pull them in.
|
|
111
112
|
- **Icons**: a Material Symbols Rounded variable font is bundled and components import it themselves, with every Google axis exposed as a custom property. Every icon prop also takes your own element, so any icon set drops in.
|
|
112
113
|
|
|
113
114
|
## Components
|
|
114
115
|
|
|
115
|
-
<!-- component-count -->
|
|
116
|
+
<!-- component-count -->195<!-- /component-count --> components, including a chat set for AI products (Chat thread, Composer, Tool call, Reasoning, Thread panel) and Shader field, a WebGL2 ambient background whose light sources read your colour tokens at runtime, so it re-themes with everything else. Details and live examples are on the [docs site](https://rift-ds.com/components).
|
|
116
117
|
|
|
117
118
|
<details>
|
|
118
119
|
<summary>The full list</summary>
|
|
119
120
|
|
|
120
121
|
<!-- component-list:start -->
|
|
121
|
-
Accordion · Action card · Action readout · Agent plan · Agent rail · Agent status · AI button · Alert · Alert dialog · Anchor nav · Animated number · App layout · App sidebar · Area chart · Artifact card · Artifact panel · Attachment drop zone · Attachment group · Attachment tile · Attachment viewer · Avatar · Avatar group · Back to top · Badge · Banner · Bar chart · Bento tile · Bento tile art · Bottom nav · Breadcrumb · Button · Button group · Card · Card stack · Carousel · Chat header · Chat marker · Chat message · Chat thread · Checkbox · Checklist · Chip · Code block · Code diff · Colour picker · Combo chart · Combobox · Command palette · Command palette trigger · Composer · Contact card · Context menu · Contribution graph · Copy button · Currency input · Data table · Date input · Date picker · Date range picker · Deadline · Decision row · Description list · Dialog · Divider · Document chip · Document viewer · Drawer · Dropdown · Dropdown menu · Empty state · Entity card · Entity switcher · Error summary · Event calendar · Field · Figure · File input · File row · Filter bar · Form section · Funnel chart · Gantt chart · Gauge · Globe · Grid · Heading · Hover card · Icon · Icon button · Image compare · Input · Inspector colour picker · Inspector dropdown · Inspector input · Inspector section · Inspector segments · Inspector slider · Inspector toggle switch · Instructions · Interrupt card · Kbd · Legend tile · Lightbox · Line chart · Link · Link list · List · Map callout · Map legend · Masked input · Mega menu · Mention · Menu bar · Message actions · Message card · Meter · Model picker · Nav · Nav list · Notification centre · Number input · Org chart · Page header · Pagination · Panel · Pie chart · Pin input · Pixel avatar · Popover · Progress bar · Progressive blur · Prompt suggestions · Prose · Question card · Quote · Radar chart · Radial chart · Radio button · Rating · Reasoning · Resource timeline · Rich dropdown · Scatter chart · Section title · Segmented control · Selection card · Shader field · Shader scene · Sidebar panel · Signature pad · Site footer · Site header · Site layout · Skeleton · Slider · Source chip · Source trail · Sparkline · Spinner · Split button · Split pane · Stack · Stacked bar chart · Stat · Status dot · Stepper · Streaming text · Swatch · Table · Table toolbar · Tabs · Tag input · Text · Textarea · Theme picker · Theme toggle · Thread panel · Thread tabs · Time picker · Timeline · Toast · Toggle group · Toggle switch · Tool call · Toolbar · Tooltip · Top app bar · Tree view · Treemap · Usage card · Waveform · Widget · Wizard · World map
|
|
122
|
+
Accordion · Action bar · Action card · Action readout · Agent plan · Agent rail · Agent status · AI button · Alert · Alert dialog · Anchor nav · Animated number · App layout · App sidebar · Area chart · Artifact card · Artifact panel · Attachment drop zone · Attachment group · Attachment tile · Attachment viewer · Avatar · Avatar group · Back to top · Badge · Banner · Bar chart · Bento tile · Bento tile art · Bottom nav · Breadcrumb · Button · Button group · Card · Card stack · Carousel · Chat header · Chat marker · Chat message · Chat thread · Checkbox · Checklist · Chip · Code block · Code diff · Colour picker · Combo chart · Combobox · Command palette · Command palette trigger · Composer · Contact card · Context menu · Contribution graph · Copy button · Currency input · Data table · Date input · Date picker · Date range picker · Deadline · Decision row · Description list · Dialog · Divider · Document chip · Document viewer · Drawer · Dropdown · Dropdown menu · Empty state · Entity card · Entity switcher · Error summary · Event calendar · Field · Figure · File input · File row · Filter bar · Form section · Funnel chart · Gantt chart · Gauge · Globe · Grid · Heading · Hover card · Icon · Icon button · Image compare · Input · Inspector colour picker · Inspector dropdown · Inspector input · Inspector section · Inspector segments · Inspector slider · Inspector toggle switch · Instructions · Interrupt card · Kbd · Legend tile · Lightbox · Line chart · Link · Link list · List · Map callout · Map legend · Masked input · Mega menu · Mention · Menu bar · Message actions · Message card · Meter · Model picker · Nav · Nav list · Notification centre · Number input · Org chart · Page header · Pagination · Panel · Pie chart · Pin input · Pixel avatar · Popover · Progress bar · Progressive blur · Prompt suggestions · Prose · Question card · Quote · Radar chart · Radial chart · Radio button · Rating · Reasoning · Resource timeline · Rich dropdown · Scatter chart · Section title · Segmented control · Selection card · Shader field · Shader scene · Sidebar panel · Signature pad · Site footer · Site header · Site layout · Skeleton · Slider · Source chip · Source trail · Sparkline · Spinner · Split button · Split pane · Stack · Stacked bar chart · Stat · Status dot · Stepper · Streaming text · Swatch · Table · Table toolbar · Tabs · Tag input · Text · Textarea · Theme picker · Theme toggle · Thread panel · Thread tabs · Time picker · Timeline · Toast · Toggle group · Toggle switch · Tool call · Toolbar · Tooltip · Top app bar · Tree view · Treemap · Usage card · Waveform · Widget · Wizard · World map
|
|
122
123
|
<!-- component-list:end -->
|
|
123
124
|
|
|
124
125
|
</details>
|
package/behaviors/chat-card.css
CHANGED
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
the decision's read-out.
|
|
25
25
|
============================================ */
|
|
26
26
|
|
|
27
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
28
|
+
|
|
29
|
+
@layer rift.components {
|
|
30
|
+
|
|
27
31
|
:where(
|
|
28
32
|
.ds-interrupt-card,
|
|
29
33
|
.ds-question-card,
|
|
@@ -141,3 +145,5 @@
|
|
|
141
145
|
|
|
142
146
|
color: inherit;
|
|
143
147
|
}
|
|
148
|
+
|
|
149
|
+
} /* @layer rift.components */
|
package/behaviors/direction.css
CHANGED
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
design.md's "Layout follows the reading direction" owns the contract.
|
|
11
11
|
============================================ */
|
|
12
12
|
|
|
13
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
14
|
+
|
|
15
|
+
@layer rift.components {
|
|
16
|
+
|
|
13
17
|
:dir(ltr) {
|
|
14
18
|
--ds-inline-sign: 1;
|
|
15
19
|
}
|
|
@@ -17,3 +21,5 @@
|
|
|
17
21
|
:dir(rtl) {
|
|
18
22
|
--ds-inline-sign: -1;
|
|
19
23
|
}
|
|
24
|
+
|
|
25
|
+
} /* @layer rift.components */
|
package/behaviors/locale.d.ts
CHANGED
|
@@ -38,6 +38,15 @@ export declare function weekdayHeadersIn(locale: string): string[];
|
|
|
38
38
|
/** Whether `locale` is written in English, the language every built-in label defaults to. */
|
|
39
39
|
export declare function isEnglish(locale: string): boolean;
|
|
40
40
|
/** Whether `locale` writes times on a 12-hour clock (en-US) rather than a 24-hour one (en-GB, de-DE). */
|
|
41
|
+
/**
|
|
42
|
+
* Formatted date or time text with its spaces made plain. ICU writes thin
|
|
43
|
+
* and narrow no-break spaces around a range's dash and before a day period
|
|
44
|
+
* ("November 16 – 22", "1:40 PM"), and Node and browsers ship different ICU
|
|
45
|
+
* versions, so one call can print different spaces on the server and in the
|
|
46
|
+
* browser and break hydration. Every range a component prints goes through
|
|
47
|
+
* this.
|
|
48
|
+
*/
|
|
49
|
+
export declare const plainSpaces: (text: string) => string;
|
|
41
50
|
export declare function uses12HourClock(locale: string): boolean;
|
|
42
51
|
/**
|
|
43
52
|
* A number as `locale` writes it, grouped and with its own decimal mark:
|
package/behaviors/locale.js
CHANGED
|
@@ -42,6 +42,7 @@ function isEnglish(locale) {
|
|
|
42
42
|
return false;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
const plainSpaces = (text) => text.replace(/[\u00A0\u2009\u202F]/g, " ");
|
|
45
46
|
function uses12HourClock(locale) {
|
|
46
47
|
const cycle = new Intl.DateTimeFormat(locale, { hour: "numeric" }).resolvedOptions().hourCycle;
|
|
47
48
|
return cycle === "h11" || cycle === "h12";
|
|
@@ -83,6 +84,7 @@ export {
|
|
|
83
84
|
formatNumber,
|
|
84
85
|
formatPercent,
|
|
85
86
|
isEnglish,
|
|
87
|
+
plainSpaces,
|
|
86
88
|
rotateWeek,
|
|
87
89
|
uses12HourClock,
|
|
88
90
|
weekStartOf,
|
package/behaviors/shell.css
CHANGED
|
@@ -47,6 +47,10 @@
|
|
|
47
47
|
rules these encode.
|
|
48
48
|
============================================ */
|
|
49
49
|
|
|
50
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
51
|
+
|
|
52
|
+
@layer rift.components {
|
|
53
|
+
|
|
50
54
|
:where([data-ds-shell]) {
|
|
51
55
|
/* The two gaps. The inset gap's value lives with AppSidebar's root rule
|
|
52
56
|
(--ds-shell-inset) and the float gap's with the floating rail
|
|
@@ -214,3 +218,5 @@ html[data-chat='docked-left'] :where([data-ds-shell]:not(.ds-chat-widget__rails)
|
|
|
214
218
|
html[data-chat-resizing] :where([data-ds-shell]) {
|
|
215
219
|
transition: none;
|
|
216
220
|
}
|
|
221
|
+
|
|
222
|
+
} /* @layer rift.components */
|
package/behaviors/shortcuts.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { useRef, useEffect, useSyncExternalStore } from "react";
|
|
3
3
|
import { MOTION_SHORTCUT_SEQUENCE_MS } from "../tokens/motion.js";
|
|
4
4
|
import { warnOnce } from "./devWarning.js";
|
|
5
5
|
import { activeModalPanel } from "./useFocusScope.js";
|
|
6
6
|
import { hasOpenLayer, openLayerContains } from "./useLayer.js";
|
|
7
|
-
import {
|
|
7
|
+
import { parseShortcut, detectPlatform, KEY_ALIASES } from "./shortcut-keys.js";
|
|
8
8
|
import { formatShortcut, shortcutAria, shortcutKeys } from "./shortcut-keys.js";
|
|
9
9
|
const noSubscription = () => () => {
|
|
10
10
|
};
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
keeps its own rule, with the reason beside it.
|
|
12
12
|
============================================ */
|
|
13
13
|
|
|
14
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
15
|
+
|
|
16
|
+
@layer rift.components {
|
|
17
|
+
|
|
14
18
|
.ds-visually-hidden {
|
|
15
19
|
position: absolute;
|
|
16
20
|
width: 1px;
|
|
@@ -22,3 +26,5 @@
|
|
|
22
26
|
white-space: nowrap;
|
|
23
27
|
border: 0;
|
|
24
28
|
}
|
|
29
|
+
|
|
30
|
+
} /* @layer rift.components */
|
|
@@ -101,7 +101,7 @@ export default function DashboardPage() {
|
|
|
101
101
|
<span>{row.name}</span>
|
|
102
102
|
<span className={styles.muted}>{row.done}%</span>
|
|
103
103
|
</div>
|
|
104
|
-
<ProgressBar value={row.done} size="compact"
|
|
104
|
+
<ProgressBar value={row.done} size="compact" aria-label={`${row.name} progress`} />
|
|
105
105
|
</li>
|
|
106
106
|
))}
|
|
107
107
|
</ul>
|
|
@@ -65,7 +65,7 @@ export function ProfileForm() {
|
|
|
65
65
|
columns={2}
|
|
66
66
|
title="Profile"
|
|
67
67
|
description="How you appear to the people you work with."
|
|
68
|
-
actions={<Button label={saved ? 'Saved' : 'Save profile'}
|
|
68
|
+
actions={<Button type="submit" label={saved ? 'Saved' : 'Save profile'} />}
|
|
69
69
|
>
|
|
70
70
|
<Input
|
|
71
71
|
id="profile-firstName"
|
|
@@ -32,8 +32,8 @@ export default function SignInPage() {
|
|
|
32
32
|
// Hand { email, password, remember } to your auth provider here.
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
/*
|
|
36
|
-
field
|
|
35
|
+
/* The Sign in button is the form's submit button, so a click and Enter in
|
|
36
|
+
a field both arrive here. */
|
|
37
37
|
const handleSubmit = (event: FormEvent<HTMLFormElement>) => {
|
|
38
38
|
event.preventDefault();
|
|
39
39
|
signIn();
|
|
@@ -73,7 +73,7 @@ export default function SignInPage() {
|
|
|
73
73
|
<Checkbox label="Remember me" checked={remember} onCheckedChange={setRemember} />
|
|
74
74
|
<Button variant="tertiary" size="compact" label="Forgot password?" href="#" />
|
|
75
75
|
</div>
|
|
76
|
-
<Button variant="primary" label="Sign in" className={styles.full}
|
|
76
|
+
<Button type="submit" variant="primary" label="Sign in" className={styles.full} />
|
|
77
77
|
</form>
|
|
78
78
|
|
|
79
79
|
<Divider label="or" labelPosition="center" spacing="none" />
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
--ds-sidebar-float-inset: var(--shell-inset);
|
|
12
12
|
/* The rail's width, which the main column clears. */
|
|
13
13
|
--shell-rail: 64px;
|
|
14
|
+
/* The content's side gutter, which the top bar's fill and blur reach
|
|
15
|
+
across too, so nothing scrolls past them at the surface's corners. */
|
|
16
|
+
--shell-gutter: var(--padding-1000);
|
|
14
17
|
|
|
15
18
|
display: flex;
|
|
16
19
|
min-width: 0;
|
|
@@ -79,7 +82,7 @@
|
|
|
79
82
|
display: flex;
|
|
80
83
|
flex-direction: column;
|
|
81
84
|
gap: var(--gap-500);
|
|
82
|
-
padding: var(--shell-inset) var(--
|
|
85
|
+
padding: var(--shell-inset) var(--shell-gutter) var(--padding-1500);
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
/* ---------------------------------------------------------- top bar */
|
|
@@ -106,7 +109,7 @@
|
|
|
106
109
|
position: absolute;
|
|
107
110
|
top: calc(-1 * var(--shell-inset));
|
|
108
111
|
bottom: 0;
|
|
109
|
-
inset-inline: calc(-1 * var(--
|
|
112
|
+
inset-inline: calc(-1 * var(--shell-gutter));
|
|
110
113
|
z-index: -1;
|
|
111
114
|
background: linear-gradient(to bottom, var(--ds-shell-surface) var(--shell-inset), transparent);
|
|
112
115
|
pointer-events: none;
|
|
@@ -122,7 +125,7 @@
|
|
|
122
125
|
position: absolute;
|
|
123
126
|
top: calc(-1 * var(--shell-inset));
|
|
124
127
|
bottom: calc(-1 * var(--gap-1000));
|
|
125
|
-
inset-inline: calc(-1 * var(--
|
|
128
|
+
inset-inline: calc(-1 * var(--shell-gutter));
|
|
126
129
|
height: auto;
|
|
127
130
|
z-index: -1;
|
|
128
131
|
opacity: 0;
|
|
@@ -184,8 +187,8 @@
|
|
|
184
187
|
|
|
185
188
|
/* Laptop: a tighter side gutter. */
|
|
186
189
|
@media (max-width: 1279px) {
|
|
187
|
-
.
|
|
188
|
-
|
|
190
|
+
.shell {
|
|
191
|
+
--shell-gutter: var(--padding-500);
|
|
189
192
|
}
|
|
190
193
|
}
|
|
191
194
|
|
|
@@ -194,6 +197,7 @@
|
|
|
194
197
|
@media (max-width: 768px) {
|
|
195
198
|
.shell {
|
|
196
199
|
--shell-inset: var(--padding-400);
|
|
200
|
+
--shell-gutter: var(--shell-inset);
|
|
197
201
|
}
|
|
198
202
|
|
|
199
203
|
.shell .main,
|
|
@@ -215,7 +219,7 @@
|
|
|
215
219
|
}
|
|
216
220
|
|
|
217
221
|
.content {
|
|
218
|
-
padding: var(--shell-inset) var(--shell-
|
|
222
|
+
padding: var(--shell-inset) var(--shell-gutter) var(--padding-1000);
|
|
219
223
|
}
|
|
220
224
|
|
|
221
225
|
/* Clear the menu button (40px) at the bar's left end. */
|
package/chat/ChatAgentPane.css
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
2
|
+
|
|
3
|
+
@layer rift.components {
|
|
4
|
+
|
|
1
5
|
/* The built-in agent pane. The rail owns its shell; this only says how it
|
|
2
6
|
sits in the widget's bottom sheet, where it fills the width rather than
|
|
3
7
|
holding its own column and the sheet's rounded top edge is the surface. */
|
|
@@ -58,3 +62,5 @@
|
|
|
58
62
|
line-height: var(--font-paragraph-sm-emphasis-line-height);
|
|
59
63
|
color: var(--color-text-primary);
|
|
60
64
|
}
|
|
65
|
+
|
|
66
|
+
} /* @layer rift.components */
|
package/chat/ChatTabs.js
CHANGED
package/chat/ChatWidget.css
CHANGED
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
<html> by the widen grip), --ds-chat-inset and --ds-chat-float-height.
|
|
14
14
|
============================================ */
|
|
15
15
|
|
|
16
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
17
|
+
|
|
18
|
+
@layer rift.components {
|
|
19
|
+
|
|
16
20
|
:root {
|
|
17
21
|
/* The docked panel's resting width; DOCK_MIN_WIDTH in placement.ts mirrors it. */
|
|
18
22
|
--ds-chat-width: 420px;
|
|
@@ -1692,3 +1696,5 @@ html[data-chat-resizing] .ds-chat-launcher__panel--floating .ds-chat-header {
|
|
|
1692
1696
|
pointer-events: none;
|
|
1693
1697
|
background: linear-gradient(to bottom, transparent, var(--ds-shell-surface));
|
|
1694
1698
|
}
|
|
1699
|
+
|
|
1700
|
+
} /* @layer rift.components */
|
package/chat/ChatWidget.d.ts
CHANGED
|
@@ -266,8 +266,8 @@ export interface ChatWidgetProps {
|
|
|
266
266
|
onAttachmentDownload?: AttachmentGroupProps['onDownload'];
|
|
267
267
|
/** The words of the files on a sent message, over AttachmentGroup's English defaults: the list's name ("Attachments"), the overflow buttons ("Show 3 more", "Show fewer"), the tiles' status lines (`attachmentTileLabels`) and the viewer a pressed file opens in (`attachmentViewerLabels`). */
|
|
268
268
|
attachmentGroupLabels?: Pick<AttachmentGroupProps, 'label' | 'showMoreLabel' | 'showLessLabel' | 'attachmentTileLabels' | 'attachmentViewerLabels'>;
|
|
269
|
-
/** The conversation's names, over ChatThread's English defaults: the scrolling region ("Conversation") and the scroll-to-latest control ("Scroll to the latest message"). */
|
|
270
|
-
chatThreadLabels?: Pick<ChatThreadProps, 'ariaLabel' | 'jumpLabel'>;
|
|
269
|
+
/** The conversation's names, over ChatThread's English defaults: the scrolling region ("Conversation", as `aria-label`; the deprecated `ariaLabel` still works) and the scroll-to-latest control ("Scroll to the latest message"). */
|
|
270
|
+
chatThreadLabels?: Pick<ChatThreadProps, 'aria-label' | 'ariaLabel' | 'jumpLabel'>;
|
|
271
271
|
/** The model picker's words, over ModelPicker's English defaults: the open list's name ("Model") and the trigger's text when nothing is selected ("Choose a model"). The trigger's own name is `modelPickerLabel`. */
|
|
272
272
|
modelPickerLabels?: Pick<ModelPickerProps, 'listLabel' | 'placeholder'>;
|
|
273
273
|
/** The artifact panel's words, over ArtifactPanel's English defaults: the view switch ("Preview", "Code", "Artifact view"), the expand and close buttons ("Expand the artifact", "Collapse the artifact", "Close the artifact") and the code view's CodeBlock (`codeBlockLabels`). */
|
package/chat/ChatWidget.js
CHANGED
package/chat/DemoWelcome.js
CHANGED
|
@@ -129,10 +129,10 @@ function DemoWelcome({
|
|
|
129
129
|
onAsk
|
|
130
130
|
}) {
|
|
131
131
|
if (variant === "links") {
|
|
132
|
-
return /* @__PURE__ */ jsx(PromptSuggestions, { layout: "tiles",
|
|
132
|
+
return /* @__PURE__ */ jsx(PromptSuggestions, { layout: "tiles", "aria-label": "Places to start", suggestions: LINKS, onValueChange: onAsk });
|
|
133
133
|
}
|
|
134
134
|
if (variant === "cards") {
|
|
135
|
-
return /* @__PURE__ */ jsx(PromptSuggestions, { layout: "cards",
|
|
135
|
+
return /* @__PURE__ */ jsx(PromptSuggestions, { layout: "cards", "aria-label": "Things to ask", suggestions: CARDS, onValueChange: onAsk });
|
|
136
136
|
}
|
|
137
137
|
if (variant === "dashboard") return /* @__PURE__ */ jsx(DemoBoard, { onAsk });
|
|
138
138
|
return null;
|
package/chat/demo.css
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
disc a source chip wears for a logo. Chart-series tokens keep it on-theme
|
|
4
4
|
in both modes and re-theme with the rest of a theme like every chart. */
|
|
5
5
|
|
|
6
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
7
|
+
|
|
8
|
+
@layer rift.components {
|
|
9
|
+
|
|
6
10
|
.ds-chat-demo__card-media {
|
|
7
11
|
height: 120px;
|
|
8
12
|
background: linear-gradient(135deg, var(--color-chart-series-1), var(--color-chart-series-2));
|
|
@@ -50,3 +54,5 @@
|
|
|
50
54
|
.ds-chat-demo__artifact-board {
|
|
51
55
|
padding: var(--padding-400);
|
|
52
56
|
}
|
|
57
|
+
|
|
58
|
+
} /* @layer rift.components */
|
package/chat/queries.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useSyncExternalStore } from "react";
|
|
3
|
-
import { mediaAbove, mediaBelow, BREAKPOINT_CHAT_TAKEOVER_PX
|
|
3
|
+
import { mediaAbove, BREAKPOINT_CHAT_DOCK_PX, mediaBelow, BREAKPOINT_CHAT_TAKEOVER_PX } from "../tokens/breakpoints.js";
|
|
4
4
|
import { DOCK_MIN_WIDTH, dockFits } from "./placement.js";
|
|
5
5
|
const DOCK_QUERY = mediaAbove(BREAKPOINT_CHAT_DOCK_PX);
|
|
6
6
|
const TAKEOVER_QUERY = mediaBelow(BREAKPOINT_CHAT_TAKEOVER_PX);
|
package/chat/selection.css
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
2
|
+
|
|
3
|
+
@layer rift.components {
|
|
4
|
+
|
|
1
5
|
/* The highlight a chat holds on the page while it is the chat's context
|
|
2
6
|
(useHeldHighlight in selection.ts): the context note's own fill, so the
|
|
3
7
|
passage and the note that names it read as one thing, and quieter than a
|
|
@@ -6,3 +10,5 @@
|
|
|
6
10
|
background-color: var(--color-chat-context-bg);
|
|
7
11
|
color: var(--color-text-primary);
|
|
8
12
|
}
|
|
13
|
+
|
|
14
|
+
} /* @layer rift.components */
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
Collapsible content sections
|
|
4
4
|
============================================ */
|
|
5
5
|
|
|
6
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
7
|
+
|
|
8
|
+
@layer rift.components {
|
|
9
|
+
|
|
6
10
|
/* The standard card surface (container fill, hairline border,
|
|
7
11
|
--radius-300), the one SelectionCard's and QuestionCard's option rows
|
|
8
12
|
share, so a collapsible section reads as a card on the page rather than
|
|
@@ -132,3 +136,5 @@
|
|
|
132
136
|
.ds-accordion__trigger {
|
|
133
137
|
padding-inline-end: var(--padding-400);
|
|
134
138
|
}
|
|
139
|
+
|
|
140
|
+
} /* @layer rift.components */
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* ============================================
|
|
2
|
+
ACTION BAR
|
|
3
|
+
A summary line and the primary actions, docked
|
|
4
|
+
to the bottom of a long list or form
|
|
5
|
+
============================================ */
|
|
6
|
+
|
|
7
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
8
|
+
|
|
9
|
+
@layer rift.components {
|
|
10
|
+
|
|
11
|
+
/* Base */
|
|
12
|
+
.ds-action-bar {
|
|
13
|
+
/* The surface the bar reads as one with: the blur's tint with the blur
|
|
14
|
+
on, the fill with it off. An override hook: a bar over a container
|
|
15
|
+
points it at that container's fill. */
|
|
16
|
+
--ds-action-bar-surface: var(--color-bg-page-primary);
|
|
17
|
+
/* How far above the bar the blur reaches, so the content dissolves into
|
|
18
|
+
it rather than stopping at its edge. */
|
|
19
|
+
--ds-action-bar-blur-reach: var(--gap-1500);
|
|
20
|
+
position: relative;
|
|
21
|
+
/* Its own stacking context, so the blur's z-index of -1 paints behind
|
|
22
|
+
the summary and the actions but never behind the content it covers. */
|
|
23
|
+
isolation: isolate;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-wrap: wrap;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: var(--gap-300) var(--gap-500);
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
inline-size: 100%;
|
|
30
|
+
padding-block: var(--padding-400);
|
|
31
|
+
padding-inline: var(--padding-500);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Sticky: holds to the bottom edge of its scroll container. */
|
|
35
|
+
.ds-action-bar--sticky {
|
|
36
|
+
position: sticky;
|
|
37
|
+
inset-block-end: 0;
|
|
38
|
+
z-index: var(--layer-sticky);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Blur: the stack reaches above the bar, behind its content. The space
|
|
42
|
+
above the bar in flow is the same reach, so at the end of the scroll
|
|
43
|
+
the last row clears the blur instead of resting under it. */
|
|
44
|
+
.ds-action-bar--blur {
|
|
45
|
+
margin-block-start: var(--ds-action-bar-blur-reach);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ds-action-bar__blur.ds-progressive-blur {
|
|
49
|
+
--ds-progressive-blur-tint: var(--ds-action-bar-surface);
|
|
50
|
+
inset-block-start: calc(var(--ds-action-bar-blur-reach) * -1);
|
|
51
|
+
z-index: -1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Solid: the bar's own surface, parted from the content by a hairline. */
|
|
55
|
+
.ds-action-bar--solid {
|
|
56
|
+
background-color: var(--ds-action-bar-surface);
|
|
57
|
+
border-block-start: var(--border-025) solid var(--color-divider);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Summary: takes the room at the start; a long line wraps rather than
|
|
61
|
+
pushing the actions off the bar. */
|
|
62
|
+
.ds-action-bar__summary {
|
|
63
|
+
flex: 1 1 auto;
|
|
64
|
+
min-inline-size: 0;
|
|
65
|
+
font-family: var(--font-paragraph-family);
|
|
66
|
+
font-size: var(--font-paragraph-size);
|
|
67
|
+
font-weight: var(--font-paragraph-weight);
|
|
68
|
+
line-height: var(--font-paragraph-line-height);
|
|
69
|
+
letter-spacing: var(--font-paragraph-letter-spacing);
|
|
70
|
+
color: var(--color-text-primary);
|
|
71
|
+
overflow-wrap: anywhere;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Actions: hold the end edge, on the summary's row or wrapped below it. */
|
|
75
|
+
.ds-action-bar__actions {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-wrap: wrap;
|
|
78
|
+
align-items: center;
|
|
79
|
+
justify-content: flex-end;
|
|
80
|
+
gap: var(--gap-300);
|
|
81
|
+
margin-inline-start: auto;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
} /* @layer rift.components */
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Props owned by ActionBar itself; everything else falls through to the root `<div>`. */
|
|
3
|
+
type ActionBarOwnProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The summary line at the bar's start, such as "23 students still to
|
|
6
|
+
* mark". It is a polite live region, so a count that changes while the
|
|
7
|
+
* reader works is announced once it settles.
|
|
8
|
+
*/
|
|
9
|
+
summary?: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* The actions at the bar's end, typically one or two Buttons with the
|
|
12
|
+
* primary action last. On a narrow bar they wrap below the summary and
|
|
13
|
+
* hold the end edge.
|
|
14
|
+
*/
|
|
15
|
+
actions?: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the bar holds to the bottom of its scroll container while the
|
|
18
|
+
* content scrolls under it. Off, it sits in flow after the content.
|
|
19
|
+
*/
|
|
20
|
+
sticky?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the content fades under a progressive blur that reaches above
|
|
23
|
+
* the bar. Off, the bar is a solid surface with a hairline at its top
|
|
24
|
+
* edge.
|
|
25
|
+
*/
|
|
26
|
+
blur?: boolean;
|
|
27
|
+
/** Additional CSS classes on the root. */
|
|
28
|
+
className?: string;
|
|
29
|
+
};
|
|
30
|
+
export interface ActionBarProps extends ActionBarOwnProps, Omit<React.ComponentPropsWithRef<'div'>, keyof ActionBarOwnProps> {
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A bar docked to the bottom of a long list or form, holding a summary
|
|
34
|
+
* line and the primary actions, with the content fading under a
|
|
35
|
+
* progressive blur rather than being cut off at the bar's edge. The
|
|
36
|
+
* forwarded ref and any unrecognised props target the root `<div>`, so a
|
|
37
|
+
* host that wants a landmark passes `role="region"` with an `aria-label`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function ActionBar({ summary, actions, sticky, blur, className, ref, ...rest }: ActionBarProps): React.JSX.Element;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { ProgressiveBlur } from "../ProgressiveBlur/ProgressiveBlur.js";
|
|
4
|
+
import "./ActionBar.css";
|
|
5
|
+
function ActionBar({
|
|
6
|
+
summary,
|
|
7
|
+
actions,
|
|
8
|
+
sticky = true,
|
|
9
|
+
blur = true,
|
|
10
|
+
className = "",
|
|
11
|
+
ref,
|
|
12
|
+
...rest
|
|
13
|
+
}) {
|
|
14
|
+
const baseClass = "ds-action-bar";
|
|
15
|
+
const classes = [
|
|
16
|
+
baseClass,
|
|
17
|
+
sticky && `${baseClass}--sticky`,
|
|
18
|
+
blur ? `${baseClass}--blur` : `${baseClass}--solid`,
|
|
19
|
+
className
|
|
20
|
+
].filter(Boolean).join(" ");
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", { ...rest, ref, className: classes, children: [
|
|
22
|
+
blur && /* @__PURE__ */ jsx(ProgressiveBlur, { side: "bottom", tinted: true, className: `${baseClass}__blur` }),
|
|
23
|
+
/* @__PURE__ */ jsx("div", { className: `${baseClass}__summary`, "aria-live": "polite", "aria-atomic": "true", children: summary }),
|
|
24
|
+
actions != null && actions !== false && /* @__PURE__ */ jsx("div", { className: `${baseClass}__actions`, children: actions })
|
|
25
|
+
] });
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
ActionBar
|
|
29
|
+
};
|
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
starts where the reply's own text does.
|
|
13
13
|
============================================ */
|
|
14
14
|
|
|
15
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
16
|
+
|
|
17
|
+
@layer rift.components {
|
|
18
|
+
|
|
15
19
|
.ds-action-card {
|
|
16
20
|
box-sizing: border-box;
|
|
17
21
|
display: flex;
|
|
@@ -145,3 +149,5 @@
|
|
|
145
149
|
.ds-action-card .material-symbols-rounded {
|
|
146
150
|
color: inherit;
|
|
147
151
|
}
|
|
152
|
+
|
|
153
|
+
} /* @layer rift.components */
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
its readout read as one family.
|
|
8
8
|
============================================ */
|
|
9
9
|
|
|
10
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
11
|
+
|
|
12
|
+
@layer rift.components {
|
|
13
|
+
|
|
10
14
|
.ds-action-readout {
|
|
11
15
|
box-sizing: border-box;
|
|
12
16
|
display: flex;
|
|
@@ -45,3 +49,5 @@
|
|
|
45
49
|
.ds-action-readout .material-symbols-rounded {
|
|
46
50
|
color: inherit;
|
|
47
51
|
}
|
|
52
|
+
|
|
53
|
+
} /* @layer rift.components */
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
indicators into one path through the task.
|
|
11
11
|
============================================ */
|
|
12
12
|
|
|
13
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
14
|
+
|
|
15
|
+
@layer rift.components {
|
|
16
|
+
|
|
13
17
|
.ds-agent-plan {
|
|
14
18
|
display: flex;
|
|
15
19
|
flex-direction: column;
|
|
@@ -255,3 +259,5 @@
|
|
|
255
259
|
.ds-agent-plan__header:has(.ds-agent-plan__chevron) {
|
|
256
260
|
padding-inline-end: calc(var(--ds-chat-card-inset) - var(--padding-100));
|
|
257
261
|
}
|
|
262
|
+
|
|
263
|
+
} /* @layer rift.components */
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
stay put, so switching tabs never moves the agent's face.
|
|
10
10
|
============================================ */
|
|
11
11
|
|
|
12
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
13
|
+
|
|
14
|
+
@layer rift.components {
|
|
15
|
+
|
|
12
16
|
.ds-agent-rail {
|
|
13
17
|
/* Width and padding combine on the root, so the component declares its
|
|
14
18
|
own sizing model rather than leaning on a host reset — ThreadPanel's
|
|
@@ -289,3 +293,5 @@
|
|
|
289
293
|
padding-top: var(--padding-200);
|
|
290
294
|
border-top: var(--border-025) solid var(--color-divider);
|
|
291
295
|
}
|
|
296
|
+
|
|
297
|
+
} /* @layer rift.components */
|