@primer/react 38.29.0-rc.d35810c2f → 38.29.0-rc.d7f442775
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/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.js +2 -1
- package/dist/KeybindingHint/components/Chord.d.ts +2 -3
- package/dist/KeybindingHint/components/Chord.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Chord.js +3 -21
- package/dist/KeybindingHint/components/Sequence.d.ts +2 -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/Overlay/Overlay.d.ts +2 -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/Timeline/Timeline.d.ts +2 -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.js +3 -1
- package/dist/Token/Token.js +3 -1
- package/dist/Token/TokenBase.d.ts +4 -5
- package/dist/Token/TokenBase.d.ts.map +1 -1
- package/dist/Token/TokenBase.js +2 -13
- package/dist/Token/_RemoveTokenButton.js +5 -2
- 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 +2 -2
- 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/UnderlineNav/UnderlineNav.d.ts +2 -1
- package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.js +1 -4
- 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.js +2 -1
- package/dist/experimental/index.js +1 -1
- 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.js +3 -1
- 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 Overlay
|
|
9
|
+
import Overlay from '../Overlay/Overlay.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 { widthMap } from '../Overlay/constants.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';
|
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;AA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,WAAW,GAAG,MAAM,OAAO,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAA;AAC5F,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,SAAS,CAAA;AAqWjD,eAAO,MAAM,MAAM;;;;;;;;;iBA9EuC,iBAAiB,EAAE;;;iBAoCf,MAAM,IAAI;oBAAc,KAAK,CAAC,oBAAoB;;CAkD9G,CAAA"}
|
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,9 +1,10 @@
|
|
|
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';
|
|
7
|
+
import { accessibleSequenceString } from './components/utils.js';
|
|
7
8
|
import Text from '../Text/Text.js';
|
|
8
9
|
|
|
9
10
|
const Kbd = t0 => {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { KeybindingHintProps } from '../props';
|
|
2
|
-
import
|
|
2
|
+
import { accessibleChordString } from './utils';
|
|
3
3
|
export declare const Chord: ({ keys, format, variant, size }: KeybindingHintProps) => import("react").JSX.Element;
|
|
4
|
-
|
|
5
|
-
export declare const accessibleChordString: (chord: string, platform: Platform) => string;
|
|
4
|
+
export { accessibleChordString };
|
|
6
5
|
//# 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;AAIjD,OAAO,EAAC,qBAAqB,EAAa,MAAM,SAAS,CAAA;AAEzD,eAAO,MAAM,KAAK,GAAI,iCAAmE,mBAAmB,gCAsB3G,CAAA;AAED,OAAO,EAAC,qBAAqB,EAAC,CAAA"}
|
|
@@ -1,28 +1,13 @@
|
|
|
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
|
+
export { accessibleChordString } from './utils.js';
|
|
7
8
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
9
|
import Text from '../../Text/Text.js';
|
|
9
10
|
|
|
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
11
|
const Chord = t0 => {
|
|
27
12
|
const $ = c(13);
|
|
28
13
|
const {
|
|
@@ -95,7 +80,4 @@ const Chord = t0 => {
|
|
|
95
80
|
return t10;
|
|
96
81
|
};
|
|
97
82
|
|
|
98
|
-
|
|
99
|
-
const accessibleChordString = (chord, platform) => splitChord(chord).map(key => accessibleKeyName(key, platform)).join(' ');
|
|
100
|
-
|
|
101
|
-
export { Chord, accessibleChordString };
|
|
83
|
+
export { Chord };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { KeybindingHintProps } from '../props';
|
|
2
|
-
import
|
|
2
|
+
import { accessibleSequenceString } from './utils';
|
|
3
3
|
export declare const Sequence: ({ keys, ...chordProps }: KeybindingHintProps) => import("react").JSX.Element[];
|
|
4
|
-
|
|
5
|
-
export declare const accessibleSequenceString: (sequence: string, platform: Platform) => string;
|
|
4
|
+
export { accessibleSequenceString };
|
|
6
5
|
//# 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;AAGjD,OAAO,
|
|
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;AAGjD,OAAO,EAAC,wBAAwB,EAAC,MAAM,SAAS,CAAA;AAIhD,eAAO,MAAM,QAAQ,GAAI,yBAAuB,mBAAmB,kCAa/D,CAAA;AAEJ,OAAO,EAAC,wBAAwB,EAAC,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 };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Platform } from '../platform';
|
|
2
|
+
/** Split and sort the chord keys in standard order. */
|
|
3
|
+
export declare const splitChord: (chord: string) => string[];
|
|
4
|
+
/** Plain string version of `Chord` for use in `aria` string attributes. */
|
|
5
|
+
export declare const accessibleChordString: (chord: string, platform: Platform) => string;
|
|
6
|
+
/** Plain string version of `Sequence` for use in `aria` string attributes. */
|
|
7
|
+
export declare const accessibleSequenceString: (sequence: string, platform: Platform) => string;
|
|
8
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/KeybindingHint/components/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAA;AAoBzC,uDAAuD;AACvD,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,aAIT,CAAA;AAI/B,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB,GAAI,OAAO,MAAM,EAAE,UAAU,QAAQ,WAGzD,CAAA;AAEd,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,GAAI,UAAU,MAAM,EAAE,UAAU,QAAQ,WAG1D,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { accessibleKeyName } from '../key-names.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Consistent sort order for modifier keys. There should never be more than one non-modifier
|
|
5
|
+
* key in a chord, so we don't need to worry about sorting those - we just put them at
|
|
6
|
+
* the end.
|
|
7
|
+
*/
|
|
8
|
+
const keySortPriorities = {
|
|
9
|
+
control: 1,
|
|
10
|
+
meta: 2,
|
|
11
|
+
alt: 3,
|
|
12
|
+
option: 4,
|
|
13
|
+
shift: 5,
|
|
14
|
+
function: 6
|
|
15
|
+
};
|
|
16
|
+
const keySortPriority = priority => {
|
|
17
|
+
var _keySortPriorities$pr;
|
|
18
|
+
return (_keySortPriorities$pr = keySortPriorities[priority]) !== null && _keySortPriorities$pr !== void 0 ? _keySortPriorities$pr : Infinity;
|
|
19
|
+
};
|
|
20
|
+
const compareLowercaseKeys = (a, b) => keySortPriority(a) - keySortPriority(b);
|
|
21
|
+
|
|
22
|
+
/** Split and sort the chord keys in standard order. */
|
|
23
|
+
const splitChord = chord => chord.split('+').map(k => k.toLowerCase()).sort(compareLowercaseKeys);
|
|
24
|
+
const splitSequence = sequence => sequence.split(' ');
|
|
25
|
+
|
|
26
|
+
/** Plain string version of `Chord` for use in `aria` string attributes. */
|
|
27
|
+
const accessibleChordString = (chord, platform) => splitChord(chord).map(key => accessibleKeyName(key, platform)).join(' ');
|
|
28
|
+
|
|
29
|
+
/** Plain string version of `Sequence` for use in `aria` string attributes. */
|
|
30
|
+
const accessibleSequenceString = (sequence, platform) => splitSequence(sequence).map(chord => accessibleChordString(chord, platform)).join(' then ');
|
|
31
|
+
|
|
32
|
+
export { accessibleChordString, accessibleSequenceString, splitChord };
|
|
@@ -4,6 +4,7 @@ import type { AriaRole, Merge } from '../utils/types';
|
|
|
4
4
|
import type { TouchOrMouseEvent } from '../hooks';
|
|
5
5
|
import type { AnchorSide } from '@primer/behaviors';
|
|
6
6
|
import type { ForwardRefComponent as PolymorphicForwardRefComponent } from '../utils/polymorphic';
|
|
7
|
+
import { heightMap, widthMap } from './constants';
|
|
7
8
|
type StyledOverlayProps = {
|
|
8
9
|
width?: keyof typeof widthMap;
|
|
9
10
|
height?: keyof typeof heightMap;
|
|
@@ -13,24 +14,7 @@ type StyledOverlayProps = {
|
|
|
13
14
|
overflow?: 'auto' | 'hidden' | 'scroll' | 'visible';
|
|
14
15
|
style?: React.CSSProperties;
|
|
15
16
|
};
|
|
16
|
-
export
|
|
17
|
-
xsmall: string;
|
|
18
|
-
small: string;
|
|
19
|
-
medium: string;
|
|
20
|
-
large: string;
|
|
21
|
-
xlarge: string;
|
|
22
|
-
auto: string;
|
|
23
|
-
initial: string;
|
|
24
|
-
'fit-content': string;
|
|
25
|
-
};
|
|
26
|
-
export declare const widthMap: {
|
|
27
|
-
small: string;
|
|
28
|
-
medium: string;
|
|
29
|
-
large: string;
|
|
30
|
-
xlarge: string;
|
|
31
|
-
xxlarge: string;
|
|
32
|
-
auto: string;
|
|
33
|
-
};
|
|
17
|
+
export { heightMap, widthMap };
|
|
34
18
|
type BaseOverlayProps = {
|
|
35
19
|
visibility?: 'visible' | 'hidden';
|
|
36
20
|
'data-test-id'?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../src/Overlay/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,qBAAqB,EAAe,MAAM,OAAO,CAAA;AAC9D,OAAO,KAA0B,MAAM,OAAO,CAAA;AAE9C,OAAO,KAAK,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,gBAAgB,CAAA;AACnD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,UAAU,CAAA;AAG/C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAs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AAA;AAED,KAAK,oBAAoB,GAAG,KAAK,CAAC,eAAe,EAAE,cAAc,CAAC,CAAA;AAElE;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,OAAO,EA6FR,8BAA8B,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,qBAAqB,CAAC,OAAO,OAAO,CAAC,CAAA;AAEhE,eAAe,OAAO,CAAA"}
|
package/dist/Overlay/Overlay.js
CHANGED
|
@@ -9,25 +9,6 @@ import { useMergedRefs } from '../hooks/useMergedRefs.js';
|
|
|
9
9
|
import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
|
|
10
10
|
import { useOverlay } from '../hooks/useOverlay.js';
|
|
11
11
|
|
|
12
|
-
const heightMap = {
|
|
13
|
-
xsmall: '192px',
|
|
14
|
-
small: '256px',
|
|
15
|
-
medium: '320px',
|
|
16
|
-
large: '432px',
|
|
17
|
-
xlarge: '600px',
|
|
18
|
-
auto: 'auto',
|
|
19
|
-
initial: 'auto',
|
|
20
|
-
// Passing 'initial' initially applies 'auto'
|
|
21
|
-
'fit-content': 'fit-content'
|
|
22
|
-
};
|
|
23
|
-
const widthMap = {
|
|
24
|
-
small: '256px',
|
|
25
|
-
medium: '320px',
|
|
26
|
-
large: '480px',
|
|
27
|
-
xlarge: '640px',
|
|
28
|
-
xxlarge: '960px',
|
|
29
|
-
auto: 'auto'
|
|
30
|
-
};
|
|
31
12
|
const animationDuration = 200;
|
|
32
13
|
function getSlideAnimationStartingVector(anchorSide) {
|
|
33
14
|
if (anchorSide !== null && anchorSide !== void 0 && anchorSide.endsWith('bottom')) {
|
|
@@ -329,4 +310,4 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
|
|
|
329
310
|
return t13;
|
|
330
311
|
});
|
|
331
312
|
|
|
332
|
-
export { BaseOverlay, Overlay as default
|
|
313
|
+
export { BaseOverlay, Overlay as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const heightMap: {
|
|
2
|
+
xsmall: string;
|
|
3
|
+
small: string;
|
|
4
|
+
medium: string;
|
|
5
|
+
large: string;
|
|
6
|
+
xlarge: string;
|
|
7
|
+
auto: string;
|
|
8
|
+
initial: string;
|
|
9
|
+
'fit-content': string;
|
|
10
|
+
};
|
|
11
|
+
export declare const widthMap: {
|
|
12
|
+
small: string;
|
|
13
|
+
medium: string;
|
|
14
|
+
large: string;
|
|
15
|
+
xlarge: string;
|
|
16
|
+
xxlarge: string;
|
|
17
|
+
auto: string;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/Overlay/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;CASrB,CAAA;AAED,eAAO,MAAM,QAAQ;;;;;;;CAOpB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const heightMap = {
|
|
2
|
+
xsmall: '192px',
|
|
3
|
+
small: '256px',
|
|
4
|
+
medium: '320px',
|
|
5
|
+
large: '432px',
|
|
6
|
+
xlarge: '600px',
|
|
7
|
+
auto: 'auto',
|
|
8
|
+
initial: 'auto',
|
|
9
|
+
'fit-content': 'fit-content'
|
|
10
|
+
};
|
|
11
|
+
const widthMap = {
|
|
12
|
+
small: '256px',
|
|
13
|
+
medium: '320px',
|
|
14
|
+
large: '480px',
|
|
15
|
+
xlarge: '640px',
|
|
16
|
+
xxlarge: '960px',
|
|
17
|
+
auto: 'auto'
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { heightMap, widthMap };
|