@primer/react 0.0.0-20260601225305 → 0.0.0-20260601230721
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 -38
- package/dist/ActionList/ActionList-2a35a40c.css +2 -0
- package/dist/ActionList/ActionList-2a35a40c.css.map +1 -0
- package/dist/ActionList/ActionList.module.css.js +2 -2
- package/dist/ActionList/Item.d.ts.map +1 -1
- package/dist/ActionList/Item.js +118 -125
- package/dist/ActionList/LinkItem.d.ts +1 -1
- package/dist/ActionList/List.d.ts +11 -2
- package/dist/ActionList/List.d.ts.map +1 -1
- package/dist/ActionList/TrailingAction.d.ts.map +1 -1
- package/dist/ActionList/TrailingAction.js +0 -1
- package/dist/ActionList/Visuals.js +4 -6
- package/dist/ActionList/index.d.ts +24 -4
- package/dist/ActionList/index.d.ts.map +1 -1
- package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
- package/dist/ActionMenu/ActionMenu.js +8 -2
- package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay.js +2 -1
- package/dist/Autocomplete/AutocompleteInput.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteInput.js +2 -1
- package/dist/Autocomplete/AutocompleteOverlay.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteOverlay.js +1 -0
- package/dist/BranchName/BranchName.d.ts +4 -2
- package/dist/BranchName/BranchName.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +10 -4
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Button/{ButtonBase-311501b9.css → ButtonBase-713ecf3d.css} +2 -2
- package/dist/Button/{ButtonBase-311501b9.css.map → ButtonBase-713ecf3d.css.map} +1 -1
- package/dist/Button/ButtonBase.d.ts.map +1 -1
- package/dist/Button/ButtonBase.js +0 -1
- package/dist/Button/ButtonBase.module.css.js +1 -1
- package/dist/Card/Card.d.ts +14 -2
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/index.d.ts +7 -2
- package/dist/Card/index.d.ts.map +1 -1
- package/dist/KeybindingHint/KeybindingHint.d.ts +1 -6
- package/dist/KeybindingHint/KeybindingHint.d.ts.map +1 -1
- package/dist/KeybindingHint/KeybindingHint.js +2 -6
- package/dist/KeybindingHint/components/Chord.d.ts +1 -2
- package/dist/KeybindingHint/components/Chord.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Chord.js +1 -1
- package/dist/KeybindingHint/components/Key.js +10 -10
- package/dist/KeybindingHint/components/Sequence.d.ts +1 -2
- package/dist/KeybindingHint/components/Sequence.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Sequence.js +2 -2
- package/dist/KeybindingHint/key-names.d.ts +3 -4
- package/dist/KeybindingHint/key-names.d.ts.map +1 -1
- package/dist/KeybindingHint/key-names.js +14 -15
- package/dist/Link/Link.d.ts +1 -1
- package/dist/NavList/NavList.d.ts +8 -2
- package/dist/NavList/NavList.d.ts.map +1 -1
- package/dist/NavList/NavList.js +2 -0
- package/dist/Overlay/Overlay.d.ts +1 -0
- package/dist/Overlay/Overlay.d.ts.map +1 -1
- package/dist/PageLayout/PageLayout.d.ts +6 -24
- package/dist/PageLayout/PageLayout.d.ts.map +1 -1
- package/dist/PageLayout/PageLayout.js +2 -7
- package/dist/Text/{Text-d649cda5.css → Text-ca7603b7.css} +2 -2
- package/dist/Text/Text-ca7603b7.css.map +1 -0
- package/dist/Text/Text.d.ts +6 -4
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +14 -20
- package/dist/Text/Text.module.css.js +1 -1
- package/dist/ThemeProvider.d.ts +0 -6
- package/dist/ThemeProvider.d.ts.map +1 -1
- package/dist/ThemeProvider.js +21 -38
- package/dist/Timeline/Timeline-c5e15bf9.css +2 -0
- package/dist/Timeline/Timeline-c5e15bf9.css.map +1 -0
- package/dist/Timeline/Timeline.d.ts +1 -10
- package/dist/Timeline/Timeline.d.ts.map +1 -1
- package/dist/Timeline/Timeline.js +0 -42
- package/dist/Timeline/Timeline.module.css.js +2 -2
- package/dist/Timeline/index.d.ts +1 -1
- package/dist/Timeline/index.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.js +3 -3
- package/dist/TreeView/TreeView-0fe09f34.css +2 -0
- package/dist/TreeView/TreeView-0fe09f34.css.map +1 -0
- package/dist/TreeView/TreeView.d.ts +2 -11
- package/dist/TreeView/TreeView.d.ts.map +1 -1
- package/dist/TreeView/TreeView.js +92 -128
- package/dist/TreeView/TreeView.module.css.js +2 -2
- package/dist/hooks/useIsMacOS.js +32 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/components/TextInputWrapper-889df5d3.css +2 -0
- package/dist/internal/components/TextInputWrapper-889df5d3.css.map +1 -0
- package/dist/internal/components/TextInputWrapper.d.ts.map +1 -1
- package/dist/internal/components/TextInputWrapper.js +24 -33
- package/dist/internal/components/TextInputWrapper.module.css.js +1 -1
- package/dist/utils/modern-polymorphic.d.ts +1 -1
- package/dist/utils/modern-polymorphic.d.ts.map +1 -1
- package/generated/components.json +9 -64
- package/package.json +1 -1
- package/dist/ActionList/ActionList-1940009e.css +0 -2
- package/dist/ActionList/ActionList-1940009e.css.map +0 -1
- package/dist/KeybindingHint/platform.d.ts +0 -22
- package/dist/KeybindingHint/platform.d.ts.map +0 -1
- package/dist/KeybindingHint/platform.js +0 -61
- package/dist/Text/Text-d649cda5.css.map +0 -1
- package/dist/Timeline/Timeline-0c88f21b.css +0 -2
- package/dist/Timeline/Timeline-0c88f21b.css.map +0 -1
- package/dist/TreeView/TreeView-1bf45a33.css +0 -2
- package/dist/TreeView/TreeView-1bf45a33.css.map +0 -1
- package/dist/internal/components/TextInputWrapper-b2f7f9fa.css +0 -2
- package/dist/internal/components/TextInputWrapper-b2f7f9fa.css.map +0 -1
|
@@ -15,10 +15,9 @@ import { useTypeahead } from './useTypeahead.js';
|
|
|
15
15
|
import { IconButton } from '../Button/IconButton.js';
|
|
16
16
|
import { ButtonComponent } from '../Button/Button.js';
|
|
17
17
|
import { ActionList } from '../ActionList/index.js';
|
|
18
|
-
import { usePlatform } from '../KeybindingHint/platform.js';
|
|
19
18
|
import { isSlot } from '../utils/is-slot.js';
|
|
20
|
-
import { fixedForwardRef } from '../utils/modern-polymorphic.js';
|
|
21
19
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
20
|
+
import { useIsMacOS } from '../hooks/useIsMacOS.js';
|
|
22
21
|
import { AriaStatus } from '../live-region/AriaStatus.js';
|
|
23
22
|
import Spinner from '../Spinner/Spinner.js';
|
|
24
23
|
import { Tooltip } from '../TooltipV2/Tooltip.js';
|
|
@@ -47,11 +46,6 @@ const ItemContext = /*#__PURE__*/React.createContext({
|
|
|
47
46
|
trailingActionId: ''
|
|
48
47
|
});
|
|
49
48
|
|
|
50
|
-
// Module-private channel from LoadingItem to the Item it renders. Lets us mark the placeholder
|
|
51
|
-
// row with `data-loading` (used by CSS to suppress hover affordances) without exposing an
|
|
52
|
-
// internal-only prop on the public TreeViewItemProps API.
|
|
53
|
-
const LoadingPlaceholderContext = /*#__PURE__*/React.createContext(false);
|
|
54
|
-
|
|
55
49
|
// ----------------------------------------------------------------------------
|
|
56
50
|
// TreeView
|
|
57
51
|
|
|
@@ -266,17 +260,7 @@ Root.displayName = 'TreeView';
|
|
|
266
260
|
// ----------------------------------------------------------------------------
|
|
267
261
|
// TreeView.Item
|
|
268
262
|
|
|
269
|
-
|
|
270
|
-
// `ref` and `onSelect` from the underlying element's props:
|
|
271
|
-
// - `ref` is provided solely by `fixedForwardRef` (typed as `Ref<unknown>`), preserving
|
|
272
|
-
// backward compatibility with consumers that pass `Ref<HTMLElement>` rather than the
|
|
273
|
-
// intrinsic element's ref type (e.g. `Ref<HTMLLIElement>` for the default `<li>`).
|
|
274
|
-
// - Our custom `onSelect` (typed against `HTMLElement`) replaces the native
|
|
275
|
-
// `ReactEventHandler<HTMLLIElement>` that would otherwise be intersected in
|
|
276
|
-
// and conflict with existing consumers.
|
|
277
|
-
// `DistributiveOmit` keeps the omit distributing over `as` union types.
|
|
278
|
-
|
|
279
|
-
const ItemImpl = fixedForwardRef(({
|
|
263
|
+
const Item = /*#__PURE__*/React.forwardRef(({
|
|
280
264
|
id: itemId,
|
|
281
265
|
containIntrinsicSize,
|
|
282
266
|
current: isCurrentItem = false,
|
|
@@ -288,16 +272,8 @@ const ItemImpl = fixedForwardRef(({
|
|
|
288
272
|
className,
|
|
289
273
|
'aria-label': ariaLabel,
|
|
290
274
|
'aria-labelledby': ariaLabelledby,
|
|
291
|
-
secondaryActions
|
|
292
|
-
as: Component,
|
|
293
|
-
...restProps
|
|
275
|
+
secondaryActions
|
|
294
276
|
}, ref) => {
|
|
295
|
-
// Note: when `as` swaps the element from `<li>`, the resulting markup
|
|
296
|
-
// (e.g. `<a>` as a direct child of `<ul role="tree">`) is technically
|
|
297
|
-
// not valid HTML. This mirrors the trade-off made by other polymorphic
|
|
298
|
-
// Primer components (e.g. `Breadcrumbs.Item`, `ActionList.LinkItem`)
|
|
299
|
-
// to support router-link integrations.
|
|
300
|
-
const ItemElement = Component !== null && Component !== void 0 ? Component : 'li';
|
|
301
277
|
const [slots, rest] = useSlots(children, {
|
|
302
278
|
leadingAction: LeadingAction,
|
|
303
279
|
leadingVisual: LeadingVisual,
|
|
@@ -327,7 +303,6 @@ const ItemImpl = fixedForwardRef(({
|
|
|
327
303
|
const {
|
|
328
304
|
level
|
|
329
305
|
} = React.useContext(ItemContext);
|
|
330
|
-
const isLoadingPlaceholder = React.useContext(LoadingPlaceholderContext);
|
|
331
306
|
const {
|
|
332
307
|
hasSubTree,
|
|
333
308
|
subTree,
|
|
@@ -336,10 +311,12 @@ const ItemImpl = fixedForwardRef(({
|
|
|
336
311
|
const [isSubTreeEmpty, setIsSubTreeEmpty] = React.useState(!hasSubTree);
|
|
337
312
|
const [actionCommandPressed, setActionCommandPressed] = React.useState(false);
|
|
338
313
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
339
|
-
const
|
|
314
|
+
const isMacOS = useIsMacOS();
|
|
340
315
|
|
|
341
316
|
// Set the expanded state and cache it
|
|
342
|
-
const setIsExpandedWithCache = React.useCallback(
|
|
317
|
+
const setIsExpandedWithCache = React.useCallback(
|
|
318
|
+
// eslint-disable-next-line react-hooks/preserve-manual-memoization
|
|
319
|
+
newIsExpanded => {
|
|
343
320
|
var _expandedStateCache$c3;
|
|
344
321
|
setIsExpanded(newIsExpanded);
|
|
345
322
|
(_expandedStateCache$c3 = expandedStateCache.current) === null || _expandedStateCache$c3 === void 0 ? void 0 : _expandedStateCache$c3.set(itemId, newIsExpanded);
|
|
@@ -362,41 +339,41 @@ const ItemImpl = fixedForwardRef(({
|
|
|
362
339
|
action();
|
|
363
340
|
}
|
|
364
341
|
}, [secondaryActions]);
|
|
365
|
-
const handleKeyDown = React.useCallback(
|
|
366
|
-
switch (
|
|
342
|
+
const handleKeyDown = React.useCallback(event_0 => {
|
|
343
|
+
switch (event_0.key) {
|
|
367
344
|
case 'Enter':
|
|
368
345
|
case ' ':
|
|
369
346
|
if (onSelect) {
|
|
370
|
-
onSelect(
|
|
347
|
+
onSelect(event_0);
|
|
371
348
|
} else {
|
|
372
|
-
toggle(
|
|
349
|
+
toggle(event_0);
|
|
373
350
|
}
|
|
374
|
-
|
|
351
|
+
event_0.stopPropagation();
|
|
375
352
|
break;
|
|
376
353
|
case 'ArrowRight':
|
|
377
354
|
// Ignore if modifier keys are pressed
|
|
378
|
-
if (
|
|
379
|
-
|
|
380
|
-
|
|
355
|
+
if (event_0.altKey || event_0.metaKey) return;
|
|
356
|
+
event_0.preventDefault();
|
|
357
|
+
event_0.stopPropagation();
|
|
381
358
|
setIsExpandedWithCache(true);
|
|
382
359
|
break;
|
|
383
360
|
case 'ArrowLeft':
|
|
384
361
|
// Ignore if modifier keys are pressed
|
|
385
|
-
if (
|
|
386
|
-
|
|
387
|
-
|
|
362
|
+
if (event_0.altKey || event_0.metaKey) return;
|
|
363
|
+
event_0.preventDefault();
|
|
364
|
+
event_0.stopPropagation();
|
|
388
365
|
setIsExpandedWithCache(false);
|
|
389
366
|
break;
|
|
390
367
|
case 'U':
|
|
391
368
|
case 'u':
|
|
392
|
-
if (!(
|
|
369
|
+
if (!(event_0.shiftKey && (event_0.metaKey || event_0.ctrlKey))) return;
|
|
393
370
|
activateActionsDialog();
|
|
394
371
|
break;
|
|
395
372
|
}
|
|
396
373
|
}, [onSelect, setIsExpandedWithCache, toggle, activateActionsDialog]);
|
|
397
374
|
const ariaDescribedByIds = [slots.leadingVisual ? leadingVisualId : null, slots.trailingVisual ? trailingVisualId : null].filter(Boolean);
|
|
398
|
-
const shortcut = `Shift+${
|
|
399
|
-
const trailingActionShortcutText = `Press (${getAccessibleKeybindingHintString(shortcut,
|
|
375
|
+
const shortcut = `Shift+${isMacOS ? 'Meta' : 'Control'}+U`;
|
|
376
|
+
const trailingActionShortcutText = `Press (${getAccessibleKeybindingHintString(shortcut, isMacOS)}) for more actions.`;
|
|
400
377
|
return /*#__PURE__*/jsx(ItemContext.Provider, {
|
|
401
378
|
value: {
|
|
402
379
|
itemId,
|
|
@@ -409,7 +386,7 @@ const ItemImpl = fixedForwardRef(({
|
|
|
409
386
|
trailingVisualId,
|
|
410
387
|
trailingActionId
|
|
411
388
|
},
|
|
412
|
-
children: /*#__PURE__*/jsxs(
|
|
389
|
+
children: /*#__PURE__*/jsxs("li", {
|
|
413
390
|
className: clsx('PRIVATE_TreeView-item', className, classes.TreeViewItem),
|
|
414
391
|
ref: ref,
|
|
415
392
|
tabIndex: 0,
|
|
@@ -423,35 +400,33 @@ const ItemImpl = fixedForwardRef(({
|
|
|
423
400
|
"aria-current": isCurrentItem ? 'true' : undefined,
|
|
424
401
|
"aria-selected": isFocused ? 'true' : 'false',
|
|
425
402
|
"data-has-leading-action": slots.leadingAction ? true : undefined,
|
|
426
|
-
"data-loading": isLoadingPlaceholder ? true : undefined,
|
|
427
403
|
onKeyDown: handleKeyDown,
|
|
428
|
-
onFocus:
|
|
404
|
+
onFocus: event_1 => {
|
|
429
405
|
// Defer scroll to the next animation frame so that rapid keyboard
|
|
430
406
|
// navigation (held key) coalesces into a single reflow per frame
|
|
431
|
-
scrollElementIntoView(
|
|
407
|
+
scrollElementIntoView(event_1.currentTarget.firstElementChild);
|
|
432
408
|
|
|
433
409
|
// Set the focused state
|
|
434
410
|
setIsFocused(true);
|
|
435
411
|
|
|
436
412
|
// Prevent focus event from bubbling up to parent items
|
|
437
|
-
|
|
413
|
+
event_1.stopPropagation();
|
|
438
414
|
},
|
|
439
415
|
onBlur: () => setIsFocused(false),
|
|
440
|
-
onClick:
|
|
416
|
+
onClick: event_2 => {
|
|
441
417
|
if (onSelect) {
|
|
442
|
-
onSelect(
|
|
418
|
+
onSelect(event_2);
|
|
443
419
|
} else {
|
|
444
|
-
toggle(
|
|
420
|
+
toggle(event_2);
|
|
445
421
|
}
|
|
446
|
-
|
|
422
|
+
event_2.stopPropagation();
|
|
447
423
|
},
|
|
448
|
-
onAuxClick:
|
|
449
|
-
if (onSelect &&
|
|
450
|
-
onSelect(
|
|
424
|
+
onAuxClick: event_3 => {
|
|
425
|
+
if (onSelect && event_3.button === 1) {
|
|
426
|
+
onSelect(event_3);
|
|
451
427
|
}
|
|
452
|
-
|
|
428
|
+
event_3.stopPropagation();
|
|
453
429
|
},
|
|
454
|
-
...restProps,
|
|
455
430
|
children: [/*#__PURE__*/jsxs("div", {
|
|
456
431
|
className: clsx('PRIVATE_TreeView-item-container', classes.TreeViewItemContainer),
|
|
457
432
|
style: {
|
|
@@ -476,9 +451,9 @@ const ItemImpl = fixedForwardRef(({
|
|
|
476
451
|
// If they take up a button role, they become unnecessary and numerous tab stops.
|
|
477
452
|
jsx("div", {
|
|
478
453
|
className: clsx('PRIVATE_TreeView-item-toggle', onSelect && 'PRIVATE_TreeView-item-toggle--hover', level === 1 && 'PRIVATE_TreeView-item-toggle--end', classes.TreeViewItemToggle, classes.TreeViewItemToggleHover, classes.TreeViewItemToggleEnd),
|
|
479
|
-
onClick:
|
|
454
|
+
onClick: event_4 => {
|
|
480
455
|
if (onSelect) {
|
|
481
|
-
toggle(
|
|
456
|
+
toggle(event_4);
|
|
482
457
|
}
|
|
483
458
|
},
|
|
484
459
|
children: isExpanded ? /*#__PURE__*/jsx(ChevronDownIcon, {
|
|
@@ -506,9 +481,6 @@ const ItemImpl = fixedForwardRef(({
|
|
|
506
481
|
})
|
|
507
482
|
});
|
|
508
483
|
});
|
|
509
|
-
const Item = Object.assign(ItemImpl, {
|
|
510
|
-
displayName: 'TreeView.Item'
|
|
511
|
-
});
|
|
512
484
|
|
|
513
485
|
/** Lines to indicate the depth of an item in a TreeView */
|
|
514
486
|
const LevelIndicatorLines = t0 => {
|
|
@@ -541,6 +513,7 @@ const LevelIndicatorLines = t0 => {
|
|
|
541
513
|
}
|
|
542
514
|
return t2;
|
|
543
515
|
};
|
|
516
|
+
Item.displayName = 'TreeView.Item';
|
|
544
517
|
|
|
545
518
|
// ----------------------------------------------------------------------------
|
|
546
519
|
// TreeView.SubTree
|
|
@@ -775,121 +748,112 @@ const LoadingItem = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
775
748
|
} = t0;
|
|
776
749
|
const itemId = useId();
|
|
777
750
|
if (count) {
|
|
778
|
-
|
|
779
|
-
let t2;
|
|
751
|
+
let t1;
|
|
780
752
|
if ($[0] !== count) {
|
|
781
|
-
|
|
753
|
+
t1 = Array.from({
|
|
782
754
|
length: count
|
|
783
755
|
}).map(_temp3);
|
|
784
756
|
$[0] = count;
|
|
785
|
-
$[1] =
|
|
757
|
+
$[1] = t1;
|
|
786
758
|
} else {
|
|
787
|
-
|
|
759
|
+
t1 = $[1];
|
|
788
760
|
}
|
|
789
|
-
let
|
|
761
|
+
let t2;
|
|
790
762
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
791
|
-
|
|
792
|
-
$[2] =
|
|
763
|
+
t2 = clsx("PRIVATE_VisuallyHidden", classes.TreeViewVisuallyHidden);
|
|
764
|
+
$[2] = t2;
|
|
793
765
|
} else {
|
|
794
|
-
|
|
766
|
+
t2 = $[2];
|
|
795
767
|
}
|
|
796
|
-
let
|
|
768
|
+
let t3;
|
|
797
769
|
if ($[3] !== count) {
|
|
798
|
-
|
|
799
|
-
className:
|
|
770
|
+
t3 = /*#__PURE__*/jsxs("div", {
|
|
771
|
+
className: t2,
|
|
800
772
|
children: ["Loading ", count, " items"]
|
|
801
773
|
});
|
|
802
774
|
$[3] = count;
|
|
803
|
-
$[4] =
|
|
775
|
+
$[4] = t3;
|
|
804
776
|
} else {
|
|
805
|
-
|
|
777
|
+
t3 = $[4];
|
|
806
778
|
}
|
|
807
|
-
let
|
|
808
|
-
if ($[5] !== itemId || $[6] !==
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
ref: t1,
|
|
814
|
-
children: [t2, t4]
|
|
815
|
-
})
|
|
779
|
+
let t4;
|
|
780
|
+
if ($[5] !== itemId || $[6] !== ref || $[7] !== t1 || $[8] !== t3) {
|
|
781
|
+
t4 = /*#__PURE__*/jsxs(Item, {
|
|
782
|
+
id: itemId,
|
|
783
|
+
ref: ref,
|
|
784
|
+
children: [t1, t3]
|
|
816
785
|
});
|
|
817
786
|
$[5] = itemId;
|
|
818
|
-
$[6] =
|
|
819
|
-
$[7] =
|
|
820
|
-
$[8] =
|
|
821
|
-
$[9] =
|
|
787
|
+
$[6] = ref;
|
|
788
|
+
$[7] = t1;
|
|
789
|
+
$[8] = t3;
|
|
790
|
+
$[9] = t4;
|
|
822
791
|
} else {
|
|
823
|
-
|
|
792
|
+
t4 = $[9];
|
|
824
793
|
}
|
|
825
|
-
return
|
|
794
|
+
return t4;
|
|
826
795
|
}
|
|
827
|
-
|
|
796
|
+
let t1;
|
|
828
797
|
let t2;
|
|
829
|
-
let t3;
|
|
830
798
|
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
831
|
-
|
|
799
|
+
t1 = /*#__PURE__*/jsx(LeadingVisual, {
|
|
832
800
|
children: /*#__PURE__*/jsx(Spinner, {
|
|
833
801
|
size: "small"
|
|
834
802
|
})
|
|
835
803
|
});
|
|
836
|
-
|
|
804
|
+
t2 = /*#__PURE__*/jsx(Text, {
|
|
837
805
|
className: "fgColor-muted",
|
|
838
806
|
children: "Loading..."
|
|
839
807
|
});
|
|
840
|
-
$[10] =
|
|
841
|
-
$[11] =
|
|
808
|
+
$[10] = t1;
|
|
809
|
+
$[11] = t2;
|
|
842
810
|
} else {
|
|
843
|
-
|
|
844
|
-
|
|
811
|
+
t1 = $[10];
|
|
812
|
+
t2 = $[11];
|
|
845
813
|
}
|
|
846
|
-
let
|
|
847
|
-
if ($[12] !== itemId || $[13] !==
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
ref: t1,
|
|
853
|
-
children: [t2, t3]
|
|
854
|
-
})
|
|
814
|
+
let t3;
|
|
815
|
+
if ($[12] !== itemId || $[13] !== ref) {
|
|
816
|
+
t3 = /*#__PURE__*/jsxs(Item, {
|
|
817
|
+
id: itemId,
|
|
818
|
+
ref: ref,
|
|
819
|
+
children: [t1, t2]
|
|
855
820
|
});
|
|
856
821
|
$[12] = itemId;
|
|
857
|
-
$[13] =
|
|
858
|
-
$[14] =
|
|
822
|
+
$[13] = ref;
|
|
823
|
+
$[14] = t3;
|
|
859
824
|
} else {
|
|
860
|
-
|
|
825
|
+
t3 = $[14];
|
|
861
826
|
}
|
|
862
|
-
return
|
|
827
|
+
return t3;
|
|
863
828
|
});
|
|
864
829
|
const EmptyItem = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
865
830
|
const $ = c(4);
|
|
866
831
|
const t0 = useId();
|
|
867
|
-
|
|
868
|
-
let t2;
|
|
832
|
+
let t1;
|
|
869
833
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
870
|
-
|
|
834
|
+
t1 = /*#__PURE__*/jsx(Text, {
|
|
871
835
|
className: "fgColor-muted",
|
|
872
836
|
children: "No items found"
|
|
873
837
|
});
|
|
874
|
-
$[0] =
|
|
838
|
+
$[0] = t1;
|
|
875
839
|
} else {
|
|
876
|
-
|
|
840
|
+
t1 = $[0];
|
|
877
841
|
}
|
|
878
|
-
let
|
|
879
|
-
if ($[1] !==
|
|
880
|
-
|
|
842
|
+
let t2;
|
|
843
|
+
if ($[1] !== ref || $[2] !== t0) {
|
|
844
|
+
t2 = /*#__PURE__*/jsx(Item, {
|
|
881
845
|
expanded: null,
|
|
882
846
|
id: t0,
|
|
883
|
-
ref:
|
|
884
|
-
children:
|
|
847
|
+
ref: ref,
|
|
848
|
+
children: t1
|
|
885
849
|
});
|
|
886
|
-
$[1] =
|
|
887
|
-
$[2] =
|
|
888
|
-
$[3] =
|
|
850
|
+
$[1] = ref;
|
|
851
|
+
$[2] = t0;
|
|
852
|
+
$[3] = t2;
|
|
889
853
|
} else {
|
|
890
|
-
|
|
854
|
+
t2 = $[3];
|
|
891
855
|
}
|
|
892
|
-
return
|
|
856
|
+
return t2;
|
|
893
857
|
});
|
|
894
858
|
function useSubTree(children) {
|
|
895
859
|
const $ = c(8);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './TreeView-
|
|
1
|
+
import './TreeView-0fe09f34.css';
|
|
2
2
|
|
|
3
|
-
var classes = {"TreeViewRootUlStyles":"prc-TreeView-TreeViewRootUlStyles-Mzrmj","TreeViewItem":"prc-TreeView-TreeViewItem-Ter5f","TreeViewItemContainer":"prc-TreeView-TreeViewItemContainer-z6qqQ","TreeViewItemToggle":"prc-TreeView-TreeViewItemToggle-hq3Xq","TreeViewItemToggleHover":"prc-TreeView-TreeViewItemToggleHover-H9tbt","TreeViewItemToggleEnd":"prc-TreeView-TreeViewItemToggleEnd-nWt9I","TreeViewItemContent":"prc-TreeView-TreeViewItemContent-RKsCI","TreeViewItemContentText":"prc-TreeView-TreeViewItemContentText-FFaKp","TreeViewItemVisual":"prc-TreeView-TreeViewItemVisual-naWzj","TreeViewItemLeadingAction":"prc-TreeView-TreeViewItemLeadingAction-vmOIV","TreeViewItemTrailingAction":"prc-TreeView-TreeViewItemTrailingAction-h9M5g","TreeViewItemTrailingActionButton":"prc-TreeView-TreeViewItemTrailingActionButton-pCTdP","TreeViewItemLevelLine":"prc-TreeView-TreeViewItemLevelLine-F-0-2","TreeViewDirectoryIcon":"prc-TreeView-TreeViewDirectoryIcon-yP1oY","TreeViewVisuallyHidden":"prc-TreeView-TreeViewVisuallyHidden-1N8xK","TreeViewSkeletonItemContainerStyle":"prc-TreeView-TreeViewSkeletonItemContainerStyle-lKqwd","TreeItemSkeletonTextStyles":"prc-TreeView-TreeItemSkeletonTextStyles-8VJ-g"};
|
|
3
|
+
var classes = {"TreeViewRootUlStyles":"prc-TreeView-TreeViewRootUlStyles-Mzrmj","TreeViewItem":"prc-TreeView-TreeViewItem-Ter5f","TreeViewItemContainer":"prc-TreeView-TreeViewItemContainer-z6qqQ","TreeViewItemSkeleton":"prc-TreeView-TreeViewItemSkeleton-FGlnx","TreeViewItemToggle":"prc-TreeView-TreeViewItemToggle-hq3Xq","TreeViewItemToggleHover":"prc-TreeView-TreeViewItemToggleHover-H9tbt","TreeViewItemToggleEnd":"prc-TreeView-TreeViewItemToggleEnd-nWt9I","TreeViewItemContent":"prc-TreeView-TreeViewItemContent-RKsCI","TreeViewItemContentText":"prc-TreeView-TreeViewItemContentText-FFaKp","TreeViewItemVisual":"prc-TreeView-TreeViewItemVisual-naWzj","TreeViewItemLeadingAction":"prc-TreeView-TreeViewItemLeadingAction-vmOIV","TreeViewItemTrailingAction":"prc-TreeView-TreeViewItemTrailingAction-h9M5g","TreeViewItemTrailingActionButton":"prc-TreeView-TreeViewItemTrailingActionButton-pCTdP","TreeViewItemLevelLine":"prc-TreeView-TreeViewItemLevelLine-F-0-2","TreeViewDirectoryIcon":"prc-TreeView-TreeViewDirectoryIcon-yP1oY","TreeViewVisuallyHidden":"prc-TreeView-TreeViewVisuallyHidden-1N8xK","TreeViewSkeletonItemContainerStyle":"prc-TreeView-TreeViewSkeletonItemContainerStyle-lKqwd","TreeItemSkeletonTextStyles":"prc-TreeView-TreeItemSkeletonTextStyles-8VJ-g"};
|
|
4
4
|
|
|
5
5
|
export { classes as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { isMacOS } from '@primer/behaviors/utils';
|
|
2
|
+
import { useSyncExternalStore } from 'react';
|
|
3
|
+
|
|
4
|
+
// No-op. The platform never changes at runtime, so there is nothing to
|
|
5
|
+
// subscribe to. Hoisted to avoid creating a new function on every call.
|
|
6
|
+
const subscribe = () => () => {};
|
|
7
|
+
|
|
8
|
+
// Safe default for SSR since we can't detect the platform on the server.
|
|
9
|
+
const getServerSnapshot = () => false;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* SSR-safe hook for determining if the current platform is MacOS.
|
|
13
|
+
*
|
|
14
|
+
* Uses `useSyncExternalStore` to read the platform value:
|
|
15
|
+
*
|
|
16
|
+
* - On the **client**, `ssrUnsafeIsMacOS` reads `navigator.userAgent` and
|
|
17
|
+
* returns the real value immediately, with no extra render pass.
|
|
18
|
+
*
|
|
19
|
+
* - On the **server**, returns `false`. During hydration, if the snapshots
|
|
20
|
+
* differ, React handles the mismatch internally in a single synchronous
|
|
21
|
+
* pass, avoiding the layout shift that a deferred `useEffect` + `setState`
|
|
22
|
+
* would cause.
|
|
23
|
+
*
|
|
24
|
+
* Previous implementation used `useState` + `useEffect`, which caused an
|
|
25
|
+
* unconditional second render on every mount (even on the client where the
|
|
26
|
+
* initial value was already correct).
|
|
27
|
+
*/
|
|
28
|
+
function useIsMacOS() {
|
|
29
|
+
return useSyncExternalStore(subscribe, isMacOS, getServerSnapshot);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { useIsMacOS };
|
package/dist/index.d.ts
CHANGED
|
@@ -122,7 +122,7 @@ export type { TextInputWithTokensProps } from './TextInputWithTokens';
|
|
|
122
122
|
export { default as Text } from './Text';
|
|
123
123
|
export type { TextProps } from './Text';
|
|
124
124
|
export { default as Timeline } from './Timeline';
|
|
125
|
-
export type { TimelineProps, TimelineActionsProps,
|
|
125
|
+
export type { TimelineProps, TimelineActionsProps, TimelineBadgeVariant, TimelineBadgeProps, TimelineBodyProps, TimelineBreakProps, TimelineItemsProps, TimelineItemProps, } from './Timeline';
|
|
126
126
|
export { default as Token, IssueLabelToken } from './Token';
|
|
127
127
|
export type { TokenProps, IssueLabelTokenProps } from './Token';
|
|
128
128
|
export { Tooltip } from './TooltipV2';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,OAAO,IAAI,KAAK,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAC,MAAM,SAAS,CAAA;AACrF,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,cAAc,CAAA;AAClD,YAAY,EAAC,eAAe,EAAC,MAAM,cAAc,CAAA;AACjD,OAAO,EAAC,OAAO,IAAI,aAAa,EAAE,QAAQ,EAAE,iBAAiB,EAAC,MAAM,iBAAiB,CAAA;AACrF,YAAY,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAA;AAGvD,cAAc,UAAU,CAAA;AACxB,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AACvC,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACjD,YAAY,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAAC,OAAO,IAA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CAAA;AAC7B,YAAY,EAAC,UAAU,EAAE,cAAc,EAAC,MAAM,SAAS,CAAA;AAEvD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AACvC,YAAY,EACV,eAAe,EACf,UAAU,IAAI,oBAAoB,EAClC,YAAY,IAAI,sBAAsB,EACtC,cAAc,IAAI,wBAAwB,EAC1C,iBAAiB,IAAI,2BAA2B,GACjD,MAAM,cAAc,CAAA;AAErB,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAA;AACtC,YAAY,EAAC,gBAAgB,EAAC,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-components-TextInputBaseWrapper-wY-n0{align-items:stretch;background-color:var(--bgColor-default,#fff);border:var(--borderWidth-thin,.0625rem) solid var(--control-borderColor-rest,#d1d9e0);border-radius:var(--borderRadius-medium,.375rem);box-shadow:var(--shadow-inset,inset 0 1px 0 0 #1f23280a);color:var(--fgColor-default,#1f2328);cursor:text;display:inline-flex;font-size:var(--text-body-size-medium,.875rem);line-height:var(--base-size-20,1.25rem);min-height:var(--base-size-32,2rem);outline:none;overflow:hidden;vertical-align:middle}.prc-components-TextInputBaseWrapper-wY-n0 input,.prc-components-TextInputBaseWrapper-wY-n0 textarea{cursor:text}.prc-components-TextInputBaseWrapper-wY-n0 select{cursor:pointer}:is(.prc-components-TextInputBaseWrapper-wY-n0 input,.prc-components-TextInputBaseWrapper-wY-n0 textarea,.prc-components-TextInputBaseWrapper-wY-n0 select)::placeholder{color:var(--fgColor-muted,#59636e)}.prc-components-TextInputBaseWrapper-wY-n0:where(:not([data-trailing-action]):focus-within),.prc-components-TextInputBaseWrapper-wY-n0:where([data-trailing-action][data-focused]){border-color:var(--borderColor-accent-emphasis,#0969da);outline:var(--borderWidth-thick,.125rem) solid var(--borderColor-accent-emphasis,#0969da);outline-offset:-1px}.prc-components-TextInputBaseWrapper-wY-n0>textarea{padding:var(--base-size-12,.75rem)}.prc-components-TextInputBaseWrapper-wY-n0:where([data-contrast]){background-color:var(--control-bgColor-contrast,var(--bgColor-inset,#f6f8fa))}.prc-components-TextInputBaseWrapper-wY-n0:where([data-disabled]){background-color:var(--control-bgColor-disabled,#eff2f5);border-color:var(--control-borderColor-disabled,#818b981a);box-shadow:none;color:var(--fgColor-disabled,#818b98)}.prc-components-TextInputBaseWrapper-wY-n0:where([data-disabled]) input,.prc-components-TextInputBaseWrapper-wY-n0:where([data-disabled]) select,.prc-components-TextInputBaseWrapper-wY-n0:where([data-disabled]) textarea{cursor:not-allowed}.prc-components-TextInputBaseWrapper-wY-n0:where([data-monospace]){font-family:var(--fontStack-monospace,ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace)}.prc-components-TextInputBaseWrapper-wY-n0:where([data-validation=error]){border-color:var(--borderColor-danger-emphasis,#cf222e)}.prc-components-TextInputBaseWrapper-wY-n0:where([data-validation=error]):where(:not([data-trailing-action])):focus-within,.prc-components-TextInputBaseWrapper-wY-n0:where([data-validation=error]):where([data-trailing-action][data-focused]){border-color:var(--control-borderColor-danger,#cf222e);outline:2px solid var(--control-borderColor-danger,#cf222e);outline-offset:-1px}.prc-components-TextInputBaseWrapper-wY-n0:where([data-validation=success]){border-color:var(--bgColor-success-emphasis,#1f883d)}.prc-components-TextInputBaseWrapper-wY-n0:where([data-block]){align-self:stretch;display:flex;width:100%}@media screen and (min-width:48rem){.prc-components-TextInputBaseWrapper-wY-n0{font-size:var(--text-body-size-medium,.875rem)}}.prc-components-TextInputBaseWrapper-wY-n0{--inner-action-size:var(--base-size-24,1.5rem)}.prc-components-TextInputBaseWrapper-wY-n0:where([data-size=small]){--inner-action-size:var(--base-size-20,1.25rem);font-size:var(--text-body-size-small,.75rem);line-height:var(--base-size-20,1.25rem);min-height:var(--base-size-28,1.75rem);padding-bottom:3px;padding-left:var(--base-size-8,.5rem);padding-right:var(--base-size-8,.5rem);padding-top:3px}.prc-components-TextInputBaseWrapper-wY-n0:where([data-size=large]){--inner-action-size:var(--base-size-28,1.75rem);height:var(--base-size-40,2.5rem);padding-bottom:10px;padding-left:var(--base-size-8,.5rem);padding-right:var(--base-size-8,.5rem);padding-top:10px}.prc-components-TextInputBaseWrapper-wY-n0:where([data-variant=small]){font-size:(--text-body-size-small);line-height:var(--base-size-20,1.25rem);min-height:28px;padding-bottom:3px;padding-left:var(--base-size-8,.5rem);padding-right:var(--base-size-8,.5rem);padding-top:3px}.prc-components-TextInputBaseWrapper-wY-n0:where([data-variant=large]){font-size:var(--text-title-size-medium,1.25rem);padding-bottom:10px;padding-left:var(--base-size-8,.5rem);padding-right:var(--base-size-8,.5rem);padding-top:10px}.prc-components-TextInputWrapper-Hpdqi,.prc-components-TextInputWrapper-Hpdqi>input,.prc-components-TextInputWrapper-Hpdqi>select{padding-left:0;padding-right:0}.prc-components-TextInputWrapper-Hpdqi{background-position:right 8px center;background-repeat:no-repeat}.prc-components-TextInputWrapper-Hpdqi>:not(:last-child){margin-right:var(--base-size-8,.5rem)}.prc-components-TextInputWrapper-Hpdqi .TextInput-action,.prc-components-TextInputWrapper-Hpdqi .TextInput-icon{align-self:center;color:var(--fgColor-muted,#59636e);flex-shrink:0}.prc-components-TextInputWrapper-Hpdqi:where([data-leading-visual]){padding-left:var(--base-size-8,.5rem)}.prc-components-TextInputWrapper-Hpdqi:where([data-trailing-visual]:not([data-trailing-action])){padding-right:var(--base-size-8,.5rem)}:is(.prc-components-TextInputWrapper-Hpdqi:where(:not([data-leading-visual])[data-trailing-visual]),.prc-components-TextInputWrapper-Hpdqi:where(:not([data-leading-visual])[data-trailing-action]))>input,:is(.prc-components-TextInputWrapper-Hpdqi:where(:not([data-leading-visual])[data-trailing-visual]),.prc-components-TextInputWrapper-Hpdqi:where(:not([data-leading-visual])[data-trailing-action]))>select{padding-left:var(--base-size-8,.5rem)}.prc-components-TextInputWrapper-Hpdqi:where(:not([data-trailing-visual]):not([data-trailing-action]))>input,.prc-components-TextInputWrapper-Hpdqi:where(:not([data-trailing-visual]):not([data-trailing-action]))>select{padding-right:var(--base-size-8,.5rem)}.prc-components-TextInputWrapper-Hpdqi:where(:not([data-leading-visual]):not([data-trailing-visual]):not([data-trailing-action]))>input,.prc-components-TextInputWrapper-Hpdqi:where(:not([data-leading-visual]):not([data-trailing-visual]):not([data-trailing-action]))>select{padding-left:var(--base-size-12,.75rem);padding-right:var(--base-size-12,.75rem)}.prc-components-TextInputWrapper-Hpdqi:where([data-size=large]):where([data-leading-visual]){padding-left:var(--base-size-12,.75rem)}.prc-components-TextInputWrapper-Hpdqi:where([data-size=large]):where([data-trailing-visual]:not([data-trailing-action])){padding-right:var(--base-size-12,.75rem)}
|
|
2
|
+
/*# sourceMappingURL=TextInputWrapper-889df5d3.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/internal/components/TextInputWrapper.module.css.js"],"names":[],"mappings":"AAAA,2CAeE,mBAAoB,CALpB,4CAAwC,CACxC,qFAAqE,CACrE,gDAAyC,CAEzC,wDAA+B,CAP/B,oCAA6B,CAE7B,WAAY,CARZ,mBAAoB,CAGpB,8CAAuC,CAEvC,uCAAgC,CAJhC,mCAA+B,CAW/B,YAAa,CAVb,eAAgB,CAKhB,qBA6IF,CApIE,qGAEE,WACF,CAEA,kDACE,cACF,CAKE,yKACE,kCACF,CAGF,mLAEE,uDAAgD,CAChD,yFAA0E,CAC1E,mBACF,CAEA,oDACE,kCACF,CAEA,kEAGE,6EACF,CAEA,kEAEE,wDAAiD,CACjD,0DAAiD,CACjD,eAAgB,CAHhB,qCAUF,CALE,4NAGE,kBACF,CAGF,mEACE,mHACF,CAEA,0EACE,uDAQF,CANE,iPAEE,sDAA+C,CAC/C,2DAAoD,CACpD,mBACF,CAGF,4EAEE,oDACF,CAEA,+DAGE,kBAAmB,CAFnB,YAAa,CACb,UAEF,CAGA,oCA3FF,2CA4FI,8CAyDJ,CAxDE,CA7FF,2CA+FE,8CAsDF,CApDE,oEACE,+CAAwC,CASxC,4CAAsC,CAEtC,uCAAgC,CAThC,sCAA+B,CAK/B,kBAAmB,CACnB,qCAAgC,CAHhC,sCAAiC,CADjC,eAQF,CAEA,oEACE,+CAAwC,CAExC,iCAA2B,CAK3B,mBAAoB,CACpB,qCAAgC,CAHhC,sCAAiC,CADjC,gBAKF,CAGA,uEASE,kCAAmC,CAEnC,uCAAgC,CAVhC,eAAgB,CAKhB,kBAAmB,CACnB,qCAAgC,CAHhC,sCAAiC,CADjC,eASF,CAGA,uEAOE,+CAAwC,CAFxC,mBAAoB,CACpB,qCAAgC,CAHhC,sCAAiC,CADjC,gBAMF,CAOA,kIAGE,cAAe,CADf,eAEF,CARF,uCAcE,oCAAqC,CAHrC,2BA+CF,CA1CE,yDACE,qCACF,CAEA,gHAEE,iBAAkB,CAClB,kCAA2B,CAC3B,aACF,CAGA,oEACE,qCACF,CAGA,iGACE,sCACF,CAKE,uZAEE,qCACF,CAIF,2NAEE,sCACF,CAGA,iRAEE,uCAAiC,CACjC,wCACF,CAKA,6FACE,uCACF,CAEA,0HACE,wCACF","file":"TextInputWrapper-889df5d3.css","sourcesContent":[".TextInputBaseWrapper {\n display: inline-flex;\n min-height: var(--base-size-32);\n overflow: hidden;\n font-size: var(--text-body-size-medium);\n /* stylelint-disable-next-line primer/typography */\n line-height: var(--base-size-20);\n color: var(--fgColor-default);\n vertical-align: middle;\n cursor: text;\n background-color: var(--bgColor-default);\n border: var(--borderWidth-thin) solid var(--control-borderColor-rest);\n border-radius: var(--borderRadius-medium);\n outline: none;\n box-shadow: var(--shadow-inset);\n align-items: stretch;\n\n input,\n textarea {\n cursor: text;\n }\n\n select {\n cursor: pointer;\n }\n\n input,\n textarea,\n select {\n &::placeholder {\n color: var(--fgColor-muted);\n }\n }\n\n &:where([data-trailing-action][data-focused]),\n &:where(:not([data-trailing-action]):focus-within) {\n border-color: var(--borderColor-accent-emphasis);\n outline: var(--borderWidth-thick) solid var(--borderColor-accent-emphasis);\n outline-offset: -1px;\n }\n\n > textarea {\n padding: var(--base-size-12);\n }\n\n &:where([data-contrast]) {\n /* this variable is available behind a feature flag in gh/gh */\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--control-bgColor-contrast, var(--bgColor-inset));\n }\n\n &:where([data-disabled]) {\n color: var(--fgColor-disabled);\n background-color: var(--control-bgColor-disabled);\n border-color: var(--control-borderColor-disabled);\n box-shadow: none;\n\n input,\n textarea,\n select {\n cursor: not-allowed;\n }\n }\n\n &:where([data-monospace]) {\n font-family: var(--fontStack-monospace);\n }\n\n &:where([data-validation='error']) {\n border-color: var(--borderColor-danger-emphasis);\n\n &:where([data-trailing-action][data-focused]),\n &:where(:not([data-trailing-action])):focus-within {\n border-color: var(--control-borderColor-danger);\n outline: 2px solid var(--control-borderColor-danger);\n outline-offset: -1px;\n }\n }\n\n &:where([data-validation='success']) {\n /* stylelint-disable-next-line primer/colors */\n border-color: var(--bgColor-success-emphasis);\n }\n\n &:where([data-block]) {\n display: flex;\n width: 100%;\n align-self: stretch;\n }\n\n /* Ensures inputs don't zoom on mobile but are body-font size on desktop */\n @media screen and (--viewportRange-regular) {\n font-size: var(--text-body-size-medium);\n }\n\n --inner-action-size: var(--base-size-24); /* Default size */\n\n &:where([data-size='small']) {\n --inner-action-size: var(--base-size-20);\n\n min-height: var(--base-size-28);\n /* stylelint-disable-next-line primer/spacing */\n padding-top: 3px;\n padding-right: var(--base-size-8);\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: 3px;\n padding-left: var(--base-size-8);\n font-size: var(--text-body-size-small);\n /* stylelint-disable-next-line primer/typography */\n line-height: var(--base-size-20);\n }\n\n &:where([data-size='large']) {\n --inner-action-size: var(--base-size-28);\n\n height: var(--base-size-40);\n /* stylelint-disable-next-line primer/spacing */\n padding-top: 10px;\n padding-right: var(--base-size-8);\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: 10px;\n padding-left: var(--base-size-8);\n }\n\n /* Deprecated */\n &:where([data-variant='small']) {\n min-height: 28px;\n /* stylelint-disable-next-line primer/spacing */\n padding-top: 3px;\n padding-right: var(--base-size-8);\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: 3px;\n padding-left: var(--base-size-8);\n /* stylelint-disable-next-line declaration-property-value-no-unknown */\n font-size: (--text-body-size-small);\n /* stylelint-disable-next-line primer/typography */\n line-height: var(--base-size-20);\n }\n\n /* Deprecated */\n &:where([data-variant='large']) {\n /* stylelint-disable-next-line primer/spacing */\n padding-top: 10px;\n padding-right: var(--base-size-8);\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: 10px;\n padding-left: var(--base-size-8);\n font-size: var(--text-title-size-medium);\n }\n}\n\n.TextInputWrapper {\n padding-right: 0;\n padding-left: 0;\n\n > input,\n > select {\n padding-right: 0;\n padding-left: 0;\n }\n\n /* Repeat and position set for form states (success, error, etc) */\n background-repeat: no-repeat;\n\n /* For form validation. This keeps images 8px from right and centered vertically. */\n background-position: right 8px center;\n\n & > :not(:last-child) {\n margin-right: var(--base-size-8);\n }\n\n & :global(.TextInput-icon) /* stylelint-disable-line selector-class-pattern */,\n & :global(.TextInput-action) /* stylelint-disable-line selector-class-pattern */ {\n align-self: center;\n color: var(--fgColor-muted);\n flex-shrink: 0;\n }\n\n /* With leading visual */\n &:where([data-leading-visual]) {\n padding-left: var(--base-size-8);\n }\n\n /* With trailing visual */\n &:where([data-trailing-visual]:not([data-trailing-action])) {\n padding-right: var(--base-size-8);\n }\n\n /* Only trailing visual */\n &:where(:not([data-leading-visual])[data-trailing-visual]),\n &:where(:not([data-leading-visual])[data-trailing-action]) {\n > input,\n > select {\n padding-left: var(--base-size-8);\n }\n }\n\n /* Only leading visual */\n &:where(:not([data-trailing-visual]):not([data-trailing-action])) > input,\n &:where(:not([data-trailing-visual]):not([data-trailing-action])) > select {\n padding-right: var(--base-size-8);\n }\n\n /* No visuals at all */\n &:where(:not([data-leading-visual]):not([data-trailing-visual]):not([data-trailing-action])) > input,\n &:where(:not([data-leading-visual]):not([data-trailing-visual]):not([data-trailing-action])) > select {\n padding-left: var(--base-size-12);\n padding-right: var(--base-size-12);\n }\n}\n\n/* Large size input */\n.TextInputWrapper:where([data-size='large']) {\n &:where([data-leading-visual]) {\n padding-left: var(--base-size-12);\n }\n\n &:where([data-trailing-visual]:not([data-trailing-action])) {\n padding-right: var(--base-size-12);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputWrapper.d.ts","sourceRoot":"","sources":["../../../src/internal/components/TextInputWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,KAAK,cAAc,EAAC,MAAM,OAAO,CAAA;AAChD,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,wCAAwC,CAAA;AAKhF,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEzD,KAAK,+BAA+B,GAAG;IACrC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC,0CAA0C;IAC1C,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAA;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,E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,eAAO,MAAM,gBAAgB;uBAxDR,OAAO;wBACN,OAAO;kHAoE3B,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAChF,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAA;AACxE,eAAe,gBAAgB,CAAA"}
|
|
@@ -5,7 +5,7 @@ import styles from './TextInputWrapper.module.css.js';
|
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
const TextInputBaseWrapper = /*#__PURE__*/React.forwardRef(function TextInputBaseWrapper(t0, forwardRef) {
|
|
8
|
-
const $ = c(
|
|
8
|
+
const $ = c(43);
|
|
9
9
|
let block;
|
|
10
10
|
let className;
|
|
11
11
|
let contrast;
|
|
@@ -134,12 +134,11 @@ const TextInputBaseWrapper = /*#__PURE__*/React.forwardRef(function TextInputBas
|
|
|
134
134
|
const t10 = monospace || undefined;
|
|
135
135
|
const t11 = size || undefined;
|
|
136
136
|
const t12 = hasTrailingAction || undefined;
|
|
137
|
-
const t13 =
|
|
138
|
-
const t14 =
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
t16 = /*#__PURE__*/jsx("span", {
|
|
137
|
+
const t13 = validationStatus || undefined;
|
|
138
|
+
const t14 = variant || undefined;
|
|
139
|
+
let t15;
|
|
140
|
+
if ($[29] !== forwardRef || $[30] !== memoizedStyle || $[31] !== restProps || $[32] !== t10 || $[33] !== t11 || $[34] !== t12 || $[35] !== t13 || $[36] !== t14 || $[37] !== t5 || $[38] !== t6 || $[39] !== t7 || $[40] !== t8 || $[41] !== t9) {
|
|
141
|
+
t15 = /*#__PURE__*/jsx("span", {
|
|
143
142
|
ref: forwardRef,
|
|
144
143
|
className: t5,
|
|
145
144
|
"data-block": t6,
|
|
@@ -149,9 +148,8 @@ const TextInputBaseWrapper = /*#__PURE__*/React.forwardRef(function TextInputBas
|
|
|
149
148
|
"data-monospace": t10,
|
|
150
149
|
"data-size": t11,
|
|
151
150
|
"data-trailing-action": t12,
|
|
152
|
-
"data-
|
|
153
|
-
"data-
|
|
154
|
-
"data-variant": t15,
|
|
151
|
+
"data-validation": t13,
|
|
152
|
+
"data-variant": t14,
|
|
155
153
|
style: memoizedStyle,
|
|
156
154
|
"data-component": "TextInput",
|
|
157
155
|
...restProps
|
|
@@ -164,21 +162,20 @@ const TextInputBaseWrapper = /*#__PURE__*/React.forwardRef(function TextInputBas
|
|
|
164
162
|
$[34] = t12;
|
|
165
163
|
$[35] = t13;
|
|
166
164
|
$[36] = t14;
|
|
167
|
-
$[37] =
|
|
168
|
-
$[38] =
|
|
169
|
-
$[39] =
|
|
170
|
-
$[40] =
|
|
171
|
-
$[41] =
|
|
172
|
-
$[42] =
|
|
173
|
-
$[43] = t16;
|
|
165
|
+
$[37] = t5;
|
|
166
|
+
$[38] = t6;
|
|
167
|
+
$[39] = t7;
|
|
168
|
+
$[40] = t8;
|
|
169
|
+
$[41] = t9;
|
|
170
|
+
$[42] = t15;
|
|
174
171
|
} else {
|
|
175
|
-
|
|
172
|
+
t15 = $[42];
|
|
176
173
|
}
|
|
177
|
-
return
|
|
174
|
+
return t15;
|
|
178
175
|
});
|
|
179
176
|
TextInputBaseWrapper.displayName = 'TextInputBaseWrapper';
|
|
180
177
|
const TextInputWrapper = /*#__PURE__*/React.forwardRef(function TextInputWrapper(t0, forwardRef) {
|
|
181
|
-
const $ = c(
|
|
178
|
+
const $ = c(13);
|
|
182
179
|
let className;
|
|
183
180
|
let hasLeadingVisual;
|
|
184
181
|
let hasTrailingVisual;
|
|
@@ -210,18 +207,14 @@ const TextInputWrapper = /*#__PURE__*/React.forwardRef(function TextInputWrapper
|
|
|
210
207
|
t1 = $[6];
|
|
211
208
|
}
|
|
212
209
|
const t2 = hasLeadingVisual || undefined;
|
|
213
|
-
const t3 =
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
if ($[7] !== forwardRef || $[8] !== restProps || $[9] !== t1 || $[10] !== t2 || $[11] !== t3 || $[12] !== t4 || $[13] !== t5) {
|
|
218
|
-
t6 = /*#__PURE__*/jsx(TextInputBaseWrapper, {
|
|
210
|
+
const t3 = hasTrailingVisual || undefined;
|
|
211
|
+
let t4;
|
|
212
|
+
if ($[7] !== forwardRef || $[8] !== restProps || $[9] !== t1 || $[10] !== t2 || $[11] !== t3) {
|
|
213
|
+
t4 = /*#__PURE__*/jsx(TextInputBaseWrapper, {
|
|
219
214
|
ref: forwardRef,
|
|
220
215
|
className: t1,
|
|
221
216
|
"data-leading-visual": t2,
|
|
222
|
-
"data-
|
|
223
|
-
"data-trailing-visual": t4,
|
|
224
|
-
"data-no-trailing-visual": t5,
|
|
217
|
+
"data-trailing-visual": t3,
|
|
225
218
|
...restProps
|
|
226
219
|
});
|
|
227
220
|
$[7] = forwardRef;
|
|
@@ -230,12 +223,10 @@ const TextInputWrapper = /*#__PURE__*/React.forwardRef(function TextInputWrapper
|
|
|
230
223
|
$[10] = t2;
|
|
231
224
|
$[11] = t3;
|
|
232
225
|
$[12] = t4;
|
|
233
|
-
$[13] = t5;
|
|
234
|
-
$[14] = t6;
|
|
235
226
|
} else {
|
|
236
|
-
|
|
227
|
+
t4 = $[12];
|
|
237
228
|
}
|
|
238
|
-
return
|
|
229
|
+
return t4;
|
|
239
230
|
});
|
|
240
231
|
|
|
241
232
|
export { TextInputBaseWrapper, TextInputWrapper, TextInputWrapper as default };
|