@elliemae/ds-tooltip 3.21.2 → 3.22.0-next.1
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v3/propTypes.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { PLACEMENT, TEXT_ALIGNMENT } from './constants.js';\n\nexport declare namespace DSTooltipV3T {\n export type Placement =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n export type TextAlignment = 'left' | 'right' | 'center' | 'justify' | 'initial' | 'inherit';\n\n export interface DefaultProps {\n onOpen: () => void;\n onClose: () => void;\n id: string;\n textAlign: TextAlignment;\n wrapWords: boolean;\n }\n\n export interface
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAA0B;AAC1B,uBAA0C;
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { PLACEMENT, TEXT_ALIGNMENT } from './constants.js';\n\nexport declare namespace DSTooltipV3T {\n export type Placement =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n export type TextAlignment = 'left' | 'right' | 'center' | 'justify' | 'initial' | 'inherit';\n\n export interface DefaultProps {\n onOpen: () => void;\n onClose: () => void;\n id: string;\n textAlign: TextAlignment;\n wrapWords: boolean;\n }\n\n export interface OptionalProps {\n zIndex?: number;\n ariaLabel?: string;\n withoutPortal?: boolean;\n withoutArrow?: boolean;\n withoutAnimation?: boolean;\n boundaryElement?: HTMLElement;\n animationDuraction?: number;\n portalDOMContainer?: HTMLElement;\n startPlacementPreference?: Placement;\n placementOrderPreference?: Placement[];\n customOffset?: [number, number];\n modifiers?: Record<string, unknown>[];\n }\n\n export interface RequiredProps {\n children: React.ReactNode;\n text: string;\n }\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n}\n\nexport const propTypes = {\n text: PropTypes.string.description('Tooltip text to be displayed on hover/focus').isRequired,\n textAlign: PropTypes.oneOf(TEXT_ALIGNMENT as unknown as unknown[])\n .description('Tooltip text alignment')\n .defaultValue('left'),\n wrapWords: PropTypes.bool\n .description('Break words into a new line. Useful when words exceed tooltip max-lenght.')\n .defaultValue(false),\n children: PropTypes.node.description('Element to tie the tooltip to, must be a single node').isRequired,\n withoutPortal: PropTypes.bool\n .description('Whether or not the tooltip content should appear in a DOM portal or not')\n .defaultValue(true),\n withoutArrow: PropTypes.bool.description('Whether or not the tooltip should use the arrow').defaultValue(false),\n boundaryElement: PropTypes.element\n .description(\n 'Bounding element to calculate upon, defaults to \"clippingParents\",' +\n 'which are the scrolling containers that may cause element to be partially or fully cut off',\n )\n .defaultValue(undefined),\n withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\n portalDOMContainer: PropTypes.oneOfType([PropTypes.instanceOf(Element), PropTypes.oneOf([null])])\n .description('When using portal, the container in which to append the DOM content, defaults to document body')\n .defaultValue(undefined),\n startPlacementPreference: PropTypes.oneOf(PLACEMENT)\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n placementOrderPreference: PropTypes.arrayOf(PropTypes.oneOf(PLACEMENT))\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue(1),\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue([0, 14]),\n modifiers: PropTypes.array\n .description('modifiers array for full-custom tooltip-js override, https://popper.js.org/docs/v2/modifiers/')\n .defaultValue(1),\n id: PropTypes.string.description('Optional id appended to data-testid').defaultValue(''),\n onOpen: PropTypes.func.description('Optional callback to be invoked when the tooltip opens').defaultValue('() => {}'),\n onClose: PropTypes.func\n .description('Optional callback to be invoked when the tooltip closes')\n .defaultValue('() => {}'),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAA0B;AAC1B,uBAA0C;AA4DnC,MAAM,YAAY;AAAA,EACvB,MAAM,kCAAU,OAAO,YAAY,6CAA6C,EAAE;AAAA,EAClF,WAAW,kCAAU,MAAM,+BAAsC,EAC9D,YAAY,wBAAwB,EACpC,aAAa,MAAM;AAAA,EACtB,WAAW,kCAAU,KAClB,YAAY,2EAA2E,EACvF,aAAa,KAAK;AAAA,EACrB,UAAU,kCAAU,KAAK,YAAY,sDAAsD,EAAE;AAAA,EAC7F,eAAe,kCAAU,KACtB,YAAY,yEAAyE,EACrF,aAAa,IAAI;AAAA,EACpB,cAAc,kCAAU,KAAK,YAAY,iDAAiD,EAAE,aAAa,KAAK;AAAA,EAC9G,iBAAiB,kCAAU,QACxB;AAAA,IACC;AAAA,EAEF,EACC,aAAa,MAAS;AAAA,EACzB,kBAAkB,kCAAU,KACzB,YAAY,2DAA2D,EACvE,aAAa,KAAK;AAAA,EACrB,mBAAmB,kCAAU,OAAO,YAAY,+CAA+C,EAAE,aAAa,GAAG;AAAA,EACjH,oBAAoB,kCAAU,UAAU,CAAC,kCAAU,WAAW,OAAO,GAAG,kCAAU,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAC7F,YAAY,gGAAgG,EAC5G,aAAa,MAAS;AAAA,EACzB,0BAA0B,kCAAU,MAAM,0BAAS,EAChD,YAAY,+DAA+D,EAC3E,aAAa,OAAO;AAAA,EACvB,0BAA0B,kCAAU,QAAQ,kCAAU,MAAM,0BAAS,CAAC,EACnE,YAAY,yEAAyE,EACrF,aAAa,oCAAoC;AAAA,EACpD,QAAQ,kCAAU,OAAO,YAAY,0BAA0B,EAAE,aAAa,CAAC;AAAA,EAC/E,cAAc,kCAAU,QAAQ,kCAAU,MAAM,EAAE,YAAY,wBAAwB,EAAE,aAAa,CAAC,GAAG,EAAE,CAAC;AAAA,EAC5G,WAAW,kCAAU,MAClB,YAAY,+FAA+F,EAC3G,aAAa,CAAC;AAAA,EACjB,IAAI,kCAAU,OAAO,YAAY,qCAAqC,EAAE,aAAa,EAAE;AAAA,EACvF,QAAQ,kCAAU,KAAK,YAAY,wDAAwD,EAAE,aAAa,UAAU;AAAA,EACpH,SAAS,kCAAU,KAChB,YAAY,yDAAyD,EACrE,aAAa,UAAU;AAC5B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v3/propTypes.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { PLACEMENT, TEXT_ALIGNMENT } from './constants.js';\n\nexport declare namespace DSTooltipV3T {\n export type Placement =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n export type TextAlignment = 'left' | 'right' | 'center' | 'justify' | 'initial' | 'inherit';\n\n export interface DefaultProps {\n onOpen: () => void;\n onClose: () => void;\n id: string;\n textAlign: TextAlignment;\n wrapWords: boolean;\n }\n\n export interface
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,iBAAiB;AAC1B,SAAS,WAAW,sBAAsB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { PLACEMENT, TEXT_ALIGNMENT } from './constants.js';\n\nexport declare namespace DSTooltipV3T {\n export type Placement =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n export type TextAlignment = 'left' | 'right' | 'center' | 'justify' | 'initial' | 'inherit';\n\n export interface DefaultProps {\n onOpen: () => void;\n onClose: () => void;\n id: string;\n textAlign: TextAlignment;\n wrapWords: boolean;\n }\n\n export interface OptionalProps {\n zIndex?: number;\n ariaLabel?: string;\n withoutPortal?: boolean;\n withoutArrow?: boolean;\n withoutAnimation?: boolean;\n boundaryElement?: HTMLElement;\n animationDuraction?: number;\n portalDOMContainer?: HTMLElement;\n startPlacementPreference?: Placement;\n placementOrderPreference?: Placement[];\n customOffset?: [number, number];\n modifiers?: Record<string, unknown>[];\n }\n\n export interface RequiredProps {\n children: React.ReactNode;\n text: string;\n }\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n}\n\nexport const propTypes = {\n text: PropTypes.string.description('Tooltip text to be displayed on hover/focus').isRequired,\n textAlign: PropTypes.oneOf(TEXT_ALIGNMENT as unknown as unknown[])\n .description('Tooltip text alignment')\n .defaultValue('left'),\n wrapWords: PropTypes.bool\n .description('Break words into a new line. Useful when words exceed tooltip max-lenght.')\n .defaultValue(false),\n children: PropTypes.node.description('Element to tie the tooltip to, must be a single node').isRequired,\n withoutPortal: PropTypes.bool\n .description('Whether or not the tooltip content should appear in a DOM portal or not')\n .defaultValue(true),\n withoutArrow: PropTypes.bool.description('Whether or not the tooltip should use the arrow').defaultValue(false),\n boundaryElement: PropTypes.element\n .description(\n 'Bounding element to calculate upon, defaults to \"clippingParents\",' +\n 'which are the scrolling containers that may cause element to be partially or fully cut off',\n )\n .defaultValue(undefined),\n withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\n portalDOMContainer: PropTypes.oneOfType([PropTypes.instanceOf(Element), PropTypes.oneOf([null])])\n .description('When using portal, the container in which to append the DOM content, defaults to document body')\n .defaultValue(undefined),\n startPlacementPreference: PropTypes.oneOf(PLACEMENT)\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n placementOrderPreference: PropTypes.arrayOf(PropTypes.oneOf(PLACEMENT))\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue(1),\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue([0, 14]),\n modifiers: PropTypes.array\n .description('modifiers array for full-custom tooltip-js override, https://popper.js.org/docs/v2/modifiers/')\n .defaultValue(1),\n id: PropTypes.string.description('Optional id appended to data-testid').defaultValue(''),\n onOpen: PropTypes.func.description('Optional callback to be invoked when the tooltip opens').defaultValue('() => {}'),\n onClose: PropTypes.func\n .description('Optional callback to be invoked when the tooltip closes')\n .defaultValue('() => {}'),\n} as WeakValidationMap<unknown>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,iBAAiB;AAC1B,SAAS,WAAW,sBAAsB;AA4DnC,MAAM,YAAY;AAAA,EACvB,MAAM,UAAU,OAAO,YAAY,6CAA6C,EAAE;AAAA,EAClF,WAAW,UAAU,MAAM,cAAsC,EAC9D,YAAY,wBAAwB,EACpC,aAAa,MAAM;AAAA,EACtB,WAAW,UAAU,KAClB,YAAY,2EAA2E,EACvF,aAAa,KAAK;AAAA,EACrB,UAAU,UAAU,KAAK,YAAY,sDAAsD,EAAE;AAAA,EAC7F,eAAe,UAAU,KACtB,YAAY,yEAAyE,EACrF,aAAa,IAAI;AAAA,EACpB,cAAc,UAAU,KAAK,YAAY,iDAAiD,EAAE,aAAa,KAAK;AAAA,EAC9G,iBAAiB,UAAU,QACxB;AAAA,IACC;AAAA,EAEF,EACC,aAAa,MAAS;AAAA,EACzB,kBAAkB,UAAU,KACzB,YAAY,2DAA2D,EACvE,aAAa,KAAK;AAAA,EACrB,mBAAmB,UAAU,OAAO,YAAY,+CAA+C,EAAE,aAAa,GAAG;AAAA,EACjH,oBAAoB,UAAU,UAAU,CAAC,UAAU,WAAW,OAAO,GAAG,UAAU,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAC7F,YAAY,gGAAgG,EAC5G,aAAa,MAAS;AAAA,EACzB,0BAA0B,UAAU,MAAM,SAAS,EAChD,YAAY,+DAA+D,EAC3E,aAAa,OAAO;AAAA,EACvB,0BAA0B,UAAU,QAAQ,UAAU,MAAM,SAAS,CAAC,EACnE,YAAY,yEAAyE,EACrF,aAAa,oCAAoC;AAAA,EACpD,QAAQ,UAAU,OAAO,YAAY,0BAA0B,EAAE,aAAa,CAAC;AAAA,EAC/E,cAAc,UAAU,QAAQ,UAAU,MAAM,EAAE,YAAY,wBAAwB,EAAE,aAAa,CAAC,GAAG,EAAE,CAAC;AAAA,EAC5G,WAAW,UAAU,MAClB,YAAY,+FAA+F,EAC3G,aAAa,CAAC;AAAA,EACjB,IAAI,UAAU,OAAO,YAAY,qCAAqC,EAAE,aAAa,EAAE;AAAA,EACvF,QAAQ,UAAU,KAAK,YAAY,wDAAwD,EAAE,aAAa,UAAU;AAAA,EACpH,SAAS,UAAU,KAChB,YAAY,yDAAyD,EACrE,aAAa,UAAU;AAC5B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -10,9 +10,9 @@ export declare namespace DSTooltipV3T {
|
|
|
10
10
|
textAlign: TextAlignment;
|
|
11
11
|
wrapWords: boolean;
|
|
12
12
|
}
|
|
13
|
-
interface
|
|
13
|
+
interface OptionalProps {
|
|
14
14
|
zIndex?: number;
|
|
15
|
-
ariaLabel
|
|
15
|
+
ariaLabel?: string;
|
|
16
16
|
withoutPortal?: boolean;
|
|
17
17
|
withoutArrow?: boolean;
|
|
18
18
|
withoutAnimation?: boolean;
|
|
@@ -24,15 +24,13 @@ export declare namespace DSTooltipV3T {
|
|
|
24
24
|
customOffset?: [number, number];
|
|
25
25
|
modifiers?: Record<string, unknown>[];
|
|
26
26
|
}
|
|
27
|
-
interface
|
|
27
|
+
interface RequiredProps {
|
|
28
28
|
children: React.ReactNode;
|
|
29
29
|
text: string;
|
|
30
30
|
}
|
|
31
|
-
interface InternalProps extends DefaultProps,
|
|
31
|
+
interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>, RequiredProps {
|
|
32
32
|
}
|
|
33
|
-
interface
|
|
34
|
-
}
|
|
35
|
-
interface Props extends IProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof IProps> {
|
|
33
|
+
interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>, RequiredProps {
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
36
|
export declare const propTypes: WeakValidationMap<unknown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-tooltip",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.22.0-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Tooltip",
|
|
6
6
|
"files": [
|
|
@@ -97,15 +97,15 @@
|
|
|
97
97
|
"dependencies": {
|
|
98
98
|
"@popperjs/core": "~2.11.7",
|
|
99
99
|
"react-popper": "~2.3.0",
|
|
100
|
-
"@elliemae/ds-classnames": "3.
|
|
101
|
-
"@elliemae/ds-
|
|
102
|
-
"@elliemae/ds-
|
|
103
|
-
"@elliemae/ds-popperjs": "3.
|
|
104
|
-
"@elliemae/ds-
|
|
105
|
-
"@elliemae/ds-
|
|
106
|
-
"@elliemae/ds-
|
|
107
|
-
"@elliemae/ds-
|
|
108
|
-
"@elliemae/ds-
|
|
100
|
+
"@elliemae/ds-classnames": "3.22.0-next.1",
|
|
101
|
+
"@elliemae/ds-button": "3.22.0-next.1",
|
|
102
|
+
"@elliemae/ds-popper": "3.22.0-next.1",
|
|
103
|
+
"@elliemae/ds-popperjs": "3.22.0-next.1",
|
|
104
|
+
"@elliemae/ds-portal": "3.22.0-next.1",
|
|
105
|
+
"@elliemae/ds-props-helpers": "3.22.0-next.1",
|
|
106
|
+
"@elliemae/ds-shared": "3.22.0-next.1",
|
|
107
|
+
"@elliemae/ds-system": "3.22.0-next.1",
|
|
108
|
+
"@elliemae/ds-utilities": "3.22.0-next.1"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
111
|
"@testing-library/jest-dom": "~5.16.5",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"react": "^17.0.2",
|
|
115
115
|
"react-dom": "^17.0.2",
|
|
116
116
|
"styled-components": "~5.3.9",
|
|
117
|
-
"@elliemae/ds-grid": "3.
|
|
117
|
+
"@elliemae/ds-grid": "3.22.0-next.1"
|
|
118
118
|
},
|
|
119
119
|
"peerDependencies": {
|
|
120
120
|
"react": "^17.0.2",
|