@primer/react 37.29.0-rc.d46ec0131 → 38.0.0-rc.195178541
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 +3 -17
- package/dist/browser.esm.js +2 -2
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +3 -3
- package/dist/browser.umd.js.map +1 -1
- package/dist/components.css +77 -115
- package/generated/components.json +133 -133
- package/lib/ActionList/Description.d.ts.map +1 -1
- package/lib/ActionList/Description.js +2 -1
- package/lib/ActionList/Divider.d.ts.map +1 -1
- package/lib/ActionList/Divider.js +2 -1
- package/lib/ActionList/Group.d.ts.map +1 -1
- package/lib/ActionList/Group.js +6 -1
- package/lib/ActionList/Item.d.ts.map +1 -1
- package/lib/ActionList/Item.js +2 -1
- package/lib/ActionList/LinkItem.d.ts.map +1 -1
- package/lib/ActionList/LinkItem.js +2 -1
- package/lib/ActionList/List.d.ts.map +1 -1
- package/lib/ActionList/List.js +3 -0
- package/lib/ActionList/Visuals.d.ts.map +1 -1
- package/lib/ActionList/Visuals.js +7 -0
- package/lib/Avatar/Avatar.d.ts.map +1 -1
- package/lib/Avatar/Avatar.js +41 -39
- package/lib/AvatarPair/AvatarPair.js +1 -1
- package/lib/AvatarStack/AvatarStack.d.ts +1 -1
- package/lib/AvatarStack/AvatarStack.d.ts.map +1 -1
- package/lib/AvatarStack/AvatarStack.js +2 -1
- package/lib/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/lib/ButtonGroup/ButtonGroup.js +61 -24
- package/lib/CounterLabel/CounterLabel.d.ts.map +1 -1
- package/lib/CounterLabel/CounterLabel.js +87 -43
- package/lib/DataTable/Pagination.d.ts.map +1 -1
- package/lib/DataTable/Pagination.js +88 -81
- package/lib/DataTable/Table.d.ts +1 -1
- package/lib/DataTable/Table.d.ts.map +1 -1
- package/lib/DataTable/Table.js +26 -18
- package/lib/Details/Details.d.ts.map +1 -1
- package/lib/Details/Details.js +82 -35
- package/lib/FilteredActionList/FilteredActionListLoaders.js +1 -1
- package/lib/FormControl/FormControl.d.ts.map +1 -1
- package/lib/FormControl/FormControl.js +12 -3
- package/lib/Header/Header.d.ts.map +1 -1
- package/lib/Header/Header.js +170 -64
- package/lib/InlineMessage/InlineMessage.d.ts +1 -1
- package/lib/InlineMessage/InlineMessage.d.ts.map +1 -1
- package/lib/InlineMessage/InlineMessage.js +69 -31
- package/lib/PageLayout/PageLayout.d.ts.map +1 -1
- package/lib/PageLayout/PageLayout.js +473 -465
- package/lib/Pagehead/Pagehead.d.ts +1 -1
- package/lib/Pagehead/Pagehead.d.ts.map +1 -1
- package/lib/Pagehead/Pagehead.js +11 -2
- package/lib/Radio/Radio.d.ts.map +1 -1
- package/lib/Radio/Radio.js +91 -40
- package/lib/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/lib/SegmentedControl/SegmentedControl.js +25 -23
- package/lib/SegmentedControl/SegmentedControlButton.d.ts.map +1 -1
- package/lib/SegmentedControl/SegmentedControlButton.js +72 -70
- package/lib/SegmentedControl/SegmentedControlIconButton.d.ts.map +1 -1
- package/lib/SegmentedControl/SegmentedControlIconButton.js +112 -110
- package/lib/SideNav.d.ts.map +1 -1
- package/lib/SideNav.js +2 -1
- package/lib/Skeleton/SkeletonBox.d.ts +2 -2
- package/lib/Skeleton/SkeletonBox.d.ts.map +1 -1
- package/lib/Skeleton/SkeletonBox.js +24 -25
- package/lib/Spinner/Spinner.d.ts +1 -1
- package/lib/Spinner/Spinner.d.ts.map +1 -1
- package/lib/Spinner/Spinner.js +51 -13
- package/lib/SubNav/SubNav.d.ts.map +1 -1
- package/lib/SubNav/SubNav.js +215 -77
- package/lib/Timeline/Timeline.d.ts +1 -1
- package/lib/Timeline/Timeline.d.ts.map +1 -1
- package/lib/Timeline/Timeline.js +264 -92
- package/lib/Token/Token.d.ts.map +1 -1
- package/lib/Token/Token.js +128 -120
- package/lib/TreeView/TreeView.js +2 -2
- package/lib/VisuallyHidden/VisuallyHidden.d.ts +1 -1
- package/lib/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/lib/VisuallyHidden/VisuallyHidden.js +51 -19
- package/lib/_VisuallyHidden.d.ts +2 -3
- package/lib/_VisuallyHidden.d.ts.map +1 -1
- package/lib/_VisuallyHidden.js +26 -63
- package/lib/experimental/Skeleton/SkeletonAvatar-e00fff32.css +2 -0
- package/lib/experimental/Skeleton/SkeletonAvatar-e00fff32.css.map +1 -0
- package/lib/experimental/Skeleton/SkeletonAvatar.d.ts +8 -0
- package/lib/experimental/Skeleton/SkeletonAvatar.d.ts.map +1 -0
- package/lib/{SkeletonAvatar → experimental/Skeleton}/SkeletonAvatar.js +5 -5
- package/lib/{SkeletonAvatar → experimental/Skeleton}/SkeletonAvatar.module.css.js +1 -1
- package/lib/experimental/Skeleton/SkeletonText-5cf908c1.css +2 -0
- package/lib/experimental/Skeleton/SkeletonText-5cf908c1.css.map +1 -0
- package/lib/{SkeletonText → experimental/Skeleton}/SkeletonText.d.ts +4 -5
- package/lib/experimental/Skeleton/SkeletonText.d.ts.map +1 -0
- package/lib/experimental/Skeleton/SkeletonText.js +149 -0
- package/lib/experimental/Skeleton/SkeletonText.module.css.js +7 -0
- package/lib/experimental/Skeleton/index.d.ts +4 -0
- package/lib/experimental/Skeleton/index.d.ts.map +1 -0
- package/lib/experimental/UnderlinePanels/UnderlinePanels.d.ts.map +1 -1
- package/lib/experimental/UnderlinePanels/UnderlinePanels.js +40 -30
- package/lib/experimental/index.d.ts +1 -6
- package/lib/experimental/index.d.ts.map +1 -1
- package/lib/experimental/index.js +2 -2
- package/lib/internal/components/ButtonReset.d.ts +2 -1
- package/lib/internal/components/ButtonReset.d.ts.map +1 -1
- package/lib/internal/components/ButtonReset.js +13 -49
- package/lib/internal/components/{TextInputWrapper-889df5d3.css → TextInputWrapper-ca608f70.css} +2 -2
- package/lib/internal/components/{TextInputWrapper-889df5d3.css.map → TextInputWrapper-ca608f70.css.map} +1 -1
- package/lib/internal/components/TextInputWrapper.module.css.js +1 -1
- package/lib/internal/components/UnderlineTabbedInterface.d.ts.map +1 -1
- package/lib/internal/components/UnderlineTabbedInterface.js +108 -60
- package/lib/internal/utils/toggleStyledComponent.d.ts +20 -0
- package/lib/internal/utils/toggleStyledComponent.d.ts.map +1 -0
- package/lib-esm/ActionList/Description.js +2 -1
- package/lib-esm/ActionList/Divider.js +2 -1
- package/lib-esm/ActionList/Group.js +6 -1
- package/lib-esm/ActionList/Item.js +2 -1
- package/lib-esm/ActionList/LinkItem.js +2 -1
- package/lib-esm/ActionList/List.js +3 -0
- package/lib-esm/ActionList/Visuals.js +7 -0
- package/lib-esm/Avatar/Avatar.js +41 -39
- package/lib-esm/AvatarPair/AvatarPair.js +1 -1
- package/lib-esm/AvatarStack/AvatarStack.d.ts +1 -1
- package/lib-esm/AvatarStack/AvatarStack.js +2 -1
- package/lib-esm/ButtonGroup/ButtonGroup.js +61 -24
- package/lib-esm/CounterLabel/CounterLabel.js +87 -43
- package/lib-esm/DataTable/Pagination.js +84 -81
- package/lib-esm/DataTable/Table.d.ts +1 -1
- package/lib-esm/DataTable/Table.js +26 -18
- package/lib-esm/Details/Details.js +82 -35
- package/lib-esm/FilteredActionList/FilteredActionListLoaders.js +1 -1
- package/lib-esm/FormControl/FormControl.js +12 -3
- package/lib-esm/Header/Header.js +170 -64
- package/lib-esm/InlineMessage/InlineMessage.d.ts +1 -1
- package/lib-esm/InlineMessage/InlineMessage.js +69 -31
- package/lib-esm/PageLayout/PageLayout.js +473 -465
- package/lib-esm/Pagehead/Pagehead.d.ts +1 -1
- package/lib-esm/Pagehead/Pagehead.js +11 -2
- package/lib-esm/Radio/Radio.js +91 -40
- package/lib-esm/SegmentedControl/SegmentedControl.js +25 -23
- package/lib-esm/SegmentedControl/SegmentedControlButton.js +72 -70
- package/lib-esm/SegmentedControl/SegmentedControlIconButton.js +112 -110
- package/lib-esm/SideNav.js +2 -1
- package/lib-esm/Skeleton/SkeletonBox.d.ts +2 -2
- package/lib-esm/Skeleton/SkeletonBox.js +24 -25
- package/lib-esm/Spinner/Spinner.d.ts +1 -1
- package/lib-esm/Spinner/Spinner.js +47 -13
- package/lib-esm/SubNav/SubNav.js +215 -77
- package/lib-esm/Timeline/Timeline.d.ts +1 -1
- package/lib-esm/Timeline/Timeline.js +264 -92
- package/lib-esm/Token/Token.js +128 -120
- package/lib-esm/TreeView/TreeView.js +2 -2
- package/lib-esm/VisuallyHidden/VisuallyHidden.d.ts +1 -1
- package/lib-esm/VisuallyHidden/VisuallyHidden.js +51 -19
- package/lib-esm/_VisuallyHidden.d.ts +2 -3
- package/lib-esm/_VisuallyHidden.js +22 -63
- package/lib-esm/experimental/Skeleton/SkeletonAvatar-e00fff32.css +2 -0
- package/lib-esm/experimental/Skeleton/SkeletonAvatar-e00fff32.css.map +1 -0
- package/lib-esm/experimental/Skeleton/SkeletonAvatar.d.ts +8 -0
- package/lib-esm/{SkeletonAvatar → experimental/Skeleton}/SkeletonAvatar.js +5 -5
- package/lib-esm/experimental/Skeleton/SkeletonAvatar.module.css.js +5 -0
- package/lib-esm/experimental/Skeleton/SkeletonText-5cf908c1.css +2 -0
- package/lib-esm/experimental/Skeleton/SkeletonText-5cf908c1.css.map +1 -0
- package/lib-esm/{SkeletonText → experimental/Skeleton}/SkeletonText.d.ts +4 -5
- package/lib-esm/experimental/Skeleton/SkeletonText.js +143 -0
- package/lib-esm/experimental/Skeleton/SkeletonText.module.css.js +5 -0
- package/lib-esm/experimental/Skeleton/index.d.ts +4 -0
- package/lib-esm/experimental/UnderlinePanels/UnderlinePanels.js +40 -30
- package/lib-esm/experimental/index.d.ts +1 -6
- package/lib-esm/experimental/index.js +2 -2
- package/lib-esm/internal/components/ButtonReset.d.ts +2 -1
- package/lib-esm/internal/components/ButtonReset.js +9 -49
- package/lib-esm/internal/components/{TextInputWrapper-889df5d3.css → TextInputWrapper-ca608f70.css} +2 -2
- package/lib-esm/internal/components/{TextInputWrapper-889df5d3.css.map → TextInputWrapper-ca608f70.css.map} +1 -1
- package/lib-esm/internal/components/TextInputWrapper.module.css.js +1 -1
- package/lib-esm/internal/components/UnderlineTabbedInterface.js +108 -60
- package/lib-esm/internal/utils/toggleStyledComponent.d.ts +20 -0
- package/package.json +1 -1
- package/lib/DataTable/Pagination-b6f8418c.css +0 -2
- package/lib/DataTable/Pagination-b6f8418c.css.map +0 -1
- package/lib/DataTable/Pagination.module.css.js +0 -7
- package/lib/SkeletonAvatar/SkeletonAvatar-e00fff32.css +0 -2
- package/lib/SkeletonAvatar/SkeletonAvatar-e00fff32.css.map +0 -1
- package/lib/SkeletonAvatar/SkeletonAvatar.d.ts +0 -12
- package/lib/SkeletonAvatar/SkeletonAvatar.d.ts.map +0 -1
- package/lib/SkeletonAvatar/index.d.ts +0 -3
- package/lib/SkeletonAvatar/index.d.ts.map +0 -1
- package/lib/SkeletonText/SkeletonText-5cf908c1.css +0 -2
- package/lib/SkeletonText/SkeletonText-5cf908c1.css.map +0 -1
- package/lib/SkeletonText/SkeletonText.d.ts.map +0 -1
- package/lib/SkeletonText/SkeletonText.js +0 -142
- package/lib/SkeletonText/SkeletonText.module.css.js +0 -7
- package/lib/SkeletonText/index.d.ts +0 -3
- package/lib/SkeletonText/index.d.ts.map +0 -1
- package/lib/_VisuallyHidden-5c0a2499.css +0 -2
- package/lib/_VisuallyHidden-5c0a2499.css.map +0 -1
- package/lib/_VisuallyHidden.module.css.js +0 -7
- package/lib/internal/components/ButtonReset-904f2483.css +0 -2
- package/lib/internal/components/ButtonReset-904f2483.css.map +0 -1
- package/lib/internal/components/ButtonReset.module.css.js +0 -7
- package/lib-esm/DataTable/Pagination-b6f8418c.css +0 -2
- package/lib-esm/DataTable/Pagination-b6f8418c.css.map +0 -1
- package/lib-esm/DataTable/Pagination.module.css.js +0 -5
- package/lib-esm/SkeletonAvatar/SkeletonAvatar-e00fff32.css +0 -2
- package/lib-esm/SkeletonAvatar/SkeletonAvatar-e00fff32.css.map +0 -1
- package/lib-esm/SkeletonAvatar/SkeletonAvatar.d.ts +0 -12
- package/lib-esm/SkeletonAvatar/SkeletonAvatar.module.css.js +0 -5
- package/lib-esm/SkeletonAvatar/index.d.ts +0 -3
- package/lib-esm/SkeletonText/SkeletonText-5cf908c1.css +0 -2
- package/lib-esm/SkeletonText/SkeletonText-5cf908c1.css.map +0 -1
- package/lib-esm/SkeletonText/SkeletonText.js +0 -140
- package/lib-esm/SkeletonText/SkeletonText.module.css.js +0 -5
- package/lib-esm/SkeletonText/index.d.ts +0 -3
- package/lib-esm/_VisuallyHidden-5c0a2499.css +0 -2
- package/lib-esm/_VisuallyHidden-5c0a2499.css.map +0 -1
- package/lib-esm/_VisuallyHidden.module.css.js +0 -5
- package/lib-esm/internal/components/ButtonReset-904f2483.css +0 -2
- package/lib-esm/internal/components/ButtonReset-904f2483.css.map +0 -1
- package/lib-esm/internal/components/ButtonReset.module.css.js +0 -5
|
@@ -2,8 +2,9 @@ import { c } from 'react-compiler-runtime';
|
|
|
2
2
|
import { AlertFillIcon, CheckCircleFillIcon, AlertIcon, CheckCircleIcon } from '@primer/octicons-react';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import classes from './InlineMessage.module.css.js';
|
|
5
|
-
import {
|
|
5
|
+
import { defaultSxProp } from '../utils/defaultSxProp.js';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
+
import Box from '../Box/Box.js';
|
|
7
8
|
|
|
8
9
|
const variantToIcon = variant => {
|
|
9
10
|
const icons = {
|
|
@@ -44,11 +45,12 @@ const variantToSmallIcon = variant => {
|
|
|
44
45
|
return icons[variant];
|
|
45
46
|
};
|
|
46
47
|
function InlineMessage(t0) {
|
|
47
|
-
const $ = c(
|
|
48
|
+
const $ = c(29);
|
|
48
49
|
let children;
|
|
49
50
|
let className;
|
|
50
51
|
let rest;
|
|
51
52
|
let t1;
|
|
53
|
+
let t2;
|
|
52
54
|
let variant;
|
|
53
55
|
if ($[0] !== t0) {
|
|
54
56
|
({
|
|
@@ -56,6 +58,7 @@ function InlineMessage(t0) {
|
|
|
56
58
|
className,
|
|
57
59
|
size: t1,
|
|
58
60
|
variant,
|
|
61
|
+
sx: t2,
|
|
59
62
|
...rest
|
|
60
63
|
} = t0);
|
|
61
64
|
$[0] = t0;
|
|
@@ -63,53 +66,88 @@ function InlineMessage(t0) {
|
|
|
63
66
|
$[2] = className;
|
|
64
67
|
$[3] = rest;
|
|
65
68
|
$[4] = t1;
|
|
66
|
-
$[5] =
|
|
69
|
+
$[5] = t2;
|
|
70
|
+
$[6] = variant;
|
|
67
71
|
} else {
|
|
68
72
|
children = $[1];
|
|
69
73
|
className = $[2];
|
|
70
74
|
rest = $[3];
|
|
71
75
|
t1 = $[4];
|
|
72
|
-
|
|
76
|
+
t2 = $[5];
|
|
77
|
+
variant = $[6];
|
|
73
78
|
}
|
|
74
79
|
const size = t1 === undefined ? "medium" : t1;
|
|
75
|
-
|
|
76
|
-
if ($[6] !== size || $[7] !== variant) {
|
|
77
|
-
t2 = size === "small" ? variantToSmallIcon(variant) : variantToIcon(variant);
|
|
78
|
-
$[6] = size;
|
|
79
|
-
$[7] = variant;
|
|
80
|
-
$[8] = t2;
|
|
81
|
-
} else {
|
|
82
|
-
t2 = $[8];
|
|
83
|
-
}
|
|
84
|
-
const icon = t2;
|
|
80
|
+
const sxProp = t2 === undefined ? defaultSxProp : t2;
|
|
85
81
|
let t3;
|
|
86
|
-
if ($[
|
|
87
|
-
t3 =
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
82
|
+
if ($[7] !== size || $[8] !== variant) {
|
|
83
|
+
t3 = size === "small" ? variantToSmallIcon(variant) : variantToIcon(variant);
|
|
84
|
+
$[7] = size;
|
|
85
|
+
$[8] = variant;
|
|
86
|
+
$[9] = t3;
|
|
90
87
|
} else {
|
|
91
|
-
t3 = $[
|
|
88
|
+
t3 = $[9];
|
|
89
|
+
}
|
|
90
|
+
const icon = t3;
|
|
91
|
+
if (sxProp !== defaultSxProp) {
|
|
92
|
+
let t4;
|
|
93
|
+
if ($[10] !== className) {
|
|
94
|
+
t4 = clsx(className, classes.InlineMessage);
|
|
95
|
+
$[10] = className;
|
|
96
|
+
$[11] = t4;
|
|
97
|
+
} else {
|
|
98
|
+
t4 = $[11];
|
|
99
|
+
}
|
|
100
|
+
let t5;
|
|
101
|
+
if ($[12] !== children || $[13] !== icon || $[14] !== rest || $[15] !== size || $[16] !== sxProp || $[17] !== t4 || $[18] !== variant) {
|
|
102
|
+
t5 = /*#__PURE__*/jsxs(Box, {
|
|
103
|
+
sx: sxProp,
|
|
104
|
+
className: t4,
|
|
105
|
+
...rest,
|
|
106
|
+
"data-size": size,
|
|
107
|
+
"data-variant": variant,
|
|
108
|
+
children: [icon, children]
|
|
109
|
+
});
|
|
110
|
+
$[12] = children;
|
|
111
|
+
$[13] = icon;
|
|
112
|
+
$[14] = rest;
|
|
113
|
+
$[15] = size;
|
|
114
|
+
$[16] = sxProp;
|
|
115
|
+
$[17] = t4;
|
|
116
|
+
$[18] = variant;
|
|
117
|
+
$[19] = t5;
|
|
118
|
+
} else {
|
|
119
|
+
t5 = $[19];
|
|
120
|
+
}
|
|
121
|
+
return t5;
|
|
92
122
|
}
|
|
93
123
|
let t4;
|
|
94
|
-
if ($[
|
|
95
|
-
t4 =
|
|
96
|
-
|
|
124
|
+
if ($[20] !== className) {
|
|
125
|
+
t4 = clsx(className, classes.InlineMessage);
|
|
126
|
+
$[20] = className;
|
|
127
|
+
$[21] = t4;
|
|
128
|
+
} else {
|
|
129
|
+
t4 = $[21];
|
|
130
|
+
}
|
|
131
|
+
let t5;
|
|
132
|
+
if ($[22] !== children || $[23] !== icon || $[24] !== rest || $[25] !== size || $[26] !== t4 || $[27] !== variant) {
|
|
133
|
+
t5 = /*#__PURE__*/jsxs("div", {
|
|
134
|
+
className: t4,
|
|
97
135
|
...rest,
|
|
98
136
|
"data-size": size,
|
|
99
137
|
"data-variant": variant,
|
|
100
138
|
children: [icon, children]
|
|
101
139
|
});
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
107
|
-
$[
|
|
108
|
-
$[
|
|
140
|
+
$[22] = children;
|
|
141
|
+
$[23] = icon;
|
|
142
|
+
$[24] = rest;
|
|
143
|
+
$[25] = size;
|
|
144
|
+
$[26] = t4;
|
|
145
|
+
$[27] = variant;
|
|
146
|
+
$[28] = t5;
|
|
109
147
|
} else {
|
|
110
|
-
|
|
148
|
+
t5 = $[28];
|
|
111
149
|
}
|
|
112
|
-
return
|
|
150
|
+
return t5;
|
|
113
151
|
}
|
|
114
152
|
|
|
115
153
|
export { InlineMessage };
|