@primer/react 38.34.0-rc.56d4e88fd → 38.34.0-rc.56e4390f1
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 +6 -0
- package/dist/ActionList/Group.js +1 -1
- package/dist/ActionList/List.js +20 -14
- package/dist/AnchoredOverlay/AnchoredOverlay.js +6 -3
- package/dist/Autocomplete/AutocompleteInput.js +10 -7
- package/dist/ButtonGroup/ButtonGroup.js +15 -8
- package/dist/Checkbox/Checkbox.js +16 -9
- package/dist/Dialog/Dialog.js +12 -5
- package/dist/FeatureFlags/DefaultFeatureFlags.js +2 -1
- package/dist/FilteredActionList/FilteredActionList.js +31 -20
- package/dist/FilteredActionList/FilteredActionListInput.d.ts +1 -1
- package/dist/Link/Link.js +33 -33
- package/dist/Overlay/Overlay.js +1 -1
- package/dist/PageHeader/PageHeader.js +30 -21
- package/dist/SegmentedControl/{SegmentedControl-a004561f.css → SegmentedControl-de65527b.css} +2 -2
- package/dist/SegmentedControl/{SegmentedControl-a004561f.css.map → SegmentedControl-de65527b.css.map} +1 -1
- package/dist/SegmentedControl/SegmentedControl.module.css.js +1 -1
- package/dist/SegmentedControl/SegmentedControlButton.js +1 -1
- package/dist/SegmentedControl/SegmentedControlIconButton.js +1 -1
- package/dist/SelectPanel/SelectPanel.js +1 -1
- package/dist/TextInput/TextInput.js +13 -6
- package/dist/TooltipV2/Tooltip.js +18 -11
- package/dist/experimental/Tabs/Tabs.js +3 -2
- package/dist/experimental/Tabs/types.d.ts +10 -3
- package/dist/experimental/Tabs/useTabList.js +18 -10
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +69 -42
- package/dist/experimental/index.js +5 -5
- package/dist/hooks/useMergedRefs.d.ts +4 -4
- package/dist/hooks/useMergedRefs.js +8 -5
- package/dist/hooks/useProvidedRefOrCreate.d.ts +7 -10
- package/dist/hooks/useProvidedRefOrCreate.js +7 -10
- package/generated/components.json +21 -7
- package/package.json +7 -8
|
@@ -3,15 +3,16 @@ import { useResizeObserver } from "../../hooks/useResizeObserver.js";
|
|
|
3
3
|
import { useId as useId$1 } from "../../hooks/useId.js";
|
|
4
4
|
import { isSlot } from "../../utils/is-slot.js";
|
|
5
5
|
import { invariant } from "../../utils/invariant.js";
|
|
6
|
-
import { createComponent } from "../../utils/create-component.js";
|
|
7
6
|
import { UnderlineItem, UnderlineItemList, UnderlineWrapper } from "../../internal/components/UnderlineTabbedInterface.js";
|
|
8
7
|
import UnderlinePanels_module_css_default from "./UnderlinePanels.module.css.js";
|
|
8
|
+
import { useTab } from "../Tabs/useTab.js";
|
|
9
|
+
import { useTabList } from "../Tabs/useTabList.js";
|
|
10
|
+
import { useTabPanel } from "../Tabs/useTabPanel.js";
|
|
11
|
+
import { Tabs } from "../Tabs/Tabs.js";
|
|
9
12
|
import { clsx } from "clsx";
|
|
10
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
14
|
import React, { Children, cloneElement, createContext, isValidElement, useContext, useMemo, useRef, useState } from "react";
|
|
12
|
-
import { TabContainerElement } from "@github/tab-container-element";
|
|
13
15
|
//#region src/experimental/UnderlinePanels/UnderlinePanels.tsx
|
|
14
|
-
const TabContainerComponent = createComponent(TabContainerElement, "tab-container");
|
|
15
16
|
const UnderlinePanelsContext = /*#__PURE__*/ createContext({
|
|
16
17
|
iconsVisible: true,
|
|
17
18
|
loadingCounters: void 0
|
|
@@ -21,27 +22,43 @@ const UnderlinePanels = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabel
|
|
|
21
22
|
const wrapperRef = useRef(null);
|
|
22
23
|
const listRef = useRef(null);
|
|
23
24
|
const parentId = useId$1(props.id);
|
|
24
|
-
const [tabs, tabPanels, tabsHaveIcons] = useMemo(() => {
|
|
25
|
+
const [tabs, tabPanels, tabsHaveIcons, selectedFromProps] = useMemo(() => {
|
|
25
26
|
let tabIndex = 0;
|
|
26
27
|
let panelIndex = 0;
|
|
27
28
|
const childrenWithProps = Children.map(children, (child) => {
|
|
28
|
-
if (/*#__PURE__*/ isValidElement(child) && (child.type === Tab || isSlot(child, Tab))) return /*#__PURE__*/ cloneElement(child, {
|
|
29
|
-
if (/*#__PURE__*/ isValidElement(child) && (child.type === Panel || isSlot(child, Panel))) return /*#__PURE__*/ cloneElement(child, {
|
|
29
|
+
if (/*#__PURE__*/ isValidElement(child) && (child.type === Tab || isSlot(child, Tab))) return /*#__PURE__*/ cloneElement(child, { value: `${tabIndex++}` });
|
|
30
|
+
if (/*#__PURE__*/ isValidElement(child) && (child.type === Panel || isSlot(child, Panel))) return /*#__PURE__*/ cloneElement(child, { value: `${panelIndex++}` });
|
|
30
31
|
return child;
|
|
31
32
|
});
|
|
32
33
|
const tabs = [];
|
|
33
34
|
const tabPanels = [];
|
|
35
|
+
let selectedFromProps;
|
|
34
36
|
for (const child of Children.toArray(childrenWithProps)) {
|
|
35
37
|
if (!/*#__PURE__*/ isValidElement(child)) continue;
|
|
36
|
-
if (child.type === Tab || isSlot(child, Tab))
|
|
37
|
-
|
|
38
|
+
if (child.type === Tab || isSlot(child, Tab)) {
|
|
39
|
+
const ariaSelected = child.props["aria-selected"];
|
|
40
|
+
if (ariaSelected === true || ariaSelected === "true") selectedFromProps = `${tabs.length}`;
|
|
41
|
+
tabs.push(child);
|
|
42
|
+
} else if (child.type === Panel || isSlot(child, Panel)) tabPanels.push(child);
|
|
38
43
|
}
|
|
39
44
|
return [
|
|
40
45
|
tabs,
|
|
41
46
|
tabPanels,
|
|
42
|
-
tabs.some((tab) => /*#__PURE__*/ React.isValidElement(tab) && tab.props.icon)
|
|
47
|
+
tabs.some((tab) => /*#__PURE__*/ React.isValidElement(tab) && tab.props.icon),
|
|
48
|
+
selectedFromProps
|
|
43
49
|
];
|
|
44
|
-
}, [children
|
|
50
|
+
}, [children]);
|
|
51
|
+
const [selectedValue, setSelectedValue] = useState(() => selectedFromProps !== null && selectedFromProps !== void 0 ? selectedFromProps : "0");
|
|
52
|
+
const [prevSelectedFromProps, setPrevSelectedFromProps] = useState(selectedFromProps);
|
|
53
|
+
if (selectedFromProps !== prevSelectedFromProps) {
|
|
54
|
+
setPrevSelectedFromProps(selectedFromProps);
|
|
55
|
+
if (selectedFromProps !== void 0 && selectedFromProps !== selectedValue) setSelectedValue(selectedFromProps);
|
|
56
|
+
}
|
|
57
|
+
const { tabListProps } = useTabList({
|
|
58
|
+
"aria-label": ariaLabel,
|
|
59
|
+
"aria-labelledby": ariaLabelledBy,
|
|
60
|
+
ref: listRef
|
|
61
|
+
});
|
|
45
62
|
const contextValue = useMemo(() => ({
|
|
46
63
|
iconsVisible,
|
|
47
64
|
loadingCounters
|
|
@@ -68,55 +85,65 @@ const UnderlinePanels = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabel
|
|
|
68
85
|
!(tabs.length === tabPanels.length) && invariant(false, `The number of tabs and panels must be equal. Counted ${tabs.length} tabs and ${tabPanels.length} panels.`);
|
|
69
86
|
return /*#__PURE__*/ jsx(UnderlinePanelsContext.Provider, {
|
|
70
87
|
value: contextValue,
|
|
71
|
-
children: /*#__PURE__*/ jsxs(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
children: /*#__PURE__*/ jsxs(Tabs, {
|
|
89
|
+
id: parentId,
|
|
90
|
+
value: selectedValue,
|
|
91
|
+
onValueChange: ({ value }) => setSelectedValue(value),
|
|
92
|
+
children: [/*#__PURE__*/ jsx(UnderlineWrapper, {
|
|
93
|
+
ref: wrapperRef,
|
|
94
|
+
"data-icons-visible": iconsVisible,
|
|
95
|
+
className: clsx(className, UnderlinePanels_module_css_default.StyledUnderlineWrapper),
|
|
96
|
+
...props,
|
|
97
|
+
children: /*#__PURE__*/ jsx(UnderlineItemList, {
|
|
98
|
+
ref: listRef,
|
|
99
|
+
role: tabListProps.role,
|
|
100
|
+
"aria-label": tabListProps["aria-label"],
|
|
101
|
+
"aria-labelledby": tabListProps["aria-labelledby"],
|
|
102
|
+
"aria-orientation": tabListProps["aria-orientation"],
|
|
103
|
+
onKeyDown: tabListProps.onKeyDown,
|
|
104
|
+
children: tabs
|
|
105
|
+
})
|
|
106
|
+
}), tabPanels]
|
|
107
|
+
})
|
|
85
108
|
});
|
|
86
109
|
};
|
|
87
110
|
UnderlinePanels.displayName = "UnderlinePanels";
|
|
88
|
-
const TabImpl = ({
|
|
111
|
+
const TabImpl = ({ onSelect, value, ...itemProps }) => {
|
|
89
112
|
const { loadingCounters } = useContext(UnderlinePanelsContext);
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
}, [onSelect]);
|
|
93
|
-
const keyDownHandler = React.useCallback((event) => {
|
|
94
|
-
if ((event.key === " " || event.key === "Enter") && !event.defaultPrevented && typeof onSelect === "function") onSelect(event);
|
|
95
|
-
}, [onSelect]);
|
|
113
|
+
const { tabProps } = useTab({ value: value !== null && value !== void 0 ? value : "" });
|
|
114
|
+
const { onKeyDown: tabOnKeyDown, onMouseDown: tabOnMouseDown, onFocus: tabOnFocus, ...restTabProps } = tabProps;
|
|
96
115
|
return /*#__PURE__*/ jsx(UnderlineItem, {
|
|
97
116
|
as: "button",
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"aria-selected": ariaSelected,
|
|
117
|
+
...itemProps,
|
|
118
|
+
...restTabProps,
|
|
101
119
|
type: "button",
|
|
102
|
-
onClick:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
120
|
+
onClick: (event) => {
|
|
121
|
+
if (!event.defaultPrevented && typeof onSelect === "function") onSelect(event);
|
|
122
|
+
},
|
|
123
|
+
onKeyDown: (event) => {
|
|
124
|
+
tabOnKeyDown === null || tabOnKeyDown === void 0 || tabOnKeyDown(event);
|
|
125
|
+
if ((event.key === " " || event.key === "Enter") && !event.defaultPrevented && typeof onSelect === "function") onSelect(event);
|
|
126
|
+
},
|
|
127
|
+
onMouseDown: tabOnMouseDown,
|
|
128
|
+
onFocus: tabOnFocus,
|
|
129
|
+
loadingCounters
|
|
106
130
|
});
|
|
107
131
|
};
|
|
108
132
|
TabImpl.displayName = "TabImpl";
|
|
109
133
|
TabImpl.displayName = "UnderlinePanels.Tab";
|
|
110
134
|
const Tab = /*#__PURE__*/ React.memo(TabImpl);
|
|
111
135
|
Tab.displayName = "UnderlinePanels.Tab";
|
|
112
|
-
const
|
|
136
|
+
const PanelImpl = ({ children, value, ...panelRest }) => {
|
|
137
|
+
const { tabPanelProps } = useTabPanel({ value: value !== null && value !== void 0 ? value : "" });
|
|
113
138
|
return /*#__PURE__*/ jsx("div", {
|
|
114
|
-
|
|
115
|
-
...
|
|
139
|
+
...panelRest,
|
|
140
|
+
...tabPanelProps,
|
|
116
141
|
children
|
|
117
142
|
});
|
|
118
143
|
};
|
|
119
|
-
|
|
144
|
+
PanelImpl.displayName = "PanelImpl";
|
|
145
|
+
PanelImpl.displayName = "UnderlinePanels.Panel";
|
|
146
|
+
const Panel = PanelImpl;
|
|
120
147
|
Panel.displayName = "UnderlinePanels.Panel";
|
|
121
148
|
var UnderlinePanels_default = Object.assign(UnderlinePanels, {
|
|
122
149
|
Panel,
|
|
@@ -4,15 +4,15 @@ import { Announce } from "../live-region/Announce.js";
|
|
|
4
4
|
import { AriaAlert } from "../live-region/AriaAlert.js";
|
|
5
5
|
import { AriaStatus } from "../live-region/AriaStatus.js";
|
|
6
6
|
import { ButtonBase } from "../Button/ButtonBase.js";
|
|
7
|
+
import { DefaultFeatureFlags } from "../FeatureFlags/DefaultFeatureFlags.js";
|
|
8
|
+
import { FeatureFlags } from "../FeatureFlags/FeatureFlags.js";
|
|
9
|
+
import { useFeatureFlag } from "../FeatureFlags/useFeatureFlag.js";
|
|
7
10
|
import { KeybindingHint } from "../KeybindingHint/KeybindingHint.js";
|
|
8
11
|
import { getAccessibleKeybindingHintString } from "../KeybindingHint/utils.js";
|
|
9
12
|
import { Tooltip } from "../TooltipV2/Tooltip.js";
|
|
10
13
|
import { useOverflow } from "../hooks/useOverflow.js";
|
|
11
14
|
import { ScrollableRegion } from "../ScrollableRegion/ScrollableRegion.js";
|
|
12
15
|
import { Dialog } from "../Dialog/Dialog.js";
|
|
13
|
-
import { DefaultFeatureFlags } from "../FeatureFlags/DefaultFeatureFlags.js";
|
|
14
|
-
import { FeatureFlags } from "../FeatureFlags/FeatureFlags.js";
|
|
15
|
-
import { useFeatureFlag } from "../FeatureFlags/useFeatureFlag.js";
|
|
16
16
|
import { Stack } from "../Stack/index.js";
|
|
17
17
|
import { SkeletonBox } from "../Skeleton/SkeletonBox.js";
|
|
18
18
|
import { FilteredActionListLoadingTypes } from "../FilteredActionList/constants.js";
|
|
@@ -30,12 +30,12 @@ import { Table } from "../DataTable/index.js";
|
|
|
30
30
|
import { InlineMessage } from "../InlineMessage/InlineMessage.js";
|
|
31
31
|
import { Hidden } from "../Hidden/Hidden.js";
|
|
32
32
|
import { SelectPanel } from "./SelectPanel2/SelectPanel.js";
|
|
33
|
-
import UnderlinePanels_default from "./UnderlinePanels/UnderlinePanels.js";
|
|
34
|
-
import { IssueLabel } from "./IssueLabel/IssueLabel.js";
|
|
35
33
|
import { useTab } from "./Tabs/useTab.js";
|
|
36
34
|
import { useTabList } from "./Tabs/useTabList.js";
|
|
37
35
|
import { useTabPanel } from "./Tabs/useTabPanel.js";
|
|
38
36
|
import { Tabs } from "./Tabs/Tabs.js";
|
|
37
|
+
import UnderlinePanels_default from "./UnderlinePanels/UnderlinePanels.js";
|
|
38
|
+
import { IssueLabel } from "./IssueLabel/IssueLabel.js";
|
|
39
39
|
import { TopicTag } from "../TopicTag/index.js";
|
|
40
40
|
//#region src/experimental/index.ts
|
|
41
41
|
/**
|
|
@@ -17,18 +17,18 @@ import { ForwardedRef, Ref } from "react";
|
|
|
17
17
|
* // React 18
|
|
18
18
|
* const Example = forwardRef<HTMLButtonElement, {}>((props, forwardedRef) => {
|
|
19
19
|
* const ref = useRef<HTMLButtonElement>(null)
|
|
20
|
-
* const
|
|
20
|
+
* const mergedRef = useMergedRefs(forwardedRef, ref)
|
|
21
21
|
*
|
|
22
|
-
* return <button ref={
|
|
22
|
+
* return <button ref={mergedRef} />
|
|
23
23
|
* })
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* // React 19
|
|
27
27
|
* const Example = ({ref: externalRef}: {ref?: Ref<HTMLButtonElement>}) => {
|
|
28
28
|
* const ref = useRef<HTMLButtonElement>(null)
|
|
29
|
-
* const
|
|
29
|
+
* const mergedRef = useMergedRefs(externalRef, ref)
|
|
30
30
|
*
|
|
31
|
-
* return <button ref={
|
|
31
|
+
* return <button ref={mergedRef} />
|
|
32
32
|
* }
|
|
33
33
|
*/
|
|
34
34
|
declare function useMergedRefs<T>(refA: Ref$1<T | null>, refB: Ref$1<T | null>): (value: T | null) => (() => void) | undefined;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { isExperimentalReactVersion, reactMajorVersion } from "../utils/environment.js";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
|
-
import "react";
|
|
3
|
+
import { version } from "react";
|
|
4
4
|
//#region src/hooks/useMergedRefs.ts
|
|
5
|
+
var _version$split$;
|
|
6
|
+
const majorReactVersion = parseInt((_version$split$ = version.split(".")[0]) !== null && _version$split$ !== void 0 ? _version$split$ : "18", 10);
|
|
5
7
|
/**
|
|
6
8
|
* Cleanup functions for refs were introduced in React 19. For feature detection,
|
|
7
9
|
* we look to see if current version of React is >= 19 or if it is an
|
|
@@ -26,18 +28,18 @@ const supportsRefCleanup = reactMajorVersion >= 19 || isExperimentalReactVersion
|
|
|
26
28
|
* // React 18
|
|
27
29
|
* const Example = forwardRef<HTMLButtonElement, {}>((props, forwardedRef) => {
|
|
28
30
|
* const ref = useRef<HTMLButtonElement>(null)
|
|
29
|
-
* const
|
|
31
|
+
* const mergedRef = useMergedRefs(forwardedRef, ref)
|
|
30
32
|
*
|
|
31
|
-
* return <button ref={
|
|
33
|
+
* return <button ref={mergedRef} />
|
|
32
34
|
* })
|
|
33
35
|
*
|
|
34
36
|
* @example
|
|
35
37
|
* // React 19
|
|
36
38
|
* const Example = ({ref: externalRef}: {ref?: Ref<HTMLButtonElement>}) => {
|
|
37
39
|
* const ref = useRef<HTMLButtonElement>(null)
|
|
38
|
-
* const
|
|
40
|
+
* const mergedRef = useMergedRefs(externalRef, ref)
|
|
39
41
|
*
|
|
40
|
-
* return <button ref={
|
|
42
|
+
* return <button ref={mergedRef} />
|
|
41
43
|
* }
|
|
42
44
|
*/
|
|
43
45
|
function useMergedRefs(refA, refB) {
|
|
@@ -48,6 +50,7 @@ function useMergedRefs(refA, refB) {
|
|
|
48
50
|
const cleanupA = setRef(refA, value);
|
|
49
51
|
const cleanupB = setRef(refB, value);
|
|
50
52
|
if (!supportsRefCleanup) return;
|
|
53
|
+
if (majorReactVersion <= 18) return;
|
|
51
54
|
return () => {
|
|
52
55
|
if (cleanupA) cleanupA();
|
|
53
56
|
else setRef(refA, null);
|
|
@@ -9,17 +9,14 @@ import React from "react";
|
|
|
9
9
|
* @param providedRef The ref to use - if undefined, will use the ref from a call to React.useRef
|
|
10
10
|
* @type TRef The type of the RefObject which should be created.
|
|
11
11
|
*
|
|
12
|
-
* @
|
|
13
|
-
*
|
|
12
|
+
* @note This hook is overly restrictive in that it forces the provided ref to be a ref object rather than a callback.
|
|
13
|
+
* In particular, it should **not** be used to merge internal refs with forwarded refs. For this, use
|
|
14
|
+
* {@linkcode useMergedRefs} instead.
|
|
14
15
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* - return <div ref={ref} />
|
|
21
|
-
* + return <div ref={mergedRef} />
|
|
22
|
-
* ```
|
|
16
|
+
* The primary valid use case for this hook is for when the consumer is using the provided ref to point to an external
|
|
17
|
+
* element, like an externally rendered anchor. This is 'backwards' from forwarded refs with respect to data flow; the
|
|
18
|
+
* consumer is passing a reference to an external element, rather than passing a handle to obtain a reference to an
|
|
19
|
+
* internal element.
|
|
23
20
|
*/
|
|
24
21
|
declare function useProvidedRefOrCreate<TRef>(providedRef?: React.RefObject<TRef | null>): React.RefObject<TRef | null>;
|
|
25
22
|
//#endregion
|
|
@@ -8,17 +8,14 @@ import React from "react";
|
|
|
8
8
|
* @param providedRef The ref to use - if undefined, will use the ref from a call to React.useRef
|
|
9
9
|
* @type TRef The type of the RefObject which should be created.
|
|
10
10
|
*
|
|
11
|
-
* @
|
|
12
|
-
*
|
|
11
|
+
* @note This hook is overly restrictive in that it forces the provided ref to be a ref object rather than a callback.
|
|
12
|
+
* In particular, it should **not** be used to merge internal refs with forwarded refs. For this, use
|
|
13
|
+
* {@linkcode useMergedRefs} instead.
|
|
13
14
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* - return <div ref={ref} />
|
|
20
|
-
* + return <div ref={mergedRef} />
|
|
21
|
-
* ```
|
|
15
|
+
* The primary valid use case for this hook is for when the consumer is using the provided ref to point to an external
|
|
16
|
+
* element, like an externally rendered anchor. This is 'backwards' from forwarded refs with respect to data flow; the
|
|
17
|
+
* consumer is passing a reference to an external element, rather than passing a handle to obtain a reference to an
|
|
18
|
+
* internal element.
|
|
22
19
|
*/
|
|
23
20
|
function useProvidedRefOrCreate(providedRef) {
|
|
24
21
|
const createdRef = React.useRef(null);
|
|
@@ -2656,11 +2656,18 @@
|
|
|
2656
2656
|
],
|
|
2657
2657
|
"importPath": "@primer/react",
|
|
2658
2658
|
"props": [
|
|
2659
|
+
{
|
|
2660
|
+
"name": "variant",
|
|
2661
|
+
"type": "'primary' | 'secondary'",
|
|
2662
|
+
"defaultValue": "",
|
|
2663
|
+
"description": "Pass in 'primary' for a darker background and inverse text, or 'secondary' for a lighter background and primary text. Omitting the variant prop renders the default counter scheme"
|
|
2664
|
+
},
|
|
2659
2665
|
{
|
|
2660
2666
|
"name": "scheme",
|
|
2661
2667
|
"type": "'primary' | 'secondary'",
|
|
2662
2668
|
"defaultValue": "",
|
|
2663
|
-
"description": "
|
|
2669
|
+
"description": "Use `variant` instead.",
|
|
2670
|
+
"deprecated": true
|
|
2664
2671
|
},
|
|
2665
2672
|
{
|
|
2666
2673
|
"name": "className",
|
|
@@ -5060,7 +5067,7 @@
|
|
|
5060
5067
|
},
|
|
5061
5068
|
{
|
|
5062
5069
|
"id": "components-pagelayout-features--pull-request-page",
|
|
5063
|
-
"code": "() => (\n <PageLayout>\n <PageLayout.Header>\n <div className={classes.HeaderStack}>\n <div>\n <Heading as=\"h1\" className={classes.TitleHeading}>\n Input validation styles{' '}\n <Text className={classes.TitleSubdued}>#1831</Text>\n </Heading>\n <div className={classes.StatusRow}>\n <StateLabel status=\"pullOpened\">Open</StateLabel>\n <Text className={classes.StatusMeta}>\n <Link href=\"#\" muted className={classes.BoldMetaLink}>\n mperrotti\n </Link>{' '}\n wants to merge 3 commits into{' '}\n <BranchName href=\"#\">main</BranchName> from{' '}\n <BranchName href=\"#\">mp/validation-styles</BranchName>\n </Text>\n </div>\n </div>\n <TabNav>\n <TabNav.Link href=\"#\" selected>\n Conversation\n </TabNav.Link>\n <TabNav.Link href=\"#\">Commits</TabNav.Link>\n <TabNav.Link href=\"#\">Checks</TabNav.Link>\n <TabNav.Link href=\"#\">Files changed</TabNav.Link>\n </TabNav>\n </div>\n </PageLayout.Header>\n <PageLayout.Content>\n <div className={classes.ContentBox}></div>\n <div className={classes.ScrollBox} tabIndex={0}>\n This box has really long content. If it is too long, it will cause x\n overflow and should show a scrollbar. When this overflows, it should not\n break to overall page layout!\n </div>\n </PageLayout.Content>\n <PageLayout.Pane aria-label=\"Side pane\">\n <div className={classes.PaneStack}>\n <div>\n <Text className={classes.PaneSectionHeading}>Assignees</Text>\n <Text className={classes.PaneMetaText}>\n No one –{' '}\n <Link href=\"#\" muted>\n assign yourself\n </Link>\n </Text>\n </div>\n <div role=\"separator\" className={classes.PaneSeparator}></div>\n <div>\n <Text className={classes.PaneSectionHeading}>Labels</Text>\n <Text className={classes.PaneMetaText}>None yet</Text>\n </div>\n </div>\n </PageLayout.Pane>\n </PageLayout>\n)"
|
|
5070
|
+
"code": "() => (\n <PageLayout>\n <PageLayout.Header>\n <div className={classes.HeaderStack}>\n <div>\n <Heading as=\"h1\" className={classes.TitleHeading}>\n Input validation styles{' '}\n <Text className={classes.TitleSubdued}>#1831</Text>\n </Heading>\n <div className={classes.StatusRow}>\n <StateLabel status=\"pullOpened\">Open</StateLabel>\n <Text className={classes.StatusMeta}>\n <Link href=\"#\" muted className={classes.BoldMetaLink}>\n mperrotti\n </Link>{' '}\n wants to merge 3 commits into{' '}\n <BranchName href=\"#\">main</BranchName> from{' '}\n <BranchName href=\"#\">mp/validation-styles</BranchName>\n </Text>\n </div>\n </div>\n <TabNav>\n <TabNav.Link href=\"#\" selected>\n Conversation\n </TabNav.Link>\n <TabNav.Link href=\"#\">Commits</TabNav.Link>\n <TabNav.Link href=\"#\">Checks</TabNav.Link>\n <TabNav.Link href=\"#\">Files changed</TabNav.Link>\n </TabNav>\n </div>\n </PageLayout.Header>\n <PageLayout.Content>\n <div className={classes.ContentBox}></div>\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}\n <div className={classes.ScrollBox} tabIndex={0}>\n This box has really long content. If it is too long, it will cause x\n overflow and should show a scrollbar. When this overflows, it should not\n break to overall page layout!\n </div>\n </PageLayout.Content>\n <PageLayout.Pane aria-label=\"Side pane\">\n <div className={classes.PaneStack}>\n <div>\n <Text className={classes.PaneSectionHeading}>Assignees</Text>\n <Text className={classes.PaneMetaText}>\n No one –{' '}\n <Link href=\"#\" muted>\n assign yourself\n </Link>\n </Text>\n </div>\n <div role=\"separator\" className={classes.PaneSeparator}></div>\n <div>\n <Text className={classes.PaneSectionHeading}>Labels</Text>\n <Text className={classes.PaneMetaText}>None yet</Text>\n </div>\n </div>\n </PageLayout.Pane>\n </PageLayout>\n)"
|
|
5064
5071
|
},
|
|
5065
5072
|
{
|
|
5066
5073
|
"id": "components-pagelayout-features--sticky-pane",
|
|
@@ -5068,7 +5075,7 @@
|
|
|
5068
5075
|
},
|
|
5069
5076
|
{
|
|
5070
5077
|
"id": "components-pagelayout-features--nested-scroll-container",
|
|
5071
|
-
"code": "(args) => (\n <div className={classes.NestedScrollContainer}>\n <Placeholder label=\"Above scroll container\" height={120} />\n <div className={classes.OverflowAuto}>\n <PageLayout\n rowGap=\"none\"\n columnGap=\"none\"\n padding=\"none\"\n containerWidth=\"full\"\n >\n <PageLayout.Header padding=\"normal\" divider=\"line\">\n <Placeholder label=\"Header\" height={64} />\n </PageLayout.Header>\n <PageLayout.Content padding=\"normal\" width=\"large\">\n <div\n className={classes.ContentGrid}\n tabIndex={0}\n role=\"region\"\n aria-label=\"Page content\"\n >\n {Array.from({\n length: args.numParagraphsInContent,\n }).map((_, i) => (\n <p key={i} className={classes.Paragraph}>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam at\n enim id lorem tempus egestas a non ipsum. Maecenas imperdiet\n ante quam, at varius lorem molestie vel. Sed at eros consequat,\n varius tellus et, auctor felis. Donec pulvinar lacinia urna nec\n commodo. Phasellus at imperdiet risus. Donec sit amet massa\n purus. Nunc sem lectus, bibendum a sapien nec, tristique tempus\n felis. Ut porttitor auctor tellus in imperdiet. Ut blandit\n tincidunt augue, quis fringilla nunc tincidunt sed. Vestibulum\n auctor euismod nisi. Nullam tincidunt est in mi tincidunt\n dictum. Sed consectetur aliquet velit ut ornare.\n </p>\n ))}\n </div>\n </PageLayout.Content>\n <PageLayout.Pane\n position=\"start\"\n padding=\"normal\"\n divider=\"line\"\n sticky\n aria-label=\"Side pane\"\n >\n <div className={classes.ContentGrid}>\n {Array.from({\n length: args.numParagraphsInPane,\n }).map((_, i) => (\n <p key={i} className={classes.Paragraph}>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam at\n enim id lorem tempus egestas a non ipsum. Maecenas imperdiet\n ante quam, at varius lorem molestie vel. Sed at eros consequat,\n varius tellus et, auctor felis. Donec pulvinar lacinia urna nec\n commodo. Phasellus at imperdiet risus. Donec sit amet massa\n purus.\n </p>\n ))}\n </div>\n </PageLayout.Pane>\n <PageLayout.Footer padding=\"normal\" divider=\"line\">\n <Placeholder label=\"Footer\" height={64} />\n </PageLayout.Footer>\n </PageLayout>\n </div>\n <Placeholder label=\"Below scroll container\" height={120} />\n </div>\n)"
|
|
5078
|
+
"code": "(args) => (\n <div className={classes.NestedScrollContainer}>\n <Placeholder label=\"Above scroll container\" height={120} />\n <div className={classes.OverflowAuto}>\n <PageLayout\n rowGap=\"none\"\n columnGap=\"none\"\n padding=\"none\"\n containerWidth=\"full\"\n >\n <PageLayout.Header padding=\"normal\" divider=\"line\">\n <Placeholder label=\"Header\" height={64} />\n </PageLayout.Header>\n <PageLayout.Content padding=\"normal\" width=\"large\">\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}\n <div\n className={classes.ContentGrid}\n tabIndex={0}\n role=\"region\"\n aria-label=\"Page content\"\n >\n {Array.from({\n length: args.numParagraphsInContent,\n }).map((_, i) => (\n <p key={i} className={classes.Paragraph}>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam at\n enim id lorem tempus egestas a non ipsum. Maecenas imperdiet\n ante quam, at varius lorem molestie vel. Sed at eros consequat,\n varius tellus et, auctor felis. Donec pulvinar lacinia urna nec\n commodo. Phasellus at imperdiet risus. Donec sit amet massa\n purus. Nunc sem lectus, bibendum a sapien nec, tristique tempus\n felis. Ut porttitor auctor tellus in imperdiet. Ut blandit\n tincidunt augue, quis fringilla nunc tincidunt sed. Vestibulum\n auctor euismod nisi. Nullam tincidunt est in mi tincidunt\n dictum. Sed consectetur aliquet velit ut ornare.\n </p>\n ))}\n </div>\n </PageLayout.Content>\n <PageLayout.Pane\n position=\"start\"\n padding=\"normal\"\n divider=\"line\"\n sticky\n aria-label=\"Side pane\"\n >\n <div className={classes.ContentGrid}>\n {Array.from({\n length: args.numParagraphsInPane,\n }).map((_, i) => (\n <p key={i} className={classes.Paragraph}>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam at\n enim id lorem tempus egestas a non ipsum. Maecenas imperdiet\n ante quam, at varius lorem molestie vel. Sed at eros consequat,\n varius tellus et, auctor felis. Donec pulvinar lacinia urna nec\n commodo. Phasellus at imperdiet risus. Donec sit amet massa\n purus.\n </p>\n ))}\n </div>\n </PageLayout.Pane>\n <PageLayout.Footer padding=\"normal\" divider=\"line\">\n <Placeholder label=\"Footer\" height={64} />\n </PageLayout.Footer>\n </PageLayout>\n </div>\n <Placeholder label=\"Below scroll container\" height={120} />\n </div>\n)"
|
|
5072
5079
|
},
|
|
5073
5080
|
{
|
|
5074
5081
|
"id": "components-pagelayout-features--custom-sticky-header",
|
|
@@ -5080,7 +5087,7 @@
|
|
|
5080
5087
|
},
|
|
5081
5088
|
{
|
|
5082
5089
|
"id": "components-pagelayout-features--scroll-container-within-page-layout-pane",
|
|
5083
|
-
"code": "() => (\n <div className={classes.NestedScrollContainer}>\n <div className={classes.OverflowAuto}>\n <Placeholder label=\"Above inner scroll container\" height={120} />\n <PageLayout\n rowGap=\"none\"\n columnGap=\"none\"\n padding=\"none\"\n containerWidth=\"full\"\n >\n <PageLayout.Pane\n position=\"start\"\n padding=\"normal\"\n divider=\"line\"\n sticky\n aria-label=\"Sticky pane\"\n >\n <div className={classes.OverflowAuto}>\n <PageLayout.Pane padding=\"normal\" aria-label=\"Side pane\">\n <Placeholder label=\"Inner scroll container\" height={800} />\n </PageLayout.Pane>\n </div>\n </PageLayout.Pane>\n <PageLayout.Content padding=\"normal\" width=\"large\">\n <div\n className={classes.ContentGrid}\n tabIndex={0}\n role=\"region\"\n aria-label=\"Page content\"\n >\n <Placeholder label=\"Page content\" height={1600} />\n </div>\n </PageLayout.Content>\n </PageLayout>\n <Placeholder label=\"Beneath inner scroll container\" height={120} />\n </div>\n </div>\n)"
|
|
5090
|
+
"code": "() => (\n <div className={classes.NestedScrollContainer}>\n <div className={classes.OverflowAuto}>\n <Placeholder label=\"Above inner scroll container\" height={120} />\n <PageLayout\n rowGap=\"none\"\n columnGap=\"none\"\n padding=\"none\"\n containerWidth=\"full\"\n >\n <PageLayout.Pane\n position=\"start\"\n padding=\"normal\"\n divider=\"line\"\n sticky\n aria-label=\"Sticky pane\"\n >\n <div className={classes.OverflowAuto}>\n <PageLayout.Pane padding=\"normal\" aria-label=\"Side pane\">\n <Placeholder label=\"Inner scroll container\" height={800} />\n </PageLayout.Pane>\n </div>\n </PageLayout.Pane>\n <PageLayout.Content padding=\"normal\" width=\"large\">\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}\n <div\n className={classes.ContentGrid}\n tabIndex={0}\n role=\"region\"\n aria-label=\"Page content\"\n >\n <Placeholder label=\"Page content\" height={1600} />\n </div>\n </PageLayout.Content>\n </PageLayout>\n <Placeholder label=\"Beneath inner scroll container\" height={120} />\n </div>\n </div>\n)"
|
|
5084
5091
|
},
|
|
5085
5092
|
{
|
|
5086
5093
|
"id": "components-pagelayout-features--custom-pane-widths",
|
|
@@ -7439,10 +7446,17 @@
|
|
|
7439
7446
|
],
|
|
7440
7447
|
"importPath": "@primer/react",
|
|
7441
7448
|
"props": [
|
|
7449
|
+
{
|
|
7450
|
+
"name": "size",
|
|
7451
|
+
"type": "'small' | 'medium'",
|
|
7452
|
+
"defaultValue": "'medium'"
|
|
7453
|
+
},
|
|
7442
7454
|
{
|
|
7443
7455
|
"name": "variant",
|
|
7444
7456
|
"type": "'small' | 'normal'",
|
|
7445
|
-
"defaultValue": "'normal'"
|
|
7457
|
+
"defaultValue": "'normal'",
|
|
7458
|
+
"description": "Use `size` instead.",
|
|
7459
|
+
"deprecated": true
|
|
7446
7460
|
},
|
|
7447
7461
|
{
|
|
7448
7462
|
"name": "status",
|
|
@@ -8185,11 +8199,11 @@
|
|
|
8185
8199
|
},
|
|
8186
8200
|
{
|
|
8187
8201
|
"id": "components-timeline-features--with-actions",
|
|
8188
|
-
"code": "() => (\n <div\n className={classes.RealisticTimeline}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest('a')) e.preventDefault()\n }}\n >\n <Timeline>\n <Timeline.Item>\n <Timeline.Badge variant=\"done\">\n <Octicon icon={GitMergeIcon} aria-label=\"Merged\" />\n </Timeline.Badge>\n <Timeline.Body>\n <Link href=\"#\" className={classes.LinkWithBoldStyle} muted>\n Monalisa\n </Link>\n merged via the queue into <BranchName href=\"#\">main</BranchName> with\n commit{' '}\n <Link href=\"#\" className={classes.CommitSha}>\n 01e49tb\n </Link>{' '}\n <Link href=\"#\" className={classes.Timestamp} muted>\n just now\n </Link>\n <div className={classes.ChecksSubline}>28 checks passed</div>\n </Timeline.Body>\n <Timeline.Actions>\n <Button size=\"small\">View details</Button>\n <Button size=\"small\">Revert</Button>\n </Timeline.Actions>\n </Timeline.Item>\n <Timeline.Item>\n <Timeline.Badge>\n <Octicon icon={RepoPushIcon} aria-label=\"Force-push\" />\n </Timeline.Badge>\n <Timeline.Body>\n <Link href=\"#\" className={classes.LinkWithBoldStyle} muted>\n Monalisa\n </Link>\n force-pushed the <BranchName href=\"#\">main</BranchName> branch from{' '}\n <Link href=\"#\" className={classes.CommitSha}>\n 01e49tb\n </Link>{' '}\n to{' '}\n <Link href=\"#\" className={classes.CommitSha}>\n 02f50uc\n </Link>{' '}\n <Link href=\"#\" className={classes.Timestamp} muted>\n 2 hours ago\n </Link>\n </Timeline.Body>\n <Timeline.Actions>\n <Button size=\"small\">Compare</Button>\n </Timeline.Actions>\n </Timeline.Item>\n <Timeline.Item condensed>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>\n <Link href=\"#\" muted>\n Update README.md\n </Link>\n </Timeline.Body>\n <Timeline.Actions>\n <Label\n className={`${classes.SignatureLabelVerified} ${classes.HideAtNarrow}`}\n >\n Verified\n </Label>\n <Octicon\n icon={CheckIcon}\n className={classes.IconSuccess}\n aria-label=\"All checks passed\"\n />\n <Link href=\"#\" className={classes.ShaLink} muted>\n 3fbdc0\n </Link>\n </Timeline.Actions>\n </Timeline.Item>\n <Timeline.Item condensed>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>\n <Link href=\"#\" muted>\n Initial commit\n </Link>\n </Timeline.Body>\n <Timeline.Actions>\n <Label className={classes.HideAtNarrow}>Unverified</Label>\n <Octicon\n icon={XIcon}\n className={classes.IconDanger}\n aria-label=\"Some checks failed\"\n />\n <Link href=\"#\" className={classes.ShaLink} muted>\n 3fbdc0\n </Link>\n </Timeline.Actions>\n </Timeline.Item>\n <Timeline.Item>\n <Timeline.Badge>\n <Octicon icon={CrossReferenceIcon} aria-label=\"Cross-reference\" />\n </Timeline.Badge>\n <Timeline.Body>\n <Avatar\n src=\"https://avatars.githubusercontent.com/u/92997159?v=4\"\n size={20}\n className={classes.InlineAvatar}\n />\n <Link href=\"#\" className={classes.LinkWithBoldStyle} muted>\n Monalisa\n </Link>\n mentioned this pull request{' '}\n <Link href=\"#\" className={classes.Timestamp} muted>\n just now\n </Link>\n <div className={classes.CrossReferenceRow}>\n <div className={classes.CrossReferenceTitle}>\n <Link href=\"#\" className={classes.CrossReferenceLink}>\n <span className={classes.CrossReferenceName}>\n Fix positioning of Autocomplete overlay menu\n </span>{' '}\n <span className={classes.CrossReferenceNumber}>\n primer/react#7431\n </span>\n </Link>\n </div>\n <Octicon\n icon={LockIcon}\n size={16}\n className={classes.CrossReferenceMeta}\n aria-label=\"Private\"\n />\n <StateLabel status=\"pullOpened\" size=\"small\">\n Open\n </StateLabel>\n </div>\n <div className={classes.CrossReferenceTaskline}>\n <Octicon icon={TasklistIcon} size={16} />\n 17 tasks\n </div>\n </Timeline.Body>\n </Timeline.Item>\n </Timeline>\n </div>\n)"
|
|
8202
|
+
"code": "() => (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions\n <div\n className={classes.RealisticTimeline}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest('a')) e.preventDefault()\n }}\n >\n <Timeline>\n <Timeline.Item>\n <Timeline.Badge variant=\"done\">\n <Octicon icon={GitMergeIcon} aria-label=\"Merged\" />\n </Timeline.Badge>\n <Timeline.Body>\n <Link href=\"#\" className={classes.LinkWithBoldStyle} muted>\n Monalisa\n </Link>\n merged via the queue into <BranchName href=\"#\">main</BranchName> with\n commit{' '}\n <Link href=\"#\" className={classes.CommitSha}>\n 01e49tb\n </Link>{' '}\n <Link href=\"#\" className={classes.Timestamp} muted>\n just now\n </Link>\n <div className={classes.ChecksSubline}>28 checks passed</div>\n </Timeline.Body>\n <Timeline.Actions>\n <Button size=\"small\">View details</Button>\n <Button size=\"small\">Revert</Button>\n </Timeline.Actions>\n </Timeline.Item>\n <Timeline.Item>\n <Timeline.Badge>\n <Octicon icon={RepoPushIcon} aria-label=\"Force-push\" />\n </Timeline.Badge>\n <Timeline.Body>\n <Link href=\"#\" className={classes.LinkWithBoldStyle} muted>\n Monalisa\n </Link>\n force-pushed the <BranchName href=\"#\">main</BranchName> branch from{' '}\n <Link href=\"#\" className={classes.CommitSha}>\n 01e49tb\n </Link>{' '}\n to{' '}\n <Link href=\"#\" className={classes.CommitSha}>\n 02f50uc\n </Link>{' '}\n <Link href=\"#\" className={classes.Timestamp} muted>\n 2 hours ago\n </Link>\n </Timeline.Body>\n <Timeline.Actions>\n <Button size=\"small\">Compare</Button>\n </Timeline.Actions>\n </Timeline.Item>\n <Timeline.Item condensed>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>\n <Link href=\"#\" muted>\n Update README.md\n </Link>\n </Timeline.Body>\n <Timeline.Actions>\n <Label\n className={`${classes.SignatureLabelVerified} ${classes.HideAtNarrow}`}\n >\n Verified\n </Label>\n <Octicon\n icon={CheckIcon}\n className={classes.IconSuccess}\n aria-label=\"All checks passed\"\n />\n <Link href=\"#\" className={classes.ShaLink} muted>\n 3fbdc0\n </Link>\n </Timeline.Actions>\n </Timeline.Item>\n <Timeline.Item condensed>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>\n <Link href=\"#\" muted>\n Initial commit\n </Link>\n </Timeline.Body>\n <Timeline.Actions>\n <Label className={classes.HideAtNarrow}>Unverified</Label>\n <Octicon\n icon={XIcon}\n className={classes.IconDanger}\n aria-label=\"Some checks failed\"\n />\n <Link href=\"#\" className={classes.ShaLink} muted>\n 3fbdc0\n </Link>\n </Timeline.Actions>\n </Timeline.Item>\n <Timeline.Item>\n <Timeline.Badge>\n <Octicon icon={CrossReferenceIcon} aria-label=\"Cross-reference\" />\n </Timeline.Badge>\n <Timeline.Body>\n <Avatar\n src=\"https://avatars.githubusercontent.com/u/92997159?v=4\"\n size={20}\n className={classes.InlineAvatar}\n />\n <Link href=\"#\" className={classes.LinkWithBoldStyle} muted>\n Monalisa\n </Link>\n mentioned this pull request{' '}\n <Link href=\"#\" className={classes.Timestamp} muted>\n just now\n </Link>\n <div className={classes.CrossReferenceRow}>\n <div className={classes.CrossReferenceTitle}>\n <Link href=\"#\" className={classes.CrossReferenceLink}>\n <span className={classes.CrossReferenceName}>\n Fix positioning of Autocomplete overlay menu\n </span>{' '}\n <span className={classes.CrossReferenceNumber}>\n primer/react#7431\n </span>\n </Link>\n </div>\n <Octicon\n icon={LockIcon}\n size={16}\n className={classes.CrossReferenceMeta}\n aria-label=\"Private\"\n />\n <StateLabel status=\"pullOpened\" size=\"small\">\n Open\n </StateLabel>\n </div>\n <div className={classes.CrossReferenceTaskline}>\n <Octicon icon={TasklistIcon} size={16} />\n 17 tasks\n </div>\n </Timeline.Body>\n </Timeline.Item>\n </Timeline>\n </div>\n)"
|
|
8189
8203
|
},
|
|
8190
8204
|
{
|
|
8191
8205
|
"id": "components-timeline-features--with-avatar",
|
|
8192
|
-
"code": "() => (\n <div\n className={`${classes.RealisticTimeline} ${classes.AvatarGutter}`}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest('a')) e.preventDefault()\n }}\n >\n <Timeline>\n <Timeline.Item>\n <Timeline.Avatar>\n <Avatar\n size={40}\n src=\"https://avatars.githubusercontent.com/u/92997159?v=4\"\n alt=\"\"\n />\n </Timeline.Avatar>\n <Timeline.Badge variant=\"done\">\n <Octicon icon={CheckIcon} aria-label=\"Approved\" />\n </Timeline.Badge>\n <Timeline.Body>\n <Link href=\"#\" className={classes.LinkWithBoldStyle} muted>\n monalisa\n </Link>\n {'approved these changes '}\n <RelativeTime date={new Date()} format=\"relative\" />\n </Timeline.Body>\n <Timeline.Actions>\n <Button size=\"small\">View reviewed changes</Button>\n </Timeline.Actions>\n </Timeline.Item>\n </Timeline>\n </div>\n)"
|
|
8206
|
+
"code": "() => (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions\n <div\n className={`${classes.RealisticTimeline} ${classes.AvatarGutter}`}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest('a')) e.preventDefault()\n }}\n >\n <Timeline>\n <Timeline.Item>\n <Timeline.Avatar>\n <Avatar\n size={40}\n src=\"https://avatars.githubusercontent.com/u/92997159?v=4\"\n alt=\"\"\n />\n </Timeline.Avatar>\n <Timeline.Badge variant=\"done\">\n <Octicon icon={CheckIcon} aria-label=\"Approved\" />\n </Timeline.Badge>\n <Timeline.Body>\n <Link href=\"#\" className={classes.LinkWithBoldStyle} muted>\n monalisa\n </Link>\n {'approved these changes '}\n <RelativeTime date={new Date()} format=\"relative\" />\n </Timeline.Body>\n <Timeline.Actions>\n <Button size=\"small\">View reviewed changes</Button>\n </Timeline.Actions>\n </Timeline.Item>\n </Timeline>\n </div>\n)"
|
|
8193
8207
|
}
|
|
8194
8208
|
],
|
|
8195
8209
|
"importPath": "@primer/react",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "38.34.0-rc.
|
|
4
|
+
"version": "38.34.0-rc.56e4390f1",
|
|
5
5
|
"description": "An implementation of GitHub's Primer Design System using React",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -77,7 +77,6 @@
|
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@github/mini-throttle": "^2.1.1",
|
|
79
79
|
"@github/relative-time-element": "^5.0.0",
|
|
80
|
-
"@github/tab-container-element": "^4.8.2",
|
|
81
80
|
"@lit-labs/react": "1.2.1",
|
|
82
81
|
"@oddbird/popover-polyfill": "^0.5.2",
|
|
83
82
|
"@primer/behaviors": "^1.10.3",
|
|
@@ -111,12 +110,12 @@
|
|
|
111
110
|
"@primer/doc-gen": "^0.0.1",
|
|
112
111
|
"@primer/react-compiler-check": "^0.0.0",
|
|
113
112
|
"@rolldown/plugin-babel": "^0.2.3",
|
|
114
|
-
"@storybook/addon-a11y": "10.5.
|
|
115
|
-
"@storybook/addon-docs": "10.5.
|
|
116
|
-
"@storybook/addon-links": "10.5.
|
|
117
|
-
"@storybook/addon-mcp": "^0.
|
|
113
|
+
"@storybook/addon-a11y": "10.5.3",
|
|
114
|
+
"@storybook/addon-docs": "10.5.3",
|
|
115
|
+
"@storybook/addon-links": "10.5.3",
|
|
116
|
+
"@storybook/addon-mcp": "^0.7.0",
|
|
118
117
|
"@storybook/icons": "^2.1.0",
|
|
119
|
-
"@storybook/react-vite": "10.5.
|
|
118
|
+
"@storybook/react-vite": "10.5.3",
|
|
120
119
|
"@testing-library/dom": "^10.4.0",
|
|
121
120
|
"@testing-library/jest-dom": "^6.4.5",
|
|
122
121
|
"@testing-library/react": "^16.3.0",
|
|
@@ -173,7 +172,7 @@
|
|
|
173
172
|
"rolldown-plugin-dts": "^0.26.0",
|
|
174
173
|
"rolldown-plugin-import-css": "^0.0.0",
|
|
175
174
|
"rolldown-plugin-preserve-directives": "^0.0.0",
|
|
176
|
-
"storybook": "10.5.
|
|
175
|
+
"storybook": "10.5.3",
|
|
177
176
|
"terser": "5.36.0",
|
|
178
177
|
"ts-toolbelt": "9.6.0",
|
|
179
178
|
"tsx": "4.20.3",
|