@primer/react 0.0.0-20260831205533 → 0.0.0-20260915162741
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/CHANGELOG.md +39 -3
- package/dist/ActionBar/ActionBar.js +2 -2
- package/dist/ActionList/Description.js +3 -3
- package/dist/ActionList/Divider.js +2 -2
- package/dist/ActionList/Group.js +4 -4
- package/dist/ActionList/GroupHeadingTrailingAction.js +2 -2
- package/dist/ActionList/Heading.js +3 -3
- package/dist/ActionList/Item.js +4 -4
- package/dist/ActionList/List.js +3 -3
- package/dist/ActionList/Selection.js +2 -2
- package/dist/ActionList/TrailingAction.js +3 -3
- package/dist/ActionList/Visuals.js +3 -3
- package/dist/ActionMenu/ActionMenu.js +2 -2
- package/dist/AnchoredOverlay/AnchoredOverlay.js +3 -3
- package/dist/Autocomplete/Autocomplete.js +2 -2
- package/dist/Autocomplete/AutocompleteInput.js +1 -1
- package/dist/Autocomplete/AutocompleteMenu.js +3 -3
- package/dist/Autocomplete/AutocompleteOverlay.js +3 -3
- package/dist/Avatar/Avatar.js +3 -3
- package/dist/AvatarStack/AvatarStack.js +3 -3
- package/dist/Banner/Banner.js +3 -3
- package/dist/BaseStyles.js +2 -2
- package/dist/Blankslate/Blankslate.js +3 -3
- package/dist/BranchName/BranchName.js +2 -2
- package/dist/Breadcrumbs/Breadcrumbs.js +3 -3
- package/dist/Button/Button.js +2 -2
- package/dist/Button/{ButtonBase-b44e29d1.css → ButtonBase-faef2674.css} +2 -2
- package/dist/Button/ButtonBase-faef2674.css.map +1 -0
- package/dist/Button/ButtonBase.js +4 -4
- package/dist/Button/ButtonBase.module.css.js +1 -1
- package/dist/Button/IconButton.js +3 -3
- package/dist/Button/LinkButton.js +2 -2
- package/dist/ButtonGroup/ButtonGroup.js +3 -3
- package/dist/Card/Card.js +3 -3
- package/dist/Checkbox/Checkbox.js +2 -2
- package/dist/CheckboxGroup/CheckboxGroup.js +2 -2
- package/dist/CircleBadge/CircleBadge.js +2 -2
- package/dist/ConfirmationDialog/ConfirmationDialog.js +2 -2
- package/dist/CounterLabel/CounterLabel.js +3 -3
- package/dist/DataTable/DataTable.d.ts +20 -20
- package/dist/DataTable/DataTable.js +42 -27
- package/dist/DataTable/ErrorDialog.js +1 -1
- package/dist/DataTable/Pagination.js +5 -5
- package/dist/DataTable/Table-50e68700.css +2 -0
- package/dist/DataTable/Table-50e68700.css.map +1 -0
- package/dist/DataTable/Table.d.ts +1 -0
- package/dist/DataTable/Table.js +74 -44
- package/dist/DataTable/Table.module.css.js +7 -2
- package/dist/DataTable/TableGroup.d.ts +41 -0
- package/dist/DataTable/TableGroup.js +159 -0
- package/dist/DataTable/TableGroupContext.js +5 -0
- package/dist/DataTable/index.d.ts +4 -2
- package/dist/DataTable/index.js +2 -0
- package/dist/DataTable/row.d.ts +24 -1
- package/dist/DataTable/useTable.js +157 -80
- package/dist/DataTable/utils.d.ts +4 -2
- package/dist/Details/Details.js +3 -3
- package/dist/Dialog/Dialog.js +3 -3
- package/dist/FeatureFlags/DefaultFeatureFlags.js +1 -2
- package/dist/FeatureFlags/FeatureFlags.js +2 -2
- package/dist/FeatureFlags/useFeatureFlag.js +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +2 -2
- package/dist/FilteredActionList/FilteredActionListInput.js +2 -2
- package/dist/FilteredActionList/FilteredActionListLoaders.js +1 -1
- package/dist/Flash/Flash.js +3 -3
- package/dist/FormControl/FormControl.js +4 -4
- package/dist/FormControl/FormControlCaption.js +2 -2
- package/dist/FormControl/FormControlLabel.js +1 -1
- package/dist/FormControl/FormControlLeadingVisual.js +1 -1
- package/dist/FormControl/_FormControlContext.js +1 -1
- package/dist/FormControl/_FormControlValidation.js +1 -1
- package/dist/Header/Header.js +3 -3
- package/dist/Heading/Heading.js +3 -3
- package/dist/Hidden/Hidden.js +2 -2
- package/dist/InlineMessage/InlineMessage.js +2 -2
- package/dist/KeybindingHint/KeybindingHint.js +3 -3
- package/dist/KeybindingHint/components/Chord.js +4 -4
- package/dist/KeybindingHint/components/Key.js +1 -1
- package/dist/KeybindingHint/components/Sequence.js +3 -3
- package/dist/Label/Label.js +3 -3
- package/dist/LabelGroup/LabelGroup.js +2 -2
- package/dist/Link/Link.js +3 -3
- package/dist/NavList/NavList.js +6 -6
- package/dist/Octicon/Octicon.js +2 -2
- package/dist/Overlay/Overlay.js +2 -2
- package/dist/PageHeader/PageHeader.js +4 -4
- package/dist/PageLayout/DragHandle.js +2 -2
- package/dist/PageLayout/PageLayout.js +3 -3
- package/dist/PageLayout/usePaneWidth.js +1 -1
- package/dist/Pagehead/Pagehead.js +2 -2
- package/dist/Pagination/Pagination.js +4 -4
- package/dist/Popover/Popover.js +3 -3
- package/dist/Portal/Portal.js +1 -1
- package/dist/ProgressBar/ProgressBar.js +3 -3
- package/dist/Radio/Radio.js +3 -3
- package/dist/RadioGroup/RadioGroup.js +1 -1
- package/dist/RelativeTime/RelativeTime.js +1 -1
- package/dist/ScrollableRegion/ScrollableRegion.js +3 -3
- package/dist/SegmentedControl/SegmentedControl-e68d4197.css +2 -0
- package/dist/SegmentedControl/SegmentedControl-e68d4197.css.map +1 -0
- package/dist/SegmentedControl/SegmentedControl.d.ts +5 -1
- package/dist/SegmentedControl/SegmentedControl.js +204 -167
- package/dist/SegmentedControl/SegmentedControl.module.css.js +8 -4
- package/dist/SegmentedControl/SegmentedControlAction.d.ts +12 -0
- package/dist/SegmentedControl/SegmentedControlAction.js +111 -0
- package/dist/SegmentedControl/SegmentedControlActionContext.js +5 -0
- package/dist/SegmentedControl/SegmentedControlButton.js +2 -2
- package/dist/SegmentedControl/SegmentedControlDivider.d.ts +9 -0
- package/dist/SegmentedControl/SegmentedControlDivider.js +24 -0
- package/dist/SegmentedControl/SegmentedControlIconButton.js +2 -2
- package/dist/SegmentedControl/index.d.ts +3 -1
- package/dist/Select/Select.js +3 -3
- package/dist/SelectPanel/SelectPanel.js +3 -3
- package/dist/SelectPanel/SelectPanelMessage.js +2 -2
- package/dist/SideNav.js +2 -2
- package/dist/Skeleton/SkeletonBox.js +3 -3
- package/dist/SkeletonAvatar/SkeletonAvatar.js +2 -2
- package/dist/SkeletonText/SkeletonText.js +2 -2
- package/dist/Spinner/Spinner.js +3 -3
- package/dist/SplitPageLayout/SplitPageLayout.js +1 -1
- package/dist/Stack/Stack.js +3 -3
- package/dist/StateLabel/StateLabel.js +3 -3
- package/dist/SubNav/SubNav.js +3 -3
- package/dist/TabNav/TabNav.js +3 -3
- package/dist/Text/Text.js +2 -2
- package/dist/TextInput/TextInput.js +5 -5
- package/dist/TextInputWithTokens/TextInputWithTokens.js +3 -3
- package/dist/Textarea/Textarea.js +4 -4
- package/dist/ThemeProvider.js +2 -2
- package/dist/Timeline/Timeline.js +3 -3
- package/dist/ToggleSwitch/ToggleSwitch.js +4 -4
- package/dist/Token/IssueLabelToken.js +3 -3
- package/dist/Token/Token.js +3 -3
- package/dist/Token/TokenBase.js +3 -3
- package/dist/Token/_RemoveTokenButton.js +1 -1
- package/dist/Token/_TokenTextContainer.js +2 -2
- package/dist/Tooltip/Tooltip.js +2 -2
- package/dist/TooltipV2/Tooltip.js +21 -11
- package/dist/TopicTag/TopicTag.js +2 -2
- package/dist/TopicTag/TopicTagGroup.js +2 -2
- package/dist/TreeView/TreeView.js +9 -9
- package/dist/TreeView/useRovingTabIndex.js +1 -1
- package/dist/TreeView/useTreeItemCache.js +1 -1
- package/dist/TreeView/useTypeahead.js +1 -1
- package/dist/Truncate/Truncate.js +2 -2
- package/dist/UnderlineNav/UnderlineNav.js +3 -3
- package/dist/UnderlineNav/UnderlineNavItem.js +2 -2
- package/dist/VisuallyHidden/VisuallyHidden.js +2 -2
- package/dist/_VisuallyHidden.js +2 -2
- package/dist/deprecated/ActionList/Divider.js +1 -1
- package/dist/deprecated/ActionList/Group.js +1 -1
- package/dist/deprecated/ActionList/Header.js +2 -2
- package/dist/deprecated/ActionList/Item.js +4 -4
- package/dist/deprecated/ActionList/List.js +3 -3
- package/dist/deprecated/ActionMenu.js +2 -2
- package/dist/deprecated/DialogV1/Dialog.js +4 -4
- package/dist/deprecated/FilteredSearch/FilteredSearch.js +2 -2
- package/dist/deprecated/UnderlineNav/UnderlineNav.js +3 -3
- package/dist/experimental/IssueLabel/IssueLabel.js +2 -2
- package/dist/experimental/SelectPanel2/SelectPanel.js +5 -5
- package/dist/experimental/Tabs/Tabs.js +23 -26
- package/dist/experimental/Tabs/useTab.js +1 -1
- package/dist/experimental/Tabs/useTabList.js +17 -21
- package/dist/experimental/Tabs/useTabPanel.js +1 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +10 -15
- package/dist/experimental/index.d.ts +6 -5
- package/dist/experimental/index.js +1 -1
- package/dist/hooks/useDetails.js +1 -1
- package/dist/hooks/useDialog.js +1 -1
- package/dist/hooks/useMedia.js +1 -1
- package/dist/hooks/useMenuInitialFocus.js +1 -1
- package/dist/hooks/useMenuKeyboardNavigation.js +1 -1
- package/dist/hooks/useMergedRefs.js +1 -1
- package/dist/hooks/useMnemonics.js +1 -1
- package/dist/hooks/useOpenAndCloseFocus.js +1 -1
- package/dist/hooks/useOverflow.js +5 -5
- package/dist/hooks/useOverlay.js +1 -1
- package/dist/hooks/useProvidedStateOrCreate.js +1 -1
- package/dist/hooks/useRefObjectAsForwardedRef.js +1 -1
- package/dist/hooks/useRenderForcingRef.js +1 -1
- package/dist/hooks/useScrollFlash.js +1 -1
- package/dist/hooks/useSyncedState.js +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3 -1
- package/dist/internal/components/ButtonReset.js +2 -2
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +4 -4
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +3 -3
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +3 -3
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +2 -2
- package/dist/internal/components/ConditionalWrapper.js +1 -1
- package/dist/internal/components/InputLabel.js +2 -2
- package/dist/internal/components/InputValidation.js +2 -2
- package/dist/internal/components/OverflowObserverProvider.js +2 -2
- package/dist/internal/components/TextInputInnerAction.js +4 -4
- package/dist/internal/components/TextInputInnerVisualSlot.js +2 -2
- package/dist/internal/components/TextInputWrapper.js +3 -3
- package/dist/internal/components/ThemeProviderBase.js +1 -1
- package/dist/internal/components/UnderlineTabbedInterface.js +3 -3
- package/dist/internal/components/UnstyledTextInput.js +3 -3
- package/dist/internal/components/ValidationAnimationContainer.js +2 -2
- package/dist/internal/hooks/useEffectCallback.js +1 -1
- package/dist/internal/hooks/useEffectOnce.js +1 -1
- package/dist/internal/hooks/useOverflowObserver.js +1 -1
- package/dist/internal/hooks/useThemeProvider.js +1 -1
- package/dist/live-region/Announce.js +2 -2
- package/dist/live-region/AriaAlert.d.ts +1 -1
- package/dist/live-region/AriaAlert.js +1 -1
- package/dist/live-region/AriaStatus.js +1 -1
- package/dist/next/ThemeProvider.js +1 -1
- package/dist/utils/descendant-registry.js +2 -2
- package/dist/utils/react-compiler-runtime.js +32 -0
- package/generated/components.json +185 -10
- package/package.json +8 -8
- package/dist/Button/ButtonBase-b44e29d1.css.map +0 -1
- package/dist/DataTable/Table-7f5cb3e4.css +0 -2
- package/dist/DataTable/Table-7f5cb3e4.css.map +0 -1
- package/dist/SegmentedControl/SegmentedControl-4ef72733.css +0 -2
- package/dist/SegmentedControl/SegmentedControl-4ef72733.css.map +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import { DEFAULT_SORT_DIRECTION, SortDirection, strategies, transition } from "./sorting.js";
|
|
2
|
-
import {
|
|
3
|
-
import { useState } from "react";
|
|
3
|
+
import { useId, useState } from "react";
|
|
4
4
|
//#region src/DataTable/useTable.ts
|
|
5
5
|
function useTable(t0) {
|
|
6
|
-
const $ = c(
|
|
6
|
+
const $ = c(29);
|
|
7
7
|
const { columns, data, initialSortColumn, initialSortDirection, externalSorting, getRowId } = t0;
|
|
8
|
+
const tableId = useId();
|
|
8
9
|
const [rowOrder, setRowOrder] = useState(data);
|
|
9
10
|
const [prevData, setPrevData] = useState(data);
|
|
10
11
|
const [prevColumns, setPrevColumns] = useState(columns);
|
|
@@ -29,18 +30,26 @@ function useTable(t0) {
|
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
let t2;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
if ($[4] !== rowOrder) {
|
|
34
|
+
t2 = rowOrder.some(isDataTableRowGroup);
|
|
35
|
+
$[4] = rowOrder;
|
|
36
|
+
$[5] = t2;
|
|
37
|
+
} else t2 = $[5];
|
|
38
|
+
const hasGroups = t2;
|
|
39
|
+
let bodies;
|
|
40
|
+
let headers;
|
|
41
|
+
let sortBy;
|
|
42
|
+
if ($[6] !== columns || $[7] !== data || $[8] !== externalSorting || $[9] !== getRowId || $[10] !== hasGroups || $[11] !== prevData || $[12] !== rowOrder || $[13] !== sortByColumn || $[14] !== tableId) {
|
|
43
|
+
let t3;
|
|
44
|
+
if ($[18] !== hasGroups || $[19] !== sortByColumn || $[20] !== tableId) {
|
|
45
|
+
t3 = (column_1, index) => {
|
|
38
46
|
var _column_1$id;
|
|
39
47
|
const id_0 = (_column_1$id = column_1.id) !== null && _column_1$id !== void 0 ? _column_1$id : column_1.field;
|
|
40
48
|
if (id_0 === void 0) throw new Error("Expected either an `id` or `field` to be defined for a Column");
|
|
41
49
|
const sortable = column_1.sortBy !== void 0 && column_1.sortBy !== false;
|
|
42
50
|
return {
|
|
43
51
|
id: id_0,
|
|
52
|
+
domId: hasGroups ? `${tableId}-column-${index}` : void 0,
|
|
44
53
|
column: column_1,
|
|
45
54
|
isSortable() {
|
|
46
55
|
return sortable;
|
|
@@ -51,103 +60,171 @@ function useTable(t0) {
|
|
|
51
60
|
}
|
|
52
61
|
};
|
|
53
62
|
};
|
|
54
|
-
$[
|
|
55
|
-
$[
|
|
56
|
-
|
|
57
|
-
|
|
63
|
+
$[18] = hasGroups;
|
|
64
|
+
$[19] = sortByColumn;
|
|
65
|
+
$[20] = tableId;
|
|
66
|
+
$[21] = t3;
|
|
67
|
+
} else t3 = $[21];
|
|
68
|
+
headers = columns.map(t3);
|
|
58
69
|
if (data !== prevData) {
|
|
59
70
|
setPrevData(data);
|
|
60
|
-
|
|
61
|
-
if (sortByColumn) sortRows(sortByColumn);
|
|
71
|
+
updateRowOrder(data, sortByColumn);
|
|
62
72
|
}
|
|
63
|
-
|
|
73
|
+
sortBy = function sortBy(header) {
|
|
64
74
|
const sortState = {
|
|
65
75
|
id: header.id,
|
|
66
76
|
direction: sortByColumn && sortByColumn.id === header.id ? transition(sortByColumn.direction) : DEFAULT_SORT_DIRECTION
|
|
67
77
|
};
|
|
68
78
|
setSortByColumn(sortState);
|
|
69
|
-
|
|
79
|
+
updateRowOrder(rowOrder, sortState);
|
|
70
80
|
};
|
|
71
|
-
function
|
|
72
|
-
|
|
73
|
-
|
|
81
|
+
function updateRowOrder(rows, state) {
|
|
82
|
+
if (externalSorting || state === null) setRowOrder(rows);
|
|
83
|
+
else {
|
|
84
|
+
const sortedRows = getSortedRowOrder(rows, state);
|
|
85
|
+
setRowOrder(sortedRows);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function getSortedRowOrder(currentRowOrder, state_0) {
|
|
89
|
+
const header_1 = headers.find((header_0) => header_0.id === state_0.id);
|
|
90
|
+
if (!header_1) throw new Error(`Unable to find header with id: ${state_0.id}`);
|
|
74
91
|
if (header_1.column.sortBy === false || header_1.column.sortBy === void 0) throw new Error("The column for this header is not sortable");
|
|
75
|
-
|
|
76
|
-
const sortMethod =
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
if (
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
const column_2 = header_1.column;
|
|
93
|
+
const sortMethod = column_2.sortBy === true ? strategies.basic : typeof column_2.sortBy === "string" ? strategies[column_2.sortBy] : column_2.sortBy;
|
|
94
|
+
const sortData = function sortData(rows_0) {
|
|
95
|
+
return rows_0.slice().sort((a, b) => {
|
|
96
|
+
if (column_2.field === void 0) return 0;
|
|
97
|
+
if (typeof column_2.sortBy === "function") {
|
|
98
|
+
if (state_0.direction === SortDirection.ASC) return sortMethod(a, b);
|
|
99
|
+
return sortMethod(b, a);
|
|
100
|
+
}
|
|
101
|
+
const valueA = get(a, column_2.field);
|
|
102
|
+
const valueB = get(b, column_2.field);
|
|
103
|
+
const valueAIsBlank = isBlankValue(valueA);
|
|
104
|
+
const valueBIsBlank = isBlankValue(valueB);
|
|
105
|
+
if (!valueAIsBlank && !valueBIsBlank) {
|
|
106
|
+
if (state_0.direction === SortDirection.ASC) return sortMethod(valueA, valueB);
|
|
107
|
+
return sortMethod(valueB, valueA);
|
|
108
|
+
}
|
|
109
|
+
if (!valueAIsBlank) return -1;
|
|
110
|
+
if (!valueBIsBlank) return 1;
|
|
111
|
+
return 0;
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
const sorted = [];
|
|
115
|
+
let ungroupedRows = [];
|
|
116
|
+
const appendUngroupedRows = function appendUngroupedRows() {
|
|
117
|
+
for (const row of sortData(ungroupedRows)) sorted.push(row);
|
|
118
|
+
ungroupedRows = [];
|
|
119
|
+
};
|
|
120
|
+
for (const item of currentRowOrder) if (isDataTableRowGroup(item)) {
|
|
121
|
+
appendUngroupedRows();
|
|
122
|
+
sorted.push({
|
|
123
|
+
...item,
|
|
124
|
+
rows: sortData(item.rows)
|
|
125
|
+
});
|
|
126
|
+
} else ungroupedRows.push(item);
|
|
127
|
+
appendUngroupedRows();
|
|
128
|
+
return sorted;
|
|
95
129
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
const
|
|
130
|
+
const createRow = function createRow(row_0, rowIndex) {
|
|
131
|
+
const rowId = getRowId(row_0);
|
|
132
|
+
const rowHeaderIds = hasGroups ? headers.flatMap((header_2, index_0) => header_2.column.rowHeader ? [`${tableId}-row-${rowIndex}-header-${index_0}`] : []) : [];
|
|
99
133
|
return {
|
|
134
|
+
type: "row",
|
|
100
135
|
id: `${rowId}`,
|
|
101
136
|
getValue() {
|
|
102
|
-
return
|
|
137
|
+
return row_0;
|
|
103
138
|
},
|
|
104
139
|
getCells() {
|
|
105
|
-
return headers.map((
|
|
106
|
-
var
|
|
140
|
+
return headers.map((header_3, index_1) => {
|
|
141
|
+
var _header_3$column$rowH;
|
|
142
|
+
const rowHeader = (_header_3$column$rowH = header_3.column.rowHeader) !== null && _header_3$column$rowH !== void 0 ? _header_3$column$rowH : false;
|
|
107
143
|
return {
|
|
108
|
-
id: `${rowId}:${
|
|
109
|
-
|
|
110
|
-
|
|
144
|
+
id: `${rowId}:${header_3.id}`,
|
|
145
|
+
domId: hasGroups && rowHeader ? `${tableId}-row-${rowIndex}-header-${index_1}` : void 0,
|
|
146
|
+
headers: hasGroups ? (rowHeader ? [header_3.domId] : [...rowHeaderIds, header_3.domId]).join(" ") : void 0,
|
|
147
|
+
column: header_3.column,
|
|
148
|
+
rowHeader,
|
|
111
149
|
getValue() {
|
|
112
|
-
if (
|
|
113
|
-
throw new Error(`Unable to get value for column header ${
|
|
150
|
+
if (header_3.column.field !== void 0) return get(row_0, header_3.column.field);
|
|
151
|
+
throw new Error(`Unable to get value for column header ${header_3.id}`);
|
|
114
152
|
}
|
|
115
153
|
};
|
|
116
154
|
});
|
|
117
155
|
}
|
|
118
156
|
};
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
157
|
+
};
|
|
158
|
+
bodies = [];
|
|
159
|
+
let rowIndex_0 = 0;
|
|
160
|
+
let body = {
|
|
161
|
+
type: "row-body",
|
|
162
|
+
key: "rows:start",
|
|
163
|
+
rows: []
|
|
164
|
+
};
|
|
165
|
+
for (const item_0 of rowOrder) if (isDataTableRowGroup(item_0)) {
|
|
166
|
+
if (body.rows.length > 0) bodies.push(body);
|
|
167
|
+
const groupStartIndex = rowIndex_0;
|
|
168
|
+
bodies.push({
|
|
169
|
+
type: "row-group",
|
|
170
|
+
key: `group:${item_0.groupId}`,
|
|
171
|
+
id: item_0.groupId,
|
|
172
|
+
label: item_0.label,
|
|
173
|
+
rows: item_0.rows.map((row_1, index_2) => createRow(row_1, groupStartIndex + index_2)),
|
|
174
|
+
"aria-label": item_0["aria-label"]
|
|
175
|
+
});
|
|
176
|
+
rowIndex_0 = rowIndex_0 + item_0.rows.length;
|
|
177
|
+
body = {
|
|
178
|
+
type: "row-body",
|
|
179
|
+
key: `rows:after:${item_0.groupId}`,
|
|
180
|
+
rows: []
|
|
181
|
+
};
|
|
182
|
+
} else {
|
|
183
|
+
body.rows.push(createRow(item_0, rowIndex_0));
|
|
184
|
+
rowIndex_0 = rowIndex_0 + 1;
|
|
185
|
+
}
|
|
186
|
+
if (body.rows.length > 0 || bodies.length === 0) bodies.push(body);
|
|
187
|
+
$[6] = columns;
|
|
188
|
+
$[7] = data;
|
|
189
|
+
$[8] = externalSorting;
|
|
190
|
+
$[9] = getRowId;
|
|
191
|
+
$[10] = hasGroups;
|
|
192
|
+
$[11] = prevData;
|
|
193
|
+
$[12] = rowOrder;
|
|
194
|
+
$[13] = sortByColumn;
|
|
195
|
+
$[14] = tableId;
|
|
196
|
+
$[15] = bodies;
|
|
197
|
+
$[16] = headers;
|
|
198
|
+
$[17] = sortBy;
|
|
131
199
|
} else {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
200
|
+
bodies = $[15];
|
|
201
|
+
headers = $[16];
|
|
202
|
+
sortBy = $[17];
|
|
135
203
|
}
|
|
136
|
-
let
|
|
137
|
-
if ($[
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
204
|
+
let t3;
|
|
205
|
+
if ($[22] !== sortBy) {
|
|
206
|
+
t3 = { sortBy };
|
|
207
|
+
$[22] = sortBy;
|
|
208
|
+
$[23] = t3;
|
|
209
|
+
} else t3 = $[23];
|
|
210
|
+
let t4;
|
|
211
|
+
if ($[24] !== bodies || $[25] !== gridTemplateColumns || $[26] !== headers || $[27] !== t3) {
|
|
212
|
+
t4 = {
|
|
213
|
+
headers,
|
|
214
|
+
actions: t3,
|
|
215
|
+
gridTemplateColumns,
|
|
216
|
+
bodies
|
|
143
217
|
};
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
$[
|
|
149
|
-
} else
|
|
150
|
-
return
|
|
218
|
+
$[24] = bodies;
|
|
219
|
+
$[25] = gridTemplateColumns;
|
|
220
|
+
$[26] = headers;
|
|
221
|
+
$[27] = t3;
|
|
222
|
+
$[28] = t4;
|
|
223
|
+
} else t4 = $[28];
|
|
224
|
+
return t4;
|
|
225
|
+
}
|
|
226
|
+
function isDataTableRowGroup(item) {
|
|
227
|
+
return "groupId" in item && "rows" in item && Array.isArray(item.rows);
|
|
151
228
|
}
|
|
152
229
|
function getInitialSortState(columns, initialSortColumn, initialSortDirection) {
|
|
153
230
|
if (initialSortColumn !== void 0) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
//#region src/DataTable/utils.d.ts
|
|
2
|
+
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
2
3
|
type ArrayOfLength<Length extends number, SizedArray extends Array<unknown> = []> = SizedArray['length'] extends Length ? SizedArray : ArrayOfLength<Length, [...SizedArray, SizedArray['length']]>;
|
|
3
4
|
type MaxLength = ArrayOfLength<10>[number];
|
|
4
5
|
type ArrayIndex<A extends ReadonlyArray<any>, Keys extends number = never> = A extends readonly [] ? Keys : A extends readonly [infer _, ...infer Tail] ? ArrayIndex<Tail, Keys | Tail['length']> : Keys;
|
|
@@ -6,6 +7,7 @@ type ArrayWithinBounds<T> = T extends ReadonlyArray<any> & {
|
|
|
6
7
|
length: infer Length;
|
|
7
8
|
} ? Length extends MaxLength ? T : never : never;
|
|
8
9
|
type ObjectPaths<T> = T extends readonly any[] & ArrayWithinBounds<T> ? `${ArrayIndex<T>}` | PrefixPath<T, ArrayIndex<T>> : T extends any[] ? never & 'Unable to determine keys of potentially boundless array' : T extends Date ? never : T extends object ? Extract<keyof T, string | number> | PrefixPath<T, Extract<keyof T, string | number>> : never;
|
|
9
|
-
type PrefixPath<T, Prefix> = Prefix extends Extract<keyof T, number | string> ? `${Prefix}.${
|
|
10
|
+
type PrefixPath<T, Prefix> = Prefix extends Extract<keyof T, number | string> ? `${Prefix}.${NestedObjectPaths<T[Prefix]>}` : never;
|
|
11
|
+
type NestedObjectPaths<T> = IsAny<T> extends true ? string : ObjectPaths<T>;
|
|
10
12
|
//#endregion
|
|
11
|
-
export { ObjectPaths };
|
|
13
|
+
export { IsAny, ObjectPaths };
|
package/dist/Details/Details.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
2
3
|
import { warning } from "../utils/warning.js";
|
|
3
4
|
import Details_module_css_default from "./Details.module.css.js";
|
|
4
|
-
import { c } from "react-compiler-runtime";
|
|
5
|
-
import { clsx } from "clsx";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
5
|
import React, { useEffect } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
8
|
//#region src/Details/Details.tsx
|
|
9
9
|
const Root = /*#__PURE__*/ React.forwardRef((t0, forwardRef) => {
|
|
10
10
|
var _dataComponent;
|
package/dist/Dialog/Dialog.js
CHANGED
|
@@ -13,9 +13,9 @@ import Portal_default from "../Portal/index.js";
|
|
|
13
13
|
import { ScrollableRegion } from "../ScrollableRegion/ScrollableRegion.js";
|
|
14
14
|
import Dialog_module_css_default from "./Dialog.module.css.js";
|
|
15
15
|
import { DialogContext } from "./DialogContext.js";
|
|
16
|
-
import { clsx } from "clsx";
|
|
17
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
18
16
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
17
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
import { clsx } from "clsx";
|
|
19
19
|
import { FocusKeys } from "@primer/behaviors";
|
|
20
20
|
import { XIcon } from "@primer/octicons-react";
|
|
21
21
|
//#region src/Dialog/Dialog.tsx
|
|
@@ -261,7 +261,7 @@ const Buttons = ({ buttons }) => {
|
|
|
261
261
|
(_readRef$current = readRef.current) === null || _readRef$current === void 0 || _readRef$current.focus();
|
|
262
262
|
} else setHasRendered(hasRendered + 1);
|
|
263
263
|
}, [readRef, hasRendered]);
|
|
264
|
-
return /*#__PURE__*/ jsx(Fragment, { children: buttons.map((dialogButtonProps, index) => {
|
|
264
|
+
return /*#__PURE__*/ jsx(Fragment$1, { children: buttons.map((dialogButtonProps, index) => {
|
|
265
265
|
const { content, buttonType = "default", autoFocus = false, ...buttonProps } = dialogButtonProps;
|
|
266
266
|
return /*#__PURE__*/ jsx(ButtonComponent, {
|
|
267
267
|
"data-component": "Dialog.FooterButton",
|
|
@@ -8,8 +8,7 @@ const DefaultFeatureFlags = FeatureFlagScope.create({
|
|
|
8
8
|
primer_react_action_list_group_heading_trailing_action: false,
|
|
9
9
|
primer_react_action_list_item_gap: false,
|
|
10
10
|
primer_react_timeline_list_semantics: false,
|
|
11
|
-
primer_react_merged_forwarded_refs: false
|
|
12
|
-
primer_react_underline_panels_controlled: false
|
|
11
|
+
primer_react_merged_forwarded_refs: false
|
|
13
12
|
});
|
|
14
13
|
//#endregion
|
|
15
14
|
export { DefaultFeatureFlags };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import { FeatureFlagScope } from "./FeatureFlagScope.js";
|
|
2
3
|
import { FeatureFlagContext } from "./FeatureFlagContext.js";
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { useContext } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/FeatureFlags/FeatureFlags.tsx
|
|
7
7
|
function FeatureFlags(t0) {
|
|
8
8
|
const $ = c(6);
|
|
@@ -14,9 +14,9 @@ import { FilteredActionListBodyLoader } from "./FilteredActionListLoaders.js";
|
|
|
14
14
|
import FilteredActionList_module_css_default from "./FilteredActionList.module.css.js";
|
|
15
15
|
import { useAnnouncements } from "./useAnnouncements.js";
|
|
16
16
|
import { FilteredActionListInput } from "./FilteredActionListInput.js";
|
|
17
|
-
import { clsx } from "clsx";
|
|
18
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
17
|
import { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
import { clsx } from "clsx";
|
|
20
20
|
import { FocusKeys, scrollIntoView } from "@primer/behaviors";
|
|
21
21
|
import { isValidElementType } from "react-is";
|
|
22
22
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import TextInput_default from "../TextInput/TextInput.js";
|
|
2
3
|
import FilteredActionList_module_css_default from "./FilteredActionList.module.css.js";
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
|
-
import { clsx } from "clsx";
|
|
5
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
6
|
//#region src/FilteredActionList/FilteredActionListInput.tsx
|
|
7
7
|
function FilteredActionListInput(t0) {
|
|
8
8
|
const $ = c(28);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import Spinner from "../Spinner/Spinner.js";
|
|
2
3
|
import { Stack } from "../Stack/Stack.js";
|
|
3
4
|
import { SkeletonBox } from "../Skeleton/SkeletonBox.js";
|
|
4
5
|
import FilteredActionListLoaders_module_css_default from "./FilteredActionListLoaders.module.css.js";
|
|
5
6
|
import { FilteredActionListLoadingTypes } from "./constants.js";
|
|
6
|
-
import { c } from "react-compiler-runtime";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/FilteredActionList/FilteredActionListLoaders.tsx
|
|
9
9
|
const SKELETON_ROW_HEIGHT = 24;
|
package/dist/Flash/Flash.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import Flash_module_css_default from "./Flash.module.css.js";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
3
|
import React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
6
|
//#region src/Flash/Flash.tsx
|
|
7
7
|
/**
|
|
8
8
|
* @deprecated Use `Banner` instead. If migration is not yet possible, import `Flash` from `@primer/react/deprecated`.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import { useId as useId$1 } from "../hooks/useId.js";
|
|
2
3
|
import { warning } from "../utils/warning.js";
|
|
3
4
|
import { isSlot } from "../utils/is-slot.js";
|
|
@@ -18,10 +19,9 @@ import FormControlLabel from "./FormControlLabel.js";
|
|
|
18
19
|
import FormControlLeadingVisual from "./FormControlLeadingVisual.js";
|
|
19
20
|
import FormControlValidation from "./_FormControlValidation.js";
|
|
20
21
|
import FormControl_module_css_default from "./FormControl.module.css.js";
|
|
21
|
-
import { c } from "react-compiler-runtime";
|
|
22
|
-
import { clsx } from "clsx";
|
|
23
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
24
22
|
import React, { useContext } from "react";
|
|
23
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { clsx } from "clsx";
|
|
25
25
|
var FormControl_default = Object.assign(/* @__PURE__ */ React.forwardRef((t0, ref) => {
|
|
26
26
|
var _slots$validation, _slots$label;
|
|
27
27
|
const $ = c(32);
|
|
@@ -125,7 +125,7 @@ var FormControl_default = Object.assign(/* @__PURE__ */ React.forwardRef((t0, re
|
|
|
125
125
|
} else t8 = $[15];
|
|
126
126
|
let t9;
|
|
127
127
|
if ($[16] !== t6 || $[17] !== t7 || $[18] !== t8) {
|
|
128
|
-
t9 = /*#__PURE__*/ jsxs(Fragment, { children: [
|
|
128
|
+
t9 = /*#__PURE__*/ jsxs(Fragment$1, { children: [
|
|
129
129
|
t6,
|
|
130
130
|
t7,
|
|
131
131
|
t8
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import Text_default from "../Text/Text.js";
|
|
2
3
|
import { useFormControlContext } from "./_FormControlContext.js";
|
|
3
4
|
import FormControlCaption_module_css_default from "./FormControlCaption.module.css.js";
|
|
4
|
-
import { c } from "react-compiler-runtime";
|
|
5
|
-
import { clsx } from "clsx";
|
|
6
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { clsx } from "clsx";
|
|
7
7
|
//#region src/FormControl/FormControlCaption.tsx
|
|
8
8
|
function FormControlCaption(t0) {
|
|
9
9
|
const $ = c(8);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import { useFormControlContext } from "./_FormControlContext.js";
|
|
2
3
|
import { InputLabel } from "../internal/components/InputLabel.js";
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/FormControl/FormControlLabel.tsx
|
|
6
6
|
const FormControlLabel = (t0) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import { useFormControlContext } from "./_FormControlContext.js";
|
|
2
3
|
import FormControlLeadingVisual_module_css_default from "./FormControlLeadingVisual.module.css.js";
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/FormControl/FormControlLeadingVisual.tsx
|
|
6
6
|
const FormControlLeadingVisual = (t0) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import InputValidation from "../internal/components/InputValidation.js";
|
|
2
3
|
import { useFormControlContext } from "./_FormControlContext.js";
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/FormControl/_FormControlValidation.tsx
|
|
6
6
|
const FormControlValidation = (t0) => {
|
package/dist/Header/Header.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import Header_module_css_default from "./Header.module.css.js";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
3
|
import React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
6
|
//#region src/Header/Header.tsx
|
|
7
7
|
const Header = /*#__PURE__*/ React.forwardRef(function Header(t0, forwardRef) {
|
|
8
8
|
const $ = c(13);
|
package/dist/Heading/Heading.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
2
3
|
import { useDevOnlyEffect } from "../internal/hooks/useDevOnlyEffect.js";
|
|
3
4
|
import Heading_module_css_default from "./Heading.module.css.js";
|
|
4
|
-
import { c } from "react-compiler-runtime";
|
|
5
|
-
import { clsx } from "clsx";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
5
|
import React, { forwardRef } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
8
|
//#region src/Heading/Heading.tsx
|
|
9
9
|
const Heading = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
10
10
|
const $ = c(15);
|
package/dist/Hidden/Hidden.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import Hidden_module_css_default from "./Hidden.module.css.js";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { clsx } from "clsx";
|
|
5
5
|
//#region src/Hidden/Hidden.tsx
|
|
6
6
|
function normalize(hiddenViewports) {
|
|
7
7
|
if (Array.isArray(hiddenViewports)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import InlineMessage_module_css_default from "./InlineMessage.module.css.js";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { clsx } from "clsx";
|
|
5
5
|
import { isValidElementType } from "react-is";
|
|
6
6
|
import { AlertFillIcon, AlertIcon, CheckCircleFillIcon, CheckCircleIcon, InfoIcon } from "@primer/octicons-react";
|
|
7
7
|
//#region src/InlineMessage/InlineMessage.tsx
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import Text_default from "../Text/Text.js";
|
|
2
3
|
import { Sequence } from "./components/Sequence.js";
|
|
3
4
|
import KeybindingHint_module_css_default from "./KeybindingHint.module.css.js";
|
|
4
|
-
import { c } from "react-compiler-runtime";
|
|
5
|
-
import { clsx } from "clsx";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
5
|
import { memo } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
8
|
//#region src/KeybindingHint/KeybindingHint.tsx
|
|
9
9
|
/** `kbd` element with style resets. */
|
|
10
10
|
const Kbd = (t0) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { c } from "../../utils/react-compiler-runtime.js";
|
|
1
2
|
import Text_default from "../../Text/Text.js";
|
|
2
3
|
import { Key } from "./Key.js";
|
|
3
4
|
import Chord_module_css_default from "./Chord.module.css.js";
|
|
4
5
|
import { splitChord } from "./utils.js";
|
|
5
|
-
import {
|
|
6
|
-
import { clsx } from "clsx";
|
|
6
|
+
import { Fragment } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import {
|
|
8
|
+
import { clsx } from "clsx";
|
|
9
9
|
//#region src/KeybindingHint/components/Chord.tsx
|
|
10
10
|
const Chord = (t0) => {
|
|
11
11
|
const $ = c(13);
|
|
@@ -35,7 +35,7 @@ const Chord = (t0) => {
|
|
|
35
35
|
if ($[5] !== format || $[6] !== keys) {
|
|
36
36
|
let t10;
|
|
37
37
|
if ($[8] !== format) {
|
|
38
|
-
t10 = (k, i) => /*#__PURE__*/ jsxs(Fragment
|
|
38
|
+
t10 = (k, i) => /*#__PURE__*/ jsxs(Fragment, { children: [i > 0 && format === "full" ? /*#__PURE__*/ jsx("span", {
|
|
39
39
|
"aria-hidden": true,
|
|
40
40
|
children: " + "
|
|
41
41
|
}) : " ", /*#__PURE__*/ jsx(Key, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { c } from "../../utils/react-compiler-runtime.js";
|
|
1
2
|
import VisuallyHidden from "../../_VisuallyHidden.js";
|
|
2
3
|
import { accessibleKeyName, condensedKeyName, fullKeyName } from "../key-names.js";
|
|
3
4
|
import { usePlatform } from "../platform.js";
|
|
4
|
-
import { c } from "react-compiler-runtime";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/KeybindingHint/components/Key.tsx
|
|
7
7
|
/** Renders a single key with accessible alternative text. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import VisuallyHidden from "../../_VisuallyHidden.js";
|
|
2
2
|
import { Chord } from "./Chord.js";
|
|
3
|
-
import { Fragment
|
|
4
|
-
import { Fragment as Fragment$1 } from "react";
|
|
3
|
+
import { Fragment } from "react";
|
|
4
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/KeybindingHint/components/Sequence.tsx
|
|
6
6
|
const splitSequence = (sequence) => sequence.split(" ");
|
|
7
|
-
const Sequence = ({ keys, ...chordProps }) => splitSequence(keys).map((c, i) => /*#__PURE__*/ jsxs(Fragment
|
|
7
|
+
const Sequence = ({ keys, ...chordProps }) => splitSequence(keys).map((c, i) => /*#__PURE__*/ jsxs(Fragment, { children: [i > 0 && /*#__PURE__*/ jsxs(Fragment$1, { children: [/*#__PURE__*/ jsx(VisuallyHidden, { children: "then" }), " "] }), /*#__PURE__*/ jsx(Chord, {
|
|
8
8
|
keys: c,
|
|
9
9
|
...chordProps
|
|
10
10
|
})] }, i));
|
package/dist/Label/Label.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import Label_module_css_default from "./Label.module.css.js";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
3
|
import React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
6
|
//#region src/Label/Label.tsx
|
|
7
7
|
const Label = /*#__PURE__*/ React.forwardRef(function Label(t0, ref) {
|
|
8
8
|
const $ = c(15);
|