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
|
@@ -10,7 +10,7 @@ export interface ContributionDay {
|
|
|
10
10
|
}
|
|
11
11
|
/** Props owned by ContributionGraph itself; everything else falls through to the root div. */
|
|
12
12
|
type ContributionGraphOwnProps = {
|
|
13
|
-
/** One entry per day,
|
|
13
|
+
/** One entry per day. Each is drawn on its own weekday's row, so a day left out is an empty cell. */
|
|
14
14
|
days: ContributionDay[];
|
|
15
15
|
/**
|
|
16
16
|
* Chart title, in the shared chart header.
|
|
@@ -23,6 +23,12 @@ type ContributionGraphOwnProps = {
|
|
|
23
23
|
bare?: boolean;
|
|
24
24
|
/** Summary line shown under the grid, e.g. "496 contributions in the last year" */
|
|
25
25
|
caption?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Whether the week columns stretch to fill the graph's width. Defaults to
|
|
28
|
+
* `true`. Set `false` to keep every column at the base cell size, so a short
|
|
29
|
+
* run of weeks draws small squares at the start of its box instead of large ones.
|
|
30
|
+
*/
|
|
31
|
+
fill?: boolean;
|
|
26
32
|
/** Show month labels above the grid */
|
|
27
33
|
showMonthLabels?: boolean;
|
|
28
34
|
/** Show the Less → More legend under the grid */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { weekStartOf, DEFAULT_LOCALE
|
|
3
|
+
import { weekStartOf, DEFAULT_LOCALE } from "../../behaviors/locale.js";
|
|
4
|
+
import { buildWeeks } from "./weeks.js";
|
|
4
5
|
import "../Chart/Chart.css";
|
|
5
6
|
import "./ContributionGraph.css";
|
|
6
7
|
const localeMonths = (locale) => {
|
|
@@ -19,22 +20,6 @@ const cellLabelFor = (locale) => (count, date) => {
|
|
|
19
20
|
if (count === 1) return `1 contribution on ${formatted}`;
|
|
20
21
|
return `${count} contributions on ${formatted}`;
|
|
21
22
|
};
|
|
22
|
-
const buildWeeks = (days, weekStart) => {
|
|
23
|
-
const weeks = [];
|
|
24
|
-
let week = [];
|
|
25
|
-
days.forEach((day, index) => {
|
|
26
|
-
if (index === 0) {
|
|
27
|
-
week = Array(weekdayOffset(parseDay(day.date).getDay(), weekStart)).fill(null);
|
|
28
|
-
}
|
|
29
|
-
week.push(day);
|
|
30
|
-
if (week.length === 7) {
|
|
31
|
-
weeks.push(week);
|
|
32
|
-
week = [];
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
if (week.length > 0) weeks.push(week);
|
|
36
|
-
return weeks;
|
|
37
|
-
};
|
|
38
23
|
const buildMonthLabels = (weeks, monthNames) => {
|
|
39
24
|
const labels = [];
|
|
40
25
|
let previousMonth = -1;
|
|
@@ -60,6 +45,7 @@ const ContributionGraph = React.forwardRef(({
|
|
|
60
45
|
subtitle,
|
|
61
46
|
bare = false,
|
|
62
47
|
caption,
|
|
48
|
+
fill = true,
|
|
63
49
|
showMonthLabels = true,
|
|
64
50
|
showLegend = true,
|
|
65
51
|
gridLabel,
|
|
@@ -82,7 +68,7 @@ const ContributionGraph = React.forwardRef(({
|
|
|
82
68
|
"ds-contribution-graph",
|
|
83
69
|
className
|
|
84
70
|
].filter(Boolean).join(" ");
|
|
85
|
-
const columnTemplate = `repeat(${weeks.length}, minmax(var(--ds-contribution-cell), 1fr))`;
|
|
71
|
+
const columnTemplate = fill ? `repeat(${weeks.length}, minmax(var(--ds-contribution-cell), 1fr))` : `repeat(${weeks.length}, var(--ds-contribution-cell))`;
|
|
86
72
|
return /* @__PURE__ */ jsxs("div", { ...rest, ref, className: classes, children: [
|
|
87
73
|
(title || subtitle) && /* @__PURE__ */ jsx("div", { className: `${chartClass}__header`, children: /* @__PURE__ */ jsxs("div", { className: `${chartClass}__header-text`, children: [
|
|
88
74
|
title && /* @__PURE__ */ jsx("h3", { className: `${chartClass}__title`, children: title }),
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Weekday } from '../../behaviors/locale';
|
|
2
|
+
/**
|
|
3
|
+
* Group days into calendar weeks, each column starting on `weekStart`, each
|
|
4
|
+
* day at its weekday's row. The last week ends at the last day.
|
|
5
|
+
*/
|
|
6
|
+
export declare function buildWeeks<T extends {
|
|
7
|
+
date: string;
|
|
8
|
+
}>(days: readonly T[], weekStart: Weekday): (T | null)[][];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { weekdayOffset } from "../../behaviors/locale.js";
|
|
2
|
+
const MAX_WEEKS = 530;
|
|
3
|
+
const dayNumber = (date) => {
|
|
4
|
+
const match = /^(\d{4})-(\d{2})-(\d{2})/.exec(date);
|
|
5
|
+
return match ? Date.UTC(Number(match[1]), Number(match[2]) - 1, Number(match[3])) / 864e5 : null;
|
|
6
|
+
};
|
|
7
|
+
function buildWeeks(days, weekStart) {
|
|
8
|
+
const placed = days.map((day) => ({ day, n: dayNumber(day.date) })).filter((entry) => entry.n !== null);
|
|
9
|
+
if (placed.length === 0) return [];
|
|
10
|
+
const first = Math.min(...placed.map((entry) => entry.n));
|
|
11
|
+
const gridStart = first - weekdayOffset(((first + 4) % 7 + 7) % 7, weekStart);
|
|
12
|
+
const last = Math.min(Math.max(...placed.map((entry) => entry.n)), gridStart + MAX_WEEKS * 7 - 1);
|
|
13
|
+
const weekCount = Math.floor((last - gridStart) / 7) + 1;
|
|
14
|
+
const weeks = Array.from({ length: weekCount }, () => Array(7).fill(null));
|
|
15
|
+
for (const { day, n } of placed) {
|
|
16
|
+
if (n > last) continue;
|
|
17
|
+
const offset = n - gridStart;
|
|
18
|
+
weeks[Math.floor(offset / 7)][offset % 7] = day;
|
|
19
|
+
}
|
|
20
|
+
weeks[weekCount - 1].length = (last - gridStart) % 7 + 1;
|
|
21
|
+
return weeks;
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
buildWeeks
|
|
25
|
+
};
|
|
@@ -7,6 +7,12 @@
|
|
|
7
7
|
grouped on blur.
|
|
8
8
|
============================================ */
|
|
9
9
|
|
|
10
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
11
|
+
|
|
12
|
+
@layer rift.components {
|
|
13
|
+
|
|
10
14
|
.ds-currency-input .ds-input__field {
|
|
11
15
|
font-variant-numeric: tabular-nums;
|
|
12
16
|
}
|
|
17
|
+
|
|
18
|
+
} /* @layer rift.components */
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
only styles the chrome around it.
|
|
8
8
|
============================================ */
|
|
9
9
|
|
|
10
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
11
|
+
|
|
12
|
+
@layer rift.components {
|
|
13
|
+
|
|
10
14
|
.ds-data-table {
|
|
11
15
|
display: flex;
|
|
12
16
|
flex-direction: column;
|
|
@@ -1361,3 +1365,5 @@
|
|
|
1361
1365
|
/* Banner is a page-wide strip; over a table it takes the frame's corner. */
|
|
1362
1366
|
border-radius: var(--radius-300);
|
|
1363
1367
|
}
|
|
1368
|
+
|
|
1369
|
+
} /* @layer rift.components */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import React, { useMemo, useState, useEffect, useRef, useId, useLayoutEffect, useDeferredValue, useCallback } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { tableFeatures, columnVisibilityFeature, columnPinningFeature, columnOrderingFeature, rowSelectionFeature, globalFilteringFeature, columnFilteringFeature, rowSortingFeature, createFilteredRowModel, createSortedRowModel, useTable } from "@tanstack/react-table";
|
|
5
5
|
import { DropdownMenu } from "../DropdownMenu/DropdownMenu.js";
|
|
6
6
|
import { Dropdown } from "../Dropdown/Dropdown.js";
|
|
7
7
|
import { IconButton } from "../IconButton/IconButton.js";
|
|
@@ -37,6 +37,7 @@ import "../../fonts/material-symbols.css";
|
|
|
37
37
|
import { useLocale } from "../../behaviors/LocaleProvider.js";
|
|
38
38
|
import { logicalArrowKey, isRtl } from "../../behaviors/direction.js";
|
|
39
39
|
import { formatPercent } from "../../behaviors/locale.js";
|
|
40
|
+
import { periodColumns, periodsOf, totalOf } from "./periodColumns.js";
|
|
40
41
|
const DEFAULT_COLUMN_LABELS = {
|
|
41
42
|
menu: (header) => `${header} column options`,
|
|
42
43
|
sortAscending: "Sort ascending",
|
|
@@ -1739,7 +1740,7 @@ function DataTable({
|
|
|
1739
1740
|
size: "compact",
|
|
1740
1741
|
open: headerFilter === shown.id,
|
|
1741
1742
|
onOpenChange: (open) => open ? setHeaderFilter(shown.id) : closeHeaderFilter(),
|
|
1742
|
-
|
|
1743
|
+
"aria-label": filterLabels.filtered(text),
|
|
1743
1744
|
surface: "menu",
|
|
1744
1745
|
content: /* @__PURE__ */ jsx("div", { className: `${baseClass}__menu-row`, children: /* @__PURE__ */ jsx(
|
|
1745
1746
|
FilterEditor,
|
|
@@ -2541,5 +2542,8 @@ function reconcileDataTableView(view, columns) {
|
|
|
2541
2542
|
}
|
|
2542
2543
|
export {
|
|
2543
2544
|
DataTable,
|
|
2544
|
-
|
|
2545
|
+
periodColumns,
|
|
2546
|
+
periodsOf,
|
|
2547
|
+
reconcileDataTableView,
|
|
2548
|
+
totalOf
|
|
2545
2549
|
};
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
Date input with calendar icon and label
|
|
4
4
|
============================================ */
|
|
5
5
|
|
|
6
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
7
|
+
|
|
8
|
+
@layer rift.components {
|
|
9
|
+
|
|
6
10
|
.ds-date-input {
|
|
7
11
|
display: flex;
|
|
8
12
|
flex-direction: column;
|
|
@@ -151,3 +155,5 @@
|
|
|
151
155
|
.ds-date-input--compact .ds-date-input__field {
|
|
152
156
|
padding-inline-start: calc(var(--padding-200) + 20px + var(--gap-200)); /* 8px + 20px icon + 8px gap */
|
|
153
157
|
}
|
|
158
|
+
|
|
159
|
+
} /* @layer rift.components */
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
Inline calendar with month navigation
|
|
4
4
|
============================================ */
|
|
5
5
|
|
|
6
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
7
|
+
|
|
8
|
+
@layer rift.components {
|
|
9
|
+
|
|
6
10
|
.ds-date-picker {
|
|
7
11
|
display: inline-flex;
|
|
8
12
|
flex-direction: column;
|
|
@@ -227,3 +231,5 @@
|
|
|
227
231
|
opacity: 0.4;
|
|
228
232
|
pointer-events: none;
|
|
229
233
|
}
|
|
234
|
+
|
|
235
|
+
} /* @layer rift.components */
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
chips above, which wrap.
|
|
11
11
|
============================================ */
|
|
12
12
|
|
|
13
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
14
|
+
|
|
15
|
+
@layer rift.components {
|
|
16
|
+
|
|
13
17
|
/* Layout */
|
|
14
18
|
.ds-date-range-picker {
|
|
15
19
|
max-inline-size: 100%;
|
|
@@ -90,3 +94,5 @@
|
|
|
90
94
|
.ds-date-picker__gridcell:has(> .ds-date-range-picker__cell--preview-end):dir(rtl) {
|
|
91
95
|
background: linear-gradient(to right, transparent 50%, var(--color-action-passive-bg-active) 50%); /* ds-allow(physical): the right-to-left twin of the rule above */
|
|
92
96
|
}
|
|
97
|
+
|
|
98
|
+
} /* @layer rift.components */
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
warning, then error, and error once it passes.
|
|
8
8
|
============================================ */
|
|
9
9
|
|
|
10
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
11
|
+
|
|
12
|
+
@layer rift.components {
|
|
13
|
+
|
|
10
14
|
/* Base */
|
|
11
15
|
.ds-deadline {
|
|
12
16
|
display: inline-flex;
|
|
@@ -80,3 +84,5 @@
|
|
|
80
84
|
.ds-deadline--text.ds-deadline--overdue {
|
|
81
85
|
font-weight: var(--font-paragraph-emphasis-weight);
|
|
82
86
|
}
|
|
87
|
+
|
|
88
|
+
} /* @layer rift.components */
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
to go.
|
|
8
8
|
============================================ */
|
|
9
9
|
|
|
10
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
11
|
+
|
|
12
|
+
@layer rift.components {
|
|
13
|
+
|
|
10
14
|
/* Base */
|
|
11
15
|
|
|
12
16
|
.ds-decision-row {
|
|
@@ -44,3 +48,5 @@
|
|
|
44
48
|
.ds-decision-row .ds-widget-row__actions {
|
|
45
49
|
margin-inline-start: auto;
|
|
46
50
|
}
|
|
51
|
+
|
|
52
|
+
} /* @layer rift.components */
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
never by the viewport.
|
|
9
9
|
============================================ */
|
|
10
10
|
|
|
11
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
12
|
+
|
|
13
|
+
@layer rift.components {
|
|
14
|
+
|
|
11
15
|
/* Frame */
|
|
12
16
|
.ds-description-list__frame {
|
|
13
17
|
container-type: inline-size;
|
|
@@ -210,3 +214,5 @@
|
|
|
210
214
|
grid-template-columns: repeat(min(var(--ds-description-list-columns, 2), 2), minmax(0, 1fr));
|
|
211
215
|
}
|
|
212
216
|
}
|
|
217
|
+
|
|
218
|
+
} /* @layer rift.components */
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
General-purpose modal with backdrop overlay
|
|
4
4
|
============================================ */
|
|
5
5
|
|
|
6
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
7
|
+
|
|
8
|
+
@layer rift.components {
|
|
9
|
+
|
|
6
10
|
.ds-dialog {
|
|
7
11
|
position: fixed;
|
|
8
12
|
inset: 0;
|
|
@@ -152,3 +156,5 @@
|
|
|
152
156
|
margin: var(--padding-400);
|
|
153
157
|
}
|
|
154
158
|
}
|
|
159
|
+
|
|
160
|
+
} /* @layer rift.components */
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
Thin rule separating stacked content
|
|
4
4
|
============================================ */
|
|
5
5
|
|
|
6
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
7
|
+
|
|
8
|
+
@layer rift.components {
|
|
9
|
+
|
|
6
10
|
/* Base — plain horizontal <hr> */
|
|
7
11
|
.ds-divider {
|
|
8
12
|
border: none;
|
|
@@ -98,3 +102,5 @@
|
|
|
98
102
|
margin-block: 0;
|
|
99
103
|
margin-inline: var(--gap-500); /* 20px */
|
|
100
104
|
}
|
|
105
|
+
|
|
106
|
+
} /* @layer rift.components */
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
metadata line, upload progress, optional remove.
|
|
5
5
|
============================================ */
|
|
6
6
|
|
|
7
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
8
|
+
|
|
9
|
+
@layer rift.components {
|
|
10
|
+
|
|
7
11
|
.ds-document-chip {
|
|
8
12
|
/* Accent indirection — the error modifier repoints one variable
|
|
9
13
|
instead of restyling each part */
|
|
@@ -224,3 +228,5 @@
|
|
|
224
228
|
.ds-document-chip:has(> .ds-document-chip__remove) {
|
|
225
229
|
padding-inline-end: var(--padding-200);
|
|
226
230
|
}
|
|
231
|
+
|
|
232
|
+
} /* @layer rift.components */
|
|
@@ -53,7 +53,7 @@ const DocumentChip = React.forwardRef(
|
|
|
53
53
|
size: "compact",
|
|
54
54
|
value: progress,
|
|
55
55
|
showLabel: true,
|
|
56
|
-
|
|
56
|
+
"aria-label": progressLabel(name)
|
|
57
57
|
}
|
|
58
58
|
),
|
|
59
59
|
showDetail && !error && progress === void 0 && meta && /* @__PURE__ */ jsx("span", { className: `${baseClass}__meta`, children: meta })
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
control-height scale, or its container's.
|
|
9
9
|
============================================ */
|
|
10
10
|
|
|
11
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
12
|
+
|
|
13
|
+
@layer rift.components {
|
|
14
|
+
|
|
11
15
|
/* Base */
|
|
12
16
|
.ds-document-viewer {
|
|
13
17
|
display: flex;
|
|
@@ -186,3 +190,5 @@
|
|
|
186
190
|
line-height: var(--font-paragraph-line-height);
|
|
187
191
|
color: var(--color-text-secondary);
|
|
188
192
|
}
|
|
193
|
+
|
|
194
|
+
} /* @layer rift.components */
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
Edge-anchored modal panel that slides in
|
|
4
4
|
============================================ */
|
|
5
5
|
|
|
6
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
7
|
+
|
|
8
|
+
@layer rift.components {
|
|
9
|
+
|
|
6
10
|
.ds-drawer {
|
|
7
11
|
position: fixed;
|
|
8
12
|
inset: 0;
|
|
@@ -271,3 +275,5 @@
|
|
|
271
275
|
transition: none;
|
|
272
276
|
}
|
|
273
277
|
}
|
|
278
|
+
|
|
279
|
+
} /* @layer rift.components */
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
tick beside a label, not a leading icon.
|
|
11
11
|
============================================ */
|
|
12
12
|
|
|
13
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
14
|
+
|
|
15
|
+
@layer rift.components {
|
|
16
|
+
|
|
13
17
|
.ds-chosen-mark {
|
|
14
18
|
--icon-size: var(--icon-size-500);
|
|
15
19
|
flex-shrink: 0;
|
|
@@ -17,3 +21,5 @@
|
|
|
17
21
|
color: var(--color-action-primary-bg);
|
|
18
22
|
line-height: 1;
|
|
19
23
|
}
|
|
24
|
+
|
|
25
|
+
} /* @layer rift.components */
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
Custom select with menu, keyboard navigation
|
|
4
4
|
============================================ */
|
|
5
5
|
|
|
6
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
7
|
+
|
|
8
|
+
@layer rift.components {
|
|
9
|
+
|
|
6
10
|
.ds-dropdown {
|
|
7
11
|
display: flex;
|
|
8
12
|
flex-direction: column;
|
|
@@ -320,3 +324,5 @@
|
|
|
320
324
|
.ds-dropdown__option:has(.ds-chosen-mark) {
|
|
321
325
|
padding-inline-end: var(--padding-200);
|
|
322
326
|
}
|
|
327
|
+
|
|
328
|
+
} /* @layer rift.components */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import React, { useState, useId, useRef, useEffect } from "react";
|
|
4
4
|
import { useAnchoredPosition } from "../../behaviors/useAnchoredPosition.js";
|
|
5
5
|
import { useLayer } from "../../behaviors/useLayer.js";
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
Tokens aligned to Figma spec.
|
|
6
6
|
============================================ */
|
|
7
7
|
|
|
8
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
9
|
+
|
|
10
|
+
@layer rift.components {
|
|
11
|
+
|
|
8
12
|
.ds-dropdown-menu {
|
|
9
13
|
position: relative;
|
|
10
14
|
display: inline-flex;
|
|
@@ -405,3 +409,5 @@
|
|
|
405
409
|
.ds-dropdown-menu__panel--compact .ds-dropdown-menu__item--has-submenu {
|
|
406
410
|
padding-inline-end: var(--padding-200);
|
|
407
411
|
}
|
|
412
|
+
|
|
413
|
+
} /* @layer rift.components */
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
that have nothing to show
|
|
5
5
|
============================================ */
|
|
6
6
|
|
|
7
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
8
|
+
|
|
9
|
+
@layer rift.components {
|
|
10
|
+
|
|
7
11
|
.ds-empty-state {
|
|
8
12
|
display: flex;
|
|
9
13
|
flex-direction: column;
|
|
@@ -146,3 +150,5 @@
|
|
|
146
150
|
.ds-empty-state .material-symbols-rounded:not(:where(.ds-empty-state__action *)) {
|
|
147
151
|
color: inherit;
|
|
148
152
|
}
|
|
153
|
+
|
|
154
|
+
} /* @layer rift.components */
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
and a label. Used on Icons and Logos pages.
|
|
5
5
|
============================================ */
|
|
6
6
|
|
|
7
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
8
|
+
|
|
9
|
+
@layer rift.components {
|
|
10
|
+
|
|
7
11
|
.ds-entity-card {
|
|
8
12
|
/* Layout */
|
|
9
13
|
display: flex;
|
|
@@ -67,3 +71,5 @@
|
|
|
67
71
|
text-align: center;
|
|
68
72
|
word-break: break-word;
|
|
69
73
|
}
|
|
74
|
+
|
|
75
|
+
} /* @layer rift.components */
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
at rest, the passive wash on hover and focus at --radius-200).
|
|
6
6
|
============================================ */
|
|
7
7
|
|
|
8
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
9
|
+
|
|
10
|
+
@layer rift.components {
|
|
11
|
+
|
|
8
12
|
.ds-entity-switcher {
|
|
9
13
|
display: flex;
|
|
10
14
|
width: 100%;
|
|
@@ -29,8 +33,9 @@
|
|
|
29
33
|
TRIGGER
|
|
30
34
|
A card that is a control: the container fill and hairline, the passive
|
|
31
35
|
wash on hover. The edge is an inset shadow rather than a border so it
|
|
32
|
-
takes no room, and the mark starts one --padding-300 in
|
|
33
|
-
|
|
36
|
+
takes no room, and the mark starts one --padding-300 in. Collapsed, the
|
|
37
|
+
start padding centres the mark in the trigger instead (below), so it sits
|
|
38
|
+
on the rail's axis in any rail width.
|
|
34
39
|
============================================ */
|
|
35
40
|
|
|
36
41
|
.ds-entity-switcher__trigger {
|
|
@@ -50,7 +55,8 @@
|
|
|
50
55
|
cursor: pointer;
|
|
51
56
|
transition:
|
|
52
57
|
background-color var(--motion-duration-base) var(--motion-ease-standard),
|
|
53
|
-
box-shadow var(--motion-duration-base) var(--motion-ease-standard)
|
|
58
|
+
box-shadow var(--motion-duration-base) var(--motion-ease-standard),
|
|
59
|
+
padding-inline-start var(--motion-duration-slow) var(--motion-ease-emphasized);
|
|
54
60
|
}
|
|
55
61
|
|
|
56
62
|
.ds-entity-switcher__trigger:hover,
|
|
@@ -85,6 +91,12 @@
|
|
|
85
91
|
:where([data-expanded='false']) .ds-entity-switcher:not(.ds-entity-switcher--expanded) .ds-entity-switcher__trigger {
|
|
86
92
|
background-color: transparent;
|
|
87
93
|
box-shadow: none;
|
|
94
|
+
/* The mark centres where a rail's row icon centres: the row's icon inset
|
|
95
|
+
(AppSidebar's panel mode sets the hook), less half of what the larger
|
|
96
|
+
mark adds. The padding moves with the rail's sweep. */
|
|
97
|
+
padding-inline-start: calc(
|
|
98
|
+
var(--ds-entity-switcher-rail-inset, var(--padding-200)) - (var(--icon-size-800) - var(--icon-size-600)) / 2
|
|
99
|
+
);
|
|
88
100
|
}
|
|
89
101
|
|
|
90
102
|
.ds-entity-switcher--collapsed .ds-entity-switcher__trigger .ds-entity-switcher__text,
|
|
@@ -331,3 +343,5 @@
|
|
|
331
343
|
font-size: var(--font-paragraph-sm-size);
|
|
332
344
|
line-height: var(--font-paragraph-sm-line-height);
|
|
333
345
|
}
|
|
346
|
+
|
|
347
|
+
} /* @layer rift.components */
|
|
@@ -296,7 +296,7 @@ function EntitySwitcher({
|
|
|
296
296
|
align: "start",
|
|
297
297
|
open,
|
|
298
298
|
onOpenChange: setOpen,
|
|
299
|
-
|
|
299
|
+
"aria-label": `${switcherLabel}: ${selected.item.name}`,
|
|
300
300
|
children: /* @__PURE__ */ jsxs("button", { type: "button", className: "ds-entity-switcher__trigger", children: [
|
|
301
301
|
/* @__PURE__ */ jsx(Mark, { item: selected.item, large: true }),
|
|
302
302
|
/* @__PURE__ */ jsxs("span", { className: "ds-entity-switcher__text", children: [
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
heading and a list of links, one per error.
|
|
6
6
|
============================================ */
|
|
7
7
|
|
|
8
|
+
@layer rift.tokens, rift.preset, rift.components;
|
|
9
|
+
|
|
10
|
+
@layer rift.components {
|
|
11
|
+
|
|
8
12
|
/* Base */
|
|
9
13
|
.ds-error-summary {
|
|
10
14
|
display: flex;
|
|
@@ -92,3 +96,5 @@
|
|
|
92
96
|
outline: var(--border-050) solid var(--color-action-primary-bg);
|
|
93
97
|
outline-offset: var(--border-050);
|
|
94
98
|
}
|
|
99
|
+
|
|
100
|
+
} /* @layer rift.components */
|
|
@@ -5,6 +5,7 @@ import { useLocale } from "../../behaviors/LocaleProvider.js";
|
|
|
5
5
|
import { formatNumber } from "../../behaviors/locale.js";
|
|
6
6
|
import "../../fonts/material-symbols.css";
|
|
7
7
|
import "./ErrorSummary.css";
|
|
8
|
+
import { fieldErrorsFrom } from "./fieldErrors.js";
|
|
8
9
|
const DEFAULT_TITLE_LABEL = (count, formatted) => count === 1 ? "There is a problem" : `There are ${formatted} problems`;
|
|
9
10
|
function ErrorSummary({
|
|
10
11
|
errors,
|
|
@@ -66,5 +67,6 @@ function ErrorSummary({
|
|
|
66
67
|
);
|
|
67
68
|
}
|
|
68
69
|
export {
|
|
69
|
-
ErrorSummary
|
|
70
|
+
ErrorSummary,
|
|
71
|
+
fieldErrorsFrom
|
|
70
72
|
};
|