@primer/react 0.0.0-20260402150907 → 0.0.0-20260402162737
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 +1 -1
- package/dist/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar/ActionBar.js +60 -57
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBar.d.ts","sourceRoot":"","sources":["../../src/ActionBar/ActionBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAiF,MAAM,OAAO,CAAA;AAErG,OAAO,EAAa,KAAK,mBAAmB,EAAC,MAAM,eAAe,CAAA;AAElE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,WAAW,CAAA;AAqC9C,KAAK,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAExC,KAAK,SAAS,GACV;IACE,wDAAwD;IACxD,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;IAChD,iBAAiB,CAAC,EAAE,SAAS,CAAA;CAC9B,GACD;IACE,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB;;OAEG;IACH,iBAAiB,EAAE,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAA;CAC3D,CAAA;AAEL,KAAK,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAA;AAEpC,MAAM,MAAM,cAAc,GAAG;IAC3B;;;SAGK;IACL,IAAI,CAAC,EAAE,IAAI,CAAA;IAEX,gCAAgC;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IAEzB;;;SAGK;IACL,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAA;CACf,GAAG,SAAS,CAAA;AAEb,MAAM,MAAM,wBAAwB,GAA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G;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAA;IACzC;;;OAGG;IACH,KAAK,CAAC,EAAE,sBAAsB,EAAE,CAAA;CACjC,GAAG,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAAC,GACzC;IACE,IAAI,EAAE,SAAS,CAAA;CAChB,CAAA;AAEL,MAAM,MAAM,kBAAkB,GAAG;IAC/B,2CAA2C;IAC3C,YAAY,EAAE,MAAM,CAAA;IACpB,+BAA+B;IAC/B,IAAI,EAAE,wBAAwB,CAAC,MAAM,CAAC,CAAA;IACtC,KAAK,EAAE,sBAAsB,EAAE,CAAA;IAC/B;;;OAGG;IACH,YAAY,CAAC,EAAE,wBAAwB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAA;IACxD;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;CAC9C,GAAG,eAAe,CAAA;AAqDnB,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAkIvE,CAAA;AAqCD,eAAO,MAAM,mBAAmB,0FA2C/B,CAAA;AAMD,eAAO,MAAM,cAAc;;iCAezB,CAAA;AAEF,eAAO,MAAM,aAAa;IA5SxB,2CAA2C;kBAC7B,MAAM;IACpB,+BAA+B;UACzB,wBAAwB,CAAC,MAAM,CAAC;WAC/B,sBAAsB,EAAE;IAC/B;;;OAGG;mBACY,wBAAwB,CAAC,MAAM,CAAC,GAAG,MAAM;IACxD;;OAEG;qBACc,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC;;;;;;;;;;;wGAwU9C,CAAA;AAED,eAAO,MAAM,eAAe,yBAgB3B,CAAA"}
|
|
@@ -71,7 +71,7 @@ const renderMenuItem = (item, index) => {
|
|
|
71
71
|
};
|
|
72
72
|
renderMenuItem.displayName = "renderMenuItem";
|
|
73
73
|
const ActionBar = props => {
|
|
74
|
-
const $ = c(
|
|
74
|
+
const $ = c(36);
|
|
75
75
|
const {
|
|
76
76
|
size: t0,
|
|
77
77
|
children,
|
|
@@ -95,7 +95,7 @@ const ActionBar = props => {
|
|
|
95
95
|
focusOutBehavior: "wrap",
|
|
96
96
|
getNextFocusable: (direction, from) => {
|
|
97
97
|
var _listRef$current$quer, _listRef$current;
|
|
98
|
-
const items = Array.from((_listRef$current$quer = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.querySelectorAll(":is(button, a, input, [tabindex]):not([data-overflowing]):not(
|
|
98
|
+
const items = Array.from((_listRef$current$quer = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.querySelectorAll(":is(button, a, input, [tabindex]):not(:disabled):not([data-overflowing]):not([data-inactive])")) !== null && _listRef$current$quer !== void 0 ? _listRef$current$quer : []);
|
|
99
99
|
const fromIndex = from ? items.indexOf(from) : -1;
|
|
100
100
|
switch (direction) {
|
|
101
101
|
case "start":
|
|
@@ -175,55 +175,58 @@ const ActionBar = props => {
|
|
|
175
175
|
t9 = $[10];
|
|
176
176
|
}
|
|
177
177
|
const t10 = `More ${ariaLabel} items`;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
const t11 = overflowItems !== null && overflowItems !== void 0 && overflowItems.length ? undefined : true;
|
|
179
|
+
let t12;
|
|
180
|
+
if ($[11] !== t10 || $[12] !== t11) {
|
|
181
|
+
t12 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
181
182
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
182
183
|
variant: "invisible",
|
|
183
184
|
"aria-label": t10,
|
|
184
185
|
icon: KebabHorizontalIcon,
|
|
185
|
-
className: styles.MoreButton
|
|
186
|
+
className: styles.MoreButton,
|
|
187
|
+
"data-inactive": t11
|
|
186
188
|
})
|
|
187
189
|
});
|
|
188
190
|
$[11] = t10;
|
|
189
191
|
$[12] = t11;
|
|
192
|
+
$[13] = t12;
|
|
190
193
|
} else {
|
|
191
|
-
|
|
194
|
+
t12 = $[13];
|
|
192
195
|
}
|
|
193
|
-
let
|
|
194
|
-
if ($[
|
|
195
|
-
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
196
|
+
let t13;
|
|
197
|
+
if ($[14] !== overflowItems) {
|
|
198
|
+
t13 = overflowItems === null || overflowItems === void 0 ? void 0 : overflowItems.map(_temp3);
|
|
199
|
+
$[14] = overflowItems;
|
|
200
|
+
$[15] = t13;
|
|
198
201
|
} else {
|
|
199
|
-
|
|
202
|
+
t13 = $[15];
|
|
200
203
|
}
|
|
201
|
-
let
|
|
202
|
-
if ($[
|
|
203
|
-
|
|
204
|
+
let t14;
|
|
205
|
+
if ($[16] !== t13) {
|
|
206
|
+
t14 = /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
204
207
|
children: /*#__PURE__*/jsx(ActionList, {
|
|
205
|
-
children:
|
|
208
|
+
children: t13
|
|
206
209
|
})
|
|
207
210
|
});
|
|
208
|
-
$[15] = t12;
|
|
209
211
|
$[16] = t13;
|
|
212
|
+
$[17] = t14;
|
|
210
213
|
} else {
|
|
211
|
-
|
|
214
|
+
t14 = $[17];
|
|
212
215
|
}
|
|
213
|
-
let
|
|
214
|
-
if ($[
|
|
215
|
-
|
|
216
|
-
children: [
|
|
216
|
+
let t15;
|
|
217
|
+
if ($[18] !== t12 || $[19] !== t14) {
|
|
218
|
+
t15 = /*#__PURE__*/jsxs(ActionMenu, {
|
|
219
|
+
children: [t12, t14]
|
|
217
220
|
});
|
|
218
|
-
$[
|
|
219
|
-
$[18] = t13;
|
|
221
|
+
$[18] = t12;
|
|
220
222
|
$[19] = t14;
|
|
223
|
+
$[20] = t15;
|
|
221
224
|
} else {
|
|
222
|
-
|
|
225
|
+
t15 = $[20];
|
|
223
226
|
}
|
|
224
|
-
let
|
|
225
|
-
if ($[
|
|
226
|
-
|
|
227
|
+
let t16;
|
|
228
|
+
if ($[21] !== ariaLabel || $[22] !== ariaLabelledBy || $[23] !== gap || $[24] !== size || $[25] !== t15 || $[26] !== t7 || $[27] !== t9) {
|
|
229
|
+
t16 = /*#__PURE__*/jsxs("div", {
|
|
227
230
|
ref: listRef,
|
|
228
231
|
role: "toolbar",
|
|
229
232
|
className: styles.List,
|
|
@@ -232,47 +235,47 @@ const ActionBar = props => {
|
|
|
232
235
|
"data-gap": gap,
|
|
233
236
|
"data-size": size,
|
|
234
237
|
"data-has-overflow": t7,
|
|
235
|
-
children: [t9,
|
|
238
|
+
children: [t9, t15]
|
|
236
239
|
});
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
240
|
+
$[21] = ariaLabel;
|
|
241
|
+
$[22] = ariaLabelledBy;
|
|
242
|
+
$[23] = gap;
|
|
243
|
+
$[24] = size;
|
|
244
|
+
$[25] = t15;
|
|
245
|
+
$[26] = t7;
|
|
246
|
+
$[27] = t9;
|
|
247
|
+
$[28] = t16;
|
|
245
248
|
} else {
|
|
246
|
-
|
|
249
|
+
t16 = $[28];
|
|
247
250
|
}
|
|
248
|
-
let
|
|
249
|
-
if ($[
|
|
250
|
-
|
|
251
|
+
let t17;
|
|
252
|
+
if ($[29] !== flush || $[30] !== t16 || $[31] !== t6) {
|
|
253
|
+
t17 = /*#__PURE__*/jsx("div", {
|
|
251
254
|
ref: navRef,
|
|
252
255
|
className: t6,
|
|
253
256
|
"data-flush": flush,
|
|
254
|
-
children:
|
|
257
|
+
children: t16
|
|
255
258
|
});
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
259
|
+
$[29] = flush;
|
|
260
|
+
$[30] = t16;
|
|
261
|
+
$[31] = t6;
|
|
262
|
+
$[32] = t17;
|
|
260
263
|
} else {
|
|
261
|
-
|
|
264
|
+
t17 = $[32];
|
|
262
265
|
}
|
|
263
|
-
let
|
|
264
|
-
if ($[
|
|
265
|
-
|
|
266
|
+
let t18;
|
|
267
|
+
if ($[33] !== t17 || $[34] !== t5) {
|
|
268
|
+
t18 = /*#__PURE__*/jsx(ActionBarContext.Provider, {
|
|
266
269
|
value: t5,
|
|
267
|
-
children:
|
|
270
|
+
children: t17
|
|
268
271
|
});
|
|
269
|
-
$[
|
|
270
|
-
$[
|
|
271
|
-
$[
|
|
272
|
+
$[33] = t17;
|
|
273
|
+
$[34] = t5;
|
|
274
|
+
$[35] = t18;
|
|
272
275
|
} else {
|
|
273
|
-
|
|
276
|
+
t18 = $[35];
|
|
274
277
|
}
|
|
275
|
-
return
|
|
278
|
+
return t18;
|
|
276
279
|
};
|
|
277
280
|
function useActionBarItem(ref, registryProps) {
|
|
278
281
|
var _useContext;
|
package/package.json
CHANGED