@primer/react 38.0.0-rc.8 → 38.0.0-rc.95d10bdfe

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.
Files changed (98) hide show
  1. package/CHANGELOG.md +337 -0
  2. package/dist/ActionBar/{ActionBar-3069d5f1.css → ActionBar-8ed12fe7.css} +2 -2
  3. package/dist/ActionBar/ActionBar-8ed12fe7.css.map +1 -0
  4. package/dist/ActionBar/ActionBar.d.ts +3 -0
  5. package/dist/ActionBar/ActionBar.d.ts.map +1 -1
  6. package/dist/ActionBar/ActionBar.js +292 -305
  7. package/dist/ActionBar/ActionBar.module.css.js +2 -2
  8. package/dist/ActionBar/index.d.ts +3 -0
  9. package/dist/ActionBar/index.d.ts.map +1 -1
  10. package/dist/ActionBar/index.js +3 -2
  11. package/dist/ActionList/Selection.js +1 -2
  12. package/dist/ActionList/index.d.ts +1 -1
  13. package/dist/ActionMenu/ActionMenu-bb42318d.css +2 -0
  14. package/dist/ActionMenu/ActionMenu-bb42318d.css.map +1 -0
  15. package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
  16. package/dist/ActionMenu/ActionMenu.js +6 -0
  17. package/dist/ActionMenu/ActionMenu.module.css.js +1 -1
  18. package/dist/Autocomplete/Autocomplete.d.ts +1 -1
  19. package/dist/Banner/Banner-c1744c4b.css +2 -0
  20. package/dist/Banner/Banner-c1744c4b.css.map +1 -0
  21. package/dist/Banner/Banner.d.ts +8 -0
  22. package/dist/Banner/Banner.d.ts.map +1 -1
  23. package/dist/Banner/Banner.js +2 -0
  24. package/dist/Banner/Banner.module.css.js +2 -2
  25. package/dist/Banner/index.d.ts +1 -0
  26. package/dist/Banner/index.d.ts.map +1 -1
  27. package/dist/BaseStyles.d.ts +2 -3
  28. package/dist/BaseStyles.d.ts.map +1 -1
  29. package/dist/BaseStyles.js +35 -61
  30. package/dist/Breadcrumbs/Breadcrumbs-dbfc9d95.css +2 -0
  31. package/dist/Breadcrumbs/Breadcrumbs-dbfc9d95.css.map +1 -0
  32. package/dist/Breadcrumbs/Breadcrumbs.module.css.js +1 -1
  33. package/dist/Button/ButtonBase-643c673a.css +2 -0
  34. package/dist/Button/ButtonBase-643c673a.css.map +1 -0
  35. package/dist/Button/ButtonBase.module.css.js +1 -1
  36. package/dist/Details/Details.d.ts.map +1 -1
  37. package/dist/Details/Details.js +19 -41
  38. package/dist/LabelGroup/LabelGroup.d.ts.map +1 -1
  39. package/dist/LabelGroup/LabelGroup.js +1 -2
  40. package/dist/NavList/NavList.d.ts +1 -1
  41. package/dist/Overlay/Overlay.d.ts.map +1 -1
  42. package/dist/Overlay/Overlay.js +3 -6
  43. package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  44. package/dist/SegmentedControl/SegmentedControl.js +15 -9
  45. package/dist/SegmentedControl/SegmentedControlButton.d.ts +3 -1
  46. package/dist/SegmentedControl/SegmentedControlButton.d.ts.map +1 -1
  47. package/dist/SegmentedControl/SegmentedControlButton.js +76 -69
  48. package/dist/TextInput/TextInput.d.ts +1 -1
  49. package/dist/TextInputWithTokens/TextInputWithTokens.d.ts +5 -5
  50. package/dist/TextInputWithTokens/TextInputWithTokens.d.ts.map +1 -1
  51. package/dist/TextInputWithTokens/TextInputWithTokens.js +229 -249
  52. package/dist/ThemeProvider.d.ts +0 -1
  53. package/dist/ThemeProvider.d.ts.map +1 -1
  54. package/dist/ThemeProvider.js +9 -8
  55. package/dist/deprecated/ActionList/Item.d.ts.map +1 -1
  56. package/dist/deprecated/ActionList/Item.js +66 -71
  57. package/dist/{DialogV1 → deprecated/DialogV1}/Dialog-dce13989.css +1 -1
  58. package/dist/deprecated/DialogV1/Dialog-dce13989.css.map +1 -0
  59. package/dist/{DialogV1 → deprecated/DialogV1}/Dialog.d.ts +1 -1
  60. package/dist/deprecated/DialogV1/Dialog.d.ts.map +1 -0
  61. package/dist/{DialogV1 → deprecated/DialogV1}/Dialog.js +3 -3
  62. package/dist/deprecated/DialogV1/Dialog.module.css.js +5 -0
  63. package/dist/deprecated/DialogV1/index.d.ts.map +1 -0
  64. package/dist/deprecated/index.d.ts +2 -2
  65. package/dist/deprecated/index.d.ts.map +1 -1
  66. package/dist/deprecated/index.js +1 -1
  67. package/dist/index.d.ts +2 -4
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +1 -3
  70. package/dist/internal/components/TextInputInnerAction.d.ts +1 -1
  71. package/generated/components.json +93 -258
  72. package/package.json +3 -18
  73. package/dist/ActionBar/ActionBar-3069d5f1.css.map +0 -1
  74. package/dist/ActionMenu/ActionMenu-5fe972e2.css +0 -2
  75. package/dist/ActionMenu/ActionMenu-5fe972e2.css.map +0 -1
  76. package/dist/Banner/Banner-459c533a.css +0 -2
  77. package/dist/Banner/Banner-459c533a.css.map +0 -1
  78. package/dist/Box/Box.d.ts +0 -18
  79. package/dist/Box/Box.d.ts.map +0 -1
  80. package/dist/Box/index.d.ts +0 -3
  81. package/dist/Box/index.d.ts.map +0 -1
  82. package/dist/Breadcrumbs/Breadcrumbs-7cbdf03c.css +0 -2
  83. package/dist/Breadcrumbs/Breadcrumbs-7cbdf03c.css.map +0 -1
  84. package/dist/Button/ButtonBase-4c44bb02.css +0 -2
  85. package/dist/Button/ButtonBase-4c44bb02.css.map +0 -1
  86. package/dist/DialogV1/Dialog-dce13989.css.map +0 -1
  87. package/dist/DialogV1/Dialog.d.ts.map +0 -1
  88. package/dist/DialogV1/Dialog.module.css.js +0 -5
  89. package/dist/DialogV1/index.d.ts.map +0 -1
  90. package/dist/constants.d.ts +0 -15
  91. package/dist/constants.d.ts.map +0 -1
  92. package/dist/constants.js +0 -28
  93. package/dist/sx.d.ts +0 -26
  94. package/dist/sx.d.ts.map +0 -1
  95. package/dist/sx.js +0 -8
  96. package/dist/utils/layout.d.ts +0 -21
  97. package/dist/utils/layout.d.ts.map +0 -1
  98. /package/dist/{DialogV1 → deprecated/DialogV1}/index.d.ts +0 -0
@@ -101,6 +101,16 @@
101
101
  {
102
102
  "name": "ActionBar.Divider",
103
103
  "props": []
104
+ },
105
+ {
106
+ "name": "ActionBar.Group",
107
+ "props": [
108
+ {
109
+ "name": "children",
110
+ "type": "React.ReactNode",
111
+ "defaultValue": ""
112
+ }
113
+ ]
104
114
  }
105
115
  ]
106
116
  },
@@ -1158,11 +1168,6 @@
1158
1168
  "required": false,
1159
1169
  "description": "URL of the avatar image.",
1160
1170
  "defaultValue": ""
1161
- },
1162
- {
1163
- "name": "sx",
1164
- "type": "SystemStyleObject",
1165
- "deprecated": true
1166
1171
  }
1167
1172
  ],
1168
1173
  "subcomponents": []
@@ -1366,6 +1371,11 @@
1366
1371
  "name": "layout",
1367
1372
  "type": "'default' | 'compact'",
1368
1373
  "description": "Specify the layout of the Banner. Compact layout will reduce the padding."
1374
+ },
1375
+ {
1376
+ "name": "actionsLayout",
1377
+ "type": "'default' | 'inline' | 'stacked'",
1378
+ "description": "Override the responsive layout of the action buttons. 'inline' layout will display the buttons inline with the title and description, while 'stacked' layout will always render the buttons in a new row."
1369
1379
  }
1370
1380
  ],
1371
1381
  "subcomponents": [
@@ -1518,53 +1528,6 @@
1518
1528
  }
1519
1529
  ]
1520
1530
  },
1521
- "box": {
1522
- "source": "https://github.com/primer/react/tree/main/packages/react/src/Box",
1523
- "id": "box",
1524
- "name": "Box",
1525
- "status": "deprecated",
1526
- "a11yReviewed": "2025-01-08",
1527
- "stories": [
1528
- {
1529
- "id": "deprecated-components-box--default",
1530
- "code": "() => <Box>Default Box</Box>"
1531
- },
1532
- {
1533
- "id": "deprecated-components-box-features--border",
1534
- "code": "() => (\n <Box\n sx={{\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: 'border.default',\n p: 3,\n }}\n >\n Box with border\n </Box>\n)"
1535
- },
1536
- {
1537
- "id": "deprecated-components-box-features--border-bottom",
1538
- "code": "() => (\n <Box\n sx={{\n borderBottomWidth: 1,\n borderBottomStyle: 'solid',\n borderColor: 'border.default',\n p: 3,\n }}\n >\n Box with bottom border\n </Box>\n)"
1539
- },
1540
- {
1541
- "id": "deprecated-components-box-features--flexbox",
1542
- "code": "() => (\n <Box\n sx={{\n display: 'flex',\n }}\n >\n <Box\n sx={{\n p: 3,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: 'border.default',\n }}\n >\n 1\n </Box>\n <Box\n sx={{\n flexGrow: 1,\n p: 3,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: 'border.default',\n }}\n >\n 2\n </Box>\n <Box\n sx={{\n p: 3,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: 'border.default',\n }}\n >\n 3\n </Box>\n </Box>\n)"
1543
- },
1544
- {
1545
- "id": "deprecated-components-box-features--grid",
1546
- "code": "() => (\n <Box\n sx={{\n display: 'grid',\n gridTemplateColumns: '1fr 1fr',\n gap: 3,\n }}\n >\n <Box\n sx={{\n p: 3,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: 'border.default',\n }}\n >\n 1\n </Box>\n <Box\n sx={{\n p: 3,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: 'border.default',\n }}\n >\n 2\n </Box>\n <Box\n sx={{\n p: 3,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: 'border.default',\n }}\n >\n 3\n </Box>\n </Box>\n)"
1547
- }
1548
- ],
1549
- "importPath": "@primer/react",
1550
- "props": [
1551
- {
1552
- "name": "ref",
1553
- "type": "React.RefObject<HTMLDivElement>"
1554
- },
1555
- {
1556
- "name": "as",
1557
- "type": "React.ElementType",
1558
- "defaultValue": "\"div\""
1559
- },
1560
- {
1561
- "name": "sx",
1562
- "type": "SystemStyleObject",
1563
- "deprecated": true
1564
- }
1565
- ],
1566
- "subcomponents": []
1567
- },
1568
1531
  "branch_name": {
1569
1532
  "source": "https://github.com/primer/react/tree/main/packages/react/src/BranchName",
1570
1533
  "id": "branch_name",
@@ -1632,12 +1595,6 @@
1632
1595
  "required": false,
1633
1596
  "description": "How to handle overflow when breadcrumbs don't fit in the container. 'wrap' allows items to wrap to new lines. 'menu' collapses items into an overflow menu. 'menu-with-root' also collapses items into an overflow menu but includes the root (first) breadcrumb in the menu so only the last items remain visible.",
1634
1597
  "defaultValue": "'wrap'"
1635
- },
1636
- {
1637
- "name": "sx",
1638
- "type": "SystemStyleObject",
1639
- "deprecated": true,
1640
- "description": "System styles (deprecated, use CSS classes instead)"
1641
1598
  }
1642
1599
  ],
1643
1600
  "subcomponents": [
@@ -1677,11 +1634,6 @@
1677
1634
  "name": "as",
1678
1635
  "type": "React.ElementType",
1679
1636
  "defaultValue": "\"a\""
1680
- },
1681
- {
1682
- "name": "sx",
1683
- "type": "SystemStyleObject",
1684
- "deprecated": true
1685
1637
  }
1686
1638
  ],
1687
1639
  "passthrough": {
@@ -3138,78 +3090,6 @@
3138
3090
  }
3139
3091
  ]
3140
3092
  },
3141
- "dialog": {
3142
- "source": "https://github.com/primer/react/tree/main/packages/react/src/DialogV1",
3143
- "id": "dialog",
3144
- "docsId": "dialog",
3145
- "name": "Dialog",
3146
- "status": "deprecated",
3147
- "a11yReviewed": false,
3148
- "stories": [
3149
- {
3150
- "id": "components-dialog--default",
3151
- "code": "() => {\n const [isOpen, setIsOpen] = useState(false)\n const returnFocusRef = useRef(null)\n return (\n <div>\n <div\n style={{\n marginBottom: 'var(--stack-gap-normal)',\n }}\n >\n <Banner\n title=\"This component is deprecated\"\n description=\"We recommend using Dialog instead.\"\n variant=\"warning\"\n />\n </div>\n <Button\n data-testid=\"trigger-button\"\n ref={returnFocusRef}\n onClick={() => setIsOpen(true)}\n >\n Show Dialog\n </Button>\n <Dialog\n returnFocusRef={returnFocusRef}\n isOpen={isOpen}\n onDismiss={() => setIsOpen(false)}\n aria-labelledby=\"header\"\n >\n <div data-testid=\"inner\">\n <Dialog.Header id=\"header\">Title</Dialog.Header>\n <div\n style={{\n padding: 'var(--stack-gap-normal)',\n }}\n >\n <Text>Some content</Text>\n </div>\n </div>\n </Dialog>\n </div>\n )\n}"
3152
- }
3153
- ],
3154
- "importPath": "@primer/react/deprecated",
3155
- "props": [
3156
- {
3157
- "name": "isOpen",
3158
- "type": "boolean",
3159
- "description": "Whether or not the dialog is open"
3160
- },
3161
- {
3162
- "name": "onDismiss",
3163
- "type": "() => void",
3164
- "description": "Function that will be called when the dialog is closed"
3165
- },
3166
- {
3167
- "name": "returnFocusRef",
3168
- "type": " React.RefObject<HTMLElement>",
3169
- "description": "The element to restore focus back to after the `Dialog` is closed"
3170
- },
3171
- {
3172
- "name": "initialFocusRef",
3173
- "type": " React.RefObject<HTMLElement>",
3174
- "description": "Element inside of the `Dialog` you'd like to be focused when the Dialog is opened. If nothing is passed to `initialFocusRef` the close button is focused."
3175
- },
3176
- {
3177
- "name": "aria-labelledby",
3178
- "type": "string",
3179
- "description": "Pass an id to use for the aria-label. Use either a `aria-label` or an `aria-labelledby` but not both."
3180
- },
3181
- {
3182
- "name": "aria-label",
3183
- "type": "string",
3184
- "description": "Pass a label to be used to describe the Dialog. Use either a `aria-label` or an `aria-labelledby` but not both."
3185
- },
3186
- {
3187
- "name": "narrow",
3188
- "type": "boolean"
3189
- },
3190
- {
3191
- "name": "wide",
3192
- "type": "boolean"
3193
- },
3194
- {
3195
- "name": "sx",
3196
- "type": "SystemStyleObject",
3197
- "deprecated": true
3198
- }
3199
- ],
3200
- "subcomponents": [
3201
- {
3202
- "name": "Dialog.Header",
3203
- "props": [
3204
- {
3205
- "name": "sx",
3206
- "type": "SystemStyleObject",
3207
- "deprecated": true
3208
- }
3209
- ]
3210
- }
3211
- ]
3212
- },
3213
3093
  "feature_flags": {
3214
3094
  "source": "https://github.com/primer/react/tree/main/packages/react/src/FeatureFlags",
3215
3095
  "id": "feature_flags",
@@ -4878,11 +4758,6 @@
4878
4758
  "type": "| 'none' | 'condensed' | 'normal'",
4879
4759
  "defaultValue": "'normal'",
4880
4760
  "description": ""
4881
- },
4882
- {
4883
- "name": "sx",
4884
- "type": "SystemStyleObject",
4885
- "deprecated": true
4886
4761
  }
4887
4762
  ],
4888
4763
  "subcomponents": [
@@ -4925,11 +4800,6 @@
4925
4800
  "type": "| boolean | { narrow?: boolean regular?: boolean wide?: boolean }",
4926
4801
  "defaultValue": "false",
4927
4802
  "description": "Whether the header is hidden."
4928
- },
4929
- {
4930
- "name": "sx",
4931
- "type": "SystemStyleObject",
4932
- "deprecated": true
4933
4803
  }
4934
4804
  ]
4935
4805
  },
@@ -4971,11 +4841,6 @@
4971
4841
  "type": "| boolean | { narrow?: boolean regular?: boolean wide?: boolean }",
4972
4842
  "defaultValue": "false",
4973
4843
  "description": "Whether the content is hidden."
4974
- },
4975
- {
4976
- "name": "sx",
4977
- "type": "SystemStyleObject",
4978
- "deprecated": true
4979
4844
  }
4980
4845
  ]
4981
4846
  },
@@ -5059,11 +4924,6 @@
5059
4924
  "description": "Which side of the page the pane should be on. Can be changed for different viewport widths.",
5060
4925
  "defaultValue": ""
5061
4926
  },
5062
- {
5063
- "name": "sx",
5064
- "type": "SystemStyleObject",
5065
- "deprecated": true
5066
- },
5067
4927
  {
5068
4928
  "name": "ref",
5069
4929
  "type": "React.RefObject<HTMLDivElement>"
@@ -5109,11 +4969,6 @@
5109
4969
  "type": "| boolean | { narrow?: boolean regular?: boolean wide?: boolean }",
5110
4970
  "defaultValue": "false",
5111
4971
  "description": "Whether the footer is hidden."
5112
- },
5113
- {
5114
- "name": "sx",
5115
- "type": "SystemStyleObject",
5116
- "deprecated": true
5117
4972
  }
5118
4973
  ]
5119
4974
  }
@@ -5262,11 +5117,6 @@
5262
5117
  "type": "boolean",
5263
5118
  "defaultValue": "false",
5264
5119
  "description": "Set to true to render the popover using relative positioning."
5265
- },
5266
- {
5267
- "name": "sx",
5268
- "type": "SystemStyleObject",
5269
- "deprecated": true
5270
5120
  }
5271
5121
  ],
5272
5122
  "subcomponents": [
@@ -5279,11 +5129,6 @@
5279
5129
  "defaultValue": "div",
5280
5130
  "description": "Sets the underlying HTML tag for the component"
5281
5131
  },
5282
- {
5283
- "name": "sx",
5284
- "type": "SystemStyleObject",
5285
- "deprecated": true
5286
- },
5287
5132
  {
5288
5133
  "name": "width",
5289
5134
  "type": "| 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'auto'",
@@ -5425,11 +5270,6 @@
5425
5270
  "type": "string",
5426
5271
  "defaultValue": "'bg.successInverse'",
5427
5272
  "description": "Set the progress bar color"
5428
- },
5429
- {
5430
- "name": "sx",
5431
- "type": "SystemStyleObject",
5432
- "deprecated": true
5433
5273
  }
5434
5274
  ],
5435
5275
  "subcomponents": [
@@ -5453,11 +5293,6 @@
5453
5293
  "type": "string | number",
5454
5294
  "description": "Used to set the size of the green bar",
5455
5295
  "defaultValue": "0"
5456
- },
5457
- {
5458
- "name": "sx",
5459
- "type": "SystemStyleObject",
5460
- "deprecated": true
5461
5296
  }
5462
5297
  ]
5463
5298
  }
@@ -5610,11 +5445,6 @@
5610
5445
  "type": "boolean",
5611
5446
  "defaultValue": "false",
5612
5447
  "description": "If true, the user must make a selection before the owning form can be submitted"
5613
- },
5614
- {
5615
- "name": "sx",
5616
- "type": "SystemStyleObject",
5617
- "deprecated": true
5618
5448
  }
5619
5449
  ],
5620
5450
  "subcomponents": [
@@ -5637,11 +5467,6 @@
5637
5467
  "type": "React.ReactNode",
5638
5468
  "defaultValue": "",
5639
5469
  "description": "The caption content"
5640
- },
5641
- {
5642
- "name": "sx",
5643
- "type": "SystemStyleObject",
5644
- "deprecated": true
5645
5470
  }
5646
5471
  ]
5647
5472
  },
@@ -5660,11 +5485,6 @@
5660
5485
  "defaultValue": "",
5661
5486
  "required": true,
5662
5487
  "description": "Changes the visual style to match the validation status"
5663
- },
5664
- {
5665
- "name": "sx",
5666
- "type": "SystemStyleObject",
5667
- "deprecated": true
5668
5488
  }
5669
5489
  ]
5670
5490
  }
@@ -5842,7 +5662,7 @@
5842
5662
  },
5843
5663
  {
5844
5664
  "id": "components-segmentedcontrol-features--with-icons",
5845
- "code": "() => (\n <SegmentedControl aria-label=\"File view\">\n <SegmentedControl.Button\n defaultSelected\n aria-label={'Preview'}\n leadingIcon={EyeIcon}\n >\n Preview\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Raw'} leadingIcon={FileCodeIcon}>\n Raw\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Blame'} leadingIcon={PeopleIcon}>\n Blame\n </SegmentedControl.Button>\n </SegmentedControl>\n)"
5665
+ "code": "() => (\n <SegmentedControl aria-label=\"File view\">\n <SegmentedControl.Button\n defaultSelected\n aria-label={'Preview'}\n leadingVisual={EyeIcon}\n >\n Preview\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Raw'} leadingVisual={FileCodeIcon}>\n Raw\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Blame'} leadingVisual={PeopleIcon}>\n Blame\n </SegmentedControl.Button>\n </SegmentedControl>\n)"
5846
5666
  },
5847
5667
  {
5848
5668
  "id": "components-segmentedcontrol-features--controlled",
@@ -5850,23 +5670,23 @@
5850
5670
  },
5851
5671
  {
5852
5672
  "id": "components-segmentedcontrol-features--variant-narrow-hide-labels",
5853
- "code": "() => (\n <SegmentedControl\n aria-label=\"File view\"\n variant={{\n narrow: 'hideLabels',\n regular: 'default',\n wide: 'default',\n }}\n >\n <SegmentedControl.Button\n defaultSelected\n aria-label={'Preview'}\n leadingIcon={EyeIcon}\n >\n Preview\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Raw'} leadingIcon={FileCodeIcon}>\n Raw\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Blame'} leadingIcon={PeopleIcon}>\n Blame\n </SegmentedControl.Button>\n </SegmentedControl>\n)"
5673
+ "code": "() => (\n <SegmentedControl\n aria-label=\"File view\"\n variant={{\n narrow: 'hideLabels',\n regular: 'default',\n wide: 'default',\n }}\n >\n <SegmentedControl.Button\n defaultSelected\n aria-label={'Preview'}\n leadingVisual={EyeIcon}\n >\n Preview\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Raw'} leadingVisual={FileCodeIcon}>\n Raw\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Blame'} leadingVisual={PeopleIcon}>\n Blame\n </SegmentedControl.Button>\n </SegmentedControl>\n)"
5854
5674
  },
5855
5675
  {
5856
5676
  "id": "components-segmentedcontrol-features--variant-narrow-action-menu",
5857
- "code": "() => (\n <SegmentedControl\n aria-label=\"File view\"\n variant={{\n narrow: 'dropdown',\n regular: 'default',\n wide: 'default',\n }}\n >\n <SegmentedControl.Button\n defaultSelected\n aria-label={'Preview'}\n leadingIcon={EyeIcon}\n >\n Preview\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Raw'} leadingIcon={FileCodeIcon}>\n Raw\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Blame'} leadingIcon={PeopleIcon}>\n Blame\n </SegmentedControl.Button>\n </SegmentedControl>\n)"
5677
+ "code": "() => (\n <SegmentedControl\n aria-label=\"File view\"\n variant={{\n narrow: 'dropdown',\n regular: 'default',\n wide: 'default',\n }}\n >\n <SegmentedControl.Button\n defaultSelected\n aria-label={'Preview'}\n leadingVisual={EyeIcon}\n >\n Preview\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Raw'} leadingVisual={FileCodeIcon}>\n Raw\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Blame'} leadingVisual={PeopleIcon}>\n Blame\n </SegmentedControl.Button>\n </SegmentedControl>\n)"
5858
5678
  },
5859
5679
  {
5860
5680
  "id": "components-segmentedcontrol-features--fullwidth-narrow",
5861
- "code": "() => (\n <SegmentedControl\n aria-label=\"File view\"\n fullWidth={{\n narrow: true,\n regular: false,\n wide: false,\n }}\n >\n <SegmentedControl.Button\n defaultSelected\n aria-label={'Preview'}\n leadingIcon={EyeIcon}\n >\n Preview\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Raw'} leadingIcon={FileCodeIcon}>\n Raw\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Blame'} leadingIcon={PeopleIcon}>\n Blame\n </SegmentedControl.Button>\n </SegmentedControl>\n)"
5681
+ "code": "() => (\n <SegmentedControl\n aria-label=\"File view\"\n fullWidth={{\n narrow: true,\n regular: false,\n wide: false,\n }}\n >\n <SegmentedControl.Button\n defaultSelected\n aria-label={'Preview'}\n leadingVisual={EyeIcon}\n >\n Preview\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Raw'} leadingVisual={FileCodeIcon}>\n Raw\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Blame'} leadingVisual={PeopleIcon}>\n Blame\n </SegmentedControl.Button>\n </SegmentedControl>\n)"
5862
5682
  },
5863
5683
  {
5864
5684
  "id": "components-segmentedcontrol-features--fullwidth-regular",
5865
- "code": "() => (\n <SegmentedControl\n aria-label=\"File view\"\n fullWidth={{\n narrow: false,\n regular: true,\n wide: false,\n }}\n >\n <SegmentedControl.Button\n defaultSelected\n aria-label={'Preview'}\n leadingIcon={EyeIcon}\n >\n Preview\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Raw'} leadingIcon={FileCodeIcon}>\n Raw\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Blame'} leadingIcon={PeopleIcon}>\n Blame\n </SegmentedControl.Button>\n </SegmentedControl>\n)"
5685
+ "code": "() => (\n <SegmentedControl\n aria-label=\"File view\"\n fullWidth={{\n narrow: false,\n regular: true,\n wide: false,\n }}\n >\n <SegmentedControl.Button\n defaultSelected\n aria-label={'Preview'}\n leadingVisual={EyeIcon}\n >\n Preview\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Raw'} leadingVisual={FileCodeIcon}>\n Raw\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Blame'} leadingVisual={PeopleIcon}>\n Blame\n </SegmentedControl.Button>\n </SegmentedControl>\n)"
5866
5686
  },
5867
5687
  {
5868
5688
  "id": "components-segmentedcontrol-features--fullwidth-all",
5869
- "code": "() => (\n <SegmentedControl aria-label=\"File view\" fullWidth>\n <SegmentedControl.Button\n defaultSelected\n aria-label={'Preview'}\n leadingIcon={EyeIcon}\n >\n Preview\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Raw'} leadingIcon={FileCodeIcon}>\n Raw\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Blame'} leadingIcon={PeopleIcon}>\n Blame\n </SegmentedControl.Button>\n </SegmentedControl>\n)"
5689
+ "code": "() => (\n <SegmentedControl aria-label=\"File view\" fullWidth>\n <SegmentedControl.Button\n defaultSelected\n aria-label={'Preview'}\n leadingVisual={EyeIcon}\n >\n Preview\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Raw'} leadingVisual={FileCodeIcon}>\n Raw\n </SegmentedControl.Button>\n <SegmentedControl.Button aria-label={'Blame'} leadingVisual={PeopleIcon}>\n Blame\n </SegmentedControl.Button>\n </SegmentedControl>\n)"
5870
5690
  },
5871
5691
  {
5872
5692
  "id": "components-segmentedcontrol-features--icon-only",
@@ -5930,11 +5750,18 @@
5930
5750
  {
5931
5751
  "name": "SegmentedControl.Button",
5932
5752
  "props": [
5753
+ {
5754
+ "name": "leadingVisual",
5755
+ "type": "Component",
5756
+ "defaultValue": "",
5757
+ "description": "The leading visual comes before item label"
5758
+ },
5933
5759
  {
5934
5760
  "name": "leadingIcon",
5761
+ "deprecated": true,
5935
5762
  "type": "Component",
5936
5763
  "defaultValue": "",
5937
- "description": "The leading icon comes before item label"
5764
+ "description": "Deprecated: use `leadingVisual` instead. The leading icon comes before item label."
5938
5765
  },
5939
5766
  {
5940
5767
  "name": "selected",
@@ -7012,11 +6839,6 @@
7012
6839
  "name": "aria-label",
7013
6840
  "type": "string",
7014
6841
  "description": "Used to set the `aria-label` on the top level `<nav>` element."
7015
- },
7016
- {
7017
- "name": "sx",
7018
- "type": "SystemStyleObject",
7019
- "deprecated": true
7020
6842
  }
7021
6843
  ],
7022
6844
  "subcomponents": [
@@ -7040,11 +6862,6 @@
7040
6862
  "name": "to",
7041
6863
  "type": "string | Partial<Path>",
7042
6864
  "description": "Used when the item is rendered using a component like React Router's `Link`. The path to navigate to."
7043
- },
7044
- {
7045
- "name": "sx",
7046
- "type": "SystemStyleObject",
7047
- "deprecated": true
7048
6865
  }
7049
6866
  ]
7050
6867
  }
@@ -7307,11 +7124,6 @@
7307
7124
  "deprecated": true,
7308
7125
  "description": "(Use leadingVisual or trailingVisual) An Octicon React component. To be used inside of input. Positioned on the left edge."
7309
7126
  },
7310
- {
7311
- "name": "sx",
7312
- "type": "SystemStyleObject",
7313
- "deprecated": true
7314
- },
7315
7127
  {
7316
7128
  "name": "ref",
7317
7129
  "type": "React.RefObject<HTMLInputElement>"
@@ -7354,11 +7166,6 @@
7354
7166
  "name": "as",
7355
7167
  "type": "React.ElementType",
7356
7168
  "defaultValue": "\"button\""
7357
- },
7358
- {
7359
- "name": "sx",
7360
- "type": "SystemStyleObject",
7361
- "deprecated": true
7362
7169
  }
7363
7170
  ],
7364
7171
  "passthrough": {
@@ -7634,11 +7441,6 @@
7634
7441
  "name": "clipSidebar",
7635
7442
  "type": "boolean",
7636
7443
  "description": "Hides the sidebar above the first Timeline.Item and below the last Timeline.Item."
7637
- },
7638
- {
7639
- "name": "sx",
7640
- "type": "SystemStyleObject",
7641
- "deprecated": true
7642
7444
  }
7643
7445
  ],
7644
7446
  "subcomponents": [
@@ -7649,43 +7451,20 @@
7649
7451
  "name": "condensed",
7650
7452
  "type": "boolean",
7651
7453
  "description": "Reduces vertical padding and removes background from an item's badge."
7652
- },
7653
- {
7654
- "name": "sx",
7655
- "type": "SystemStyleObject",
7656
- "deprecated": true
7657
7454
  }
7658
7455
  ]
7659
7456
  },
7660
7457
  {
7661
7458
  "name": "Timeline.Badge",
7662
- "props": [
7663
- {
7664
- "name": "sx",
7665
- "type": "SystemStyleObject",
7666
- "deprecated": true
7667
- }
7668
- ]
7459
+ "props": []
7669
7460
  },
7670
7461
  {
7671
7462
  "name": "Timeline.Body",
7672
- "props": [
7673
- {
7674
- "name": "sx",
7675
- "type": "SystemStyleObject",
7676
- "deprecated": true
7677
- }
7678
- ]
7463
+ "props": []
7679
7464
  },
7680
7465
  {
7681
7466
  "name": "Timeline.Break",
7682
- "props": [
7683
- {
7684
- "name": "sx",
7685
- "type": "SystemStyleObject",
7686
- "deprecated": true
7687
- }
7688
- ]
7467
+ "props": []
7689
7468
  }
7690
7469
  ]
7691
7470
  },
@@ -8390,11 +8169,6 @@
8390
8169
  "name": "as",
8391
8170
  "type": "React.ElementType",
8392
8171
  "defaultValue": "'div'"
8393
- },
8394
- {
8395
- "name": "sx",
8396
- "type": "SystemStyleObject",
8397
- "deprecated": true
8398
8172
  }
8399
8173
  ],
8400
8174
  "subcomponents": []
@@ -8510,6 +8284,67 @@
8510
8284
  }
8511
8285
  ]
8512
8286
  },
8287
+ "dialog": {
8288
+ "source": "https://github.com/primer/react/tree/main/packages/react/src/deprecated/DialogV1",
8289
+ "id": "dialog",
8290
+ "docsId": "dialog",
8291
+ "name": "Dialog",
8292
+ "status": "deprecated",
8293
+ "a11yReviewed": false,
8294
+ "stories": [
8295
+ {
8296
+ "id": "components-dialog--default",
8297
+ "code": "() => {\n const [isOpen, setIsOpen] = useState(false)\n const returnFocusRef = useRef(null)\n return (\n <div>\n <div\n style={{\n marginBottom: 'var(--stack-gap-normal)',\n }}\n >\n <Banner\n title=\"This component is deprecated\"\n description=\"We recommend using Dialog instead.\"\n variant=\"warning\"\n />\n </div>\n <Button\n data-testid=\"trigger-button\"\n ref={returnFocusRef}\n onClick={() => setIsOpen(true)}\n >\n Show Dialog\n </Button>\n <Dialog\n returnFocusRef={returnFocusRef}\n isOpen={isOpen}\n onDismiss={() => setIsOpen(false)}\n aria-labelledby=\"header\"\n >\n <div data-testid=\"inner\">\n <Dialog.Header id=\"header\">Title</Dialog.Header>\n <div\n style={{\n padding: 'var(--stack-gap-normal)',\n }}\n >\n <Text>Some content</Text>\n </div>\n </div>\n </Dialog>\n </div>\n )\n}"
8298
+ }
8299
+ ],
8300
+ "importPath": "@primer/react/deprecated",
8301
+ "props": [
8302
+ {
8303
+ "name": "isOpen",
8304
+ "type": "boolean",
8305
+ "description": "Whether or not the dialog is open"
8306
+ },
8307
+ {
8308
+ "name": "onDismiss",
8309
+ "type": "() => void",
8310
+ "description": "Function that will be called when the dialog is closed"
8311
+ },
8312
+ {
8313
+ "name": "returnFocusRef",
8314
+ "type": " React.RefObject<HTMLElement>",
8315
+ "description": "The element to restore focus back to after the `Dialog` is closed"
8316
+ },
8317
+ {
8318
+ "name": "initialFocusRef",
8319
+ "type": " React.RefObject<HTMLElement>",
8320
+ "description": "Element inside of the `Dialog` you'd like to be focused when the Dialog is opened. If nothing is passed to `initialFocusRef` the close button is focused."
8321
+ },
8322
+ {
8323
+ "name": "aria-labelledby",
8324
+ "type": "string",
8325
+ "description": "Pass an id to use for the aria-label. Use either a `aria-label` or an `aria-labelledby` but not both."
8326
+ },
8327
+ {
8328
+ "name": "aria-label",
8329
+ "type": "string",
8330
+ "description": "Pass a label to be used to describe the Dialog. Use either a `aria-label` or an `aria-labelledby` but not both."
8331
+ },
8332
+ {
8333
+ "name": "narrow",
8334
+ "type": "boolean"
8335
+ },
8336
+ {
8337
+ "name": "wide",
8338
+ "type": "boolean"
8339
+ }
8340
+ ],
8341
+ "subcomponents": [
8342
+ {
8343
+ "name": "Dialog.Header",
8344
+ "props": []
8345
+ }
8346
+ ]
8347
+ },
8513
8348
  "filtered_search": {
8514
8349
  "source": "https://github.com/primer/react/tree/main/packages/react/src/deprecated/FilteredSearch",
8515
8350
  "id": "filtered_search",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "38.0.0-rc.8",
4
+ "version": "38.0.0-rc.95d10bdfe",
5
5
  "description": "An implementation of GitHub's Primer Design System using React",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -79,12 +79,6 @@
79
79
  "@primer/live-region-element": "^0.7.1",
80
80
  "@primer/octicons-react": "^19.13.0",
81
81
  "@primer/primitives": "10.x || 11.x",
82
- "@styled-system/css": "^5.1.5",
83
- "@styled-system/props": "^5.1.5",
84
- "@styled-system/theme-get": "^5.1.2",
85
- "@types/styled-system": "^5.1.23",
86
- "@types/styled-system__css": "^5.0.16",
87
- "@types/styled-system__theme-get": "^5.0.1",
88
82
  "clsx": "^2.1.1",
89
83
  "color2k": "^2.0.3",
90
84
  "deepmerge": "^4.3.1",
@@ -94,8 +88,7 @@
94
88
  "lodash.isempty": "^4.4.0",
95
89
  "lodash.isobject": "^3.0.2",
96
90
  "react-compiler-runtime": "^19.1.0-rc.2",
97
- "react-intersection-observer": "^9.16.0",
98
- "styled-system": "^5.1.5"
91
+ "react-intersection-observer": "^9.16.0"
99
92
  },
100
93
  "devDependencies": {
101
94
  "@actions/core": "1.11.1",
@@ -137,7 +130,6 @@
137
130
  "@types/react-dom": "18.3.1",
138
131
  "@types/react-is": "18.3.1",
139
132
  "@types/react-test-renderer": "18.3.1",
140
- "@types/styled-components": "^5.1.26",
141
133
  "@vitejs/plugin-react": "^4.3.3",
142
134
  "afterframe": "^1.0.2",
143
135
  "ajv": "8.16.0",
@@ -148,7 +140,6 @@
148
140
  "babel-plugin-macros": "3.1.0",
149
141
  "babel-plugin-open-source": "1.3.4",
150
142
  "babel-plugin-react-compiler": "^19.1.0-rc.3",
151
- "babel-plugin-styled-components": "2.1.4",
152
143
  "babel-plugin-transform-replace-expressions": "0.2.0",
153
144
  "babel-polyfill": "6.26.0",
154
145
  "chalk": "^5.4.1",
@@ -183,7 +174,6 @@
183
174
  "rollup-plugin-postcss": "4.0.2",
184
175
  "rollup-plugin-visualizer": "6.0.3",
185
176
  "storybook": "^9.1.10",
186
- "styled-components": "5.3.11",
187
177
  "terser": "5.36.0",
188
178
  "ts-toolbelt": "9.6.0",
189
179
  "tsx": "4.20.3",
@@ -199,11 +189,9 @@
199
189
  "@types/react": "18.x || 19.x",
200
190
  "@types/react-dom": "18.x || 19.x",
201
191
  "@types/react-is": "18.x || 19.x",
202
- "@types/styled-components": "^5.1.11",
203
192
  "react": "18.x || 19.x",
204
193
  "react-dom": "18.x || 19.x",
205
- "react-is": "18.x || 19.x",
206
- "styled-components": "5.x"
194
+ "react-is": "18.x || 19.x"
207
195
  },
208
196
  "peerDependenciesMeta": {
209
197
  "@types/react": {
@@ -214,9 +202,6 @@
214
202
  },
215
203
  "@types/react-is": {
216
204
  "optional": true
217
- },
218
- "@types/styled-components": {
219
- "optional": true
220
205
  }
221
206
  }
222
207
  }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/ActionBar/ActionBar.module.css"],"names":[],"mappings":"AAAA,0BAUE,kBAAmB,CARnB,YAAa,CASb,yDAAqD,CAFrD,eAAgB,CAFhB,kBAAmB,CAJnB,WAAY,CAFZ,iBAAkB,CAOlB,kBAaF,CAPE,iDACE,iBACF,CAEA,sDACE,iDACF,CAGF,yBAIE,kBAAmB,CAHnB,YAAa,CAEb,wBAAyB,CADzB,uCAOF,CAHE,kDACE,gBACF,CAIA,oCAME,6DAAoC,CAFpC,UAAW,CAHX,aAAc,CAEd,kCAA2B,CAD3B,sCAKF","file":"ActionBar-3069d5f1.css","sourcesContent":[".List {\n position: relative;\n display: flex;\n min-width: 0;\n\n /* wonder why this is here */\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: -1px;\n white-space: nowrap;\n list-style: none;\n align-items: center;\n gap: var(--actionbar-gap, var(--stack-gap-condensed));\n\n /* Gap scale (mirrors Stack) */\n &:where([data-gap='none']) {\n --actionbar-gap: 0;\n }\n\n &:where([data-gap='condensed']) {\n --actionbar-gap: var(--stack-gap-condensed);\n }\n}\n\n.Nav {\n display: flex;\n padding-inline: var(--base-size-16);\n justify-content: flex-end;\n align-items: center;\n\n &:where([data-flush='true']) {\n padding-inline: 0;\n }\n}\n\n.Divider {\n &::before {\n display: block;\n width: var(--borderWidth-thin);\n height: var(--base-size-20);\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-muted);\n }\n}\n"]}