phx-react 1.3.1849 → 1.3.1850
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/DescriptionLists/DescriptionLists.d.ts +4 -3
- package/dist/cjs/components/DescriptionLists/DescriptionLists.js +4 -4
- package/dist/cjs/components/DescriptionLists/DescriptionLists.js.map +1 -1
- package/dist/esm/components/DescriptionLists/DescriptionLists.d.ts +4 -3
- package/dist/esm/components/DescriptionLists/DescriptionLists.js +4 -4
- package/dist/esm/components/DescriptionLists/DescriptionLists.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface DescriptionListsProps {
|
|
3
3
|
data?: Array<{
|
|
4
|
-
title:
|
|
5
|
-
description:
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
description: React.ReactNode;
|
|
6
6
|
}>;
|
|
7
7
|
type?: 'default' | 'border';
|
|
8
8
|
size?: 'default' | 'small';
|
|
9
|
+
layout?: 'default' | 'half';
|
|
9
10
|
className?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare function PHXDescriptionLists({ data, size, type, className }: DescriptionListsProps): React.JSX.Element;
|
|
12
|
+
export declare function PHXDescriptionLists({ data, size, type, layout, className, }: DescriptionListsProps): React.JSX.Element;
|
|
@@ -4,11 +4,11 @@ exports.PHXDescriptionLists = PHXDescriptionLists;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const types_1 = require("../types");
|
|
7
|
-
function PHXDescriptionLists({ data, size = 'default', type = 'default', className }) {
|
|
7
|
+
function PHXDescriptionLists({ data, size = 'default', type = 'default', layout = 'default', className, }) {
|
|
8
8
|
return (react_1.default.createElement("div", { className: className },
|
|
9
9
|
react_1.default.createElement("div", { className: (0, types_1.classNames)(type === 'border' ? 'rounded-lg border border-gray-100' : '') },
|
|
10
|
-
react_1.default.createElement("dl", { className: 'divide-y divide-gray-100' }, data === null || data === void 0 ? void 0 : data.map((item) => (react_1.default.createElement("div", { key:
|
|
11
|
-
react_1.default.createElement("dt", { className: 'text-xs font-medium leading-6 text-gray-900' }, item.title),
|
|
12
|
-
react_1.default.createElement("dd", { className: '
|
|
10
|
+
react_1.default.createElement("dl", { className: 'divide-y divide-gray-100' }, data === null || data === void 0 ? void 0 : data.map((item, index) => (react_1.default.createElement("div", { key: index, className: (0, types_1.classNames)(layout === 'half' ? 'grid grid-cols-2 gap-4 text-left' : 'sm:grid sm:grid-cols-3 sm:gap-4', type === 'border' ? 'sm:px-4 px-4' : 'sm:px-0 px-0', size === 'small' ? 'px-2 py-2' : 'px-4 py-4') },
|
|
11
|
+
react_1.default.createElement("dt", { className: 'text-xs font-medium leading-6 text-gray-900 text-left' }, item.title),
|
|
12
|
+
react_1.default.createElement("dd", { className: (0, types_1.classNames)('text-xs leading-6 text-gray-700 text-left', layout === 'half' ? 'col-span-1 mt-0' : 'mt-1 sm:col-span-2 sm:mt-0') }, item.description))))))));
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=DescriptionLists.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptionLists.js","sourceRoot":"","sources":["../../../../src/components/DescriptionLists/DescriptionLists.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"DescriptionLists.js","sourceRoot":"","sources":["../../../../src/components/DescriptionLists/DescriptionLists.tsx"],"names":[],"mappings":";;AAWA,kDAoCC;;AA/CD,0DAAyB;AACzB,oCAAqC;AAUrC,SAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,SAAS,EAChB,MAAM,GAAG,SAAS,EAClB,SAAS,GACa;IACtB,OAAO,CACL,uCAAK,SAAS,EAAE,SAAS;QACvB,uCAAK,SAAS,EAAE,IAAA,kBAAU,EAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,EAAE,CAAC;YACtF,sCAAI,SAAS,EAAC,0BAA0B,IACrC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,uCACE,GAAG,EAAE,KAAK,EACV,SAAS,EAAE,IAAA,kBAAU,EACnB,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,kCAAkC,CAAC,CAAC,CAAC,iCAAiC,EAC1F,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,EACnD,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAC7C;gBAED,sCAAI,SAAS,EAAC,uDAAuD,IAAE,IAAI,CAAC,KAAK,CAAM;gBAEvF,sCACE,SAAS,EAAE,IAAA,kBAAU,EACnB,2CAA2C,EAC3C,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,4BAA4B,CACrE,IAEA,IAAI,CAAC,WAAW,CACd,CACD,CACP,CAAC,CACC,CACD,CACF,CACP,CAAA;AACH,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface DescriptionListsProps {
|
|
3
3
|
data?: Array<{
|
|
4
|
-
title:
|
|
5
|
-
description:
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
description: React.ReactNode;
|
|
6
6
|
}>;
|
|
7
7
|
type?: 'default' | 'border';
|
|
8
8
|
size?: 'default' | 'small';
|
|
9
|
+
layout?: 'default' | 'half';
|
|
9
10
|
className?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare function PHXDescriptionLists({ data, size, type, className }: DescriptionListsProps): React.JSX.Element;
|
|
12
|
+
export declare function PHXDescriptionLists({ data, size, type, layout, className, }: DescriptionListsProps): React.JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { classNames } from '../types';
|
|
3
|
-
export function PHXDescriptionLists({ data, size = 'default', type = 'default', className }) {
|
|
3
|
+
export function PHXDescriptionLists({ data, size = 'default', type = 'default', layout = 'default', className, }) {
|
|
4
4
|
return (React.createElement("div", { className: className },
|
|
5
5
|
React.createElement("div", { className: classNames(type === 'border' ? 'rounded-lg border border-gray-100' : '') },
|
|
6
|
-
React.createElement("dl", { className: 'divide-y divide-gray-100' }, data === null || data === void 0 ? void 0 : data.map((item) => (React.createElement("div", { key:
|
|
7
|
-
React.createElement("dt", { className: 'text-xs font-medium leading-6 text-gray-900' }, item.title),
|
|
8
|
-
React.createElement("dd", { className: '
|
|
6
|
+
React.createElement("dl", { className: 'divide-y divide-gray-100' }, data === null || data === void 0 ? void 0 : data.map((item, index) => (React.createElement("div", { key: index, className: classNames(layout === 'half' ? 'grid grid-cols-2 gap-4 text-left' : 'sm:grid sm:grid-cols-3 sm:gap-4', type === 'border' ? 'sm:px-4 px-4' : 'sm:px-0 px-0', size === 'small' ? 'px-2 py-2' : 'px-4 py-4') },
|
|
7
|
+
React.createElement("dt", { className: 'text-xs font-medium leading-6 text-gray-900 text-left' }, item.title),
|
|
8
|
+
React.createElement("dd", { className: classNames('text-xs leading-6 text-gray-700 text-left', layout === 'half' ? 'col-span-1 mt-0' : 'mt-1 sm:col-span-2 sm:mt-0') }, item.description))))))));
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=DescriptionLists.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptionLists.js","sourceRoot":"","sources":["../../../../src/components/DescriptionLists/DescriptionLists.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"DescriptionLists.js","sourceRoot":"","sources":["../../../../src/components/DescriptionLists/DescriptionLists.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAUrC,MAAM,UAAU,mBAAmB,CAAC,EAClC,IAAI,EACJ,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,SAAS,EAChB,MAAM,GAAG,SAAS,EAClB,SAAS,GACa;IACtB,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS;QACvB,6BAAK,SAAS,EAAE,UAAU,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,EAAE,CAAC;YACtF,4BAAI,SAAS,EAAC,0BAA0B,IACrC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,6BACE,GAAG,EAAE,KAAK,EACV,SAAS,EAAE,UAAU,CACnB,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,kCAAkC,CAAC,CAAC,CAAC,iCAAiC,EAC1F,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,EACnD,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAC7C;gBAED,4BAAI,SAAS,EAAC,uDAAuD,IAAE,IAAI,CAAC,KAAK,CAAM;gBAEvF,4BACE,SAAS,EAAE,UAAU,CACnB,2CAA2C,EAC3C,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,4BAA4B,CACrE,IAEA,IAAI,CAAC,WAAW,CACd,CACD,CACP,CAAC,CACC,CACD,CACF,CACP,CAAA;AACH,CAAC"}
|