@loja-integrada/admin-components 0.15.2 → 0.15.3
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/Components/TableList/TableListItem.interface.d.ts +4 -0
- package/dist/Components/TableList/index.d.ts +3 -0
- package/dist/Icons/icons-path/Blog.d.ts +2 -0
- package/dist/Icons/icons-path/index.d.ts +1 -0
- package/dist/admin-components.cjs.development.js +20 -5
- package/dist/admin-components.cjs.development.js.map +1 -1
- package/dist/admin-components.cjs.production.min.js +1 -1
- package/dist/admin-components.cjs.production.min.js.map +1 -1
- package/dist/admin-components.esm.js +19 -6
- package/dist/admin-components.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Components/TableList/TableList.tsx +1 -0
- package/src/Components/TableList/TableListItem.interface.ts +4 -0
- package/src/Components/TableList/TableListItem.spec.tsx +13 -2
- package/src/Components/TableList/TableListItem.stories.tsx +1 -0
- package/src/Components/TableList/TableListItem.tsx +9 -5
- package/src/Components/TableList/index.tsx +3 -0
- package/src/Icons/icons-path/Blog.tsx +9 -0
- package/src/Icons/icons-path/index.ts +2 -0
package/package.json
CHANGED
|
@@ -29,10 +29,10 @@ describe('TableListItem tests', () => {
|
|
|
29
29
|
.find('.table-item-description')
|
|
30
30
|
.should('exist')
|
|
31
31
|
.contains('Cartão')
|
|
32
|
-
cy.get('.table-item .table-item-timestamp
|
|
32
|
+
cy.get('.table-item .table-item-timestamp-time')
|
|
33
33
|
.should('exist')
|
|
34
34
|
.contains('19:45')
|
|
35
|
-
cy.get('.table-item .table-item-timestamp
|
|
35
|
+
cy.get('.table-item .table-item-timestamp-date')
|
|
36
36
|
.should('exist')
|
|
37
37
|
.contains('dezembro')
|
|
38
38
|
})
|
|
@@ -43,6 +43,13 @@ describe('TableListItem tests', () => {
|
|
|
43
43
|
.should('have.class', 'lg:first:border-t')
|
|
44
44
|
})
|
|
45
45
|
|
|
46
|
+
it('Append', () => {
|
|
47
|
+
mount(<Item append={'External'} />)
|
|
48
|
+
cy.get('.table-item .table-item-append')
|
|
49
|
+
.should('exist')
|
|
50
|
+
.contains('External')
|
|
51
|
+
})
|
|
52
|
+
|
|
46
53
|
it('Without', () => {
|
|
47
54
|
mount(<Item withIcon={undefined} />)
|
|
48
55
|
cy.get('.table-item .table-item-icon')
|
|
@@ -59,6 +66,10 @@ describe('TableListItem tests', () => {
|
|
|
59
66
|
mount(<Item timestampTime={undefined} />)
|
|
60
67
|
cy.get('.table-item .table-item-timestamp-time')
|
|
61
68
|
.should('not.exist')
|
|
69
|
+
|
|
70
|
+
mount(<Item append={undefined} />)
|
|
71
|
+
cy.get('.table-item .table-item-append')
|
|
72
|
+
.should('not.exist')
|
|
62
73
|
})
|
|
63
74
|
|
|
64
75
|
})
|
|
@@ -24,6 +24,7 @@ export default {
|
|
|
24
24
|
description: '#29102 - Daniela Cabral via Cartão de crédito',
|
|
25
25
|
timestampTime: '19:45',
|
|
26
26
|
timestampDate: '10 de dezembro',
|
|
27
|
+
append: <span className="cursor hover:underline text-primary font-semibold">Ver mais</span>,
|
|
27
28
|
itemWrapperProps: {
|
|
28
29
|
href: '#a'
|
|
29
30
|
},
|
|
@@ -15,6 +15,7 @@ export const TableListItem: React.FunctionComponent<TableListItemProps> = ({
|
|
|
15
15
|
withHover = false,
|
|
16
16
|
isInsideContainer = false,
|
|
17
17
|
withIcon,
|
|
18
|
+
append,
|
|
18
19
|
}) => {
|
|
19
20
|
return (
|
|
20
21
|
<div
|
|
@@ -45,16 +46,19 @@ export const TableListItem: React.FunctionComponent<TableListItemProps> = ({
|
|
|
45
46
|
<div className="table-item-description">{description}</div>
|
|
46
47
|
)}
|
|
47
48
|
</div>
|
|
48
|
-
{timestampTime && (
|
|
49
|
-
<div className="table-item-timestamp flex flex-col justify-center items-end shrink-0 gap-1.5 ml-4 min-w-0 max-w-[50%] text-right">
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
{(timestampTime || timestampDate || append) && (
|
|
50
|
+
<div className="table-item-timestamp-append flex flex-col justify-center items-end shrink-0 gap-1.5 ml-4 min-w-0 max-w-[50%] text-right">
|
|
51
|
+
{timestampTime && (
|
|
52
|
+
<div className="table-item-timestamp-time w-full">
|
|
53
|
+
{timestampTime}
|
|
54
|
+
</div>
|
|
55
|
+
)}
|
|
53
56
|
{timestampDate && (
|
|
54
57
|
<div className="table-item-timestamp-date w-full hidden lg:block">
|
|
55
58
|
{timestampDate}
|
|
56
59
|
</div>
|
|
57
60
|
)}
|
|
61
|
+
{append && <div className="table-item-append w-full">{append}</div>}
|
|
58
62
|
</div>
|
|
59
63
|
)}
|
|
60
64
|
</TableListItemWrapper>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
export const Blog = () => (
|
|
4
|
+
<path
|
|
5
|
+
fillRule="evenodd"
|
|
6
|
+
d="M4 13v1h3.57c-.041-.159-.07-.323-.07-.495V13H4Zm10.5 2c0 .827-.673 1.5-1.5 1.5H3c-.827 0-1.5-.673-1.5-1.5V3c0-.827.673-1.5 1.5-1.5h10c.827 0 1.5.673 1.5 1.5v.872c.387-.238.831-.372 1.296-.372.069 0 .137.008.204.014V3c0-1.657-1.343-3-3-3H3C1.343 0 0 1.343 0 3v12c0 1.657 1.343 3 3 3h10c1.657 0 3-1.343 3-3v-3.265l-1.5 1.5V15Zm-6.416-4.819L8.265 10H4v1h3.599c.094-.305.253-.588.485-.819ZM4 5h8V4H4v1Zm7.265 2H4v1h6.265l1-1Zm6.445.904-5.951 5.95c-.093.094-.219.146-.35.146H9.495C9.222 14 9 13.778 9 13.505v-1.914c0-.131.052-.257.145-.35l5.951-5.951c.193-.193.447-.29.7-.29.254 0 .507.097.701.29l1.213 1.213c.387.387.387 1.015 0 1.401Z"
|
|
7
|
+
clipRule="evenodd"
|
|
8
|
+
/>
|
|
9
|
+
)
|
|
@@ -8,6 +8,7 @@ import { Back } from './Back'
|
|
|
8
8
|
import { Ban } from './Ban'
|
|
9
9
|
import { BarcodeRead } from './BarcodeRead'
|
|
10
10
|
import { Bell } from './Bell'
|
|
11
|
+
import { Blog } from './Blog'
|
|
11
12
|
import { Bullhorn } from './Bullhorn'
|
|
12
13
|
import { CalendarAlt } from './CalendarAlt'
|
|
13
14
|
import { Cog } from './Cog'
|
|
@@ -68,6 +69,7 @@ export const icons = {
|
|
|
68
69
|
ban: Ban,
|
|
69
70
|
barcodeRead: BarcodeRead,
|
|
70
71
|
bell: Bell,
|
|
72
|
+
blog: Blog,
|
|
71
73
|
bullhorn: Bullhorn,
|
|
72
74
|
calendarAlt: CalendarAlt,
|
|
73
75
|
check: Check,
|