@primer/react 38.23.0 → 38.24.0-rc.4089ee5c5
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 +30 -0
- package/dist/ActionBar/ActionBar-e63def3c.css +2 -0
- package/dist/ActionBar/ActionBar-e63def3c.css.map +1 -0
- package/dist/ActionBar/ActionBar.d.ts +1 -1
- package/dist/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar/ActionBar.js +295 -381
- package/dist/ActionBar/ActionBar.module.css.js +2 -2
- package/dist/ActionBar/index.d.ts +1 -1
- 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 +3 -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.d.ts +6 -2
- package/dist/Details/Details.d.ts.map +1 -1
- package/dist/Details/Details.js +31 -22
- package/dist/Dialog/Dialog.d.ts +1 -0
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +16 -6
- 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/Timeline/{Timeline-ad31a7fb.css → Timeline-05decc91.css} +2 -2
- package/dist/Timeline/Timeline-05decc91.css.map +1 -0
- package/dist/Timeline/Timeline.module.css.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts +1 -0
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +5 -2
- 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 +4 -0
- package/package.json +1 -1
- package/dist/ActionBar/ActionBar-a41224b2.css +0 -2
- package/dist/ActionBar/ActionBar-a41224b2.css.map +0 -1
- package/dist/ActionList/Group-743ff5c8.css.map +0 -1
- package/dist/Timeline/Timeline-ad31a7fb.css.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './ActionBar-
|
|
1
|
+
import './ActionBar-e63def3c.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"List":"prc-ActionBar-List-9uz46","Divider":"prc-ActionBar-Divider-6V8yH","Nav":"prc-ActionBar-Nav-9spON","Group":"prc-ActionBar-Group-peNCk"};
|
|
3
|
+
var styles = {"List":"prc-ActionBar-List-9uz46","detect-overflow":"prc-ActionBar-detect-overflow-mAuJu","Divider":"prc-ActionBar-Divider-6V8yH","Nav":"prc-ActionBar-Nav-9spON","Group":"prc-ActionBar-Group-peNCk","OverflowContainer":"prc-ActionBar-OverflowContainer-AkYZs","OverflowSpacer":"prc-ActionBar-OverflowSpacer-tbHkV","MoreButton":"prc-ActionBar-MoreButton-RHqpx"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { ActionBarProps, ActionBarMenuProps, ActionBarMenuItemProps } from './ActionBar';
|
|
2
2
|
declare const ActionBar: import("react").FC<import("react").PropsWithChildren<import("./ActionBar").ActionBarProps>> & {
|
|
3
3
|
IconButton: import("react").ForwardRefExoticComponent<import("./ActionBar").ActionBarIconButtonProps & import("react").RefAttributes<unknown>>;
|
|
4
|
-
Divider: () => import("react").JSX.Element
|
|
4
|
+
Divider: () => import("react").JSX.Element;
|
|
5
5
|
Group: import("react").ForwardRefExoticComponent<{
|
|
6
6
|
children?: import("react").ReactNode | undefined;
|
|
7
7
|
} & import("react").RefAttributes<unknown>>;
|
|
@@ -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;IAC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AAiB,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,QAA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AC,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;
|
|
@@ -362,6 +363,7 @@ function Breadcrumbs({
|
|
|
362
363
|
ref: containerRef,
|
|
363
364
|
"data-overflow": overflow,
|
|
364
365
|
"data-variant": variant,
|
|
366
|
+
"data-component": "Breadcrumbs",
|
|
365
367
|
children: /*#__PURE__*/jsx(BreadcrumbsList, {
|
|
366
368
|
children: finalChildren
|
|
367
369
|
})
|
|
@@ -403,6 +405,7 @@ const BreadcrumbsItem = fixedForwardRef((props, ref) => {
|
|
|
403
405
|
className: clsx(className, classes.Item, selected && 'selected'),
|
|
404
406
|
"aria-current": selected ? 'page' : undefined,
|
|
405
407
|
ref: ref,
|
|
408
|
+
"data-component": "Breadcrumbs.Item",
|
|
406
409
|
...rest
|
|
407
410
|
});
|
|
408
411
|
});
|
|
@@ -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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BAU1E,YAAY;;;;AAY5C,wBAAkE"}
|
|
@@ -21,69 +21,85 @@ const sizeStyles = ({
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
const CircleBadge = t0 => {
|
|
24
|
-
const $ = c(
|
|
24
|
+
const $ = c(14);
|
|
25
25
|
let T0;
|
|
26
26
|
let t1;
|
|
27
27
|
let t2;
|
|
28
28
|
let t3;
|
|
29
29
|
let t4;
|
|
30
|
+
let t5;
|
|
30
31
|
if ($[0] !== t0) {
|
|
31
32
|
const {
|
|
32
|
-
as:
|
|
33
|
+
as: t6,
|
|
33
34
|
...props
|
|
34
35
|
} = t0;
|
|
35
|
-
const Component =
|
|
36
|
+
const Component = t6 === undefined ? "div" : t6;
|
|
36
37
|
T0 = Component;
|
|
37
38
|
t1 = props;
|
|
38
|
-
t2 =
|
|
39
|
-
t3 = props.
|
|
40
|
-
t4 =
|
|
39
|
+
t2 = "CircleBadge";
|
|
40
|
+
t3 = clsx(styles.CircleBadge, props.className);
|
|
41
|
+
t4 = props.inline ? "" : undefined;
|
|
42
|
+
t5 = sizeStyles(props);
|
|
41
43
|
$[0] = t0;
|
|
42
44
|
$[1] = T0;
|
|
43
45
|
$[2] = t1;
|
|
44
46
|
$[3] = t2;
|
|
45
47
|
$[4] = t3;
|
|
46
48
|
$[5] = t4;
|
|
49
|
+
$[6] = t5;
|
|
47
50
|
} else {
|
|
48
51
|
T0 = $[1];
|
|
49
52
|
t1 = $[2];
|
|
50
53
|
t2 = $[3];
|
|
51
54
|
t3 = $[4];
|
|
52
55
|
t4 = $[5];
|
|
56
|
+
t5 = $[6];
|
|
53
57
|
}
|
|
54
|
-
let
|
|
55
|
-
if ($[
|
|
56
|
-
|
|
58
|
+
let t6;
|
|
59
|
+
if ($[7] !== T0 || $[8] !== t1 || $[9] !== t2 || $[10] !== t3 || $[11] !== t4 || $[12] !== t5) {
|
|
60
|
+
t6 = /*#__PURE__*/jsx(T0, {
|
|
57
61
|
...t1,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
"data-component": t2,
|
|
63
|
+
className: t3,
|
|
64
|
+
"data-inline": t4,
|
|
65
|
+
style: t5
|
|
61
66
|
});
|
|
62
|
-
$[
|
|
63
|
-
$[
|
|
64
|
-
$[
|
|
65
|
-
$[
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
67
|
+
$[7] = T0;
|
|
68
|
+
$[8] = t1;
|
|
69
|
+
$[9] = t2;
|
|
70
|
+
$[10] = t3;
|
|
71
|
+
$[11] = t4;
|
|
72
|
+
$[12] = t5;
|
|
73
|
+
$[13] = t6;
|
|
68
74
|
} else {
|
|
69
|
-
|
|
75
|
+
t6 = $[13];
|
|
70
76
|
}
|
|
71
|
-
return
|
|
77
|
+
return t6;
|
|
72
78
|
};
|
|
73
79
|
const CircleBadgeIcon = props => {
|
|
74
|
-
const $ = c(
|
|
80
|
+
const $ = c(5);
|
|
75
81
|
let t0;
|
|
76
|
-
if ($[0] !== props) {
|
|
77
|
-
t0 =
|
|
78
|
-
|
|
79
|
-
...props
|
|
80
|
-
});
|
|
81
|
-
$[0] = props;
|
|
82
|
+
if ($[0] !== props.className) {
|
|
83
|
+
t0 = clsx(styles.CircleBadgeIcon, props.className);
|
|
84
|
+
$[0] = props.className;
|
|
82
85
|
$[1] = t0;
|
|
83
86
|
} else {
|
|
84
87
|
t0 = $[1];
|
|
85
88
|
}
|
|
86
|
-
|
|
89
|
+
let t1;
|
|
90
|
+
if ($[2] !== props || $[3] !== t0) {
|
|
91
|
+
t1 = /*#__PURE__*/jsx(Octicon, {
|
|
92
|
+
...props,
|
|
93
|
+
"data-component": "CircleBadge.Icon",
|
|
94
|
+
className: t0
|
|
95
|
+
});
|
|
96
|
+
$[2] = props;
|
|
97
|
+
$[3] = t0;
|
|
98
|
+
$[4] = t1;
|
|
99
|
+
} else {
|
|
100
|
+
t1 = $[4];
|
|
101
|
+
}
|
|
102
|
+
return t1;
|
|
87
103
|
};
|
|
88
104
|
CircleBadgeIcon.displayName = 'CircleBadge.Icon';
|
|
89
105
|
/**
|