@primer/react 38.45.0-rc.72a855661 → 38.45.0-rc.cac8791d9

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.
@@ -4,7 +4,7 @@ import { DEFAULT_SORT_DIRECTION, SortDirection, strategies, transition } from ".
4
4
  import { useId, useState } from "react";
5
5
  //#region src/DataTable/useTable.ts
6
6
  function useTable(t0) {
7
- const $ = c(80);
7
+ const $ = c(82);
8
8
  const { columns, data, initialSortColumn, initialSortDirection, externalSorting, getRowId, rowSelection: t1, selectedRows: controlledSelectedRows, defaultSelectedRows, onSelectionChange, isRowSelectable, collapsibleGroups: t2, expandedGroups: controlledExpandedGroups, defaultExpandedGroups, onExpandedGroupsChange } = t0;
9
9
  const rowSelection = t1 === void 0 ? false : t1;
10
10
  const collapsibleGroups = t2 === void 0 ? false : t2;
@@ -232,13 +232,17 @@ function useTable(t0) {
232
232
  for (const item_0 of rowOrder) if (isDataTableRowGroup(item_0)) {
233
233
  if (body.rows.length > 0) bodies.push(body);
234
234
  const groupStartIndex = rowIndex_0;
235
+ const rows_1 = item_0.rows.map((row_1, index_2) => createRow(row_1, groupStartIndex + index_2));
236
+ const selectableRows = rows_1.filter(_temp2);
235
237
  bodies.push({
236
238
  type: "row-group",
237
239
  key: `group:${typeof item_0.groupId}:${item_0.groupId}`,
238
240
  id: item_0.groupId,
239
241
  label: item_0.label,
240
- rows: item_0.rows.map((row_1, index_2) => createRow(row_1, groupStartIndex + index_2)),
242
+ rows: rows_1,
241
243
  expanded: !collapsibleGroups || expandedGroups.has(item_0.groupId),
244
+ selection: selectableRows.length > 0 && selectableRows.every(_temp3) ? "all" : selectableRows.some(_temp4) ? "some" : "none",
245
+ selectable: selectableRows.length > 0,
242
246
  "aria-label": item_0["aria-label"]
243
247
  });
244
248
  rowIndex_0 = rowIndex_0 + item_0.rows.length;
@@ -252,7 +256,7 @@ function useTable(t0) {
252
256
  rowIndex_0 = rowIndex_0 + 1;
253
257
  }
254
258
  if (body.rows.length > 0 || bodies.length === 0) bodies.push(body);
255
- t11 = bodies.flatMap(_temp2).filter(_temp3);
259
+ t11 = bodies.flatMap(_temp5).filter(_temp6);
256
260
  $[23] = collapsibleGroups;
257
261
  $[24] = columns;
258
262
  $[25] = data;
@@ -277,25 +281,25 @@ function useTable(t0) {
277
281
  sortBy = $[39];
278
282
  t11 = $[40];
279
283
  }
280
- const selectableRows = t11;
284
+ const selectableRows_0 = t11;
281
285
  let t12;
282
- if ($[45] !== selectableRows) {
283
- t12 = new Set(selectableRows.filter(_temp4).map(_temp5));
284
- $[45] = selectableRows;
286
+ if ($[45] !== selectableRows_0) {
287
+ t12 = new Set(selectableRows_0.filter(_temp7).map(_temp8));
288
+ $[45] = selectableRows_0;
285
289
  $[46] = t12;
286
290
  } else t12 = $[46];
287
291
  const effectiveSelectedRows = t12;
288
292
  const selectedCount = effectiveSelectedRows.size;
289
- const selectableCount = selectableRows.length;
293
+ const selectableCount = selectableRows_0.length;
290
294
  const allSelected = selectableCount > 0 && selectedCount === selectableCount;
291
295
  const someSelected = selectedCount > 0 && !allSelected;
292
296
  let t13;
293
297
  if ($[47] !== selectedRows || $[48] !== setSelectedRows) {
294
- t13 = function toggleRowSelection(row_5) {
295
- if (!row_5.selectable) return;
298
+ t13 = function toggleRowSelection(row_8) {
299
+ if (!row_8.selectable) return;
296
300
  const nextSelectedRows_0 = new Set(selectedRows);
297
- if (nextSelectedRows_0.has(row_5.selectionId)) nextSelectedRows_0.delete(row_5.selectionId);
298
- else nextSelectedRows_0.add(row_5.selectionId);
301
+ if (nextSelectedRows_0.has(row_8.selectionId)) nextSelectedRows_0.delete(row_8.selectionId);
302
+ else nextSelectedRows_0.add(row_8.selectionId);
299
303
  setSelectedRows(nextSelectedRows_0);
300
304
  };
301
305
  $[47] = selectedRows;
@@ -303,109 +307,133 @@ function useTable(t0) {
303
307
  $[49] = t13;
304
308
  } else t13 = $[49];
305
309
  const toggleRowSelection = t13;
306
- let t14;
307
- if ($[50] !== allSelected || $[51] !== selectableRows || $[52] !== selectedRows || $[53] !== setSelectedRows) {
308
- t14 = function toggleAllRows() {
309
- if (selectableRows.length === 0) return;
310
+ let toggleAllRows;
311
+ let toggleGroupSelection;
312
+ if ($[50] !== allSelected || $[51] !== selectableRows_0 || $[52] !== selectedRows || $[53] !== setSelectedRows) {
313
+ toggleAllRows = function toggleAllRows() {
314
+ toggleRowsSelection(selectableRows_0, allSelected);
315
+ };
316
+ toggleGroupSelection = function toggleGroupSelection(group_0) {
317
+ toggleRowsSelection(group_0.rows.filter(_temp9), group_0.selection === "all");
318
+ };
319
+ function toggleRowsSelection(rows_2, allSelected_0) {
320
+ if (rows_2.length === 0) return;
310
321
  const nextSelectedRows_1 = new Set(selectedRows);
311
- for (const row_6 of selectableRows) if (allSelected) nextSelectedRows_1.delete(row_6.selectionId);
312
- else nextSelectedRows_1.add(row_6.selectionId);
322
+ for (const row_10 of rows_2) if (allSelected_0) nextSelectedRows_1.delete(row_10.selectionId);
323
+ else nextSelectedRows_1.add(row_10.selectionId);
313
324
  setSelectedRows(nextSelectedRows_1);
314
- };
325
+ }
315
326
  $[50] = allSelected;
316
- $[51] = selectableRows;
327
+ $[51] = selectableRows_0;
317
328
  $[52] = selectedRows;
318
329
  $[53] = setSelectedRows;
319
- $[54] = t14;
320
- } else t14 = $[54];
321
- const toggleAllRows = t14;
322
- let t15;
323
- if ($[55] !== collapsibleGroups || $[56] !== expandedGroups || $[57] !== setExpandedGroups) {
324
- t15 = function toggleGroupExpansion(group_0) {
330
+ $[54] = toggleAllRows;
331
+ $[55] = toggleGroupSelection;
332
+ } else {
333
+ toggleAllRows = $[54];
334
+ toggleGroupSelection = $[55];
335
+ }
336
+ let t14;
337
+ if ($[56] !== collapsibleGroups || $[57] !== expandedGroups || $[58] !== setExpandedGroups) {
338
+ t14 = function toggleGroupExpansion(group_1) {
325
339
  if (!collapsibleGroups) return;
326
340
  const nextExpandedGroups_0 = new Set(expandedGroups);
327
- if (nextExpandedGroups_0.has(group_0.id)) nextExpandedGroups_0.delete(group_0.id);
328
- else nextExpandedGroups_0.add(group_0.id);
341
+ if (nextExpandedGroups_0.has(group_1.id)) nextExpandedGroups_0.delete(group_1.id);
342
+ else nextExpandedGroups_0.add(group_1.id);
329
343
  setExpandedGroups(nextExpandedGroups_0);
330
344
  };
331
- $[55] = collapsibleGroups;
332
- $[56] = expandedGroups;
333
- $[57] = setExpandedGroups;
334
- $[58] = t15;
335
- } else t15 = $[58];
336
- const toggleGroupExpansion = t15;
337
- let t16;
338
- if ($[59] !== setSelectedRows) {
339
- t16 = () => {
345
+ $[56] = collapsibleGroups;
346
+ $[57] = expandedGroups;
347
+ $[58] = setExpandedGroups;
348
+ $[59] = t14;
349
+ } else t14 = $[59];
350
+ const toggleGroupExpansion = t14;
351
+ let t15;
352
+ if ($[60] !== setSelectedRows) {
353
+ t15 = () => {
340
354
  setSelectedRows(/* @__PURE__ */ new Set());
341
355
  };
342
- $[59] = setSelectedRows;
343
- $[60] = t16;
344
- } else t16 = $[60];
345
- let t17;
346
- if ($[61] !== sortBy || $[62] !== t16 || $[63] !== toggleAllRows || $[64] !== toggleGroupExpansion || $[65] !== toggleRowSelection) {
347
- t17 = {
356
+ $[60] = setSelectedRows;
357
+ $[61] = t15;
358
+ } else t15 = $[61];
359
+ let t16;
360
+ if ($[62] !== sortBy || $[63] !== t15 || $[64] !== toggleAllRows || $[65] !== toggleGroupExpansion || $[66] !== toggleGroupSelection || $[67] !== toggleRowSelection) {
361
+ t16 = {
348
362
  sortBy,
349
363
  toggleRowSelection,
350
364
  toggleAllRows,
365
+ toggleGroupSelection,
351
366
  toggleGroupExpansion,
352
- clearSelection: t16
367
+ clearSelection: t15
353
368
  };
354
- $[61] = sortBy;
355
- $[62] = t16;
356
- $[63] = toggleAllRows;
357
- $[64] = toggleGroupExpansion;
358
- $[65] = toggleRowSelection;
359
- $[66] = t17;
360
- } else t17 = $[66];
361
- const t18 = `${tableId}-selection-column`;
362
- let t19;
363
- if ($[67] !== allSelected || $[68] !== effectiveSelectedRows || $[69] !== selectableCount || $[70] !== selectedCount || $[71] !== someSelected || $[72] !== t18) {
364
- t19 = {
365
- headerId: t18,
369
+ $[62] = sortBy;
370
+ $[63] = t15;
371
+ $[64] = toggleAllRows;
372
+ $[65] = toggleGroupExpansion;
373
+ $[66] = toggleGroupSelection;
374
+ $[67] = toggleRowSelection;
375
+ $[68] = t16;
376
+ } else t16 = $[68];
377
+ const t17 = `${tableId}-selection-column`;
378
+ let t18;
379
+ if ($[69] !== allSelected || $[70] !== effectiveSelectedRows || $[71] !== selectableCount || $[72] !== selectedCount || $[73] !== someSelected || $[74] !== t17) {
380
+ t18 = {
381
+ headerId: t17,
366
382
  selectedRows: effectiveSelectedRows,
367
383
  allSelected,
368
384
  someSelected,
369
385
  selectableCount,
370
386
  selectedCount
371
387
  };
372
- $[67] = allSelected;
373
- $[68] = effectiveSelectedRows;
374
- $[69] = selectableCount;
375
- $[70] = selectedCount;
376
- $[71] = someSelected;
377
- $[72] = t18;
378
- $[73] = t19;
379
- } else t19 = $[73];
380
- let t20;
381
- if ($[74] !== bodies || $[75] !== gridTemplateColumns || $[76] !== headers || $[77] !== t17 || $[78] !== t19) {
382
- t20 = {
388
+ $[69] = allSelected;
389
+ $[70] = effectiveSelectedRows;
390
+ $[71] = selectableCount;
391
+ $[72] = selectedCount;
392
+ $[73] = someSelected;
393
+ $[74] = t17;
394
+ $[75] = t18;
395
+ } else t18 = $[75];
396
+ let t19;
397
+ if ($[76] !== bodies || $[77] !== gridTemplateColumns || $[78] !== headers || $[79] !== t16 || $[80] !== t18) {
398
+ t19 = {
383
399
  headers,
384
- actions: t17,
385
- selection: t19,
400
+ actions: t16,
401
+ selection: t18,
386
402
  gridTemplateColumns,
387
403
  bodies
388
404
  };
389
- $[74] = bodies;
390
- $[75] = gridTemplateColumns;
391
- $[76] = headers;
392
- $[77] = t17;
393
- $[78] = t19;
394
- $[79] = t20;
395
- } else t20 = $[79];
396
- return t20;
405
+ $[76] = bodies;
406
+ $[77] = gridTemplateColumns;
407
+ $[78] = headers;
408
+ $[79] = t16;
409
+ $[80] = t18;
410
+ $[81] = t19;
411
+ } else t19 = $[81];
412
+ return t19;
413
+ }
414
+ function _temp9(row_9) {
415
+ return row_9.selectable;
416
+ }
417
+ function _temp8(row_7) {
418
+ return row_7.selectionId;
397
419
  }
398
- function _temp5(row_4) {
399
- return row_4.selectionId;
420
+ function _temp7(row_6) {
421
+ return row_6.selected;
422
+ }
423
+ function _temp6(row_5) {
424
+ return row_5.selectable;
425
+ }
426
+ function _temp5(body_0) {
427
+ return body_0.rows;
400
428
  }
401
429
  function _temp4(row_3) {
402
430
  return row_3.selected;
403
431
  }
404
- function _temp3(row_2) {
405
- return row_2.selectable;
432
+ function _temp3(row_4) {
433
+ return row_4.selected;
406
434
  }
407
- function _temp2(body_0) {
408
- return body_0.rows;
435
+ function _temp2(row_2) {
436
+ return row_2.selectable;
409
437
  }
410
438
  function _temp(group) {
411
439
  return group.groupId;
@@ -26,6 +26,7 @@ const menuScrollMargins = {
26
26
  endMargin: 8
27
27
  };
28
28
  function FilteredActionList({ loading = false, placeholderText, filterValue: externalFilterValue, loadingType = FilteredActionListLoadingTypes.bodySpinner, onFilterChange, onListContainerRefChanged, onInputRefChanged, items, textInputProps, inputRef: providedInputRef, scrollContainerRef: providedScrollContainerRef, groupMetadata, showItemDividers, message, messageText, className, selectionVariant, announcementsEnabled = true, fullScreenOnNarrow, onSelectAllChange, actionListProps, focusOutBehavior = "wrap", _PrivateFocusManagement = "active-descendant", onActiveDescendantChanged, disableSelectOnHover = false, setInitialFocus = false, focusPrependedElements, scrollBehavior, virtualized = false, ...listProps }) {
29
+ var _readScrollContainerR;
29
30
  if (virtualized && groupMetadata !== null && groupMetadata !== void 0 && groupMetadata.length) console.warn("FilteredActionList: `virtualized` has no effect when `groupMetadata` is provided. Grouped lists are rendered without virtualization.");
30
31
  const isVirtualized = virtualized && !(groupMetadata !== null && groupMetadata !== void 0 && groupMetadata.length);
31
32
  const [filterValue, setInternalFilterValue] = useProvidedStateOrCreate(externalFilterValue, void 0, "");
@@ -207,10 +208,13 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
207
208
  const handleSelectAllChange = useCallback((e) => {
208
209
  if (onSelectAllChange) onSelectAllChange(e.target.checked);
209
210
  }, [onSelectAllChange]);
211
+ const bodyLoaderHeight = loading && loadingType.appearsInBody ? (_readScrollContainerR = readScrollContainerRef.current) === null || _readScrollContainerR === void 0 ? void 0 : _readScrollContainerR.clientHeight : void 0;
212
+ const showBodyLoader = bodyLoaderHeight !== void 0;
213
+ const isListRendered = !showBodyLoader && !message;
210
214
  function getBodyContent() {
211
- if (loading && readScrollContainerRef.current && loadingType.appearsInBody) return /* @__PURE__ */ jsx(FilteredActionListBodyLoader, {
215
+ if (showBodyLoader) return /* @__PURE__ */ jsx(FilteredActionListBodyLoader, {
212
216
  loadingType,
213
- height: readScrollContainerRef.current.clientHeight
217
+ height: bodyLoaderHeight
214
218
  });
215
219
  if (message) return message;
216
220
  let firstGroupIndex = 0;
@@ -309,7 +313,7 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
309
313
  onInputKeyPress,
310
314
  onInputKeyDown: usingRovingTabindex ? onInputKeyDown : void 0,
311
315
  placeholderText,
312
- listId,
316
+ listId: isListRendered ? listId : void 0,
313
317
  inputDescriptionTextId,
314
318
  loading: loading && !loadingType.appearsInBody,
315
319
  fullScreenOnNarrow,
@@ -9,7 +9,8 @@ interface FilteredActionListInputProps extends Partial<Omit<TextInputProps, 'onC
9
9
  onInputKeyPress?: React.KeyboardEventHandler<HTMLInputElement>;
10
10
  onInputKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
11
11
  placeholderText?: string;
12
- listId: string;
12
+ /** ID of the rendered list. Omit it while the list is not rendered. */
13
+ listId?: string;
13
14
  inputDescriptionTextId: string;
14
15
  loading: boolean;
15
16
  fullScreenOnNarrow?: boolean;
@@ -5,7 +5,7 @@ import { jsx } from "react/jsx-runtime";
5
5
  import { clsx } from "clsx";
6
6
  //#region src/FilteredActionList/FilteredActionListInput.tsx
7
7
  function FilteredActionListInput(t0) {
8
- const $ = c(34);
8
+ const $ = c(35);
9
9
  let className;
10
10
  let fullScreenOnNarrow;
11
11
  let inputDescriptionTextId;
@@ -64,16 +64,17 @@ function FilteredActionListInput(t0) {
64
64
  $[16] = onInputFocus;
65
65
  $[17] = t1;
66
66
  } else t1 = $[17];
67
- let t2;
67
+ const t2 = listId !== void 0;
68
+ let t3;
68
69
  if ($[18] !== className || $[19] !== fullScreenOnNarrow) {
69
- t2 = clsx(className, { [FilteredActionList_module_css_default.FullScreenTextInput]: fullScreenOnNarrow });
70
+ t3 = clsx(className, { [FilteredActionList_module_css_default.FullScreenTextInput]: fullScreenOnNarrow });
70
71
  $[18] = className;
71
72
  $[19] = fullScreenOnNarrow;
72
- $[20] = t2;
73
- } else t2 = $[20];
74
- let t3;
75
- if ($[21] !== inputDescriptionTextId || $[22] !== inputRef || $[23] !== listId || $[24] !== loading || $[25] !== onInputChange || $[26] !== onInputKeyDown || $[27] !== onInputKeyPress || $[28] !== placeholderText || $[29] !== restTextInputProps || $[30] !== t1 || $[31] !== t2 || $[32] !== value) {
76
- t3 = /* @__PURE__ */ jsx("div", {
73
+ $[20] = t3;
74
+ } else t3 = $[20];
75
+ let t4;
76
+ if ($[21] !== inputDescriptionTextId || $[22] !== inputRef || $[23] !== listId || $[24] !== loading || $[25] !== onInputChange || $[26] !== onInputKeyDown || $[27] !== onInputKeyPress || $[28] !== placeholderText || $[29] !== restTextInputProps || $[30] !== t1 || $[31] !== t2 || $[32] !== t3 || $[33] !== value) {
77
+ t4 = /* @__PURE__ */ jsx("div", {
77
78
  className: FilteredActionList_module_css_default.Header,
78
79
  "data-component": "FilteredActionList.Header",
79
80
  children: /* @__PURE__ */ jsx(TextInput_default, {
@@ -88,14 +89,14 @@ function FilteredActionListInput(t0) {
88
89
  onKeyDown: onInputKeyDown,
89
90
  placeholder: placeholderText,
90
91
  role: "combobox",
91
- "aria-expanded": "true",
92
+ "aria-expanded": t2,
92
93
  "aria-autocomplete": "list",
93
94
  "aria-controls": listId,
94
95
  "aria-label": placeholderText,
95
96
  "aria-describedby": inputDescriptionTextId,
96
97
  loaderPosition: "leading",
97
98
  loading,
98
- className: t2,
99
+ className: t3,
99
100
  ...restTextInputProps
100
101
  })
101
102
  });
@@ -110,10 +111,11 @@ function FilteredActionListInput(t0) {
110
111
  $[29] = restTextInputProps;
111
112
  $[30] = t1;
112
113
  $[31] = t2;
113
- $[32] = value;
114
- $[33] = t3;
115
- } else t3 = $[33];
116
- return t3;
114
+ $[32] = t3;
115
+ $[33] = value;
116
+ $[34] = t4;
117
+ } else t4 = $[34];
118
+ return t4;
117
119
  }
118
120
  //#endregion
119
121
  export { FilteredActionListInput };
@@ -0,0 +1,2 @@
1
+ .prc-SegmentedControl-SegmentedControl-lqIXp{--segmented-control-icon-width:32px;--segmented-control-outer-radius:var(--borderRadius-medium,0.375rem);background-color:var(--controlTrack-bgColor-rest,#e6eaef);border:var(--borderWidth-thin,.0625rem) solid var(--controlTrack-borderColor-rest,transparent);border-radius:var(--borderRadius-medium,.375rem);display:inline-flex;font-size:var(--text-body-size-medium,.875rem);height:32px;margin:0;max-width:100%;padding:0;position:relative}@supports (anchor-name:--value){.prc-SegmentedControl-SegmentedControl-lqIXp:before{position-anchor:--segmented-control-current-item;background-color:var(--controlKnob-bgColor-rest,#fff);border:var(--borderWidth-thin,.0625rem) solid var(--controlKnob-borderColor-rest,#d1d9e0);border-radius:var(--segmented-control-outer-radius);content:"";inset:anchor(top) anchor(right) anchor(bottom) anchor(left);position:absolute}@media (prefers-reduced-motion:no-preference){.prc-SegmentedControl-SegmentedControl-lqIXp:before{transition:inset var(--base-duration-200,[ object Object ]) var(--base-easing-easeInOut,.6,0,.2,1)}}.prc-SegmentedControl-SegmentedControl-lqIXp[data-disable-knob-transition]:before{transition:none}}.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width=true]{display:flex;width:100%;--segmented-control-icon-width:100%}.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width=false]{display:inline-flex;width:auto;--segmented-control-icon-width:32px}.prc-SegmentedControl-SegmentedControl-lqIXp>[data-component="SegmentedControl.Divider"]{align-self:stretch;background-color:var(--borderColor-default,#d1d9e0);display:none;list-style:none;margin-block:var(--base-size-8,.5rem);margin-inline-end:calc(var(--base-size-8,.5rem) - 1px);margin-inline-start:var(--base-size-8,.5rem);width:1px}@media (max-width:calc(48rem - 0.02px)){.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-narrow=true]{display:flex;width:100%;--segmented-control-icon-width:100%}.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-narrow=false]{display:inline-flex;width:auto;--segmented-control-icon-width:32px}}@media (min-width:48rem){.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-regular=true]{display:flex;width:100%;--segmented-control-icon-width:100%}.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-regular=false]{display:inline-flex;width:auto;--segmented-control-icon-width:32px}}@media (min-width:87.5rem){.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-wide=true]{display:flex;width:100%;--segmented-control-icon-width:100%}.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-regular=true]:not([data-full-width-wide=true]),.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-wide=false]{display:inline-flex;width:auto;--segmented-control-icon-width:32px}}.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant=dropdown]{display:none}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant=subtle]){--segmented-control-outer-radius:var(--borderRadius-large,0.75rem);--segmented-control-button-bg-inset:0px;--segmented-control-button-bgColor-hover:var(--button-invisible-bgColor-hover,#818b981a);background-color:transparent;border:0}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant=subtle]):before{display:none}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant=subtle]) .prc-SegmentedControl-Item-tSCQh:not(:last-child):after{background-color:transparent}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant=subtle])>[data-component="SegmentedControl.Divider"]{display:block}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant=subtle]) .prc-SegmentedControl-Button-E48xz{border:0;border-radius:var(--borderRadius-large,.75rem);color:var(--fgColor-muted,#59636e);padding:0}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant=subtle]) .prc-SegmentedControl-Button-E48xz .prc-SegmentedControl-Content-1COlk{border:0;padding-inline:var(--base-size-12,.75rem)}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant=subtle]) .prc-SegmentedControl-Button-E48xz[aria-pressed=true]{color:var(--fgColor-default,#1f2328)}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant=subtle]) .prc-SegmentedControl-Button-E48xz[aria-pressed=true] .prc-SegmentedControl-Content-1COlk{background-color:var(--bgColor-muted,#f6f8fa)}.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant=hideLabels] .prc-SegmentedControl-Text-7S2y2{display:none}@media (max-width:calc(48rem - 0.02px)){.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-narrow=dropdown],.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-narrow=hideLabels] .prc-SegmentedControl-Text-7S2y2{display:none}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-narrow=subtle]){--segmented-control-outer-radius:var(--borderRadius-large,0.75rem);--segmented-control-button-bg-inset:0px;--segmented-control-button-bgColor-hover:var(--button-invisible-bgColor-hover,#818b981a);background-color:transparent;border:0}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-narrow=subtle]):before{display:none}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-narrow=subtle]) .prc-SegmentedControl-Item-tSCQh:not(:last-child):after{background-color:transparent}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-narrow=subtle])>[data-component="SegmentedControl.Divider"]{display:block}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-narrow=subtle]) .prc-SegmentedControl-Button-E48xz{border:0;border-radius:var(--borderRadius-large,.75rem);color:var(--fgColor-muted,#59636e);padding:0}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-narrow=subtle]) .prc-SegmentedControl-Button-E48xz .prc-SegmentedControl-Content-1COlk{border:0;padding-inline:var(--base-size-12,.75rem)}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-narrow=subtle]) .prc-SegmentedControl-Button-E48xz[aria-pressed=true]{color:var(--fgColor-default,#1f2328)}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-narrow=subtle]) .prc-SegmentedControl-Button-E48xz[aria-pressed=true] .prc-SegmentedControl-Content-1COlk{background-color:var(--bgColor-muted,#f6f8fa)}}@media (min-width:48rem){.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-regular=dropdown],.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-regular=hideLabels] .prc-SegmentedControl-Text-7S2y2{display:none}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle]){--segmented-control-outer-radius:var(--borderRadius-large,0.75rem);--segmented-control-button-bg-inset:0px;--segmented-control-button-bgColor-hover:var(--button-invisible-bgColor-hover,#818b981a);background-color:transparent;border:0}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle]):before{display:none}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle]) .prc-SegmentedControl-Item-tSCQh:not(:last-child):after{background-color:transparent}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle])>[data-component="SegmentedControl.Divider"]{display:block}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle]) .prc-SegmentedControl-Button-E48xz{border:0;border-radius:var(--borderRadius-large,.75rem);color:var(--fgColor-muted,#59636e);padding:0}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle]) .prc-SegmentedControl-Button-E48xz .prc-SegmentedControl-Content-1COlk{border:0;padding-inline:var(--base-size-12,.75rem)}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle]) .prc-SegmentedControl-Button-E48xz[aria-pressed=true]{color:var(--fgColor-default,#1f2328)}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle]) .prc-SegmentedControl-Button-E48xz[aria-pressed=true] .prc-SegmentedControl-Content-1COlk{background-color:var(--bgColor-muted,#f6f8fa)}}@media (min-width:87.5rem){.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-wide=dropdown],.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-wide=hideLabels] .prc-SegmentedControl-Text-7S2y2{display:none}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-wide=subtle]){--segmented-control-outer-radius:var(--borderRadius-large,0.75rem);--segmented-control-button-bg-inset:0px;--segmented-control-button-bgColor-hover:var(--button-invisible-bgColor-hover,#818b981a);background-color:transparent;border:0}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-wide=subtle]):before{display:none}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-wide=subtle]) .prc-SegmentedControl-Item-tSCQh:not(:last-child):after{background-color:transparent}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-wide=subtle])>[data-component="SegmentedControl.Divider"]{display:block}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-wide=subtle]) .prc-SegmentedControl-Button-E48xz{border:0;border-radius:var(--borderRadius-large,.75rem);color:var(--fgColor-muted,#59636e);padding:0}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-wide=subtle]) .prc-SegmentedControl-Button-E48xz .prc-SegmentedControl-Content-1COlk{border:0;padding-inline:var(--base-size-12,.75rem)}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-wide=subtle]) .prc-SegmentedControl-Button-E48xz[aria-pressed=true]{color:var(--fgColor-default,#1f2328)}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-wide=subtle]) .prc-SegmentedControl-Button-E48xz[aria-pressed=true] .prc-SegmentedControl-Content-1COlk{background-color:var(--bgColor-muted,#f6f8fa)}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle]):not([data-variant-wide=subtle]){--segmented-control-outer-radius:var(--borderRadius-medium,0.375rem);--segmented-control-button-bg-inset:4px;--segmented-control-button-bgColor-hover:var(--controlTrack-bgColor-hover,#e0e6eb);background-color:var(--controlTrack-bgColor-rest,#e6eaef);border:var(--borderWidth-thin,.0625rem) solid var(--controlTrack-borderColor-rest,transparent)}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle]):not([data-variant-wide=subtle]):before{display:block}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle]):not([data-variant-wide=subtle]) .prc-SegmentedControl-Item-tSCQh:not(:last-child):after{background-color:var(--borderColor-default,#d1d9e0)}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle]):not([data-variant-wide=subtle])>[data-component="SegmentedControl.Divider"]{display:none}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle]):not([data-variant-wide=subtle]) .prc-SegmentedControl-Button-E48xz{border-radius:var(--segmented-control-outer-radius);color:currentColor;padding:var(--segmented-control-button-bg-inset)}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle]):not([data-variant-wide=subtle]) .prc-SegmentedControl-Button-E48xz .prc-SegmentedControl-Content-1COlk{border:var(--borderWidth-thin,.0625rem) solid transparent;padding-inline:calc(var(--segmented-control-button-inner-padding) - var(--segmented-control-button-bg-inset))}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle]):not([data-variant-wide=subtle]) .prc-SegmentedControl-Button-E48xz[aria-pressed=true]{color:currentColor;padding:0}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-variant-regular=subtle]):not([data-variant-wide=subtle]) .prc-SegmentedControl-Button-E48xz[aria-pressed=true] .prc-SegmentedControl-Content-1COlk{background-color:transparent;padding-inline:var(--segmented-control-button-inner-padding)}}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-size=small]){font-size:var(--text-body-size-small,.75rem);height:28px}.prc-SegmentedControl-DropdownGroup-9SmpX{--segmented-control-action-size:32px;--segmented-control-list-flex:0 1 auto;align-items:center;display:inline-flex;gap:var(--base-size-4,.25rem)}.prc-SegmentedControl-DropdownGroup-9SmpX[data-full-width=true]{width:100%;--segmented-control-list-flex:1 1 auto}.prc-SegmentedControl-DropdownGroup-9SmpX[data-full-width=false]{width:auto}@media (max-width:calc(48rem - 0.02px)){.prc-SegmentedControl-DropdownGroup-9SmpX[data-full-width-narrow=true]{width:100%;--segmented-control-list-flex:1 1 auto}.prc-SegmentedControl-DropdownGroup-9SmpX[data-full-width-narrow=false]{width:auto}}@media (min-width:48rem){.prc-SegmentedControl-DropdownGroup-9SmpX[data-full-width-regular=true]{width:100%;--segmented-control-list-flex:1 1 auto}.prc-SegmentedControl-DropdownGroup-9SmpX[data-full-width-regular=false]{width:auto}}@media (min-width:87.5rem){.prc-SegmentedControl-DropdownGroup-9SmpX[data-full-width-wide=true]{width:100%;--segmented-control-list-flex:1 1 auto}.prc-SegmentedControl-DropdownGroup-9SmpX[data-full-width-wide=false]{width:auto}.prc-SegmentedControl-DropdownGroup-9SmpX[data-full-width-regular=true]:not([data-full-width-wide=true]){width:auto;--segmented-control-list-flex:0 1 auto}}.prc-SegmentedControl-DropdownGroup-9SmpX[data-size=small]{--segmented-control-action-size:28px}.prc-SegmentedControl-DropdownGroup-9SmpX>.prc-SegmentedControl-SegmentedControl-lqIXp{flex:var(--segmented-control-list-flex);min-width:0}.prc-SegmentedControl-InlineAction-4qmw0{display:flex}.prc-SegmentedControl-InlineAction-4qmw0[data-variant=dropdown]{display:none}@media (max-width:calc(48rem - 0.02px)){.prc-SegmentedControl-InlineAction-4qmw0[data-variant-narrow=dropdown]{display:none}}@media (min-width:48rem){.prc-SegmentedControl-InlineAction-4qmw0[data-variant-regular=dropdown]{display:none}}@media (min-width:87.5rem){.prc-SegmentedControl-InlineAction-4qmw0[data-variant-wide=dropdown]{display:none}}.prc-SegmentedControl-DropdownContainer-ZaPMn{display:none}.prc-SegmentedControl-DropdownContainer-ZaPMn[data-variant=dropdown]{display:block}@media (max-width:calc(48rem - 0.02px)){.prc-SegmentedControl-DropdownContainer-ZaPMn[data-variant-narrow=dropdown]{display:block}}@media (min-width:48rem){.prc-SegmentedControl-DropdownContainer-ZaPMn[data-variant-regular=dropdown]{display:block}}@media (min-width:87.5rem){.prc-SegmentedControl-DropdownContainer-ZaPMn[data-variant-wide=dropdown]{display:block}}.prc-SegmentedControl-Item-tSCQh{display:block;flex-grow:1;margin-bottom:-1px;margin-top:-1px;position:relative}.prc-SegmentedControl-Item-tSCQh:not(:last-child){margin-right:1px}.prc-SegmentedControl-Item-tSCQh:not(:last-child):after{background-color:var(--borderColor-default,#d1d9e0);bottom:var(--base-size-8,.5rem);content:"";position:absolute;right:calc(var(--base-size-2,.125rem)*-1);top:var(--base-size-8,.5rem);width:1px}.prc-SegmentedControl-Item-tSCQh:not(:last-child):has(+:where([data-component="SegmentedControl.Divider"])+:where([data-selected])):after,.prc-SegmentedControl-Item-tSCQh:not(:last-child):has(+[data-selected]):after,.prc-SegmentedControl-Item-tSCQh:not(:last-child):where([data-selected]):after{background-color:transparent}.prc-SegmentedControl-Item-tSCQh:first-child{margin-left:-1px}.prc-SegmentedControl-Item-tSCQh:last-child{margin-right:-1px}.prc-SegmentedControl-Item-tSCQh .prc-SegmentedControl-Counter-GmZOI{grid-column:3;margin-inline-start:var(--base-size-8,.5rem)}.prc-SegmentedControl-ActionItem-2V1ou,.prc-SegmentedControl-Item-tSCQh .prc-SegmentedControl-Counter-GmZOI{align-items:center;display:flex}.prc-SegmentedControl-ActionItem-2V1ou{margin-inline-start:0}.prc-SegmentedControl-ActionButton-Q5fnw{height:var(--segmented-control-action-size);padding:0;width:var(--segmented-control-action-size)}.prc-SegmentedControl-Button-E48xz{--segmented-control-button-inner-padding:12px;--segmented-control-button-bg-inset:4px;background-color:transparent;border-color:transparent;border-radius:var(--segmented-control-outer-radius);border-width:0;color:currentColor;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:var(--base-text-weight-normal,400);height:100%;padding:var(--segmented-control-button-bg-inset);width:100%}.prc-SegmentedControl-Button-E48xz svg{fill:var(--fgColor-muted,#59636e);color:var(--fgColor-muted,#59636e)}.prc-SegmentedControl-Button-E48xz:focus:not(:disabled){box-shadow:none;outline:var(--base-size-2,.125rem) solid var(--fgColor-accent,#0969da);outline-offset:-1px}.prc-SegmentedControl-Button-E48xz:focus:not(:disabled):not(:focus-visible){outline:1px solid transparent}.prc-SegmentedControl-Button-E48xz:focus-visible:not(:disabled){box-shadow:none;outline:var(--base-size-2,.125rem) solid var(--fgColor-accent,#0969da);outline-offset:-1px}.prc-SegmentedControl-Button-E48xz:focus:focus-visible:not(:last-child):after{width:0}.prc-SegmentedControl-Button-E48xz[aria-disabled=true]:not([aria-pressed=true]){background-color:transparent;color:var(--fgColor-disabled,#818b98);cursor:not-allowed}.prc-SegmentedControl-Button-E48xz[aria-disabled=true]:not([aria-pressed=true]) svg{fill:var(--fgColor-disabled,#818b98);color:var(--fgColor-disabled,#818b98)}@media (pointer:coarse){.prc-SegmentedControl-Button-E48xz:before{content:"";left:0;min-height:44px;position:absolute;right:0;top:50%;transform:translateY(-50%)}}.prc-SegmentedControl-IconButton-tlzDE{width:var(--segmented-control-icon-width,32px)}.prc-SegmentedControl-Content-1COlk{align-items:center;background-color:transparent;border-color:transparent;border-radius:calc(var(--segmented-control-outer-radius) - var(--segmented-control-button-bg-inset)/2);border-style:solid;border-width:var(--borderWidth-thin,.0625rem);display:grid;grid-template-columns:auto minmax(0,max-content) auto;height:100%;justify-content:center;padding-left:calc(var(--segmented-control-button-inner-padding) - var(--segmented-control-button-bg-inset));padding-right:calc(var(--segmented-control-button-inner-padding) - var(--segmented-control-button-bg-inset));transition:background-color var(--base-duration-200,[ object Object ]) var(--base-easing-easeInOut,.6,0,.2,1)}.prc-SegmentedControl-Button-E48xz[aria-pressed=true]{font-weight:var(--base-text-weight-semibold,600);padding:0}.prc-SegmentedControl-Button-E48xz[aria-pressed=true] .prc-SegmentedControl-Content-1COlk{padding-left:var(--segmented-control-button-inner-padding);padding-right:var(--segmented-control-button-inner-padding);anchor-name:--segmented-control-current-item}@supports not (anchor-name:--value){.prc-SegmentedControl-Button-E48xz[aria-pressed=true] .prc-SegmentedControl-Content-1COlk{background-color:var(--controlKnob-bgColor-rest,#fff);border-color:var(--controlKnob-borderColor-rest,#d1d9e0);border-radius:var(--segmented-control-outer-radius)}}.prc-SegmentedControl-Button-E48xz:not([aria-pressed=true],[aria-disabled=true]):hover .prc-SegmentedControl-Content-1COlk{background-color:var(--segmented-control-button-bgColor-hover,var(--controlTrack-bgColor-hover,#e0e6eb))}.prc-SegmentedControl-Button-E48xz:not([aria-pressed=true],[aria-disabled=true]):active .prc-SegmentedControl-Content-1COlk{background-color:var(--controlTrack-bgColor-active,#dae0e7)}.prc-SegmentedControl-Text-7S2y2{grid-column:2;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.prc-SegmentedControl-Text-7S2y2:after{content:attr(data-text);display:block;font-weight:var(--base-text-weight-semibold,600);height:0;overflow:hidden;pointer-events:none;-webkit-user-select:none;user-select:none;visibility:hidden}.prc-SegmentedControl-LeadingIcon-74n5s{grid-column:1;margin-right:var(--base-size-4,.25rem)}
2
+ /*# sourceMappingURL=SegmentedControl-3dc28307.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/SegmentedControl/SegmentedControl.module.css.js"],"names":[],"mappings":"AA0FA,6CAEE,mCAAoC,CACpC,oEAA4D,CAU5D,yDAAkD,CAClD,8FAAuF,CACvF,gDAAyC,CAVzC,mBAAoB,CAOpB,8CAAuC,CAHvC,WAAY,CAEZ,QAAS,CALT,cAAe,CAIf,SAAU,CAM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AFX,MAAO,CACP,eAAgB,CAJhB,iBAAkB,CAElB,OAAQ,CADR,OAAQ,CAKR,0BACF,CACF,CAGF,uCACE,8CACF,CAEA,oCAoBE,kBAAmB,CATnB,4BAA6B,CAH7B,wBAAyB,CAWzB,sGAAyG,CAVzG,kBAAmB,CACnB,6CAAqC,CATrC,YAAa,CACb,qDAAuD,CACvD,WAAY,CAkBZ,sBAAuB,CAdvB,2GAA4G,CAF5G,4GAA6G,CAO7G,6GAUF,CAEA,sDAEE,gDAA6C,CAD7C,SAiBF,CAdE,0FAIE,0DAA2D,CAF3D,2DAA4D,CAG5D,4CAQF,CANE,oCAPF,0FAQI,qDAAiD,CACjD,wDAAiD,CAEjD,mDAEJ,CADE,CAKF,2HAEE,wGACF,CAEA,4HACE,2DACF,CAGF,iCACE,aAAc,CACd,WAAY,CACZ,eAAgB,CAChB,sBAAuB,CACvB,kBACF,CAEA,uCAOE,uBAAwB,CANxB,aAAc,CAGd,gDAA6C,CAF7C,QAAS,CACT,eAAgB,CAEhB,mBAAoB,CAGpB,wBAAiB,CAAjB,gBAAiB,CAFjB,iBAGF,CAEA,wCACE,aAAc,CACd,sCACF","file":"SegmentedControl-3dc28307.css","sourcesContent":["@define-mixin subtleVariant {\n --segmented-control-outer-radius: var(--borderRadius-large);\n --segmented-control-button-bg-inset: 0px;\n --segmented-control-button-bgColor-hover: var(--button-invisible-bgColor-hover);\n\n background-color: transparent;\n border: 0;\n\n /* stylelint-disable-next-line nesting-selector-no-missing-scoping-root */\n &::before {\n display: none;\n }\n\n .Item:not(:last-child)::after {\n background-color: transparent;\n }\n\n > [data-component='SegmentedControl.Divider'] {\n display: block;\n }\n\n .Button {\n padding: 0;\n color: var(--fgColor-muted);\n border: 0;\n border-radius: var(--borderRadius-large);\n\n .Content {\n padding-inline: var(--base-size-12);\n border: 0;\n }\n }\n\n .Button[aria-pressed='true'] {\n color: var(--fgColor-default);\n\n .Content {\n background-color: var(--bgColor-muted);\n }\n }\n}\n\n@define-mixin defaultVariant {\n --segmented-control-outer-radius: var(--borderRadius-medium);\n --segmented-control-button-bg-inset: 4px;\n --segmented-control-button-bgColor-hover: var(--controlTrack-bgColor-hover);\n\n background-color: var(--controlTrack-bgColor-rest);\n border: var(--borderWidth-thin) solid var(--controlTrack-borderColor-rest, transparent);\n\n /* stylelint-disable-next-line nesting-selector-no-missing-scoping-root */\n &::before {\n display: block;\n }\n\n .Item:not(:last-child)::after {\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--borderColor-default);\n }\n\n > [data-component='SegmentedControl.Divider'] {\n display: none;\n }\n\n .Button {\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--segmented-control-button-bg-inset);\n color: currentColor;\n /* stylelint-disable-next-line primer/borders */\n border-radius: var(--segmented-control-outer-radius);\n\n .Content {\n /* stylelint-disable-next-line primer/spacing */\n padding-inline: calc(var(--segmented-control-button-inner-padding) - var(--segmented-control-button-bg-inset));\n border: var(--borderWidth-thin) solid transparent;\n }\n }\n\n .Button[aria-pressed='true'] {\n padding: 0;\n color: currentColor;\n\n .Content {\n /* stylelint-disable-next-line primer/spacing */\n padding-inline: var(--segmented-control-button-inner-padding);\n background-color: transparent;\n }\n }\n}\n\n.SegmentedControl {\n /* TODO: use primitive `control.medium.size` when it is available instead of '32px' */\n --segmented-control-icon-width: 32px;\n --segmented-control-outer-radius: var(--borderRadius-medium);\n\n display: inline-flex;\n max-width: 100%;\n\n /* TODO: use primitive `control.{small|medium}.size` when it is available */\n height: 32px;\n padding: 0;\n margin: 0;\n font-size: var(--text-body-size-medium);\n background-color: var(--controlTrack-bgColor-rest);\n border: var(--borderWidth-thin) solid var(--controlTrack-borderColor-rest, transparent);\n border-radius: var(--borderRadius-medium);\n position: relative;\n\n @supports (anchor-name: --value) {\n &::before {\n position-anchor: --segmented-control-current-item;\n content: '';\n position: absolute;\n inset: anchor(top) anchor(right) anchor(bottom) anchor(left);\n background-color: var(--controlKnob-bgColor-rest);\n border: var(--borderWidth-thin) solid var(--controlKnob-borderColor-rest);\n /* stylelint-disable-next-line primer/borders */\n border-radius: var(--segmented-control-outer-radius);\n\n @media (prefers-reduced-motion: no-preference) {\n transition: inset var(--base-duration-200) var(--base-easing-easeInOut);\n }\n }\n\n &[data-disable-knob-transition]::before {\n transition: none;\n }\n }\n\n /* Responsive full-width */\n &[data-full-width='true'] {\n display: flex;\n width: 100%;\n\n --segmented-control-icon-width: 100%;\n }\n\n &[data-full-width='false'] {\n display: inline-flex;\n width: auto;\n\n --segmented-control-icon-width: 32px;\n }\n\n > [data-component='SegmentedControl.Divider'] {\n display: none;\n align-self: stretch;\n width: 1px;\n margin-block: var(--base-size-8);\n margin-inline-start: var(--base-size-8);\n /* stylelint-disable-next-line primer/spacing -- preserve the previous divider's 16px layout footprint */\n margin-inline-end: calc(var(--base-size-8) - 1px);\n list-style: none;\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--borderColor-default);\n }\n\n @media (--viewportRange-narrow) {\n &[data-full-width-narrow='true'] {\n display: flex;\n width: 100%;\n\n --segmented-control-icon-width: 100%;\n }\n\n &[data-full-width-narrow='false'] {\n display: inline-flex;\n width: auto;\n\n --segmented-control-icon-width: 32px;\n }\n }\n\n @media (--viewportRange-regular) {\n &[data-full-width-regular='true'] {\n display: flex;\n width: 100%;\n\n --segmented-control-icon-width: 100%;\n }\n\n &[data-full-width-regular='false'] {\n display: inline-flex;\n width: auto;\n\n --segmented-control-icon-width: 32px;\n }\n }\n\n @media (--viewportRange-wide) {\n &[data-full-width-wide='true'] {\n display: flex;\n width: 100%;\n\n --segmented-control-icon-width: 100%;\n }\n\n &[data-full-width-wide='false'] {\n display: inline-flex;\n width: auto;\n\n --segmented-control-icon-width: 32px;\n }\n\n &[data-full-width-regular='true']:not([data-full-width-wide='true']) {\n display: inline-flex;\n width: auto;\n\n --segmented-control-icon-width: 32px;\n }\n }\n\n /* Hide when dropdown variant is active */\n &[data-variant='dropdown'] {\n display: none;\n }\n\n &:where([data-variant='subtle']) {\n @mixin subtleVariant;\n }\n\n /* Handle hideLabels variant - hide button text */\n &[data-variant='hideLabels'] .Text {\n display: none;\n }\n\n @media (--viewportRange-narrow) {\n &[data-variant-narrow='dropdown'] {\n display: none;\n }\n\n &[data-variant-narrow='hideLabels'] .Text {\n display: none;\n }\n\n &:where([data-variant-narrow='subtle']) {\n @mixin subtleVariant;\n }\n }\n\n @media (--viewportRange-regular) {\n &[data-variant-regular='dropdown'] {\n display: none;\n }\n\n &[data-variant-regular='hideLabels'] .Text {\n display: none;\n }\n\n &:where([data-variant-regular='subtle']) {\n @mixin subtleVariant;\n }\n }\n\n @media (--viewportRange-wide) {\n &[data-variant-wide='dropdown'] {\n display: none;\n }\n\n &[data-variant-wide='hideLabels'] .Text {\n display: none;\n }\n\n &:where([data-variant-wide='subtle']) {\n @mixin subtleVariant;\n }\n\n &:where([data-variant-regular='subtle']):not([data-variant-wide='subtle']) {\n @mixin defaultVariant;\n }\n }\n\n &:where([data-size='small']) {\n /* TODO: use primitive `control.{small|medium}.size` when it is available */\n height: 28px;\n font-size: var(--text-body-size-small);\n }\n}\n\n.DropdownGroup {\n --segmented-control-action-size: 32px;\n --segmented-control-list-flex: 0 1 auto;\n\n display: inline-flex;\n align-items: center;\n gap: var(--base-size-4);\n\n &[data-full-width='true'] {\n width: 100%;\n\n --segmented-control-list-flex: 1 1 auto;\n }\n\n &[data-full-width='false'] {\n width: auto;\n }\n\n @media (--viewportRange-narrow) {\n &[data-full-width-narrow='true'] {\n width: 100%;\n\n --segmented-control-list-flex: 1 1 auto;\n }\n\n &[data-full-width-narrow='false'] {\n width: auto;\n }\n }\n\n @media (--viewportRange-regular) {\n &[data-full-width-regular='true'] {\n width: 100%;\n\n --segmented-control-list-flex: 1 1 auto;\n }\n\n &[data-full-width-regular='false'] {\n width: auto;\n }\n }\n\n @media (--viewportRange-wide) {\n &[data-full-width-wide='true'] {\n width: 100%;\n\n --segmented-control-list-flex: 1 1 auto;\n }\n\n &[data-full-width-wide='false'] {\n width: auto;\n }\n\n &[data-full-width-regular='true']:not([data-full-width-wide='true']) {\n width: auto;\n\n --segmented-control-list-flex: 0 1 auto;\n }\n }\n\n &[data-size='small'] {\n --segmented-control-action-size: 28px;\n }\n\n > .SegmentedControl {\n min-width: 0;\n flex: var(--segmented-control-list-flex);\n }\n}\n\n.InlineAction {\n display: flex;\n\n &[data-variant='dropdown'] {\n display: none;\n }\n\n @media (--viewportRange-narrow) {\n &[data-variant-narrow='dropdown'] {\n display: none;\n }\n }\n\n @media (--viewportRange-regular) {\n &[data-variant-regular='dropdown'] {\n display: none;\n }\n }\n\n @media (--viewportRange-wide) {\n &[data-variant-wide='dropdown'] {\n display: none;\n }\n }\n}\n\n.DropdownContainer {\n display: none;\n\n /* Show when dropdown variant is active */\n &[data-variant='dropdown'] {\n display: block;\n }\n\n @media (--viewportRange-narrow) {\n &[data-variant-narrow='dropdown'] {\n display: block;\n }\n }\n\n @media (--viewportRange-regular) {\n &[data-variant-regular='dropdown'] {\n display: block;\n }\n }\n\n @media (--viewportRange-wide) {\n &[data-variant-wide='dropdown'] {\n display: block;\n }\n }\n}\n\n.Item {\n position: relative;\n display: block;\n /* stylelint-disable-next-line primer/spacing */\n margin-top: -1px;\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: -1px;\n flex-grow: 1;\n\n &:not(:last-child) {\n /* stylelint-disable-next-line primer/spacing */\n margin-right: 1px;\n\n &::after {\n position: absolute;\n top: var(--base-size-8);\n right: calc(-1 * var(--base-size-2));\n bottom: var(--base-size-8);\n width: 1px;\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--borderColor-default);\n }\n\n /* stylelint-disable-next-line selector-pseudo-class-disallowed-list -- scoped to CSS Module, audited (github/github-ui#17224) */\n &:has(+ [data-selected])::after,\n /* stylelint-disable-next-line selector-pseudo-class-disallowed-list -- account for a hidden divider in the default variant */\n &:has(+ :where([data-component='SegmentedControl.Divider']) + :where([data-selected]))::after,\n &:where([data-selected])::after {\n background-color: transparent;\n }\n }\n\n &:first-child {\n /* stylelint-disable-next-line primer/spacing */\n margin-left: -1px;\n }\n\n &:last-child {\n /* stylelint-disable-next-line primer/spacing */\n margin-right: -1px;\n }\n\n .Counter {\n grid-column: 3;\n margin-inline-start: var(--base-size-8);\n display: flex;\n align-items: center;\n }\n}\n\n.ActionItem {\n display: flex;\n align-items: center;\n margin-inline-start: 0;\n}\n\n.ActionButton {\n width: var(--segmented-control-action-size);\n height: var(--segmented-control-action-size);\n padding: 0;\n}\n\n.Button {\n /* TODO: use primitive `primer.control.medium.paddingInline.normal` when it is available */\n --segmented-control-button-inner-padding: 12px;\n --segmented-control-button-bg-inset: 4px;\n\n width: 100%;\n height: 100%;\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--segmented-control-button-bg-inset);\n font-family: inherit;\n font-size: inherit;\n font-weight: var(--base-text-weight-normal);\n color: currentColor;\n cursor: pointer;\n background-color: transparent;\n border-color: transparent;\n border-width: 0;\n /* stylelint-disable-next-line primer/borders */\n border-radius: var(--segmented-control-outer-radius);\n\n & svg {\n fill: var(--fgColor-muted);\n color: var(--fgColor-muted);\n }\n\n /* fallback :focus state */\n &:focus:not(:disabled) {\n outline: var(--base-size-2) solid var(--fgColor-accent);\n outline-offset: -1px;\n box-shadow: none;\n\n /* remove fallback :focus if :focus-visible is supported */\n &:not(:focus-visible) {\n outline: solid 1px transparent;\n }\n }\n\n /* default focus state */\n &:focus-visible:not(:disabled) {\n outline: var(--base-size-2) solid var(--fgColor-accent);\n outline-offset: -1px;\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line selector-max-specificity */\n &:focus:focus-visible:not(:last-child)::after {\n /* fixes an issue where the focus outline shows over the pseudo-element */\n width: 0;\n }\n\n &[aria-disabled='true']:not([aria-pressed='true']) {\n cursor: not-allowed;\n color: var(--fgColor-disabled);\n background-color: transparent;\n\n & svg {\n fill: var(--fgColor-disabled);\n color: var(--fgColor-disabled);\n }\n }\n\n @media (pointer: coarse) {\n &::before {\n position: absolute;\n top: 50%;\n right: 0;\n left: 0;\n min-height: 44px;\n content: '';\n transform: translateY(-50%);\n }\n }\n}\n\n.IconButton {\n width: var(--segmented-control-icon-width, 32px);\n}\n\n.Content {\n display: grid;\n grid-template-columns: auto minmax(0, max-content) auto;\n height: 100%;\n /* stylelint-disable-next-line primer/spacing */\n padding-right: calc(var(--segmented-control-button-inner-padding) - var(--segmented-control-button-bg-inset));\n /* stylelint-disable-next-line primer/spacing */\n padding-left: calc(var(--segmented-control-button-inner-padding) - var(--segmented-control-button-bg-inset));\n border-color: transparent;\n border-style: solid;\n border-width: var(--borderWidth-thin);\n background-color: transparent;\n transition: background-color var(--base-duration-200) var(--base-easing-easeInOut);\n\n /*\n innerRadius = outerRadius - distance/2\n https://stackoverflow.com/questions/2932146/math-problem-determine-the-corner-radius-of-an-inner-border-based-on-outer-corn\n */\n /* stylelint-disable-next-line primer/borders */\n border-radius: calc(var(--segmented-control-outer-radius) - var(--segmented-control-button-bg-inset) / 2);\n align-items: center;\n justify-content: center;\n}\n\n.Button[aria-pressed='true'] {\n padding: 0;\n font-weight: var(--base-text-weight-semibold);\n\n .Content {\n /* stylelint-disable-next-line primer/spacing */\n padding-right: var(--segmented-control-button-inner-padding);\n /* stylelint-disable-next-line primer/spacing */\n padding-left: var(--segmented-control-button-inner-padding);\n anchor-name: --segmented-control-current-item;\n\n @supports not (anchor-name: --value) {\n background-color: var(--controlKnob-bgColor-rest);\n border-color: var(--controlKnob-borderColor-rest);\n /* stylelint-disable-next-line primer/borders */\n border-radius: var(--segmented-control-outer-radius);\n }\n }\n}\n\n.Button:not([aria-pressed='true'], [aria-disabled='true']) {\n &:hover .Content {\n /* stylelint-disable-next-line primer/colors -- each variant supplies a semantic background token */\n background-color: var(--segmented-control-button-bgColor-hover, var(--controlTrack-bgColor-hover));\n }\n\n &:active .Content {\n background-color: var(--controlTrack-bgColor-active);\n }\n}\n\n.Text {\n grid-column: 2;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.Text::after {\n display: block;\n height: 0;\n overflow: hidden;\n font-weight: var(--base-text-weight-semibold);\n pointer-events: none;\n visibility: hidden;\n content: attr(data-text);\n user-select: none;\n}\n\n.LeadingIcon {\n grid-column: 1;\n margin-right: var(--base-size-4);\n}\n"]}
@@ -1,4 +1,4 @@
1
- import "./SegmentedControl-99b8e34e.css";
1
+ import "./SegmentedControl-3dc28307.css";
2
2
  //#region src/SegmentedControl/SegmentedControl.module.css.js
3
3
  var SegmentedControl_module_css_default = {
4
4
  "SegmentedControl": "prc-SegmentedControl-SegmentedControl-lqIXp",