rift-ds 1.31.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 +1 -1
- package/behaviors/chat-card.css +4 -1
- package/behaviors/deferComponent.d.ts +43 -0
- package/behaviors/deferComponent.js +35 -0
- package/bin/templates/blocks/components/blocks/AppShell.module.css +10 -1
- package/chat/ChatLauncher.d.ts +9 -1
- package/chat/ChatLauncher.js +51 -33
- package/chat/ChatWidget.css +13 -4
- package/chat/ChatWidget.js +15 -15
- package/chat/deferredChatWidget.d.ts +10 -0
- package/chat/deferredChatWidget.js +10 -0
- package/chat/index.d.ts +1 -0
- package/chat/index.js +2 -0
- package/chat/registry.json.d.ts +2 -1
- package/chat/registry.json.js +1 -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/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/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 +2 -2
- package/components/DataTable/DataTable.js +15 -15
- package/components/DateInput/DateInput.css +20 -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/FileInput/FileInput.css +9 -0
- package/components/FilterBar/FilterBar.css +12 -0
- 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/TableToolbar/TableToolbar.css +2 -2
- package/components/TableToolbar/TableToolbar.js +36 -37
- package/components/ThreadPanel/ThreadPanel.css +8 -0
- package/components/ThreadTabs/ThreadTabs.css +7 -0
- package/components/TimePicker/TimePicker.css +12 -0
- package/components/ToolCall/ToolCall.css +8 -0
- package/components/Tooltip/Tooltip.js +3 -2
- package/components/WorldMap/WorldMap.js +5 -5
- package/components/registry.d.ts +3 -1
- package/components/registry.json +19 -10
- package/components/registry.json.d.ts +19 -10
- package/components/registry.json.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +2 -0
- package/package.json +6 -2
|
@@ -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
|
|
@@ -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
|
+
}
|
|
@@ -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 = [
|
|
@@ -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";
|
|
@@ -442,12 +442,12 @@ const WorldMap = React.forwardRef(
|
|
|
442
442
|
),
|
|
443
443
|
zoomEnabled && /* @__PURE__ */ jsxs("div", { ref: zoomPillRef, className: `${baseClass}__zoom`, role: "group", "aria-label": zoomControlsLabel, children: [
|
|
444
444
|
/* @__PURE__ */ jsx(
|
|
445
|
-
|
|
445
|
+
IconButton,
|
|
446
446
|
{
|
|
447
447
|
icon: "remove",
|
|
448
448
|
variant: "tertiary",
|
|
449
449
|
size: "compact",
|
|
450
|
-
|
|
450
|
+
label: zoomOutLabel,
|
|
451
451
|
disabled: zoom <= minZoom + 1e-3,
|
|
452
452
|
onClick: () => stepZoom(-1)
|
|
453
453
|
}
|
|
@@ -466,12 +466,12 @@ const WorldMap = React.forwardRef(
|
|
|
466
466
|
}
|
|
467
467
|
),
|
|
468
468
|
/* @__PURE__ */ jsx(
|
|
469
|
-
|
|
469
|
+
IconButton,
|
|
470
470
|
{
|
|
471
471
|
icon: "add",
|
|
472
472
|
variant: "tertiary",
|
|
473
473
|
size: "compact",
|
|
474
|
-
|
|
474
|
+
label: zoomInLabel,
|
|
475
475
|
disabled: zoom >= maxZoom,
|
|
476
476
|
onClick: () => stepZoom(1)
|
|
477
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
|
package/components/registry.json
CHANGED
|
@@ -357,7 +357,10 @@
|
|
|
357
357
|
"description": "Primary, secondary and tertiary emphasis, each in a default, neutral or destructive tone, with icons, loading, and default and compact sizes.",
|
|
358
358
|
"category": "actions",
|
|
359
359
|
"client": true,
|
|
360
|
-
"pattern": "button"
|
|
360
|
+
"pattern": "button",
|
|
361
|
+
"alternatives": [
|
|
362
|
+
{ "name": "IconButton", "when": "the action is an icon alone and should name itself on hover" }
|
|
363
|
+
]
|
|
361
364
|
},
|
|
362
365
|
{
|
|
363
366
|
"name": "ButtonGroup",
|
|
@@ -464,15 +467,6 @@
|
|
|
464
467
|
"client": false,
|
|
465
468
|
"keys": { "by": "none" }
|
|
466
469
|
},
|
|
467
|
-
{
|
|
468
|
-
"name": "CircularButton",
|
|
469
|
-
"label": "Circular button",
|
|
470
|
-
"slug": "circular-button",
|
|
471
|
-
"description": "Round icon button in primary, secondary and tertiary emphasis and a default, neutral or destructive tone, in default and compact sizes.",
|
|
472
|
-
"category": "actions",
|
|
473
|
-
"client": false,
|
|
474
|
-
"pattern": "button"
|
|
475
|
-
},
|
|
476
470
|
{
|
|
477
471
|
"name": "CodeBlock",
|
|
478
472
|
"label": "Code block",
|
|
@@ -923,6 +917,18 @@
|
|
|
923
917
|
"client": false,
|
|
924
918
|
"keys": { "by": "none" }
|
|
925
919
|
},
|
|
920
|
+
{
|
|
921
|
+
"name": "IconButton",
|
|
922
|
+
"label": "Icon button",
|
|
923
|
+
"slug": "icon-button",
|
|
924
|
+
"description": "Icon-only button in primary, secondary and tertiary emphasis and a default, neutral or destructive tone, in default and compact sizes.",
|
|
925
|
+
"category": "actions",
|
|
926
|
+
"client": false,
|
|
927
|
+
"pattern": "button",
|
|
928
|
+
"alternatives": [
|
|
929
|
+
{ "name": "Button", "when": "the action needs its words on show, with or without an icon beside them" }
|
|
930
|
+
]
|
|
931
|
+
},
|
|
926
932
|
{
|
|
927
933
|
"name": "ImageCompare",
|
|
928
934
|
"label": "Image compare",
|
|
@@ -1923,6 +1929,9 @@
|
|
|
1923
1929
|
"keys": { "by": "component", "note": "With zoom on and the map focused, plus and minus zoom and the arrow keys pan. Its zoom buttons are ordinary buttons." }
|
|
1924
1930
|
}
|
|
1925
1931
|
],
|
|
1932
|
+
"deprecatedAliases": [
|
|
1933
|
+
{ "name": "CircularButton", "replacedBy": "IconButton" }
|
|
1934
|
+
],
|
|
1926
1935
|
"docOnlyHelpers": [
|
|
1927
1936
|
"ColourSwatch",
|
|
1928
1937
|
"MotionSwatch",
|
|
@@ -357,7 +357,10 @@ declare const _default: {
|
|
|
357
357
|
"description": "Primary, secondary and tertiary emphasis, each in a default, neutral or destructive tone, with icons, loading, and default and compact sizes.",
|
|
358
358
|
"category": "actions",
|
|
359
359
|
"client": true,
|
|
360
|
-
"pattern": "button"
|
|
360
|
+
"pattern": "button",
|
|
361
|
+
"alternatives": [
|
|
362
|
+
{ "name": "IconButton", "when": "the action is an icon alone and should name itself on hover" }
|
|
363
|
+
]
|
|
361
364
|
},
|
|
362
365
|
{
|
|
363
366
|
"name": "ButtonGroup",
|
|
@@ -464,15 +467,6 @@ declare const _default: {
|
|
|
464
467
|
"client": false,
|
|
465
468
|
"keys": { "by": "none" }
|
|
466
469
|
},
|
|
467
|
-
{
|
|
468
|
-
"name": "CircularButton",
|
|
469
|
-
"label": "Circular button",
|
|
470
|
-
"slug": "circular-button",
|
|
471
|
-
"description": "Round icon button in primary, secondary and tertiary emphasis and a default, neutral or destructive tone, in default and compact sizes.",
|
|
472
|
-
"category": "actions",
|
|
473
|
-
"client": false,
|
|
474
|
-
"pattern": "button"
|
|
475
|
-
},
|
|
476
470
|
{
|
|
477
471
|
"name": "CodeBlock",
|
|
478
472
|
"label": "Code block",
|
|
@@ -923,6 +917,18 @@ declare const _default: {
|
|
|
923
917
|
"client": false,
|
|
924
918
|
"keys": { "by": "none" }
|
|
925
919
|
},
|
|
920
|
+
{
|
|
921
|
+
"name": "IconButton",
|
|
922
|
+
"label": "Icon button",
|
|
923
|
+
"slug": "icon-button",
|
|
924
|
+
"description": "Icon-only button in primary, secondary and tertiary emphasis and a default, neutral or destructive tone, in default and compact sizes.",
|
|
925
|
+
"category": "actions",
|
|
926
|
+
"client": false,
|
|
927
|
+
"pattern": "button",
|
|
928
|
+
"alternatives": [
|
|
929
|
+
{ "name": "Button", "when": "the action needs its words on show, with or without an icon beside them" }
|
|
930
|
+
]
|
|
931
|
+
},
|
|
926
932
|
{
|
|
927
933
|
"name": "ImageCompare",
|
|
928
934
|
"label": "Image compare",
|
|
@@ -1923,6 +1929,9 @@ declare const _default: {
|
|
|
1923
1929
|
"keys": { "by": "component", "note": "With zoom on and the map focused, plus and minus zoom and the arrow keys pan. Its zoom buttons are ordinary buttons." }
|
|
1924
1930
|
}
|
|
1925
1931
|
],
|
|
1932
|
+
"deprecatedAliases": [
|
|
1933
|
+
{ "name": "CircularButton", "replacedBy": "IconButton" }
|
|
1934
|
+
],
|
|
1926
1935
|
"docOnlyHelpers": [
|
|
1927
1936
|
"ColourSwatch",
|
|
1928
1937
|
"MotionSwatch",
|