rift-ds 1.30.0 → 1.32.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 +6 -4
- package/behaviors/chat-card.css +4 -1
- package/behaviors/deferComponent.d.ts +43 -0
- package/behaviors/deferComponent.js +35 -0
- package/behaviors/locale.d.ts +7 -0
- package/behaviors/locale.js +5 -0
- package/behaviors/shell.css +33 -0
- package/bin/rift-ds.mjs +35 -9
- package/bin/templates/blocks/app/planner/PlannerGrid.tsx +58 -0
- package/bin/templates/blocks/app/planner/Requests.tsx +42 -0
- package/bin/templates/blocks/app/planner/page.module.css +17 -0
- package/bin/templates/blocks/app/planner/page.tsx +32 -0
- package/bin/templates/blocks/components/blocks/AppShell.module.css +10 -1
- package/bin/templates/blocks/registry.json +14 -0
- package/bin/templates/chat/app/api/chat/route.actions.ts +108 -0
- package/bin/templates/chat/components/chat/ChatMount.actions.tsx +55 -0
- package/bin/templates/chat/components/chat/ChatMount.tsx +14 -1
- package/bin/templates/chat/components/chat/proposals/ProposalCard.tsx +81 -0
- package/bin/templates/chat/components/chat/proposals/actions.ts +60 -0
- package/bin/templates/chat/components/chat/proposals/confirmation.ts +9 -0
- package/bin/templates/chat/components/chat/proposals/renderers.tsx +9 -0
- package/chat/ChatLauncher.d.ts +13 -2
- package/chat/ChatLauncher.js +52 -29
- package/chat/ChatProvider.d.ts +19 -2
- package/chat/ChatProvider.js +26 -3
- package/chat/ChatWidget.css +23 -4
- package/chat/ChatWidget.d.ts +2 -1
- package/chat/ChatWidget.js +23 -21
- package/chat/actions.d.ts +52 -6
- package/chat/actions.js +53 -5
- package/chat/contextSchema.d.ts +76 -0
- package/chat/contextSchema.js +58 -0
- package/chat/deferredChatWidget.d.ts +10 -0
- package/chat/deferredChatWidget.js +10 -0
- package/chat/index.d.ts +3 -2
- package/chat/index.js +7 -1
- package/chat/registry.json.d.ts +4 -3
- package/chat/registry.json.js +1 -1
- package/chat/server.d.ts +18 -2
- package/chat/server.js +10 -1
- package/chat/suggestions.d.ts +7 -0
- package/chat/suggestions.js +13 -1
- package/chat/types.d.ts +23 -0
- package/chat/useChat.d.ts +2 -2
- package/chat/useChat.js +15 -1
- package/components/Accordion/Accordion.css +8 -0
- package/components/AgentPlan/AgentPlan.css +8 -0
- package/components/AgentRail/AgentRail.css +3 -3
- package/components/AiButton/AiButton.css +19 -0
- package/components/AiButton/AiButton.d.ts +10 -1
- package/components/AiButton/AiButton.js +6 -1
- package/components/AppSidebar/AppSidebar.css +12 -0
- package/components/ArtifactPanel/ArtifactPanel.js +5 -5
- package/components/Attachment/AttachmentViewer.js +7 -7
- package/components/BentoTile/BentoTile.css +1 -1
- package/components/BentoTile/BentoTile.js +5 -5
- package/components/Button/Button.css +28 -1
- package/components/Button/Button.d.ts +7 -2
- package/components/Button/Button.js +7 -3
- package/components/ButtonGroup/ButtonGroup.css +10 -1
- package/components/Chart/RadarChart.js +24 -10
- package/components/ChatHeader/ChatHeader.d.ts +1 -1
- package/components/ChatThread/ChatThread.css +1 -1
- package/components/Chip/Chip.css +26 -0
- package/components/CircularButton/CircularButton.d.ts +16 -96
- package/components/CircularButton/CircularButton.js +11 -94
- package/components/Combobox/Combobox.css +12 -0
- package/components/CommandPalette/CommandPalette.css +1 -1
- package/components/CommandPalette/CommandPalette.js +3 -3
- package/components/CommandPaletteTrigger/CommandPaletteTrigger.css +9 -0
- package/components/CommandPaletteTrigger/CommandPaletteTrigger.d.ts +10 -2
- package/components/CommandPaletteTrigger/CommandPaletteTrigger.js +7 -2
- package/components/Composer/Composer.css +3 -3
- package/components/Composer/Composer.js +9 -9
- package/components/ContextMenu/ContextMenu.css +24 -0
- package/components/DataTable/DataTable.css +19 -4
- package/components/DataTable/DataTable.d.ts +14 -2
- package/components/DataTable/DataTable.js +28 -17
- package/components/DataTable/periodColumns.d.ts +37 -0
- package/components/DataTable/periodColumns.js +48 -0
- package/components/DateInput/DateInput.css +20 -0
- package/components/DatePicker/DatePicker.css +22 -6
- package/components/DatePicker/DatePicker.d.ts +2 -1
- package/components/DatePicker/DatePicker.js +2 -2
- package/components/DateRangePicker/DateRangePicker.js +2 -2
- package/components/DecisionRow/DecisionRow.css +46 -0
- package/components/DecisionRow/DecisionRow.d.ts +62 -0
- package/components/DecisionRow/DecisionRow.js +93 -0
- package/components/DescriptionList/DescriptionListCopy.d.ts +1 -1
- package/components/DescriptionList/DescriptionListCopy.js +3 -3
- package/components/Dialog/Dialog.css +1 -1
- package/components/Dialog/Dialog.js +3 -3
- package/components/DocumentChip/DocumentChip.css +12 -0
- package/components/DocumentViewer/DocumentViewer.js +10 -10
- package/components/Drawer/Drawer.css +1 -1
- package/components/Drawer/Drawer.js +3 -3
- package/components/Dropdown/Dropdown.css +30 -0
- package/components/DropdownMenu/DropdownMenu.css +24 -0
- package/components/EventCalendar/EventCalendar.css +54 -0
- package/components/EventCalendar/EventCalendar.d.ts +27 -5
- package/components/EventCalendar/EventCalendar.js +50 -15
- package/components/FileInput/FileInput.css +9 -0
- package/components/FilterBar/FilterBar.css +12 -0
- package/components/FunnelChart/FunnelChart.js +33 -22
- package/components/Globe/Globe.css +7 -0
- package/components/Globe/Globe.js +1 -1
- package/components/{CircularButton/CircularButton.css → IconButton/IconButton.css} +91 -81
- package/components/IconButton/IconButton.d.ts +108 -0
- package/components/IconButton/IconButton.js +101 -0
- package/components/Input/Input.css +53 -0
- package/components/Input/Input.js +3 -3
- package/components/MaskedInput/MaskedInput.js +3 -3
- package/components/ModelPicker/ModelPicker.css +12 -1
- package/components/NavList/NavList.css +1 -1
- package/components/Pagination/Pagination.css +1 -1
- package/components/QuestionCard/QuestionCard.js +3 -3
- package/components/RadioButton/RadioButton.css +14 -12
- package/components/RichDropdown/RichDropdown.css +7 -0
- package/components/SegmentedControl/SegmentedControl.css +16 -5
- package/components/SegmentedControl/SegmentedControl.js +7 -4
- package/components/SiteHeader/SiteHeader.css +12 -5
- package/components/SiteHeader/SiteHeader.js +3 -3
- package/components/SourceTrail/SourceTrail.css +8 -0
- package/components/SplitButton/SplitButton.css +14 -14
- package/components/SplitButton/SplitButton.js +3 -3
- package/components/Table/Table.css +7 -0
- package/components/Table/Table.js +1 -1
- package/components/TableToolbar/TableToolbar.css +2 -2
- package/components/TableToolbar/TableToolbar.js +36 -37
- package/components/Tabs/Tabs.css +21 -3
- package/components/ThreadPanel/ThreadPanel.css +8 -0
- package/components/ThreadTabs/ThreadTabs.css +7 -0
- package/components/TimePicker/TimePicker.css +12 -0
- package/components/Timeline/Timeline.css +8 -0
- package/components/ToolCall/ToolCall.css +8 -0
- package/components/Tooltip/Tooltip.js +3 -2
- package/components/Widget/Widget.css +2 -0
- package/components/WorldMap/WorldMap.css +15 -0
- package/components/WorldMap/WorldMap.js +61 -6
- package/components/registry.d.ts +3 -1
- package/components/registry.json +39 -13
- package/components/registry.json.d.ts +39 -13
- package/components/registry.json.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +8 -0
- package/package.json +6 -2
- package/tokens/presets/blueprint.css +9 -0
- package/tokens/presets/bubblegum.css +9 -0
- package/tokens/presets/contrast.css +3 -3
- package/tokens/presets/coral.css +3 -3
- package/tokens/presets/ember.css +9 -0
- package/tokens/presets/getaway.css +9 -0
- package/tokens/presets/gold.css +3 -3
- package/tokens/presets/mono.css +3 -3
- package/tokens/presets/pink.css +3 -3
- package/tokens/presets/plum.css +3 -3
- package/tokens/presets/signal.css +9 -0
- package/tokens/presets/smoke.css +9 -0
- package/tokens/presets/velvet.css +9 -0
- package/tokens/presets/violet.css +3 -3
- package/tokens/presets/volt.css +9 -0
- package/tokens/presets/warm.css +3 -3
|
@@ -7,7 +7,7 @@ import { Button } from "../Button/Button.js";
|
|
|
7
7
|
import { Chip } from "../Chip/Chip.js";
|
|
8
8
|
import { Composer } from "../Composer/Composer.js";
|
|
9
9
|
import { Dropdown } from "../Dropdown/Dropdown.js";
|
|
10
|
-
import {
|
|
10
|
+
import { IconButton } from "../IconButton/IconButton.js";
|
|
11
11
|
import { DropdownMenu } from "../DropdownMenu/DropdownMenu.js";
|
|
12
12
|
import { Input } from "../Input/Input.js";
|
|
13
13
|
import { Drawer } from "../Drawer/Drawer.js";
|
|
@@ -17,7 +17,6 @@ import { SplitButton } from "../SplitButton/SplitButton.js";
|
|
|
17
17
|
import { Tabs } from "../Tabs/Tabs.js";
|
|
18
18
|
import { useOptionalToast, ToastProvider, useToast } from "../Toast/Toast.js";
|
|
19
19
|
import { ToggleSwitch } from "../ToggleSwitch/ToggleSwitch.js";
|
|
20
|
-
import { Tooltip } from "../Tooltip/Tooltip.js";
|
|
21
20
|
import { FilterEditor } from "../DataTable/FilterEditor.js";
|
|
22
21
|
import { startDrag } from "../DataTable/dragGesture.js";
|
|
23
22
|
import { parseDate, absoluteDate } from "../DataTable/columnTypes.js";
|
|
@@ -239,13 +238,13 @@ function CommandRow({ command, table, labels, size, open, onClose, state, onStat
|
|
|
239
238
|
},
|
|
240
239
|
children: [
|
|
241
240
|
/* @__PURE__ */ jsx(
|
|
242
|
-
|
|
241
|
+
IconButton,
|
|
243
242
|
{
|
|
244
243
|
className: "ds-table-toolbar__command-close",
|
|
245
244
|
icon: "close",
|
|
246
245
|
variant: "tertiary",
|
|
247
246
|
size,
|
|
248
|
-
|
|
247
|
+
label: labels.commandClose,
|
|
249
248
|
tooltip: false,
|
|
250
249
|
onClick: onClose
|
|
251
250
|
}
|
|
@@ -638,7 +637,7 @@ const TableToolbar = React.forwardRef(
|
|
|
638
637
|
onClick: () => setCommandOpen(true)
|
|
639
638
|
}
|
|
640
639
|
);
|
|
641
|
-
const commandTrigger =
|
|
640
|
+
const commandTrigger = commandButtonDrawn;
|
|
642
641
|
const matching = table?.matchingIds ?? [];
|
|
643
642
|
const matchingCount = table?.matchingCount ?? matching.length;
|
|
644
643
|
const selectedSet = new Set(table?.selectedIds);
|
|
@@ -698,12 +697,12 @@ const TableToolbar = React.forwardRef(
|
|
|
698
697
|
children: [
|
|
699
698
|
/* @__PURE__ */ jsxs("div", { className: "ds-table-toolbar__bulk-start", children: [
|
|
700
699
|
/* @__PURE__ */ jsx(
|
|
701
|
-
|
|
700
|
+
IconButton,
|
|
702
701
|
{
|
|
703
702
|
icon: "close",
|
|
704
703
|
variant: "tertiary",
|
|
705
704
|
size,
|
|
706
|
-
|
|
705
|
+
label: labels.clearSelection,
|
|
707
706
|
tooltip: labels.clearSelection,
|
|
708
707
|
onClick: clearSelection
|
|
709
708
|
}
|
|
@@ -722,13 +721,13 @@ const TableToolbar = React.forwardRef(
|
|
|
722
721
|
/* @__PURE__ */ jsxs("div", { className: "ds-table-toolbar__bulk-end", children: [
|
|
723
722
|
orderedActions.map(bulkButton),
|
|
724
723
|
actionFit.icons && iconFirst.slice(0, shownActions).map((action) => /* @__PURE__ */ jsx(
|
|
725
|
-
|
|
724
|
+
IconButton,
|
|
726
725
|
{
|
|
727
726
|
icon: action.icon,
|
|
728
727
|
variant: "secondary",
|
|
729
728
|
tone: action.destructive ? "destructive" : "neutral",
|
|
730
729
|
size,
|
|
731
|
-
|
|
730
|
+
label: action.label,
|
|
732
731
|
tooltip: action.label,
|
|
733
732
|
disabled: action.disabled,
|
|
734
733
|
onClick: () => action.onSelect(selection)
|
|
@@ -748,12 +747,12 @@ const TableToolbar = React.forwardRef(
|
|
|
748
747
|
onClick: () => action.onSelect(selection)
|
|
749
748
|
})),
|
|
750
749
|
trigger: /* @__PURE__ */ jsx(
|
|
751
|
-
|
|
750
|
+
IconButton,
|
|
752
751
|
{
|
|
753
752
|
icon: "more_horiz",
|
|
754
753
|
variant: "tertiary",
|
|
755
754
|
size,
|
|
756
|
-
|
|
755
|
+
label: labels.moreBulkActions,
|
|
757
756
|
tooltip: labels.moreBulkActions
|
|
758
757
|
}
|
|
759
758
|
)
|
|
@@ -803,13 +802,13 @@ const TableToolbar = React.forwardRef(
|
|
|
803
802
|
}
|
|
804
803
|
);
|
|
805
804
|
const filterIcon = /* @__PURE__ */ jsx(
|
|
806
|
-
|
|
805
|
+
IconButton,
|
|
807
806
|
{
|
|
808
807
|
icon: "filter_list",
|
|
809
808
|
variant: "secondary",
|
|
810
809
|
tone: "neutral",
|
|
811
810
|
size,
|
|
812
|
-
|
|
811
|
+
label: labels.filters(activeFilters),
|
|
813
812
|
tooltip: labels.filters(activeFilters)
|
|
814
813
|
}
|
|
815
814
|
);
|
|
@@ -832,13 +831,13 @@ const TableToolbar = React.forwardRef(
|
|
|
832
831
|
/* @__PURE__ */ jsxs("div", { className: "ds-table-toolbar__menu-heading", children: [
|
|
833
832
|
/* @__PURE__ */ jsx("span", { children: column.label }),
|
|
834
833
|
/* @__PURE__ */ jsx(
|
|
835
|
-
|
|
834
|
+
IconButton,
|
|
836
835
|
{
|
|
837
836
|
icon: "close",
|
|
838
837
|
variant: "tertiary",
|
|
839
838
|
size: "compact",
|
|
840
839
|
tooltip: false,
|
|
841
|
-
|
|
840
|
+
label: filterLabels.remove(chipText(filter)),
|
|
842
841
|
onClick: () => removeFilter(filter.id)
|
|
843
842
|
}
|
|
844
843
|
)
|
|
@@ -911,13 +910,13 @@ const TableToolbar = React.forwardRef(
|
|
|
911
910
|
}
|
|
912
911
|
),
|
|
913
912
|
/* @__PURE__ */ jsx(
|
|
914
|
-
|
|
913
|
+
IconButton,
|
|
915
914
|
{
|
|
916
915
|
icon: "close",
|
|
917
916
|
variant: "tertiary",
|
|
918
917
|
size,
|
|
919
918
|
tooltip: false,
|
|
920
|
-
|
|
919
|
+
label: filterLabels.remove(text),
|
|
921
920
|
onClick: () => removeFilter(filter.id)
|
|
922
921
|
}
|
|
923
922
|
)
|
|
@@ -1070,13 +1069,13 @@ const TableToolbar = React.forwardRef(
|
|
|
1070
1069
|
}
|
|
1071
1070
|
),
|
|
1072
1071
|
/* @__PURE__ */ jsx(
|
|
1073
|
-
|
|
1072
|
+
IconButton,
|
|
1074
1073
|
{
|
|
1075
1074
|
icon: "close",
|
|
1076
1075
|
variant: "tertiary",
|
|
1077
1076
|
size,
|
|
1078
1077
|
tooltip: false,
|
|
1079
|
-
|
|
1078
|
+
label: labels.removeSort(label),
|
|
1080
1079
|
onClick: () => setSorts(sorts.filter((s) => s.key !== entry.key))
|
|
1081
1080
|
}
|
|
1082
1081
|
)
|
|
@@ -1090,13 +1089,13 @@ const TableToolbar = React.forwardRef(
|
|
|
1090
1089
|
] })
|
|
1091
1090
|
] }),
|
|
1092
1091
|
children: /* @__PURE__ */ jsx(
|
|
1093
|
-
|
|
1092
|
+
IconButton,
|
|
1094
1093
|
{
|
|
1095
1094
|
icon: "swap_vert",
|
|
1096
1095
|
variant: "secondary",
|
|
1097
1096
|
tone: "neutral",
|
|
1098
1097
|
size,
|
|
1099
|
-
|
|
1098
|
+
label: labels.sort(sorts.length),
|
|
1100
1099
|
tooltip: labels.sort(sorts.length)
|
|
1101
1100
|
}
|
|
1102
1101
|
)
|
|
@@ -1173,12 +1172,12 @@ const TableToolbar = React.forwardRef(
|
|
|
1173
1172
|
}
|
|
1174
1173
|
],
|
|
1175
1174
|
trigger: /* @__PURE__ */ jsx(
|
|
1176
|
-
|
|
1175
|
+
IconButton,
|
|
1177
1176
|
{
|
|
1178
1177
|
icon: "more_horiz",
|
|
1179
1178
|
variant: "tertiary",
|
|
1180
1179
|
size: "compact",
|
|
1181
|
-
|
|
1180
|
+
label: labels.viewMenu(active.label, dirty),
|
|
1182
1181
|
tooltip: labels.viewMenu(active.label, dirty)
|
|
1183
1182
|
}
|
|
1184
1183
|
)
|
|
@@ -1240,12 +1239,12 @@ const TableToolbar = React.forwardRef(
|
|
|
1240
1239
|
),
|
|
1241
1240
|
renaming === null && viewMenu,
|
|
1242
1241
|
renaming === null && /* @__PURE__ */ jsx(
|
|
1243
|
-
|
|
1242
|
+
IconButton,
|
|
1244
1243
|
{
|
|
1245
1244
|
icon: "add",
|
|
1246
1245
|
variant: "tertiary",
|
|
1247
1246
|
size: "compact",
|
|
1248
|
-
|
|
1247
|
+
label: labels.newView,
|
|
1249
1248
|
tooltip: labels.newView,
|
|
1250
1249
|
onClick: addView
|
|
1251
1250
|
}
|
|
@@ -1285,13 +1284,13 @@ const TableToolbar = React.forwardRef(
|
|
|
1285
1284
|
position: "bottom",
|
|
1286
1285
|
content: groupPanel,
|
|
1287
1286
|
children: /* @__PURE__ */ jsx(
|
|
1288
|
-
|
|
1287
|
+
IconButton,
|
|
1289
1288
|
{
|
|
1290
1289
|
icon: "view_agenda",
|
|
1291
1290
|
variant: "secondary",
|
|
1292
1291
|
tone: "neutral",
|
|
1293
1292
|
size,
|
|
1294
|
-
|
|
1293
|
+
label: labels.group(Boolean(groupedBy)),
|
|
1295
1294
|
tooltip: labels.group(Boolean(groupedBy))
|
|
1296
1295
|
}
|
|
1297
1296
|
)
|
|
@@ -1313,13 +1312,13 @@ const TableToolbar = React.forwardRef(
|
|
|
1313
1312
|
/* @__PURE__ */ jsx("div", { className: "ds-table-toolbar__menu-actions", children: showAllColumns })
|
|
1314
1313
|
] }),
|
|
1315
1314
|
children: /* @__PURE__ */ jsx(
|
|
1316
|
-
|
|
1315
|
+
IconButton,
|
|
1317
1316
|
{
|
|
1318
1317
|
icon: "view_column",
|
|
1319
1318
|
variant: "secondary",
|
|
1320
1319
|
tone: "neutral",
|
|
1321
1320
|
size,
|
|
1322
|
-
|
|
1321
|
+
label: labels.columns,
|
|
1323
1322
|
tooltip: labels.columns
|
|
1324
1323
|
}
|
|
1325
1324
|
)
|
|
@@ -1358,13 +1357,13 @@ const TableToolbar = React.forwardRef(
|
|
|
1358
1357
|
] })
|
|
1359
1358
|
] }),
|
|
1360
1359
|
children: /* @__PURE__ */ jsx(
|
|
1361
|
-
|
|
1360
|
+
IconButton,
|
|
1362
1361
|
{
|
|
1363
1362
|
icon: "more_horiz",
|
|
1364
1363
|
variant: "secondary",
|
|
1365
1364
|
tone: "neutral",
|
|
1366
1365
|
size,
|
|
1367
|
-
|
|
1366
|
+
label: labels.more,
|
|
1368
1367
|
tooltip: labels.more
|
|
1369
1368
|
}
|
|
1370
1369
|
)
|
|
@@ -1466,13 +1465,13 @@ const TableToolbar = React.forwardRef(
|
|
|
1466
1465
|
ariaLabel: labels.search,
|
|
1467
1466
|
content: /* @__PURE__ */ jsx("div", { className: "ds-table-toolbar__menu ds-table-toolbar__search-panel", children: /* @__PURE__ */ jsx("div", { className: "ds-table-toolbar__menu-row", children: searchField }) }),
|
|
1468
1467
|
children: /* @__PURE__ */ jsx(
|
|
1469
|
-
|
|
1468
|
+
IconButton,
|
|
1470
1469
|
{
|
|
1471
1470
|
icon: "search",
|
|
1472
1471
|
variant: "secondary",
|
|
1473
1472
|
tone: "neutral",
|
|
1474
1473
|
size,
|
|
1475
|
-
|
|
1474
|
+
label: labels.search,
|
|
1476
1475
|
tooltip: labels.search
|
|
1477
1476
|
}
|
|
1478
1477
|
)
|
|
@@ -1487,13 +1486,13 @@ const TableToolbar = React.forwardRef(
|
|
|
1487
1486
|
(primaryAction || !narrow && secondaryActions.length > 0) && /* @__PURE__ */ jsxs("span", { className: "ds-table-toolbar__actions", children: [
|
|
1488
1487
|
!narrow && secondaryActions.map(
|
|
1489
1488
|
(action) => typeof action.icon === "string" ? /* @__PURE__ */ jsx(
|
|
1490
|
-
|
|
1489
|
+
IconButton,
|
|
1491
1490
|
{
|
|
1492
1491
|
icon: action.icon,
|
|
1493
1492
|
variant: "secondary",
|
|
1494
1493
|
tone: "neutral",
|
|
1495
1494
|
size,
|
|
1496
|
-
|
|
1495
|
+
label: action.label,
|
|
1497
1496
|
tooltip: action.label,
|
|
1498
1497
|
disabled: action.disabled,
|
|
1499
1498
|
onClick: action.onSelect
|
|
@@ -1514,12 +1513,12 @@ const TableToolbar = React.forwardRef(
|
|
|
1514
1513
|
)
|
|
1515
1514
|
),
|
|
1516
1515
|
primaryAction && (narrow ? /* @__PURE__ */ jsx(
|
|
1517
|
-
|
|
1516
|
+
IconButton,
|
|
1518
1517
|
{
|
|
1519
1518
|
icon: typeof primaryAction.icon === "string" ? primaryAction.icon : "add",
|
|
1520
1519
|
variant: "primary",
|
|
1521
1520
|
size,
|
|
1522
|
-
|
|
1521
|
+
label: primaryAction.label,
|
|
1523
1522
|
tooltip: primaryAction.label,
|
|
1524
1523
|
disabled: primaryAction.disabled,
|
|
1525
1524
|
onClick: primaryAction.onSelect
|
package/components/Tabs/Tabs.css
CHANGED
|
@@ -3,11 +3,25 @@
|
|
|
3
3
|
Horizontal tab navigation with underline
|
|
4
4
|
============================================ */
|
|
5
5
|
|
|
6
|
+
/* A row that does not fit its container scrolls inline rather than running
|
|
7
|
+
off the page: the tabs never wrap or shrink, the scrollbar is hidden (a
|
|
8
|
+
swipe, a trackpad or the arrow keys, whose focus scrolls the tab into
|
|
9
|
+
view, all move it), and the baseline is drawn as a background so the
|
|
10
|
+
scroll container's clipping cannot cut the active underline that sits
|
|
11
|
+
on it. */
|
|
6
12
|
.ds-tabs {
|
|
7
13
|
display: inline-flex;
|
|
8
14
|
align-items: stretch;
|
|
9
15
|
gap: 0;
|
|
10
|
-
|
|
16
|
+
max-width: 100%;
|
|
17
|
+
overflow-x: auto;
|
|
18
|
+
overflow-y: hidden;
|
|
19
|
+
scrollbar-width: none;
|
|
20
|
+
background: linear-gradient(var(--color-bg-container-border), var(--color-bg-container-border)) bottom / 100% var(--border-025) no-repeat;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ds-tabs::-webkit-scrollbar {
|
|
24
|
+
display: none;
|
|
11
25
|
}
|
|
12
26
|
|
|
13
27
|
/* ============================================
|
|
@@ -19,8 +33,11 @@
|
|
|
19
33
|
width: 100%;
|
|
20
34
|
}
|
|
21
35
|
|
|
36
|
+
/* Equal shares of the row, but never narrower than a label: past that the
|
|
37
|
+
row scrolls like any other. */
|
|
22
38
|
.ds-tabs--full-width .ds-tabs__tab {
|
|
23
|
-
flex: 1;
|
|
39
|
+
flex: 1 1 0;
|
|
40
|
+
min-width: max-content;
|
|
24
41
|
}
|
|
25
42
|
|
|
26
43
|
/* ============================================
|
|
@@ -34,8 +51,9 @@
|
|
|
34
51
|
gap: var(--gap-200); /* 8px */
|
|
35
52
|
padding: var(--padding-200) var(--padding-400); /* 8px 16px */
|
|
36
53
|
border: none;
|
|
54
|
+
flex: none;
|
|
55
|
+
white-space: nowrap;
|
|
37
56
|
border-bottom: var(--border-050) solid transparent;
|
|
38
|
-
margin-bottom: calc(var(--border-025) * -1); /* Overlap the container border */
|
|
39
57
|
background: none;
|
|
40
58
|
cursor: pointer;
|
|
41
59
|
position: relative;
|
|
@@ -987,3 +987,11 @@
|
|
|
987
987
|
.ds-thread-panel__project {
|
|
988
988
|
padding-inline-end: var(--padding-300);
|
|
989
989
|
}
|
|
990
|
+
|
|
991
|
+
/* Icon side padding, Button's rule (design.md): a glyph's box carries its
|
|
992
|
+
own side bearing, so a side that holds one takes the step below the text
|
|
993
|
+
side. A thread row that shows its icon leads with it, so it starts
|
|
994
|
+
on the icon rows' line rather than the text rows' (12 → 8). */
|
|
995
|
+
.ds-thread-panel__thread:has(.ds-thread-panel__thread-icon) {
|
|
996
|
+
padding-inline-start: var(--padding-200);
|
|
997
|
+
}
|
|
@@ -253,3 +253,10 @@
|
|
|
253
253
|
.ds-thread-tabs__add:hover {
|
|
254
254
|
background-color: var(--color-action-passive-bg-hover);
|
|
255
255
|
}
|
|
256
|
+
|
|
257
|
+
/* Icon side padding, Button's rule: a leading status dot or icon carries its
|
|
258
|
+
own side bearing, so the trigger's start takes the step below the text
|
|
259
|
+
side (12 → 8). */
|
|
260
|
+
.ds-thread-tabs__trigger:has(.ds-thread-tabs__status, .ds-thread-tabs__icon) {
|
|
261
|
+
padding-inline-start: var(--padding-200);
|
|
262
|
+
}
|
|
@@ -222,3 +222,15 @@
|
|
|
222
222
|
letter-spacing: var(--font-paragraph-sm-emphasis-letter-spacing);
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
|
|
226
|
+
/* Icon side padding, Button's rule (design.md): a glyph's box carries its
|
|
227
|
+
own side bearing, so a side that holds one takes the step below the text
|
|
228
|
+
side. The trigger leads with the clock and ends on the chevron, so
|
|
229
|
+
both ends step down (16 → 12, compact 12 → 8). */
|
|
230
|
+
.ds-timepicker__trigger {
|
|
231
|
+
padding-inline: var(--padding-300);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.ds-timepicker--compact .ds-timepicker__trigger {
|
|
235
|
+
padding-inline: var(--padding-200);
|
|
236
|
+
}
|
|
@@ -369,3 +369,11 @@
|
|
|
369
369
|
var(--color-bg-container-primary-transparent)
|
|
370
370
|
);
|
|
371
371
|
}
|
|
372
|
+
|
|
373
|
+
/* A horizontal stepper's steps share the row equally, so a long word in a
|
|
374
|
+
title or description wraps inside its step rather than drawing over the
|
|
375
|
+
next one. */
|
|
376
|
+
.ds-timeline--horizontal .ds-timeline__title,
|
|
377
|
+
.ds-timeline--horizontal .ds-timeline__description {
|
|
378
|
+
overflow-wrap: break-word;
|
|
379
|
+
}
|
|
@@ -307,3 +307,11 @@
|
|
|
307
307
|
.ds-tool-call__content > .ds-code-block .ds-code-block__pre {
|
|
308
308
|
padding: 0;
|
|
309
309
|
}
|
|
310
|
+
|
|
311
|
+
/* Icon side padding, Button's rule (design.md): a glyph's box carries its
|
|
312
|
+
own side bearing, so a side that holds one takes the step below the text
|
|
313
|
+
side. The header's chevron end steps in from the card inset; the
|
|
314
|
+
leading side keeps the inset, the line the body below it reads from. */
|
|
315
|
+
.ds-tool-call__header:has(.ds-tool-call__chevron) {
|
|
316
|
+
padding-inline-end: calc(var(--ds-chat-card-inset) - var(--padding-100));
|
|
317
|
+
}
|
|
@@ -72,8 +72,9 @@ const Tooltip = React.forwardRef(
|
|
|
72
72
|
panel.style.setProperty("--ds-tooltip-arrow", `${arrow}px`);
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
-
const
|
|
76
|
-
|
|
75
|
+
const describedChild = isValidElement(children) ? children : null;
|
|
76
|
+
const trigger = describedChild ? cloneElement(describedChild, {
|
|
77
|
+
"aria-describedby": [describedChild.props["aria-describedby"], tooltipId].filter(Boolean).join(" ")
|
|
77
78
|
}) : children;
|
|
78
79
|
const containerClasses = [baseClass, className].filter(Boolean).join(" ");
|
|
79
80
|
const panelClasses = [
|
|
@@ -83,6 +83,8 @@
|
|
|
83
83
|
line-height: var(--font-paragraph-sm-line-height);
|
|
84
84
|
letter-spacing: var(--font-paragraph-sm-letter-spacing);
|
|
85
85
|
color: var(--color-text-secondary);
|
|
86
|
+
/* An unbroken name (a file, an id) wraps rather than running out of the tile. */
|
|
87
|
+
overflow-wrap: anywhere;
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
/* Footer — behind the family's divider, a step below the body */
|
|
@@ -167,6 +167,21 @@ button.ds-world-map__marker:hover .ds-world-map__dot {
|
|
|
167
167
|
pointer-events: none;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
/* A label that would run past the map's edge (or under the zoom pill) sits
|
|
171
|
+
on the dot's other side; the component measures and writes data-side. */
|
|
172
|
+
.ds-world-map__label[data-side='start'] {
|
|
173
|
+
left: auto;
|
|
174
|
+
right: 100%;
|
|
175
|
+
padding-left: 0;
|
|
176
|
+
padding-right: var(--padding-100);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* A marker the crop or the zoom pill hides, or a label with room on
|
|
180
|
+
neither side, is hidden outright rather than shown cut. */
|
|
181
|
+
.ds-world-map [data-offstage] {
|
|
182
|
+
visibility: hidden;
|
|
183
|
+
}
|
|
184
|
+
|
|
170
185
|
.ds-world-map__marker--active .ds-world-map__label {
|
|
171
186
|
color: var(--color-text-primary);
|
|
172
187
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import React, { useState, useRef, useEffect, useLayoutEffect } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { IconButton } from "../IconButton/IconButton.js";
|
|
5
5
|
import { HoverCard } from "../HoverCard/HoverCard.js";
|
|
6
6
|
import "./WorldMap.css";
|
|
7
7
|
import { LAND_PATH } from "./land.js";
|
|
@@ -230,6 +230,61 @@ const WorldMap = React.forwardRef(
|
|
|
230
230
|
setHoveredId((id) => id === point.id ? null : id);
|
|
231
231
|
onPointHover?.(null);
|
|
232
232
|
};
|
|
233
|
+
const zoomPillRef = useRef(null);
|
|
234
|
+
const fitMarkers = () => {
|
|
235
|
+
const root = rootRef.current;
|
|
236
|
+
const frameEl = frameElRef.current;
|
|
237
|
+
if (!root || !frameEl) return;
|
|
238
|
+
const box = root.getBoundingClientRect();
|
|
239
|
+
const pill = zoomPillRef.current?.getBoundingClientRect();
|
|
240
|
+
const underPill = (l, t, r, b) => !!pill && r > pill.left && l < pill.right && b > pill.top && t < pill.bottom;
|
|
241
|
+
const points2 = frameEl.querySelectorAll(
|
|
242
|
+
`:scope > .${baseClass}__marker, :scope > .${baseClass}__marker-slot`
|
|
243
|
+
);
|
|
244
|
+
points2.forEach((el) => {
|
|
245
|
+
const dot = el.querySelector(`.${baseClass}__dot`);
|
|
246
|
+
if (!dot) return;
|
|
247
|
+
const d = dot.getBoundingClientRect();
|
|
248
|
+
const cx2 = d.left + d.width / 2;
|
|
249
|
+
const cy2 = d.top + d.height / 2;
|
|
250
|
+
const shown = cx2 >= box.left && cx2 <= box.right && cy2 >= box.top && cy2 <= box.bottom && !underPill(d.left, d.top, d.right, d.bottom);
|
|
251
|
+
el.toggleAttribute("data-offstage", !shown);
|
|
252
|
+
const label2 = el.querySelector(`.${baseClass}__label`);
|
|
253
|
+
if (!label2 || !shown || !label2.parentElement) return;
|
|
254
|
+
const m = label2.parentElement.getBoundingClientRect();
|
|
255
|
+
const w = label2.offsetWidth;
|
|
256
|
+
const h = label2.offsetHeight;
|
|
257
|
+
const t = cy2 - h / 2;
|
|
258
|
+
const fitsEnd = m.right + w <= box.right && !underPill(m.right, t, m.right + w, t + h);
|
|
259
|
+
const fitsStart = m.left - w >= box.left && !underPill(m.left - w, t, m.left, t + h);
|
|
260
|
+
label2.dataset.side = fitsEnd || !fitsStart ? "end" : "start";
|
|
261
|
+
label2.toggleAttribute("data-offstage", !fitsEnd && !fitsStart);
|
|
262
|
+
});
|
|
263
|
+
};
|
|
264
|
+
const fitMarkersRef = useRef(fitMarkers);
|
|
265
|
+
fitMarkersRef.current = fitMarkers;
|
|
266
|
+
useIsomorphicLayoutEffect(() => fitMarkersRef.current());
|
|
267
|
+
useEffect(() => {
|
|
268
|
+
const root = rootRef.current;
|
|
269
|
+
if (!root) return;
|
|
270
|
+
const refit = () => fitMarkersRef.current();
|
|
271
|
+
const observer = new ResizeObserver(refit);
|
|
272
|
+
observer.observe(root);
|
|
273
|
+
if (frameElRef.current) observer.observe(frameElRef.current);
|
|
274
|
+
const raf = requestAnimationFrame(refit);
|
|
275
|
+
const fonts = typeof document !== "undefined" ? document.fonts : void 0;
|
|
276
|
+
let live = true;
|
|
277
|
+
fonts?.ready.then(() => {
|
|
278
|
+
if (live) refit();
|
|
279
|
+
});
|
|
280
|
+
fonts?.addEventListener("loadingdone", refit);
|
|
281
|
+
return () => {
|
|
282
|
+
live = false;
|
|
283
|
+
cancelAnimationFrame(raf);
|
|
284
|
+
observer.disconnect();
|
|
285
|
+
fonts?.removeEventListener("loadingdone", refit);
|
|
286
|
+
};
|
|
287
|
+
}, []);
|
|
233
288
|
let graticule = "";
|
|
234
289
|
if (graticuleStep > 0) {
|
|
235
290
|
const x1 = x0 + viewW;
|
|
@@ -385,14 +440,14 @@ const WorldMap = React.forwardRef(
|
|
|
385
440
|
]
|
|
386
441
|
}
|
|
387
442
|
),
|
|
388
|
-
zoomEnabled && /* @__PURE__ */ jsxs("div", { className: `${baseClass}__zoom`, role: "group", "aria-label": zoomControlsLabel, children: [
|
|
443
|
+
zoomEnabled && /* @__PURE__ */ jsxs("div", { ref: zoomPillRef, className: `${baseClass}__zoom`, role: "group", "aria-label": zoomControlsLabel, children: [
|
|
389
444
|
/* @__PURE__ */ jsx(
|
|
390
|
-
|
|
445
|
+
IconButton,
|
|
391
446
|
{
|
|
392
447
|
icon: "remove",
|
|
393
448
|
variant: "tertiary",
|
|
394
449
|
size: "compact",
|
|
395
|
-
|
|
450
|
+
label: zoomOutLabel,
|
|
396
451
|
disabled: zoom <= minZoom + 1e-3,
|
|
397
452
|
onClick: () => stepZoom(-1)
|
|
398
453
|
}
|
|
@@ -411,12 +466,12 @@ const WorldMap = React.forwardRef(
|
|
|
411
466
|
}
|
|
412
467
|
),
|
|
413
468
|
/* @__PURE__ */ jsx(
|
|
414
|
-
|
|
469
|
+
IconButton,
|
|
415
470
|
{
|
|
416
471
|
icon: "add",
|
|
417
472
|
variant: "tertiary",
|
|
418
473
|
size: "compact",
|
|
419
|
-
|
|
474
|
+
label: zoomInLabel,
|
|
420
475
|
disabled: zoom >= maxZoom,
|
|
421
476
|
onClick: () => stepZoom(1)
|
|
422
477
|
}
|
package/components/registry.d.ts
CHANGED
|
@@ -31,7 +31,9 @@
|
|
|
31
31
|
* and the schema, and served by the MCP get_component tool.
|
|
32
32
|
*
|
|
33
33
|
* `docOnlyHelpers` names the internal documentation helpers that are
|
|
34
|
-
* deliberately excluded from the public count.
|
|
34
|
+
* deliberately excluded from the public count. `deprecatedAliases` names a
|
|
35
|
+
* renamed component's old name and what replaced it: the old folder keeps
|
|
36
|
+
* one re-exporting module, counted nowhere (the validator owns its shape).
|
|
35
37
|
*
|
|
36
38
|
* scripts/validate-component-registry.mjs compares the registry against the
|
|
37
39
|
* filesystem on every build (library, Storybook, and website), so it cannot
|