@primer/react 38.29.0-rc.d35810c2f → 38.29.0-rc.dc2cb3e06
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/dist/ActionList/Group.d.ts +0 -5
- package/dist/ActionList/Group.d.ts.map +1 -1
- package/dist/ActionList/Group.js +2 -5
- package/dist/ActionList/GroupContext.d.ts +8 -0
- package/dist/ActionList/GroupContext.d.ts.map +1 -0
- package/dist/ActionList/GroupContext.js +8 -0
- package/dist/ActionList/Item.js +3 -2
- package/dist/ActionList/Selection.js +1 -1
- package/dist/ActionList/index.d.ts.map +1 -1
- package/dist/ActionList/index.js +2 -1
- package/dist/ActionMenu/ActionMenu.js +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay.js +2 -1
- package/dist/Button/IconButton.d.ts.map +1 -1
- package/dist/Button/IconButton.js +3 -2
- package/dist/ConfirmationDialog/ConfirmationDialog.d.ts +0 -9
- package/dist/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
- package/dist/ConfirmationDialog/ConfirmationDialog.js +1 -42
- package/dist/ConfirmationDialog/useConfirm.d.ts +12 -0
- package/dist/ConfirmationDialog/useConfirm.d.ts.map +1 -0
- package/dist/ConfirmationDialog/useConfirm.js +44 -0
- package/dist/Dialog/Dialog.d.ts +0 -1
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +2 -4
- package/dist/Dialog/DialogContext.d.ts +3 -0
- package/dist/Dialog/DialogContext.d.ts.map +1 -0
- package/dist/Dialog/DialogContext.js +5 -0
- package/dist/FilteredActionList/FilteredActionList.js +2 -1
- package/dist/FilteredActionList/FilteredActionListLoaders.d.ts +2 -10
- package/dist/FilteredActionList/FilteredActionListLoaders.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionListLoaders.js +3 -12
- package/dist/FilteredActionList/constants.d.ts +11 -0
- package/dist/FilteredActionList/constants.d.ts.map +1 -0
- package/dist/FilteredActionList/constants.js +13 -0
- package/dist/FilteredActionList/index.js +0 -1
- package/dist/KeybindingHint/KeybindingHint.d.ts +0 -14
- package/dist/KeybindingHint/KeybindingHint.d.ts.map +1 -1
- package/dist/KeybindingHint/KeybindingHint.js +2 -16
- package/dist/KeybindingHint/components/Chord.d.ts +0 -3
- package/dist/KeybindingHint/components/Chord.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Chord.js +2 -21
- package/dist/KeybindingHint/components/Sequence.d.ts +0 -3
- package/dist/KeybindingHint/components/Sequence.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Sequence.js +2 -5
- package/dist/KeybindingHint/components/utils.d.ts +8 -0
- package/dist/KeybindingHint/components/utils.d.ts.map +1 -0
- package/dist/KeybindingHint/components/utils.js +32 -0
- package/dist/KeybindingHint/index.d.ts +2 -1
- package/dist/KeybindingHint/index.d.ts.map +1 -1
- package/dist/KeybindingHint/utils.d.ts +15 -0
- package/dist/KeybindingHint/utils.d.ts.map +1 -0
- package/dist/KeybindingHint/utils.js +17 -0
- package/dist/Overlay/Overlay.d.ts +1 -18
- package/dist/Overlay/Overlay.d.ts.map +1 -1
- package/dist/Overlay/Overlay.js +1 -20
- package/dist/Overlay/constants.d.ts +19 -0
- package/dist/Overlay/constants.d.ts.map +1 -0
- package/dist/Overlay/constants.js +20 -0
- package/dist/Portal/Portal.d.ts +0 -14
- package/dist/Portal/Portal.d.ts.map +1 -1
- package/dist/Portal/Portal.js +4 -46
- package/dist/Portal/PortalContext.d.ts +5 -0
- package/dist/Portal/PortalContext.d.ts.map +1 -0
- package/dist/Portal/PortalContext.js +5 -0
- package/dist/Portal/index.d.ts +3 -1
- package/dist/Portal/index.d.ts.map +1 -1
- package/dist/Portal/index.js +0 -1
- package/dist/Portal/portalRoot.d.ts +11 -0
- package/dist/Portal/portalRoot.d.ts.map +1 -0
- package/dist/Portal/portalRoot.js +39 -0
- package/dist/Radio/Radio.js +1 -1
- package/dist/RadioGroup/RadioGroup.d.ts +1 -6
- package/dist/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup/RadioGroup.js +2 -3
- package/dist/RadioGroup/RadioGroupContext.d.ts +7 -0
- package/dist/RadioGroup/RadioGroupContext.d.ts.map +1 -0
- package/dist/RadioGroup/RadioGroupContext.js +5 -0
- package/dist/RadioGroup/index.d.ts +2 -1
- package/dist/RadioGroup/index.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +2 -1
- package/dist/ThemeContext.d.ts +15 -0
- package/dist/ThemeContext.d.ts.map +1 -0
- package/dist/ThemeContext.js +9 -0
- package/dist/ThemeProvider.d.ts +1 -14
- package/dist/ThemeProvider.d.ts.map +1 -1
- package/dist/ThemeProvider.js +3 -18
- package/dist/Timeline/Timeline.d.ts +1 -1
- package/dist/Timeline/Timeline.d.ts.map +1 -1
- package/dist/Timeline/constants.d.ts +2 -0
- package/dist/Timeline/constants.d.ts.map +1 -0
- package/dist/Token/IssueLabelToken.d.ts.map +1 -1
- package/dist/Token/IssueLabelToken.js +3 -1
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +3 -1
- package/dist/Token/TokenBase.d.ts +2 -5
- package/dist/Token/TokenBase.d.ts.map +1 -1
- package/dist/Token/TokenBase.js +3 -14
- package/dist/Token/_RemoveTokenButton.js +1 -1
- package/dist/Token/constants.d.ts +4 -0
- package/dist/Token/constants.d.ts.map +1 -0
- package/dist/Token/constants.js +3 -0
- package/dist/Token/utils.d.ts +3 -0
- package/dist/Token/utils.d.ts.map +1 -0
- package/dist/Token/utils.js +14 -0
- package/dist/Tooltip/Tooltip.d.ts +0 -3
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +2 -3
- package/dist/Tooltip/TooltipContext.d.ts +5 -0
- package/dist/Tooltip/TooltipContext.d.ts.map +1 -0
- package/dist/Tooltip/TooltipContext.js +5 -0
- package/dist/TooltipV2/Tooltip.d.ts +0 -3
- package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.js +4 -3
- package/dist/TooltipV2/TooltipContext.d.ts +5 -0
- package/dist/TooltipV2/TooltipContext.d.ts.map +1 -0
- package/dist/TooltipV2/TooltipContext.js +5 -0
- package/dist/TreeView/TreeView.js +1 -1
- package/dist/UnderlineNav/UnderlineNav.d.ts +0 -1
- package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.js +2 -5
- package/dist/UnderlineNav/utils.d.ts +3 -0
- package/dist/UnderlineNav/utils.d.ts.map +1 -0
- package/dist/UnderlineNav/utils.js +8 -0
- package/dist/experimental/SelectPanel2/SelectPanel.d.ts.map +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +2 -1
- package/dist/experimental/SelectPanel2/index.d.ts +2 -1
- package/dist/experimental/SelectPanel2/index.d.ts.map +1 -1
- package/dist/experimental/Tabs/Tabs.d.ts +3 -111
- package/dist/experimental/Tabs/Tabs.d.ts.map +1 -1
- package/dist/experimental/Tabs/Tabs.js +3 -237
- package/dist/experimental/Tabs/TabsContext.d.ts +3 -0
- package/dist/experimental/Tabs/TabsContext.d.ts.map +1 -0
- package/dist/experimental/Tabs/TabsContext.js +5 -0
- package/dist/experimental/Tabs/index.d.ts +5 -2
- package/dist/experimental/Tabs/index.d.ts.map +1 -1
- package/dist/experimental/Tabs/types.d.ts +107 -0
- package/dist/experimental/Tabs/types.d.ts.map +1 -0
- package/dist/experimental/Tabs/useTab.d.ts +7 -0
- package/dist/experimental/Tabs/useTab.d.ts.map +1 -0
- package/dist/experimental/Tabs/useTab.js +97 -0
- package/dist/experimental/Tabs/useTabList.d.ts +3 -0
- package/dist/experimental/Tabs/useTabList.d.ts.map +1 -0
- package/dist/experimental/Tabs/useTabList.js +100 -0
- package/dist/experimental/Tabs/useTabPanel.d.ts +4 -0
- package/dist/experimental/Tabs/useTabPanel.d.ts.map +1 -0
- package/dist/experimental/Tabs/useTabPanel.js +37 -0
- package/dist/experimental/Tabs/useTabs.d.ts +3 -0
- package/dist/experimental/Tabs/useTabs.d.ts.map +1 -0
- package/dist/experimental/Tabs/useTabs.js +12 -0
- package/dist/experimental/index.js +7 -3
- package/dist/hooks/MatchMedia.d.ts +23 -0
- package/dist/hooks/MatchMedia.d.ts.map +1 -0
- package/dist/hooks/MatchMediaContext.d.ts +5 -0
- package/dist/hooks/MatchMediaContext.d.ts.map +1 -0
- package/dist/hooks/MatchMediaContext.js +8 -0
- package/dist/hooks/useMedia.d.ts +1 -24
- package/dist/hooks/useMedia.d.ts.map +1 -1
- package/dist/hooks/useMedia.js +15 -6
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/useTheme.d.ts +15 -0
- package/dist/useTheme.d.ts.map +1 -0
- package/dist/useTheme.js +16 -0
- package/dist/utils/story-helpers.d.ts +70 -0
- package/dist/utils/story-helpers.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -23,10 +23,6 @@ export type ActionListGroupProps = React.HTMLAttributes<HTMLLIElement> & {
|
|
|
23
23
|
*/
|
|
24
24
|
selectionVariant?: ActionListProps['selectionVariant'] | false;
|
|
25
25
|
};
|
|
26
|
-
type ContextProps = Pick<ActionListGroupProps, 'selectionVariant'> & {
|
|
27
|
-
groupHeadingId: string | undefined;
|
|
28
|
-
};
|
|
29
|
-
export declare const GroupContext: React.Context<ContextProps>;
|
|
30
26
|
export declare const Group: FCWithSlotMarker<React.PropsWithChildren<ActionListGroupProps>>;
|
|
31
27
|
export type ActionListGroupHeadingProps = Pick<ActionListGroupProps, 'variant' | 'auxiliaryText'> & Omit<ActionListHeadingProps, 'as'> & React.HTMLAttributes<HTMLElement> & {
|
|
32
28
|
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
@@ -40,5 +36,4 @@ export declare const GroupHeading: React.FC<React.PropsWithChildren<ActionListGr
|
|
|
40
36
|
displayName?: string;
|
|
41
37
|
};
|
|
42
38
|
};
|
|
43
|
-
export {};
|
|
44
39
|
//# 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;AAsC1D,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,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
|
@@ -8,6 +8,7 @@ import { clsx } from 'clsx';
|
|
|
8
8
|
import classes from './ActionList.module.css.js';
|
|
9
9
|
import groupClasses from './Group.module.css.js';
|
|
10
10
|
import { GroupHeadingTrailingAction } from './GroupHeadingTrailingAction.js';
|
|
11
|
+
import { GroupContext } from './GroupContext.js';
|
|
11
12
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
12
13
|
import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
|
|
13
14
|
|
|
@@ -71,10 +72,6 @@ const HeadingWrap = ({
|
|
|
71
72
|
className
|
|
72
73
|
}, children);
|
|
73
74
|
};
|
|
74
|
-
const GroupContext = /*#__PURE__*/React.createContext({
|
|
75
|
-
groupHeadingId: undefined,
|
|
76
|
-
selectionVariant: undefined
|
|
77
|
-
});
|
|
78
75
|
const Group = t0 => {
|
|
79
76
|
var _ariaLabel, _title, _slots$groupHeading;
|
|
80
77
|
const $ = c(38);
|
|
@@ -383,4 +380,4 @@ const GroupHeading = Object.assign(GroupHeadingImpl, {
|
|
|
383
380
|
TrailingAction: GroupHeadingTrailingAction
|
|
384
381
|
});
|
|
385
382
|
|
|
386
|
-
export { Group,
|
|
383
|
+
export { Group, GroupHeading };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ActionListGroupProps } from './Group';
|
|
3
|
+
type ContextProps = Pick<ActionListGroupProps, 'selectionVariant'> & {
|
|
4
|
+
groupHeadingId: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
export declare const GroupContext: React.Context<ContextProps>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=GroupContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupContext.d.ts","sourceRoot":"","sources":["../../src/ActionList/GroupContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAA;AAEjD,KAAK,YAAY,GAAG,IAAI,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,GAAG;IAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;CAAC,CAAA;AAEzG,eAAO,MAAM,YAAY,6BAGvB,CAAA"}
|
package/dist/ActionList/Item.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useId } from '../hooks/useId.js';
|
|
|
4
4
|
import { useSlots } from '../hooks/useSlots.js';
|
|
5
5
|
import { ActionListContainerContext } from './ActionListContainerContext.js';
|
|
6
6
|
import { Description } from './Description.js';
|
|
7
|
-
import { GroupContext } from './
|
|
7
|
+
import { GroupContext } from './GroupContext.js';
|
|
8
8
|
import { Selection } from './Selection.js';
|
|
9
9
|
import { TrailingVisual, LeadingVisual, VisualOrIndicator } from './Visuals.js';
|
|
10
10
|
import { ListContext, ItemContext } from './shared.js';
|
|
@@ -15,8 +15,9 @@ import VisuallyHidden from '../_VisuallyHidden.js';
|
|
|
15
15
|
import classes from './ActionList.module.css.js';
|
|
16
16
|
import { clsx } from 'clsx';
|
|
17
17
|
import { fixedForwardRef } from '../utils/modern-polymorphic.js';
|
|
18
|
-
import { TooltipContext
|
|
18
|
+
import { TooltipContext } from '../TooltipV2/TooltipContext.js';
|
|
19
19
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
20
|
+
import { Tooltip } from '../TooltipV2/Tooltip.js';
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* Wraps button-semantic items with Tooltip, disabled when not truncated
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { CheckIcon } from '@primer/octicons-react';
|
|
4
|
-
import { GroupContext } from './
|
|
4
|
+
import { GroupContext } from './GroupContext.js';
|
|
5
5
|
import { ListContext } from './shared.js';
|
|
6
6
|
import { VisualContainer } from './Visuals.js';
|
|
7
7
|
import classes from './ActionList.module.css.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ActionList/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ActionList/index.ts"],"names":[],"mappings":"AAYA,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"}
|
package/dist/ActionList/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { List } from './List.js';
|
|
2
|
-
import { GroupHeading,
|
|
2
|
+
import { GroupHeading, Group } from './Group.js';
|
|
3
|
+
import { GroupContext } from './GroupContext.js';
|
|
3
4
|
import { Item } from './Item.js';
|
|
4
5
|
import { LinkItem } from './LinkItem.js';
|
|
5
6
|
import { Divider } from './Divider.js';
|
|
@@ -8,7 +8,7 @@ import { Tooltip } from '../TooltipV2/Tooltip.js';
|
|
|
8
8
|
import styles from './ActionMenu.module.css.js';
|
|
9
9
|
import { useResponsiveValue } from '../hooks/useResponsiveValue.js';
|
|
10
10
|
import { isSlot } from '../utils/is-slot.js';
|
|
11
|
-
import { DialogContext } from '../Dialog/
|
|
11
|
+
import { DialogContext } from '../Dialog/DialogContext.js';
|
|
12
12
|
import { jsx } from 'react/jsx-runtime';
|
|
13
13
|
import { useProvidedStateOrCreate } from '../hooks/useProvidedStateOrCreate.js';
|
|
14
14
|
import { useProvidedRefOrCreate } from '../hooks/useProvidedRefOrCreate.js';
|
|
@@ -6,12 +6,13 @@ import { IconButton } from '../Button/IconButton.js';
|
|
|
6
6
|
import { XIcon } from '@primer/octicons-react';
|
|
7
7
|
import classes from './AnchoredOverlay.module.css.js';
|
|
8
8
|
import { clsx } from 'clsx';
|
|
9
|
-
import
|
|
9
|
+
import { widthMap } from '../Overlay/constants.js';
|
|
10
10
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
11
11
|
import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
|
|
12
12
|
import { useProvidedRefOrCreate } from '../hooks/useProvidedRefOrCreate.js';
|
|
13
13
|
import { useRenderForcingRef } from '../hooks/useRenderForcingRef.js';
|
|
14
14
|
import { useAnchoredPosition } from '../hooks/useAnchoredPosition.js';
|
|
15
|
+
import Overlay from '../Overlay/Overlay.js';
|
|
15
16
|
|
|
16
17
|
const defaultVariant = {
|
|
17
18
|
regular: 'anchored',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/Button/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/Button/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAQ/F,QAAA,MAAM,UAAU,EAuEX,8BAA8B,CAAC,QAAQ,GAAG,GAAG,EAAE,eAAe,CAAC,CAAA;AAEpE,OAAO,EAAC,UAAU,EAAC,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { ButtonBase } from './ButtonBase.js';
|
|
3
|
-
import {
|
|
4
|
-
import { TooltipContext
|
|
3
|
+
import { Tooltip } from '../TooltipV2/Tooltip.js';
|
|
4
|
+
import { TooltipContext } from '../TooltipV2/TooltipContext.js';
|
|
5
|
+
import { TooltipContext as TooltipContext$1 } from '../Tooltip/TooltipContext.js';
|
|
5
6
|
import classes from './ButtonBase.module.css.js';
|
|
6
7
|
import { clsx } from 'clsx';
|
|
7
8
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -68,13 +68,4 @@ export interface ConfirmationDialogProps {
|
|
|
68
68
|
* rendering capabilities are provided for ConfirmationDialog.
|
|
69
69
|
*/
|
|
70
70
|
export declare const ConfirmationDialog: React.FC<React.PropsWithChildren<ConfirmationDialogProps>>;
|
|
71
|
-
export type ConfirmOptions = Omit<ConfirmationDialogProps, 'onClose'> & {
|
|
72
|
-
content: React.ReactNode;
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* This hook takes no parameters and returns an `async` function, `confirm`. When `confirm`
|
|
76
|
-
* is called, it shows the confirmation dialog. When the dialog is dismissed, a promise is
|
|
77
|
-
* resolved with `true` or `false` depending on whether or not the confirm button was used.
|
|
78
|
-
*/
|
|
79
|
-
export declare function useConfirm(): (options: ConfirmOptions) => Promise<boolean>;
|
|
80
71
|
//# sourceMappingURL=ConfirmationDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../src/ConfirmationDialog/ConfirmationDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../src/ConfirmationDialog/ConfirmationDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAoB,WAAW,EAAE,YAAY,EAAC,MAAM,WAAW,CAAA;AAG3E;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS,GAAG,cAAc,GAAG,QAAQ,GAAG,QAAQ,KAAK,IAAI,CAAA;IAE5E;;;OAGG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IAEtB;;OAEG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAErC;;OAEG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAEtC;;OAEG;IACH,iBAAiB,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;IAEnD;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAE9B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAE1C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,WAAW,CAAA;IAEnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,CAqDzF,CAAA"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { useCallback } from 'react';
|
|
2
|
-
import { createRoot } from 'react-dom/client';
|
|
3
|
-
import BaseStyles from '../BaseStyles.js';
|
|
4
2
|
import { jsx } from 'react/jsx-runtime';
|
|
5
3
|
import { Dialog } from '../Dialog/Dialog.js';
|
|
6
4
|
|
|
@@ -60,44 +58,5 @@ const ConfirmationDialog = props => {
|
|
|
60
58
|
});
|
|
61
59
|
};
|
|
62
60
|
ConfirmationDialog.displayName = "ConfirmationDialog";
|
|
63
|
-
let hostElement = null;
|
|
64
|
-
async function confirm(options) {
|
|
65
|
-
const {
|
|
66
|
-
content,
|
|
67
|
-
...confirmationDialogProps
|
|
68
|
-
} = options;
|
|
69
|
-
return new Promise(resolve => {
|
|
70
|
-
hostElement ||= document.createElement('div');
|
|
71
|
-
if (!hostElement.isConnected) document.body.append(hostElement);
|
|
72
|
-
const root = createRoot(hostElement);
|
|
73
|
-
const onClose = gesture => {
|
|
74
|
-
root.unmount();
|
|
75
|
-
if (gesture === 'confirm') {
|
|
76
|
-
resolve(true);
|
|
77
|
-
} else {
|
|
78
|
-
resolve(false);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
root.render(/*#__PURE__*/jsx(BaseStyles, {
|
|
82
|
-
children: /*#__PURE__*/jsx(ConfirmationDialog, {
|
|
83
|
-
...confirmationDialogProps,
|
|
84
|
-
onClose: onClose,
|
|
85
|
-
children: content
|
|
86
|
-
})
|
|
87
|
-
}));
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* This hook takes no parameters and returns an `async` function, `confirm`. When `confirm`
|
|
93
|
-
* is called, it shows the confirmation dialog. When the dialog is dismissed, a promise is
|
|
94
|
-
* resolved with `true` or `false` depending on whether or not the confirm button was used.
|
|
95
|
-
*/
|
|
96
|
-
function useConfirm() {
|
|
97
|
-
const result = useCallback(options => {
|
|
98
|
-
return confirm(options);
|
|
99
|
-
}, []);
|
|
100
|
-
return result;
|
|
101
|
-
}
|
|
102
61
|
|
|
103
|
-
export { ConfirmationDialog
|
|
62
|
+
export { ConfirmationDialog };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ConfirmationDialogProps } from './ConfirmationDialog';
|
|
3
|
+
export type ConfirmOptions = Omit<ConfirmationDialogProps, 'onClose'> & {
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* This hook takes no parameters and returns an `async` function, `confirm`. When `confirm`
|
|
8
|
+
* is called, it shows the confirmation dialog. When the dialog is dismissed, a promise is
|
|
9
|
+
* resolved with `true` or `false` depending on whether or not the confirm button was used.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useConfirm(): (options: ConfirmOptions) => Promise<boolean>;
|
|
12
|
+
//# sourceMappingURL=useConfirm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConfirm.d.ts","sourceRoot":"","sources":["../../src/ConfirmationDialog/useConfirm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAGxC,OAAO,EAAqB,KAAK,uBAAuB,EAAC,MAAM,sBAAsB,CAAA;AAIrF,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,uBAAuB,EAAE,SAAS,CAAC,GAAG;IAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,CAAA;AA0BlG;;;;GAIG;AACH,wBAAgB,UAAU,cACa,cAAc,sBAIpD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createRoot } from 'react-dom/client';
|
|
3
|
+
import BaseStyles from '../BaseStyles.js';
|
|
4
|
+
import { ConfirmationDialog } from './ConfirmationDialog.js';
|
|
5
|
+
|
|
6
|
+
let hostElement = null;
|
|
7
|
+
async function confirm(options) {
|
|
8
|
+
const {
|
|
9
|
+
content,
|
|
10
|
+
...confirmationDialogProps
|
|
11
|
+
} = options;
|
|
12
|
+
return new Promise(resolve => {
|
|
13
|
+
hostElement ||= document.createElement('div');
|
|
14
|
+
if (!hostElement.isConnected) document.body.append(hostElement);
|
|
15
|
+
const root = createRoot(hostElement);
|
|
16
|
+
const onClose = gesture => {
|
|
17
|
+
root.unmount();
|
|
18
|
+
if (gesture === 'confirm') {
|
|
19
|
+
resolve(true);
|
|
20
|
+
} else {
|
|
21
|
+
resolve(false);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
root.render(/*#__PURE__*/React.createElement(BaseStyles, null, /*#__PURE__*/React.createElement(ConfirmationDialog, {
|
|
25
|
+
...confirmationDialogProps,
|
|
26
|
+
onClose
|
|
27
|
+
}, content)));
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* This hook takes no parameters and returns an `async` function, `confirm`. When `confirm`
|
|
33
|
+
* is called, it shows the confirmation dialog. When the dialog is dismissed, a promise is
|
|
34
|
+
* resolved with `true` or `false` depending on whether or not the confirm button was used.
|
|
35
|
+
*/
|
|
36
|
+
function useConfirm() {
|
|
37
|
+
const result = _temp;
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
function _temp(options) {
|
|
41
|
+
return confirm(options);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { useConfirm };
|
package/dist/Dialog/Dialog.d.ts
CHANGED
|
@@ -156,7 +156,6 @@ declare const widthMap: {
|
|
|
156
156
|
};
|
|
157
157
|
export type DialogWidth = keyof typeof widthMap | Exclude<CSSProperties['width'], undefined>;
|
|
158
158
|
export type DialogHeight = keyof typeof heightMap;
|
|
159
|
-
export declare const DialogContext: React.Context<object | undefined>;
|
|
160
159
|
export declare const Dialog: React.ForwardRefExoticComponent<DialogProps & {
|
|
161
160
|
children?: React.ReactNode | undefined;
|
|
162
161
|
} & React.RefAttributes<HTMLDivElement>> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA2C,KAAK,aAAa,EAAsB,MAAM,OAAO,CAAA;AAC9G,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AAU1C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAA;AAChE,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"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"}
|
package/dist/Dialog/Dialog.js
CHANGED
|
@@ -11,6 +11,7 @@ import classes from './Dialog.module.css.js';
|
|
|
11
11
|
import { clsx } from 'clsx';
|
|
12
12
|
import { useSlots } from '../hooks/useSlots.js';
|
|
13
13
|
import { useResizeObserver } from '../hooks/useResizeObserver.js';
|
|
14
|
+
import { DialogContext } from './DialogContext.js';
|
|
14
15
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
15
16
|
import { useMergedRefs } from '../hooks/useMergedRefs.js';
|
|
16
17
|
import { useOnEscapePress } from '../hooks/useOnEscapePress.js';
|
|
@@ -98,9 +99,6 @@ const defaultPosition = {
|
|
|
98
99
|
const defaultFooterButtons = [];
|
|
99
100
|
// Minimum room needed for body content before forcing footer buttons into horizontal scroll.
|
|
100
101
|
const MIN_BODY_HEIGHT = 48;
|
|
101
|
-
|
|
102
|
-
// useful to determine whether we're inside a Dialog from a nested component
|
|
103
|
-
const DialogContext = /*#__PURE__*/React.createContext(undefined);
|
|
104
102
|
const DIALOG_CONTEXT_VALUE = Object.freeze({});
|
|
105
103
|
const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
106
104
|
var _slots$header, _slots$body, _slots$footer;
|
|
@@ -408,4 +406,4 @@ const Dialog = Object.assign(_Dialog, {
|
|
|
408
406
|
CloseButton
|
|
409
407
|
});
|
|
410
408
|
|
|
411
|
-
export { Dialog
|
|
409
|
+
export { Dialog };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogContext.d.ts","sourceRoot":"","sources":["../../src/Dialog/DialogContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,aAAa,mCAAqD,CAAA"}
|
|
@@ -7,7 +7,7 @@ import { useId } from '../hooks/useId.js';
|
|
|
7
7
|
import { useProvidedRefOrCreate } from '../hooks/useProvidedRefOrCreate.js';
|
|
8
8
|
import { useProvidedStateOrCreate } from '../hooks/useProvidedStateOrCreate.js';
|
|
9
9
|
import useScrollFlash from '../hooks/useScrollFlash.js';
|
|
10
|
-
import {
|
|
10
|
+
import { FilteredActionListBodyLoader } from './FilteredActionListLoaders.js';
|
|
11
11
|
import classes from './FilteredActionList.module.css.js';
|
|
12
12
|
import { ActionListContainerContext } from '../ActionList/ActionListContainerContext.js';
|
|
13
13
|
import { isValidElementType } from 'react-is';
|
|
@@ -16,6 +16,7 @@ import { clsx } from 'clsx';
|
|
|
16
16
|
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
17
17
|
import { FilteredActionListInput } from './FilteredActionListInput.js';
|
|
18
18
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
19
|
+
import { FilteredActionListLoadingTypes } from './constants.js';
|
|
19
20
|
import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden.js';
|
|
20
21
|
import Checkbox from '../Checkbox/Checkbox.js';
|
|
21
22
|
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
+
import { FilteredActionListLoadingType, FilteredActionListLoadingTypes } from './constants';
|
|
1
2
|
import type { JSX } from 'react';
|
|
2
|
-
export
|
|
3
|
-
name: string;
|
|
4
|
-
appearsInBody: boolean;
|
|
5
|
-
constructor(name: string, appearsInBody: boolean);
|
|
6
|
-
}
|
|
7
|
-
export declare const FilteredActionListLoadingTypes: {
|
|
8
|
-
bodySpinner: FilteredActionListLoadingType;
|
|
9
|
-
bodySkeleton: FilteredActionListLoadingType;
|
|
10
|
-
input: FilteredActionListLoadingType;
|
|
11
|
-
};
|
|
3
|
+
export { FilteredActionListLoadingType, FilteredActionListLoadingTypes };
|
|
12
4
|
export declare function FilteredActionListBodyLoader({ loadingType, height, }: {
|
|
13
5
|
loadingType: FilteredActionListLoadingType;
|
|
14
6
|
height: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilteredActionListLoaders.d.ts","sourceRoot":"","sources":["../../src/FilteredActionList/FilteredActionListLoaders.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilteredActionListLoaders.d.ts","sourceRoot":"","sources":["../../src/FilteredActionList/FilteredActionListLoaders.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,6BAA6B,EAAE,8BAA8B,EAAC,MAAM,aAAa,CAAA;AAEzF,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAC,6BAA6B,EAAE,8BAA8B,EAAC,CAAA;AAKtE,wBAAgB,4BAA4B,CAAC,EAC3C,WAAW,EACX,MAAM,GACP,EAAE;IACD,WAAW,EAAE,6BAA6B,CAAA;IAC1C,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,GAAG,CAAC,OAAO,CAWd"}
|
|
@@ -2,20 +2,11 @@ import { c } from 'react-compiler-runtime';
|
|
|
2
2
|
import { Stack } from '../Stack/Stack.js';
|
|
3
3
|
import { SkeletonBox } from '../Skeleton/SkeletonBox.js';
|
|
4
4
|
import classes from './FilteredActionListLoaders.module.css.js';
|
|
5
|
+
import { FilteredActionListLoadingTypes } from './constants.js';
|
|
6
|
+
export { FilteredActionListLoadingType } from './constants.js';
|
|
5
7
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
6
8
|
import Spinner from '../Spinner/Spinner.js';
|
|
7
9
|
|
|
8
|
-
class FilteredActionListLoadingType {
|
|
9
|
-
constructor(name, appearsInBody) {
|
|
10
|
-
this.name = name;
|
|
11
|
-
this.appearsInBody = appearsInBody;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
const FilteredActionListLoadingTypes = {
|
|
15
|
-
bodySpinner: new FilteredActionListLoadingType('body-spinner', true),
|
|
16
|
-
bodySkeleton: new FilteredActionListLoadingType('body-skeleton', true),
|
|
17
|
-
input: new FilteredActionListLoadingType('input', false)
|
|
18
|
-
};
|
|
19
10
|
const SKELETON_ROW_HEIGHT = 24;
|
|
20
11
|
const SKELETON_MIN_ROWS = 3;
|
|
21
12
|
function FilteredActionListBodyLoader(t0) {
|
|
@@ -160,4 +151,4 @@ function _temp(_, i) {
|
|
|
160
151
|
}
|
|
161
152
|
_temp.displayName = "_temp";
|
|
162
153
|
|
|
163
|
-
export { FilteredActionListBodyLoader,
|
|
154
|
+
export { FilteredActionListBodyLoader, FilteredActionListLoadingTypes };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class FilteredActionListLoadingType {
|
|
2
|
+
name: string;
|
|
3
|
+
appearsInBody: boolean;
|
|
4
|
+
constructor(name: string, appearsInBody: boolean);
|
|
5
|
+
}
|
|
6
|
+
export declare const FilteredActionListLoadingTypes: {
|
|
7
|
+
bodySpinner: FilteredActionListLoadingType;
|
|
8
|
+
bodySkeleton: FilteredActionListLoadingType;
|
|
9
|
+
input: FilteredActionListLoadingType;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/FilteredActionList/constants.ts"],"names":[],"mappings":"AAAA,qBAAa,6BAA6B;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,OAAO,CAAA;gBAEjB,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO;CAIjD;AAED,eAAO,MAAM,8BAA8B;;;;CAI1C,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
class FilteredActionListLoadingType {
|
|
2
|
+
constructor(name, appearsInBody) {
|
|
3
|
+
this.name = name;
|
|
4
|
+
this.appearsInBody = appearsInBody;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
const FilteredActionListLoadingTypes = {
|
|
8
|
+
bodySpinner: new FilteredActionListLoadingType('body-spinner', true),
|
|
9
|
+
bodySkeleton: new FilteredActionListLoadingType('body-skeleton', true),
|
|
10
|
+
input: new FilteredActionListLoadingType('input', false)
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { FilteredActionListLoadingType, FilteredActionListLoadingTypes };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FilteredActionList as FilteredActionList$1 } from './FilteredActionList.js';
|
|
2
2
|
import { FilteredActionListInput } from './FilteredActionListInput.js';
|
|
3
3
|
import { FilteredActionListBodyLoader } from './FilteredActionListLoaders.js';
|
|
4
|
-
export { FilteredActionListLoadingTypes } from './FilteredActionListLoaders.js';
|
|
5
4
|
|
|
6
5
|
const FilteredActionList = Object.assign(FilteredActionList$1, {
|
|
7
6
|
BodyLoader: FilteredActionListBodyLoader,
|
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import type { KeybindingHintProps } from './props';
|
|
2
|
-
import type { Platform } from './platform';
|
|
3
2
|
/** Indicates the presence of an available keybinding. */
|
|
4
3
|
export declare const KeybindingHint: import("react").MemoExoticComponent<({ className, ...props }: KeybindingHintProps) => import("react").JSX.Element>;
|
|
5
|
-
/**
|
|
6
|
-
* AVOID: `KeybindingHint` is nearly always sufficient for providing both visible and accessible keyboard hints.
|
|
7
|
-
* However, there may be cases where we need a plain string version, such as when building `aria-label` or
|
|
8
|
-
* `aria-description`. In that case, this plain string builder can be used instead.
|
|
9
|
-
*
|
|
10
|
-
* NOTE that this string should _only_ be used when building `aria-label` or `aria-description` props (never rendered
|
|
11
|
-
* visibly) and should nearly always also be paired with a visible hint for sighted users.
|
|
12
|
-
*
|
|
13
|
-
* The `platform` argument controls how platform-specific keys (such as `Meta`, `Alt`, and `Mod`) are named. For
|
|
14
|
-
* backwards compatibility, a `boolean` may be passed instead, where `true` is treated as `'apple'` and `false` as
|
|
15
|
-
* `'other'`.
|
|
16
|
-
*/
|
|
17
|
-
export declare const getAccessibleKeybindingHintString: (sequence: string, platform: Platform | boolean) => string;
|
|
18
4
|
//# sourceMappingURL=KeybindingHint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeybindingHint.d.ts","sourceRoot":"","sources":["../../src/KeybindingHint/KeybindingHint.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"KeybindingHint.d.ts","sourceRoot":"","sources":["../../src/KeybindingHint/KeybindingHint.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAA;AAoBhD,yDAAyD;AAEzD,eAAO,MAAM,cAAc,gEAAgC,mBAAmB,iCAI5E,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
2
|
import { memo } from 'react';
|
|
3
|
-
import { Sequence
|
|
3
|
+
import { Sequence } from './components/Sequence.js';
|
|
4
4
|
import classes from './KeybindingHint.module.css.js';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -82,18 +82,4 @@ const KeybindingHint = /*#__PURE__*/memo(t0 => {
|
|
|
82
82
|
});
|
|
83
83
|
KeybindingHint.displayName = 'KeybindingHint';
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
* AVOID: `KeybindingHint` is nearly always sufficient for providing both visible and accessible keyboard hints.
|
|
87
|
-
* However, there may be cases where we need a plain string version, such as when building `aria-label` or
|
|
88
|
-
* `aria-description`. In that case, this plain string builder can be used instead.
|
|
89
|
-
*
|
|
90
|
-
* NOTE that this string should _only_ be used when building `aria-label` or `aria-description` props (never rendered
|
|
91
|
-
* visibly) and should nearly always also be paired with a visible hint for sighted users.
|
|
92
|
-
*
|
|
93
|
-
* The `platform` argument controls how platform-specific keys (such as `Meta`, `Alt`, and `Mod`) are named. For
|
|
94
|
-
* backwards compatibility, a `boolean` may be passed instead, where `true` is treated as `'apple'` and `false` as
|
|
95
|
-
* `'other'`.
|
|
96
|
-
*/
|
|
97
|
-
const getAccessibleKeybindingHintString = (sequence, platform) => accessibleSequenceString(sequence, typeof platform === 'boolean' ? platform ? 'apple' : 'other' : platform);
|
|
98
|
-
|
|
99
|
-
export { KeybindingHint, getAccessibleKeybindingHintString };
|
|
85
|
+
export { KeybindingHint };
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import type { KeybindingHintProps } from '../props';
|
|
2
|
-
import type { Platform } from '../platform';
|
|
3
2
|
export declare const Chord: ({ keys, format, variant, size }: KeybindingHintProps) => import("react").JSX.Element;
|
|
4
|
-
/** Plain string version of `Chord` for use in `aria` string attributes. */
|
|
5
|
-
export declare const accessibleChordString: (chord: string, platform: Platform) => string;
|
|
6
3
|
//# sourceMappingURL=Chord.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chord.d.ts","sourceRoot":"","sources":["../../../src/KeybindingHint/components/Chord.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"Chord.d.ts","sourceRoot":"","sources":["../../../src/KeybindingHint/components/Chord.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAA;AAMjD,eAAO,MAAM,KAAK,GAAI,iCAAmE,mBAAmB,gCAsB3G,CAAA"}
|
|
@@ -1,28 +1,12 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
2
|
import { Fragment } from 'react';
|
|
3
3
|
import { Key } from './Key.js';
|
|
4
|
-
import { accessibleKeyName } from '../key-names.js';
|
|
5
4
|
import { clsx } from 'clsx';
|
|
6
5
|
import classes from './Chord.module.css.js';
|
|
6
|
+
import { splitChord } from './utils.js';
|
|
7
7
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
8
|
import Text from '../../Text/Text.js';
|
|
9
9
|
|
|
10
|
-
const keySortPriorities = {
|
|
11
|
-
control: 1,
|
|
12
|
-
meta: 2,
|
|
13
|
-
alt: 3,
|
|
14
|
-
option: 4,
|
|
15
|
-
shift: 5,
|
|
16
|
-
function: 6
|
|
17
|
-
};
|
|
18
|
-
const keySortPriority = priority => {
|
|
19
|
-
var _keySortPriorities$pr;
|
|
20
|
-
return (_keySortPriorities$pr = keySortPriorities[priority]) !== null && _keySortPriorities$pr !== void 0 ? _keySortPriorities$pr : Infinity;
|
|
21
|
-
};
|
|
22
|
-
const compareLowercaseKeys = (a, b) => keySortPriority(a) - keySortPriority(b);
|
|
23
|
-
|
|
24
|
-
/** Split and sort the chord keys in standard order. */
|
|
25
|
-
const splitChord = chord => chord.split('+').map(k => k.toLowerCase()).sort(compareLowercaseKeys);
|
|
26
10
|
const Chord = t0 => {
|
|
27
11
|
const $ = c(13);
|
|
28
12
|
const {
|
|
@@ -95,7 +79,4 @@ const Chord = t0 => {
|
|
|
95
79
|
return t10;
|
|
96
80
|
};
|
|
97
81
|
|
|
98
|
-
|
|
99
|
-
const accessibleChordString = (chord, platform) => splitChord(chord).map(key => accessibleKeyName(key, platform)).join(' ');
|
|
100
|
-
|
|
101
|
-
export { Chord, accessibleChordString };
|
|
82
|
+
export { Chord };
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import type { KeybindingHintProps } from '../props';
|
|
2
|
-
import type { Platform } from '../platform';
|
|
3
2
|
export declare const Sequence: ({ keys, ...chordProps }: KeybindingHintProps) => import("react").JSX.Element[];
|
|
4
|
-
/** Plain string version of `Sequence` for use in `aria` string attributes. */
|
|
5
|
-
export declare const accessibleSequenceString: (sequence: string, platform: Platform) => string;
|
|
6
3
|
//# sourceMappingURL=Sequence.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sequence.d.ts","sourceRoot":"","sources":["../../../src/KeybindingHint/components/Sequence.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"Sequence.d.ts","sourceRoot":"","sources":["../../../src/KeybindingHint/components/Sequence.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAA;AAMjD,eAAO,MAAM,QAAQ,GAAI,yBAAuB,mBAAmB,kCAa/D,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment } from 'react';
|
|
2
2
|
import VisuallyHidden from '../../_VisuallyHidden.js';
|
|
3
|
-
import { Chord
|
|
3
|
+
import { Chord } from './Chord.js';
|
|
4
4
|
import { jsxs, Fragment as Fragment$1, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
const splitSequence = sequence => sequence.split(' ');
|
|
@@ -20,7 +20,4 @@ const Sequence = ({
|
|
|
20
20
|
})]
|
|
21
21
|
}, i));
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
const accessibleSequenceString = (sequence, platform) => splitSequence(sequence).map(chord => accessibleChordString(chord, platform)).join(' then ');
|
|
25
|
-
|
|
26
|
-
export { Sequence, accessibleSequenceString };
|
|
23
|
+
export { Sequence };
|