@primer/react 0.0.0-20260511213809 → 0.0.0-20260512173028
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 +29 -6
- package/dist/ActionList/{Group-743ff5c8.css → Group-efcb39da.css} +2 -2
- package/dist/ActionList/Group-efcb39da.css.map +1 -0
- package/dist/ActionList/Group.d.ts +6 -9
- package/dist/ActionList/Group.d.ts.map +1 -1
- package/dist/ActionList/Group.js +52 -22
- package/dist/ActionList/Group.module.css.js +2 -2
- package/dist/ActionList/GroupHeadingTrailingAction.d.ts +21 -0
- package/dist/ActionList/GroupHeadingTrailingAction.d.ts.map +1 -0
- package/dist/ActionList/GroupHeadingTrailingAction.js +66 -0
- package/dist/ActionList/index.d.ts +7 -1
- package/dist/ActionList/index.d.ts.map +1 -1
- package/dist/Blankslate/Blankslate.d.ts.map +1 -1
- package/dist/Blankslate/Blankslate.js +6 -0
- package/dist/BranchName/BranchName.js +1 -0
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +4 -0
- package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +1 -0
- package/dist/Checkbox/Checkbox.d.ts +1 -0
- package/dist/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox/Checkbox.js +10 -5
- package/dist/CheckboxGroup/CheckboxGroup.js +1 -0
- package/dist/CircleBadge/CircleBadge.d.ts.map +1 -1
- package/dist/CircleBadge/CircleBadge.js +44 -28
- package/dist/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
- package/dist/ConfirmationDialog/ConfirmationDialog.js +1 -0
- package/dist/CounterLabel/CounterLabel.d.ts +2 -0
- package/dist/CounterLabel/CounterLabel.d.ts.map +1 -1
- package/dist/CounterLabel/CounterLabel.js +25 -90
- package/dist/Details/Details.js +2 -0
- package/dist/Dialog/Dialog-f9bb927a.css +2 -0
- package/dist/Dialog/Dialog-f9bb927a.css.map +1 -0
- package/dist/Dialog/Dialog.d.ts +3 -4
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +18 -21
- package/dist/Dialog/Dialog.module.css.js +1 -1
- package/dist/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
- package/dist/FeatureFlags/DefaultFeatureFlags.js +2 -1
- package/dist/Flash/Flash.d.ts.map +1 -1
- package/dist/Flash/Flash.js +2 -1
- package/dist/FormControl/FormControl.d.ts.map +1 -1
- package/dist/FormControl/FormControl.js +2 -0
- package/dist/FormControl/FormControlCaption.d.ts.map +1 -1
- package/dist/FormControl/FormControlCaption.js +1 -0
- package/dist/FormControl/FormControlLabel.d.ts.map +1 -1
- package/dist/FormControl/FormControlLabel.js +1 -0
- package/dist/FormControl/FormControlLeadingVisual.d.ts.map +1 -1
- package/dist/FormControl/FormControlLeadingVisual.js +1 -0
- package/dist/FormControl/_FormControlValidation.d.ts.map +1 -1
- package/dist/FormControl/_FormControlValidation.js +1 -0
- package/dist/Header/Header.d.ts.map +1 -1
- package/dist/Header/Header.js +3 -0
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts +2 -0
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +4 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +3 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupContext.d.ts +1 -0
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupContext.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +3 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +3 -1
- package/dist/internal/components/InputValidation.d.ts +2 -1
- package/dist/internal/components/InputValidation.d.ts.map +1 -1
- package/dist/internal/components/InputValidation.js +64 -33
- package/generated/components.json +6 -2
- package/package.json +1 -1
- package/dist/ActionList/Group-743ff5c8.css.map +0 -1
- package/dist/Dialog/Dialog-b7da369a.css +0 -2
- package/dist/Dialog/Dialog-b7da369a.css.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,45 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20260512173028
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
- [#
|
|
7
|
+
- [#7829](https://github.com/primer/react/pull/7829) [`228019c`](https://github.com/primer/react/commit/228019cac474e94558e571c325692d3b40ca4488) Thanks [@adierkens](https://github.com/adierkens)! - ActionList: Add `ActionList.GroupHeading.TrailingAction` for header-level actions on grouped lists. Closes #2043.
|
|
8
|
+
|
|
9
|
+
When the `primer_react_action_list_group_heading_trailing_action` feature flag is enabled, you can place an `ActionList.GroupHeading.TrailingAction` (a small invisible `IconButton`) inside `ActionList.GroupHeading` to render a uniform square action target next to the group's heading. Only supported inside an `ActionList` with the default `list` role — using it inside `ActionMenu` or with `role="listbox"` will throw.
|
|
8
10
|
|
|
11
|
+
```tsx
|
|
12
|
+
<ActionList>
|
|
13
|
+
<ActionList.Group>
|
|
14
|
+
<ActionList.GroupHeading as="h3">
|
|
15
|
+
Custom fields
|
|
16
|
+
<ActionList.GroupHeading.TrailingAction label="New field" icon={PlusIcon} />
|
|
17
|
+
</ActionList.GroupHeading>
|
|
18
|
+
<ActionList.Item>...</ActionList.Item>
|
|
19
|
+
</ActionList.Group>
|
|
20
|
+
</ActionList>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- [#7776](https://github.com/primer/react/pull/7776) [`8b36590`](https://github.com/primer/react/commit/8b365905a171b48f2efe1e81b8b82d94d1697c93) Thanks [@llastflowers](https://github.com/llastflowers)! - Add `data-component` attributes for Blankslate, BranchName, Breadcrumbs, ButtonGroup, Checkbox, CheckboxGroup, CircleBadge, ConfirmationDialog, CounterLabel, and Dialog to provide stable selectors.
|
|
24
|
+
|
|
25
|
+
- [#7819](https://github.com/primer/react/pull/7819) [`8ed6149`](https://github.com/primer/react/commit/8ed6149b45093449c6e12a71a374618fe282d6a1) Thanks [@llastflowers](https://github.com/llastflowers)! - Add `data-component` attributes for Details, Flash, FormControl (+ update InputValidation to forward from FormControl.Validation), Header, and Heading.
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Fake entry to force publishing
|
|
30
|
+
|
|
31
|
+
## 38.23.0
|
|
32
|
+
|
|
33
|
+
### Minor Changes
|
|
34
|
+
|
|
35
|
+
- [#7817](https://github.com/primer/react/pull/7817) [`51a7a28`](https://github.com/primer/react/commit/51a7a28a8c1a44d80cffe774783dfff1d436a1d1) Thanks [@francinelucca](https://github.com/francinelucca)! - - ActionList: Expand `selectableRoles` and `listRoleTypes` to include `treeitem` and `tree`.
|
|
9
36
|
- Export `ActionListContainerContext` as `ActionList.ContainerContext`.
|
|
10
37
|
- Export `useRovingTabIndex` from the public API with additional configuration options (`preventScroll` and `dependencies`).
|
|
11
38
|
|
|
12
|
-
- [#7831](https://github.com/primer/react/pull/7831) [`c0111d7`](https://github.com/primer/react/commit/c0111d7a2f296434cf6ec671defd4f76bf772a8b) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Dialog: Support custom width values.
|
|
13
|
-
|
|
14
39
|
### Patch Changes
|
|
15
40
|
|
|
16
41
|
- [#7805](https://github.com/primer/react/pull/7805) [`8f8844e`](https://github.com/primer/react/commit/8f8844ef69a52b0462bf76cee389e61bb02de2d7) Thanks [@TylerJDev](https://github.com/TylerJDev)! - AnchoredOverlay: Disables CSS anchor positioning if `portalContainerName` is true. (behind `primer_react_css_anchor_positioning` feature flag)
|
|
17
42
|
|
|
18
|
-
- Fake entry to force publishing
|
|
19
|
-
|
|
20
43
|
- [#7800](https://github.com/primer/react/pull/7800) [`ce88bdf`](https://github.com/primer/react/commit/ce88bdf3191aaee0ad662803f285a4e77810ce9e) Thanks [@francinelucca](https://github.com/francinelucca)! - chore: add `primer_react_styled_react_use_primer_theme_providers` feature flag to DefaultFeatureFlags
|
|
21
44
|
|
|
22
45
|
- [#7802](https://github.com/primer/react/pull/7802) [`872bf46`](https://github.com/primer/react/commit/872bf464c0cdf2144b680ffe309ef4ad2ac1b5ac) Thanks [@TylerJDev](https://github.com/TylerJDev)! - AnchoredOverlay: Ensure overlay fits within viewport by calculating viewport height + width (behind `primer_react_css_anchor_positioning` feature flag)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.prc-ActionList-Group-lMIPQ{list-style:none}.prc-ActionList-Group-lMIPQ:not(:first-child){margin-block-start:var(--base-size-8,.5rem)}.prc-ActionList-Group-lMIPQ:not(:first-child):has(.prc-ActionList-GroupHeadingWrap-laXcX+ul>.prc-ActionList-GroupHeadingWrap-laXcX)>.prc-ActionList-GroupHeadingWrap-laXcX{display:none}.prc-ActionList-GroupList-V5B3-{padding-inline-start:0}.prc-ActionList-GroupHeadingWrap-laXcX{color:var(--fgColor-muted,#59636e);display:flex;flex-direction:column;font-size:var(--text-body-size-small,.75rem);font-weight:var(--base-text-weight-semibold,600);line-height:18px;padding-block:var(--base-size-6,.375rem);padding-inline:var(--base-size-16,1rem)}.prc-ActionList-GroupHeadingWrap-laXcX:where([data-variant=filled]){background:var(--bgColor-muted,#f6f8fa);border-bottom:var(--borderWidth-thin,.0625rem) solid var(--borderColor-muted,#d1d9e0b3);border-top:var(--borderWidth-thin,.0625rem) solid var(--borderColor-muted,#d1d9e0b3);margin-block-end:var(--base-size-8,.5rem);margin-block-start:calc(var(--base-size-8,.5rem) - var(--borderWidth-thin,.0625rem));padding-inline:var(--base-size-16,1rem)}.prc-ActionList-GroupHeadingWrap-laXcX:where([data-variant=filled]):first-child{margin-block-start:0}.prc-ActionList-GroupHeading-STzxi{align-self:flex-start;color:var(--fgColor-muted,#59636e);font-size:var(--text-body-size-small,.75rem);font-weight:var(--base-text-weight-semibold,600);margin:0}
|
|
2
|
-
/*# sourceMappingURL=Group-
|
|
1
|
+
.prc-ActionList-Group-lMIPQ{list-style:none}.prc-ActionList-Group-lMIPQ:not(:first-child){margin-block-start:var(--base-size-8,.5rem)}.prc-ActionList-Group-lMIPQ:not(:first-child):has(.prc-ActionList-GroupHeadingWrap-laXcX+ul>.prc-ActionList-GroupHeadingWrap-laXcX)>.prc-ActionList-GroupHeadingWrap-laXcX{display:none}.prc-ActionList-GroupList-V5B3-{padding-inline-start:0}.prc-ActionList-GroupHeadingWrap-laXcX{color:var(--fgColor-muted,#59636e);display:flex;flex-direction:column;font-size:var(--text-body-size-small,.75rem);font-weight:var(--base-text-weight-semibold,600);line-height:18px;padding-block:var(--base-size-6,.375rem);padding-inline:var(--base-size-16,1rem)}.prc-ActionList-GroupHeadingWrap-laXcX:where([data-variant=filled]){background:var(--bgColor-muted,#f6f8fa);border-bottom:var(--borderWidth-thin,.0625rem) solid var(--borderColor-muted,#d1d9e0b3);border-top:var(--borderWidth-thin,.0625rem) solid var(--borderColor-muted,#d1d9e0b3);margin-block-end:var(--base-size-8,.5rem);margin-block-start:calc(var(--base-size-8,.5rem) - var(--borderWidth-thin,.0625rem));padding-inline:var(--base-size-16,1rem)}.prc-ActionList-GroupHeadingWrap-laXcX:where([data-variant=filled]):first-child{margin-block-start:0}.prc-ActionList-GroupHeading-STzxi{align-self:flex-start;color:var(--fgColor-muted,#59636e);font-size:var(--text-body-size-small,.75rem);font-weight:var(--base-text-weight-semibold,600);margin:0}.prc-ActionList-GroupHeadingWrap-laXcX[data-has-trailing-action]{align-items:center;flex-direction:row;gap:var(--base-size-8,.5rem);justify-content:space-between}.prc-ActionList-GroupHeadingWrap-laXcX[data-has-trailing-action]>.prc-ActionList-GroupHeading-STzxi{align-self:center}.prc-ActionList-GroupHeadingTrailingAction-jnb64{align-items:center;display:inline-flex;margin-inline-start:auto}
|
|
2
|
+
/*# sourceMappingURL=Group-efcb39da.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ActionList/Group.module.css.js"],"names":[],"mappings":"AAAA,4BACE,eAcF,CAZE,8CACE,2CAUF,CAJI,2KACE,YACF,CAKN,gCACE,sBACF,CAEA,uCAQE,kCAA2B,CAP3B,YAAa,CAQb,qBAAsB,CAPtB,4CAAsC,CACtC,gDAA6C,CAI7C,gBAAiB,CAIjB,wCAAiC,CADjC,uCAoBF,CAjBE,oEAIE,uCAAgC,CAEhC,uFAAqE,CADrE,oFAAkE,CAFlE,yCAAoC,CADpC,oFAAsE,CAKtE,uCAKF,CAHE,gFACE,oBACF,CAQJ,mCAKE,qBAAsB,CADtB,kCAA2B,CAF3B,4CAAsC,CACtC,gDAA6C,CAF7C,QAKF,CAEA,iEAEE,kBAAmB,CADnB,kBAAmB,CAGnB,4BAAuB,CADvB,6BAMF,CAHE,oGACE,iBACF,CAGF,iDAEE,kBAAmB,CADnB,mBAAoB,CAEpB,wBACF","file":"Group-efcb39da.css","sourcesContent":[".Group {\n list-style: none;\n\n &:not(:first-child) {\n margin-block-start: var(--base-size-8);\n\n /* If somebody tries to pass the `title` prop AND a `NavList.GroupHeading` as a child, hide the `ActionList.GroupHeading */\n /* stylelint-disable-next-line selector-max-specificity, selector-pseudo-class-disallowed-list -- scoped to CSS Module, audited (github/github-ui#17224) */\n &:has(.GroupHeadingWrap + ul > .GroupHeadingWrap) {\n /* stylelint-disable-next-line selector-max-specificity */\n & > .GroupHeadingWrap {\n display: none;\n }\n }\n }\n}\n\n.GroupList {\n padding-inline-start: 0;\n}\n\n.GroupHeadingWrap {\n display: flex;\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-semibold);\n\n /* line-height: var(--text-body-lineHeight-small); use when FF rolls out */\n /* stylelint-disable-next-line primer/typography */\n line-height: 18px;\n color: var(--fgColor-muted);\n flex-direction: column;\n padding-inline: var(--base-size-16);\n padding-block: var(--base-size-6);\n\n &:where([data-variant='filled']) {\n /* stylelint-disable-next-line primer/spacing */\n margin-block-start: calc(var(--base-size-8) - var(--borderWidth-thin));\n margin-block-end: var(--base-size-8);\n background: var(--bgColor-muted);\n border-top: solid var(--borderWidth-thin) var(--borderColor-muted);\n border-bottom: solid var(--borderWidth-thin) var(--borderColor-muted);\n padding-inline: var(--base-size-16);\n\n &:first-child {\n margin-block-start: 0;\n }\n }\n\n /* & + ul:has(.GroupHeadingWrap) {\n outline: solid 1px red;\n } */\n}\n\n.GroupHeading {\n margin: 0;\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-muted);\n align-self: flex-start;\n}\n\n.GroupHeadingWrap[data-has-trailing-action] {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n gap: var(--base-size-8);\n\n & > .GroupHeading {\n align-self: center;\n }\n}\n\n.GroupHeadingTrailingAction {\n display: inline-flex;\n align-items: center;\n margin-inline-start: auto;\n}\n"]}
|
|
@@ -34,14 +34,11 @@ export type ActionListGroupHeadingProps = Pick<ActionListGroupProps, 'variant' |
|
|
|
34
34
|
_internalBackwardCompatibleTitle?: string;
|
|
35
35
|
variant?: 'filled' | 'subtle';
|
|
36
36
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
* groups under menu or listbox are labelled by `aria-label`
|
|
44
|
-
*/
|
|
45
|
-
export declare const GroupHeading: FCWithSlotMarker<React.PropsWithChildren<ActionListGroupHeadingProps>>;
|
|
37
|
+
export declare const GroupHeading: React.FC<React.PropsWithChildren<ActionListGroupHeadingProps>> & import("..").SlotMarker & {
|
|
38
|
+
TrailingAction: import("../utils/polymorphic").ForwardRefComponent<"a" | "button", import("./GroupHeadingTrailingAction").ActionListGroupHeadingTrailingActionProps> & {
|
|
39
|
+
__SLOT__?: import("..").SlotMarker;
|
|
40
|
+
displayName?: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
46
43
|
export {};
|
|
47
44
|
//# sourceMappingURL=Group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../src/ActionList/Group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAc,KAAK,eAAe,EAAC,MAAM,UAAU,CAAA;AAC1D,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AAMrD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../src/ActionList/Group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAc,KAAK,eAAe,EAAC,MAAM,UAAU,CAAA;AAC1D,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AAMrD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAA;AAqC1D,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,GAAG;IACvE;;;;;OAKG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,eAAe,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAA;CAC/D,CAAA;AAED,KAAK,YAAY,GAAG,IAAI,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,GAAG;IAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;CAAC,CAAA;AACzG,eAAO,MAAM,YAAY,6BAGvB,CAAA;AAEF,eAAO,MAAM,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,CAyDjF,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,eAAe,CAAC,GAC/F,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,GAClC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG;IAClC,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IAC5C,kBAAkB,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IACjC,gCAAgC,CAAC,EAAE,MAAM,CAAA;IACzC,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;CAC9B,CAAA;AAiHH,eAAO,MAAM,YAAY;;;;;CAEvB,CAAA"}
|
package/dist/ActionList/Group.js
CHANGED
|
@@ -7,8 +7,11 @@ import { invariant } from '../utils/invariant.js';
|
|
|
7
7
|
import { clsx } from 'clsx';
|
|
8
8
|
import classes from './ActionList.module.css.js';
|
|
9
9
|
import groupClasses from './Group.module.css.js';
|
|
10
|
-
import {
|
|
10
|
+
import { GroupHeadingTrailingAction } from './GroupHeadingTrailingAction.js';
|
|
11
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
12
|
+
import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
|
|
11
13
|
|
|
14
|
+
const GROUP_HEADING_TRAILING_ACTION_FEATURE_FLAG = 'primer_react_action_list_group_heading_trailing_action';
|
|
12
15
|
const Heading = t0 => {
|
|
13
16
|
const $ = c(12);
|
|
14
17
|
let children;
|
|
@@ -243,8 +246,8 @@ const Group = t0 => {
|
|
|
243
246
|
* hidden from the accessibility tree due to the limitation of listbox children. https://w3c.github.io/aria/#listbox
|
|
244
247
|
* groups under menu or listbox are labelled by `aria-label`
|
|
245
248
|
*/
|
|
246
|
-
const
|
|
247
|
-
const $ = c(
|
|
249
|
+
const GroupHeadingImpl = t0 => {
|
|
250
|
+
const $ = c(22);
|
|
248
251
|
let _internalBackwardCompatibleTitle;
|
|
249
252
|
let as;
|
|
250
253
|
let auxiliaryText;
|
|
@@ -291,14 +294,30 @@ const GroupHeading = t0 => {
|
|
|
291
294
|
const {
|
|
292
295
|
groupHeadingId
|
|
293
296
|
} = React.useContext(GroupContext);
|
|
297
|
+
const trailingActionEnabled = useFeatureFlag(GROUP_HEADING_TRAILING_ACTION_FEATURE_FLAG);
|
|
298
|
+
let t3;
|
|
299
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
300
|
+
t3 = {
|
|
301
|
+
trailingAction: GroupHeadingTrailingAction
|
|
302
|
+
};
|
|
303
|
+
$[9] = t3;
|
|
304
|
+
} else {
|
|
305
|
+
t3 = $[9];
|
|
306
|
+
}
|
|
307
|
+
const [slots, childrenWithoutSlots] = useSlots(children, t3);
|
|
308
|
+
const trailingAction = trailingActionEnabled ? slots.trailingAction : null;
|
|
309
|
+
const headingChildren = trailingActionEnabled ? childrenWithoutSlots : children;
|
|
310
|
+
if (trailingAction) {
|
|
311
|
+
!(listRole === undefined || listRole === "list") ? process.env.NODE_ENV !== "production" ? invariant(false, `ActionList.GroupHeading.TrailingAction can not be used inside an ActionList with an ARIA role of "${listRole}". Trailing actions on group headings are only supported in lists with the default "list" role.`) : invariant(false) : void 0;
|
|
312
|
+
}
|
|
294
313
|
const missingAsForList = (listRole === undefined || listRole === "list") && children !== undefined && as === undefined;
|
|
295
314
|
const unnecessaryAsForListboxOrMenu = listRole !== undefined && listRole !== "list" && children !== undefined && as !== undefined;
|
|
296
315
|
!!missingAsForList ? process.env.NODE_ENV !== "production" ? invariant(false, "You are setting a heading for a list, that requires a heading level. Please use 'as' prop to set a proper heading level.") : invariant(false) : void 0;
|
|
297
316
|
!!unnecessaryAsForListboxOrMenu ? process.env.NODE_ENV !== "production" ? invariant(false, `Looks like you are trying to set a heading level to a ${listRole} role. Group headings for ${listRole} type action lists are for representational purposes, and rendered as divs. Therefore they don't need a heading level.`) : invariant(false) : void 0;
|
|
298
|
-
let
|
|
299
|
-
if ($[
|
|
317
|
+
let t4;
|
|
318
|
+
if ($[10] !== _internalBackwardCompatibleTitle || $[11] !== as || $[12] !== auxiliaryText || $[13] !== className || $[14] !== groupHeadingId || $[15] !== headingChildren || $[16] !== headingWrapElement || $[17] !== listRole || $[18] !== props || $[19] !== trailingAction || $[20] !== variant) {
|
|
300
319
|
var _internalBackwardComp, _internalBackwardComp2;
|
|
301
|
-
|
|
320
|
+
t4 = /*#__PURE__*/jsx(Fragment, {
|
|
302
321
|
children: listRole && listRole !== "list" ? /*#__PURE__*/jsxs(HeadingWrap, {
|
|
303
322
|
role: "presentation",
|
|
304
323
|
className: groupClasses.GroupHeadingWrap,
|
|
@@ -310,7 +329,7 @@ const GroupHeading = t0 => {
|
|
|
310
329
|
children: [/*#__PURE__*/jsx("span", {
|
|
311
330
|
className: clsx(className, groupClasses.GroupHeading),
|
|
312
331
|
id: groupHeadingId,
|
|
313
|
-
children: (_internalBackwardComp = _internalBackwardCompatibleTitle) !== null && _internalBackwardComp !== void 0 ? _internalBackwardComp :
|
|
332
|
+
children: (_internalBackwardComp = _internalBackwardCompatibleTitle) !== null && _internalBackwardComp !== void 0 ? _internalBackwardComp : headingChildren
|
|
314
333
|
}), auxiliaryText && /*#__PURE__*/jsx("div", {
|
|
315
334
|
className: classes.Description,
|
|
316
335
|
children: auxiliaryText
|
|
@@ -318,6 +337,7 @@ const GroupHeading = t0 => {
|
|
|
318
337
|
}) : /*#__PURE__*/jsxs(HeadingWrap, {
|
|
319
338
|
className: groupClasses.GroupHeadingWrap,
|
|
320
339
|
"data-variant": variant,
|
|
340
|
+
"data-has-trailing-action": trailingAction ? "" : undefined,
|
|
321
341
|
as: headingWrapElement,
|
|
322
342
|
"data-component": "GroupHeadingWrap",
|
|
323
343
|
children: [/*#__PURE__*/jsx(Heading, {
|
|
@@ -325,32 +345,42 @@ const GroupHeading = t0 => {
|
|
|
325
345
|
as: as || "h3",
|
|
326
346
|
id: groupHeadingId,
|
|
327
347
|
...props,
|
|
328
|
-
children: (_internalBackwardComp2 = _internalBackwardCompatibleTitle) !== null && _internalBackwardComp2 !== void 0 ? _internalBackwardComp2 :
|
|
348
|
+
children: (_internalBackwardComp2 = _internalBackwardCompatibleTitle) !== null && _internalBackwardComp2 !== void 0 ? _internalBackwardComp2 : headingChildren
|
|
329
349
|
}), auxiliaryText && /*#__PURE__*/jsx("div", {
|
|
330
350
|
className: classes.Description,
|
|
331
351
|
children: auxiliaryText
|
|
332
|
-
})
|
|
352
|
+
}), trailingAction ? /*#__PURE__*/jsx("span", {
|
|
353
|
+
className: groupClasses.GroupHeadingTrailingAction,
|
|
354
|
+
children: trailingAction
|
|
355
|
+
}) : null]
|
|
333
356
|
})
|
|
334
357
|
});
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
338
|
-
$[12] = children;
|
|
358
|
+
$[10] = _internalBackwardCompatibleTitle;
|
|
359
|
+
$[11] = as;
|
|
360
|
+
$[12] = auxiliaryText;
|
|
339
361
|
$[13] = className;
|
|
340
362
|
$[14] = groupHeadingId;
|
|
341
|
-
$[15] =
|
|
342
|
-
$[16] =
|
|
343
|
-
$[17] =
|
|
344
|
-
$[18] =
|
|
345
|
-
$[19] =
|
|
363
|
+
$[15] = headingChildren;
|
|
364
|
+
$[16] = headingWrapElement;
|
|
365
|
+
$[17] = listRole;
|
|
366
|
+
$[18] = props;
|
|
367
|
+
$[19] = trailingAction;
|
|
368
|
+
$[20] = variant;
|
|
369
|
+
$[21] = t4;
|
|
346
370
|
} else {
|
|
347
|
-
|
|
371
|
+
t4 = $[21];
|
|
348
372
|
}
|
|
349
|
-
return
|
|
373
|
+
return t4;
|
|
350
374
|
};
|
|
351
|
-
|
|
375
|
+
GroupHeadingImpl.displayName = 'ActionList.GroupHeading';
|
|
352
376
|
Group.displayName = 'ActionList.Group';
|
|
353
377
|
Group.__SLOT__ = Symbol('ActionList.Group');
|
|
354
|
-
|
|
378
|
+
GroupHeadingImpl.__SLOT__ = Symbol('ActionList.GroupHeading');
|
|
379
|
+
|
|
380
|
+
// Expose GroupHeadingTrailingAction as ActionList.GroupHeading.TrailingAction
|
|
381
|
+
// so the API mirrors the visual nesting (the action lives inside the heading).
|
|
382
|
+
const GroupHeading = Object.assign(GroupHeadingImpl, {
|
|
383
|
+
TrailingAction: GroupHeadingTrailingAction
|
|
384
|
+
});
|
|
355
385
|
|
|
356
386
|
export { Group, GroupContext, GroupHeading };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './Group-
|
|
1
|
+
import './Group-efcb39da.css';
|
|
2
2
|
|
|
3
|
-
var groupClasses = {"Group":"prc-ActionList-Group-lMIPQ","GroupHeadingWrap":"prc-ActionList-GroupHeadingWrap-laXcX","GroupList":"prc-ActionList-GroupList-V5B3-","GroupHeading":"prc-ActionList-GroupHeading-STzxi"};
|
|
3
|
+
var groupClasses = {"Group":"prc-ActionList-Group-lMIPQ","GroupHeadingWrap":"prc-ActionList-GroupHeadingWrap-laXcX","GroupList":"prc-ActionList-GroupList-V5B3-","GroupHeading":"prc-ActionList-GroupHeading-STzxi","GroupHeadingTrailingAction":"prc-ActionList-GroupHeadingTrailingAction-jnb64"};
|
|
4
4
|
|
|
5
5
|
export { groupClasses as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ElementType } from 'react';
|
|
2
|
+
import type { ForwardRefComponent as PolymorphicForwardRefComponent } from '../utils/polymorphic';
|
|
3
|
+
import type { SlotMarker } from '../utils/types/Slots';
|
|
4
|
+
import type { ActionListTrailingActionProps } from './TrailingAction';
|
|
5
|
+
/**
|
|
6
|
+
* Props for `ActionList.GroupHeading.TrailingAction`.
|
|
7
|
+
*
|
|
8
|
+
* Mirrors the shape of `ActionList.TrailingAction` so the API is consistent
|
|
9
|
+
* across `ActionList.Item` and `ActionList.GroupHeading`. The only
|
|
10
|
+
* difference is that `icon` is required here — group headings are not
|
|
11
|
+
* interactive on their own, so the action must always render as a square
|
|
12
|
+
* IconButton with a uniform hit target.
|
|
13
|
+
*/
|
|
14
|
+
export type ActionListGroupHeadingTrailingActionProps = Omit<ActionListTrailingActionProps, 'icon'> & {
|
|
15
|
+
icon: ElementType;
|
|
16
|
+
};
|
|
17
|
+
export declare const GroupHeadingTrailingAction: PolymorphicForwardRefComponent<"a" | "button", ActionListGroupHeadingTrailingActionProps> & {
|
|
18
|
+
__SLOT__?: SlotMarker;
|
|
19
|
+
displayName?: string;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=GroupHeadingTrailingAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupHeadingTrailingAction.d.ts","sourceRoot":"","sources":["../../src/ActionList/GroupHeadingTrailingAction.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAC/F,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAC,6BAA6B,EAAC,MAAM,kBAAkB,CAAA;AAEnE;;;;;;;;GAQG;AACH,MAAM,MAAM,yCAAyC,GAAG,IAAI,CAAC,6BAA6B,EAAE,MAAM,CAAC,GAAG;IACpG,IAAI,EAAE,WAAW,CAAA;CAClB,CAAA;AA0BD,eAAO,MAAM,0BAA0B;eAP1B,UAAU;kBACP,MAAM;CAMkD,CAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { IconButton } from '../Button/IconButton.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
const GroupHeadingTrailingActionImpl = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
7
|
+
const $ = c(13);
|
|
8
|
+
let icon;
|
|
9
|
+
let label;
|
|
10
|
+
let props;
|
|
11
|
+
let t1;
|
|
12
|
+
let t2;
|
|
13
|
+
if ($[0] !== t0) {
|
|
14
|
+
({
|
|
15
|
+
as: t1,
|
|
16
|
+
icon,
|
|
17
|
+
label,
|
|
18
|
+
href: t2,
|
|
19
|
+
...props
|
|
20
|
+
} = t0);
|
|
21
|
+
$[0] = t0;
|
|
22
|
+
$[1] = icon;
|
|
23
|
+
$[2] = label;
|
|
24
|
+
$[3] = props;
|
|
25
|
+
$[4] = t1;
|
|
26
|
+
$[5] = t2;
|
|
27
|
+
} else {
|
|
28
|
+
icon = $[1];
|
|
29
|
+
label = $[2];
|
|
30
|
+
props = $[3];
|
|
31
|
+
t1 = $[4];
|
|
32
|
+
t2 = $[5];
|
|
33
|
+
}
|
|
34
|
+
const as = t1 === undefined ? "button" : t1;
|
|
35
|
+
const href = t2 === undefined ? null : t2;
|
|
36
|
+
let t3;
|
|
37
|
+
if ($[6] !== as || $[7] !== forwardedRef || $[8] !== href || $[9] !== icon || $[10] !== label || $[11] !== props) {
|
|
38
|
+
t3 = /*#__PURE__*/jsx(IconButton, {
|
|
39
|
+
as: as,
|
|
40
|
+
"aria-label": label,
|
|
41
|
+
icon: icon,
|
|
42
|
+
variant: "invisible",
|
|
43
|
+
size: "small",
|
|
44
|
+
tooltipDirection: "w",
|
|
45
|
+
href: href,
|
|
46
|
+
ref: forwardedRef,
|
|
47
|
+
"data-component": "ActionList.GroupHeading.TrailingAction",
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
$[6] = as;
|
|
51
|
+
$[7] = forwardedRef;
|
|
52
|
+
$[8] = href;
|
|
53
|
+
$[9] = icon;
|
|
54
|
+
$[10] = label;
|
|
55
|
+
$[11] = props;
|
|
56
|
+
$[12] = t3;
|
|
57
|
+
} else {
|
|
58
|
+
t3 = $[12];
|
|
59
|
+
}
|
|
60
|
+
return t3;
|
|
61
|
+
});
|
|
62
|
+
GroupHeadingTrailingActionImpl.displayName = 'ActionList.GroupHeading.TrailingAction';
|
|
63
|
+
GroupHeadingTrailingActionImpl.__SLOT__ = Symbol('ActionList.GroupHeading.TrailingAction');
|
|
64
|
+
const GroupHeadingTrailingAction = GroupHeadingTrailingActionImpl;
|
|
65
|
+
|
|
66
|
+
export { GroupHeadingTrailingAction };
|
|
@@ -7,6 +7,7 @@ export type { ActionListDescriptionProps } from './Description';
|
|
|
7
7
|
export type { ActionListLeadingVisualProps, ActionListTrailingVisualProps } from './Visuals';
|
|
8
8
|
export type { ActionListHeadingProps } from './Heading';
|
|
9
9
|
export type { ActionListTrailingActionProps } from './TrailingAction';
|
|
10
|
+
export type { ActionListGroupHeadingTrailingActionProps } from './GroupHeadingTrailingAction';
|
|
10
11
|
/**
|
|
11
12
|
* Collection of list-related components.
|
|
12
13
|
*/
|
|
@@ -135,7 +136,12 @@ export declare const ActionList: (<As extends React.ElementType = "ul">(props: (
|
|
|
135
136
|
groupHeadingId: string | undefined;
|
|
136
137
|
}>;
|
|
137
138
|
/** Heading for `ActionList.Group` */
|
|
138
|
-
GroupHeading: import("
|
|
139
|
+
GroupHeading: import("react").FC<import("react").PropsWithChildren<import("./Group").ActionListGroupHeadingProps>> & import("..").SlotMarker & {
|
|
140
|
+
TrailingAction: import("../utils/polymorphic").ForwardRefComponent<"a" | "button", import("./GroupHeadingTrailingAction").ActionListGroupHeadingTrailingActionProps> & {
|
|
141
|
+
__SLOT__?: import("..").SlotMarker;
|
|
142
|
+
displayName?: string;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
139
145
|
/** Secondary action */
|
|
140
146
|
TrailingAction: import("../utils/polymorphic").ForwardRefComponent<"a" | "button", import("./TrailingAction").ActionListTrailingActionProps>;
|
|
141
147
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ActionList/index.ts"],"names":[],"mappings":"AAWA,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;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ActionList/index.ts"],"names":[],"mappings":"AAWA,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;AACnE,YAAY,EAAC,yCAAyC,EAAC,MAAM,8BAA8B,CAAA;AAE3F;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;IACrB,8CAA8C;;;;;;;;;;;IAE9C,mDAAmD;;IAGnD,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGzC,+DAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;IAG/D,iEAAiE;;IAGjE,4EAA4E;;IAG5E,uDAAuD;;IAGvD,sDAAsD;;IAGtD,mCAAmC;;IAGnC,gGAAgG;;;;IAGhG,qCAAqC;;;;;;;IAGrC,uBAAuB;;CAEvB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blankslate.d.ts","sourceRoot":"","sources":["../../src/Blankslate/Blankslate.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG;IACzD;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;CACpC,CAAA;AAED,iBAAS,UAAU,CAAC,EAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAe,EAAE,GAAG,IAAI,EAAC,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"Blankslate.d.ts","sourceRoot":"","sources":["../../src/Blankslate/Blankslate.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG;IACzD;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;CACpC,CAAA;AAED,iBAAS,UAAU,CAAC,EAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAe,EAAE,GAAG,IAAI,EAAC,EAAE,eAAe,qBAuB7G;AAED,KAAK,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;AAE9D,iBAAS,MAAM,CAAC,EAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAC,EAAE,qBAAqB,qBAMpE;AAED,KAAK,sBAAsB,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG;IAChE,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAC7C,CAAA;AAED,iBAAS,OAAO,CAAC,EAAC,EAAE,EAAE,SAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAC,EAAE,sBAAsB,qBAU5F;AAED,KAAK,0BAA0B,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;AAEnE,iBAAS,WAAW,CAAC,EAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAC,EAAE,0BAA0B,qBAU9E;AAED,KAAK,4BAA4B,GAC7B,CAAC,KAAK,CAAC,iBAAiB,CAAC;IACvB,IAAI,CAAC,EAAE,KAAK,CAAA;CACb,CAAC,GACA,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAC,GAC3C,KAAK,CAAC,iBAAiB,CAAC;IACtB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC,CAAA;AAEN,iBAAS,aAAa,CAAC,EAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,EAAC,EAAE,4BAA4B,qBAe9E;AAED,KAAK,8BAA8B,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAC5D,IAAI,EAAE,MAAM,CAAA;CACb,CAAC,CAAA;AAEF,iBAAS,eAAe,CAAC,EAAC,QAAQ,EAAE,IAAI,EAAC,EAAE,8BAA8B,qBAMxE;AAED,OAAO,EAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAC,CAAA;AACjF,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,4BAA4B,EAC5B,8BAA8B,GAC/B,CAAA"}
|
|
@@ -70,6 +70,7 @@ function Blankslate(t0) {
|
|
|
70
70
|
if ($[12] !== children || $[13] !== size || $[14] !== t3 || $[15] !== t4 || $[16] !== t5 || $[17] !== t6) {
|
|
71
71
|
t7 = /*#__PURE__*/jsx("div", {
|
|
72
72
|
className: t3,
|
|
73
|
+
"data-component": "Blankslate",
|
|
73
74
|
"data-border": t4,
|
|
74
75
|
"data-narrow": t5,
|
|
75
76
|
"data-spacious": t6,
|
|
@@ -146,6 +147,7 @@ function Visual(t0) {
|
|
|
146
147
|
t2 = /*#__PURE__*/jsx("span", {
|
|
147
148
|
...rest,
|
|
148
149
|
className: t1,
|
|
150
|
+
"data-component": "Blankslate.Visual",
|
|
149
151
|
children: children
|
|
150
152
|
});
|
|
151
153
|
$[6] = children;
|
|
@@ -195,6 +197,7 @@ function Heading(t0) {
|
|
|
195
197
|
t3 = /*#__PURE__*/jsx(Component, {
|
|
196
198
|
...rest,
|
|
197
199
|
className: t2,
|
|
200
|
+
"data-component": "Blankslate.Heading",
|
|
198
201
|
children: children
|
|
199
202
|
});
|
|
200
203
|
$[7] = Component;
|
|
@@ -240,6 +243,7 @@ function Description(t0) {
|
|
|
240
243
|
t2 = /*#__PURE__*/jsx("p", {
|
|
241
244
|
...rest,
|
|
242
245
|
className: t1,
|
|
246
|
+
"data-component": "Blankslate.Description",
|
|
243
247
|
children: children
|
|
244
248
|
});
|
|
245
249
|
$[6] = children;
|
|
@@ -287,6 +291,7 @@ function PrimaryAction(t0) {
|
|
|
287
291
|
if ($[5] !== children || $[6] !== href || $[7] !== props || $[8] !== t2 || $[9] !== t3) {
|
|
288
292
|
t4 = /*#__PURE__*/jsx("div", {
|
|
289
293
|
className: t1,
|
|
294
|
+
"data-component": "Blankslate.PrimaryAction",
|
|
290
295
|
children: /*#__PURE__*/jsx(ButtonComponent, {
|
|
291
296
|
...props,
|
|
292
297
|
as: t2,
|
|
@@ -324,6 +329,7 @@ function SecondaryAction(t0) {
|
|
|
324
329
|
if ($[1] !== children || $[2] !== href) {
|
|
325
330
|
t2 = /*#__PURE__*/jsx("div", {
|
|
326
331
|
className: t1,
|
|
332
|
+
"data-component": "Blankslate.SecondaryAction",
|
|
327
333
|
children: /*#__PURE__*/jsx(Link, {
|
|
328
334
|
href: href,
|
|
329
335
|
children: children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,EAAE,EAAC,MAAM,SAAS,CAAA;AAC/B,OAAO,KAA6E,MAAM,OAAO,CAAA;AAUjG,OAAO,EAAC,KAAK,gBAAgB,EAAkB,MAAM,6BAA6B,CAAA;AAElF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACrD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,gBAAgB,CAAA;IAC7C;;;;OAIG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,CAAC,CAAA;AA8GF,iBAAS,WAAW,CAAC,EAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAiB,EAAE,OAAkB,EAAC,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,EAAE,EAAC,MAAM,SAAS,CAAA;AAC/B,OAAO,KAA6E,MAAM,OAAO,CAAA;AAUjG,OAAO,EAAC,KAAK,gBAAgB,EAAkB,MAAM,6BAA6B,CAAA;AAElF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACrD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,gBAAgB,CAAA;IAC7C;;;;OAIG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,CAAC,CAAA;AA8GF,iBAAS,WAAW,CAAC,EAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAiB,EAAE,OAAkB,EAAC,EAAE,gBAAgB,qBAwMzG;kBAxMQ,WAAW;;;AAoNpB,KAAK,0BAA0B,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,gBAAgB,CACpF,EAAE,EACF,GAAG,EACH;IACE,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CACF,CAAA;AAuBD,MAAM,MAAM,oBAAoB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,0BAA0B,CAAC,EAAE,CAAC,CAAA;;YApBlG,EAAE,SAAS,KAAK,CAAC,WAAW;aANtB,EAAE;mBACI,OAAO;;aADb,EAAE;mBACI,OAAO;;;;;;;AA4BtB,wBAAiF;AAEjF;;GAEG;AACH,eAAO,MAAM,UAAU;WA5BpB,EAAE,SAAS,KAAK,CAAC,WAAW;aANtB,EAAE;mBACI,OAAO;;aADb,EAAE;mBACI,OAAO;;;;CAiCuD,CAAA;AAE7E;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAA;AAE9C;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,oBAAoB,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -189,6 +189,7 @@ const BreadcrumbsMenuItem = /*#__PURE__*/React.forwardRef((t0, menuRefCallback)
|
|
|
189
189
|
t13 = /*#__PURE__*/jsxs(Details, {
|
|
190
190
|
ref: detailsRefCallback,
|
|
191
191
|
className: classes.MenuDetails,
|
|
192
|
+
"data-component": "Breadcrumbs.MenuItem",
|
|
192
193
|
children: [t10, t12]
|
|
193
194
|
});
|
|
194
195
|
$[21] = detailsRefCallback;
|
|
@@ -323,6 +324,7 @@ function Breadcrumbs({
|
|
|
323
324
|
if (overflow === 'wrap' || menuItems.length === 0) {
|
|
324
325
|
return React.Children.map(children, child_0 => /*#__PURE__*/jsx("li", {
|
|
325
326
|
className: classes.ItemWrapper,
|
|
327
|
+
"data-component": "Breadcrumbs.ItemWrapper",
|
|
326
328
|
children: child_0
|
|
327
329
|
}));
|
|
328
330
|
}
|
|
@@ -362,6 +364,7 @@ function Breadcrumbs({
|
|
|
362
364
|
ref: containerRef,
|
|
363
365
|
"data-overflow": overflow,
|
|
364
366
|
"data-variant": variant,
|
|
367
|
+
"data-component": "Breadcrumbs",
|
|
365
368
|
children: /*#__PURE__*/jsx(BreadcrumbsList, {
|
|
366
369
|
children: finalChildren
|
|
367
370
|
})
|
|
@@ -403,6 +406,7 @@ const BreadcrumbsItem = fixedForwardRef((props, ref) => {
|
|
|
403
406
|
className: clsx(className, classes.Item, selected && 'selected'),
|
|
404
407
|
"aria-current": selected ? 'page' : undefined,
|
|
405
408
|
ref: ref,
|
|
409
|
+
"data-component": "Breadcrumbs.Item",
|
|
406
410
|
...rest
|
|
407
411
|
});
|
|
408
412
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../src/ButtonGroup/ButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAC,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAKnD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAE/F,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;IAC/C,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC,CAAA;AAEF,QAAA,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../src/ButtonGroup/ButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAC,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAKnD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAE/F,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;IAC/C,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC,CAAA;AAEF,QAAA,MAAM,WAAW,EA0BX,8BAA8B,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAA;AAI7D,eAAe,WAAW,CAAA"}
|
|
@@ -27,6 +27,7 @@ export type CheckboxProps = {
|
|
|
27
27
|
* Used during form submission and to identify which checkbox inputs are selected
|
|
28
28
|
*/
|
|
29
29
|
value?: string;
|
|
30
|
+
'data-component'?: string;
|
|
30
31
|
} & Exclude<InputHTMLAttributes<HTMLInputElement>, 'value'>;
|
|
31
32
|
/**
|
|
32
33
|
* An accessible, native checkbox component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAiD,KAAK,mBAAmB,EAAoB,MAAM,OAAO,CAAA;AAExH,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,qCAAqC,CAAA;AAI7E,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAA;AAElD,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAiD,KAAK,mBAAmB,EAAoB,MAAM,OAAO,CAAA;AAExH,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,qCAAqC,CAAA;AAI7E,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAA;AAElD,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,OAAO,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC,CAAA;AAE3D;;GAEG;AACH,QAAA,MAAM,QAAQ,qGAuEb,CAAA;wBAK0B,cAAc,CAAC,OAAO,QAAQ,CAAC;AAA1D,wBAA0D"}
|
|
@@ -20,6 +20,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef(({
|
|
|
20
20
|
required,
|
|
21
21
|
validationStatus,
|
|
22
22
|
value,
|
|
23
|
+
['data-component']: dataComponent,
|
|
23
24
|
...rest
|
|
24
25
|
}, ref
|
|
25
26
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -66,11 +67,15 @@ const Checkbox = /*#__PURE__*/React.forwardRef(({
|
|
|
66
67
|
checkbox.setAttribute('aria-checked', checkbox.checked ? 'true' : 'false');
|
|
67
68
|
}
|
|
68
69
|
});
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
return (
|
|
71
|
+
/*#__PURE__*/
|
|
72
|
+
// @ts-expect-error inputProp needs a non nullable ref
|
|
73
|
+
jsx("input", {
|
|
74
|
+
...inputProps,
|
|
75
|
+
"data-component": dataComponent !== null && dataComponent !== void 0 ? dataComponent : 'Checkbox',
|
|
76
|
+
className: clsx(className, sharedClasses.Input, classes.Checkbox)
|
|
77
|
+
})
|
|
78
|
+
);
|
|
74
79
|
});
|
|
75
80
|
Checkbox.displayName = 'Checkbox';
|
|
76
81
|
Checkbox.__SLOT__ = Symbol('Checkbox');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircleBadge.d.ts","sourceRoot":"","sources":["../../src/CircleBadge/CircleBadge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAA;AAGlD,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAG5C,QAAA,MAAM,YAAY;;;;CAIjB,CAAA;AAED,MAAM,MAAM,gBAAgB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,IAAI;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,OAAO,YAAY,CAAA;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,WAAW,SAAS,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"CircleBadge.d.ts","sourceRoot":"","sources":["../../src/CircleBadge/CircleBadge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAA;AAGlD,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAG5C,QAAA,MAAM,YAAY;;;;CAIjB,CAAA;AAED,MAAM,MAAM,gBAAgB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,IAAI;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,OAAO,YAAY,CAAA;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,WAAW,SAAS,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC,CAAA;AAoBxE,QAAA,MAAM,eAAe;YAAW,YAAY;;CAE3C,CAAA;AAID,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,CAAA;AAEzE;;;GAGG;0BArBkB,EAAE,SAAS,KAAK,CAAC,WAAW,+BAAqC,gBAAgB,CAAC,EAAE,CAAC;;gBAU1E,YAAY;;;;AAY5C,wBAAkE"}
|