@primer/react 38.0.0-rc.4 → 38.0.0-rc.6
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 +64 -0
- package/dist/ActionList/Item.d.ts +47 -4
- package/dist/ActionList/Item.d.ts.map +1 -1
- package/dist/ActionList/Item.js +11 -3
- package/dist/ActionList/List.d.ts +23 -3
- package/dist/ActionList/List.d.ts.map +1 -1
- package/dist/ActionList/List.js +20 -13
- package/dist/ActionList/index.d.ts +67 -2
- package/dist/ActionList/index.d.ts.map +1 -1
- package/dist/ActionList/shared.d.ts +12 -6
- package/dist/ActionList/shared.d.ts.map +1 -1
- package/dist/ActionList/shared.js +3 -0
- package/dist/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/Autocomplete/AutocompleteMenu.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteMenu.js +2 -2
- package/dist/Avatar/Avatar.d.ts +2 -3
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +38 -46
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +15 -12
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +35 -34
- package/dist/Button/ButtonBase.d.ts.map +1 -1
- package/dist/Button/ButtonBase.js +8 -4
- package/dist/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
- package/dist/CheckboxGroup/index.d.ts +1 -1
- package/dist/CheckboxGroup/index.d.ts.map +1 -1
- package/dist/CircleBadge/CircleBadge-87549d20.css +2 -0
- package/dist/CircleBadge/CircleBadge-87549d20.css.map +1 -0
- package/dist/CircleBadge/CircleBadge.d.ts +14 -14
- package/dist/CircleBadge/CircleBadge.d.ts.map +1 -1
- package/dist/CircleBadge/CircleBadge.js +69 -13
- package/dist/CircleBadge/CircleBadge.module.css.js +5 -0
- package/dist/DataTable/{Table-87f4043f.css → Table-7f5cb3e4.css} +2 -2
- package/dist/DataTable/Table-7f5cb3e4.css.map +1 -0
- package/dist/DataTable/Table.js +1 -1
- package/dist/DataTable/Table.module.css.js +2 -2
- package/dist/Dialog/{Dialog-8a809d11.css → Dialog-1a61e61a.css} +2 -2
- package/dist/Dialog/Dialog-1a61e61a.css.map +1 -0
- package/dist/Dialog/Dialog.d.ts +6 -12
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +11 -26
- package/dist/Dialog/Dialog.module.css.js +2 -2
- package/dist/DialogV1/Dialog.d.ts +13 -11
- package/dist/DialogV1/Dialog.d.ts.map +1 -1
- package/dist/DialogV1/Dialog.js +71 -63
- package/dist/FormControl/FormControl.d.ts +6 -1
- package/dist/FormControl/FormControl.d.ts.map +1 -1
- package/dist/FormControl/FormControl.js +4 -1
- package/dist/FormControl/FormControlCaption.d.ts +2 -1
- package/dist/FormControl/FormControlCaption.d.ts.map +1 -1
- package/dist/FormControl/FormControlCaption.js +12 -9
- package/dist/FormControl/FormControlLabel.d.ts +1 -0
- package/dist/FormControl/FormControlLabel.d.ts.map +1 -1
- package/dist/FormControl/FormControlLeadingVisual.d.ts +3 -1
- package/dist/FormControl/FormControlLeadingVisual.d.ts.map +1 -1
- package/dist/FormControl/FormControlLeadingVisual.js +11 -8
- package/dist/FormControl/_FormControlValidation.d.ts +1 -0
- package/dist/FormControl/_FormControlValidation.d.ts.map +1 -1
- package/dist/FormControl/_FormControlValidation.js +11 -8
- package/dist/Heading/Heading.d.ts +4 -4
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +0 -11
- package/dist/KeybindingHint/components/Chord-d4edcc89.css +2 -0
- package/dist/KeybindingHint/components/Chord-d4edcc89.css.map +1 -0
- package/dist/KeybindingHint/components/Chord.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Chord.js +44 -68
- package/dist/KeybindingHint/components/Chord.module.css.js +5 -0
- package/dist/Label/Label.d.ts +1 -3
- package/dist/Label/Label.d.ts.map +1 -1
- package/dist/Label/Label.js +37 -69
- package/dist/Label/index.d.ts +0 -1
- package/dist/Label/index.d.ts.map +1 -1
- package/dist/LabelGroup/LabelGroup-eda75c0f.css +2 -0
- package/dist/LabelGroup/LabelGroup-eda75c0f.css.map +1 -0
- package/dist/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/dist/LabelGroup/LabelGroup.js +4 -10
- package/dist/LabelGroup/LabelGroup.module.css.js +5 -0
- package/dist/Link/Link-e01bdaee.css +2 -0
- package/dist/Link/Link-e01bdaee.css.map +1 -0
- package/dist/Link/Link.d.ts +11 -5
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +21 -29
- package/dist/Link/Link.module.css.js +1 -1
- package/dist/NavList/NavList-5dc067e3.css +2 -0
- package/dist/NavList/NavList-5dc067e3.css.map +1 -0
- package/dist/NavList/NavList.d.ts +4 -5
- package/dist/NavList/NavList.d.ts.map +1 -1
- package/dist/NavList/NavList.js +214 -420
- package/dist/NavList/NavList.module.css.js +5 -0
- package/dist/Overlay/Overlay.d.ts +1 -2
- package/dist/Overlay/Overlay.d.ts.map +1 -1
- package/dist/Overlay/Overlay.js +2 -3
- package/dist/Pagination/{Pagination-e98833e8.css → Pagination-1845feaa.css} +2 -2
- package/dist/Pagination/Pagination-1845feaa.css.map +1 -0
- package/dist/Pagination/Pagination.d.ts +1 -2
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +5 -13
- package/dist/Pagination/Pagination.module.css.js +1 -1
- package/dist/Placeholder.d.ts.map +1 -1
- package/dist/Popover/Popover.d.ts +0 -3
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/ScrollableRegion/ScrollableRegion-c1018dbe.css +2 -0
- package/dist/ScrollableRegion/ScrollableRegion-c1018dbe.css.map +1 -0
- package/dist/ScrollableRegion/ScrollableRegion.d.ts +1 -1
- package/dist/ScrollableRegion/ScrollableRegion.d.ts.map +1 -1
- package/dist/ScrollableRegion/ScrollableRegion.js +37 -31
- package/dist/ScrollableRegion/ScrollableRegion.module.css.js +5 -0
- package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +20 -1
- package/dist/Skeleton/SkeletonBox.js +2 -2
- package/dist/SkeletonAvatar/SkeletonAvatar.js +2 -2
- package/dist/StateLabel/{StateLabel-50420ff5.css → StateLabel-aaa1d148.css} +2 -2
- package/dist/StateLabel/{StateLabel-50420ff5.css.map → StateLabel-aaa1d148.css.map} +1 -1
- package/dist/StateLabel/StateLabel.module.css.js +1 -1
- package/dist/TabNav/TabNav.d.ts +4 -6
- package/dist/TabNav/TabNav.d.ts.map +1 -1
- package/dist/TabNav/TabNav.js +5 -7
- package/dist/Text/Text.d.ts +1 -2
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +1 -3
- package/dist/TextInput/TextInput.d.ts +1 -1
- package/dist/TextInputWithTokens/{TextInputWithTokens-fb9b5109.css → TextInputWithTokens-946ead3e.css} +2 -2
- package/dist/TextInputWithTokens/TextInputWithTokens-946ead3e.css.map +1 -0
- package/dist/TextInputWithTokens/TextInputWithTokens.d.ts.map +1 -1
- package/dist/TextInputWithTokens/TextInputWithTokens.js +6 -7
- package/dist/TextInputWithTokens/TextInputWithTokens.module.css.js +2 -2
- package/dist/ThemeProvider.js +3 -3
- package/dist/Token/Token.d.ts +1 -2
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/TokenBase.d.ts +1 -2
- package/dist/Token/TokenBase.d.ts.map +1 -1
- package/dist/Token/TokenBase.js +64 -63
- package/dist/Token/_RemoveTokenButton.d.ts +1 -2
- package/dist/Token/_RemoveTokenButton.d.ts.map +1 -1
- package/dist/Token/_RemoveTokenButton.js +38 -104
- package/dist/Token/_TokenTextContainer.d.ts +1 -1
- package/dist/Token/_TokenTextContainer.d.ts.map +1 -1
- package/dist/Token/_TokenTextContainer.js +40 -20
- package/dist/Tooltip/Tooltip.d.ts +1 -2
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +1 -2
- package/dist/TooltipV2/Tooltip.d.ts +16 -3
- package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.js +15 -5
- package/dist/UnderlineNav/UnderlineNav.js +2 -2
- package/dist/_VisuallyHidden.d.ts +5 -5
- package/dist/_VisuallyHidden.d.ts.map +1 -1
- package/dist/_VisuallyHidden.js +30 -32
- package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts +1 -2
- package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts.map +1 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +28 -13
- package/dist/hooks/useMnemonics.d.ts +1 -0
- package/dist/hooks/useMnemonics.d.ts.map +1 -1
- package/dist/hooks/useMnemonics.js +99 -57
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +1 -3
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.d.ts +1 -2
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +1 -3
- package/dist/internal/components/ConditionalWrapper.d.ts +2 -3
- package/dist/internal/components/ConditionalWrapper.d.ts.map +1 -1
- package/dist/internal/components/ConditionalWrapper.js +21 -18
- package/dist/internal/components/{InputValidation-057236a4.css → InputValidation-dddeaafd.css} +2 -2
- package/dist/internal/components/{InputValidation-057236a4.css.map → InputValidation-dddeaafd.css.map} +1 -1
- package/dist/internal/components/InputValidation.d.ts +1 -0
- package/dist/internal/components/InputValidation.d.ts.map +1 -1
- package/dist/internal/components/InputValidation.js +4 -4
- package/dist/internal/components/InputValidation.module.css.js +1 -1
- package/dist/internal/components/TextInputInnerAction.d.ts +1 -1
- package/dist/internal/components/UnderlineTabbedInterface.d.ts +11 -12
- package/dist/internal/components/UnderlineTabbedInterface.d.ts.map +1 -1
- package/dist/internal/components/UnderlineTabbedInterface.js +68 -63
- package/dist/internal/components/ValidationAnimationContainer.d.ts.map +1 -1
- package/dist/internal/components/ValidationAnimationContainer.js +5 -4
- package/dist/live-region/Announce.d.ts +2 -2
- package/dist/live-region/Announce.d.ts.map +1 -1
- package/dist/live-region/AriaAlert.d.ts +3 -3
- package/dist/live-region/AriaAlert.d.ts.map +1 -1
- package/dist/live-region/AriaAlert.js +14 -33
- package/dist/live-region/AriaStatus.d.ts +3 -3
- package/dist/live-region/AriaStatus.d.ts.map +1 -1
- package/dist/live-region/AriaStatus.js +14 -33
- package/dist/utils/modern-polymorphic.d.ts +22 -0
- package/dist/utils/modern-polymorphic.d.ts.map +1 -0
- package/dist/utils/modern-polymorphic.js +26 -0
- package/generated/components.json +4 -98
- package/package.json +7 -7
- package/dist/DataTable/Table-87f4043f.css.map +0 -1
- package/dist/Dialog/Dialog-8a809d11.css.map +0 -1
- package/dist/Link/Link-948b910e.css +0 -2
- package/dist/Link/Link-948b910e.css.map +0 -1
- package/dist/Pagination/Pagination-e98833e8.css.map +0 -1
- package/dist/TextInputWithTokens/TextInputWithTokens-fb9b5109.css.map +0 -1
- package/dist/utils/polymorphic2.d.ts +0 -16
- package/dist/utils/polymorphic2.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,69 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
+
## 38.0.0-rc.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4378ee8`](https://github.com/primer/react/commit/4378ee84442de8d75fbb34fcce48e28c09429c5c) Thanks [@langermank](https://github.com/langermank)! - Add missing CSS for `KeybindingHint`
|
|
8
|
+
|
|
9
|
+
## 38.0.0-rc.5
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- [#6874](https://github.com/primer/react/pull/6874) [`15824db`](https://github.com/primer/react/commit/15824db141ef32b3e090bcf1880f03bd9684392a) Thanks [@pksjce](https://github.com/pksjce)! - Remove sx from UnderlinePanels
|
|
14
|
+
|
|
15
|
+
- [#6690](https://github.com/primer/react/pull/6690) [`c5c2053`](https://github.com/primer/react/commit/c5c2053caf38da76a4310098e805b2edb05e2552) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Remove sx support from the Token component.
|
|
16
|
+
|
|
17
|
+
- [#6673](https://github.com/primer/react/pull/6673) [`19befd6`](https://github.com/primer/react/commit/19befd66b801532bb0ef85e60296c73d8c747fc5) Thanks [@llastflowers](https://github.com/llastflowers)! - Update CircleBadge component to no longer support sx
|
|
18
|
+
|
|
19
|
+
- [#6868](https://github.com/primer/react/pull/6868) [`2053cb3`](https://github.com/primer/react/commit/2053cb3f7ee15fe1e4c3cc9be3c09c82dd5aed93) Thanks [@mperrotti](https://github.com/mperrotti)! - Removes Box usage and sx prop from NavList and ActionList
|
|
20
|
+
|
|
21
|
+
- [#6631](https://github.com/primer/react/pull/6631) [`86b3e60`](https://github.com/primer/react/commit/86b3e6063855615675c87df6eccad41d83db3762) Thanks [@joshblack](https://github.com/joshblack)! - Remove the sx prop from Label
|
|
22
|
+
|
|
23
|
+
- [#6865](https://github.com/primer/react/pull/6865) [`eaf7e58`](https://github.com/primer/react/commit/eaf7e5840e4fbe4042c80711f983a0df05e2b68d) Thanks [@francinelucca](https://github.com/francinelucca)! - chore: remove sx from Overlay
|
|
24
|
+
|
|
25
|
+
- [#6825](https://github.com/primer/react/pull/6825) [`4196e0e`](https://github.com/primer/react/commit/4196e0eed6894d020a83b9f382f5cb6817f9a725) Thanks [@mperrotti](https://github.com/mperrotti)! - Removes `Box` component usage and `sx` prop from the `Link` component, Storybook stories, and a .figma.tsx file
|
|
26
|
+
|
|
27
|
+
- [#6864](https://github.com/primer/react/pull/6864) [`b0abd78`](https://github.com/primer/react/commit/b0abd785713d9f95ca9d5e41394e00153176077d) Thanks [@jonrohan](https://github.com/jonrohan)! - Remove support for `sx` from the `TabNav` component
|
|
28
|
+
|
|
29
|
+
- [#6923](https://github.com/primer/react/pull/6923) [`e5753f0`](https://github.com/primer/react/commit/e5753f0560fc57d426e795c012ffcb0b7fb0d290) Thanks [@francinelucca](https://github.com/francinelucca)! - chore: remove sx from deprecated Dialog
|
|
30
|
+
|
|
31
|
+
- [#6729](https://github.com/primer/react/pull/6729) [`7ae5db2`](https://github.com/primer/react/commit/7ae5db229837fdd75dd73ce1779c7faa18734f89) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Update Text component to no longer support sx.
|
|
32
|
+
|
|
33
|
+
- [#6667](https://github.com/primer/react/pull/6667) [`d122122`](https://github.com/primer/react/commit/d12212225884b17cf6236af9feb8b098caaeea35) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Update Tooltip component to no longer support sx.
|
|
34
|
+
|
|
35
|
+
- [#6611](https://github.com/primer/react/pull/6611) [`15c1eb7`](https://github.com/primer/react/commit/15c1eb734210938182323bb15200d69ae4a3a300) Thanks [@joshblack](https://github.com/joshblack)! - Update Avatar component to no longer support sx, add sx wrapper to @primer/styled-react
|
|
36
|
+
|
|
37
|
+
- [#6844](https://github.com/primer/react/pull/6844) [`1f9f582`](https://github.com/primer/react/commit/1f9f582f29e623a33401061832d8b6ab778c47b3) Thanks [@TylerJDev](https://github.com/TylerJDev)! - Update `Breadcrumbs` to no longer support sx
|
|
38
|
+
|
|
39
|
+
- [#6812](https://github.com/primer/react/pull/6812) [`0834e9e`](https://github.com/primer/react/commit/0834e9ebe910c363f413723a254e0f2bd947a4b6) Thanks [@joshblack](https://github.com/joshblack)! - Remove support for `sx` from the Dialog component and sub-components
|
|
40
|
+
|
|
41
|
+
- [#6928](https://github.com/primer/react/pull/6928) [`2eeff36`](https://github.com/primer/react/commit/2eeff368832b6fc122aef70302f681b1f14ad71f) Thanks [@mperrotti](https://github.com/mperrotti)! - Removes `sx` prop from VisuallyHidden component, and as a result also removes `sx` prop from CheckboxGroup.Label and RadioGroup.Label
|
|
42
|
+
|
|
43
|
+
- [#6860](https://github.com/primer/react/pull/6860) [`628e601`](https://github.com/primer/react/commit/628e60172343fdf1c94734c39480991b0591e267) Thanks [@joshblack](https://github.com/joshblack)! - Remove support for `sx` from the `Heading` component
|
|
44
|
+
|
|
45
|
+
- [#6805](https://github.com/primer/react/pull/6805) [`0f075d1`](https://github.com/primer/react/commit/0f075d1a679f0733ad984eeb2a677989ceca8ad0) Thanks [@mperrotti](https://github.com/mperrotti)! - Removes usage of Box component from other components.
|
|
46
|
+
|
|
47
|
+
### Minor Changes
|
|
48
|
+
|
|
49
|
+
- [#6889](https://github.com/primer/react/pull/6889) [`9201d93`](https://github.com/primer/react/commit/9201d939056333945375c454999d853e0bbabf8f) Thanks [@broccolinisoup](https://github.com/broccolinisoup)! - Tooltip: Add delay functionality to tooltips with the options of `instant` (default), `medium`, `long`
|
|
50
|
+
|
|
51
|
+
- [#6937](https://github.com/primer/react/pull/6937) [`09ee0ea`](https://github.com/primer/react/commit/09ee0ea580ba6901d6e80cb35f7cc846db17197e) Thanks [@francinelucca](https://github.com/francinelucca)! - chore: add styles to formcontrol and subcomponents
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- [#6900](https://github.com/primer/react/pull/6900) [`e3e601c`](https://github.com/primer/react/commit/e3e601c545967eb79fb7bc752c8895b93fda620e) Thanks [@francinelucca](https://github.com/francinelucca)! - fix(SelectPanel): do not bubble up keyboard events
|
|
56
|
+
|
|
57
|
+
- [#6673](https://github.com/primer/react/pull/6673) [`19befd6`](https://github.com/primer/react/commit/19befd66b801532bb0ef85e60296c73d8c747fc5) Thanks [@llastflowers](https://github.com/llastflowers)! - Remove support for `sx` from `CircleBadge` component
|
|
58
|
+
|
|
59
|
+
- [#6908](https://github.com/primer/react/pull/6908) [`af288e6`](https://github.com/primer/react/commit/af288e632c042c5e82aae6ee2bd5107e8be2b9ec) Thanks [@llastflowers](https://github.com/llastflowers)! - update FormControl ValidationIcon position
|
|
60
|
+
|
|
61
|
+
- [#6931](https://github.com/primer/react/pull/6931) [`d5c5ecf`](https://github.com/primer/react/commit/d5c5ecf17a40571976d7974d3b57158455afec38) Thanks [@francinelucca](https://github.com/francinelucca)! - use UnderlinePanels.Tab, UnderlinePanels.Panel from @primer/react
|
|
62
|
+
|
|
63
|
+
- [#6905](https://github.com/primer/react/pull/6905) [`1cb348f`](https://github.com/primer/react/commit/1cb348f079dffcf10bdf422b1e14e0a29fa4662d) Thanks [@lukasoppermann](https://github.com/lukasoppermann)! - Replace StateLabel color with new draft token
|
|
64
|
+
|
|
65
|
+
- [#6927](https://github.com/primer/react/pull/6927) [`913739d`](https://github.com/primer/react/commit/913739dfe4b7d8f4f5829157e200bd538e509e74) Thanks [@lukasoppermann](https://github.com/lukasoppermann)! - Link: Adjust text-decoration-offset
|
|
66
|
+
|
|
3
67
|
## 38.0.0-rc.4
|
|
4
68
|
|
|
5
69
|
### Major Changes
|
|
@@ -1,10 +1,53 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ForwardRefComponent as PolymorphicForwardRefComponent } from '../utils/polymorphic';
|
|
3
|
-
import type { ActionListItemProps } from './shared';
|
|
4
2
|
type ActionListSubItemProps = {
|
|
5
3
|
children?: React.ReactNode;
|
|
6
4
|
};
|
|
7
5
|
export declare const SubItem: React.FC<ActionListSubItemProps>;
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
declare const Item: <As extends React.ElementType = "li">(props: (import("../utils/modern-polymorphic").PolymorphicProps<As, "li"> extends infer T ? T extends import("../utils/modern-polymorphic").PolymorphicProps<As, "li"> ? T extends any ? Omit<T, "onSelect"> : never : never : never) & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
onSelect?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
|
|
9
|
+
selected?: boolean;
|
|
10
|
+
active?: boolean;
|
|
11
|
+
variant?: "default" | "danger";
|
|
12
|
+
size?: "medium" | "large";
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
role?: import("../utils/types").AriaRole;
|
|
15
|
+
id?: string;
|
|
16
|
+
inactiveText?: string;
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
_PrivateItemWrapper?: React.FC<React.PropsWithChildren<{
|
|
19
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
20
|
+
onKeyPress?: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
21
|
+
'aria-disabled'?: boolean;
|
|
22
|
+
tabIndex?: number;
|
|
23
|
+
'aria-labelledby'?: string;
|
|
24
|
+
'aria-describedby'?: string;
|
|
25
|
+
role?: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
}>>;
|
|
28
|
+
className?: string;
|
|
29
|
+
groupId?: string;
|
|
30
|
+
renderItem?: (item: React.FC<React.PropsWithChildren<{
|
|
31
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
32
|
+
onKeyPress?: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
33
|
+
'aria-disabled'?: boolean;
|
|
34
|
+
tabIndex?: number;
|
|
35
|
+
'aria-labelledby'?: string;
|
|
36
|
+
'aria-describedby'?: string;
|
|
37
|
+
role?: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
}>>) => React.ReactNode;
|
|
40
|
+
handleAddItem?: (item: React.FC<React.PropsWithChildren<{
|
|
41
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
42
|
+
onKeyPress?: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
43
|
+
'aria-disabled'?: boolean;
|
|
44
|
+
tabIndex?: number;
|
|
45
|
+
'aria-labelledby'?: string;
|
|
46
|
+
'aria-describedby'?: string;
|
|
47
|
+
role?: string;
|
|
48
|
+
className?: string;
|
|
49
|
+
}>>) => void;
|
|
50
|
+
as?: As | undefined;
|
|
51
|
+
} & import("..").SxProp & React.RefAttributes<any>) => React.ReactNode;
|
|
52
|
+
export { Item };
|
|
10
53
|
//# sourceMappingURL=Item.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/ActionList/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/ActionList/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAoBzB,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAEpD,CAAA;AAsSD,QAAA,MAAM,IAAI,GA9Qa,EAAE,SAAS,KAAK,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sEA8QR,CAAA;AAI3C,OAAO,EAAC,IAAI,EAAC,CAAA"}
|
package/dist/ActionList/Item.js
CHANGED
|
@@ -14,6 +14,7 @@ import VisuallyHidden from '../_VisuallyHidden.js';
|
|
|
14
14
|
import classes from './ActionList.module.css.js';
|
|
15
15
|
import { clsx } from 'clsx';
|
|
16
16
|
import { BoxWithFallback } from '../internal/components/BoxWithFallback.js';
|
|
17
|
+
import { fixedForwardRef } from '../utils/modern-polymorphic.js';
|
|
17
18
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
18
19
|
|
|
19
20
|
const SubItem = ({
|
|
@@ -47,7 +48,7 @@ const DivItemContainerNoBox = /*#__PURE__*/React.forwardRef(({
|
|
|
47
48
|
children: children
|
|
48
49
|
});
|
|
49
50
|
});
|
|
50
|
-
const
|
|
51
|
+
const UnwrappedItem = ({
|
|
51
52
|
variant = 'default',
|
|
52
53
|
size = 'medium',
|
|
53
54
|
disabled = false,
|
|
@@ -223,7 +224,10 @@ const Item = /*#__PURE__*/React.forwardRef(({
|
|
|
223
224
|
children: [/*#__PURE__*/jsxs(ItemWrapper, {
|
|
224
225
|
...wrapperProps,
|
|
225
226
|
className: classes.ActionListContent,
|
|
226
|
-
"data-size": size
|
|
227
|
+
"data-size": size
|
|
228
|
+
// @ts-ignore: ItemWrapper is polymorphic and the ref type depends on the rendered element ('button' or 'li')
|
|
229
|
+
,
|
|
230
|
+
ref: forwardedRef,
|
|
227
231
|
children: [/*#__PURE__*/jsx("span", {
|
|
228
232
|
className: classes.Spacer
|
|
229
233
|
}), /*#__PURE__*/jsx(Selection, {
|
|
@@ -269,7 +273,11 @@ const Item = /*#__PURE__*/React.forwardRef(({
|
|
|
269
273
|
}), !inactive && !loading && !menuContext && Boolean(slots.trailingAction) && slots.trailingAction, slots.subItem]
|
|
270
274
|
})
|
|
271
275
|
});
|
|
276
|
+
};
|
|
277
|
+
UnwrappedItem.displayName = "UnwrappedItem";
|
|
278
|
+
const Item = fixedForwardRef(UnwrappedItem);
|
|
279
|
+
Object.assign(Item, {
|
|
280
|
+
displayName: 'ActionList.Item'
|
|
272
281
|
});
|
|
273
|
-
Item.displayName = 'ActionList.Item';
|
|
274
282
|
|
|
275
283
|
export { Item, SubItem };
|
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const List: <As extends React.ElementType = "ul">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "ul" : As> & {
|
|
3
|
+
variant?: "inset" | "horizontal-inset" | "full";
|
|
4
|
+
selectionVariant?: "single" | "radio" | "multiple";
|
|
5
|
+
showDividers?: boolean;
|
|
6
|
+
role?: import("../utils/types").AriaRole;
|
|
7
|
+
disableFocusZone?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & {
|
|
10
|
+
children?: React.ReactNode | undefined;
|
|
11
|
+
} extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "ul" : As> & {
|
|
12
|
+
variant?: "inset" | "horizontal-inset" | "full";
|
|
13
|
+
selectionVariant?: "single" | "radio" | "multiple";
|
|
14
|
+
showDividers?: boolean;
|
|
15
|
+
role?: import("../utils/types").AriaRole;
|
|
16
|
+
disableFocusZone?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
} & {
|
|
19
|
+
children?: React.ReactNode | undefined;
|
|
20
|
+
} ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
|
|
21
|
+
as?: As | undefined;
|
|
22
|
+
} & import("..").SxProp & React.RefAttributes<unknown>) => React.ReactNode;
|
|
23
|
+
export { List };
|
|
4
24
|
//# sourceMappingURL=List.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/ActionList/List.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/ActionList/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAqFzB,QAAA,MAAM,IAAI,GAxEa,EAAE,SAAS,KAAK,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;0EAwER,CAAA;AAI3C,OAAO,EAAC,IAAI,EAAC,CAAA"}
|
package/dist/ActionList/List.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { fixedForwardRef } from '../utils/modern-polymorphic.js';
|
|
2
3
|
import { ActionListContainerContext } from './ActionListContainerContext.js';
|
|
3
4
|
import { useSlots } from '../hooks/useSlots.js';
|
|
4
5
|
import { Heading } from './Heading.js';
|
|
@@ -12,17 +13,19 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
12
13
|
import { useProvidedRefOrCreate } from '../hooks/useProvidedRefOrCreate.js';
|
|
13
14
|
import { FocusKeys } from '@primer/behaviors';
|
|
14
15
|
|
|
15
|
-
const
|
|
16
|
-
variant = 'inset',
|
|
17
|
-
selectionVariant,
|
|
18
|
-
showDividers = false,
|
|
19
|
-
role,
|
|
20
|
-
disableFocusZone = false,
|
|
21
|
-
className,
|
|
22
|
-
...props
|
|
23
|
-
}, forwardedRef) => {
|
|
16
|
+
const UnwrappedList = (props, forwardedRef) => {
|
|
24
17
|
var _slots$heading$props$;
|
|
25
|
-
const
|
|
18
|
+
const {
|
|
19
|
+
as: Component = 'ul',
|
|
20
|
+
variant = 'inset',
|
|
21
|
+
selectionVariant,
|
|
22
|
+
showDividers = false,
|
|
23
|
+
role,
|
|
24
|
+
disableFocusZone = false,
|
|
25
|
+
className,
|
|
26
|
+
...restProps
|
|
27
|
+
} = props;
|
|
28
|
+
const [slots, childrenWithoutSlots] = useSlots(restProps.children, {
|
|
26
29
|
heading: Heading
|
|
27
30
|
});
|
|
28
31
|
const headingId = useId();
|
|
@@ -56,18 +59,22 @@ const List = /*#__PURE__*/React.forwardRef(({
|
|
|
56
59
|
headingId
|
|
57
60
|
},
|
|
58
61
|
children: [slots.heading, /*#__PURE__*/jsx(BoxWithFallback, {
|
|
59
|
-
as:
|
|
62
|
+
as: Component,
|
|
60
63
|
className: clsx(classes.ActionList, className),
|
|
61
64
|
role: listRole,
|
|
62
65
|
"aria-labelledby": ariaLabelledBy,
|
|
63
66
|
ref: listRef,
|
|
64
67
|
"data-dividers": showDividers,
|
|
65
68
|
"data-variant": variant,
|
|
66
|
-
...
|
|
69
|
+
...restProps,
|
|
67
70
|
children: childrenWithoutSlots
|
|
68
71
|
})]
|
|
69
72
|
});
|
|
73
|
+
};
|
|
74
|
+
UnwrappedList.displayName = "UnwrappedList";
|
|
75
|
+
const List = fixedForwardRef(UnwrappedList);
|
|
76
|
+
Object.assign(List, {
|
|
77
|
+
displayName: 'ActionList'
|
|
70
78
|
});
|
|
71
|
-
List.displayName = 'ActionList';
|
|
72
79
|
|
|
73
80
|
export { List };
|
|
@@ -10,11 +10,76 @@ export type { ActionListTrailingActionProps } from './TrailingAction';
|
|
|
10
10
|
/**
|
|
11
11
|
* Collection of list-related components.
|
|
12
12
|
*/
|
|
13
|
-
export declare const ActionList: import("
|
|
13
|
+
export declare const ActionList: (<As extends React.ElementType = "ul">(props: (import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "ul" : As> & {
|
|
14
|
+
variant?: "inset" | "horizontal-inset" | "full";
|
|
15
|
+
selectionVariant?: "single" | "radio" | "multiple";
|
|
16
|
+
showDividers?: boolean;
|
|
17
|
+
role?: import("../utils/types").AriaRole;
|
|
18
|
+
disableFocusZone?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
} & {
|
|
21
|
+
children?: import("react").ReactNode | undefined;
|
|
22
|
+
} extends infer T ? T extends import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "ul" : As> & {
|
|
23
|
+
variant?: "inset" | "horizontal-inset" | "full";
|
|
24
|
+
selectionVariant?: "single" | "radio" | "multiple";
|
|
25
|
+
showDividers?: boolean;
|
|
26
|
+
role?: import("../utils/types").AriaRole;
|
|
27
|
+
disableFocusZone?: boolean;
|
|
28
|
+
className?: string;
|
|
29
|
+
} & {
|
|
30
|
+
children?: import("react").ReactNode | undefined;
|
|
31
|
+
} ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
|
|
32
|
+
as?: As | undefined;
|
|
33
|
+
} & import("..").SxProp & import("react").RefAttributes<unknown>) => React.ReactNode) & {
|
|
14
34
|
/** Collects related `Items` in an `ActionList`. */
|
|
15
35
|
Group: import("react").FC<import("react").PropsWithChildren<import("./Group").ActionListGroupProps>>;
|
|
16
36
|
/** An actionable or selectable `Item` */
|
|
17
|
-
Item: import("../utils/polymorphic").
|
|
37
|
+
Item: <As extends React.ElementType = "li">(props: (import("../utils/modern-polymorphic").PolymorphicProps<As, "li"> extends infer T ? T extends import("../utils/modern-polymorphic").PolymorphicProps<As, "li"> ? T extends any ? Omit<T, "onSelect"> : never : never : never) & {
|
|
38
|
+
children?: React.ReactNode;
|
|
39
|
+
onSelect?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
|
|
40
|
+
selected?: boolean;
|
|
41
|
+
active?: boolean;
|
|
42
|
+
variant?: "default" | "danger";
|
|
43
|
+
size?: "medium" | "large";
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
role?: import("../utils/types").AriaRole;
|
|
46
|
+
id?: string;
|
|
47
|
+
inactiveText?: string;
|
|
48
|
+
loading?: boolean;
|
|
49
|
+
_PrivateItemWrapper?: React.FC<React.PropsWithChildren<{
|
|
50
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
51
|
+
onKeyPress?: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
52
|
+
'aria-disabled'?: boolean;
|
|
53
|
+
tabIndex?: number;
|
|
54
|
+
'aria-labelledby'?: string;
|
|
55
|
+
'aria-describedby'?: string;
|
|
56
|
+
role?: string;
|
|
57
|
+
className?: string;
|
|
58
|
+
}>>;
|
|
59
|
+
className?: string;
|
|
60
|
+
groupId?: string;
|
|
61
|
+
renderItem?: (item: React.FC<React.PropsWithChildren<{
|
|
62
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
63
|
+
onKeyPress?: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
64
|
+
'aria-disabled'?: boolean;
|
|
65
|
+
tabIndex?: number;
|
|
66
|
+
'aria-labelledby'?: string;
|
|
67
|
+
'aria-describedby'?: string;
|
|
68
|
+
role?: string;
|
|
69
|
+
className?: string;
|
|
70
|
+
}>>) => React.ReactNode;
|
|
71
|
+
handleAddItem?: (item: React.FC<React.PropsWithChildren<{
|
|
72
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
73
|
+
onKeyPress?: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
74
|
+
'aria-disabled'?: boolean;
|
|
75
|
+
tabIndex?: number;
|
|
76
|
+
'aria-labelledby'?: string;
|
|
77
|
+
'aria-describedby'?: string;
|
|
78
|
+
role?: string;
|
|
79
|
+
className?: string;
|
|
80
|
+
}>>) => void;
|
|
81
|
+
as?: As | undefined;
|
|
82
|
+
} & import("..").SxProp & import("react").RefAttributes<any>) => React.ReactNode;
|
|
18
83
|
/** A `Item` that renders a full-size anchor inside ListItem */
|
|
19
84
|
LinkItem: import("../utils/polymorphic").ForwardRefComponent<"a", import("./LinkItem").ActionListLinkItemProps>;
|
|
20
85
|
/** Visually separates `Item`s or `Group`s in an `ActionList`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ActionList/index.ts"],"names":[],"mappings":"AAUA,YAAY,EAAC,eAAe,EAAC,MAAM,UAAU,CAAA;AAC7C,YAAY,EAAC,oBAAoB,EAAE,2BAA2B,EAAC,MAAM,SAAS,CAAA;AAC9E,YAAY,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAA;AACjD,YAAY,EAAC,uBAAuB,EAAC,MAAM,YAAY,CAAA;AACvD,YAAY,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AACrD,YAAY,EAAC,0BAA0B,EAAC,MAAM,eAAe,CAAA;AAC7D,YAAY,EAAC,4BAA4B,EAAE,6BAA6B,EAAC,MAAM,WAAW,CAAA;AAC1F,YAAY,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AACrD,YAAY,EAAC,6BAA6B,EAAC,MAAM,kBAAkB,CAAA;AAEnE;;GAEG;AACH,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ActionList/index.ts"],"names":[],"mappings":"AAUA,YAAY,EAAC,eAAe,EAAC,MAAM,UAAU,CAAA;AAC7C,YAAY,EAAC,oBAAoB,EAAE,2BAA2B,EAAC,MAAM,SAAS,CAAA;AAC9E,YAAY,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAA;AACjD,YAAY,EAAC,uBAAuB,EAAC,MAAM,YAAY,CAAA;AACvD,YAAY,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AACrD,YAAY,EAAC,0BAA0B,EAAC,MAAM,eAAe,CAAA;AAC7D,YAAY,EAAC,4BAA4B,EAAE,6BAA6B,EAAC,MAAM,WAAW,CAAA;AAC1F,YAAY,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AACrD,YAAY,EAAC,6BAA6B,EAAC,MAAM,kBAAkB,CAAA;AAEnE;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;IACrB,mDAAmD;;IAGnD,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGzC,+DAA+D;;IAG/D,iEAAiE;;IAGjE,4EAA4E;;IAG5E,uDAAuD;;IAGvD,sDAAsD;;IAGtD,mCAAmC;;IAGnC,qCAAqC;;IAGrC,uBAAuB;;CAEvB,CAAA"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SxProp } from '../sx';
|
|
3
3
|
import type { AriaRole } from '../utils/types';
|
|
4
|
-
|
|
4
|
+
import type { PolymorphicProps } from '../utils/modern-polymorphic';
|
|
5
|
+
type ExcludeSelectEventHandler<T> = T extends any ? Omit<T, 'onSelect'> : never;
|
|
6
|
+
export type ActionListItemProps<As extends React.ElementType = 'li'> = ExcludeSelectEventHandler<PolymorphicProps<As, 'li'>> & {
|
|
5
7
|
/**
|
|
6
8
|
* Primary content for an Item
|
|
7
9
|
*/
|
|
@@ -56,6 +58,10 @@ export type ActionListItemProps = {
|
|
|
56
58
|
groupId?: string;
|
|
57
59
|
renderItem?: (item: React.FC<React.PropsWithChildren<MenuItemProps>>) => React.ReactNode;
|
|
58
60
|
handleAddItem?: (item: React.FC<React.PropsWithChildren<MenuItemProps>>) => void;
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated `as` prop has no effect on `ActionList.Item`, only `ActionList.LinkItem`
|
|
63
|
+
*/
|
|
64
|
+
as?: As;
|
|
59
65
|
} & SxProp;
|
|
60
66
|
type MenuItemProps = {
|
|
61
67
|
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
@@ -67,14 +73,14 @@ type MenuItemProps = {
|
|
|
67
73
|
role?: string;
|
|
68
74
|
className?: string;
|
|
69
75
|
};
|
|
70
|
-
export type ItemContext = Pick<ActionListItemProps
|
|
76
|
+
export type ItemContext = Pick<ActionListItemProps<React.ElementType>, 'variant' | 'disabled' | 'size'> & {
|
|
71
77
|
inlineDescriptionId?: string;
|
|
72
78
|
blockDescriptionId?: string;
|
|
73
79
|
trailingVisualId?: string;
|
|
74
80
|
inactive?: boolean;
|
|
75
81
|
};
|
|
76
82
|
export declare const ItemContext: React.Context<ItemContext>;
|
|
77
|
-
export declare const getVariantStyles: (variant: ActionListItemProps["variant"], disabled: ActionListItemProps["disabled"], inactive?: boolean) => {
|
|
83
|
+
export declare const getVariantStyles: (variant: ActionListItemProps<React.ElementType>["variant"], disabled: ActionListItemProps<React.ElementType>["disabled"], inactive?: boolean) => {
|
|
78
84
|
color: string;
|
|
79
85
|
iconColor: string;
|
|
80
86
|
annotationColor: string;
|
|
@@ -86,7 +92,7 @@ export declare const getVariantStyles: (variant: ActionListItemProps["variant"],
|
|
|
86
92
|
hoverColor: string;
|
|
87
93
|
};
|
|
88
94
|
export declare const TEXT_ROW_HEIGHT = "20px";
|
|
89
|
-
export type ActionListProps = React.PropsWithChildren<{
|
|
95
|
+
export type ActionListProps<As extends React.ElementType = 'ul'> = PolymorphicProps<As, 'ul', React.PropsWithChildren<{
|
|
90
96
|
/**
|
|
91
97
|
* `inset` children are offset (vertically and horizontally) from `List`’s edges, `full` children are flush (vertically and horizontally) with `List` edges
|
|
92
98
|
*/
|
|
@@ -108,8 +114,8 @@ export type ActionListProps = React.PropsWithChildren<{
|
|
|
108
114
|
*/
|
|
109
115
|
disableFocusZone?: boolean;
|
|
110
116
|
className?: string;
|
|
111
|
-
}
|
|
112
|
-
type ContextProps = Pick<ActionListProps
|
|
117
|
+
}>> & SxProp;
|
|
118
|
+
type ContextProps = Pick<ActionListProps<React.ElementType>, 'variant' | 'selectionVariant' | 'showDividers' | 'role'> & {
|
|
113
119
|
headingId?: string;
|
|
114
120
|
};
|
|
115
121
|
export declare const ListContext: React.Context<ContextProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/ActionList/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AACjC,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/ActionList/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AACjC,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAA;AAC5C,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,6BAA6B,CAAA;AAIjE,KAAK,yBAAyB,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,GAAG,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,KAAK,CAAA;AAE/E,MAAM,MAAM,mBAAmB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,IAAI,IAAI,yBAAyB,CAC9F,gBAAgB,CAAC,EAAE,EAAE,IAAI,CAAC,CAC3B,GAAG;IACF;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;IAC5F;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG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AER,KAAK,YAAY,GAAG,IAAI,CACtB,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,EAClC,SAAS,GAAG,kBAAkB,GAAG,cAAc,GAAG,MAAM,CACzD,GAAG;IACF,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW,6BAAwC,CAAA"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
+
// need to explicitly omit `onSelect` from native HTML <li> attributes to avoid collision
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
|
+
|
|
3
6
|
const ItemContext = /*#__PURE__*/React.createContext({});
|
|
4
7
|
|
|
5
8
|
const ListContext = /*#__PURE__*/React.createContext({});
|
|
@@ -29,7 +29,7 @@ declare const _default: React.FC<React.PropsWithChildren<{
|
|
|
29
29
|
showMenu: boolean;
|
|
30
30
|
} | null>;
|
|
31
31
|
Input: import("../utils/polymorphic").ForwardRefComponent<import("../utils/polymorphic").ForwardRefComponent<"input", import("..").TextInputProps> & {
|
|
32
|
-
Action: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "
|
|
32
|
+
Action: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label" | "size" | "tooltipDirection"> & {
|
|
33
33
|
children?: React.ReactNode;
|
|
34
34
|
"aria-label"?: string;
|
|
35
35
|
tooltipDirection?: "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteMenu.d.ts","sourceRoot":"","sources":["../../src/Autocomplete/AutocompleteMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAA;AAK7E,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,eAAe,CAAA;AAGtD,OAAO,KAAK,EAAC,cAAc,EAAE,YAAY,
|
|
1
|
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AAI,CAAA;IAE/C;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,OAAO,CAAA;IAE1C;;;OAGG;IACH,KAAK,EAAE,CAAC,EAAE,CAAA;IAEV;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;OAEG;IAEH,eAAe,EAAE,MAAM,EAAE,CAAA;IAEzB;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAA;IAE5D;;OAEG;IACH,gBAAgB,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IAExC;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAEtC;;OAEG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAA;IAEtC;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAErE,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC5B,CAAA;AAUD,iBAAS,gBAAgB,CAAC,CAAC,SAAS,qBAAqB,EAAE,KAAK,EAAE,6BAA6B,CAAC,CAAC,CAAC,qBAgRjG;kBAhRQ,gBAAgB;;;AAoRzB,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAC3E,eAAe,gBAAgB,CAAA"}
|
|
@@ -215,9 +215,8 @@ function AutocompleteMenu(props) {
|
|
|
215
215
|
text,
|
|
216
216
|
leadingVisual: LeadingVisual,
|
|
217
217
|
trailingVisual: TrailingVisual,
|
|
218
|
-
// @ts-expect-error this is defined in the items above but is
|
|
219
|
-
// missing in TS
|
|
220
218
|
key,
|
|
219
|
+
role,
|
|
221
220
|
...itemProps
|
|
222
221
|
} = item_2;
|
|
223
222
|
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
@@ -225,6 +224,7 @@ function AutocompleteMenu(props) {
|
|
|
225
224
|
...itemProps,
|
|
226
225
|
id: id_0,
|
|
227
226
|
"data-id": id_0,
|
|
227
|
+
role: role,
|
|
228
228
|
children: [LeadingVisual && /*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
229
229
|
children: isElement(LeadingVisual) ? LeadingVisual : /*#__PURE__*/jsx(LeadingVisual, {})
|
|
230
230
|
}), children !== null && children !== void 0 ? children : text, TrailingVisual && /*#__PURE__*/jsx(ActionList.TrailingVisual, {
|
package/dist/Avatar/Avatar.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { SxProp } from '../sx';
|
|
3
2
|
import type { ResponsiveValue } from '../hooks/useResponsiveValue';
|
|
4
3
|
export declare const DEFAULT_AVATAR_SIZE = 20;
|
|
5
4
|
export type AvatarProps = {
|
|
@@ -13,7 +12,7 @@ export type AvatarProps = {
|
|
|
13
12
|
alt?: string;
|
|
14
13
|
/** Additional class name. */
|
|
15
14
|
className?: string;
|
|
16
|
-
} &
|
|
15
|
+
} & React.ComponentPropsWithoutRef<'img'>;
|
|
17
16
|
declare const Avatar: React.ForwardRefExoticComponent<{
|
|
18
17
|
/** Sets the width and height of the avatar. */
|
|
19
18
|
size?: number | ResponsiveValue<number>;
|
|
@@ -25,6 +24,6 @@ declare const Avatar: React.ForwardRefExoticComponent<{
|
|
|
25
24
|
alt?: string;
|
|
26
25
|
/** Additional class name. */
|
|
27
26
|
className?: string;
|
|
28
|
-
} &
|
|
27
|
+
} & Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
29
28
|
export default Avatar;
|
|
30
29
|
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/Avatar/Avatar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/Avatar/Avatar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAA;AAIhE,eAAO,MAAM,mBAAmB,KAAK,CAAA;AAErC,MAAM,MAAM,WAAW,GAAG;IACxB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;IACvC,+FAA+F;IAC/F,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,+BAA+B;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,mFAAmF;IACnF,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAEzC,QAAA,MAAM,MAAM;IAZV,+CAA+C;WACxC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;IACvC,+FAA+F;aACtF,OAAO;IAChB,+BAA+B;SAC1B,MAAM;IACX,mFAAmF;UAC7E,MAAM;IACZ,6BAA6B;gBACjB,MAAM;8IAuClB,CAAA;AAMF,eAAe,MAAM,CAAA"}
|