@primer/react 37.32.0-rc.f648ca0d1 → 38.0.0-rc.0

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 (50) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/dist/browser.esm.js +2 -2
  3. package/dist/browser.esm.js.map +1 -1
  4. package/dist/browser.umd.js +2 -2
  5. package/dist/browser.umd.js.map +1 -1
  6. package/dist/components.css +4 -3
  7. package/generated/components.json +29 -25
  8. package/lib/Autocomplete/AutocompleteMenu.js +7 -7
  9. package/lib/CircleOcticon/CircleOcticon.d.ts +3 -0
  10. package/lib/CircleOcticon/CircleOcticon.d.ts.map +1 -1
  11. package/lib/CircleOcticon/CircleOcticon.js +3 -0
  12. package/lib/ConfirmationDialog/ConfirmationDialog.d.ts +8 -0
  13. package/lib/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
  14. package/lib/ConfirmationDialog/ConfirmationDialog.js +6 -2
  15. package/lib/ProgressBar/ProgressBar-a0957632.css +2 -0
  16. package/lib/ProgressBar/ProgressBar-a0957632.css.map +1 -0
  17. package/lib/ProgressBar/ProgressBar.d.ts.map +1 -1
  18. package/lib/ProgressBar/ProgressBar.js +53 -49
  19. package/lib/ProgressBar/ProgressBar.module.css.js +1 -1
  20. package/{lib-esm/Radio/Radio-b2a92b7d.css → lib/Radio/Radio-df9a5c02.css} +2 -2
  21. package/{lib-esm/Radio/Radio-b2a92b7d.css.map → lib/Radio/Radio-df9a5c02.css.map} +1 -1
  22. package/lib/Radio/Radio.module.css.js +1 -1
  23. package/lib/Select/Select.js +61 -53
  24. package/lib/SelectPanel/SelectPanel.js +2 -2
  25. package/lib/SubNav/SubNav.d.ts +8 -16
  26. package/lib/SubNav/SubNav.d.ts.map +1 -1
  27. package/lib/SubNav/SubNav.js +3 -6
  28. package/lib-esm/Autocomplete/AutocompleteMenu.js +1 -1
  29. package/lib-esm/CircleOcticon/CircleOcticon.d.ts +3 -0
  30. package/lib-esm/CircleOcticon/CircleOcticon.js +3 -0
  31. package/lib-esm/ConfirmationDialog/ConfirmationDialog.d.ts +8 -0
  32. package/lib-esm/ConfirmationDialog/ConfirmationDialog.js +6 -2
  33. package/lib-esm/ProgressBar/ProgressBar-a0957632.css +2 -0
  34. package/lib-esm/ProgressBar/ProgressBar-a0957632.css.map +1 -0
  35. package/lib-esm/ProgressBar/ProgressBar.js +53 -49
  36. package/lib-esm/ProgressBar/ProgressBar.module.css.js +1 -1
  37. package/{lib/Radio/Radio-b2a92b7d.css → lib-esm/Radio/Radio-df9a5c02.css} +2 -2
  38. package/{lib/Radio/Radio-b2a92b7d.css.map → lib-esm/Radio/Radio-df9a5c02.css.map} +1 -1
  39. package/lib-esm/Radio/Radio.module.css.js +1 -1
  40. package/lib-esm/Select/Select.js +61 -53
  41. package/lib-esm/SelectPanel/SelectPanel.js +1 -1
  42. package/lib-esm/SubNav/SubNav.d.ts +8 -16
  43. package/lib-esm/SubNav/SubNav.js +3 -6
  44. package/package.json +3 -2
  45. package/lib/ProgressBar/ProgressBar-430cdef7.css +0 -2
  46. package/lib/ProgressBar/ProgressBar-430cdef7.css.map +0 -1
  47. package/lib/node_modules/@github/mini-throttle/dist/index.js +0 -43
  48. package/lib-esm/ProgressBar/ProgressBar-430cdef7.css +0 -2
  49. package/lib-esm/ProgressBar/ProgressBar-430cdef7.css.map +0 -1
  50. package/lib-esm/node_modules/@github/mini-throttle/dist/index.js +0 -40
@@ -2010,8 +2010,7 @@ Add a border between the body and footer if:
2010
2010
  }
2011
2011
  }
2012
2012
 
2013
- &:focus,
2014
- &:focus-within {
2013
+ &:focus-visible {
2015
2014
  @mixin focusOutline 2px;
2016
2015
  }
2017
2016
 
@@ -5517,9 +5516,11 @@ span wrapping svg or text */
5517
5516
  display: flex;
5518
5517
  overflow: hidden;
5519
5518
  /* stylelint-disable-next-line primer/colors */
5520
- background-color: var(--borderColor-default);
5519
+ background-color: var(--progressBar-track-bgColor);
5521
5520
  border-radius: var(--borderRadius-small);
5522
5521
  gap: 2px;
5522
+ outline: solid 1px var(--progressBar-track-borderColor);
5523
+ outline-offset: -1px;
5523
5524
 
5524
5525
  &:where([data-progress-display='inline']) {
5525
5526
  display: inline-flex;
@@ -2161,19 +2161,19 @@
2161
2161
  },
2162
2162
  {
2163
2163
  "id": "components-checkbox-features--with-leading-visual",
2164
- "code": "() => {\n return (\n <Box as=\"form\">\n <FormControl>\n <FormControl.LeadingVisual>\n <MarkGithubIcon />\n </FormControl.LeadingVisual>\n <Checkbox value=\"default\" />\n <FormControl.Label>Default label</FormControl.Label>\n </FormControl>\n </Box>\n )\n}"
2164
+ "code": "() => {\n return (\n <form>\n <FormControl>\n <FormControl.LeadingVisual>\n <MarkGithubIcon />\n </FormControl.LeadingVisual>\n <Checkbox value=\"default\" />\n <FormControl.Label>Default label</FormControl.Label>\n </FormControl>\n </form>\n )\n}"
2165
2165
  },
2166
2166
  {
2167
2167
  "id": "components-checkbox-features--disabled",
2168
- "code": "() => {\n return (\n <Box as=\"form\">\n <FormControl disabled>\n <Checkbox value=\"default\" />\n <FormControl.Label>Default label</FormControl.Label>\n </FormControl>\n </Box>\n )\n}"
2168
+ "code": "() => {\n return (\n <form>\n <FormControl disabled>\n <Checkbox value=\"default\" />\n <FormControl.Label>Default label</FormControl.Label>\n </FormControl>\n </form>\n )\n}"
2169
2169
  },
2170
2170
  {
2171
2171
  "id": "components-checkbox-features--with-caption",
2172
- "code": "() => {\n return (\n <Box as=\"form\">\n <FormControl>\n <Checkbox value=\"default\" />\n <FormControl.Label>Default label</FormControl.Label>\n <FormControl.Caption>This is a caption</FormControl.Caption>\n </FormControl>\n </Box>\n )\n}"
2172
+ "code": "() => {\n return (\n <form>\n <FormControl>\n <Checkbox value=\"default\" />\n <FormControl.Label>Default label</FormControl.Label>\n <FormControl.Caption>This is a caption</FormControl.Caption>\n </FormControl>\n </form>\n )\n}"
2173
2173
  },
2174
2174
  {
2175
2175
  "id": "components-checkbox-features--indeterminate",
2176
- "code": "() => (\n <Box as=\"form\">\n <FormControl>\n <Checkbox value=\"default\" indeterminate />\n <FormControl.Label>Default label</FormControl.Label>\n </FormControl>\n </Box>\n)"
2176
+ "code": "() => (\n <form>\n <FormControl>\n <Checkbox value=\"default\" indeterminate />\n <FormControl.Label>Default label</FormControl.Label>\n </FormControl>\n </form>\n)"
2177
2177
  }
2178
2178
  ],
2179
2179
  "importPath": "@primer/react",
@@ -2440,11 +2440,11 @@
2440
2440
  "source": "https://github.com/primer/react/tree/main/packages/react/src/CircleOcticon",
2441
2441
  "id": "circle_octicon",
2442
2442
  "name": "CircleOcticon",
2443
- "status": "alpha",
2443
+ "status": "deprecated",
2444
2444
  "a11yReviewed": "2025-01-08",
2445
2445
  "stories": [
2446
2446
  {
2447
- "id": "components-circleocticon--default",
2447
+ "id": "deprecated-components-circleocticon--default",
2448
2448
  "code": "() => (\n <CircleOcticon\n icon={CheckIcon}\n size={32}\n sx={{\n backgroundColor: 'success.emphasis',\n color: 'fg.onEmphasis',\n }}\n aria-label=\"Changes approved\"\n />\n)"
2449
2449
  }
2450
2450
  ],
@@ -2488,6 +2488,10 @@
2488
2488
  {
2489
2489
  "id": "components-confirmationdialog-features--shorthand-hook-from-action-menu",
2490
2490
  "code": "() => {\n const confirm = useConfirm()\n const [text, setText] = useState('open me')\n const onButtonClick = useCallback(async () => {\n if (\n await confirm({\n title: 'Are you sure?',\n content: 'Do you really want to do a trick?',\n })\n ) {\n setText('tada!')\n }\n }, [confirm])\n return (\n <div className={classes.ButtonContainer}>\n <ActionMenu>\n <ActionMenu.Button>{text}</ActionMenu.Button>\n <ActionMenu.Overlay>\n <ActionList>\n <ActionList.Item onSelect={onButtonClick}>\n Do a trick!\n </ActionList.Item>\n </ActionList>\n </ActionMenu.Overlay>\n </ActionMenu>\n </div>\n )\n}"
2491
+ },
2492
+ {
2493
+ "id": "components-confirmationdialog-features--loading-states",
2494
+ "code": "() => {\n const [isOpen, setIsOpen] = useState(false)\n const [isConfirmLoading, setIsConfirmLoading] = useState(false)\n const [isCancelLoading, setIsCancelLoading] = useState(false)\n const handleConfirm = useCallback(() => {\n setIsConfirmLoading(true)\n // Simulate async operation\n setTimeout(() => {\n setIsConfirmLoading(false)\n setIsOpen(false)\n }, 2000)\n }, [])\n const handleCancel = useCallback(() => {\n setIsCancelLoading(true)\n // Simulate async operation\n setTimeout(() => {\n setIsCancelLoading(false)\n setIsOpen(false)\n }, 1500)\n }, [])\n const handleClose = useCallback(\n (gesture: 'confirm' | 'close-button' | 'cancel' | 'escape') => {\n if (gesture === 'confirm') {\n handleConfirm()\n } else if (gesture === 'cancel') {\n handleCancel()\n } else {\n setIsOpen(false)\n }\n },\n [handleConfirm, handleCancel],\n )\n return (\n <div className={classes.ButtonContainer}>\n <Button onClick={() => setIsOpen(true)}>Show Loading Dialog</Button>\n {isOpen && (\n <ConfirmationDialog\n title=\"Delete this file?\"\n confirmButtonType=\"danger\"\n confirmButtonContent=\"Delete\"\n confirmButtonLoading={isConfirmLoading}\n cancelButtonLoading={isCancelLoading}\n onClose={handleClose}\n >\n This action cannot be undone. The file will be permanently deleted\n from your repository.\n </ConfirmationDialog>\n )}\n </div>\n )\n}"
2491
2495
  }
2492
2496
  ],
2493
2497
  "props": [
@@ -5661,15 +5665,15 @@
5661
5665
  },
5662
5666
  {
5663
5667
  "id": "components-progressbar-features--inline",
5664
- "code": "() => (\n <ProgressBar\n inline\n progress=\"66\"\n sx={{\n width: '100px',\n }}\n aria-label=\"Upload test.png\"\n />\n)"
5668
+ "code": "() => (\n <ProgressBar\n inline\n progress=\"66\"\n style={{\n width: '100px',\n }}\n aria-label=\"Upload test.png\"\n />\n)"
5665
5669
  },
5666
5670
  {
5667
- "id": "components-progressbar-features--color",
5668
- "code": "() => (\n <ProgressBar progress=\"66\" bg=\"done.emphasis\" aria-label=\"Upload test.png\" />\n)"
5671
+ "id": "components-progressbar-features--all-colors",
5672
+ "code": "() => (\n <ProgressBar aria-label=\"Upload test.png\">\n <ProgressBar.Item\n progress={20}\n aria-label=\"Photo Usage\"\n bg=\"accent.emphasis\"\n />\n <ProgressBar.Item\n progress={15}\n aria-label=\"Application Usage\"\n bg=\"danger.emphasis\"\n />\n <ProgressBar.Item\n progress={12}\n aria-label=\"Music Usage\"\n bg=\"severe.emphasis\"\n />\n <ProgressBar.Item\n progress={11}\n aria-label=\"Music Usage\"\n bg=\"done.emphasis\"\n />\n <ProgressBar.Item\n progress={8}\n aria-label=\"Music Usage\"\n bg=\"sponsors.emphasis\"\n />\n <ProgressBar.Item\n progress={7}\n aria-label=\"Music Usage\"\n bg=\"neutral.emphasis\"\n />\n <ProgressBar.Item\n progress={7}\n aria-label=\"Music Usage\"\n bg=\"attention.emphasis\"\n />\n </ProgressBar>\n)"
5669
5673
  },
5670
5674
  {
5671
5675
  "id": "components-progressbar-features--multiple-items",
5672
- "code": "() => (\n <ProgressBar>\n <ProgressBar.Item\n progress={33}\n aria-label=\"Photo Usage\"\n sx={{\n bg: 'accent.emphasis',\n }}\n />\n <ProgressBar.Item\n progress={23}\n aria-label=\"Application Usage\"\n bg={'danger.emphasis'}\n />\n <ProgressBar.Item\n progress={14}\n aria-label=\"Music Usage\"\n bg={'severe.emphasis'}\n />\n </ProgressBar>\n)"
5676
+ "code": "() => (\n <ProgressBar>\n <ProgressBar.Item\n progress={33}\n aria-label=\"Photo Usage\"\n bg=\"accent.emphasis\"\n />\n <ProgressBar.Item\n progress={23}\n aria-label=\"Application Usage\"\n bg={'danger.emphasis'}\n />\n <ProgressBar.Item\n progress={14}\n aria-label=\"Music Usage\"\n bg={'severe.emphasis'}\n />\n </ProgressBar>\n)"
5673
5677
  },
5674
5678
  {
5675
5679
  "id": "components-progressbar-features--animated",
@@ -6334,51 +6338,51 @@
6334
6338
  "stories": [
6335
6339
  {
6336
6340
  "id": "components-select--default",
6337
- "code": "() => (\n <Box as=\"form\">\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select>\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </Box>\n)"
6341
+ "code": "() => (\n <form>\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select>\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </form>\n)"
6338
6342
  },
6339
6343
  {
6340
6344
  "id": "components-select-features--with-option-groups",
6341
- "code": "() => (\n <Box as=\"form\">\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select>\n <Select.OptGroup label=\"Group one\">\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n </Select.OptGroup>\n <Select.OptGroup disabled label=\"Group two\">\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select.OptGroup>\n </Select>\n </FormControl>\n </Box>\n)"
6345
+ "code": "() => (\n <form>\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select>\n <Select.OptGroup label=\"Group one\">\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n </Select.OptGroup>\n <Select.OptGroup disabled label=\"Group two\">\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select.OptGroup>\n </Select>\n </FormControl>\n </form>\n)"
6342
6346
  },
6343
6347
  {
6344
6348
  "id": "components-select-features--disabled",
6345
- "code": "() => (\n <Box as=\"form\">\n <FormControl disabled>\n <FormControl.Label>Default label</FormControl.Label>\n <Select>\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </Box>\n)"
6349
+ "code": "() => (\n <form>\n <FormControl disabled>\n <FormControl.Label>Default label</FormControl.Label>\n <Select>\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </form>\n)"
6346
6350
  },
6347
6351
  {
6348
6352
  "id": "components-select-features--with-caption",
6349
- "code": "() => (\n <Box as=\"form\">\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <FormControl.Caption>This is a caption</FormControl.Caption>\n <Select>\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </Box>\n)"
6353
+ "code": "() => (\n <form>\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <FormControl.Caption>This is a caption</FormControl.Caption>\n <Select>\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </form>\n)"
6350
6354
  },
6351
6355
  {
6352
6356
  "id": "components-select-features--visually-hidden-label",
6353
- "code": "() => (\n <Box as=\"form\">\n <Heading as=\"h2\" variant=\"small\">\n Primer form title\n </Heading>\n <FormControl>\n <FormControl.Label visuallyHidden>Primer form label</FormControl.Label>\n <Select>\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n <FormControl.Caption>\n Label is visually hidden; the title describes the purpose visually\n </FormControl.Caption>\n </FormControl>\n </Box>\n)"
6357
+ "code": "() => (\n <form>\n <Heading as=\"h2\" variant=\"small\">\n Primer form title\n </Heading>\n <FormControl>\n <FormControl.Label visuallyHidden>Primer form label</FormControl.Label>\n <Select>\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n <FormControl.Caption>\n Label is visually hidden; the title describes the purpose visually\n </FormControl.Caption>\n </FormControl>\n </form>\n)"
6354
6358
  },
6355
6359
  {
6356
6360
  "id": "components-select-features--error",
6357
- "code": "() => (\n <Box as=\"form\">\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select>\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n <FormControl.Validation variant=\"error\">\n Something went wrong\n </FormControl.Validation>\n </FormControl>\n </Box>\n)"
6361
+ "code": "() => (\n <form>\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select>\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n <FormControl.Validation variant=\"error\">\n Something went wrong\n </FormControl.Validation>\n </FormControl>\n </form>\n)"
6358
6362
  },
6359
6363
  {
6360
6364
  "id": "components-select-features--success",
6361
- "code": "() => (\n <Box as=\"form\">\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select>\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n <FormControl.Validation variant=\"success\">Success</FormControl.Validation>\n </FormControl>\n </Box>\n)"
6365
+ "code": "() => (\n <form>\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select>\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n <FormControl.Validation variant=\"success\">Success</FormControl.Validation>\n </FormControl>\n </form>\n)"
6362
6366
  },
6363
6367
  {
6364
6368
  "id": "components-select-features--block",
6365
- "code": "() => (\n <Box as=\"form\">\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select block>\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </Box>\n)"
6369
+ "code": "() => (\n <form>\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select block>\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </form>\n)"
6366
6370
  },
6367
6371
  {
6368
6372
  "id": "components-select-features--small",
6369
- "code": "() => (\n <Box as=\"form\">\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select size=\"small\">\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </Box>\n)"
6373
+ "code": "() => (\n <form>\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select size=\"small\">\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </form>\n)"
6370
6374
  },
6371
6375
  {
6372
6376
  "id": "components-select-features--large",
6373
- "code": "() => (\n <Box as=\"form\">\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select size=\"large\">\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </Box>\n)"
6377
+ "code": "() => (\n <form>\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select size=\"large\">\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </form>\n)"
6374
6378
  },
6375
6379
  {
6376
6380
  "id": "components-select-features--with-custom-styling",
6377
- "code": "() => (\n <Box as=\"form\">\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select\n sx={{\n borderRadius: '12px',\n border: '1px dashed #000000',\n }}\n >\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </Box>\n)"
6381
+ "code": "() => (\n <form>\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select className={classes.CustomSelect}>\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </form>\n)"
6378
6382
  },
6379
6383
  {
6380
6384
  "id": "components-select-features--with-placeholder-option",
6381
- "code": "() => (\n <Box as=\"form\">\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select placeholder=\"No choice selected\">\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </Box>\n)"
6385
+ "code": "() => (\n <form>\n <FormControl>\n <FormControl.Label>Default label</FormControl.Label>\n <Select placeholder=\"No choice selected\">\n <Select.Option value=\"one\">Choice one</Select.Option>\n <Select.Option value=\"two\">Choice two</Select.Option>\n <Select.Option value=\"three\">Choice three</Select.Option>\n <Select.Option value=\"four\">Choice four</Select.Option>\n <Select.Option value=\"five\">Choice five</Select.Option>\n <Select.Option value=\"six\">Choice six</Select.Option>\n </Select>\n </FormControl>\n </form>\n)"
6382
6386
  }
6383
6387
  ],
6384
6388
  "importPath": "@primer/react",
@@ -6836,7 +6840,7 @@
6836
6840
  },
6837
6841
  {
6838
6842
  "id": "components-spinner-features--suppress-screen-reader-text",
6839
- "code": "() => (\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n gap: '0.25rem',\n }}\n >\n <Spinner size=\"small\" srText={null} />\n <AriaStatus>Loading...</AriaStatus>\n </Box>\n)"
6843
+ "code": "() => (\n <Stack direction=\"horizontal\" className={classes.SuppressScreenReaderText}>\n <Spinner size=\"small\" srText={null} />\n <AriaStatus>Loading...</AriaStatus>\n </Stack>\n)"
6840
6844
  }
6841
6845
  ],
6842
6846
  "importPath": "@primer/react",
@@ -6889,7 +6893,7 @@
6889
6893
  },
6890
6894
  {
6891
6895
  "id": "components-splitpagelayout-features--settings-page",
6892
- "code": "() => (\n <SplitPageLayout>\n <SplitPageLayout.Pane position=\"start\" aria-label=\"Navigation Pane\">\n <NavList aria-label=\"Main navigation\">\n <NavList.Item href=\"#\">Profile</NavList.Item>\n <NavList.Item href=\"#\" aria-current=\"page\">\n Account\n </NavList.Item>\n <NavList.Item href=\"#\">Emails</NavList.Item>\n <NavList.Item href=\"#\">Notifications</NavList.Item>\n </NavList>\n </SplitPageLayout.Pane>\n <SplitPageLayout.Content>\n <Heading\n as=\"h2\"\n sx={{\n fontSize: 4,\n fontWeight: 'normal',\n color: 'danger.fg',\n mb: 2,\n }}\n >\n Danger zone\n </Heading>\n <Box\n sx={{\n border: '1px solid',\n borderColor: 'danger.emphasis',\n borderRadius: 2,\n p: 3,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 3,\n }}\n >\n <Box\n sx={{\n display: 'grid',\n gap: 1,\n }}\n >\n <Text\n sx={{\n fontSize: 1,\n fontWeight: 'bold',\n color: 'danger.fg',\n }}\n >\n Delete account\n </Text>\n <Text\n sx={{\n fontSize: 1,\n color: 'fg.muted',\n }}\n >\n Are you sure you don&apos;t want to just downgrade your account to a\n free account? We won&apos;t charge your credit card anymore.\n </Text>\n </Box>\n <Button variant=\"danger\">Delete account</Button>\n </Box>\n </SplitPageLayout.Content>\n </SplitPageLayout>\n)"
6896
+ "code": "() => (\n <SplitPageLayout>\n <SplitPageLayout.Pane position=\"start\" aria-label=\"Navigation Pane\">\n <NavList aria-label=\"Main navigation\">\n <NavList.Item href=\"#\">Profile</NavList.Item>\n <NavList.Item href=\"#\" aria-current=\"page\">\n Account\n </NavList.Item>\n <NavList.Item href=\"#\">Emails</NavList.Item>\n <NavList.Item href=\"#\">Notifications</NavList.Item>\n </NavList>\n </SplitPageLayout.Pane>\n <SplitPageLayout.Content>\n <Heading as=\"h2\" className={classes.SectionHeading}>\n Danger zone\n </Heading>\n <div className={classes.DeleteAccountContainer}>\n <div className={classes.DeleteAccountTextContainer}>\n <Text className={classes.DeleteAccountTitle}>Delete account</Text>\n <Text className={classes.DeleteAccountDescription}>\n Are you sure you don&apos;t want to just downgrade your account to a\n free account? We won&apos;t charge your credit card anymore.\n </Text>\n </div>\n <Button variant=\"danger\">Delete account</Button>\n </div>\n </SplitPageLayout.Content>\n </SplitPageLayout>\n)"
6893
6897
  }
6894
6898
  ],
6895
6899
  "importPath": "@primer/react",
@@ -8555,7 +8559,7 @@
8555
8559
  },
8556
8560
  {
8557
8561
  "id": "components-treeview-features--controlled",
8558
- "code": "() => {\n const [currentPath, setCurrentPath] = React.useState<string[]>([\n 'src',\n 'Avatar.tsx',\n ])\n const [tree, setTree] = React.useState<TreeItem[]>(initialTree)\n return (\n <Box\n sx={{\n display: 'grid',\n gap: 3,\n }}\n >\n <Box\n sx={{\n display: 'flex',\n gap: 2,\n }}\n >\n <Button onClick={() => setTree(collapseAll)}>Collapse all</Button>\n <Button onClick={() => setTree(expandAll)}>Expand all</Button>\n </Box>\n <nav aria-label=\"Files\">\n <CurrentPathContext.Provider\n value={{\n currentPath,\n setCurrentPath,\n }}\n >\n <TreeView aria-label=\"Files\">\n {tree.map((item) => (\n <TreeItem\n key={item.data.name}\n item={item}\n path={[item.data.name]}\n onExpandedChange={(path, expanded) =>\n setTree((tree) => setExpanded(tree, path, expanded))\n }\n />\n ))}\n </TreeView>\n </CurrentPathContext.Provider>\n </nav>\n </Box>\n )\n}"
8562
+ "code": "() => {\n const [currentPath, setCurrentPath] = React.useState<string[]>([\n 'src',\n 'Avatar.tsx',\n ])\n const [tree, setTree] = React.useState<TreeItem[]>(initialTree)\n return (\n <div className={classes.ControlledContainer}>\n <div className={classes.ButtonContainer}>\n <Button onClick={() => setTree(collapseAll)}>Collapse all</Button>\n <Button onClick={() => setTree(expandAll)}>Expand all</Button>\n </div>\n <nav aria-label=\"Files\">\n <CurrentPathContext.Provider\n value={{\n currentPath,\n setCurrentPath,\n }}\n >\n <TreeView aria-label=\"Files\">\n {tree.map((item) => (\n <TreeItem\n key={item.data.name}\n item={item}\n path={[item.data.name]}\n onExpandedChange={(path, expanded) =>\n setTree((tree) => setExpanded(tree, path, expanded))\n }\n />\n ))}\n </TreeView>\n </CurrentPathContext.Provider>\n </nav>\n </div>\n )\n}"
8559
8563
  }
8560
8564
  ],
8561
8565
  "importPath": "@primer/react",
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var index = require('../node_modules/@github/mini-throttle/dist/index.js');
4
+ var miniThrottle = require('@github/mini-throttle');
5
5
  var liveRegionElement = require('@primer/live-region-element');
6
6
  var behaviors = require('@primer/behaviors');
7
- var index$1 = require('../ActionList/index.js');
7
+ var index = require('../ActionList/index.js');
8
8
  var useFocusZone = require('../hooks/useFocusZone.js');
9
9
  var useId = require('../hooks/useId.js');
10
10
  var AutocompleteContext = require('./AutocompleteContext.js');
@@ -49,7 +49,7 @@ function getItemById(itemId, items) {
49
49
  * Announces a message to screen readers at a slowed-down rate. This is useful when you want to announce don't want to
50
50
  * overwhelm the user with too many announcements in rapid succession.
51
51
  */
52
- const debounceAnnouncement = index.debounce(announcement => {
52
+ const debounceAnnouncement = miniThrottle.debounce(announcement => {
53
53
  liveRegionElement.announce(announcement);
54
54
  }, 250);
55
55
  function AutocompleteMenu(props) {
@@ -207,7 +207,7 @@ function AutocompleteMenu(props) {
207
207
  children: /*#__PURE__*/jsxRuntime.jsx(Spinner, {})
208
208
  }) : /*#__PURE__*/jsxRuntime.jsx("div", {
209
209
  ref: listContainerRef,
210
- children: allItemsToRender.length ? /*#__PURE__*/jsxRuntime.jsx(index$1.ActionList, {
210
+ children: allItemsToRender.length ? /*#__PURE__*/jsxRuntime.jsx(index.ActionList, {
211
211
  selectionVariant: selectionVariant // TODO: make this configurable
212
212
  ,
213
213
  role: "listbox",
@@ -226,14 +226,14 @@ function AutocompleteMenu(props) {
226
226
  key,
227
227
  ...itemProps
228
228
  } = item_2;
229
- return /*#__PURE__*/jsxRuntime.jsxs(index$1.ActionList.Item, {
229
+ return /*#__PURE__*/jsxRuntime.jsxs(index.ActionList.Item, {
230
230
  onSelect: () => onAction(item_2),
231
231
  ...itemProps,
232
232
  id: id_0,
233
233
  "data-id": id_0,
234
- children: [LeadingVisual && /*#__PURE__*/jsxRuntime.jsx(index$1.ActionList.LeadingVisual, {
234
+ children: [LeadingVisual && /*#__PURE__*/jsxRuntime.jsx(index.ActionList.LeadingVisual, {
235
235
  children: reactIs.isElement(LeadingVisual) ? LeadingVisual : /*#__PURE__*/jsxRuntime.jsx(LeadingVisual, {})
236
- }), children !== null && children !== void 0 ? children : text, TrailingVisual && /*#__PURE__*/jsxRuntime.jsx(index$1.ActionList.TrailingVisual, {
236
+ }), children !== null && children !== void 0 ? children : text, TrailingVisual && /*#__PURE__*/jsxRuntime.jsx(index.ActionList.TrailingVisual, {
237
237
  children: reactIs.isElement(TrailingVisual) ? TrailingVisual : /*#__PURE__*/jsxRuntime.jsx(TrailingVisual, {})
238
238
  })]
239
239
  }, key !== null && key !== void 0 ? key : id_0);
@@ -8,6 +8,9 @@ export type CircleOcticonProps = {
8
8
  size?: IconProps['size'];
9
9
  }>>;
10
10
  } & BoxProps;
11
+ /**
12
+ * @deprecated This component is deprecated. Replace component with specific icon imports from `@primer/octicons-react` and customized styling.)
13
+ */
11
14
  declare function CircleOcticon(props: CircleOcticonProps): React.JSX.Element;
12
15
  export default CircleOcticon;
13
16
  //# sourceMappingURL=CircleOcticon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CircleOcticon.d.ts","sourceRoot":"","sources":["../../src/CircleOcticon/CircleOcticon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,QAAQ,CAAA;AAGpC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,iBAAiB,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;KAAC,CAAC,CAAC,CAAA;CAC/E,GAAG,QAAQ,CAAA;AAEZ,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAkB/C;AAED,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"CircleOcticon.d.ts","sourceRoot":"","sources":["../../src/CircleOcticon/CircleOcticon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,QAAQ,CAAA;AAGpC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,iBAAiB,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;KAAC,CAAC,CAAC,CAAA;CAC/E,GAAG,QAAQ,CAAA;AAEZ;;GAEG;AACH,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAkB/C;AAED,eAAe,aAAa,CAAA"}
@@ -4,6 +4,9 @@ var reactCompilerRuntime = require('react-compiler-runtime');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var Box = require('../Box/Box.js');
6
6
 
7
+ /**
8
+ * @deprecated This component is deprecated. Replace component with specific icon imports from `@primer/octicons-react` and customized styling.)
9
+ */
7
10
  function CircleOcticon(props) {
8
11
  const $ = reactCompilerRuntime.c(21);
9
12
  let IconComponent;
@@ -26,6 +26,14 @@ export interface ConfirmationDialogProps {
26
26
  * The type of button to use for the confirm button. Default: Button.
27
27
  */
28
28
  confirmButtonType?: 'normal' | 'primary' | 'danger';
29
+ /**
30
+ * Whether the cancel button is in a loading state. Default: false.
31
+ */
32
+ cancelButtonLoading?: boolean;
33
+ /**
34
+ * Whether the confirm button is in a loading state. Default: false.
35
+ */
36
+ confirmButtonLoading?: boolean;
29
37
  /**
30
38
  * Additional class names to apply to the dialog
31
39
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../src/ConfirmationDialog/ConfirmationDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,KAAK,EAAoD,WAAW,EAAE,YAAY,EAAC,MAAM,kBAAkB,CAAA;AAMlH;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS,GAAG,cAAc,GAAG,QAAQ,GAAG,QAAQ,KAAK,IAAI,CAAA;IAE5E;;;OAGG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IAEtB;;OAEG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAErC;;OAEG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAEtC;;OAEG;IACH,iBAAiB,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;IAEnD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,WAAW,CAAA;IAEnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB;AAiCD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,CAgDzF,CAAA;AAGD,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,uBAAuB,EAAE,SAAS,CAAC,GAAG;IAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,CAAA;AA2BlG;;;;GAIG;AACH,wBAAgB,UAAU,cAGZ,cAAc,sBAO3B"}
1
+ {"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../src/ConfirmationDialog/ConfirmationDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,KAAK,EAAoD,WAAW,EAAE,YAAY,EAAC,MAAM,kBAAkB,CAAA;AAMlH;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS,GAAG,cAAc,GAAG,QAAQ,GAAG,QAAQ,KAAK,IAAI,CAAA;IAE5E;;;OAGG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IAEtB;;OAEG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAErC;;OAEG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAEtC;;OAEG;IACH,iBAAiB,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;IAEnD;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAE9B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,WAAW,CAAA;IAEnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB;AAiCD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,CAoDzF,CAAA;AAGD,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,uBAAuB,EAAE,SAAS,CAAC,GAAG;IAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,CAAA;AA2BlG;;;;GAIG;AACH,wBAAgB,UAAU,cAGZ,cAAc,sBAO3B"}
@@ -71,6 +71,8 @@ const ConfirmationDialog = props => {
71
71
  cancelButtonContent = 'Cancel',
72
72
  confirmButtonContent = 'OK',
73
73
  confirmButtonType = 'normal',
74
+ cancelButtonLoading = false,
75
+ confirmButtonLoading = false,
74
76
  children,
75
77
  className,
76
78
  width = 'medium',
@@ -86,13 +88,15 @@ const ConfirmationDialog = props => {
86
88
  const cancelButton = {
87
89
  content: cancelButtonContent,
88
90
  onClick: onCancelButtonClick,
89
- autoFocus: isConfirmationDangerous
91
+ autoFocus: isConfirmationDangerous,
92
+ loading: cancelButtonLoading
90
93
  };
91
94
  const confirmButton = {
92
95
  content: confirmButtonContent,
93
96
  buttonType: confirmButtonType,
94
97
  onClick: onConfirmButtonClick,
95
- autoFocus: !isConfirmationDangerous
98
+ autoFocus: !isConfirmationDangerous,
99
+ loading: confirmButtonLoading
96
100
  };
97
101
  const footerButtons = [cancelButton, confirmButton];
98
102
  return /*#__PURE__*/jsxRuntime.jsx(Dialog.Dialog, {
@@ -0,0 +1,2 @@
1
+ @keyframes prc-ProgressBar-shimmer-i1RxN{0%{mask-position:200%}to{mask-position:0}}.prc-ProgressBar-ProgressBarItem-stL6O{background-color:var(--progress-bg);width:var(--progress-width)}@media (prefers-reduced-motion:no-preference){.prc-ProgressBar-ProgressBarItem-stL6O[data-animated=true]{animation-duration:1s;animation-iteration-count:infinite;animation-name:prc-ProgressBar-shimmer-i1RxN;mask-image:linear-gradient(75deg,#000 30%,rgba(0,0,0,.65) 80%);mask-size:200%}}.prc-ProgressBar-ProgressBarContainer-E-z8S{background-color:var(--progressBar-track-bgColor);border-radius:var(--borderRadius-small,.1875rem);display:flex;gap:2px;outline:solid 1px var(--progressBar-track-borderColor);outline-offset:-1px;overflow:hidden}.prc-ProgressBar-ProgressBarContainer-E-z8S:where([data-progress-display=inline]){display:inline-flex}.prc-ProgressBar-ProgressBarContainer-E-z8S:where([data-progress-bar-size=default]){height:8px}.prc-ProgressBar-ProgressBarContainer-E-z8S:where([data-progress-bar-size=small]){height:5px}.prc-ProgressBar-ProgressBarContainer-E-z8S:where([data-progress-bar-size=large]){height:10px}
2
+ /*# sourceMappingURL=ProgressBar-a0957632.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ProgressBar/ProgressBar.module.css"],"names":[],"mappings":"AAAA,yCACE,GACE,kBACF,CAEA,GACE,eACF,CACF,CAEA,uCAGE,mCAAoC,CAFpC,2BAaF,CATE,8CACE,2DAIE,qBAAsB,CACtB,kCAAmC,CAFnC,4CAAuB,CAFvB,8DAAqE,CACrE,cAIF,CACF,CAGF,4CAIE,iDAAkD,CAClD,gDAAwC,CAJxC,YAAa,CAKb,OAAQ,CACR,sDAAuD,CACvD,mBAAoB,CANpB,eAuBF,CAfE,kFACE,mBACF,CAEA,oFACE,UACF,CAEA,kFACE,UACF,CAEA,kFACE,WACF","file":"ProgressBar-a0957632.css","sourcesContent":["@keyframes shimmer {\n from {\n mask-position: 200%;\n }\n\n to {\n mask-position: 0%;\n }\n}\n\n.ProgressBarItem {\n width: var(--progress-width);\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--progress-bg);\n\n @media (prefers-reduced-motion: no-preference) {\n &[data-animated='true'] {\n mask-image: linear-gradient(75deg, #000 30%, rgba(0, 0, 0, 0.65) 80%);\n mask-size: 200%;\n animation-name: shimmer;\n animation-duration: 1s;\n animation-iteration-count: infinite;\n }\n }\n}\n\n.ProgressBarContainer {\n display: flex;\n overflow: hidden;\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--progressBar-track-bgColor);\n border-radius: var(--borderRadius-small);\n gap: 2px;\n outline: solid 1px var(--progressBar-track-borderColor);\n outline-offset: -1px;\n\n &:where([data-progress-display='inline']) {\n display: inline-flex;\n }\n\n &:where([data-progress-bar-size='default']) {\n height: 8px;\n }\n\n &:where([data-progress-bar-size='small']) {\n height: 5px;\n }\n\n &:where([data-progress-bar-size='large']) {\n height: 10px;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../src/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAKjC,KAAK,YAAY,GAAG;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,KAAK,4BAA4B,GAAG;IAClC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAA;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,UAAU,GACZ,MAAM,CAAA;AAER,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG;IACrE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,YAAY,GACd,MAAM,CAAA;AAER,eAAO,MAAM,IAAI;mBALA,MAAM;gBACT,MAAM;iEAiDnB,CAAA;AAID,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG;IACrE,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,4BAA4B,GAC9B,YAAY,CAAA;AAEd,eAAO,MAAM,WAAW;SALjB,MAAM;gBACC,MAAM;;aA/DT,OAAO;cACN,OAAO,GAAG,SAAS,GAAG,OAAO;eAC5B,OAAO;mPAkHnB,CAAA"}
1
+ {"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../src/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAKjC,KAAK,YAAY,GAAG;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,KAAK,4BAA4B,GAAG;IAClC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAA;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,UAAU,GACZ,MAAM,CAAA;AAER,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG;IACrE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,YAAY,GACd,MAAM,CAAA;AAER,eAAO,MAAM,IAAI;mBALA,MAAM;gBACT,MAAM;iEAmDnB,CAAA;AAID,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG;IACrE,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,4BAA4B,GAC9B,YAAY,CAAA;AAEd,eAAO,MAAM,WAAW;SALjB,MAAM;gBACC,MAAM;;aAjET,OAAO;cACN,OAAO,GAAG,SAAS,GAAG,OAAO;eAC5B,OAAO;mPAoHnB,CAAA"}
@@ -12,10 +12,11 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
12
  var React__default = /*#__PURE__*/_interopDefault(React);
13
13
 
14
14
  const Item = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
15
- const $ = reactCompilerRuntime.c(32);
15
+ const $ = reactCompilerRuntime.c(33);
16
16
  let ariaLabel;
17
17
  let ariaValueNow;
18
18
  let ariaValueText;
19
+ let bg;
19
20
  let className;
20
21
  let progress;
21
22
  let rest;
@@ -28,93 +29,96 @@ const Item = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
28
29
  "aria-valuetext": ariaValueText,
29
30
  className,
30
31
  style,
32
+ bg,
31
33
  ...rest
32
34
  } = t0);
33
35
  $[0] = t0;
34
36
  $[1] = ariaLabel;
35
37
  $[2] = ariaValueNow;
36
38
  $[3] = ariaValueText;
37
- $[4] = className;
38
- $[5] = progress;
39
- $[6] = rest;
40
- $[7] = style;
39
+ $[4] = bg;
40
+ $[5] = className;
41
+ $[6] = progress;
42
+ $[7] = rest;
43
+ $[8] = style;
41
44
  } else {
42
45
  ariaLabel = $[1];
43
46
  ariaValueNow = $[2];
44
47
  ariaValueText = $[3];
45
- className = $[4];
46
- progress = $[5];
47
- rest = $[6];
48
- style = $[7];
48
+ bg = $[4];
49
+ className = $[5];
50
+ progress = $[6];
51
+ rest = $[7];
52
+ style = $[8];
49
53
  }
50
54
  const progressAsNumber = typeof progress === "string" ? parseInt(progress, 10) : progress;
51
55
  let t1;
52
- if ($[8] !== ariaValueNow || $[9] !== progressAsNumber) {
56
+ if ($[9] !== ariaValueNow || $[10] !== progressAsNumber) {
53
57
  var _ariaValueNow;
54
58
  t1 = (_ariaValueNow = ariaValueNow) !== null && _ariaValueNow !== void 0 ? _ariaValueNow : progressAsNumber !== undefined && progressAsNumber >= 0 ? Math.round(progressAsNumber) : 0;
55
- $[8] = ariaValueNow;
56
- $[9] = progressAsNumber;
57
- $[10] = t1;
59
+ $[9] = ariaValueNow;
60
+ $[10] = progressAsNumber;
61
+ $[11] = t1;
58
62
  } else {
59
- t1 = $[10];
63
+ t1 = $[11];
60
64
  }
61
65
  let t2;
62
- if ($[11] !== ariaValueText || $[12] !== t1) {
66
+ if ($[12] !== ariaValueText || $[13] !== t1) {
63
67
  t2 = {
64
68
  "aria-valuenow": t1,
65
69
  "aria-valuemin": 0,
66
70
  "aria-valuemax": 100,
67
71
  "aria-valuetext": ariaValueText
68
72
  };
69
- $[11] = ariaValueText;
70
- $[12] = t1;
71
- $[13] = t2;
73
+ $[12] = ariaValueText;
74
+ $[13] = t1;
75
+ $[14] = t2;
72
76
  } else {
73
- t2 = $[13];
77
+ t2 = $[14];
74
78
  }
75
79
  const ariaAttributes = t2;
76
80
  let styles;
77
- if ($[14] !== progress || $[15] !== rest.bg) {
81
+ if ($[15] !== bg || $[16] !== progress) {
78
82
  styles = {};
79
83
  let t3;
80
- if ($[17] !== rest.bg) {
81
- t3 = rest.bg && rest.bg.split(".");
82
- $[17] = rest.bg;
83
- $[18] = t3;
84
+ if ($[18] !== bg) {
85
+ t3 = bg && bg.split(".");
86
+ $[18] = bg;
87
+ $[19] = t3;
84
88
  } else {
85
- t3 = $[18];
89
+ t3 = $[19];
86
90
  }
87
91
  const bgType = t3;
88
92
  styles["--progress-width"] = progress ? `${progress}%` : "0%";
89
- styles["--progress-bg"] = bgType && `var(--bgColor-${bgType[0]}-${bgType[1]})` || "var(--bgColor-success-emphasis)";
90
- $[14] = progress;
91
- $[15] = rest.bg;
92
- $[16] = styles;
93
+ styles["--progress-bg"] = bgType && `var(--bgColor-${bgType[0]}-${bgType[1] || "emphasis"})` || "var(--bgColor-success-emphasis)";
94
+ $[15] = bg;
95
+ $[16] = progress;
96
+ $[17] = styles;
93
97
  } else {
94
- styles = $[16];
98
+ styles = $[17];
95
99
  }
96
100
  let t3;
97
- if ($[19] !== className) {
101
+ if ($[20] !== className) {
98
102
  t3 = clsx.clsx(className, ProgressBar_module.ProgressBarItem);
99
- $[19] = className;
100
- $[20] = t3;
103
+ $[20] = className;
104
+ $[21] = t3;
101
105
  } else {
102
- t3 = $[20];
106
+ t3 = $[21];
103
107
  }
104
108
  let t4;
105
- if ($[21] !== style || $[22] !== styles) {
109
+ if ($[22] !== style || $[23] !== styles) {
106
110
  t4 = {
107
111
  ...styles,
108
112
  ...style
109
113
  };
110
- $[21] = style;
111
- $[22] = styles;
112
- $[23] = t4;
114
+ $[22] = style;
115
+ $[23] = styles;
116
+ $[24] = t4;
113
117
  } else {
114
- t4 = $[23];
118
+ t4 = $[24];
115
119
  }
116
120
  let t5;
117
- if ($[24] !== ariaAttributes || $[25] !== ariaLabel || $[26] !== forwardRef || $[27] !== progress || $[28] !== rest || $[29] !== t3 || $[30] !== t4) {
121
+ if ($[25] !== ariaAttributes || $[26] !== ariaLabel || $[27] !== forwardRef || $[28] !== progress || $[29] !== rest || $[30] !== t3 || $[31] !== t4) {
118
122
  t5 = /*#__PURE__*/jsxRuntime.jsx(BoxWithFallback.BoxWithFallback, {
119
123
  as: "span",
120
124
  className: t3,
@@ -126,16 +130,16 @@ const Item = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
126
130
  style: t4,
127
131
  ...ariaAttributes
128
132
  });
129
- $[24] = ariaAttributes;
130
- $[25] = ariaLabel;
131
- $[26] = forwardRef;
132
- $[27] = progress;
133
- $[28] = rest;
134
- $[29] = t3;
135
- $[30] = t4;
136
- $[31] = t5;
133
+ $[25] = ariaAttributes;
134
+ $[26] = ariaLabel;
135
+ $[27] = forwardRef;
136
+ $[28] = progress;
137
+ $[29] = rest;
138
+ $[30] = t3;
139
+ $[31] = t4;
140
+ $[32] = t5;
137
141
  } else {
138
- t5 = $[31];
142
+ t5 = $[32];
139
143
  }
140
144
  return t5;
141
145
  });
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('./ProgressBar-430cdef7.css');
3
+ require('./ProgressBar-a0957632.css');
4
4
 
5
5
  var classes = {"ProgressBarItem":"prc-ProgressBar-ProgressBarItem-stL6O","ProgressBarContainer":"prc-ProgressBar-ProgressBarContainer-E-z8S"};
6
6
 
@@ -1,2 +1,2 @@
1
- .prc-Radio-Radio-Ly4MR{border-radius:var(--borderRadius-full,100vh);transition:background-color,border-color 80ms cubic-bezier(.33,1,.68,1)}.prc-Radio-Radio-Ly4MR:where(:checked){background-color:var(--control-checked-fgColor-rest,var(--color-switch-track-checked-fg));border-color:var(--control-checked-bgColor-rest,var(--color-switch-track-checked-bg));border-width:var(--borderWidth-thicker,.25rem)}.prc-Radio-Radio-Ly4MR:where(:checked):disabled{background-color:var(--fgColor-muted,var(--color-fg-muted));border-color:var(--fgColor-muted,var(--color-fg-muted));cursor:not-allowed}.prc-Radio-Radio-Ly4MR:focus,.prc-Radio-Radio-Ly4MR:focus-within{box-shadow:none;outline:2px solid var(--focus-outlineColor,var(--color-accent-fg));outline-offset:2px}@media (forced-colors:active){.prc-Radio-Radio-Ly4MR{background-color:canvastext;border-color:canvastext}}
2
- /*# sourceMappingURL=Radio-b2a92b7d.css.map */
1
+ .prc-Radio-Radio-Ly4MR{border-radius:var(--borderRadius-full,100vh);transition:background-color,border-color 80ms cubic-bezier(.33,1,.68,1)}.prc-Radio-Radio-Ly4MR:where(:checked){background-color:var(--control-checked-fgColor-rest,var(--color-switch-track-checked-fg));border-color:var(--control-checked-bgColor-rest,var(--color-switch-track-checked-bg));border-width:var(--borderWidth-thicker,.25rem)}.prc-Radio-Radio-Ly4MR:where(:checked):disabled{background-color:var(--fgColor-muted,var(--color-fg-muted));border-color:var(--fgColor-muted,var(--color-fg-muted));cursor:not-allowed}.prc-Radio-Radio-Ly4MR:focus-visible{box-shadow:none;outline:2px solid var(--focus-outlineColor,var(--color-accent-fg));outline-offset:2px}@media (forced-colors:active){.prc-Radio-Radio-Ly4MR{background-color:canvastext;border-color:canvastext}}
2
+ /*# sourceMappingURL=Radio-df9a5c02.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Radio/Radio.module.css","../../postcss-preset-primer/src/mixins/focusOutline.css"],"names":[],"mappings":"AAAA,uBACE,4CAA8C,CAC9C,uEA+BF,CA3BE,uCAEE,yFAAqD,CAIrD,qFAAiD,CACjD,8CASF,CAPE,gDAGE,2DAAsC,CAEtC,uDAAkC,CAJlC,kBAKF,CAGF,iECrBA,eAAgB,CAFhB,kEAAgC,CAChC,kBDyBA,CAEA,8BA7BF,uBA8BI,2BAA4B,CAC5B,uBAEJ,CADE","file":"Radio-b2a92b7d.css","sourcesContent":[".Radio {\n border-radius: var(--borderRadius-full, 100vh);\n transition:\n background-color,\n border-color 80ms cubic-bezier(0.33, 1, 0.68, 1); /* checked -> unchecked - add 120ms delay to fully see animation-out */\n\n &:where(:checked) {\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--control-checked-fgColor-rest);\n\n /* using bgColor here to avoid a border change in dark high contrast */\n /* stylelint-disable-next-line primer/colors */\n border-color: var(--control-checked-bgColor-rest);\n border-width: var(--borderWidth-thicker);\n\n &:disabled {\n cursor: not-allowed;\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--fgColor-muted);\n /* stylelint-disable-next-line primer/colors */\n border-color: var(--fgColor-muted);\n }\n }\n\n &:focus,\n &:focus-within {\n @mixin focusOutline 2px;\n }\n\n @media (forced-colors: active) {\n background-color: canvastext;\n border-color: canvastext;\n }\n}\n","@define-mixin focusOutline $outlineOffset: -2px, $outlineColor: var(--focus-outlineColor) {\n outline: 2px solid $outlineColor;\n outline-offset: $outlineOffset;\n box-shadow: none;\n}\n"]}
1
+ {"version":3,"sources":["../src/Radio/Radio.module.css","../../postcss-preset-primer/src/mixins/focusOutline.css"],"names":[],"mappings":"AAAA,uBACE,4CAA8C,CAC9C,uEA8BF,CA1BE,uCAEE,yFAAqD,CAIrD,qFAAiD,CACjD,8CASF,CAPE,gDAGE,2DAAsC,CAEtC,uDAAkC,CAJlC,kBAKF,CAGF,qCCrBA,eAAgB,CAFhB,kEAAgC,CAChC,kBDwBA,CAEA,8BA5BF,uBA6BI,2BAA4B,CAC5B,uBAEJ,CADE","file":"Radio-df9a5c02.css","sourcesContent":[".Radio {\n border-radius: var(--borderRadius-full, 100vh);\n transition:\n background-color,\n border-color 80ms cubic-bezier(0.33, 1, 0.68, 1); /* checked -> unchecked - add 120ms delay to fully see animation-out */\n\n &:where(:checked) {\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--control-checked-fgColor-rest);\n\n /* using bgColor here to avoid a border change in dark high contrast */\n /* stylelint-disable-next-line primer/colors */\n border-color: var(--control-checked-bgColor-rest);\n border-width: var(--borderWidth-thicker);\n\n &:disabled {\n cursor: not-allowed;\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--fgColor-muted);\n /* stylelint-disable-next-line primer/colors */\n border-color: var(--fgColor-muted);\n }\n }\n\n &:focus-visible {\n @mixin focusOutline 2px;\n }\n\n @media (forced-colors: active) {\n background-color: canvastext;\n border-color: canvastext;\n }\n}\n","@define-mixin focusOutline $outlineOffset: -2px, $outlineColor: var(--focus-outlineColor) {\n outline: 2px solid $outlineColor;\n outline-offset: $outlineOffset;\n box-shadow: none;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('./Radio-b2a92b7d.css');
3
+ require('./Radio-df9a5c02.css');
4
4
 
5
5
  var classes = {"Radio":"prc-Radio-Radio-Ly4MR"};
6
6