@transferwise/components 0.0.0-experimental-77e4e3a → 0.0.0-experimental-0657ea4
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/build/ExpressiveMoneyInput/Chevron/Chevron.js +10 -2
- package/build/ExpressiveMoneyInput/Chevron/Chevron.js.map +1 -1
- package/build/ExpressiveMoneyInput/Chevron/Chevron.mjs +11 -3
- package/build/ExpressiveMoneyInput/Chevron/Chevron.mjs.map +1 -1
- package/build/ListItem/ListItem.js +5 -5
- package/build/ListItem/ListItem.js.map +1 -1
- package/build/ListItem/ListItem.mjs +5 -5
- package/build/ListItem/ListItem.mjs.map +1 -1
- package/build/common/Panel/Panel.js +13 -25
- package/build/common/Panel/Panel.js.map +1 -1
- package/build/common/Panel/Panel.mjs +10 -22
- package/build/common/Panel/Panel.mjs.map +1 -1
- package/build/common/Panel/Panel.positionUtils.js +68 -0
- package/build/common/Panel/Panel.positionUtils.js.map +1 -0
- package/build/common/Panel/Panel.positionUtils.mjs +63 -0
- package/build/common/Panel/Panel.positionUtils.mjs.map +1 -0
- package/build/common/PropsValues/position.js +0 -25
- package/build/common/PropsValues/position.js.map +1 -1
- package/build/common/PropsValues/position.mjs +1 -24
- package/build/common/PropsValues/position.mjs.map +1 -1
- package/build/main.css +12 -4
- package/build/styles/common/Panel/Panel.css +12 -4
- package/build/styles/main.css +12 -4
- package/build/types/Body/Body.d.ts +2 -2
- package/build/types/ExpressiveMoneyInput/Chevron/Chevron.d.ts.map +1 -1
- package/build/types/IconButton/IconButton.d.ts +1 -1
- package/build/types/MoneyInput/MoneyInput.d.ts +1 -1
- package/build/types/MoneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/Title/Title.d.ts +2 -2
- package/build/types/Upload/Steps/UploadImageStep/UploadImageStep.d.ts +1 -1
- package/build/types/UploadInput/UploadItem/UploadItemLink.d.ts +1 -1
- package/build/types/common/Panel/Panel.d.ts +1 -1
- package/build/types/common/Panel/Panel.d.ts.map +1 -1
- package/build/types/common/Panel/Panel.positionUtils.d.ts +7 -0
- package/build/types/common/Panel/Panel.positionUtils.d.ts.map +1 -0
- package/build/types/common/PropsValues/position.d.ts +0 -13
- package/build/types/common/PropsValues/position.d.ts.map +1 -1
- package/build/types/common/ResponsivePanel/ResponsivePanel.d.ts +1 -1
- package/package.json +2 -2
- package/src/ExpressiveMoneyInput/Chevron/Chevron.tsx +8 -3
- package/src/ListItem/ListItem.tsx +5 -5
- package/src/ListItem/_stories/ListItem.layout.test.story.tsx +0 -23
- package/src/common/Panel/Panel.css +12 -4
- package/src/common/Panel/Panel.less +27 -9
- package/src/common/Panel/Panel.positionUtils.ts +79 -0
- package/src/common/Panel/Panel.test.tsx +40 -0
- package/src/common/Panel/Panel.tsx +13 -24
- package/src/common/Panel/_stories/Panel.rtl.test.story.tsx +110 -0
- package/src/common/PropsValues/position.ts +0 -50
- package/src/main.css +12 -4
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { offset, flip, shift, arrow, size, useFloating, autoUpdate } from '@floating-ui/react';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { forwardRef, useRef, useContext } from 'react';
|
|
4
|
+
import { OverlayIdContext } from '../../Provider/overlay/OverlayIdProvider.mjs';
|
|
5
|
+
import Dimmer from '../../Dimmer/Dimmer.mjs';
|
|
6
|
+
import { useDirection } from '../hooks/useDirection/useDirection.mjs';
|
|
4
7
|
import '../theme.mjs';
|
|
5
8
|
import '../direction.mjs';
|
|
6
9
|
import '@transferwise/neptune-tokens';
|
|
@@ -11,7 +14,7 @@ import '../PropsValues/width.mjs';
|
|
|
11
14
|
import '../PropsValues/type.mjs';
|
|
12
15
|
import '../PropsValues/dateMode.mjs';
|
|
13
16
|
import '../PropsValues/monthFormat.mjs';
|
|
14
|
-
import { Position
|
|
17
|
+
import { Position } from '../PropsValues/position.mjs';
|
|
15
18
|
import '../PropsValues/layouts.mjs';
|
|
16
19
|
import '../PropsValues/status.mjs';
|
|
17
20
|
import '../PropsValues/sentiment.mjs';
|
|
@@ -25,27 +28,8 @@ import '@transferwise/icons';
|
|
|
25
28
|
import 'react-intl';
|
|
26
29
|
import '../CloseButton/CloseButton.messages.mjs';
|
|
27
30
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
28
|
-
import
|
|
29
|
-
import { OverlayIdContext } from '../../Provider/overlay/OverlayIdProvider.mjs';
|
|
31
|
+
import { POPOVER_OFFSET, fallbackPlacements, positionToPlacement, mirrorPositionForRtl } from './Panel.positionUtils.mjs';
|
|
30
32
|
|
|
31
|
-
const POPOVER_OFFSET = 16;
|
|
32
|
-
// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space
|
|
33
|
-
// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.
|
|
34
|
-
// This mapping forces popover to try the four available positions before going back to the initial chosen one.
|
|
35
|
-
const fallbackPlacements = {
|
|
36
|
-
[Position.TOP]: [Position.BOTTOM, Position.RIGHT, Position.LEFT],
|
|
37
|
-
[Position.BOTTOM]: [Position.TOP, Position.RIGHT, Position.LEFT],
|
|
38
|
-
[Position.LEFT]: [Position.RIGHT, Position.TOP, Position.BOTTOM],
|
|
39
|
-
[Position.RIGHT]: [Position.LEFT, Position.TOP, Position.BOTTOM],
|
|
40
|
-
'top-start': ['bottom-start', 'top-end', 'bottom-end'],
|
|
41
|
-
'top-end': ['bottom-end', 'top-start', 'bottom-start'],
|
|
42
|
-
'bottom-start': ['top-start', 'bottom-end', 'top-end'],
|
|
43
|
-
'bottom-end': ['top-end', 'bottom-start', 'top-start'],
|
|
44
|
-
'left-start': ['right-start', 'left-end', 'right-end'],
|
|
45
|
-
'left-end': ['right-end', 'left-start', 'right-start'],
|
|
46
|
-
'right-start': ['left-start', 'right-end', 'left-end'],
|
|
47
|
-
'right-end': ['left-end', 'right-start', 'left-start']
|
|
48
|
-
};
|
|
49
33
|
const Panel = /*#__PURE__*/forwardRef(function Panel({
|
|
50
34
|
arrow: arrow$1 = false,
|
|
51
35
|
flip: flip$1 = true,
|
|
@@ -60,7 +44,11 @@ const Panel = /*#__PURE__*/forwardRef(function Panel({
|
|
|
60
44
|
...rest
|
|
61
45
|
}, reference) {
|
|
62
46
|
const arrowRef = useRef(null);
|
|
63
|
-
const
|
|
47
|
+
const {
|
|
48
|
+
isRTL
|
|
49
|
+
} = useDirection();
|
|
50
|
+
const resolvedPosition = isRTL ? mirrorPositionForRtl(position) : position;
|
|
51
|
+
const floatingPlacement = positionToPlacement(resolvedPosition);
|
|
64
52
|
const middleware = [];
|
|
65
53
|
if (arrow$1) {
|
|
66
54
|
middleware.push(offset(POPOVER_OFFSET));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Panel.mjs","sources":["../../../src/common/Panel/Panel.tsx"],"sourcesContent":["import {\n arrow as arrowMiddleware,\n autoUpdate,\n flip as flipMiddleware,\n offset,\n
|
|
1
|
+
{"version":3,"file":"Panel.mjs","sources":["../../../src/common/Panel/Panel.tsx"],"sourcesContent":["import {\n arrow as arrowMiddleware,\n autoUpdate,\n flip as flipMiddleware,\n offset,\n shift,\n size as sizeMiddleware,\n useFloating,\n} from '@floating-ui/react';\nimport { clsx } from 'clsx';\nimport {\n CSSProperties,\n HTMLAttributes,\n PropsWithChildren,\n RefObject,\n SyntheticEvent,\n forwardRef,\n useContext,\n useRef,\n} from 'react';\n\nimport { OverlayIdContext } from '../../Provider/overlay/OverlayIdProvider';\nimport Dimmer from '../../Dimmer';\nimport useDirection from '../hooks/useDirection';\nimport { Position } from '..';\nimport {\n type FloatingPlacement,\n POPOVER_OFFSET,\n fallbackPlacements,\n mirrorPositionForRtl,\n positionToPlacement,\n} from './Panel.positionUtils';\n\nexport type PanelProps = PropsWithChildren<{\n arrow?: boolean;\n flip?: boolean;\n altAxis?: boolean;\n open?: boolean;\n onClose?: (event: Event | SyntheticEvent) => void;\n position?: FloatingPlacement;\n anchorRef: RefObject<Element | null>;\n anchorWidth?: boolean;\n considerHeight?: boolean;\n}> &\n HTMLAttributes<HTMLDivElement>;\n\nconst Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(\n {\n arrow = false,\n flip = true,\n altAxis = false,\n children,\n open = false,\n onClose,\n position = Position.BOTTOM,\n anchorRef,\n anchorWidth = false,\n considerHeight = false,\n ...rest\n }: PanelProps,\n reference,\n) {\n const arrowRef = useRef<HTMLDivElement | null>(null);\n const { isRTL } = useDirection();\n const resolvedPosition = isRTL ? mirrorPositionForRtl(position) : position;\n const floatingPlacement = positionToPlacement(resolvedPosition);\n\n const middleware = [];\n\n if (arrow) {\n middleware.push(offset(POPOVER_OFFSET));\n }\n\n if (flip && fallbackPlacements[floatingPlacement]) {\n middleware.push(\n flipMiddleware({\n fallbackPlacements: fallbackPlacements[floatingPlacement],\n }),\n );\n }\n\n if (altAxis) {\n middleware.push(shift());\n }\n\n if (arrow) {\n middleware.push(arrowMiddleware({ element: arrowRef, padding: 8 }));\n }\n\n if (considerHeight) {\n middleware.push(\n sizeMiddleware({\n padding: POPOVER_OFFSET,\n apply: ({ elements, availableHeight }) => {\n elements.floating.style.setProperty(\n '--np-panel-available-height',\n `${availableHeight}px`,\n );\n },\n }),\n );\n }\n\n const { refs, floatingStyles, placement, middlewareData } = useFloating({\n placement: floatingPlacement,\n middleware,\n elements: {\n reference: anchorRef.current,\n },\n whileElementsMounted: open ? autoUpdate : undefined,\n });\n\n const arrowStyle: CSSProperties = {\n ...(middlewareData.arrow?.x != null ? { left: middlewareData.arrow.x } : {}),\n ...(middlewareData.arrow?.y != null ? { top: middlewareData.arrow.y } : {}),\n };\n\n const contentStyle: CSSProperties = {\n ...(anchorWidth ? { width: anchorRef.current?.clientWidth } : undefined),\n };\n\n const overlayId = useContext(OverlayIdContext);\n\n return (\n <Dimmer open={open} transparent fadeContentOnEnter fadeContentOnExit onClose={onClose}>\n <div\n id={overlayId}\n {...rest}\n ref={refs.setFloating}\n role=\"dialog\"\n style={floatingStyles}\n data-popper-placement={placement}\n className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}\n >\n <div ref={reference} style={contentStyle} className={clsx('np-panel__content')}>\n {children}\n {/* Arrow has to stay inside content to get the same animations as the \"dialog\" and to get hidden when panel is closed. */}\n {arrow && <div ref={arrowRef} className={clsx('np-panel__arrow')} style={arrowStyle} />}\n </div>\n </div>\n </Dimmer>\n );\n});\n\nexport default Panel;\n"],"names":["Panel","forwardRef","arrow","flip","altAxis","children","open","onClose","position","Position","BOTTOM","anchorRef","anchorWidth","considerHeight","rest","reference","arrowRef","useRef","isRTL","useDirection","resolvedPosition","mirrorPositionForRtl","floatingPlacement","positionToPlacement","middleware","push","offset","POPOVER_OFFSET","fallbackPlacements","flipMiddleware","shift","arrowMiddleware","element","padding","sizeMiddleware","apply","elements","availableHeight","floating","style","setProperty","refs","floatingStyles","placement","middlewareData","useFloating","current","whileElementsMounted","autoUpdate","undefined","arrowStyle","x","left","y","top","contentStyle","width","clientWidth","overlayId","useContext","OverlayIdContext","_jsx","Dimmer","transparent","fadeContentOnEnter","fadeContentOnExit","id","ref","setFloating","role","className","clsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAMA,KAAK,gBAAGC,UAAU,CAA6B,SAASD,KAAKA,CACjE;AACEE,SAAAA,OAAK,GAAG,KAAK;AACbC,QAAAA,MAAI,GAAG,IAAI;AACXC,EAAAA,OAAO,GAAG,KAAK;EACfC,QAAQ;AACRC,EAAAA,IAAI,GAAG,KAAK;EACZC,OAAO;EACPC,QAAQ,GAAGC,QAAQ,CAACC,MAAM;EAC1BC,SAAS;AACTC,EAAAA,WAAW,GAAG,KAAK;AACnBC,EAAAA,cAAc,GAAG,KAAK;EACtB,GAAGC;AAAI,CACI,EACbC,SAAS,EAAA;AAET,EAAA,MAAMC,QAAQ,GAAGC,MAAM,CAAwB,IAAI,CAAC;EACpD,MAAM;AAAEC,IAAAA;GAAO,GAAGC,YAAY,EAAE;EAChC,MAAMC,gBAAgB,GAAGF,KAAK,GAAGG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E,EAAEQ,IAAI,CAACwD,SAAS,CAAE;AAAAjE,MAAAA,QAAA,eAExEmE,IAAA,CAAA,KAAA,EAAA;AAAKL,QAAAA,GAAG,EAAEpD,SAAU;AAACwB,QAAAA,KAAK,EAAEgB,YAAa;AAACe,QAAAA,SAAS,EAAEC,IAAI,CAAC,mBAAmB,CAAE;AAAAlE,QAAAA,QAAA,EAAA,CAC5EA,QAAQ,EAERH,OAAK,iBAAI2D,GAAA,CAAA,KAAA,EAAA;AAAKM,UAAAA,GAAG,EAAEnD,QAAS;AAACsD,UAAAA,SAAS,EAAEC,IAAI,CAAC,iBAAiB,CAAE;AAAChC,UAAAA,KAAK,EAAEW;AAAW,SAAA,CAAG;OACpF;KACF;AACP,GAAQ,CAAC;AAEb,CAAC;;;;"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const POPOVER_OFFSET = 16;
|
|
4
|
+
// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space
|
|
5
|
+
// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.
|
|
6
|
+
// This mapping forces popover to try the four available positions before going back to the initial chosen one.
|
|
7
|
+
const fallbackPlacements = {
|
|
8
|
+
top: ['bottom', 'right', 'left'],
|
|
9
|
+
bottom: ['top', 'right', 'left'],
|
|
10
|
+
left: ['right', 'top', 'bottom'],
|
|
11
|
+
right: ['left', 'top', 'bottom'],
|
|
12
|
+
'top-start': ['bottom-start', 'top-end', 'bottom-end'],
|
|
13
|
+
'top-end': ['bottom-end', 'top-start', 'bottom-start'],
|
|
14
|
+
'bottom-start': ['top-start', 'bottom-end', 'top-end'],
|
|
15
|
+
'bottom-end': ['top-end', 'bottom-start', 'top-start'],
|
|
16
|
+
'left-start': ['right-start', 'left-end', 'right-end'],
|
|
17
|
+
'left-end': ['right-end', 'left-start', 'right-start'],
|
|
18
|
+
'right-start': ['left-start', 'right-end', 'left-end'],
|
|
19
|
+
'right-end': ['left-end', 'right-start', 'left-start']
|
|
20
|
+
};
|
|
21
|
+
const positionToPlacement = position => {
|
|
22
|
+
switch (position) {
|
|
23
|
+
case 'top-left':
|
|
24
|
+
return 'top-start';
|
|
25
|
+
case 'top-right':
|
|
26
|
+
return 'top-end';
|
|
27
|
+
case 'bottom-left':
|
|
28
|
+
return 'bottom-start';
|
|
29
|
+
case 'bottom-right':
|
|
30
|
+
return 'bottom-end';
|
|
31
|
+
case 'left-top':
|
|
32
|
+
return 'left-start';
|
|
33
|
+
case 'left-bottom':
|
|
34
|
+
return 'left-end';
|
|
35
|
+
case 'right-top':
|
|
36
|
+
return 'right-start';
|
|
37
|
+
case 'right-bottom':
|
|
38
|
+
return 'right-end';
|
|
39
|
+
default:
|
|
40
|
+
return position;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const mirrorPositionForRtl = position => {
|
|
44
|
+
switch (position) {
|
|
45
|
+
case 'left':
|
|
46
|
+
return 'right';
|
|
47
|
+
case 'right':
|
|
48
|
+
return 'left';
|
|
49
|
+
case 'left-top':
|
|
50
|
+
return 'right-top';
|
|
51
|
+
case 'left-bottom':
|
|
52
|
+
return 'right-bottom';
|
|
53
|
+
case 'right-top':
|
|
54
|
+
return 'left-top';
|
|
55
|
+
case 'right-bottom':
|
|
56
|
+
return 'left-bottom';
|
|
57
|
+
default:
|
|
58
|
+
// top-left/top-right/bottom-left/bottom-right map to start/end via
|
|
59
|
+
// positionToPlacement, and floating-ui already flips start/end in RTL.
|
|
60
|
+
return position;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
exports.POPOVER_OFFSET = POPOVER_OFFSET;
|
|
65
|
+
exports.fallbackPlacements = fallbackPlacements;
|
|
66
|
+
exports.mirrorPositionForRtl = mirrorPositionForRtl;
|
|
67
|
+
exports.positionToPlacement = positionToPlacement;
|
|
68
|
+
//# sourceMappingURL=Panel.positionUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Panel.positionUtils.js","sources":["../../../src/common/Panel/Panel.positionUtils.ts"],"sourcesContent":["import type { Placement } from '@floating-ui/react';\n\nexport type FloatingPlacement =\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-left'\n | 'top-right'\n | 'right-top'\n | 'right-bottom'\n | 'bottom-left'\n | 'bottom-right'\n | 'left-top'\n | 'left-bottom';\n\nexport const POPOVER_OFFSET = 16;\n\n// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space\n// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.\n// This mapping forces popover to try the four available positions before going back to the initial chosen one.\nexport const fallbackPlacements: Record<Placement, Placement[]> = {\n top: ['bottom', 'right', 'left'],\n bottom: ['top', 'right', 'left'],\n left: ['right', 'top', 'bottom'],\n right: ['left', 'top', 'bottom'],\n 'top-start': ['bottom-start', 'top-end', 'bottom-end'],\n 'top-end': ['bottom-end', 'top-start', 'bottom-start'],\n 'bottom-start': ['top-start', 'bottom-end', 'top-end'],\n 'bottom-end': ['top-end', 'bottom-start', 'top-start'],\n 'left-start': ['right-start', 'left-end', 'right-end'],\n 'left-end': ['right-end', 'left-start', 'right-start'],\n 'right-start': ['left-start', 'right-end', 'left-end'],\n 'right-end': ['left-end', 'right-start', 'left-start'],\n};\n\nexport const positionToPlacement = (position: FloatingPlacement): Placement => {\n switch (position) {\n case 'top-left':\n return 'top-start';\n case 'top-right':\n return 'top-end';\n case 'bottom-left':\n return 'bottom-start';\n case 'bottom-right':\n return 'bottom-end';\n case 'left-top':\n return 'left-start';\n case 'left-bottom':\n return 'left-end';\n case 'right-top':\n return 'right-start';\n case 'right-bottom':\n return 'right-end';\n default:\n return position;\n }\n};\n\nexport const mirrorPositionForRtl = (position: FloatingPlacement): FloatingPlacement => {\n switch (position) {\n case 'left':\n return 'right';\n case 'right':\n return 'left';\n case 'left-top':\n return 'right-top';\n case 'left-bottom':\n return 'right-bottom';\n case 'right-top':\n return 'left-top';\n case 'right-bottom':\n return 'left-bottom';\n default:\n // top-left/top-right/bottom-left/bottom-right map to start/end via\n // positionToPlacement, and floating-ui already flips start/end in RTL.\n return position;\n }\n};\n"],"names":["POPOVER_OFFSET","fallbackPlacements","top","bottom","left","right","positionToPlacement","position","mirrorPositionForRtl"],"mappings":";;AAgBO,MAAMA,cAAc,GAAG;AAE9B;AACA;AACA;AACO,MAAMC,kBAAkB,GAAmC;AAChEC,EAAAA,GAAG,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC;AAChCC,EAAAA,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC;AAChCC,EAAAA,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC;AAChCC,EAAAA,KAAK,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC;AAChC,EAAA,WAAW,EAAE,CAAC,cAAc,EAAE,SAAS,EAAE,YAAY,CAAC;AACtD,EAAA,SAAS,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,cAAc,CAAC;AACtD,EAAA,cAAc,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,CAAC;AACtD,EAAA,YAAY,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,WAAW,CAAC;AACtD,EAAA,YAAY,EAAE,CAAC,aAAa,EAAE,UAAU,EAAE,WAAW,CAAC;AACtD,EAAA,UAAU,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,aAAa,CAAC;AACtD,EAAA,aAAa,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,UAAU,CAAC;AACtD,EAAA,WAAW,EAAE,CAAC,UAAU,EAAE,aAAa,EAAE,YAAY;;AAGhD,MAAMC,mBAAmB,GAAIC,QAA2B,IAAe;AAC5E,EAAA,QAAQA,QAAQ;AACd,IAAA,KAAK,UAAU;AACb,MAAA,OAAO,WAAW;AACpB,IAAA,KAAK,WAAW;AACd,MAAA,OAAO,SAAS;AAClB,IAAA,KAAK,aAAa;AAChB,MAAA,OAAO,cAAc;AACvB,IAAA,KAAK,cAAc;AACjB,MAAA,OAAO,YAAY;AACrB,IAAA,KAAK,UAAU;AACb,MAAA,OAAO,YAAY;AACrB,IAAA,KAAK,aAAa;AAChB,MAAA,OAAO,UAAU;AACnB,IAAA,KAAK,WAAW;AACd,MAAA,OAAO,aAAa;AACtB,IAAA,KAAK,cAAc;AACjB,MAAA,OAAO,WAAW;AACpB,IAAA;AACE,MAAA,OAAOA,QAAQ;AACnB;AACF;AAEO,MAAMC,oBAAoB,GAAID,QAA2B,IAAuB;AACrF,EAAA,QAAQA,QAAQ;AACd,IAAA,KAAK,MAAM;AACT,MAAA,OAAO,OAAO;AAChB,IAAA,KAAK,OAAO;AACV,MAAA,OAAO,MAAM;AACf,IAAA,KAAK,UAAU;AACb,MAAA,OAAO,WAAW;AACpB,IAAA,KAAK,aAAa;AAChB,MAAA,OAAO,cAAc;AACvB,IAAA,KAAK,WAAW;AACd,MAAA,OAAO,UAAU;AACnB,IAAA,KAAK,cAAc;AACjB,MAAA,OAAO,aAAa;AACtB,IAAA;AACE;AACA;AACA,MAAA,OAAOA,QAAQ;AACnB;AACF;;;;;;;"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const POPOVER_OFFSET = 16;
|
|
2
|
+
// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space
|
|
3
|
+
// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.
|
|
4
|
+
// This mapping forces popover to try the four available positions before going back to the initial chosen one.
|
|
5
|
+
const fallbackPlacements = {
|
|
6
|
+
top: ['bottom', 'right', 'left'],
|
|
7
|
+
bottom: ['top', 'right', 'left'],
|
|
8
|
+
left: ['right', 'top', 'bottom'],
|
|
9
|
+
right: ['left', 'top', 'bottom'],
|
|
10
|
+
'top-start': ['bottom-start', 'top-end', 'bottom-end'],
|
|
11
|
+
'top-end': ['bottom-end', 'top-start', 'bottom-start'],
|
|
12
|
+
'bottom-start': ['top-start', 'bottom-end', 'top-end'],
|
|
13
|
+
'bottom-end': ['top-end', 'bottom-start', 'top-start'],
|
|
14
|
+
'left-start': ['right-start', 'left-end', 'right-end'],
|
|
15
|
+
'left-end': ['right-end', 'left-start', 'right-start'],
|
|
16
|
+
'right-start': ['left-start', 'right-end', 'left-end'],
|
|
17
|
+
'right-end': ['left-end', 'right-start', 'left-start']
|
|
18
|
+
};
|
|
19
|
+
const positionToPlacement = position => {
|
|
20
|
+
switch (position) {
|
|
21
|
+
case 'top-left':
|
|
22
|
+
return 'top-start';
|
|
23
|
+
case 'top-right':
|
|
24
|
+
return 'top-end';
|
|
25
|
+
case 'bottom-left':
|
|
26
|
+
return 'bottom-start';
|
|
27
|
+
case 'bottom-right':
|
|
28
|
+
return 'bottom-end';
|
|
29
|
+
case 'left-top':
|
|
30
|
+
return 'left-start';
|
|
31
|
+
case 'left-bottom':
|
|
32
|
+
return 'left-end';
|
|
33
|
+
case 'right-top':
|
|
34
|
+
return 'right-start';
|
|
35
|
+
case 'right-bottom':
|
|
36
|
+
return 'right-end';
|
|
37
|
+
default:
|
|
38
|
+
return position;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const mirrorPositionForRtl = position => {
|
|
42
|
+
switch (position) {
|
|
43
|
+
case 'left':
|
|
44
|
+
return 'right';
|
|
45
|
+
case 'right':
|
|
46
|
+
return 'left';
|
|
47
|
+
case 'left-top':
|
|
48
|
+
return 'right-top';
|
|
49
|
+
case 'left-bottom':
|
|
50
|
+
return 'right-bottom';
|
|
51
|
+
case 'right-top':
|
|
52
|
+
return 'left-top';
|
|
53
|
+
case 'right-bottom':
|
|
54
|
+
return 'left-bottom';
|
|
55
|
+
default:
|
|
56
|
+
// top-left/top-right/bottom-left/bottom-right map to start/end via
|
|
57
|
+
// positionToPlacement, and floating-ui already flips start/end in RTL.
|
|
58
|
+
return position;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export { POPOVER_OFFSET, fallbackPlacements, mirrorPositionForRtl, positionToPlacement };
|
|
63
|
+
//# sourceMappingURL=Panel.positionUtils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Panel.positionUtils.mjs","sources":["../../../src/common/Panel/Panel.positionUtils.ts"],"sourcesContent":["import type { Placement } from '@floating-ui/react';\n\nexport type FloatingPlacement =\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-left'\n | 'top-right'\n | 'right-top'\n | 'right-bottom'\n | 'bottom-left'\n | 'bottom-right'\n | 'left-top'\n | 'left-bottom';\n\nexport const POPOVER_OFFSET = 16;\n\n// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space\n// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.\n// This mapping forces popover to try the four available positions before going back to the initial chosen one.\nexport const fallbackPlacements: Record<Placement, Placement[]> = {\n top: ['bottom', 'right', 'left'],\n bottom: ['top', 'right', 'left'],\n left: ['right', 'top', 'bottom'],\n right: ['left', 'top', 'bottom'],\n 'top-start': ['bottom-start', 'top-end', 'bottom-end'],\n 'top-end': ['bottom-end', 'top-start', 'bottom-start'],\n 'bottom-start': ['top-start', 'bottom-end', 'top-end'],\n 'bottom-end': ['top-end', 'bottom-start', 'top-start'],\n 'left-start': ['right-start', 'left-end', 'right-end'],\n 'left-end': ['right-end', 'left-start', 'right-start'],\n 'right-start': ['left-start', 'right-end', 'left-end'],\n 'right-end': ['left-end', 'right-start', 'left-start'],\n};\n\nexport const positionToPlacement = (position: FloatingPlacement): Placement => {\n switch (position) {\n case 'top-left':\n return 'top-start';\n case 'top-right':\n return 'top-end';\n case 'bottom-left':\n return 'bottom-start';\n case 'bottom-right':\n return 'bottom-end';\n case 'left-top':\n return 'left-start';\n case 'left-bottom':\n return 'left-end';\n case 'right-top':\n return 'right-start';\n case 'right-bottom':\n return 'right-end';\n default:\n return position;\n }\n};\n\nexport const mirrorPositionForRtl = (position: FloatingPlacement): FloatingPlacement => {\n switch (position) {\n case 'left':\n return 'right';\n case 'right':\n return 'left';\n case 'left-top':\n return 'right-top';\n case 'left-bottom':\n return 'right-bottom';\n case 'right-top':\n return 'left-top';\n case 'right-bottom':\n return 'left-bottom';\n default:\n // top-left/top-right/bottom-left/bottom-right map to start/end via\n // positionToPlacement, and floating-ui already flips start/end in RTL.\n return position;\n }\n};\n"],"names":["POPOVER_OFFSET","fallbackPlacements","top","bottom","left","right","positionToPlacement","position","mirrorPositionForRtl"],"mappings":"AAgBO,MAAMA,cAAc,GAAG;AAE9B;AACA;AACA;AACO,MAAMC,kBAAkB,GAAmC;AAChEC,EAAAA,GAAG,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC;AAChCC,EAAAA,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC;AAChCC,EAAAA,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC;AAChCC,EAAAA,KAAK,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC;AAChC,EAAA,WAAW,EAAE,CAAC,cAAc,EAAE,SAAS,EAAE,YAAY,CAAC;AACtD,EAAA,SAAS,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,cAAc,CAAC;AACtD,EAAA,cAAc,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,CAAC;AACtD,EAAA,YAAY,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,WAAW,CAAC;AACtD,EAAA,YAAY,EAAE,CAAC,aAAa,EAAE,UAAU,EAAE,WAAW,CAAC;AACtD,EAAA,UAAU,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,aAAa,CAAC;AACtD,EAAA,aAAa,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,UAAU,CAAC;AACtD,EAAA,WAAW,EAAE,CAAC,UAAU,EAAE,aAAa,EAAE,YAAY;;AAGhD,MAAMC,mBAAmB,GAAIC,QAA2B,IAAe;AAC5E,EAAA,QAAQA,QAAQ;AACd,IAAA,KAAK,UAAU;AACb,MAAA,OAAO,WAAW;AACpB,IAAA,KAAK,WAAW;AACd,MAAA,OAAO,SAAS;AAClB,IAAA,KAAK,aAAa;AAChB,MAAA,OAAO,cAAc;AACvB,IAAA,KAAK,cAAc;AACjB,MAAA,OAAO,YAAY;AACrB,IAAA,KAAK,UAAU;AACb,MAAA,OAAO,YAAY;AACrB,IAAA,KAAK,aAAa;AAChB,MAAA,OAAO,UAAU;AACnB,IAAA,KAAK,WAAW;AACd,MAAA,OAAO,aAAa;AACtB,IAAA,KAAK,cAAc;AACjB,MAAA,OAAO,WAAW;AACpB,IAAA;AACE,MAAA,OAAOA,QAAQ;AACnB;AACF;AAEO,MAAMC,oBAAoB,GAAID,QAA2B,IAAuB;AACrF,EAAA,QAAQA,QAAQ;AACd,IAAA,KAAK,MAAM;AACT,MAAA,OAAO,OAAO;AAChB,IAAA,KAAK,OAAO;AACV,MAAA,OAAO,MAAM;AACf,IAAA,KAAK,UAAU;AACb,MAAA,OAAO,WAAW;AACpB,IAAA,KAAK,aAAa;AAChB,MAAA,OAAO,cAAc;AACvB,IAAA,KAAK,WAAW;AACd,MAAA,OAAO,UAAU;AACnB,IAAA,KAAK,cAAc;AACjB,MAAA,OAAO,aAAa;AACtB,IAAA;AACE;AACA;AACA,MAAA,OAAOA,QAAQ;AACnB;AACF;;;;"}
|
|
@@ -16,29 +16,4 @@ exports.Position = void 0;
|
|
|
16
16
|
Position["TOP_LEFT"] = "top-left";
|
|
17
17
|
Position["TOP_RIGHT"] = "top-right";
|
|
18
18
|
})(exports.Position || (exports.Position = {}));
|
|
19
|
-
/** Maps Neptune position values to floating-ui Placement */
|
|
20
|
-
const positionToPlacement = position => {
|
|
21
|
-
switch (position) {
|
|
22
|
-
case 'top-left':
|
|
23
|
-
return 'top-start';
|
|
24
|
-
case 'top-right':
|
|
25
|
-
return 'top-end';
|
|
26
|
-
case 'bottom-left':
|
|
27
|
-
return 'bottom-start';
|
|
28
|
-
case 'bottom-right':
|
|
29
|
-
return 'bottom-end';
|
|
30
|
-
case 'left-top':
|
|
31
|
-
return 'left-start';
|
|
32
|
-
case 'left-bottom':
|
|
33
|
-
return 'left-end';
|
|
34
|
-
case 'right-top':
|
|
35
|
-
return 'right-start';
|
|
36
|
-
case 'right-bottom':
|
|
37
|
-
return 'right-end';
|
|
38
|
-
default:
|
|
39
|
-
return position;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
exports.positionToPlacement = positionToPlacement;
|
|
44
19
|
//# sourceMappingURL=position.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position.js","sources":["../../../src/common/PropsValues/position.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"position.js","sources":["../../../src/common/PropsValues/position.ts"],"sourcesContent":["export enum Position {\n BOTTOM = 'bottom',\n BOTTOM_LEFT = 'bottom-left',\n BOTTOM_RIGHT = 'bottom-right',\n CENTER = 'center',\n LEFT = 'left',\n LEFT_BOTTOM = 'left-bottom',\n LEFT_TOP = 'left-top',\n RIGHT = 'right',\n RIGHT_BOTTOM = 'right-bottom',\n RIGHT_TOP = 'right-top',\n TOP = 'top',\n TOP_LEFT = 'top-left',\n TOP_RIGHT = 'top-right',\n}\n\nexport type PositionCenter = 'center';\nexport type PositionTop = 'top';\nexport type PositionRight = 'right';\nexport type PositionBottom = 'bottom';\nexport type PositionLeft = 'left';\n"],"names":["Position"],"mappings":";;AAAYA;AAAZ,CAAA,UAAYA,QAAQ,EAAA;AAClBA,EAAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjBA,EAAAA,QAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3BA,EAAAA,QAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AAC7BA,EAAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjBA,EAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACbA,EAAAA,QAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3BA,EAAAA,QAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrBA,EAAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACfA,EAAAA,QAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AAC7BA,EAAAA,QAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvBA,EAAAA,QAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACXA,EAAAA,QAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrBA,EAAAA,QAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACzB,CAAC,EAdWA,gBAAQ,KAARA,gBAAQ,GAAA,EAAA,CAAA,CAAA;;"}
|
|
@@ -14,29 +14,6 @@ var Position;
|
|
|
14
14
|
Position["TOP_LEFT"] = "top-left";
|
|
15
15
|
Position["TOP_RIGHT"] = "top-right";
|
|
16
16
|
})(Position || (Position = {}));
|
|
17
|
-
/** Maps Neptune position values to floating-ui Placement */
|
|
18
|
-
const positionToPlacement = position => {
|
|
19
|
-
switch (position) {
|
|
20
|
-
case 'top-left':
|
|
21
|
-
return 'top-start';
|
|
22
|
-
case 'top-right':
|
|
23
|
-
return 'top-end';
|
|
24
|
-
case 'bottom-left':
|
|
25
|
-
return 'bottom-start';
|
|
26
|
-
case 'bottom-right':
|
|
27
|
-
return 'bottom-end';
|
|
28
|
-
case 'left-top':
|
|
29
|
-
return 'left-start';
|
|
30
|
-
case 'left-bottom':
|
|
31
|
-
return 'left-end';
|
|
32
|
-
case 'right-top':
|
|
33
|
-
return 'right-start';
|
|
34
|
-
case 'right-bottom':
|
|
35
|
-
return 'right-end';
|
|
36
|
-
default:
|
|
37
|
-
return position;
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
17
|
|
|
41
|
-
export { Position
|
|
18
|
+
export { Position };
|
|
42
19
|
//# sourceMappingURL=position.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position.mjs","sources":["../../../src/common/PropsValues/position.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"position.mjs","sources":["../../../src/common/PropsValues/position.ts"],"sourcesContent":["export enum Position {\n BOTTOM = 'bottom',\n BOTTOM_LEFT = 'bottom-left',\n BOTTOM_RIGHT = 'bottom-right',\n CENTER = 'center',\n LEFT = 'left',\n LEFT_BOTTOM = 'left-bottom',\n LEFT_TOP = 'left-top',\n RIGHT = 'right',\n RIGHT_BOTTOM = 'right-bottom',\n RIGHT_TOP = 'right-top',\n TOP = 'top',\n TOP_LEFT = 'top-left',\n TOP_RIGHT = 'top-right',\n}\n\nexport type PositionCenter = 'center';\nexport type PositionTop = 'top';\nexport type PositionRight = 'right';\nexport type PositionBottom = 'bottom';\nexport type PositionLeft = 'left';\n"],"names":["Position"],"mappings":"IAAYA;AAAZ,CAAA,UAAYA,QAAQ,EAAA;AAClBA,EAAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjBA,EAAAA,QAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3BA,EAAAA,QAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AAC7BA,EAAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjBA,EAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACbA,EAAAA,QAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3BA,EAAAA,QAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrBA,EAAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACfA,EAAAA,QAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AAC7BA,EAAAA,QAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvBA,EAAAA,QAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACXA,EAAAA,QAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrBA,EAAAA,QAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACzB,CAAC,EAdWA,QAAQ,KAARA,QAAQ,GAAA,EAAA,CAAA,CAAA;;;;"}
|
package/build/main.css
CHANGED
|
@@ -21875,27 +21875,35 @@ button.np-option {
|
|
|
21875
21875
|
.np-panel[data-popper-placement^="top"] > .np-panel__content {
|
|
21876
21876
|
transform: translateY(10px) scale(0.95);
|
|
21877
21877
|
}
|
|
21878
|
-
.np-panel[data-popper-placement^="top"]
|
|
21878
|
+
.np-panel[data-popper-placement^="top"] .np-panel__arrow {
|
|
21879
21879
|
inset-block-end: -6px;
|
|
21880
21880
|
}
|
|
21881
21881
|
.np-panel[data-popper-placement^="right"] > .np-panel__content {
|
|
21882
21882
|
transform: translateX(-10px) scale(0.95);
|
|
21883
21883
|
}
|
|
21884
|
-
.np-panel[data-popper-placement^="right"]
|
|
21884
|
+
.np-panel[data-popper-placement^="right"] .np-panel__arrow {
|
|
21885
21885
|
inset-inline-start: -6px;
|
|
21886
21886
|
}
|
|
21887
|
+
[dir="rtl"] .np-panel[data-popper-placement^="right"] .np-panel__arrow {
|
|
21888
|
+
inset-inline-start: unset;
|
|
21889
|
+
inset-inline-end: -6px;
|
|
21890
|
+
}
|
|
21887
21891
|
.np-panel[data-popper-placement^="bottom"] > .np-panel__content {
|
|
21888
21892
|
transform: translateY(-10px) scale(0.95);
|
|
21889
21893
|
}
|
|
21890
|
-
.np-panel[data-popper-placement^="bottom"]
|
|
21894
|
+
.np-panel[data-popper-placement^="bottom"] .np-panel__arrow {
|
|
21891
21895
|
inset-block-start: -6px;
|
|
21892
21896
|
}
|
|
21893
21897
|
.np-panel[data-popper-placement^="left"] > .np-panel__content {
|
|
21894
21898
|
transform: translateX(10px) scale(0.95);
|
|
21895
21899
|
}
|
|
21896
|
-
.np-panel[data-popper-placement^="left"]
|
|
21900
|
+
.np-panel[data-popper-placement^="left"] .np-panel__arrow {
|
|
21897
21901
|
inset-inline-end: -6px;
|
|
21898
21902
|
}
|
|
21903
|
+
[dir="rtl"] .np-panel[data-popper-placement^="left"] .np-panel__arrow {
|
|
21904
|
+
inset-inline-end: unset;
|
|
21905
|
+
inset-inline-start: -6px;
|
|
21906
|
+
}
|
|
21899
21907
|
.np-theme-personal .np-panel__content {
|
|
21900
21908
|
border-radius: 16px;
|
|
21901
21909
|
border-radius: var(--radius-medium);
|
|
@@ -39,27 +39,35 @@
|
|
|
39
39
|
.np-panel[data-popper-placement^="top"] > .np-panel__content {
|
|
40
40
|
transform: translateY(10px) scale(0.95);
|
|
41
41
|
}
|
|
42
|
-
.np-panel[data-popper-placement^="top"]
|
|
42
|
+
.np-panel[data-popper-placement^="top"] .np-panel__arrow {
|
|
43
43
|
inset-block-end: -6px;
|
|
44
44
|
}
|
|
45
45
|
.np-panel[data-popper-placement^="right"] > .np-panel__content {
|
|
46
46
|
transform: translateX(-10px) scale(0.95);
|
|
47
47
|
}
|
|
48
|
-
.np-panel[data-popper-placement^="right"]
|
|
48
|
+
.np-panel[data-popper-placement^="right"] .np-panel__arrow {
|
|
49
49
|
inset-inline-start: -6px;
|
|
50
50
|
}
|
|
51
|
+
[dir="rtl"] .np-panel[data-popper-placement^="right"] .np-panel__arrow {
|
|
52
|
+
inset-inline-start: unset;
|
|
53
|
+
inset-inline-end: -6px;
|
|
54
|
+
}
|
|
51
55
|
.np-panel[data-popper-placement^="bottom"] > .np-panel__content {
|
|
52
56
|
transform: translateY(-10px) scale(0.95);
|
|
53
57
|
}
|
|
54
|
-
.np-panel[data-popper-placement^="bottom"]
|
|
58
|
+
.np-panel[data-popper-placement^="bottom"] .np-panel__arrow {
|
|
55
59
|
inset-block-start: -6px;
|
|
56
60
|
}
|
|
57
61
|
.np-panel[data-popper-placement^="left"] > .np-panel__content {
|
|
58
62
|
transform: translateX(10px) scale(0.95);
|
|
59
63
|
}
|
|
60
|
-
.np-panel[data-popper-placement^="left"]
|
|
64
|
+
.np-panel[data-popper-placement^="left"] .np-panel__arrow {
|
|
61
65
|
inset-inline-end: -6px;
|
|
62
66
|
}
|
|
67
|
+
[dir="rtl"] .np-panel[data-popper-placement^="left"] .np-panel__arrow {
|
|
68
|
+
inset-inline-end: unset;
|
|
69
|
+
inset-inline-start: -6px;
|
|
70
|
+
}
|
|
63
71
|
.np-theme-personal .np-panel__content {
|
|
64
72
|
border-radius: 16px;
|
|
65
73
|
border-radius: var(--radius-medium);
|
package/build/styles/main.css
CHANGED
|
@@ -21875,27 +21875,35 @@ button.np-option {
|
|
|
21875
21875
|
.np-panel[data-popper-placement^="top"] > .np-panel__content {
|
|
21876
21876
|
transform: translateY(10px) scale(0.95);
|
|
21877
21877
|
}
|
|
21878
|
-
.np-panel[data-popper-placement^="top"]
|
|
21878
|
+
.np-panel[data-popper-placement^="top"] .np-panel__arrow {
|
|
21879
21879
|
inset-block-end: -6px;
|
|
21880
21880
|
}
|
|
21881
21881
|
.np-panel[data-popper-placement^="right"] > .np-panel__content {
|
|
21882
21882
|
transform: translateX(-10px) scale(0.95);
|
|
21883
21883
|
}
|
|
21884
|
-
.np-panel[data-popper-placement^="right"]
|
|
21884
|
+
.np-panel[data-popper-placement^="right"] .np-panel__arrow {
|
|
21885
21885
|
inset-inline-start: -6px;
|
|
21886
21886
|
}
|
|
21887
|
+
[dir="rtl"] .np-panel[data-popper-placement^="right"] .np-panel__arrow {
|
|
21888
|
+
inset-inline-start: unset;
|
|
21889
|
+
inset-inline-end: -6px;
|
|
21890
|
+
}
|
|
21887
21891
|
.np-panel[data-popper-placement^="bottom"] > .np-panel__content {
|
|
21888
21892
|
transform: translateY(-10px) scale(0.95);
|
|
21889
21893
|
}
|
|
21890
|
-
.np-panel[data-popper-placement^="bottom"]
|
|
21894
|
+
.np-panel[data-popper-placement^="bottom"] .np-panel__arrow {
|
|
21891
21895
|
inset-block-start: -6px;
|
|
21892
21896
|
}
|
|
21893
21897
|
.np-panel[data-popper-placement^="left"] > .np-panel__content {
|
|
21894
21898
|
transform: translateX(10px) scale(0.95);
|
|
21895
21899
|
}
|
|
21896
|
-
.np-panel[data-popper-placement^="left"]
|
|
21900
|
+
.np-panel[data-popper-placement^="left"] .np-panel__arrow {
|
|
21897
21901
|
inset-inline-end: -6px;
|
|
21898
21902
|
}
|
|
21903
|
+
[dir="rtl"] .np-panel[data-popper-placement^="left"] .np-panel__arrow {
|
|
21904
|
+
inset-inline-end: unset;
|
|
21905
|
+
inset-inline-start: -6px;
|
|
21906
|
+
}
|
|
21899
21907
|
.np-theme-personal .np-panel__content {
|
|
21900
21908
|
border-radius: 16px;
|
|
21901
21909
|
border-radius: var(--radius-medium);
|
|
@@ -11,7 +11,7 @@ export type BodyProps = HTMLAttributes<HTMLSpanElement | HTMLParagraphElement> &
|
|
|
11
11
|
*/
|
|
12
12
|
preserveNewlines?: boolean;
|
|
13
13
|
};
|
|
14
|
-
declare const Body: import("react").ForwardRefExoticComponent<HTMLAttributes<
|
|
14
|
+
declare const Body: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement | HTMLSpanElement> & {
|
|
15
15
|
/** @default 'body-default' */
|
|
16
16
|
type?: BodyTypes;
|
|
17
17
|
/** @default 'div' */
|
|
@@ -21,6 +21,6 @@ declare const Body: import("react").ForwardRefExoticComponent<HTMLAttributes<HTM
|
|
|
21
21
|
* @default false
|
|
22
22
|
*/
|
|
23
23
|
preserveNewlines?: boolean;
|
|
24
|
-
} & import("react").RefAttributes<HTMLDivElement |
|
|
24
|
+
} & import("react").RefAttributes<HTMLDivElement | HTMLParagraphElement | HTMLSpanElement | null>>;
|
|
25
25
|
export default Body;
|
|
26
26
|
//# sourceMappingURL=Body.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chevron.d.ts","sourceRoot":"","sources":["../../../../src/ExpressiveMoneyInput/Chevron/Chevron.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Chevron.d.ts","sourceRoot":"","sources":["../../../../src/ExpressiveMoneyInput/Chevron/Chevron.tsx"],"names":[],"mappings":"AAMA,UAAU,KAAK;IACb,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,OAAO,GAAI,gBAAuB,KAAK,gCA6BnD,CAAC"}
|
|
@@ -16,6 +16,6 @@ declare const IconButton: import("react").ForwardRefExoticComponent<{
|
|
|
16
16
|
/** @default 'default' */
|
|
17
17
|
type?: "default" | "negative";
|
|
18
18
|
'data-testid'?: string;
|
|
19
|
-
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "href"> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, "disabled" | "onClick"> & Pick<HTMLAttributes<HTMLDivElement>, "
|
|
19
|
+
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "href"> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, "disabled" | "onClick"> & Pick<HTMLAttributes<HTMLDivElement>, "id" | "className" | "tabIndex" | "role" | "aria-label" | "children"> & import("react").RefAttributes<unknown>>;
|
|
20
20
|
export default IconButton;
|
|
21
21
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -55,6 +55,7 @@ declare const _default: import("react").FC<{
|
|
|
55
55
|
selectProps?: Partial<SelectInputProps<CurrencyOptionItem>> | undefined;
|
|
56
56
|
amount: number | null;
|
|
57
57
|
searchPlaceholder?: string | undefined;
|
|
58
|
+
decimals?: number | undefined;
|
|
58
59
|
currencies: readonly CurrencyItem[];
|
|
59
60
|
selectedCurrency: CurrencyOptionItem;
|
|
60
61
|
onCurrencyChange?: ((value: CurrencyOptionItem) => void) | undefined;
|
|
@@ -66,7 +67,6 @@ declare const _default: import("react").FC<{
|
|
|
66
67
|
}) => void) | undefined;
|
|
67
68
|
customActionLabel?: import("react").ReactNode;
|
|
68
69
|
onCustomAction?: (() => void) | undefined;
|
|
69
|
-
decimals?: number | undefined;
|
|
70
70
|
}>;
|
|
71
71
|
export default _default;
|
|
72
72
|
//# sourceMappingURL=MoneyInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoneyInput.d.ts","sourceRoot":"","sources":["../../../src/MoneyInput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AED,MAAM,MAAM,kCAAkC,GAAG,eAAe,GAC9D,OAAO,CAAC,wBAAwB,CAAC,CAAC;;SA5B7B,MAAM;wBACS,MAAM;YAMnB,SAAS,GAAG,UAAU,GAAG,SAAS;kBAF3B,MAAM;iBAYP,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;kBACrB,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;YAZnD,MAAM,GAAG,IAAI;wBAID,MAAM;eAcf,MAAM;gBAtBL,SAAS,YAAY,EAAE;sBACjB,kBAAkB;wBACjB,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI;sBAIrC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI;;sBAM9B,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,YAAY,EAAE,CAAA;KAAE,KAAK,IAAI;;sBAEzE,MAAM,IAAI;;AAib7B,wBAA2F"}
|
|
@@ -10,7 +10,7 @@ export type TitleProps = LabelHTMLAttributes<HTMLHeadingElement | HTMLSpanElemen
|
|
|
10
10
|
*/
|
|
11
11
|
type?: TitleTypes;
|
|
12
12
|
};
|
|
13
|
-
declare const Title: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<
|
|
13
|
+
declare const Title: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<HTMLHeadingElement | HTMLLabelElement | HTMLSpanElement> & React.LiHTMLAttributes<HTMLLIElement> & {
|
|
14
14
|
/**
|
|
15
15
|
* Default value will based one `type` prop
|
|
16
16
|
*/
|
|
@@ -19,6 +19,6 @@ declare const Title: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<H
|
|
|
19
19
|
* Default value: {@link DEFAULT_TYPE}
|
|
20
20
|
*/
|
|
21
21
|
type?: TitleTypes;
|
|
22
|
-
} & React.RefAttributes<
|
|
22
|
+
} & React.RefAttributes<HTMLHeadingElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLSpanElement>>;
|
|
23
23
|
export default Title;
|
|
24
24
|
//# sourceMappingURL=Title.d.ts.map
|
|
@@ -15,7 +15,7 @@ export default class UploadImageStep extends PureComponent<UploadImageStepProps>
|
|
|
15
15
|
uploadInputRef: import("react").RefObject<HTMLInputElement>;
|
|
16
16
|
onManualUpload: () => void;
|
|
17
17
|
onKeyDown: (event: React.KeyboardEvent<HTMLLabelElement>) => void;
|
|
18
|
-
getImage: () => number | true | import("react").
|
|
18
|
+
getImage: () => number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element;
|
|
19
19
|
render(): import("react").JSX.Element;
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=UploadImageStep.d.ts.map
|
|
@@ -5,5 +5,5 @@ export declare const UploadItemLink: import("react").ForwardRefExoticComponent<{
|
|
|
5
5
|
singleFileUpload: boolean;
|
|
6
6
|
} & {
|
|
7
7
|
children?: import("react").ReactNode | undefined;
|
|
8
|
-
} & import("react").RefAttributes<
|
|
8
|
+
} & import("react").RefAttributes<HTMLAnchorElement | HTMLDivElement>>;
|
|
9
9
|
//# sourceMappingURL=UploadItemLink.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, PropsWithChildren, RefObject, SyntheticEvent } from 'react';
|
|
2
|
-
import { type FloatingPlacement } from '
|
|
2
|
+
import { type FloatingPlacement } from './Panel.positionUtils';
|
|
3
3
|
export type PanelProps = PropsWithChildren<{
|
|
4
4
|
arrow?: boolean;
|
|
5
5
|
flip?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../../src/common/Panel/Panel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../../src/common/Panel/Panel.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,cAAc,EAIf,MAAM,OAAO,CAAC;AAMf,OAAO,EACL,KAAK,iBAAiB,EAKvB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,UAAU,GAAG,iBAAiB,CAAC;IACzC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,cAAc,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,SAAS,EAAE,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC,GACA,cAAc,CAAC,cAAc,CAAC,CAAC;AAEjC,QAAA,MAAM,KAAK;YAZD,OAAO;WACR,OAAO;cACJ,OAAO;WACV,OAAO;cACJ,CAAC,KAAK,EAAE,KAAK,GAAG,cAAc,KAAK,IAAI;eACtC,iBAAiB;eACjB,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;kBACtB,OAAO;qBACJ,OAAO;;;mFAoGxB,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Placement } from '@floating-ui/react';
|
|
2
|
+
export type FloatingPlacement = 'top' | 'right' | 'bottom' | 'left' | 'top-left' | 'top-right' | 'right-top' | 'right-bottom' | 'bottom-left' | 'bottom-right' | 'left-top' | 'left-bottom';
|
|
3
|
+
export declare const POPOVER_OFFSET = 16;
|
|
4
|
+
export declare const fallbackPlacements: Record<Placement, Placement[]>;
|
|
5
|
+
export declare const positionToPlacement: (position: FloatingPlacement) => Placement;
|
|
6
|
+
export declare const mirrorPositionForRtl: (position: FloatingPlacement) => FloatingPlacement;
|
|
7
|
+
//# sourceMappingURL=Panel.positionUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Panel.positionUtils.d.ts","sourceRoot":"","sources":["../../../../src/common/Panel/Panel.positionUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GACzB,KAAK,GACL,OAAO,GACP,QAAQ,GACR,MAAM,GACN,UAAU,GACV,WAAW,GACX,WAAW,GACX,cAAc,GACd,aAAa,GACb,cAAc,GACd,UAAU,GACV,aAAa,CAAC;AAElB,eAAO,MAAM,cAAc,KAAK,CAAC;AAKjC,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,CAa7D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,iBAAiB,KAAG,SAqBjE,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,iBAAiB,KAAG,iBAmBlE,CAAC"}
|