rift-ds 1.35.0 → 1.37.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 +2 -1
- package/behaviors/chat-card.css +6 -0
- package/behaviors/direction.css +6 -0
- package/behaviors/matchParts.d.ts +9 -0
- package/behaviors/matchParts.js +10 -0
- package/behaviors/shell.css +6 -0
- package/behaviors/shortcuts.js +2 -2
- package/behaviors/useLayer.d.ts +2 -2
- package/behaviors/visually-hidden.css +6 -0
- package/bin/templates/blocks/app/landing/page.module.css +50 -0
- package/bin/templates/blocks/app/landing/page.tsx +157 -0
- package/bin/templates/blocks/app/pricing/page.module.css +15 -0
- package/bin/templates/blocks/app/pricing/page.tsx +173 -0
- 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/MarketingShell.module.css +66 -0
- package/bin/templates/blocks/components/blocks/MarketingShell.tsx +141 -0
- package/bin/templates/blocks/components/blocks/emberScene.ts +1 -1
- package/bin/templates/blocks/registry.json +24 -0
- package/chat/AssistantTurn.js +5 -20
- package/chat/ChatAgentPane.css +6 -0
- package/chat/ChatWidget.css +6 -0
- 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 +6 -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/Alert/Alert.css +6 -0
- 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 +19 -1
- package/components/AppSidebar/AppSidebar.d.ts +1 -1
- package/components/AppSidebar/AppSidebar.js +10 -4
- 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/ActiveReporter.d.ts +32 -0
- package/components/Chart/ActiveReporter.js +31 -0
- package/components/Chart/AreaChart.d.ts +7 -1
- package/components/Chart/AreaChart.js +8 -3
- package/components/Chart/BarChart.d.ts +12 -0
- package/components/Chart/BarChart.js +8 -3
- package/components/Chart/Chart.css +9 -1
- package/components/Chart/ComboChart.d.ts +7 -1
- package/components/Chart/ComboChart.js +8 -3
- package/components/Chart/LineChart.d.ts +7 -1
- package/components/Chart/LineChart.js +8 -3
- package/components/Chart/StackedBarChart.d.ts +7 -1
- package/components/Chart/StackedBarChart.js +8 -3
- 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/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 +32 -0
- package/components/Combobox/Combobox.d.ts +10 -0
- package/components/Combobox/Combobox.js +10 -0
- package/components/CommandPalette/CommandPalette.css +32 -0
- package/components/CommandPalette/CommandPalette.d.ts +2 -1
- package/components/CommandPalette/CommandPalette.js +21 -4
- 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/ContributionGraph/ContributionGraph.css +6 -0
- package/components/CurrencyInput/CurrencyInput.css +6 -0
- package/components/DataTable/DataTable.css +6 -0
- package/components/DataTable/DataTable.js +6 -2
- 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/DocumentViewer/DocumentViewer.css +6 -0
- package/components/Drawer/Drawer.css +55 -7
- package/components/Drawer/Drawer.d.ts +17 -1
- package/components/Drawer/Drawer.js +27 -5
- package/components/Dropdown/ChosenMark.css +6 -0
- package/components/Dropdown/Dropdown.css +46 -0
- package/components/Dropdown/Dropdown.d.ts +7 -0
- package/components/Dropdown/Dropdown.js +23 -38
- 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 +6 -0
- package/components/ErrorSummary/ErrorSummary.css +6 -0
- package/components/ErrorSummary/ErrorSummary.js +3 -1
- package/components/EventCalendar/EventCalendar.css +6 -0
- package/components/Field/Field.css +6 -0
- package/components/Figure/Figure.css +6 -0
- package/components/FileInput/FileInput.css +6 -0
- 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 +22 -4
- package/components/Inspector/Inspector.css +6 -0
- package/components/Instructions/Instructions.css +27 -0
- package/components/Instructions/Instructions.d.ts +5 -2
- package/components/Instructions/Instructions.js +1 -1
- 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 +7 -7
- 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/NavList/NavList.d.ts +2 -0
- package/components/NavList/NavList.js +1 -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/ProgressBar/ProgressBar.css +6 -0
- package/components/ProgressiveBlur/ProgressiveBlur.css +6 -0
- package/components/PromptSuggestions/PromptSuggestions.css +5 -0
- 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/RichDropdown/RichDropdown.css +6 -0
- package/components/SectionTitle/SectionTitle.css +6 -0
- package/components/SegmentedControl/SegmentedControl.css +6 -0
- 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 -2
- package/components/ShaderScene/assemble.js +13 -5
- package/components/ShaderScene/renderer.d.ts +2 -2
- package/components/ShaderScene/types.d.ts +2 -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 +13 -1
- 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/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/ThreadPanel/ThreadPanel.css +6 -0
- package/components/ThreadTabs/ThreadTabs.css +6 -0
- 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/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 +3 -3
- package/components/registry.json.d.ts +3 -3
- package/components/registry.json.js +1 -1
- package/fonts/material-symbols.css +10 -0
- package/markdown/index.d.ts +8 -0
- package/markdown/index.js +10 -0
- package/markdown/mappers.d.ts +31 -0
- package/markdown/mappers.js +43 -0
- package/package.json +7 -2
- package/tokens/base.css +11 -2
- package/tokens/presets/contrast.css +8 -0
- package/tokens/presets/forest.css +8 -0
- package/tokens/presets/plum.css +18 -5
- package/tokens/presets/warm.css +10 -5
- package/tokens/presets/zest.css +22 -5
- package/tokens/values.json.js +1 -1
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
input.
|
|
7
7
|
============================================ */
|
|
8
8
|
|
|
9
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
10
|
+
|
|
11
|
+
@layer rift.components {
|
|
12
|
+
|
|
9
13
|
/* ============================================
|
|
10
14
|
BASE
|
|
11
15
|
============================================ */
|
|
@@ -234,3 +238,5 @@
|
|
|
234
238
|
.ds-timepicker--compact .ds-timepicker__trigger {
|
|
235
239
|
padding-inline: var(--padding-200);
|
|
236
240
|
}
|
|
241
|
+
|
|
242
|
+
} /* @layer rift.components */
|
|
@@ -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 */
|
|
@@ -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
|
@@ -738,10 +738,10 @@
|
|
|
738
738
|
"name": "Drawer",
|
|
739
739
|
"label": "Drawer",
|
|
740
740
|
"slug": "drawer",
|
|
741
|
-
"description": "An edge-anchored
|
|
741
|
+
"description": "An edge-anchored panel that slides in from any side, modal by default or resting beside a live page, for filter panels, detail views, and mobile navigation.",
|
|
742
742
|
"category": "overlays",
|
|
743
743
|
"client": true,
|
|
744
|
-
"pattern": "dialog"
|
|
744
|
+
"partPatterns": [{ "pattern": "dialog", "part": "modal drawer, the default" }]
|
|
745
745
|
},
|
|
746
746
|
{
|
|
747
747
|
"name": "Dropdown",
|
|
@@ -1489,7 +1489,7 @@
|
|
|
1489
1489
|
"client": true,
|
|
1490
1490
|
"pattern": "combobox",
|
|
1491
1491
|
"alternatives": [
|
|
1492
|
-
{ "name": "Dropdown", "when": "
|
|
1492
|
+
{ "name": "Dropdown", "when": "a label is enough to choose by, with an icon, a second line or a trailing value at most" }
|
|
1493
1493
|
]
|
|
1494
1494
|
},
|
|
1495
1495
|
{
|
|
@@ -738,10 +738,10 @@ declare const _default: {
|
|
|
738
738
|
"name": "Drawer",
|
|
739
739
|
"label": "Drawer",
|
|
740
740
|
"slug": "drawer",
|
|
741
|
-
"description": "An edge-anchored
|
|
741
|
+
"description": "An edge-anchored panel that slides in from any side, modal by default or resting beside a live page, for filter panels, detail views, and mobile navigation.",
|
|
742
742
|
"category": "overlays",
|
|
743
743
|
"client": true,
|
|
744
|
-
"pattern": "dialog"
|
|
744
|
+
"partPatterns": [{ "pattern": "dialog", "part": "modal drawer, the default" }]
|
|
745
745
|
},
|
|
746
746
|
{
|
|
747
747
|
"name": "Dropdown",
|
|
@@ -1489,7 +1489,7 @@ declare const _default: {
|
|
|
1489
1489
|
"client": true,
|
|
1490
1490
|
"pattern": "combobox",
|
|
1491
1491
|
"alternatives": [
|
|
1492
|
-
{ "name": "Dropdown", "when": "
|
|
1492
|
+
{ "name": "Dropdown", "when": "a label is enough to choose by, with an icon, a second line or a trailing value at most" }
|
|
1493
1493
|
]
|
|
1494
1494
|
},
|
|
1495
1495
|
{
|