@justeattakeaway/pie-data-table 0.3.24 → 0.3.25
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/README.md +275 -23
- package/dist/{PieElement-BxYpXACw.js → PieElement-DtKzrWh3.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/pie-data-table-body/index.js +1 -1
- package/dist/pie-data-table-cell/index.js +1 -1
- package/dist/pie-data-table-contents/index.js +1 -1
- package/dist/pie-data-table-head/index.js +1 -1
- package/dist/pie-data-table-head-cell/index.js +1 -1
- package/dist/pie-data-table-header/index.js +1 -1
- package/dist/pie-data-table-row/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# @justeattakeaway/pie-data-table
|
|
2
|
+
|
|
2
3
|
[Source Code](https://github.com/justeattakeaway/pie/tree/main/packages/components/pie-data-table) | [Design Documentation](https://pie.design/components/data-table) | [NPM](https://www.npmjs.com/package/@justeattakeaway/pie-data-table)
|
|
3
4
|
|
|
4
5
|
<p>
|
|
@@ -7,16 +8,29 @@
|
|
|
7
8
|
</a>
|
|
8
9
|
</p>
|
|
9
10
|
|
|
10
|
-
`@justeattakeaway/pie-data-table` is a Web Component built using the Lit library. It offers a simple and accessible
|
|
11
|
+
`@justeattakeaway/pie-data-table` is a Web Component built using the Lit library. It offers a simple and accessible data table component for displaying structured tabular data in web applications.
|
|
12
|
+
|
|
13
|
+
|
|
11
14
|
|
|
12
15
|
## Table of Contents
|
|
13
16
|
|
|
14
17
|
- [Installation](#installation)
|
|
15
18
|
- [Documentation](#documentation)
|
|
16
|
-
- [
|
|
17
|
-
- [
|
|
18
|
-
- [
|
|
19
|
-
|
|
19
|
+
- [Usage approaches](#usage-approaches)
|
|
20
|
+
- [Components](#components)
|
|
21
|
+
- [pie-data-table](#pie-data-table-1)
|
|
22
|
+
- [Properties](#properties)
|
|
23
|
+
- [Slots](#slots)
|
|
24
|
+
- [CSS Variables](#css-variables)
|
|
25
|
+
- [Events](#events)
|
|
26
|
+
- [pie-data-table-header](#pie-data-table-header-1)
|
|
27
|
+
- [Properties](#properties-1)
|
|
28
|
+
- [Slots](#slots-1)
|
|
29
|
+
- [CSS Variables](#css-variables-1)
|
|
30
|
+
- [pie-data-table-row](#pie-data-table-row-1)
|
|
31
|
+
- [Properties](#properties-2)
|
|
32
|
+
- [pie-data-table-cell and pie-data-table-head-cell](#pie-data-table-cell-and-pie-data-table-head-cell)
|
|
33
|
+
- [Properties](#properties-3)
|
|
20
34
|
- [Usage Examples](#usage-examples)
|
|
21
35
|
- [Questions and Support](#questions-and-support)
|
|
22
36
|
- [Contributing](#contributing)
|
|
@@ -29,25 +43,147 @@ Ideally, you should install the component using the **`@justeattakeaway/pie-webc
|
|
|
29
43
|
|
|
30
44
|
## Documentation
|
|
31
45
|
|
|
32
|
-
###
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
46
|
+
### Usage approaches
|
|
47
|
+
|
|
48
|
+
`pie-data-table` supports two rendering approaches:
|
|
49
|
+
|
|
50
|
+
- **Data-driven:** Pass `columns` and `data` props directly to `pie-data-table` and the component renders the table automatically. This is the simplest approach for straightforward tabular data.
|
|
51
|
+
- **Composable:** Use the individual sub-components to build the table structure yourself. Choose this approach when you need full control over cell content, for example, to render icons, badges, or interactive elements inside cells.
|
|
52
|
+
|
|
53
|
+
### Components
|
|
54
|
+
|
|
55
|
+
This package includes the following components:
|
|
56
|
+
|
|
57
|
+
- `pie-data-table` — the root table component
|
|
58
|
+
- `pie-data-table-header` — optional header above the table with heading, sub-heading, and action buttons
|
|
59
|
+
- `pie-data-table-contents` — wrapper for the underlying `<table>` element
|
|
60
|
+
- `pie-data-table-head` — wrapper for `<thead>`
|
|
61
|
+
- `pie-data-table-body` — wrapper for `<tbody>`
|
|
62
|
+
- `pie-data-table-row` — wrapper for `<tr>`
|
|
63
|
+
- `pie-data-table-head-cell` — wrapper for `<th>`
|
|
64
|
+
- `pie-data-table-cell` — wrapper for `<td>`
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### Components Specification
|
|
69
|
+
|
|
70
|
+
### `pie-data-table`
|
|
71
|
+
|
|
72
|
+
The root component. When `columns` and `data` props are both provided, it automatically renders an HTML table. When either is absent, the default slot is rendered instead, allowing you to display an empty state or compose the table manually using the sub-components.
|
|
73
|
+
|
|
74
|
+
#### Properties
|
|
75
|
+
|
|
76
|
+
| Prop | Options | Description | Default |
|
|
77
|
+
|------------------|---------|--------------------------------------------------------------------------------------------------------------------------------------|---------|
|
|
78
|
+
| `columns` | — | Array of column definition objects. Each column must have an `id` and `heading`. Optional: `textAlign`, `width`, `accessor`. See [Column definition](#column-definition). | `[]` |
|
|
79
|
+
| `data` | — | Array of data objects to display. Each object's keys are matched against the `accessor` property of each column definition. | `[]` |
|
|
80
|
+
| `additionalRows` | — | Array of additional row objects to render inside a `<tfoot>`. Useful for summary or total rows. See [Additional rows](#additional-rows). | `[]` |
|
|
81
|
+
|
|
82
|
+
##### Column definition
|
|
83
|
+
|
|
84
|
+
Each entry in the `columns` array is an object with the following shape:
|
|
85
|
+
|
|
86
|
+
| Key | Type | Required | Description |
|
|
87
|
+
|-------------|-----------------------------------|----------|-----------------------------------------------------------|
|
|
88
|
+
| `id` | `string` | Yes | Unique identifier for the column. |
|
|
89
|
+
| `heading` | `string` | Yes | Display text for the column heading. |
|
|
90
|
+
| `textAlign` | `'left'` \| `'right'` \| `'center'` | No | Text alignment for the column header and body cells. |
|
|
91
|
+
| `width` | `string` | No | Inline width applied to the `<th>` element (e.g. `'200px'`). |
|
|
92
|
+
| `accessor` | `string` | No | Key in each data row object whose value is rendered in this column. If omitted, the cell renders empty. |
|
|
93
|
+
|
|
94
|
+
##### Additional rows
|
|
95
|
+
|
|
96
|
+
Each entry in the `additionalRows` array has the following shape:
|
|
97
|
+
|
|
98
|
+
| Key | Type | Description |
|
|
99
|
+
|-----------|-----------|----------------------------------------|
|
|
100
|
+
| `cells` | `AdditionalCell[]` | Array of cell objects for this row. |
|
|
101
|
+
| `hideRow` | `boolean` | When `true`, the row is hidden via CSS. |
|
|
102
|
+
|
|
103
|
+
Each `AdditionalCell` object:
|
|
104
|
+
|
|
105
|
+
| Key | Type | Description |
|
|
106
|
+
|------------|-----------------------------------|-----------------------------------------------------------|
|
|
107
|
+
| `content` | `string` \| `number` | The content to render in the cell. |
|
|
108
|
+
| `textAlign`| `'left'` \| `'right'` \| `'center'` | Text alignment for the cell. |
|
|
109
|
+
| `colSpan` | `number` | Number of columns the cell should span. Defaults to `1`. |
|
|
110
|
+
| `hideCell` | `boolean` | When `true`, the cell is hidden via CSS. |
|
|
111
|
+
|
|
112
|
+
#### Slots
|
|
113
|
+
|
|
114
|
+
| Slot | Description |
|
|
115
|
+
|----------------|-------------------------------------------------------------------------------------------------------------------------------|
|
|
116
|
+
| `table-header` | Slot for placing a `pie-data-table-header` or custom header content above the table. |
|
|
117
|
+
| `default` | Rendered when there is no data to display (i.e. `data` or `columns` is empty). Use this slot to display an empty state view. |
|
|
118
|
+
|
|
119
|
+
#### CSS Variables
|
|
120
|
+
|
|
121
|
+
| Variable | Description | Default |
|
|
122
|
+
|----------------------------------------|------------------------------------------------------|--------------------------------------|
|
|
123
|
+
| `--data-table-background-color` | Background colour of the table container. | `var(--dt-color-container-default)` |
|
|
124
|
+
| `--data-table-background-hover-or-active` | Background colour on row hover. | `var(--dt-color-container-subtle)` |
|
|
125
|
+
| `--data-table-border-color` | Colour of all table borders. | `var(--dt-color-border-default)` |
|
|
126
|
+
| `--data-table-border-radius` | Border radius of the table container. | `var(--dt-radius-rounded-c)` |
|
|
127
|
+
| `--data-table-text-color` | Text colour used across the table. | `var(--dt-color-content-default)` |
|
|
128
|
+
|
|
129
|
+
#### Events
|
|
130
|
+
|
|
131
|
+
`pie-data-table` does not emit any custom events.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
### `pie-data-table-header`
|
|
136
|
+
|
|
137
|
+
An optional header component to be placed in the `table-header` slot of `pie-data-table`. It supports a heading, a sub-heading, and action buttons.
|
|
138
|
+
|
|
139
|
+
#### Properties
|
|
140
|
+
|
|
141
|
+
| Prop | Options | Description | Default |
|
|
142
|
+
|--------------|-----------------------------|---------------------------------------------------|------------|
|
|
143
|
+
| `heading` | — | The heading text displayed in the header. | — |
|
|
144
|
+
| `subHeading` | — | Optional sub-heading text below the heading. | — |
|
|
145
|
+
| `variant` | `'subtle'`, `'strong'` | Controls the visual emphasis of the header. `'strong'` applies a brand background colour. | `'subtle'` |
|
|
146
|
+
|
|
147
|
+
#### Slots
|
|
148
|
+
|
|
149
|
+
| Slot | Description |
|
|
150
|
+
|-----------------|-----------------------------------------------------------------------------------------------|
|
|
151
|
+
| `action-button` | Slot for one or more action buttons (e.g. `pie-button`) to display on the right side of the header. The wrapper is hidden when no elements are slotted. |
|
|
152
|
+
|
|
153
|
+
#### CSS Variables
|
|
154
|
+
|
|
155
|
+
| Variable | Description | Default |
|
|
156
|
+
|-----------------------------------|-----------------------------------------------------|-------------------------------------------|
|
|
157
|
+
| `--data-table-header-background` | Background colour of the header. | `transparent` (`'strong'` variant: `var(--dt-color-support-brand-02)`) |
|
|
158
|
+
| `--data-table-border-color` | Colour of the bottom border of the header. | `var(--dt-color-border-default)` |
|
|
159
|
+
|
|
160
|
+
---
|
|
36
161
|
|
|
37
|
-
###
|
|
38
|
-
| Slot | Description |
|
|
39
|
-
|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
40
|
-
| | |
|
|
162
|
+
### `pie-data-table-row`
|
|
41
163
|
|
|
42
|
-
|
|
43
|
-
| Variable | Description | Default |
|
|
44
|
-
|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
|
|
45
|
-
| | | |
|
|
164
|
+
A row component wrapping `<tr>`. Use this when composing the table manually via sub-components.
|
|
46
165
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
166
|
+
#### Properties
|
|
167
|
+
|
|
168
|
+
| Prop | Options | Description | Default |
|
|
169
|
+
|--------------|-----------------|------------------------------------------|---------|
|
|
170
|
+
| `isSelected` | `true`, `false` | Whether the row is in a selected state. | `false` |
|
|
171
|
+
| `isHidden` | `true`, `false` | Whether the row is hidden. | `false` |
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
### `pie-data-table-cell` and `pie-data-table-head-cell`
|
|
176
|
+
|
|
177
|
+
Cell components wrapping `<td>` and `<th>` respectively. Use these when composing the table manually via sub-components.
|
|
178
|
+
|
|
179
|
+
#### Properties
|
|
180
|
+
|
|
181
|
+
| Prop | Options | Description | Default |
|
|
182
|
+
|-------------|---------------------------------------|------------------------------------------|----------|
|
|
183
|
+
| `textAlign` | `'left'`, `'right'`, `'center'` | Text alignment for the cell content. | `'left'` |
|
|
184
|
+
| `isHidden` | `true`, `false` | Whether the cell is hidden. | `false` |
|
|
185
|
+
|
|
186
|
+
---
|
|
51
187
|
|
|
52
188
|
## Usage Examples
|
|
53
189
|
|
|
@@ -60,16 +196,84 @@ import '@justeattakeaway/pie-webc/components/data-table.js'
|
|
|
60
196
|
|
|
61
197
|
```html
|
|
62
198
|
<!-- pass js file into <script> tag -->
|
|
63
|
-
|
|
199
|
+
<pie-data-table></pie-data-table>
|
|
64
200
|
<script type="module" src="/main.js"></script>
|
|
65
201
|
```
|
|
66
202
|
|
|
203
|
+
**Passing columns and data (automatic rendering):**
|
|
204
|
+
|
|
205
|
+
```html
|
|
206
|
+
<pie-data-table id="my-table"></pie-data-table>
|
|
207
|
+
|
|
208
|
+
<script type="module">
|
|
209
|
+
import '@justeattakeaway/pie-webc/components/data-table.js';
|
|
210
|
+
|
|
211
|
+
const table = document.querySelector('#my-table');
|
|
212
|
+
|
|
213
|
+
table.columns = [
|
|
214
|
+
{ id: 'name', heading: 'Name', accessor: 'name' },
|
|
215
|
+
{ id: 'amount', heading: 'Amount', accessor: 'amount', textAlign: 'right' },
|
|
216
|
+
];
|
|
217
|
+
|
|
218
|
+
table.data = [
|
|
219
|
+
{ name: 'Order 1', amount: '£10.00' },
|
|
220
|
+
{ name: 'Order 2', amount: '£25.50' },
|
|
221
|
+
];
|
|
222
|
+
</script>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
**With a header and additional footer rows:**
|
|
226
|
+
|
|
227
|
+
```html
|
|
228
|
+
<pie-data-table id="my-table">
|
|
229
|
+
<pie-data-table-header
|
|
230
|
+
slot="table-header"
|
|
231
|
+
heading="Recent Orders"
|
|
232
|
+
sub-heading="Last 30 days"
|
|
233
|
+
variant="strong"
|
|
234
|
+
></pie-data-table-header>
|
|
235
|
+
</pie-data-table>
|
|
236
|
+
|
|
237
|
+
<script type="module">
|
|
238
|
+
import '@justeattakeaway/pie-webc/components/data-table.js';
|
|
239
|
+
import '@justeattakeaway/pie-webc/components/data-table-header.js';
|
|
240
|
+
|
|
241
|
+
const table = document.querySelector('#my-table');
|
|
242
|
+
|
|
243
|
+
table.columns = [
|
|
244
|
+
{ id: 'name', heading: 'Name', accessor: 'name' },
|
|
245
|
+
{ id: 'total', heading: 'Total', accessor: 'total', textAlign: 'right' },
|
|
246
|
+
];
|
|
247
|
+
|
|
248
|
+
table.data = [
|
|
249
|
+
{ name: 'Order 1', total: '£10.00' },
|
|
250
|
+
{ name: 'Order 2', total: '£25.50' },
|
|
251
|
+
];
|
|
252
|
+
|
|
253
|
+
table.additionalRows = [
|
|
254
|
+
{
|
|
255
|
+
cells: [
|
|
256
|
+
{ content: 'Grand Total', textAlign: 'left' },
|
|
257
|
+
{ content: '£35.50', textAlign: 'right' },
|
|
258
|
+
],
|
|
259
|
+
},
|
|
260
|
+
];
|
|
261
|
+
</script>
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**Displaying an empty state:**
|
|
265
|
+
|
|
266
|
+
```html
|
|
267
|
+
<pie-data-table>
|
|
268
|
+
<p>No orders found.</p>
|
|
269
|
+
</pie-data-table>
|
|
270
|
+
```
|
|
271
|
+
|
|
67
272
|
**For Native JS Applications, Vue, Angular, Svelte etc.:**
|
|
68
273
|
|
|
69
274
|
```js
|
|
70
275
|
// Vue templates (using Nuxt 3)
|
|
71
276
|
import '@justeattakeaway/pie-webc/components/data-table.js'
|
|
72
|
-
|
|
73
277
|
```
|
|
74
278
|
|
|
75
279
|
**For React Applications:**
|
|
@@ -77,6 +281,54 @@ import '@justeattakeaway/pie-webc/components/data-table.js'
|
|
|
77
281
|
```jsx
|
|
78
282
|
import { PieDataTable } from '@justeattakeaway/pie-webc/react/data-table.js';
|
|
79
283
|
|
|
284
|
+
<PieDataTable
|
|
285
|
+
columns={[
|
|
286
|
+
{ id: 'name', heading: 'Name', accessor: 'name' },
|
|
287
|
+
{ id: 'amount', heading: 'Amount', accessor: 'amount', textAlign: 'right' },
|
|
288
|
+
]}
|
|
289
|
+
data={[
|
|
290
|
+
{ name: 'Order 1', amount: '£10.00' },
|
|
291
|
+
{ name: 'Order 2', amount: '£25.50' },
|
|
292
|
+
]}
|
|
293
|
+
/>
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Manual composition using sub-components (React):**
|
|
297
|
+
|
|
298
|
+
Use this approach when you need full control over the table structure — for example, to render custom cell content such as icons, badges, or interactive elements.
|
|
299
|
+
|
|
300
|
+
```jsx
|
|
301
|
+
import { PieDataTable } from '@justeattakeaway/pie-webc/react/data-table.js';
|
|
302
|
+
import { PieDataTableContents } from '@justeattakeaway/pie-webc/react/data-table-contents.js';
|
|
303
|
+
import { PieDataTableHead } from '@justeattakeaway/pie-webc/react/data-table-head.js';
|
|
304
|
+
import { PieDataTableBody } from '@justeattakeaway/pie-webc/react/data-table-body.js';
|
|
305
|
+
import { PieDataTableRow } from '@justeattakeaway/pie-webc/react/data-table-row.js';
|
|
306
|
+
import { PieDataTableHeadCell } from '@justeattakeaway/pie-webc/react/data-table-head-cell.js';
|
|
307
|
+
import { PieDataTableCell } from '@justeattakeaway/pie-webc/react/data-table-cell.js';
|
|
308
|
+
|
|
309
|
+
const orders = [
|
|
310
|
+
{ id: '001', name: 'Order 1', amount: '£10.00' },
|
|
311
|
+
{ id: '002', name: 'Order 2', amount: '£25.50' },
|
|
312
|
+
];
|
|
313
|
+
|
|
314
|
+
<PieDataTable>
|
|
315
|
+
<PieDataTableContents>
|
|
316
|
+
<PieDataTableHead>
|
|
317
|
+
<PieDataTableRow>
|
|
318
|
+
<PieDataTableHeadCell>Order</PieDataTableHeadCell>
|
|
319
|
+
<PieDataTableHeadCell textAlign="right">Amount</PieDataTableHeadCell>
|
|
320
|
+
</PieDataTableRow>
|
|
321
|
+
</PieDataTableHead>
|
|
322
|
+
<PieDataTableBody>
|
|
323
|
+
{orders.map((order) => (
|
|
324
|
+
<PieDataTableRow key={order.id}>
|
|
325
|
+
<PieDataTableCell>{order.name}</PieDataTableCell>
|
|
326
|
+
<PieDataTableCell textAlign="right">{order.amount}</PieDataTableCell>
|
|
327
|
+
</PieDataTableRow>
|
|
328
|
+
))}
|
|
329
|
+
</PieDataTableBody>
|
|
330
|
+
</PieDataTableContents>
|
|
331
|
+
</PieDataTable>
|
|
80
332
|
```
|
|
81
333
|
|
|
82
334
|
## Questions and Support
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { nothing as c, html as l, unsafeCSS as g } from "lit";
|
|
2
2
|
import { property as h } from "lit/decorators.js";
|
|
3
|
-
import { P as p } from "./PieElement-
|
|
3
|
+
import { P as p } from "./PieElement-DtKzrWh3.js";
|
|
4
4
|
import { RtlMixin as u, safeCustomElement as f } from "@justeattakeaway/pie-webc-core";
|
|
5
5
|
import { classMap as n } from "lit/directives/class-map.js";
|
|
6
6
|
const v = "*,*:after,*:before{box-sizing:inherit}:host{display:block}.c-data-table{--data-table-background-color: var(--dt-color-container-default);--data-table-background-hover-or-active: var(--dt-color-container-subtle);--data-table-border-color: var(--dt-color-border-default);--data-table-border-radius: var(--dt-radius-rounded-c);--data-table-text-color: var(--dt-color-content-default);background-color:var(--data-table-background-color);border:1px solid var(--data-table-border-color);border-radius:var(--data-table-border-radius);color:var(--data-table-text-color);width:100%;overflow:hidden}.c-data-table table{border-spacing:0;width:100%}.c-data-table tbody{overflow:auto}.c-data-table tbody tr:hover{background-color:var(--data-table-background-hover-or-active)}.c-data-table-head-cell{background-color:transparent;font-size:calc(var(--dt-font-body-strong-l-size) * 1px);line-height:calc(var(--dt-font-body-strong-l-line-height) * 1px);font-weight:var(--dt-font-body-strong-l-weight);color:var(--data-table-text-color);text-align:left}.c-data-table-head-cell-text-align--left,.c-data-table-cell-text-align--left{text-align:left}.c-data-table-head-cell-text-align--right,.c-data-table-cell-text-align--right{text-align:right}.c-data-table-head-cell-text-align--center,.c-data-table-cell-text-align--center{text-align:center}.c-data-table-cell,.c-data-table-head-cell{padding:var(--dt-spacing-d);border-bottom:1px solid var(--data-table-border-color)}.c-data-table-cell--hidden,.c-data-table-row--hidden{display:none}", m = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unsafeCSS as p, html as d } from "lit";
|
|
2
|
-
import { P as i } from "../PieElement-
|
|
2
|
+
import { P as i } from "../PieElement-DtKzrWh3.js";
|
|
3
3
|
import { safeCustomElement as m } from "@justeattakeaway/pie-webc-core";
|
|
4
4
|
const b = ":host{display:table-row-group}:host ::slotted(pie-data-table-row){--pie-data-table-row-background-hover: var(--dt-color-container-subtle)}";
|
|
5
5
|
var u = Object.getOwnPropertyDescriptor, c = (o, a, n, s) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { unsafeCSS as c, nothing as d, html as f } from "lit";
|
|
2
2
|
import { property as p } from "lit/decorators.js";
|
|
3
|
-
import { P as g } from "../PieElement-
|
|
3
|
+
import { P as g } from "../PieElement-DtKzrWh3.js";
|
|
4
4
|
import { validPropertyValues as b, safeCustomElement as h } from "@justeattakeaway/pie-webc-core";
|
|
5
5
|
const m = ":host{padding:var(--dt-spacing-d);border-bottom:1px solid var(--data-table-border-color);display:table-cell}:host([textAlign=right]){text-align:right}:host([textAlign=center]){text-align:center}:host([textAlign=left]){text-align:left}:host([isHidden]){display:none}", x = ["left", "right", "center"], u = {
|
|
6
6
|
textAlign: "left",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unsafeCSS as i, html as c } from "lit";
|
|
2
|
-
import { P as m } from "../PieElement-
|
|
2
|
+
import { P as m } from "../PieElement-DtKzrWh3.js";
|
|
3
3
|
import { safeCustomElement as p } from "@justeattakeaway/pie-webc-core";
|
|
4
4
|
const b = ":host{inline-size:100%;display:table}";
|
|
5
5
|
var f = Object.getOwnPropertyDescriptor, u = (r, l, o, a) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unsafeCSS as d, html as i } from "lit";
|
|
2
|
-
import { P as c } from "../PieElement-
|
|
2
|
+
import { P as c } from "../PieElement-DtKzrWh3.js";
|
|
3
3
|
import { safeCustomElement as b } from "@justeattakeaway/pie-webc-core";
|
|
4
4
|
const p = ":host{background-color:transparent;font-size:calc(var(--dt-font-body-strong-l-size) * 1px);line-height:calc(var(--dt-font-body-strong-l-line-height) * 1px);font-weight:var(--dt-font-body-strong-l-weight);color:var(--dt-color-content-default);border-bottom:1px solid var(--data-table-border-color);display:table-header-group}";
|
|
5
5
|
var f = Object.getOwnPropertyDescriptor, h = (o, a, n, l) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { unsafeCSS as p, nothing as c, html as f } from "lit";
|
|
2
2
|
import { property as d } from "lit/decorators.js";
|
|
3
|
-
import { P as h } from "../PieElement-
|
|
3
|
+
import { P as h } from "../PieElement-DtKzrWh3.js";
|
|
4
4
|
import { validPropertyValues as g, safeCustomElement as b } from "@justeattakeaway/pie-webc-core";
|
|
5
5
|
const m = ":host{padding:var(--dt-spacing-d);border-bottom:1px solid var(--data-table-border-color);display:table-cell}:host([textAlign=right]){text-align:right}:host([textAlign=center]){text-align:center}:host([textAlign=left]){text-align:left}:host([isHidden]){display:none}", x = ["left", "right", "center"], u = {
|
|
6
6
|
textAlign: "left",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { unsafeCSS as p, nothing as h, html as d } from "lit";
|
|
2
2
|
import { property as c, queryAssignedElements as g, state as b } from "lit/decorators.js";
|
|
3
|
-
import { P as f } from "../PieElement-
|
|
3
|
+
import { P as f } from "../PieElement-DtKzrWh3.js";
|
|
4
4
|
import { validPropertyValues as u, safeCustomElement as m } from "@justeattakeaway/pie-webc-core";
|
|
5
5
|
import { classMap as v } from "lit/directives/class-map.js";
|
|
6
6
|
const y = "*,*:after,*:before{box-sizing:inherit}:host{display:block}.c-data-table-header{--data-table-header-background: transparent;--data-table-border-color: var(--dt-color-border-default);padding:var(--dt-spacing-d);background-color:var(--data-table-header-background);border-bottom:1px solid var(--data-table-border-color);display:flex;justify-content:space-between;align-items:flex-end}.c-data-table-header-heading-wrapper{display:flex;flex-direction:column;gap:var(--dt-spacing-b)}.c-data-table-header-heading{font-family:var(--dt-font-heading-m-family);font-weight:var(--dt-font-heading-m-weight);font-size:calc(var(--dt-font-heading-m-size--wide) * 1px);line-height:calc(var(--dt-font-heading-m-line-height--wide) * 1px)}.c-data-table-header-sub-heading{font-family:var(--dt-font-body-l-family);font-weight:var(--dt-font-body-l-weight);font-size:calc(var(--dt-font-body-l-size) * 1px);line-height:calc(var(--dt-font-body-l-line-height) * 1px)}.c-data-table-header--strong{--data-table-header-background: var(--dt-color-support-brand-02)}.c-data-table-action-buttons-wrapper{display:flex;gap:var(--dt-spacing-d)}", w = ["subtle", "strong"], x = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { unsafeCSS as d, nothing as c, html as f } from "lit";
|
|
2
2
|
import { property as i } from "lit/decorators.js";
|
|
3
|
-
import { P as b } from "../PieElement-
|
|
3
|
+
import { P as b } from "../PieElement-DtKzrWh3.js";
|
|
4
4
|
import { safeCustomElement as m } from "@justeattakeaway/pie-webc-core";
|
|
5
5
|
const u = ":host{display:table-row;border-bottom:1px solid var(--data-table-border-color)}:host(:hover){background-color:var(--pie-data-table-row-background-hover, transparent)}:host([isSelected]){background-color:var(--dt-color-container-subtle)}", S = {
|
|
6
6
|
isSelected: !1,
|
package/package.json
CHANGED