@entur/table 4.9.14-beta.9 → 4.9.15

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.
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { VariantType } from '@entur/utils';
1
+ import { default as React } from 'react';
2
+ import { VariantType } from '../../utils';
3
3
  /** @deprecated use variant="information" instead */
4
4
  declare const info = "info";
5
5
  /** @deprecated use variant="negative" instead */
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
- import { VariantType } from '@entur/utils';
3
- import './EditableCell.scss';
1
+ import { default as React } from 'react';
2
+ import { VariantType } from '../../utils';
4
3
  /** @deprecated use variant="information" instead */
5
4
  declare const info = "info";
6
5
  /** @deprecated use variant="negative" instead */
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
- import './ExpandRowButton.scss';
1
+ import { default as React } from 'react';
3
2
  export type ExpandRowButtonProps = {
4
3
  open: boolean;
5
4
  onClick: (e: React.MouseEvent) => void;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export type ExpandableRowProps = {
3
3
  /** Antall kolonner tabellraden er */
4
4
  colSpan: number;
@@ -1,6 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  import { ExternalSortConfig } from '.';
3
- import './HeaderCell.scss';
4
3
  export type HeaderCellProps = {
5
4
  /** Kolonneoverskrift */
6
5
  children: React.ReactNode;
package/dist/Table.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export type TableProps = {
3
3
  /** Ekstra klassenavn */
4
4
  className?: string;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export type TableBodyProps = {
3
3
  /** Tabellrader */
4
4
  children: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export type TableFooterProps = {
3
3
  /** Tabellrader */
4
4
  children: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export type TableHeadProps = {
3
3
  /** Kolonneoverskrifter */
4
4
  children: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  export type TableRowProps = {
3
3
  /** Tabellceller */
4
4
  children: React.ReactNode;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import './index.scss';
2
1
  export * from './Table';
3
2
  export * from './TableHead';
4
3
  export * from './TableBody';
package/dist/styles.css CHANGED
@@ -1,110 +1,5 @@
1
1
  /* DO NOT CHANGE!*/
2
2
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
3
- .eds-table__header-cell {
4
- color: var(--components-table-standard-text);
5
- font-size: 1rem;
6
- font-weight: 600;
7
- text-align: left;
8
- height: 3rem;
9
- padding: 0 1.5rem;
10
- }
11
- .eds-table--middle .eds-table__header-cell, .eds-table--small .eds-table__header-cell {
12
- padding: 0 1rem;
13
- }
14
- .eds-contrast .eds-table__header-cell {
15
- color: var(--components-table-contrast-text);
16
- border-bottom-color: var(--components-table-contrast-stroke);
17
- }
18
- .eds-table__header-cell--padding-checkbox {
19
- width: 3rem;
20
- padding: 0 0 1rem 1.25rem;
21
- }
22
- .eds-table__header-cell--padding-radio {
23
- width: 3rem;
24
- padding: 0 0 1rem 1.25rem;
25
- }
26
- .eds-table__header-cell--padding-overflow-menu {
27
- width: 3rem;
28
- padding: 1rem 0.75rem;
29
- }
30
- .eds-table__header-cell--sortable:focus-visible {
31
- outline: 2px solid #181c56;
32
- outline-color: var(--basecolors-stroke-focus-standard);
33
- outline-offset: 0.125rem;
34
- }
35
- .eds-contrast .eds-table__header-cell--sortable:focus-visible {
36
- outline-color: var(--basecolors-stroke-focus-contrast);
37
- }
38
- .eds-table__header-cell-button {
39
- position: relative;
40
- text-align: left;
41
- height: 100%;
42
- width: 100%;
43
- padding: 0;
44
- cursor: pointer;
45
- -webkit-appearance: none;
46
- -moz-appearance: none;
47
- appearance: none;
48
- border: none;
49
- background: none;
50
- color: inherit;
51
- font-size: inherit;
52
- font-weight: inherit;
53
- font-family: inherit;
54
- }
55
- .eds-table__header-cell-button-icon {
56
- position: absolute;
57
- margin-left: 0.25rem;
58
- }
59
- .eds-table__header-cell-button:focus-visible {
60
- outline: 2px solid #181c56;
61
- outline-color: var(--basecolors-stroke-focus-standard);
62
- outline-offset: 0.125rem;
63
- }
64
- .eds-contrast .eds-table__header-cell-button:focus-visible {
65
- outline-color: var(--basecolors-stroke-focus-contrast);
66
- }
67
- .eds-table--sticky-header .eds-table__header-cell {
68
- background-color: var(--components-table-standard-header-fill);
69
- position: sticky;
70
- top: 0;
71
- }
72
- .eds-contrast .eds-table--sticky-header .eds-table__header-cell {
73
- background-color: var(--components-table-contrast-header-fill);
74
- }
75
- /* DO NOT CHANGE!*/
76
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
77
- .eds-editable-cell {
78
- padding: 0.25rem 0.75rem;
79
- }
80
- .eds-table--middle .eds-editable-cell {
81
- padding: 0.25rem 0.5rem;
82
- }
83
- .eds-table--small .eds-editable-cell {
84
- padding: 0.125rem 0.5rem;
85
- }
86
- .eds-editable-cell .eds-form-control-wrapper:not(.eds-datepicker__datefield) {
87
- min-height: 0;
88
- }
89
- .eds-editable-cell .eds-form-control-wrapper:not(.eds-datepicker__datefield) .eds-form-control {
90
- padding: 0.75rem;
91
- }
92
- .eds-table--middle .eds-editable-cell .eds-form-control-wrapper:not(.eds-datepicker__datefield) .eds-form-control {
93
- padding: 0.25rem calc(0.5rem - 0.0625rem);
94
- }
95
- .eds-table--small .eds-editable-cell .eds-form-control-wrapper:not(.eds-datepicker__datefield) .eds-form-control {
96
- padding: calc(0.25rem - 0.125rem) calc(0.5rem - 0.0625rem);
97
- }
98
- /* DO NOT CHANGE!*/
99
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
100
- .eds-expand-row-button__icon {
101
- transition: transform ease-in-out 0.2s;
102
- }
103
- .eds-expand-row-button--open .eds-expand-row-button__icon {
104
- transform: rotate(180deg);
105
- }
106
- /* DO NOT CHANGE!*/
107
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
108
3
  /* DO NOT CHANGE!*/
109
4
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
110
5
  /* DO NOT CHANGE!*/
@@ -302,7 +197,6 @@
302
197
  padding: 1rem 1.5rem;
303
198
  }
304
199
  .eds-contrast .eds-table__data-cell {
305
- border-bottom-color: #8284ab;
306
200
  border-bottom-color: var(--components-table-contrast-stroke);
307
201
  }
308
202
  .eds-table--middle .eds-table__data-cell {
@@ -326,53 +220,41 @@
326
220
  padding: 1rem 0.75rem;
327
221
  }
328
222
  .eds-table__body > .eds-table__row {
329
- border-bottom: 0.0625rem solid #e3e6e8;
330
223
  border-bottom: 0.0625rem solid var(--components-table-standard-stroke);
331
224
  }
332
225
  .eds-contrast .eds-table__body > .eds-table__row {
333
- border-color: #8284ab;
334
226
  border-color: var(--components-table-contrast-stroke);
335
227
  }
336
228
  .eds-table__body > .eds-table__row:focus-visible {
337
229
  outline: 2px solid #181c56;
338
- outline-color: #181c56;
339
230
  outline-color: var(--basecolors-stroke-focus-standard);
340
231
  outline-offset: 0.125rem;
341
232
  }
342
233
  .eds-contrast .eds-table__body > .eds-table__row:focus-visible {
343
- outline-color: #aeb7e2;
344
234
  outline-color: var(--basecolors-stroke-focus-contrast);
345
235
  }
346
236
  .eds-table__body > .eds-table__row--hover:hover {
347
- background: #f2f5f7;
348
237
  background: var(--components-table-standard-cell-fill-hover);
349
238
  }
350
239
  .eds-contrast .eds-table__body > .eds-table__row--hover:hover {
351
- background: #393d79;
352
240
  background: var(--components-table-contrast-cell-fill-hover);
353
241
  }
354
242
  .eds-table__body > .eds-table__row--active {
355
- background: #f2f5f7;
356
243
  background: var(--components-table-standard-cell-fill-hover);
357
244
  }
358
245
  .eds-contrast .eds-table__body > .eds-table__row--active {
359
- background: #393d79;
360
246
  background: var(--components-table-contrast-cell-fill-hover);
361
247
  }
362
248
  .eds-table__body > .eds-table__row--error {
363
- background: #ffcece;
364
249
  background: var(--components-table-standard-fill-negative);
365
250
  }
366
251
  .eds-contrast .eds-table__body > .eds-table__row--error {
367
- background: rgba(255, 148, 148, 0.2);
368
252
  background: var(--components-table-contrast-cell-fill-negative);
369
253
  }
370
254
  .eds-table__head {
371
- border-bottom: 0.125rem solid #e3e6e8;
372
255
  border-bottom: 0.125rem solid var(--components-table-standard-stroke);
373
256
  }
374
257
  .eds-contrast .eds-table__head {
375
- border-color: #8284ab;
376
258
  border-color: var(--components-table-contrast-stroke);
377
259
  }
378
260
  .eds-table--sticky-header .eds-table__head {
@@ -383,4 +265,104 @@
383
265
  .eds-table--sticky-header--active .eds-table__head {
384
266
  box-shadow: 0px 10px 8px -10px rgba(0, 0, 0, 0.15);
385
267
  border-bottom: none;
268
+ }/* DO NOT CHANGE!*/
269
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
270
+ .eds-table__header-cell {
271
+ color: var(--components-table-standard-text);
272
+ font-size: 1rem;
273
+ font-weight: 600;
274
+ text-align: left;
275
+ height: 3rem;
276
+ padding: 0 1.5rem;
277
+ }
278
+ .eds-table--middle .eds-table__header-cell, .eds-table--small .eds-table__header-cell {
279
+ padding: 0 1rem;
280
+ }
281
+ .eds-contrast .eds-table__header-cell {
282
+ color: var(--components-table-contrast-text);
283
+ border-bottom-color: var(--components-table-contrast-stroke);
284
+ }
285
+ .eds-table__header-cell--padding-checkbox {
286
+ width: 3rem;
287
+ padding: 0 0 1rem 1.25rem;
288
+ }
289
+ .eds-table__header-cell--padding-radio {
290
+ width: 3rem;
291
+ padding: 0 0 1rem 1.25rem;
292
+ }
293
+ .eds-table__header-cell--padding-overflow-menu {
294
+ width: 3rem;
295
+ padding: 1rem 0.75rem;
296
+ }
297
+ .eds-table__header-cell--sortable:focus-visible {
298
+ outline: 2px solid #181c56;
299
+ outline-color: var(--basecolors-stroke-focus-standard);
300
+ outline-offset: 0.125rem;
301
+ }
302
+ .eds-contrast .eds-table__header-cell--sortable:focus-visible {
303
+ outline-color: var(--basecolors-stroke-focus-contrast);
304
+ }
305
+ .eds-table__header-cell-button {
306
+ position: relative;
307
+ text-align: left;
308
+ height: 100%;
309
+ width: 100%;
310
+ padding: 0;
311
+ cursor: pointer;
312
+ appearance: none;
313
+ border: none;
314
+ background: none;
315
+ color: inherit;
316
+ font-size: inherit;
317
+ font-weight: inherit;
318
+ font-family: inherit;
319
+ }
320
+ .eds-table__header-cell-button-icon {
321
+ position: absolute;
322
+ margin-left: 0.25rem;
386
323
  }
324
+ .eds-table__header-cell-button:focus-visible {
325
+ outline: 2px solid #181c56;
326
+ outline-color: var(--basecolors-stroke-focus-standard);
327
+ outline-offset: 0.125rem;
328
+ }
329
+ .eds-contrast .eds-table__header-cell-button:focus-visible {
330
+ outline-color: var(--basecolors-stroke-focus-contrast);
331
+ }
332
+ .eds-table--sticky-header .eds-table__header-cell {
333
+ background-color: var(--components-table-standard-header-fill);
334
+ position: sticky;
335
+ top: 0;
336
+ }
337
+ .eds-contrast .eds-table--sticky-header .eds-table__header-cell {
338
+ background-color: var(--components-table-contrast-header-fill);
339
+ }/* DO NOT CHANGE!*/
340
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
341
+ .eds-editable-cell {
342
+ padding: 0.25rem 0.75rem;
343
+ }
344
+ .eds-table--middle .eds-editable-cell {
345
+ padding: 0.25rem 0.5rem;
346
+ }
347
+ .eds-table--small .eds-editable-cell {
348
+ padding: 0.125rem 0.5rem;
349
+ }
350
+ .eds-editable-cell .eds-form-control-wrapper:not(.eds-datepicker__datefield) {
351
+ min-height: 0;
352
+ }
353
+ .eds-editable-cell .eds-form-control-wrapper:not(.eds-datepicker__datefield) .eds-form-control {
354
+ padding: 0.75rem;
355
+ }
356
+ .eds-table--middle .eds-editable-cell .eds-form-control-wrapper:not(.eds-datepicker__datefield) .eds-form-control {
357
+ padding: 0.25rem calc(0.5rem - 0.0625rem);
358
+ }
359
+ .eds-table--small .eds-editable-cell .eds-form-control-wrapper:not(.eds-datepicker__datefield) .eds-form-control {
360
+ padding: calc(0.25rem - 0.125rem) calc(0.5rem - 0.0625rem);
361
+ }/* DO NOT CHANGE!*/
362
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
363
+ .eds-expand-row-button__icon {
364
+ transition: transform ease-in-out 0.2s;
365
+ }
366
+ .eds-expand-row-button--open .eds-expand-row-button__icon {
367
+ transform: rotate(180deg);
368
+ }