@tmlmobilidade/ui 20250920.1941.29 → 20250920.2339.20
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/index.css +29 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/src/components/comments/CommentItem/index.js +2 -2
- package/dist/src/components/comments/CommentItem/index.js.map +1 -1
- package/dist/src/components/comments/CommentList/index.js +2 -3
- package/dist/src/components/comments/CommentList/index.js.map +1 -1
- package/dist/styles-no-reset.css +29 -1
- package/dist/styles.css +29 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -168,12 +168,16 @@ interface CommentItemProps {
|
|
168
168
|
created_by: string;
|
169
169
|
icon: React.ReactNode;
|
170
170
|
iconTopMargin?: number;
|
171
|
+
reverse?: boolean;
|
171
172
|
}
|
172
|
-
declare function CommentItem({ content, created_at, created_by, icon, iconTopMargin }: CommentItemProps): react_jsx_runtime.JSX.Element;
|
173
|
+
declare function CommentItem({ content, created_at, created_by, icon, iconTopMargin, reverse }: CommentItemProps): react_jsx_runtime.JSX.Element;
|
173
174
|
|
174
|
-
|
175
|
+
interface CommentListProps {
|
175
176
|
data: CommentItemProps[];
|
176
|
-
|
177
|
+
maxHeight?: number;
|
178
|
+
reverse?: boolean;
|
179
|
+
}
|
180
|
+
declare function CommentList({ data, maxHeight, reverse }: CommentListProps): react_jsx_runtime.JSX.Element | null;
|
177
181
|
|
178
182
|
interface BadgeProps extends BadgeProps$1 {
|
179
183
|
children?: react__default.ReactNode;
|
@@ -7,8 +7,8 @@ import { Section } from '../../layout/Section/index.js';
|
|
7
7
|
import { Dates } from '@tmlmobilidade/utils';
|
8
8
|
import styles from './styles.module.css.js';
|
9
9
|
|
10
|
-
function CommentItem({ content, created_at, created_by, icon, iconTopMargin }) {
|
11
|
-
return (jsxRuntimeExports.jsxs("div", { className: styles.item, children: [jsxRuntimeExports.jsxs("div", { className: styles.itemWrapper, children: [jsxRuntimeExports.jsx("div", { className: styles.icon, style: { marginTop: iconTopMargin
|
10
|
+
function CommentItem({ content, created_at, created_by, icon, iconTopMargin, reverse }) {
|
11
|
+
return (jsxRuntimeExports.jsxs("div", { className: styles.item, "data-reverse": reverse, children: [jsxRuntimeExports.jsxs("div", { className: styles.itemWrapper, children: [jsxRuntimeExports.jsx("div", { className: styles.icon, style: { marginTop: iconTopMargin && `${iconTopMargin}px` }, children: icon }), jsxRuntimeExports.jsx("div", { className: styles.path })] }), jsxRuntimeExports.jsx("div", { className: styles.content, children: typeof content === 'string' ? (jsxRuntimeExports.jsxs(Section, { flexDirection: "column", padding: "none", children: [jsxRuntimeExports.jsx("div", { className: styles.label, children: content }), jsxRuntimeExports.jsxs(Label, { size: "sm", children: [created_by, " a ", Dates.fromUnixTimestamp(created_at).toLocaleString(Dates.FORMATS.DATETIME_SHORT, 'pt-PT')] })] })) : (content) })] }));
|
12
12
|
}
|
13
13
|
|
14
14
|
export { CommentItem };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/comments/CommentItem/index.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/comments/CommentItem/index.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;AAmBM,SAAU,WAAW,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAoB,EAAA;IAC9G,QACCA,sBAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,IAAI,EAAA,cAAA,EAAgB,OAAO,EAAA,QAAA,EAAA,CACjDA,sBAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,WAAW,EAAA,QAAA,EAAA,CACjCC,qBAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,aAAa,IAAI,CAAA,EAAG,aAAa,CAAA,EAAA,CAAI,EAAE,EAAA,QAAA,EACtF,IAAI,EAAA,CACA,EACNA,qBAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,IAAI,EAAA,CAAI,CAAA,EAAA,CAC1B,EACNA,qBAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,OAAO,EAAA,QAAA,EAC5B,OAAO,OAAO,KAAK,QAAQ,IAC3BD,sBAAA,CAAC,OAAO,EAAA,EAAC,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAC,MAAM,EAAA,QAAA,EAAA,CAC7CC,qBAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,KAAK,EAAA,QAAA,EAAG,OAAO,EAAA,CAAO,EAC7CD,sBAAA,CAAC,KAAK,EAAA,EAAC,IAAI,EAAC,IAAI,EAAA,QAAA,EAAA,CAAE,UAAU,EAAA,KAAA,EAAK,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,CAAA,EAAA,CAAS,CAAA,EAAA,CAC1H,KAEV,OAAO,CACP,EAAA,CACI,CAAA,EAAA,CACD;AAER;;;;"}
|
@@ -3,13 +3,12 @@ import { j as jsxRuntimeExports } from '../../../../_virtual/jsx-runtime.js';
|
|
3
3
|
import styles from './styles.module.css.js';
|
4
4
|
import { CommentItem } from '../CommentItem/index.js';
|
5
5
|
|
6
|
-
|
7
|
-
function CommentList({ data }) {
|
6
|
+
function CommentList({ data, maxHeight, reverse }) {
|
8
7
|
//
|
9
8
|
// B. Render components
|
10
9
|
if (!data)
|
11
10
|
return null;
|
12
|
-
return (jsxRuntimeExports.jsx("div", { className: styles.container, children: data.map((comment, index) => jsxRuntimeExports.jsx(CommentItem, { ...comment }, index)) }));
|
11
|
+
return (jsxRuntimeExports.jsx("div", { className: styles.container, "data-reverse": reverse, style: { maxHeight: maxHeight && `${maxHeight}px` }, children: (reverse ? data.toReversed() : data).map((comment, index) => jsxRuntimeExports.jsx(CommentItem, { ...comment, reverse: reverse }, index)) }));
|
13
12
|
}
|
14
13
|
|
15
14
|
export { CommentList };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/comments/CommentList/index.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/comments/CommentList/index.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;AAeM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAC,CAAA,CAAE,CAAA,CAAA,CAAA,CAAI,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAoB,CAAA,CAAA;;;AAIzE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAC,CAAA,CAAA,CAAA,CAAI;AAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,OAAO,CAAA,CAAA,CAAA,CAAI;AAEtB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACCA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA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A,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAApC,CAAA,CAAA,CAAA,CAAA,CAAK,CAAmC,CAC1D,EAAA,CACI,CAAA;AAER;;"}
|
package/dist/styles-no-reset.css
CHANGED
@@ -1518,6 +1518,7 @@
|
|
1518
1518
|
|
1519
1519
|
.styles-module_icon__wl1ta {
|
1520
1520
|
z-index: 2;
|
1521
|
+
margin-top: 10px;
|
1521
1522
|
background-color: var(--color-system-background-100);
|
1522
1523
|
}
|
1523
1524
|
|
@@ -1528,7 +1529,11 @@
|
|
1528
1529
|
background-color: var(--color-system-border-100);
|
1529
1530
|
}
|
1530
1531
|
|
1531
|
-
.styles-module_item__S7RQD:last-child .styles-module_path__JfW5D {
|
1532
|
+
.styles-module_item__S7RQD[data-reverse="false"]:last-child .styles-module_path__JfW5D {
|
1533
|
+
display: none;
|
1534
|
+
}
|
1535
|
+
|
1536
|
+
.styles-module_item__S7RQD[data-reverse="true"]:first-child .styles-module_path__JfW5D {
|
1532
1537
|
display: none;
|
1533
1538
|
}
|
1534
1539
|
|
@@ -1562,6 +1567,29 @@
|
|
1562
1567
|
position: relative;
|
1563
1568
|
display: flex;
|
1564
1569
|
flex-direction: column;
|
1570
|
+
width: 100%;
|
1571
|
+
padding: var(--size-spacing-xs) 0;
|
1572
|
+
overflow-y: scroll;
|
1573
|
+
scrollbar-color: var(--color-primary) var(--color-primary);
|
1574
|
+
scrollbar-width: thin;
|
1575
|
+
|
1576
|
+
&::-webkit-scrollbar {
|
1577
|
+
width: 8px;
|
1578
|
+
}
|
1579
|
+
|
1580
|
+
&::-webkit-scrollbar-track {
|
1581
|
+
background: var(--color-system-background-100);
|
1582
|
+
}
|
1583
|
+
|
1584
|
+
&::-webkit-scrollbar-thumb {
|
1585
|
+
background-color: var(--color-system-border-100);
|
1586
|
+
border: 2px solid var(--color-system-background-100);
|
1587
|
+
border-radius: 10px;
|
1588
|
+
}
|
1589
|
+
|
1590
|
+
&[data-reverse="true"] {
|
1591
|
+
flex-direction: column-reverse;
|
1592
|
+
}
|
1565
1593
|
}
|
1566
1594
|
|
1567
1595
|
.styles-module_label__SjHA2 {
|
package/dist/styles.css
CHANGED
@@ -1577,6 +1577,7 @@ figure {
|
|
1577
1577
|
|
1578
1578
|
.styles-module_icon__wl1ta {
|
1579
1579
|
z-index: 2;
|
1580
|
+
margin-top: 10px;
|
1580
1581
|
background-color: var(--color-system-background-100);
|
1581
1582
|
}
|
1582
1583
|
|
@@ -1587,7 +1588,11 @@ figure {
|
|
1587
1588
|
background-color: var(--color-system-border-100);
|
1588
1589
|
}
|
1589
1590
|
|
1590
|
-
.styles-module_item__S7RQD:last-child .styles-module_path__JfW5D {
|
1591
|
+
.styles-module_item__S7RQD[data-reverse="false"]:last-child .styles-module_path__JfW5D {
|
1592
|
+
display: none;
|
1593
|
+
}
|
1594
|
+
|
1595
|
+
.styles-module_item__S7RQD[data-reverse="true"]:first-child .styles-module_path__JfW5D {
|
1591
1596
|
display: none;
|
1592
1597
|
}
|
1593
1598
|
|
@@ -1621,6 +1626,29 @@ figure {
|
|
1621
1626
|
position: relative;
|
1622
1627
|
display: flex;
|
1623
1628
|
flex-direction: column;
|
1629
|
+
width: 100%;
|
1630
|
+
padding: var(--size-spacing-xs) 0;
|
1631
|
+
overflow-y: scroll;
|
1632
|
+
scrollbar-color: var(--color-primary) var(--color-primary);
|
1633
|
+
scrollbar-width: thin;
|
1634
|
+
|
1635
|
+
&::-webkit-scrollbar {
|
1636
|
+
width: 8px;
|
1637
|
+
}
|
1638
|
+
|
1639
|
+
&::-webkit-scrollbar-track {
|
1640
|
+
background: var(--color-system-background-100);
|
1641
|
+
}
|
1642
|
+
|
1643
|
+
&::-webkit-scrollbar-thumb {
|
1644
|
+
background-color: var(--color-system-border-100);
|
1645
|
+
border: 2px solid var(--color-system-background-100);
|
1646
|
+
border-radius: 10px;
|
1647
|
+
}
|
1648
|
+
|
1649
|
+
&[data-reverse="true"] {
|
1650
|
+
flex-direction: column-reverse;
|
1651
|
+
}
|
1624
1652
|
}
|
1625
1653
|
|
1626
1654
|
.styles-module_label__SjHA2 {
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tmlmobilidade/ui",
|
3
3
|
"description": "UI components for Transportes Metropolitanos de Lisboa (TML) web applications.",
|
4
|
-
"version": "20250920.
|
4
|
+
"version": "20250920.2339.20",
|
5
5
|
"author": "João de Vasconcelos & Jusi Monteiro",
|
6
6
|
"license": "AGPL-3.0-or-later",
|
7
7
|
"publishConfig": {
|