@infinite-table/infinite-react 0.0.1-canary.10

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 ADDED
@@ -0,0 +1,123 @@
1
+
2
+ <div align="center">
3
+
4
+ <h1>
5
+ <b>Infinite Table</b>
6
+ </h1>
7
+ <h3> huge datasets are no longer a problem</h3>
8
+ <a href="https://infinite-table.com">
9
+ <img width="150px" height="170px" alt="InfiniteTable Logo" src="https://infinite-table.com/logo-infinite.svg">
10
+ </a>
11
+
12
+ </div>
13
+
14
+ ## Table Of Contents
15
+
16
+ <!-- START doctoc generated TOC please keep comment here to allow auto update -->
17
+ <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
18
+
19
+ - [Installation](#installation)
20
+ - [Documentation](#documentation)
21
+ - [Development process](#development-process)
22
+ - [Running the docs](#running-the-docs)
23
+ - [Testing](#testing)
24
+ - [Testing in development](#testing-in-development)
25
+ - [License](#license)
26
+
27
+ <!-- END doctoc generated TOC please keep comment here to allow auto update -->
28
+
29
+ ## Installation
30
+
31
+ ```bash
32
+ npm install @infinite-table/infinite-react --save
33
+ ```
34
+
35
+ ## [Documentation](https://infinite-table.com/docs)
36
+
37
+ Our approach with the `InfiniteTable` is to go documentation first. From our developer experience we know that most software products lack a good documentation. So we want to be different and start with the documentation first since our purpose is to have an outstanding documentation that developers can actually use.
38
+
39
+ **[Visit API docs](https://infinite-table.com/docs)**
40
+
41
+ ## Development process
42
+
43
+ You can start the examples by running:
44
+
45
+ ```bash
46
+ npm run dev
47
+ ```
48
+
49
+ ### Running the docs
50
+
51
+ ```bash
52
+ npm run docs
53
+ ```
54
+ <!--
55
+ ### HTML Element classNames
56
+
57
+ - The table has the `ITable` className, and all HTML elements are prefixed with that.
58
+
59
+ - All meaningful table parts (table row, header, cell) keep capitalized names, for example:
60
+
61
+ - `ITableRow`
62
+ - `ITableHeader`
63
+ - `ITableCell` - all cells, both in body and in header
64
+ - `ITableHeaderCell` - cells in header
65
+ - `ITableColumnCell` - cells in body rows
66
+
67
+ - Other HTML elements, which are nested inside those table parts, will be prefixed with the table part where they are nested, followed by `_`. Example:
68
+
69
+ - `ITableCell_content`
70
+
71
+ ### CSS variables
72
+
73
+ There are 2 kinds of variables:
74
+
75
+ - top-level
76
+ - component specific
77
+
78
+ All CSS variables meant primarily to be applied to a specific css property, will end up with `__<property-name>`, like this:
79
+
80
+ - `--it__border-radius`
81
+
82
+ #### CSS top-level variables
83
+
84
+ Those are prefixed with `at-`. Examples:
85
+
86
+ - `--it-font-size-0`
87
+ - `--it-space-0`
88
+ - `--it-space-1`
89
+ - `--it-color-....`
90
+
91
+ The ones meant primarily for a CSS property name will end with `__<property-name>`, like this:
92
+
93
+ - `--it__border-radius` -->
94
+
95
+
96
+
97
+ ## Testing
98
+
99
+ Infinite Table is built with extensive end-to-end testing via headless chrome (more exactly, puppeteer).
100
+ To execute the tests you have to run:
101
+
102
+ ```bash
103
+ $ npm run test
104
+ ```
105
+
106
+ Test pages are found in [tests folder](./source/examples/src/pages/tests) - which is part of a nextjs app where every file ending with `.page.tsx` is a page/route, while it's sibling file with the same name, but ending in `.test.tsx` is the actual test code. The test code is visiting the sibling page/route, to load the page and executes assertions against the test page.
107
+
108
+ The test command command above does 3 things:
109
+
110
+ * compiles the nextjs app found in the [examples folder](./source/examples) - runs `next build && next export`, which creates an `out` folder with the resulting examples/tests app
111
+ * starts a webserver that serves the generated `out` folder on [localhost:3000](http://localhost:3000)
112
+ * runs jest+puppeteer against the app served at [localhost:3000](http://localhost:3000)
113
+
114
+ ### Testing in development
115
+
116
+ If you want to run the tests in dev mode, to get feedback sooner, you need to run the following (in the [source/examples folder](./source/examples)):
117
+
118
+ * `npm run dev` - to run the nextjs app in development, on port `3000`
119
+ * `npm run test:watch` to run jest on changed files - optionally add a test path pattern like `npm run test:watch -- --testPathPattern=x/y/z`
120
+
121
+ ## License
122
+
123
+ [Commercial License](https://github.com/infinite-table/react-table/blob/master/source/LICENSE.md)
package/index.css ADDED
@@ -0,0 +1,422 @@
1
+ /**
2
+ * These variables are not component specific.
3
+ */
4
+ :root {
5
+ --it-space-0: 0rem;
6
+ /* 0px when 1rem=16px */
7
+ --it-space-1: 0.125rem;
8
+ /* 2px when 1rem=16px */
9
+ --it-space-2: 0.25rem;
10
+ /* 4px when 1rem=16px */
11
+ --it-space-3: 0.5rem;
12
+ /* 8px when 1rem=16px */
13
+ --it-space-4: 0.75rem;
14
+ /* 12px when 1rem=16px */
15
+ --it-space-5: 1rem;
16
+ --it-space-6: 1.25rem;
17
+ /* 20px when 1rem=16px */
18
+ --it-space-7: 1.5rem;
19
+ /* 24px when 1rem=16px */
20
+ --it-space-8: 2.25rem;
21
+ /* 36px when 1rem=16px */
22
+ --it-space-9: 3rem;
23
+ /* 48px when 1rem=16px */
24
+ --it-space-10: 4rem;
25
+ /* 64px when 1rem=16px */
26
+ --it-font-size-0: 0.5rem;
27
+ /* 8px when 1rem=16px */
28
+ --it-font-size-1: 0.625rem;
29
+ /* 10px when 1rem=16px */
30
+ --it-font-size-2: 0.75rem;
31
+ /* 12px when 1rem=16px */
32
+ --it-font-size-3: 0.875rem;
33
+ /* 14px when 1rem=16px */
34
+ --it-font-size-4: 1rem;
35
+ --it-font-size-5: 1.25rem;
36
+ /* 20px when 1rem=16px */
37
+ --it-font-size-6: 1.5rem;
38
+ /* 24px when 1rem=16px */
39
+ --it-font-size-7: 2.25rem;
40
+ /* 36px when 1rem=16px */
41
+ --it__border-radius: var(--it-space-2);
42
+ --it-color-brand: #133048;
43
+ --it-color-neutral-100: #f7fafc;
44
+ --it-color-neutral-200: #edf2f7;
45
+ --it-color-neutral-300: #e2e8f0;
46
+ --it-color-neutral-400: #cbd5e0;
47
+ --it-color-neutral-500: #a0aec0;
48
+ --it-color-neutral-600: #718096;
49
+ --it-color-neutral-700: #4a5568;
50
+ --it-color-neutral-800: #2d3748;
51
+ --it-color-neutral-900: #1a202c;
52
+ }
53
+
54
+ .it__align-items\=center {
55
+ align-items: center;
56
+ }
57
+
58
+ .it__align-items\=stretch {
59
+ align-items: stretch;
60
+ }
61
+
62
+ .it__justify-content\=flex-start {
63
+ justify-content: flex-start;
64
+ }
65
+
66
+ .it__justify-content\=flex-end {
67
+ justify-content: flex-end;
68
+ }
69
+
70
+ .it__justify-content\=center {
71
+ justify-content: center;
72
+ }
73
+
74
+ .it__cursor\=pointer {
75
+ cursor: pointer;
76
+ }
77
+
78
+ .it__overflow\=hidden {
79
+ overflow: hidden;
80
+ }
81
+
82
+ .it__overflow\=visible {
83
+ overflow: visible;
84
+ }
85
+
86
+ .it__overflow\=auto {
87
+ overflow: auto;
88
+ }
89
+
90
+ .it__overflow-x\=hidden {
91
+ overflow-x: hidden;
92
+ }
93
+
94
+ .it__overflow-x\=visible {
95
+ overflow-x: visible;
96
+ }
97
+
98
+ .it__overflow-x\=auto {
99
+ overflow-x: auto;
100
+ }
101
+
102
+ .it__overflow-y\=hidden {
103
+ overflow-y: hidden;
104
+ }
105
+
106
+ .it__overflow-y\=visible {
107
+ overflow-y: visible;
108
+ }
109
+
110
+ .it__overflow-y\=auto {
111
+ overflow-y: auto;
112
+ }
113
+
114
+ .it__height\=0 {
115
+ height: 0;
116
+ }
117
+
118
+ .it__height\=100\% {
119
+ height: 100%;
120
+ }
121
+
122
+ .it__width\=0 {
123
+ width: 0;
124
+ }
125
+
126
+ .it__width\=100\% {
127
+ width: 100%;
128
+ }
129
+
130
+ .it__top\=0 {
131
+ top: 0;
132
+ }
133
+
134
+ .it__top\=100\% {
135
+ top: 100%;
136
+ }
137
+
138
+ .it__left\=0 {
139
+ left: 0;
140
+ }
141
+
142
+ .it__left\=100\% {
143
+ left: 100%;
144
+ }
145
+
146
+ .it__transform\=translate3D000 {
147
+ transform: translate3d(0, 0, 0);
148
+ }
149
+
150
+ .it__will-change\=transform {
151
+ will-change: transform;
152
+ }
153
+
154
+ .it__position\=relative {
155
+ position: relative;
156
+ }
157
+
158
+ .it__position\=absolute {
159
+ position: absolute;
160
+ }
161
+
162
+ .it__position\=fixed {
163
+ position: fixed;
164
+ }
165
+
166
+ .it__display\=flex {
167
+ display: flex;
168
+ }
169
+
170
+ .it__flex-flow\=row {
171
+ flex-flow: row;
172
+ }
173
+
174
+ .it__flex-flow\=column {
175
+ flex-flow: column;
176
+ }
177
+
178
+ .it__white-space\=nowrap {
179
+ white-space: nowrap;
180
+ }
181
+
182
+ .it__text-overflow\=ellipsis {
183
+ text-overflow: ellipsis;
184
+ }
185
+
186
+ .it__user-select\=none {
187
+ user-select: none;
188
+ }
189
+
190
+ .IT-VirtualScrollContainer {
191
+ backface-visibility: hidden;
192
+ -webkit-overflow-scrolling: touch;
193
+ }
194
+ .IT-VirtualScrollContainer, .IT-VirtualScrollContainer:before, .IT-VirtualScrollContainer:after, .IT-VirtualScrollContainer *, .IT-VirtualScrollContainer *:before, .IT-VirtualScrollContainer *:after {
195
+ box-sizing: border-box;
196
+ }
197
+ .IT-VirtualScrollContainer > :first-child {
198
+ position: -webkit-sticky;
199
+ position: sticky;
200
+ top: 0;
201
+ left: 0;
202
+ }
203
+
204
+ .IList, .IList:before, .IList:after, .IList *, .IList *:before, .IList *:after {
205
+ box-sizing: border-box;
206
+ }
207
+ .IList--vertical {
208
+ display: inline-block;
209
+ }
210
+
211
+ .IListItemRoot > :first-child {
212
+ height: inherit;
213
+ }
214
+
215
+ :root {
216
+ --ITable__font-family: inherit;
217
+ --ITable__color: #484848;
218
+ --ITable__background: white;
219
+ --ITable__min-height: 100px;
220
+ --ITableCell__border-radius: var(--it-space-2);
221
+ --ITableHeader__color: #6f6f6f;
222
+ --ITableHeaderCell__background: #ededed;
223
+ --ITableHeader__background: var(--ITableHeaderCell__background);
224
+ --ITableHeaderCell--dragging__background: #d4d3d3;
225
+ --ITableHeaderCell-icon-size: 16px;
226
+ --ITableCell__border-width: 1px;
227
+ --ITableCell__border: var(--ITableCell__border-width) solid #c6c6c6;
228
+ --ITableCell__padding: var(--it-space-2) var(--it-space-3);
229
+ --ITableHeaderCell__padding: var(--it-space-3) var(--it-space-3);
230
+ --ITableRow__color: inherit;
231
+ --ITableRow__background: var(--ITable__background, transparent);
232
+ --ITableRow--odd__background: #f6f6f6;
233
+ --ITableRow-group-row__background: #cbc5c5;
234
+ --ITableRow-group-column-nesting: 30px;
235
+ --ITableRow--hover__background: #dbdbdb;
236
+ --ITable--theme: light;
237
+ --ITableHeader__height: 30px;
238
+ --ITable-accent__color: #ff7043;
239
+ }
240
+
241
+ .it--theme-dark {
242
+ --ITable__background: #101419;
243
+ --ITableHeader__color: #c3c3c3;
244
+ --ITableHeaderCell__background: black;
245
+ --ITableHeader__background: var(--ITableHeaderCell__background);
246
+ --ITableRow--hover__background: #3b4754;
247
+ --ITableRow__background: var(--ITable__background, transparent);
248
+ --ITableRow--odd__background: #242a31;
249
+ --ITableRow__color: #c3c3c3;
250
+ }
251
+
252
+ .ITable {
253
+ position: relative;
254
+ font-family: var(--ITable__font-family);
255
+ color: var(--ITable__color);
256
+ background: var(--ITable__background);
257
+ min-height: var(--ITable__min-height);
258
+ display: flex;
259
+ flex-flow: column;
260
+ }
261
+ .ITable, .ITable:before, .ITable:after, .ITable *, .ITable *:before, .ITable *:after {
262
+ box-sizing: border-box;
263
+ }
264
+ .ITable--shifting {
265
+ user-select: none;
266
+ }
267
+
268
+ .ITable-Portal {
269
+ z-index: 1000;
270
+ position: absolute;
271
+ top: 0;
272
+ left: 0;
273
+ }
274
+
275
+ .ITableBody {
276
+ flex: 1;
277
+ }
278
+
279
+ .ITableFooter {
280
+ padding: var(--it-space-2);
281
+ }
282
+
283
+ .ITableCell {
284
+ padding: var(--ITableCell__padding);
285
+ white-space: nowrap;
286
+ will-change: transform;
287
+ position: absolute;
288
+ }
289
+ .ITableCell--shifting {
290
+ transition: left 300ms;
291
+ }
292
+ .ITableCell--dragging {
293
+ transition: none;
294
+ }
295
+
296
+ .ITableHeaderCell {
297
+ background: var(--ITableHeaderCell__background);
298
+ padding: var(--ITableHeaderCell__padding);
299
+ }
300
+
301
+ .ITableHeaderCell--first,
302
+ .ITableColumnCell--first {
303
+ border-top-left-radius: var(--ITableCell__border-radius);
304
+ border-bottom-left-radius: var(--ITableCell__border-radius);
305
+ }
306
+ .ITableHeaderCell--last,
307
+ .ITableColumnCell--last {
308
+ border-top-right-radius: var(--ITableCell__border-radius);
309
+ border-bottom-right-radius: var(--ITableCell__border-radius);
310
+ }
311
+
312
+ .ITableHeaderCell,
313
+ .ITableColumnCell {
314
+ border-left: var(--ITableCell__border-width) solid transparent;
315
+ border-right: var(--ITableCell__border-width) solid transparent;
316
+ }
317
+ .ITableHeaderCell--pinned-start.ITableCell--last-in-category,
318
+ .ITableColumnCell--pinned-start.ITableCell--last-in-category {
319
+ border-right: var(--ITableCell__border);
320
+ }
321
+ .ITableHeaderCell--pinned-end.ITableCell--first-in-category,
322
+ .ITableColumnCell--pinned-end.ITableCell--first-in-category {
323
+ border-left: var(--ITableCell__border);
324
+ }
325
+
326
+ .ITableRow--group-row.ITableRow--odd .ITableCell::before,
327
+ .ITableRow--group-row.ITableRow--even .ITableCell::before {
328
+ content: "";
329
+ background: var(--ITable-accent__color);
330
+ position: absolute;
331
+ top: 0;
332
+ left: calc(0px - var(--ITableCell__border-width));
333
+ right: calc(0px - var(--ITableCell__border-width));
334
+ bottom: 0;
335
+ z-index: -1;
336
+ opacity: 0.05;
337
+ pointer-events: none;
338
+ }
339
+
340
+ .ITableIcon {
341
+ fill: currentColor;
342
+ flex: none;
343
+ }
344
+
345
+ .ITableIcon-expander {
346
+ cursor: pointer;
347
+ user-select: none;
348
+ }
349
+ .ITableIcon-expander--expanded {
350
+ fill: var(--ITable-accent__color);
351
+ }
352
+
353
+ .ITableRow {
354
+ color: var(--ITableRow__color);
355
+ will-change: transform;
356
+ }
357
+ .ITableRow--hover {
358
+ --ITableRow__background: var(--ITableRow--hover__background);
359
+ --ITableRow--odd__background: var(--ITableRow--hover__background);
360
+ }
361
+
362
+ .ITable--scrolling .ITableRow {
363
+ pointer-events: none;
364
+ }
365
+
366
+ .ITableRow--even {
367
+ background: var(--ITableRow__background);
368
+ }
369
+
370
+ .ITableRow--odd {
371
+ background: var(--ITableRow--odd__background);
372
+ }
373
+
374
+ .ITableHeader {
375
+ background: var(--ITableHeader__background);
376
+ color: var(--ITableHeader__color);
377
+ }
378
+ .ITableHeader--unvirtualized {
379
+ position: relative;
380
+ align-items: stretch;
381
+ }
382
+
383
+ .ITableHeaderCell {
384
+ border-right: var(--ITableCell__border);
385
+ }
386
+ .ITableHeaderCell--dragging {
387
+ z-index: 100;
388
+ opacity: 0.8;
389
+ background: var(--ITableHeaderCell--dragging__background);
390
+ }
391
+ .ITableHeaderCell--pinned-start {
392
+ z-index: 10;
393
+ }
394
+ .ITableHeaderCellProxy {
395
+ background: var(--ITableHeader__background);
396
+ opacity: 0.9;
397
+ padding: var(--ITableCell__padding);
398
+ padding-left: 20px;
399
+ z-index: 200;
400
+ }
401
+
402
+ .ITableHeaderCell__sort-icon {
403
+ margin-left: 10px;
404
+ position: relative;
405
+ }
406
+ .ITableHeaderCell__sort-icon [data-name=index] {
407
+ line-height: 0;
408
+ font-size: 10px;
409
+ border-radius: 50%;
410
+ padding: 1px;
411
+ }
412
+
413
+ .ITableHeaderGroup__header {
414
+ padding: var(--ITableCell__padding);
415
+ border-bottom: var(--ITableCell__border);
416
+ border-right: var(--ITableCell__border);
417
+ }
418
+ .ITableHeaderGroup__children {
419
+ flex: 1;
420
+ }
421
+
422
+ /*# sourceMappingURL=index.css.map */
package/index.css.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"sourceRoot":"","sources":["../src/style/utilities.scss","../src/components/VirtualScrollContainer/index.scss","../src/style/mixins.scss","../src/components/VirtualList/index.scss","../src/components/InfiniteTable/style/variables.scss","../src/components/InfiniteTable/style/index.scss","../src/components/InfiniteTable/components/InfiniteTableLicenseFooter/InfiniteTableLicenseFooter.scss","../src/components/InfiniteTable/components/InfiniteTableCell.scss","../src/components/InfiniteTable/components/icons/index.scss","../src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRow.scss","../src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAGA;EACE;AAAoB;EACpB;AAAwB;EACxB;AAAuB;EACvB;AAAsB;EACtB;AAAuB;EACvB;EACA;AAAuB;EACvB;AAAsB;EACtB;AAAuB;EACvB;AAAoB;EACpB;AAAqB;EAErB;AAA0B;EAC1B;AAA4B;EAC5B;AAA2B;EAC3B;AAA4B;EAC5B;EACA;AAA2B;EAC3B;AAA0B;EAC1B;AAA2B;EAE3B;EAEA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;ACtJF;EAEE;EACA;;ACHA;EAME;;ADDF;EACE;EACA;EAEA;EACA;;;ACVF;EAME;;ACEF;EACE;;;AAKF;EACE;;;AChBJ;EACE;EACA;EACA;EACA;EACA;EAEA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;;;ACtCF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AHRA;EAME;;AGMF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAGF;EACE;;;AC1BF;EACE;;;ACDF;EAEE;EACA;EACA;EACA;;AAEA;EACE;;AAEF;EACE;;;AAIJ;EACE;EACA;;;AAOA;AAAA;EACE;EACA;;AAEF;AAAA;EACE;EACA;;;AAGJ;AAAA;EAEE;EACA;;AACA;AAAA;EACE;;AAEF;AAAA;EACE;;;AAKF;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ACxDJ;EACE;EACA;;;AAEF;EACE;EACA;;AAGA;EACE;;;ACVJ;EACE;EACA;;AAGA;EACE;EACA;;;AAIJ;EACE;;;AAGF;EAEE;;;AAGF;EAEE;;;ACtBF;EACE;EACA;;AACA;EACE;EACA;;;AAGJ;EAgBE;;AAfA;EACE;EACA;EACA;;AAEF;EACE;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAIJ;EACE;EACA;;AAEA;EACE;EACA;EAEA;EACA;;;AAKF;EACE;EAEA;EACA;;AAEF;EACE","file":"index.css"}