phx-react 1.3.1429 → 1.3.1430
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/cjs/components/DescriptionListInTooltip/DescriptionListInTooltip.d.ts +3 -3
- package/dist/cjs/components/DescriptionListInTooltip/DescriptionListInTooltip.js +8 -5
- package/dist/cjs/components/DescriptionListInTooltip/DescriptionListInTooltip.js.map +1 -1
- package/dist/esm/components/DescriptionListInTooltip/DescriptionListInTooltip.d.ts +3 -3
- package/dist/esm/components/DescriptionListInTooltip/DescriptionListInTooltip.js +8 -5
- package/dist/esm/components/DescriptionListInTooltip/DescriptionListInTooltip.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
export interface PHXDescriptionListItem {
|
|
3
|
-
title
|
|
4
|
-
description
|
|
3
|
+
title?: ReactNode;
|
|
4
|
+
description?: ReactNode;
|
|
5
5
|
}
|
|
6
6
|
export interface PHXDescriptionListInTooltipProps {
|
|
7
7
|
items: PHXDescriptionListItem[];
|
|
@@ -10,4 +10,4 @@ export interface PHXDescriptionListInTooltipProps {
|
|
|
10
10
|
size?: 'default' | 'small';
|
|
11
11
|
tooltipClassName?: string;
|
|
12
12
|
}
|
|
13
|
-
export declare function PHXDescriptionListInTooltip({ items, trigger, type,
|
|
13
|
+
export declare function PHXDescriptionListInTooltip({ items, trigger, type, tooltipClassName, }: PHXDescriptionListInTooltipProps): React.JSX.Element;
|
|
@@ -6,12 +6,15 @@ var react_1 = tslib_1.__importDefault(require("react"));
|
|
|
6
6
|
var types_1 = require("../types");
|
|
7
7
|
var ToolTip_1 = tslib_1.__importDefault(require("../ToolTip/ToolTip"));
|
|
8
8
|
function PHXDescriptionListInTooltip(_a) {
|
|
9
|
-
var items = _a.items, trigger = _a.trigger, _b = _a.type, type = _b === void 0 ? 'default' : _b,
|
|
10
|
-
return (react_1.default.createElement(ToolTip_1.default, { content: react_1.default.createElement("div", { className: (0, types_1.classNames)('min-w-[
|
|
9
|
+
var items = _a.items, trigger = _a.trigger, _b = _a.type, type = _b === void 0 ? 'default' : _b, tooltipClassName = _a.tooltipClassName;
|
|
10
|
+
return (react_1.default.createElement(ToolTip_1.default, { contentClassName: 'max-w-[124rem]', content: react_1.default.createElement("div", { className: (0, types_1.classNames)('min-w-[260px] bg-white whitespace-normal', type === 'border' && 'rounded-lg border border-gray-200 shadow-sm', tooltipClassName) }, items.map(function (item, index) {
|
|
11
11
|
var isHeader = !item.description;
|
|
12
|
-
return (react_1.default.createElement("div", { key: index, className: (0, types_1.classNames)(
|
|
13
|
-
react_1.default.createElement("
|
|
14
|
-
!isHeader && react_1.default.createElement("
|
|
12
|
+
return (react_1.default.createElement("div", { key: index, className: (0, types_1.classNames)(isHeader ? 'px-4 pt-3 pb-2' : 'grid grid-cols-[minmax(120px,160px)_1fr] gap-x-3 px-4 py-1.5') },
|
|
13
|
+
isHeader && react_1.default.createElement("div", { className: 'text-[13px] font-medium text-gray-800' }, item.title),
|
|
14
|
+
!isHeader && react_1.default.createElement("dt", { className: 'text-[13px] text-gray-600 whitespace-nowrap' },
|
|
15
|
+
item.title,
|
|
16
|
+
":"),
|
|
17
|
+
!isHeader && (react_1.default.createElement("dd", { className: 'text-[13px] font-medium text-gray-800 whitespace-normal break-words' }, item.description))));
|
|
15
18
|
})) }, trigger));
|
|
16
19
|
}
|
|
17
20
|
//# sourceMappingURL=DescriptionListInTooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptionListInTooltip.js","sourceRoot":"","sources":["../../../../src/components/DescriptionListInTooltip/DescriptionListInTooltip.tsx"],"names":[],"mappings":";;AAiBA,
|
|
1
|
+
{"version":3,"file":"DescriptionListInTooltip.js","sourceRoot":"","sources":["../../../../src/components/DescriptionListInTooltip/DescriptionListInTooltip.tsx"],"names":[],"mappings":";;AAiBA,kEA2CC;;AA5DD,wDAAwC;AACxC,kCAAqC;AACrC,uEAA2C;AAe3C,SAAgB,2BAA2B,CAAC,EAKT;QAJjC,KAAK,WAAA,EACL,OAAO,aAAA,EACP,YAAgB,EAAhB,IAAI,mBAAG,SAAS,KAAA,EAChB,gBAAgB,sBAAA;IAEhB,OAAO,CACL,8BAAC,iBAAU,IACT,gBAAgB,EAAC,gBAAgB,EACjC,OAAO,EACL,uCACE,SAAS,EAAE,IAAA,kBAAU,EACnB,0CAA0C,EAC1C,IAAI,KAAK,QAAQ,IAAI,6CAA6C,EAClE,gBAAgB,CACjB,IAEA,KAAK,CAAC,GAAG,CAAC,UAAC,IAAI,EAAE,KAAK;YACrB,IAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,WAAW,CAAA;YAElC,OAAO,CACL,uCACE,GAAG,EAAE,KAAK,EACV,SAAS,EAAE,IAAA,kBAAU,EACnB,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,8DAA8D,CAC7F;gBAEA,QAAQ,IAAI,uCAAK,SAAS,EAAC,uCAAuC,IAAE,IAAI,CAAC,KAAK,CAAO;gBACrF,CAAC,QAAQ,IAAI,sCAAI,SAAS,EAAC,6CAA6C;oBAAE,IAAI,CAAC,KAAK;wBAAO;gBAC3F,CAAC,QAAQ,IAAI,CACZ,sCAAI,SAAS,EAAC,qEAAqE,IAChF,IAAI,CAAC,WAAW,CACd,CACN,CACG,CACP,CAAA;QACH,CAAC,CAAC,CACE,IAGP,OAAO,CACG,CACd,CAAA;AACH,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
export interface PHXDescriptionListItem {
|
|
3
|
-
title
|
|
4
|
-
description
|
|
3
|
+
title?: ReactNode;
|
|
4
|
+
description?: ReactNode;
|
|
5
5
|
}
|
|
6
6
|
export interface PHXDescriptionListInTooltipProps {
|
|
7
7
|
items: PHXDescriptionListItem[];
|
|
@@ -10,4 +10,4 @@ export interface PHXDescriptionListInTooltipProps {
|
|
|
10
10
|
size?: 'default' | 'small';
|
|
11
11
|
tooltipClassName?: string;
|
|
12
12
|
}
|
|
13
|
-
export declare function PHXDescriptionListInTooltip({ items, trigger, type,
|
|
13
|
+
export declare function PHXDescriptionListInTooltip({ items, trigger, type, tooltipClassName, }: PHXDescriptionListInTooltipProps): React.JSX.Element;
|
|
@@ -2,12 +2,15 @@ import React from 'react';
|
|
|
2
2
|
import { classNames } from '../types';
|
|
3
3
|
import PHXTooltip from '../ToolTip/ToolTip';
|
|
4
4
|
export function PHXDescriptionListInTooltip(_a) {
|
|
5
|
-
var items = _a.items, trigger = _a.trigger, _b = _a.type, type = _b === void 0 ? 'default' : _b,
|
|
6
|
-
return (React.createElement(PHXTooltip, { content: React.createElement("div", { className: classNames('min-w-[
|
|
5
|
+
var items = _a.items, trigger = _a.trigger, _b = _a.type, type = _b === void 0 ? 'default' : _b, tooltipClassName = _a.tooltipClassName;
|
|
6
|
+
return (React.createElement(PHXTooltip, { contentClassName: 'max-w-[124rem]', content: React.createElement("div", { className: classNames('min-w-[260px] bg-white whitespace-normal', type === 'border' && 'rounded-lg border border-gray-200 shadow-sm', tooltipClassName) }, items.map(function (item, index) {
|
|
7
7
|
var isHeader = !item.description;
|
|
8
|
-
return (React.createElement("div", { key: index, className: classNames(
|
|
9
|
-
React.createElement("
|
|
10
|
-
!isHeader && React.createElement("
|
|
8
|
+
return (React.createElement("div", { key: index, className: classNames(isHeader ? 'px-4 pt-3 pb-2' : 'grid grid-cols-[minmax(120px,160px)_1fr] gap-x-3 px-4 py-1.5') },
|
|
9
|
+
isHeader && React.createElement("div", { className: 'text-[13px] font-medium text-gray-800' }, item.title),
|
|
10
|
+
!isHeader && React.createElement("dt", { className: 'text-[13px] text-gray-600 whitespace-nowrap' },
|
|
11
|
+
item.title,
|
|
12
|
+
":"),
|
|
13
|
+
!isHeader && (React.createElement("dd", { className: 'text-[13px] font-medium text-gray-800 whitespace-normal break-words' }, item.description))));
|
|
11
14
|
})) }, trigger));
|
|
12
15
|
}
|
|
13
16
|
//# sourceMappingURL=DescriptionListInTooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptionListInTooltip.js","sourceRoot":"","sources":["../../../../src/components/DescriptionListInTooltip/DescriptionListInTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,UAAU,MAAM,oBAAoB,CAAA;AAe3C,MAAM,UAAU,2BAA2B,CAAC,
|
|
1
|
+
{"version":3,"file":"DescriptionListInTooltip.js","sourceRoot":"","sources":["../../../../src/components/DescriptionListInTooltip/DescriptionListInTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,UAAU,MAAM,oBAAoB,CAAA;AAe3C,MAAM,UAAU,2BAA2B,CAAC,EAKT;QAJjC,KAAK,WAAA,EACL,OAAO,aAAA,EACP,YAAgB,EAAhB,IAAI,mBAAG,SAAS,KAAA,EAChB,gBAAgB,sBAAA;IAEhB,OAAO,CACL,oBAAC,UAAU,IACT,gBAAgB,EAAC,gBAAgB,EACjC,OAAO,EACL,6BACE,SAAS,EAAE,UAAU,CACnB,0CAA0C,EAC1C,IAAI,KAAK,QAAQ,IAAI,6CAA6C,EAClE,gBAAgB,CACjB,IAEA,KAAK,CAAC,GAAG,CAAC,UAAC,IAAI,EAAE,KAAK;YACrB,IAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,WAAW,CAAA;YAElC,OAAO,CACL,6BACE,GAAG,EAAE,KAAK,EACV,SAAS,EAAE,UAAU,CACnB,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,8DAA8D,CAC7F;gBAEA,QAAQ,IAAI,6BAAK,SAAS,EAAC,uCAAuC,IAAE,IAAI,CAAC,KAAK,CAAO;gBACrF,CAAC,QAAQ,IAAI,4BAAI,SAAS,EAAC,6CAA6C;oBAAE,IAAI,CAAC,KAAK;wBAAO;gBAC3F,CAAC,QAAQ,IAAI,CACZ,4BAAI,SAAS,EAAC,qEAAqE,IAChF,IAAI,CAAC,WAAW,CACd,CACN,CACG,CACP,CAAA;QACH,CAAC,CAAC,CACE,IAGP,OAAO,CACG,CACd,CAAA;AACH,CAAC"}
|