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
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
Vertical timeline or horizontal stepper.
|
|
5
5
|
============================================ */
|
|
6
6
|
|
|
7
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
8
|
+
|
|
9
|
+
@layer rift.components {
|
|
10
|
+
|
|
7
11
|
.ds-timeline {
|
|
8
12
|
margin: 0;
|
|
9
13
|
padding: 0;
|
|
@@ -124,12 +128,14 @@
|
|
|
124
128
|
margin-top: 0;
|
|
125
129
|
}
|
|
126
130
|
|
|
127
|
-
/* Connector line
|
|
131
|
+
/* Connector line: runs from the bottom edge of this marker to the top edge
|
|
132
|
+
of the next, so it always touches both points and never passes behind a
|
|
133
|
+
marker (a translucent fill would let it show through). */
|
|
128
134
|
.ds-timeline--vertical .ds-timeline__item::before {
|
|
129
135
|
content: '';
|
|
130
136
|
position: absolute;
|
|
131
|
-
top:
|
|
132
|
-
bottom: calc(-1 * var(--gap-500));
|
|
137
|
+
top: 18px; /* ds-allow(spacing): the 6px offset plus the 12px dot */
|
|
138
|
+
bottom: calc(-1 * var(--gap-500) - 6px); /* ds-allow(spacing): down to the next dot's 6px offset */
|
|
133
139
|
inset-inline-start: 5px; /* centre of the 12px dot */
|
|
134
140
|
width: var(--border-050);
|
|
135
141
|
background-color: var(--color-divider);
|
|
@@ -138,15 +144,11 @@
|
|
|
138
144
|
.ds-timeline--vertical.ds-timeline--numbered .ds-timeline__item::before,
|
|
139
145
|
.ds-timeline--vertical .ds-timeline__item:has(.ds-timeline__marker--badge)::before,
|
|
140
146
|
.ds-timeline--vertical .ds-timeline__item:has(.ds-timeline__marker--icon)::before {
|
|
147
|
+
top: 28px; /* the 28px badge/icon box */
|
|
148
|
+
bottom: calc(-1 * var(--gap-500));
|
|
141
149
|
inset-inline-start: 13px; /* centre of the 28px badge/icon box */
|
|
142
150
|
}
|
|
143
151
|
|
|
144
|
-
/* Bare icons have no opaque fill to cover the line —
|
|
145
|
-
start it just below the icon box instead */
|
|
146
|
-
.ds-timeline--vertical .ds-timeline__item:has(.ds-timeline__marker--icon)::before {
|
|
147
|
-
top: 32px;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
152
|
.ds-timeline--vertical .ds-timeline__item:last-child::before {
|
|
151
153
|
display: none;
|
|
152
154
|
}
|
|
@@ -169,13 +171,14 @@
|
|
|
169
171
|
padding-inline-end: var(--padding-400);
|
|
170
172
|
}
|
|
171
173
|
|
|
172
|
-
/* Connector line
|
|
174
|
+
/* Connector line: from the end edge of this marker to the start edge of the
|
|
175
|
+
next (the next item's own start), touching both and never behind either. */
|
|
173
176
|
.ds-timeline--horizontal .ds-timeline__item::before {
|
|
174
177
|
content: '';
|
|
175
178
|
position: absolute;
|
|
176
179
|
top: 5px; /* centre of the 12px dot */
|
|
177
|
-
|
|
178
|
-
|
|
180
|
+
inset-inline-start: 12px; /* the 12px dot */
|
|
181
|
+
inset-inline-end: 0;
|
|
179
182
|
height: var(--border-050);
|
|
180
183
|
background-color: var(--color-divider);
|
|
181
184
|
}
|
|
@@ -184,12 +187,7 @@
|
|
|
184
187
|
.ds-timeline--horizontal .ds-timeline__item:has(.ds-timeline__marker--badge)::before,
|
|
185
188
|
.ds-timeline--horizontal .ds-timeline__item:has(.ds-timeline__marker--icon)::before {
|
|
186
189
|
top: 13px; /* centre of the 28px badge/icon box */
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
/* Bare icons have no opaque fill to cover the line —
|
|
190
|
-
start it just after the icon box instead */
|
|
191
|
-
.ds-timeline--horizontal .ds-timeline__item:has(.ds-timeline__marker--icon)::before {
|
|
192
|
-
inset-inline-start: 32px;
|
|
190
|
+
inset-inline-start: 28px; /* the 28px badge/icon box */
|
|
193
191
|
}
|
|
194
192
|
|
|
195
193
|
.ds-timeline--horizontal .ds-timeline__item:last-child::before {
|
|
@@ -377,3 +375,5 @@
|
|
|
377
375
|
.ds-timeline--horizontal .ds-timeline__description {
|
|
378
376
|
overflow-wrap: break-word;
|
|
379
377
|
}
|
|
378
|
+
|
|
379
|
+
} /* @layer rift.components */
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
--ds-toast-inset-right gap from the right edge for *-right placements
|
|
16
16
|
============================================ */
|
|
17
17
|
|
|
18
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
19
|
+
|
|
20
|
+
@layer rift.components {
|
|
21
|
+
|
|
18
22
|
.ds-toast-container {
|
|
19
23
|
position: fixed;
|
|
20
24
|
z-index: var(--ds-toast-z, var(--layer-toast));
|
|
@@ -365,3 +369,5 @@
|
|
|
365
369
|
.ds-toast__action {
|
|
366
370
|
margin-block-start: var(--gap-200);
|
|
367
371
|
}
|
|
372
|
+
|
|
373
|
+
} /* @layer rift.components */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
-
import React, {
|
|
3
|
+
import React, { createContext, useContext, useState, useSyncExternalStore, useCallback, useRef, useEffect } from "react";
|
|
4
4
|
import { MOTION_AUTO_DISMISS_MS, MOTION_EXIT_SYNC_MS } from "../../tokens/motion.js";
|
|
5
5
|
import ReactDOM from "react-dom";
|
|
6
6
|
import "./Toast.css";
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
A set of two-state buttons
|
|
4
4
|
============================================ */
|
|
5
5
|
|
|
6
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
7
|
+
|
|
8
|
+
@layer rift.components {
|
|
9
|
+
|
|
6
10
|
/* A control strip on the input radius, filled like SegmentedControl's
|
|
7
11
|
track, so the group reads as one control rather than a hairline. */
|
|
8
12
|
.ds-toggle-group {
|
|
@@ -126,3 +130,5 @@
|
|
|
126
130
|
.ds-toggle-group .material-symbols-rounded {
|
|
127
131
|
color: inherit;
|
|
128
132
|
}
|
|
133
|
+
|
|
134
|
+
} /* @layer rift.components */
|
|
@@ -4,7 +4,11 @@ export interface ToggleGroupItem {
|
|
|
4
4
|
value: string;
|
|
5
5
|
/** Display label or icon name (Material Symbols) */
|
|
6
6
|
label: string;
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Draw `label` as a Material Symbol icon instead of text. An item is an
|
|
9
|
+
* icon or a label, never both: for icon-plus-label options, use
|
|
10
|
+
* SegmentedControl, whose segments take an `icon` beside their `label`.
|
|
11
|
+
*/
|
|
8
12
|
icon?: boolean;
|
|
9
13
|
}
|
|
10
14
|
/** Props owned by ToggleGroup itself — everything else falls through to the wrapper. */
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
keyed on the track's own modifiers.
|
|
9
9
|
============================================ */
|
|
10
10
|
|
|
11
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
12
|
+
|
|
13
|
+
@layer rift.components {
|
|
14
|
+
|
|
11
15
|
.ds-toggle-switch {
|
|
12
16
|
/* Layout */
|
|
13
17
|
display: inline-flex;
|
|
@@ -54,7 +58,9 @@
|
|
|
54
58
|
align-items: center;
|
|
55
59
|
justify-content: center;
|
|
56
60
|
overflow: hidden;
|
|
57
|
-
transition:
|
|
61
|
+
transition:
|
|
62
|
+
transform var(--motion-duration-slow) var(--motion-ease-spring),
|
|
63
|
+
background-color var(--motion-duration-slow) var(--motion-ease-standard);
|
|
58
64
|
}
|
|
59
65
|
|
|
60
66
|
/* The same SVG check Checkbox draws, so the two controls show one tick.
|
|
@@ -65,6 +71,7 @@
|
|
|
65
71
|
width: 14px;
|
|
66
72
|
height: 14px;
|
|
67
73
|
color: var(--color-action-primary-bg);
|
|
74
|
+
transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
|
|
68
75
|
}
|
|
69
76
|
|
|
70
77
|
/* ============================================
|
|
@@ -88,15 +95,24 @@
|
|
|
88
95
|
another host shows the same states.
|
|
89
96
|
============================================ */
|
|
90
97
|
|
|
91
|
-
/* Off
|
|
98
|
+
/* Off: nothing about it reads as on. The track takes the unchecked
|
|
99
|
+
control's ring colour (Checkbox's and RadioButton's), which clears 3:1
|
|
100
|
+
against the page and the card in every theme; the thumb takes the input
|
|
101
|
+
surface instead of the action tint; the tick goes; and the thumb moves to
|
|
102
|
+
the start. */
|
|
92
103
|
.ds-toggle-switch__track--off {
|
|
93
|
-
background: var(--color-
|
|
104
|
+
background: var(--color-input-indicator-border);
|
|
94
105
|
}
|
|
95
106
|
|
|
96
107
|
.ds-toggle-switch__track--off .ds-toggle-switch__thumb {
|
|
108
|
+
background: var(--color-input-bg-primary);
|
|
97
109
|
transform: translateX(calc(-18px * var(--ds-inline-sign, 1)));
|
|
98
110
|
}
|
|
99
111
|
|
|
112
|
+
.ds-toggle-switch__track--off .ds-toggle-switch__thumb-icon {
|
|
113
|
+
opacity: 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
100
116
|
/* ============================================
|
|
101
117
|
FOCUS
|
|
102
118
|
The same ring as Checkbox and RadioButton, on
|
|
@@ -176,3 +192,5 @@
|
|
|
176
192
|
.ds-toggle-switch--error .ds-toggle-switch__helper {
|
|
177
193
|
color: var(--color-status-error-border);
|
|
178
194
|
}
|
|
195
|
+
|
|
196
|
+
} /* @layer rift.components */
|
|
@@ -6,7 +6,7 @@ type ToggleSwitchOwnProps = {
|
|
|
6
6
|
* keep its own state, seeded from `defaultChecked`.
|
|
7
7
|
*/
|
|
8
8
|
checked?: boolean;
|
|
9
|
-
/** Whether the toggle starts on when uncontrolled (`checked` undefined). Defaults to
|
|
9
|
+
/** Whether the toggle starts on when uncontrolled (`checked` undefined). Defaults to false, as every checkable control does, so a switch left uncontrolled never turns a setting on by itself. */
|
|
10
10
|
defaultChecked?: boolean;
|
|
11
11
|
/** Label text displayed next to the toggle */
|
|
12
12
|
label?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import React, { useState, useId } from "react";
|
|
4
4
|
import { CheckIcon } from "../Checkbox/Checkbox.js";
|
|
5
5
|
import "./ToggleSwitch.css";
|
|
@@ -7,7 +7,7 @@ import "../../behaviors/direction.css";
|
|
|
7
7
|
const ToggleSwitch = React.forwardRef(
|
|
8
8
|
({
|
|
9
9
|
checked: checkedProp,
|
|
10
|
-
defaultChecked =
|
|
10
|
+
defaultChecked = false,
|
|
11
11
|
label = "Toggle",
|
|
12
12
|
showLabel = true,
|
|
13
13
|
helperText,
|
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
the status word and icon carry the state.
|
|
13
13
|
============================================ */
|
|
14
14
|
|
|
15
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
16
|
+
|
|
17
|
+
@layer rift.components {
|
|
18
|
+
|
|
15
19
|
.ds-tool-call {
|
|
16
20
|
/* Two colour channels per status: -text for the status word (tuned for
|
|
17
21
|
text contrast) and -icon for the indicator glyph, which needs a hue
|
|
@@ -315,3 +319,5 @@
|
|
|
315
319
|
.ds-tool-call__header:has(.ds-tool-call__chevron) {
|
|
316
320
|
padding-inline-end: calc(var(--ds-chat-card-inset) - var(--padding-100));
|
|
317
321
|
}
|
|
322
|
+
|
|
323
|
+
} /* @layer rift.components */
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
Grouped strip of controls in one shell
|
|
4
4
|
============================================ */
|
|
5
5
|
|
|
6
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
7
|
+
|
|
8
|
+
@layer rift.components {
|
|
9
|
+
|
|
6
10
|
/* Base — a pill shell on the container fill. Padding clears the focus
|
|
7
11
|
ring's full reach (2px offset + 2px outline), so a focused control's
|
|
8
12
|
ring seats inside the shell instead of slicing its border. */
|
|
@@ -54,3 +58,5 @@
|
|
|
54
58
|
margin-block: var(--gap-050);
|
|
55
59
|
margin-inline: var(--gap-050);
|
|
56
60
|
}
|
|
61
|
+
|
|
62
|
+
} /* @layer rift.components */
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
2
|
+
|
|
3
|
+
@layer rift.components {
|
|
4
|
+
|
|
1
5
|
/* ds-allow-file(physical): the arrow and the entrance nudge point at the side the anchored behaviour placed the tooltip on, a screen side */
|
|
2
6
|
/* ============================================
|
|
3
7
|
TOOLTIP COMPONENT
|
|
@@ -175,3 +179,5 @@
|
|
|
175
179
|
border-bottom: var(--border-025) solid var(--color-bg-container-border);
|
|
176
180
|
border-left: var(--border-025) solid var(--color-bg-container-border);
|
|
177
181
|
}
|
|
182
|
+
|
|
183
|
+
} /* @layer rift.components */
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
expanded title that collapses on scroll.
|
|
10
10
|
============================================ */
|
|
11
11
|
|
|
12
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
13
|
+
|
|
14
|
+
@layer rift.components {
|
|
15
|
+
|
|
12
16
|
/* ============================================
|
|
13
17
|
BASE (shared by every platform)
|
|
14
18
|
============================================ */
|
|
@@ -464,3 +468,5 @@
|
|
|
464
468
|
line-height: 24px;
|
|
465
469
|
letter-spacing: 0.15px;
|
|
466
470
|
}
|
|
471
|
+
|
|
472
|
+
} /* @layer rift.components */
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
and nested structures
|
|
5
5
|
============================================ */
|
|
6
6
|
|
|
7
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
8
|
+
|
|
9
|
+
@layer rift.components {
|
|
10
|
+
|
|
7
11
|
/* Base */
|
|
8
12
|
|
|
9
13
|
.ds-treeview {
|
|
@@ -117,3 +121,5 @@
|
|
|
117
121
|
padding: 0;
|
|
118
122
|
list-style: none;
|
|
119
123
|
}
|
|
124
|
+
|
|
125
|
+
} /* @layer rift.components */
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
preview and four value columns.
|
|
5
5
|
============================================ */
|
|
6
6
|
|
|
7
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
8
|
+
|
|
9
|
+
@layer rift.components {
|
|
10
|
+
|
|
7
11
|
.ds-typography-swatch {
|
|
8
12
|
/* Layout */
|
|
9
13
|
display: flex;
|
|
@@ -81,3 +85,5 @@
|
|
|
81
85
|
line-height: var(--font-paragraph-line-height);
|
|
82
86
|
color: var(--color-text-secondary);
|
|
83
87
|
}
|
|
88
|
+
|
|
89
|
+
} /* @layer rift.components */
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
with reset captions, in the chart card chrome
|
|
5
5
|
============================================ */
|
|
6
6
|
|
|
7
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
8
|
+
|
|
9
|
+
@layer rift.components {
|
|
10
|
+
|
|
7
11
|
/* Base — the card chrome itself comes from ds-chart. In a chat it is one
|
|
8
12
|
of the chat cards, so it takes their padding, title and rhythm: the
|
|
9
13
|
recipe's edge above and below inside its inset at the sides, a
|
|
@@ -56,3 +60,5 @@
|
|
|
56
60
|
line-height: var(--font-caption-line-height);
|
|
57
61
|
color: var(--color-text-secondary);
|
|
58
62
|
}
|
|
63
|
+
|
|
64
|
+
} /* @layer rift.components */
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
the shared twelve-slot cycle
|
|
5
5
|
============================================ */
|
|
6
6
|
|
|
7
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
8
|
+
|
|
9
|
+
@layer rift.components {
|
|
10
|
+
|
|
7
11
|
/* Base — height rides the icon scale, bar width derives from it, and the
|
|
8
12
|
colour routes through one custom property so a consumer can tint the wave. */
|
|
9
13
|
|
|
@@ -84,3 +88,5 @@
|
|
|
84
88
|
transform: scaleY(calc(var(--ds-waveform-amp, 1) * 0.6));
|
|
85
89
|
}
|
|
86
90
|
}
|
|
91
|
+
|
|
92
|
+
} /* @layer rift.components */
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
packs tiles into columns
|
|
6
6
|
============================================ */
|
|
7
7
|
|
|
8
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
9
|
+
|
|
10
|
+
@layer rift.components {
|
|
11
|
+
|
|
8
12
|
/* Tile — the translucent container behind a hairline, blurred so the body
|
|
9
13
|
stays on a calm field when the tile sits over an ambient background. The
|
|
10
14
|
navigation-tile radius, per the radius scale. */
|
|
@@ -339,3 +343,5 @@
|
|
|
339
343
|
break-inside: avoid;
|
|
340
344
|
margin-bottom: var(--gap-400);
|
|
341
345
|
}
|
|
346
|
+
|
|
347
|
+
} /* @layer rift.components */
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
and Continue at the end, above a rule.
|
|
6
6
|
============================================ */
|
|
7
7
|
|
|
8
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
9
|
+
|
|
10
|
+
@layer rift.components {
|
|
11
|
+
|
|
8
12
|
/* Base */
|
|
9
13
|
.ds-wizard {
|
|
10
14
|
display: flex;
|
|
@@ -65,3 +69,5 @@
|
|
|
65
69
|
gap: var(--gap-200);
|
|
66
70
|
margin-inline-start: auto;
|
|
67
71
|
}
|
|
72
|
+
|
|
73
|
+
} /* @layer rift.components */
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
2
|
+
|
|
3
|
+
@layer rift.components {
|
|
4
|
+
|
|
1
5
|
/* ds-allow-file(physical): a map is geography: west is on the left in every reading direction */
|
|
2
6
|
/* ============================================
|
|
3
7
|
WORLD MAP COMPONENT
|
|
@@ -248,3 +252,5 @@ button.ds-world-map__marker:hover .ds-world-map__dot {
|
|
|
248
252
|
.ds-world-map__callout[data-side='left'] {
|
|
249
253
|
transform: translate(-100%, -100%);
|
|
250
254
|
}
|
|
255
|
+
|
|
256
|
+
} /* @layer rift.components */
|
package/components/registry.json
CHANGED
|
@@ -77,6 +77,19 @@
|
|
|
77
77
|
"client": true,
|
|
78
78
|
"pattern": "accordion"
|
|
79
79
|
},
|
|
80
|
+
{
|
|
81
|
+
"name": "ActionBar",
|
|
82
|
+
"label": "Action bar",
|
|
83
|
+
"slug": "action-bar",
|
|
84
|
+
"description": "A bar docked to the bottom of a long list or form, with a summary line and the primary actions over a progressive blur.",
|
|
85
|
+
"category": "actions",
|
|
86
|
+
"client": false,
|
|
87
|
+
"keys": { "by": "platform", "note": "The bar adds no keys of its own: its actions are buttons, and the browser owns Tab, Enter and Space." },
|
|
88
|
+
"alternatives": [
|
|
89
|
+
{ "name": "Toolbar", "when": "the controls act on a canvas or a view and sit together in one pill, rather than closing out a list" },
|
|
90
|
+
{ "name": "TableToolbar", "when": "the bar sits over a table and holds its search, filters and view settings" }
|
|
91
|
+
]
|
|
92
|
+
},
|
|
80
93
|
{
|
|
81
94
|
"name": "ActionCard",
|
|
82
95
|
"label": "Action card",
|
|
@@ -826,7 +839,7 @@
|
|
|
826
839
|
"name": "FileInput",
|
|
827
840
|
"label": "File input",
|
|
828
841
|
"slug": "file-input",
|
|
829
|
-
"description": "A click-or-drop upload zone paired with a
|
|
842
|
+
"description": "A click-or-drop upload zone paired with a file list showing size, progress, and per-file errors.",
|
|
830
843
|
"category": "forms",
|
|
831
844
|
"client": true,
|
|
832
845
|
"pattern": "button"
|
|
@@ -1745,7 +1758,7 @@
|
|
|
1745
1758
|
"client": false,
|
|
1746
1759
|
"keys": { "by": "none" },
|
|
1747
1760
|
"alternatives": [
|
|
1748
|
-
{ "name": "DataTable", "when": "the rows need sorting, filtering, editing or loading from a server" }
|
|
1761
|
+
{ "name": "DataTable", "when": "the rows need sorting, filtering, paging, editing or loading from a server" }
|
|
1749
1762
|
]
|
|
1750
1763
|
},
|
|
1751
1764
|
{
|
|
@@ -1755,7 +1768,10 @@
|
|
|
1755
1768
|
"description": "The control bar over a table: search, filter chips, sort, group, columns, density, saved views and a bulk bar, wired to a DataTable in its toolbar slot.",
|
|
1756
1769
|
"category": "data-display",
|
|
1757
1770
|
"client": true,
|
|
1758
|
-
"keys": { "by": "component", "note": "Alt and the up or down arrow reorder a column or a sort row, and Escape closes a panel." }
|
|
1771
|
+
"keys": { "by": "component", "note": "Alt and the up or down arrow reorder a column or a sort row, and Escape closes a panel." },
|
|
1772
|
+
"alternatives": [
|
|
1773
|
+
{ "name": "ActionBar", "when": "the actions finish the work on a long list or form, docked below it rather than over a table" }
|
|
1774
|
+
]
|
|
1759
1775
|
},
|
|
1760
1776
|
{
|
|
1761
1777
|
"name": "Tabs",
|
|
@@ -1901,7 +1917,8 @@
|
|
|
1901
1917
|
"client": true,
|
|
1902
1918
|
"pattern": "toolbar",
|
|
1903
1919
|
"alternatives": [
|
|
1904
|
-
{ "name": "Menubar", "when": "the controls are named menus of commands, like an app's File and Edit" }
|
|
1920
|
+
{ "name": "Menubar", "when": "the controls are named menus of commands, like an app's File and Edit" },
|
|
1921
|
+
{ "name": "ActionBar", "when": "a summary and the primary actions close out a long list or form, docked to its bottom" }
|
|
1905
1922
|
]
|
|
1906
1923
|
},
|
|
1907
1924
|
{
|
|
@@ -77,6 +77,19 @@ declare const _default: {
|
|
|
77
77
|
"client": true,
|
|
78
78
|
"pattern": "accordion"
|
|
79
79
|
},
|
|
80
|
+
{
|
|
81
|
+
"name": "ActionBar",
|
|
82
|
+
"label": "Action bar",
|
|
83
|
+
"slug": "action-bar",
|
|
84
|
+
"description": "A bar docked to the bottom of a long list or form, with a summary line and the primary actions over a progressive blur.",
|
|
85
|
+
"category": "actions",
|
|
86
|
+
"client": false,
|
|
87
|
+
"keys": { "by": "platform", "note": "The bar adds no keys of its own: its actions are buttons, and the browser owns Tab, Enter and Space." },
|
|
88
|
+
"alternatives": [
|
|
89
|
+
{ "name": "Toolbar", "when": "the controls act on a canvas or a view and sit together in one pill, rather than closing out a list" },
|
|
90
|
+
{ "name": "TableToolbar", "when": "the bar sits over a table and holds its search, filters and view settings" }
|
|
91
|
+
]
|
|
92
|
+
},
|
|
80
93
|
{
|
|
81
94
|
"name": "ActionCard",
|
|
82
95
|
"label": "Action card",
|
|
@@ -826,7 +839,7 @@ declare const _default: {
|
|
|
826
839
|
"name": "FileInput",
|
|
827
840
|
"label": "File input",
|
|
828
841
|
"slug": "file-input",
|
|
829
|
-
"description": "A click-or-drop upload zone paired with a
|
|
842
|
+
"description": "A click-or-drop upload zone paired with a file list showing size, progress, and per-file errors.",
|
|
830
843
|
"category": "forms",
|
|
831
844
|
"client": true,
|
|
832
845
|
"pattern": "button"
|
|
@@ -1745,7 +1758,7 @@ declare const _default: {
|
|
|
1745
1758
|
"client": false,
|
|
1746
1759
|
"keys": { "by": "none" },
|
|
1747
1760
|
"alternatives": [
|
|
1748
|
-
{ "name": "DataTable", "when": "the rows need sorting, filtering, editing or loading from a server" }
|
|
1761
|
+
{ "name": "DataTable", "when": "the rows need sorting, filtering, paging, editing or loading from a server" }
|
|
1749
1762
|
]
|
|
1750
1763
|
},
|
|
1751
1764
|
{
|
|
@@ -1755,7 +1768,10 @@ declare const _default: {
|
|
|
1755
1768
|
"description": "The control bar over a table: search, filter chips, sort, group, columns, density, saved views and a bulk bar, wired to a DataTable in its toolbar slot.",
|
|
1756
1769
|
"category": "data-display",
|
|
1757
1770
|
"client": true,
|
|
1758
|
-
"keys": { "by": "component", "note": "Alt and the up or down arrow reorder a column or a sort row, and Escape closes a panel." }
|
|
1771
|
+
"keys": { "by": "component", "note": "Alt and the up or down arrow reorder a column or a sort row, and Escape closes a panel." },
|
|
1772
|
+
"alternatives": [
|
|
1773
|
+
{ "name": "ActionBar", "when": "the actions finish the work on a long list or form, docked below it rather than over a table" }
|
|
1774
|
+
]
|
|
1759
1775
|
},
|
|
1760
1776
|
{
|
|
1761
1777
|
"name": "Tabs",
|
|
@@ -1901,7 +1917,8 @@ declare const _default: {
|
|
|
1901
1917
|
"client": true,
|
|
1902
1918
|
"pattern": "toolbar",
|
|
1903
1919
|
"alternatives": [
|
|
1904
|
-
{ "name": "Menubar", "when": "the controls are named menus of commands, like an app's File and Edit" }
|
|
1920
|
+
{ "name": "Menubar", "when": "the controls are named menus of commands, like an app's File and Edit" },
|
|
1921
|
+
{ "name": "ActionBar", "when": "a summary and the primary actions close out a long list or form, docked to its bottom" }
|
|
1905
1922
|
]
|
|
1906
1923
|
},
|
|
1907
1924
|
{
|