@instructure/ui-table 11.6.0 → 11.6.1-snapshot-129
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/CHANGELOG.md +43 -308
- package/es/Table/{Body → v1/Body}/index.js +2 -2
- package/es/Table/{Cell → v1/Cell}/index.js +2 -2
- package/es/Table/{ColHeader → v1/ColHeader}/index.js +1 -1
- package/es/Table/{Head → v1/Head}/index.js +2 -2
- package/es/Table/{Row → v1/Row}/index.js +2 -2
- package/es/Table/{RowHeader → v1/RowHeader}/index.js +2 -2
- package/es/Table/{index.js → v1/index.js} +2 -2
- package/es/Table/v2/Body/index.js +73 -0
- package/es/Table/v2/Body/props.js +26 -0
- package/es/Table/v2/Body/styles.js +45 -0
- package/es/Table/v2/Cell/index.js +68 -0
- package/es/Table/v2/Cell/props.js +26 -0
- package/es/Table/v2/Cell/styles.js +54 -0
- package/es/Table/v2/ColHeader/index.js +117 -0
- package/es/Table/v2/ColHeader/props.js +26 -0
- package/es/Table/v2/ColHeader/styles.js +93 -0
- package/es/Table/v2/Head/index.js +173 -0
- package/es/Table/v2/Head/props.js +26 -0
- package/es/Table/v2/Head/styles.js +45 -0
- package/es/Table/v2/Row/index.js +82 -0
- package/es/Table/v2/Row/props.js +26 -0
- package/es/Table/v2/Row/styles.js +67 -0
- package/es/Table/v2/RowHeader/index.js +68 -0
- package/es/Table/v2/RowHeader/props.js +26 -0
- package/es/Table/v2/RowHeader/styles.js +54 -0
- package/es/Table/v2/TableContext.js +46 -0
- package/es/Table/v2/index.js +135 -0
- package/es/Table/v2/props.js +26 -0
- package/es/Table/v2/styles.js +58 -0
- package/es/exports/a.js +31 -0
- package/es/exports/b.js +31 -0
- package/lib/Table/{Body → v1/Body}/index.js +4 -4
- package/lib/Table/{Cell → v1/Cell}/index.js +4 -4
- package/lib/Table/{ColHeader → v1/ColHeader}/index.js +4 -4
- package/lib/Table/{Head → v1/Head}/index.js +5 -5
- package/lib/Table/{Row → v1/Row}/index.js +4 -4
- package/lib/Table/{RowHeader → v1/RowHeader}/index.js +4 -4
- package/lib/Table/{index.js → v1/index.js} +4 -4
- package/lib/Table/v2/Body/index.js +79 -0
- package/lib/Table/v2/Body/props.js +31 -0
- package/lib/Table/v2/Body/styles.js +51 -0
- package/lib/Table/v2/Cell/index.js +74 -0
- package/lib/Table/v2/Cell/props.js +31 -0
- package/lib/Table/v2/Cell/styles.js +60 -0
- package/lib/Table/v2/ColHeader/index.js +122 -0
- package/lib/Table/v2/ColHeader/props.js +31 -0
- package/lib/Table/v2/ColHeader/styles.js +99 -0
- package/lib/Table/v2/Head/index.js +179 -0
- package/lib/Table/v2/Head/props.js +31 -0
- package/lib/Table/v2/Head/styles.js +51 -0
- package/lib/Table/v2/Row/index.js +88 -0
- package/lib/Table/v2/Row/props.js +31 -0
- package/lib/Table/v2/Row/styles.js +73 -0
- package/lib/Table/v2/RowHeader/index.js +74 -0
- package/lib/Table/v2/RowHeader/props.js +31 -0
- package/lib/Table/v2/RowHeader/styles.js +60 -0
- package/lib/Table/v2/TableContext.js +51 -0
- package/lib/Table/v2/index.js +140 -0
- package/lib/Table/v2/props.js +31 -0
- package/lib/Table/v2/styles.js +64 -0
- package/lib/{index.js → exports/a.js} +9 -9
- package/lib/exports/b.js +61 -0
- package/package.json +43 -21
- package/src/Table/{Body → v1/Body}/index.tsx +2 -2
- package/src/Table/{Cell → v1/Cell}/index.tsx +2 -2
- package/src/Table/{ColHeader → v1/ColHeader}/index.tsx +1 -1
- package/src/Table/{Head → v1/Head}/index.tsx +3 -3
- package/src/Table/{README.md → v1/README.md} +1 -1
- package/src/Table/{Row → v1/Row}/index.tsx +2 -2
- package/src/Table/{RowHeader → v1/RowHeader}/index.tsx +2 -2
- package/src/Table/{index.tsx → v1/index.tsx} +2 -2
- package/src/Table/v2/Body/index.tsx +91 -0
- package/src/Table/v2/Body/props.ts +50 -0
- package/src/Table/v2/Body/styles.ts +51 -0
- package/src/Table/v2/Cell/index.tsx +83 -0
- package/src/Table/v2/Cell/props.ts +54 -0
- package/src/Table/v2/Cell/styles.ts +60 -0
- package/src/Table/v2/ColHeader/index.tsx +118 -0
- package/src/Table/v2/ColHeader/props.ts +93 -0
- package/src/Table/v2/ColHeader/styles.ts +95 -0
- package/src/Table/v2/Head/index.tsx +200 -0
- package/src/Table/v2/Head/props.ts +64 -0
- package/src/Table/v2/Head/styles.ts +51 -0
- package/src/Table/v2/README.md +1155 -0
- package/src/Table/v2/Row/index.tsx +105 -0
- package/src/Table/v2/Row/props.ts +67 -0
- package/src/Table/v2/Row/styles.ts +78 -0
- package/src/Table/v2/RowHeader/index.tsx +84 -0
- package/src/Table/v2/RowHeader/props.ts +48 -0
- package/src/Table/v2/RowHeader/styles.ts +60 -0
- package/src/Table/v2/TableContext.ts +66 -0
- package/src/Table/v2/index.tsx +160 -0
- package/src/Table/v2/props.ts +98 -0
- package/src/Table/v2/styles.ts +63 -0
- package/src/exports/a.ts +39 -0
- package/src/exports/b.ts +39 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Table/v1/Body/index.d.ts.map +1 -0
- package/types/Table/v1/Body/props.d.ts.map +1 -0
- package/types/Table/v1/Body/styles.d.ts.map +1 -0
- package/types/Table/v1/Body/theme.d.ts.map +1 -0
- package/types/Table/v1/Cell/index.d.ts.map +1 -0
- package/types/Table/v1/Cell/props.d.ts.map +1 -0
- package/types/Table/v1/Cell/styles.d.ts.map +1 -0
- package/types/Table/v1/Cell/theme.d.ts.map +1 -0
- package/types/Table/v1/ColHeader/index.d.ts.map +1 -0
- package/types/Table/v1/ColHeader/props.d.ts.map +1 -0
- package/types/Table/v1/ColHeader/styles.d.ts.map +1 -0
- package/types/Table/v1/ColHeader/theme.d.ts.map +1 -0
- package/types/Table/v1/Head/index.d.ts.map +1 -0
- package/types/Table/v1/Head/props.d.ts.map +1 -0
- package/types/Table/v1/Head/styles.d.ts.map +1 -0
- package/types/Table/v1/Head/theme.d.ts.map +1 -0
- package/types/Table/v1/Row/index.d.ts.map +1 -0
- package/types/Table/v1/Row/props.d.ts.map +1 -0
- package/types/Table/v1/Row/styles.d.ts.map +1 -0
- package/types/Table/v1/Row/theme.d.ts.map +1 -0
- package/types/Table/v1/RowHeader/index.d.ts.map +1 -0
- package/types/Table/v1/RowHeader/props.d.ts.map +1 -0
- package/types/Table/v1/RowHeader/styles.d.ts.map +1 -0
- package/types/Table/v1/RowHeader/theme.d.ts.map +1 -0
- package/types/Table/v1/TableContext.d.ts.map +1 -0
- package/types/Table/v1/index.d.ts.map +1 -0
- package/types/Table/v1/props.d.ts.map +1 -0
- package/types/Table/v1/styles.d.ts.map +1 -0
- package/types/Table/v1/theme.d.ts.map +1 -0
- package/types/Table/v2/Body/index.d.ts +24 -0
- package/types/Table/v2/Body/index.d.ts.map +1 -0
- package/types/Table/v2/Body/props.d.ts +20 -0
- package/types/Table/v2/Body/props.d.ts.map +1 -0
- package/types/Table/v2/Body/styles.d.ts +13 -0
- package/types/Table/v2/Body/styles.d.ts.map +1 -0
- package/types/Table/v2/Cell/index.d.ts +29 -0
- package/types/Table/v2/Cell/index.d.ts.map +1 -0
- package/types/Table/v2/Cell/props.d.ts +23 -0
- package/types/Table/v2/Cell/props.d.ts.map +1 -0
- package/types/Table/v2/Cell/styles.d.ts +14 -0
- package/types/Table/v2/Cell/styles.d.ts.map +1 -0
- package/types/Table/v2/ColHeader/index.d.ts +37 -0
- package/types/Table/v2/ColHeader/index.d.ts.map +1 -0
- package/types/Table/v2/ColHeader/props.d.ts +47 -0
- package/types/Table/v2/ColHeader/props.d.ts.map +1 -0
- package/types/Table/v2/ColHeader/styles.d.ts +15 -0
- package/types/Table/v2/ColHeader/styles.d.ts.map +1 -0
- package/types/Table/v2/Head/index.d.ts +38 -0
- package/types/Table/v2/Head/index.d.ts.map +1 -0
- package/types/Table/v2/Head/props.d.ts +34 -0
- package/types/Table/v2/Head/props.d.ts.map +1 -0
- package/types/Table/v2/Head/styles.d.ts +13 -0
- package/types/Table/v2/Head/styles.d.ts.map +1 -0
- package/types/Table/v2/Row/index.d.ts +27 -0
- package/types/Table/v2/Row/index.d.ts.map +1 -0
- package/types/Table/v2/Row/props.d.ts +29 -0
- package/types/Table/v2/Row/props.d.ts.map +1 -0
- package/types/Table/v2/Row/styles.d.ts +19 -0
- package/types/Table/v2/Row/styles.d.ts.map +1 -0
- package/types/Table/v2/RowHeader/index.d.ts +28 -0
- package/types/Table/v2/RowHeader/index.d.ts.map +1 -0
- package/types/Table/v2/RowHeader/props.d.ts +17 -0
- package/types/Table/v2/RowHeader/props.d.ts.map +1 -0
- package/types/Table/v2/RowHeader/styles.d.ts +14 -0
- package/types/Table/v2/RowHeader/styles.d.ts.map +1 -0
- package/types/Table/v2/TableContext.d.ts +36 -0
- package/types/Table/v2/TableContext.d.ts.map +1 -0
- package/types/Table/v2/index.d.ts +45 -0
- package/types/Table/v2/index.d.ts.map +1 -0
- package/types/Table/v2/props.d.ts +53 -0
- package/types/Table/v2/props.d.ts.map +1 -0
- package/types/Table/v2/styles.d.ts +15 -0
- package/types/Table/v2/styles.d.ts.map +1 -0
- package/types/exports/a.d.ts +16 -0
- package/types/exports/a.d.ts.map +1 -0
- package/types/exports/b.d.ts +16 -0
- package/types/exports/b.d.ts.map +1 -0
- package/es/index.js +0 -31
- package/src/index.ts +0 -39
- package/types/Table/Body/index.d.ts.map +0 -1
- package/types/Table/Body/props.d.ts.map +0 -1
- package/types/Table/Body/styles.d.ts.map +0 -1
- package/types/Table/Body/theme.d.ts.map +0 -1
- package/types/Table/Cell/index.d.ts.map +0 -1
- package/types/Table/Cell/props.d.ts.map +0 -1
- package/types/Table/Cell/styles.d.ts.map +0 -1
- package/types/Table/Cell/theme.d.ts.map +0 -1
- package/types/Table/ColHeader/index.d.ts.map +0 -1
- package/types/Table/ColHeader/props.d.ts.map +0 -1
- package/types/Table/ColHeader/styles.d.ts.map +0 -1
- package/types/Table/ColHeader/theme.d.ts.map +0 -1
- package/types/Table/Head/index.d.ts.map +0 -1
- package/types/Table/Head/props.d.ts.map +0 -1
- package/types/Table/Head/styles.d.ts.map +0 -1
- package/types/Table/Head/theme.d.ts.map +0 -1
- package/types/Table/Row/index.d.ts.map +0 -1
- package/types/Table/Row/props.d.ts.map +0 -1
- package/types/Table/Row/styles.d.ts.map +0 -1
- package/types/Table/Row/theme.d.ts.map +0 -1
- package/types/Table/RowHeader/index.d.ts.map +0 -1
- package/types/Table/RowHeader/props.d.ts.map +0 -1
- package/types/Table/RowHeader/styles.d.ts.map +0 -1
- package/types/Table/RowHeader/theme.d.ts.map +0 -1
- package/types/Table/TableContext.d.ts.map +0 -1
- package/types/Table/index.d.ts.map +0 -1
- package/types/Table/props.d.ts.map +0 -1
- package/types/Table/styles.d.ts.map +0 -1
- package/types/Table/theme.d.ts.map +0 -1
- package/types/index.d.ts +0 -16
- package/types/index.d.ts.map +0 -1
- /package/es/Table/{Body → v1/Body}/props.js +0 -0
- /package/es/Table/{Body → v1/Body}/styles.js +0 -0
- /package/es/Table/{Body → v1/Body}/theme.js +0 -0
- /package/es/Table/{Cell → v1/Cell}/props.js +0 -0
- /package/es/Table/{Cell → v1/Cell}/styles.js +0 -0
- /package/es/Table/{Cell → v1/Cell}/theme.js +0 -0
- /package/es/Table/{ColHeader → v1/ColHeader}/props.js +0 -0
- /package/es/Table/{ColHeader → v1/ColHeader}/styles.js +0 -0
- /package/es/Table/{ColHeader → v1/ColHeader}/theme.js +0 -0
- /package/es/Table/{Head → v1/Head}/props.js +0 -0
- /package/es/Table/{Head → v1/Head}/styles.js +0 -0
- /package/es/Table/{Head → v1/Head}/theme.js +0 -0
- /package/es/Table/{Row → v1/Row}/props.js +0 -0
- /package/es/Table/{Row → v1/Row}/styles.js +0 -0
- /package/es/Table/{Row → v1/Row}/theme.js +0 -0
- /package/es/Table/{RowHeader → v1/RowHeader}/props.js +0 -0
- /package/es/Table/{RowHeader → v1/RowHeader}/styles.js +0 -0
- /package/es/Table/{RowHeader → v1/RowHeader}/theme.js +0 -0
- /package/es/Table/{TableContext.js → v1/TableContext.js} +0 -0
- /package/es/Table/{props.js → v1/props.js} +0 -0
- /package/es/Table/{styles.js → v1/styles.js} +0 -0
- /package/es/Table/{theme.js → v1/theme.js} +0 -0
- /package/lib/Table/{Body → v1/Body}/props.js +0 -0
- /package/lib/Table/{Body → v1/Body}/styles.js +0 -0
- /package/lib/Table/{Body → v1/Body}/theme.js +0 -0
- /package/lib/Table/{Cell → v1/Cell}/props.js +0 -0
- /package/lib/Table/{Cell → v1/Cell}/styles.js +0 -0
- /package/lib/Table/{Cell → v1/Cell}/theme.js +0 -0
- /package/lib/Table/{ColHeader → v1/ColHeader}/props.js +0 -0
- /package/lib/Table/{ColHeader → v1/ColHeader}/styles.js +0 -0
- /package/lib/Table/{ColHeader → v1/ColHeader}/theme.js +0 -0
- /package/lib/Table/{Head → v1/Head}/props.js +0 -0
- /package/lib/Table/{Head → v1/Head}/styles.js +0 -0
- /package/lib/Table/{Head → v1/Head}/theme.js +0 -0
- /package/lib/Table/{Row → v1/Row}/props.js +0 -0
- /package/lib/Table/{Row → v1/Row}/styles.js +0 -0
- /package/lib/Table/{Row → v1/Row}/theme.js +0 -0
- /package/lib/Table/{RowHeader → v1/RowHeader}/props.js +0 -0
- /package/lib/Table/{RowHeader → v1/RowHeader}/styles.js +0 -0
- /package/lib/Table/{RowHeader → v1/RowHeader}/theme.js +0 -0
- /package/lib/Table/{TableContext.js → v1/TableContext.js} +0 -0
- /package/lib/Table/{props.js → v1/props.js} +0 -0
- /package/lib/Table/{styles.js → v1/styles.js} +0 -0
- /package/lib/Table/{theme.js → v1/theme.js} +0 -0
- /package/src/Table/{Body → v1/Body}/props.ts +0 -0
- /package/src/Table/{Body → v1/Body}/styles.ts +0 -0
- /package/src/Table/{Body → v1/Body}/theme.ts +0 -0
- /package/src/Table/{Cell → v1/Cell}/props.ts +0 -0
- /package/src/Table/{Cell → v1/Cell}/styles.ts +0 -0
- /package/src/Table/{Cell → v1/Cell}/theme.ts +0 -0
- /package/src/Table/{ColHeader → v1/ColHeader}/props.ts +0 -0
- /package/src/Table/{ColHeader → v1/ColHeader}/styles.ts +0 -0
- /package/src/Table/{ColHeader → v1/ColHeader}/theme.ts +0 -0
- /package/src/Table/{Head → v1/Head}/props.ts +0 -0
- /package/src/Table/{Head → v1/Head}/styles.ts +0 -0
- /package/src/Table/{Head → v1/Head}/theme.ts +0 -0
- /package/src/Table/{Row → v1/Row}/props.ts +0 -0
- /package/src/Table/{Row → v1/Row}/styles.ts +0 -0
- /package/src/Table/{Row → v1/Row}/theme.ts +0 -0
- /package/src/Table/{RowHeader → v1/RowHeader}/props.ts +0 -0
- /package/src/Table/{RowHeader → v1/RowHeader}/styles.ts +0 -0
- /package/src/Table/{RowHeader → v1/RowHeader}/theme.ts +0 -0
- /package/src/Table/{TableContext.ts → v1/TableContext.ts} +0 -0
- /package/src/Table/{props.ts → v1/props.ts} +0 -0
- /package/src/Table/{styles.ts → v1/styles.ts} +0 -0
- /package/src/Table/{theme.ts → v1/theme.ts} +0 -0
- /package/types/Table/{Body → v1/Body}/index.d.ts +0 -0
- /package/types/Table/{Body → v1/Body}/props.d.ts +0 -0
- /package/types/Table/{Body → v1/Body}/styles.d.ts +0 -0
- /package/types/Table/{Body → v1/Body}/theme.d.ts +0 -0
- /package/types/Table/{Cell → v1/Cell}/index.d.ts +0 -0
- /package/types/Table/{Cell → v1/Cell}/props.d.ts +0 -0
- /package/types/Table/{Cell → v1/Cell}/styles.d.ts +0 -0
- /package/types/Table/{Cell → v1/Cell}/theme.d.ts +0 -0
- /package/types/Table/{ColHeader → v1/ColHeader}/index.d.ts +0 -0
- /package/types/Table/{ColHeader → v1/ColHeader}/props.d.ts +0 -0
- /package/types/Table/{ColHeader → v1/ColHeader}/styles.d.ts +0 -0
- /package/types/Table/{ColHeader → v1/ColHeader}/theme.d.ts +0 -0
- /package/types/Table/{Head → v1/Head}/index.d.ts +0 -0
- /package/types/Table/{Head → v1/Head}/props.d.ts +0 -0
- /package/types/Table/{Head → v1/Head}/styles.d.ts +0 -0
- /package/types/Table/{Head → v1/Head}/theme.d.ts +0 -0
- /package/types/Table/{Row → v1/Row}/index.d.ts +0 -0
- /package/types/Table/{Row → v1/Row}/props.d.ts +0 -0
- /package/types/Table/{Row → v1/Row}/styles.d.ts +0 -0
- /package/types/Table/{Row → v1/Row}/theme.d.ts +0 -0
- /package/types/Table/{RowHeader → v1/RowHeader}/index.d.ts +0 -0
- /package/types/Table/{RowHeader → v1/RowHeader}/props.d.ts +0 -0
- /package/types/Table/{RowHeader → v1/RowHeader}/styles.d.ts +0 -0
- /package/types/Table/{RowHeader → v1/RowHeader}/theme.d.ts +0 -0
- /package/types/Table/{TableContext.d.ts → v1/TableContext.d.ts} +0 -0
- /package/types/Table/{index.d.ts → v1/index.d.ts} +0 -0
- /package/types/Table/{props.d.ts → v1/props.d.ts} +0 -0
- /package/types/Table/{styles.d.ts → v1/styles.d.ts} +0 -0
- /package/types/Table/{theme.d.ts → v1/theme.d.ts} +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
var _dec, _class, _Table;
|
|
3
|
+
/*
|
|
4
|
+
* The MIT License (MIT)
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import { Component, Children, isValidElement } from 'react';
|
|
28
|
+
import { safeCloneElement, omitProps } from '@instructure/ui-react-utils';
|
|
29
|
+
import { View } from '@instructure/ui-view/latest';
|
|
30
|
+
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
31
|
+
import { withStyle } from '@instructure/emotion';
|
|
32
|
+
import generateStyle from "./styles.js";
|
|
33
|
+
import { Head } from "./Head/index.js";
|
|
34
|
+
import { Body } from "./Body/index.js";
|
|
35
|
+
import { Row } from "./Row/index.js";
|
|
36
|
+
import { ColHeader } from "./ColHeader/index.js";
|
|
37
|
+
import { RowHeader } from "./RowHeader/index.js";
|
|
38
|
+
import { Cell } from "./Cell/index.js";
|
|
39
|
+
import { allowedProps } from "./props.js";
|
|
40
|
+
import TableContext from "./TableContext.js";
|
|
41
|
+
import { error } from '@instructure/console';
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
---
|
|
45
|
+
category: components
|
|
46
|
+
---
|
|
47
|
+
**/
|
|
48
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
49
|
+
let Table = (_dec = withStyle(generateStyle), _dec(_class = (_Table = class Table extends Component {
|
|
50
|
+
constructor(...args) {
|
|
51
|
+
super(...args);
|
|
52
|
+
this.ref = null;
|
|
53
|
+
this.handleRef = el => {
|
|
54
|
+
const elementRef = this.props.elementRef;
|
|
55
|
+
this.ref = el;
|
|
56
|
+
if (typeof elementRef === 'function') {
|
|
57
|
+
elementRef(el);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
componentDidMount() {
|
|
62
|
+
var _this$props$makeStyle, _this$props;
|
|
63
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
64
|
+
}
|
|
65
|
+
componentDidUpdate() {
|
|
66
|
+
var _this$props$makeStyle2, _this$props2;
|
|
67
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
68
|
+
}
|
|
69
|
+
getHeaders() {
|
|
70
|
+
const _Children$toArray = Children.toArray(this.props.children),
|
|
71
|
+
_Children$toArray2 = _slicedToArray(_Children$toArray, 1),
|
|
72
|
+
headChild = _Children$toArray2[0];
|
|
73
|
+
if (!headChild || ! /*#__PURE__*/isValidElement(headChild)) return void 0;
|
|
74
|
+
const _Children$toArray3 = Children.toArray(headChild.props.children),
|
|
75
|
+
_Children$toArray4 = _slicedToArray(_Children$toArray3, 1),
|
|
76
|
+
firstRow = _Children$toArray4[0];
|
|
77
|
+
if (!firstRow || ! /*#__PURE__*/isValidElement(firstRow)) return void 0;
|
|
78
|
+
return Children.map(firstRow.props.children, colHeader => {
|
|
79
|
+
if (! /*#__PURE__*/isValidElement(colHeader)) return void 0;
|
|
80
|
+
return colHeader.props.children;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
render() {
|
|
84
|
+
const _this$props3 = this.props,
|
|
85
|
+
margin = _this$props3.margin,
|
|
86
|
+
layout = _this$props3.layout,
|
|
87
|
+
caption = _this$props3.caption,
|
|
88
|
+
children = _this$props3.children,
|
|
89
|
+
hover = _this$props3.hover,
|
|
90
|
+
styles = _this$props3.styles,
|
|
91
|
+
minWidth = _this$props3.minWidth;
|
|
92
|
+
const isStacked = layout === 'stacked';
|
|
93
|
+
const headers = isStacked ? this.getHeaders() : void 0;
|
|
94
|
+
if (!caption) {
|
|
95
|
+
error(false, `[Table] required prop caption is not set.`);
|
|
96
|
+
}
|
|
97
|
+
return _jsx(TableContext.Provider, {
|
|
98
|
+
value: {
|
|
99
|
+
isStacked: isStacked,
|
|
100
|
+
hover: hover,
|
|
101
|
+
headers: headers
|
|
102
|
+
},
|
|
103
|
+
children: _jsxs(View
|
|
104
|
+
// All HTML props, except the ones accepted by `View` and `Table`
|
|
105
|
+
, {
|
|
106
|
+
...View.omitViewProps(omitProps(this.props, Table.allowedProps), Table),
|
|
107
|
+
minWidth: minWidth,
|
|
108
|
+
as: isStacked ? 'div' : 'table',
|
|
109
|
+
margin: margin,
|
|
110
|
+
elementRef: this.handleRef,
|
|
111
|
+
css: styles === null || styles === void 0 ? void 0 : styles.table,
|
|
112
|
+
role: isStacked ? 'table' : void 0,
|
|
113
|
+
"aria-label": isStacked ? caption : void 0,
|
|
114
|
+
children: [!isStacked && _jsx("caption", {
|
|
115
|
+
children: _jsx(ScreenReaderContent, {
|
|
116
|
+
children: caption
|
|
117
|
+
})
|
|
118
|
+
}), Children.map(children, child => {
|
|
119
|
+
if (/*#__PURE__*/isValidElement(child)) {
|
|
120
|
+
return safeCloneElement(child, {
|
|
121
|
+
key: child.props.name
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
return child;
|
|
125
|
+
})]
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}, _Table.displayName = "Table", _Table.componentId = 'Table', _Table.allowedProps = allowedProps, _Table.defaultProps = {
|
|
130
|
+
children: null,
|
|
131
|
+
hover: false,
|
|
132
|
+
layout: 'auto'
|
|
133
|
+
}, _Table.Head = Head, _Table.Body = Body, _Table.Row = Row, _Table.ColHeader = ColHeader, _Table.RowHeader = RowHeader, _Table.Cell = Cell, _Table)) || _class);
|
|
134
|
+
export default Table;
|
|
135
|
+
export { Table };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
const allowedProps = ['caption', 'children', 'margin', 'elementRef', 'hover', 'layout'];
|
|
26
|
+
export { allowedProps };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* ---
|
|
27
|
+
* private: true
|
|
28
|
+
* ---
|
|
29
|
+
* Generates the style object from the theme and provided additional information
|
|
30
|
+
* @param {Object} componentTheme The theme variable object.
|
|
31
|
+
* @param {Object} props the props of the component, the style is applied to
|
|
32
|
+
* @param {Object} sharedTokens Shared token object
|
|
33
|
+
* @return {Object} The final style object, which will be used in the component
|
|
34
|
+
*/
|
|
35
|
+
const generateStyle = (componentTheme, props, _sharedTokens) => {
|
|
36
|
+
const layout = props.layout;
|
|
37
|
+
return {
|
|
38
|
+
table: {
|
|
39
|
+
label: 'table',
|
|
40
|
+
fontSize: componentTheme.fontSize,
|
|
41
|
+
fontFamily: componentTheme.fontFamily,
|
|
42
|
+
fontWeight: componentTheme.fontWeight,
|
|
43
|
+
color: componentTheme.color,
|
|
44
|
+
background: componentTheme.background,
|
|
45
|
+
display: 'table',
|
|
46
|
+
width: '100%',
|
|
47
|
+
borderCollapse: 'collapse',
|
|
48
|
+
borderSpacing: 0,
|
|
49
|
+
...(layout === 'fixed' && {
|
|
50
|
+
tableLayout: 'fixed'
|
|
51
|
+
}),
|
|
52
|
+
caption: {
|
|
53
|
+
textAlign: 'start'
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export default generateStyle;
|
package/es/exports/a.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
export { Table } from "../Table/v1/index.js";
|
|
25
|
+
export { TableContext } from "../Table/v1/TableContext.js";
|
|
26
|
+
export { Body as TableBody } from "../Table/v1/Body/index.js";
|
|
27
|
+
export { Cell as TableCell } from "../Table/v1/Cell/index.js";
|
|
28
|
+
export { ColHeader as TableColHeader } from "../Table/v1/ColHeader/index.js";
|
|
29
|
+
export { Head as TableHead } from "../Table/v1/Head/index.js";
|
|
30
|
+
export { Row as TableRow } from "../Table/v1/Row/index.js";
|
|
31
|
+
export { RowHeader as TableRowHeader } from "../Table/v1/RowHeader/index.js";
|
package/es/exports/b.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
export { Table } from "../Table/v2/index.js";
|
|
25
|
+
export { TableContext } from "../Table/v2/TableContext.js";
|
|
26
|
+
export { Body as TableBody } from "../Table/v2/Body/index.js";
|
|
27
|
+
export { Cell as TableCell } from "../Table/v2/Cell/index.js";
|
|
28
|
+
export { ColHeader as TableColHeader } from "../Table/v2/ColHeader/index.js";
|
|
29
|
+
export { Head as TableHead } from "../Table/v2/Head/index.js";
|
|
30
|
+
export { Row as TableRow } from "../Table/v2/Row/index.js";
|
|
31
|
+
export { RowHeader as TableRowHeader } from "../Table/v2/RowHeader/index.js";
|
|
@@ -8,7 +8,7 @@ exports.default = exports.Body = void 0;
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
10
10
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
11
|
-
var
|
|
11
|
+
var _v11_ = require("@instructure/ui-view/v11_6");
|
|
12
12
|
var _emotion = require("@instructure/emotion");
|
|
13
13
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
14
14
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -45,7 +45,7 @@ parent: Table
|
|
|
45
45
|
id: Table.Body
|
|
46
46
|
---
|
|
47
47
|
**/
|
|
48
|
-
let Body = exports.Body = (_dec = (0, _emotion.
|
|
48
|
+
let Body = exports.Body = (_dec = (0, _emotion.withStyleLegacy)(_styles.default, _theme.default), _dec(_class = (_Body = class Body extends _react.Component {
|
|
49
49
|
componentDidMount() {
|
|
50
50
|
var _this$props$makeStyle, _this$props;
|
|
51
51
|
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
@@ -59,8 +59,8 @@ let Body = exports.Body = (_dec = (0, _emotion.withStyle)(_styles.default, _them
|
|
|
59
59
|
children = _this$props3.children,
|
|
60
60
|
styles = _this$props3.styles;
|
|
61
61
|
const isStacked = this.context.isStacked;
|
|
62
|
-
return (0, _jsxRuntime.jsx)(
|
|
63
|
-
...
|
|
62
|
+
return (0, _jsxRuntime.jsx)(_v11_.View, {
|
|
63
|
+
..._v11_.View.omitViewProps((0, _omitProps.omitProps)(this.props, Body.allowedProps), Body),
|
|
64
64
|
as: isStacked ? 'div' : 'tbody',
|
|
65
65
|
css: styles === null || styles === void 0 ? void 0 : styles.body,
|
|
66
66
|
role: isStacked ? 'rowgroup' : void 0,
|
|
@@ -8,7 +8,7 @@ exports.default = exports.Cell = void 0;
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
10
10
|
var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
|
|
11
|
-
var
|
|
11
|
+
var _v11_ = require("@instructure/ui-view/v11_6");
|
|
12
12
|
var _emotion = require("@instructure/emotion");
|
|
13
13
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
14
14
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -45,7 +45,7 @@ parent: Table
|
|
|
45
45
|
id: Table.Cell
|
|
46
46
|
---
|
|
47
47
|
**/
|
|
48
|
-
let Cell = exports.Cell = (_dec = (0, _emotion.
|
|
48
|
+
let Cell = exports.Cell = (_dec = (0, _emotion.withStyleLegacy)(_styles.default, _theme.default), _dec(_class = (_Cell = class Cell extends _react.Component {
|
|
49
49
|
componentDidMount() {
|
|
50
50
|
var _this$props$makeStyle, _this$props;
|
|
51
51
|
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
@@ -60,8 +60,8 @@ let Cell = exports.Cell = (_dec = (0, _emotion.withStyle)(_styles.default, _them
|
|
|
60
60
|
styles = _this$props3.styles,
|
|
61
61
|
header = _this$props3.header;
|
|
62
62
|
const isStacked = this.context.isStacked;
|
|
63
|
-
return (0, _jsxRuntime.jsxs)(
|
|
64
|
-
...
|
|
63
|
+
return (0, _jsxRuntime.jsxs)(_v11_.View, {
|
|
64
|
+
..._v11_.View.omitViewProps((0, _omitProps.omitProps)(this.props, Cell.allowedProps), Cell),
|
|
65
65
|
as: isStacked ? 'div' : 'td',
|
|
66
66
|
css: styles === null || styles === void 0 ? void 0 : styles.cell,
|
|
67
67
|
role: isStacked ? 'cell' : void 0,
|
|
@@ -8,9 +8,9 @@ exports.default = exports.ColHeader = void 0;
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
10
10
|
var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
|
|
11
|
-
var _IconMiniArrowUpLine = require("@instructure/ui-icons/lib/IconMiniArrowUpLine.js");
|
|
12
|
-
var _IconMiniArrowDownLine = require("@instructure/ui-icons/lib/IconMiniArrowDownLine.js");
|
|
13
|
-
var _IconMiniArrowDoubleLine = require("@instructure/ui-icons/lib/IconMiniArrowDoubleLine.js");
|
|
11
|
+
var _IconMiniArrowUpLine = require("@instructure/ui-icons/lib/generated/IconMiniArrowUpLine.js");
|
|
12
|
+
var _IconMiniArrowDownLine = require("@instructure/ui-icons/lib/generated/IconMiniArrowDownLine.js");
|
|
13
|
+
var _IconMiniArrowDoubleLine = require("@instructure/ui-icons/lib/generated/IconMiniArrowDoubleLine.js");
|
|
14
14
|
var _emotion = require("@instructure/emotion");
|
|
15
15
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
16
16
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -46,7 +46,7 @@ parent: Table
|
|
|
46
46
|
id: Table.ColHeader
|
|
47
47
|
---
|
|
48
48
|
**/
|
|
49
|
-
let ColHeader = exports.ColHeader = (_dec = (0, _emotion.
|
|
49
|
+
let ColHeader = exports.ColHeader = (_dec = (0, _emotion.withStyleLegacy)(_styles.default, _theme.default), _dec(_class = (_ColHeader = class ColHeader extends _react.Component {
|
|
50
50
|
constructor(...args) {
|
|
51
51
|
super(...args);
|
|
52
52
|
this.handleClick = event => {
|
|
@@ -9,9 +9,9 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
11
11
|
var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
|
|
12
|
-
var
|
|
12
|
+
var _v11_ = require("@instructure/ui-simple-select/v11_6");
|
|
13
13
|
var _ScreenReaderContent2 = require("@instructure/ui-a11y-content/lib/ScreenReaderContent");
|
|
14
|
-
var _IconCheckLine = require("@instructure/ui-icons/lib/IconCheckLine.js");
|
|
14
|
+
var _IconCheckLine = require("@instructure/ui-icons/lib/generated/IconCheckLine.js");
|
|
15
15
|
var _console = require("@instructure/console");
|
|
16
16
|
var _emotion = require("@instructure/emotion");
|
|
17
17
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
@@ -49,7 +49,7 @@ parent: Table
|
|
|
49
49
|
id: Table.Head
|
|
50
50
|
---
|
|
51
51
|
**/
|
|
52
|
-
let Head = exports.Head = (_dec = (0, _emotion.
|
|
52
|
+
let Head = exports.Head = (_dec = (0, _emotion.withStyleLegacy)(_styles.default, _theme.default), _dec(_class = (_Head = class Head extends _react.Component {
|
|
53
53
|
/**
|
|
54
54
|
* Returns `true` if the first child's children have a `onRequestSort` prop
|
|
55
55
|
*/
|
|
@@ -140,7 +140,7 @@ let Head = exports.Head = (_dec = (0, _emotion.withStyle)(_styles.default, _them
|
|
|
140
140
|
children: (0, _jsxRuntime.jsx)("div", {
|
|
141
141
|
role: "cell",
|
|
142
142
|
"aria-colspan": count,
|
|
143
|
-
children: (0, _jsxRuntime.jsx)(
|
|
143
|
+
children: (0, _jsxRuntime.jsx)(_v11_.SimpleSelect, {
|
|
144
144
|
renderLabel: renderSortLabel ? (0, _callRenderProp.callRenderProp)(renderSortLabel) : _ScreenReaderContent || (_ScreenReaderContent = (0, _jsxRuntime.jsx)(_ScreenReaderContent2.ScreenReaderContent, {})),
|
|
145
145
|
renderBeforeInput: selectedOption && _IconCheckLine.IconCheckLine,
|
|
146
146
|
value: selectedOption,
|
|
@@ -148,7 +148,7 @@ let Head = exports.Head = (_dec = (0, _emotion.withStyle)(_styles.default, _them
|
|
|
148
148
|
children: options.map(({
|
|
149
149
|
id,
|
|
150
150
|
label
|
|
151
|
-
}) => (0, _jsxRuntime.jsx)(
|
|
151
|
+
}) => (0, _jsxRuntime.jsx)(_v11_.SimpleSelect.Option, {
|
|
152
152
|
id: id,
|
|
153
153
|
value: id,
|
|
154
154
|
renderBeforeLabel: id === selectedOption ? _IconCheckLine.IconCheckLine : () => (0, _jsxRuntime.jsx)(_IconCheckLine.IconCheckLine, {
|
|
@@ -8,7 +8,7 @@ exports.default = exports.Row = void 0;
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
10
10
|
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
11
|
-
var
|
|
11
|
+
var _v11_ = require("@instructure/ui-view/v11_6");
|
|
12
12
|
var _emotion = require("@instructure/emotion");
|
|
13
13
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
14
14
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -45,7 +45,7 @@ parent: Table
|
|
|
45
45
|
id: Table.Row
|
|
46
46
|
---
|
|
47
47
|
**/
|
|
48
|
-
let Row = exports.Row = (_dec = (0, _emotion.
|
|
48
|
+
let Row = exports.Row = (_dec = (0, _emotion.withStyleLegacy)(_styles.default, _theme.default), _dec(_class = (_Row = class Row extends _react.Component {
|
|
49
49
|
componentDidMount() {
|
|
50
50
|
var _this$props$makeStyle, _this$props;
|
|
51
51
|
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props, {
|
|
@@ -66,8 +66,8 @@ let Row = exports.Row = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
|
|
|
66
66
|
styles = _this$props3.styles;
|
|
67
67
|
const isStacked = this.context.isStacked;
|
|
68
68
|
const headers = this.context.headers;
|
|
69
|
-
return (0, _jsxRuntime.jsx)(
|
|
70
|
-
...
|
|
69
|
+
return (0, _jsxRuntime.jsx)(_v11_.View, {
|
|
70
|
+
..._v11_.View.omitViewProps((0, _omitProps.omitProps)(this.props, Row.allowedProps), Row),
|
|
71
71
|
as: isStacked ? 'div' : 'tr',
|
|
72
72
|
css: styles === null || styles === void 0 ? void 0 : styles.row,
|
|
73
73
|
role: isStacked ? 'row' : void 0,
|
|
@@ -8,7 +8,7 @@ exports.default = exports.RowHeader = void 0;
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
10
10
|
var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
|
|
11
|
-
var
|
|
11
|
+
var _v11_ = require("@instructure/ui-view/v11_6");
|
|
12
12
|
var _emotion = require("@instructure/emotion");
|
|
13
13
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
14
14
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -45,7 +45,7 @@ parent: Table
|
|
|
45
45
|
id: Table.RowHeader
|
|
46
46
|
---
|
|
47
47
|
**/
|
|
48
|
-
let RowHeader = exports.RowHeader = (_dec = (0, _emotion.
|
|
48
|
+
let RowHeader = exports.RowHeader = (_dec = (0, _emotion.withStyleLegacy)(_styles.default, _theme.default), _dec(_class = (_RowHeader = class RowHeader extends _react.Component {
|
|
49
49
|
componentDidMount() {
|
|
50
50
|
var _this$props$makeStyle, _this$props;
|
|
51
51
|
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
@@ -59,8 +59,8 @@ let RowHeader = exports.RowHeader = (_dec = (0, _emotion.withStyle)(_styles.defa
|
|
|
59
59
|
children = _this$props3.children,
|
|
60
60
|
styles = _this$props3.styles;
|
|
61
61
|
const isStacked = this.context.isStacked;
|
|
62
|
-
return (0, _jsxRuntime.jsx)(
|
|
63
|
-
...
|
|
62
|
+
return (0, _jsxRuntime.jsx)(_v11_.View, {
|
|
63
|
+
..._v11_.View.omitViewProps((0, _omitProps.omitProps)(this.props, RowHeader.allowedProps), RowHeader),
|
|
64
64
|
as: isStacked ? 'div' : 'th',
|
|
65
65
|
css: styles === null || styles === void 0 ? void 0 : styles.rowHeader,
|
|
66
66
|
scope: "row",
|
|
@@ -9,7 +9,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
11
11
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
12
|
-
var
|
|
12
|
+
var _v11_ = require("@instructure/ui-view/v11_6");
|
|
13
13
|
var _ScreenReaderContent = require("@instructure/ui-a11y-content/lib/ScreenReaderContent");
|
|
14
14
|
var _emotion = require("@instructure/emotion");
|
|
15
15
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
@@ -53,7 +53,7 @@ var _dec, _class, _Table;
|
|
|
53
53
|
category: components
|
|
54
54
|
---
|
|
55
55
|
**/
|
|
56
|
-
let Table = exports.Table = (_dec = (0, _emotion.
|
|
56
|
+
let Table = exports.Table = (_dec = (0, _emotion.withStyleLegacy)(_styles.default, _theme.default), _dec(_class = (_Table = class Table extends _react.Component {
|
|
57
57
|
constructor(...args) {
|
|
58
58
|
super(...args);
|
|
59
59
|
this.ref = null;
|
|
@@ -107,10 +107,10 @@ let Table = exports.Table = (_dec = (0, _emotion.withStyle)(_styles.default, _th
|
|
|
107
107
|
hover: hover,
|
|
108
108
|
headers: headers
|
|
109
109
|
},
|
|
110
|
-
children: (0, _jsxRuntime.jsxs)(
|
|
110
|
+
children: (0, _jsxRuntime.jsxs)(_v11_.View
|
|
111
111
|
// All HTML props, except the ones accepted by `View` and `Table`
|
|
112
112
|
, {
|
|
113
|
-
...
|
|
113
|
+
..._v11_.View.omitViewProps((0, _omitProps.omitProps)(this.props, Table.allowedProps), Table),
|
|
114
114
|
minWidth: minWidth,
|
|
115
115
|
as: isStacked ? 'div' : 'table',
|
|
116
116
|
margin: margin,
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.Body = void 0;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
10
|
+
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
11
|
+
var _latest = require("@instructure/ui-view/latest");
|
|
12
|
+
var _emotion = require("@instructure/emotion");
|
|
13
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
14
|
+
var _props = require("./props");
|
|
15
|
+
var _TableContext = _interopRequireDefault(require("../TableContext"));
|
|
16
|
+
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
17
|
+
var _dec, _class, _Body;
|
|
18
|
+
/*
|
|
19
|
+
* The MIT License (MIT)
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
22
|
+
*
|
|
23
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
24
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
25
|
+
* in the Software without restriction, including without limitation the rights
|
|
26
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
27
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
28
|
+
* furnished to do so, subject to the following conditions:
|
|
29
|
+
*
|
|
30
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
31
|
+
* copies or substantial portions of the Software.
|
|
32
|
+
*
|
|
33
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
34
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
35
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
36
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
37
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
38
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
39
|
+
* SOFTWARE.
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
---
|
|
43
|
+
parent: Table
|
|
44
|
+
id: Table.Body
|
|
45
|
+
---
|
|
46
|
+
**/
|
|
47
|
+
let Body = exports.Body = (_dec = (0, _emotion.withStyle)(_styles.default), _dec(_class = (_Body = class Body extends _react.Component {
|
|
48
|
+
componentDidMount() {
|
|
49
|
+
var _this$props$makeStyle, _this$props;
|
|
50
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
51
|
+
}
|
|
52
|
+
componentDidUpdate() {
|
|
53
|
+
var _this$props$makeStyle2, _this$props2;
|
|
54
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
const _this$props3 = this.props,
|
|
58
|
+
children = _this$props3.children,
|
|
59
|
+
styles = _this$props3.styles;
|
|
60
|
+
const isStacked = this.context.isStacked;
|
|
61
|
+
return (0, _jsxRuntime.jsx)(_latest.View, {
|
|
62
|
+
..._latest.View.omitViewProps((0, _omitProps.omitProps)(this.props, Body.allowedProps), Body),
|
|
63
|
+
as: isStacked ? 'div' : 'tbody',
|
|
64
|
+
css: styles === null || styles === void 0 ? void 0 : styles.body,
|
|
65
|
+
role: isStacked ? 'rowgroup' : void 0,
|
|
66
|
+
children: _react.Children.map(children, child => {
|
|
67
|
+
if (/*#__PURE__*/(0, _react.isValidElement)(child)) {
|
|
68
|
+
return (0, _safeCloneElement.safeCloneElement)(child, {
|
|
69
|
+
key: child.props.name
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return child;
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}, _Body.displayName = "Body", _Body.componentId = 'Table.Body', _Body.contextType = _TableContext.default, _Body.allowedProps = _props.allowedProps, _Body.defaultProps = {
|
|
77
|
+
children: null
|
|
78
|
+
}, _Body)) || _class);
|
|
79
|
+
var _default = exports.default = Body;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.allowedProps = void 0;
|
|
7
|
+
/*
|
|
8
|
+
* The MIT License (MIT)
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
11
|
+
*
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
* in the Software without restriction, including without limitation the rights
|
|
15
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
* furnished to do so, subject to the following conditions:
|
|
18
|
+
*
|
|
19
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
* copies or substantial portions of the Software.
|
|
21
|
+
*
|
|
22
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
* SOFTWARE.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
const allowedProps = exports.allowedProps = ['children'];
|