@workday/canvas-kit-preview-react 11.0.0-alpha.707-next.0 → 11.0.0-alpha.708-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/index.d.ts +0 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +0 -1
- package/dist/es6/index.d.ts +0 -1
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +0 -1
- package/index.ts +0 -1
- package/package.json +4 -4
- package/dist/commonjs/table/index.d.ts +0 -2
- package/dist/commonjs/table/index.d.ts.map +0 -1
- package/dist/commonjs/table/index.js +0 -13
- package/dist/commonjs/table/lib/Table.d.ts +0 -207
- package/dist/commonjs/table/lib/Table.d.ts.map +0 -1
- package/dist/commonjs/table/lib/Table.js +0 -233
- package/dist/commonjs/table/lib/TableBody.d.ts +0 -2
- package/dist/commonjs/table/lib/TableBody.d.ts.map +0 -1
- package/dist/commonjs/table/lib/TableBody.js +0 -19
- package/dist/commonjs/table/lib/TableCaption.d.ts +0 -2
- package/dist/commonjs/table/lib/TableCaption.d.ts.map +0 -1
- package/dist/commonjs/table/lib/TableCaption.js +0 -20
- package/dist/commonjs/table/lib/TableCell.d.ts +0 -2
- package/dist/commonjs/table/lib/TableCell.d.ts.map +0 -1
- package/dist/commonjs/table/lib/TableCell.js +0 -20
- package/dist/commonjs/table/lib/TableFooter.d.ts +0 -2
- package/dist/commonjs/table/lib/TableFooter.d.ts.map +0 -1
- package/dist/commonjs/table/lib/TableFooter.js +0 -19
- package/dist/commonjs/table/lib/TableHead.d.ts +0 -2
- package/dist/commonjs/table/lib/TableHead.d.ts.map +0 -1
- package/dist/commonjs/table/lib/TableHead.js +0 -20
- package/dist/commonjs/table/lib/TableHeader.d.ts +0 -2
- package/dist/commonjs/table/lib/TableHeader.d.ts.map +0 -1
- package/dist/commonjs/table/lib/TableHeader.js +0 -20
- package/dist/commonjs/table/lib/TableRow.d.ts +0 -2
- package/dist/commonjs/table/lib/TableRow.d.ts.map +0 -1
- package/dist/commonjs/table/lib/TableRow.js +0 -29
- package/dist/es6/table/index.d.ts +0 -2
- package/dist/es6/table/index.d.ts.map +0 -1
- package/dist/es6/table/index.js +0 -1
- package/dist/es6/table/lib/Table.d.ts +0 -207
- package/dist/es6/table/lib/Table.d.ts.map +0 -1
- package/dist/es6/table/lib/Table.js +0 -227
- package/dist/es6/table/lib/TableBody.d.ts +0 -2
- package/dist/es6/table/lib/TableBody.d.ts.map +0 -1
- package/dist/es6/table/lib/TableBody.js +0 -13
- package/dist/es6/table/lib/TableCaption.d.ts +0 -2
- package/dist/es6/table/lib/TableCaption.d.ts.map +0 -1
- package/dist/es6/table/lib/TableCaption.js +0 -14
- package/dist/es6/table/lib/TableCell.d.ts +0 -2
- package/dist/es6/table/lib/TableCell.d.ts.map +0 -1
- package/dist/es6/table/lib/TableCell.js +0 -14
- package/dist/es6/table/lib/TableFooter.d.ts +0 -2
- package/dist/es6/table/lib/TableFooter.d.ts.map +0 -1
- package/dist/es6/table/lib/TableFooter.js +0 -13
- package/dist/es6/table/lib/TableHead.d.ts +0 -2
- package/dist/es6/table/lib/TableHead.d.ts.map +0 -1
- package/dist/es6/table/lib/TableHead.js +0 -14
- package/dist/es6/table/lib/TableHeader.d.ts +0 -2
- package/dist/es6/table/lib/TableHeader.d.ts.map +0 -1
- package/dist/es6/table/lib/TableHeader.js +0 -14
- package/dist/es6/table/lib/TableRow.d.ts +0 -2
- package/dist/es6/table/lib/TableRow.d.ts.map +0 -1
- package/dist/es6/table/lib/TableRow.js +0 -23
- package/table/LICENSE +0 -51
- package/table/README.md +0 -5
- package/table/index.ts +0 -1
- package/table/lib/Table.tsx +0 -241
- package/table/lib/TableBody.tsx +0 -42
- package/table/lib/TableCaption.tsx +0 -25
- package/table/lib/TableCell.tsx +0 -31
- package/table/lib/TableFooter.tsx +0 -22
- package/table/lib/TableHead.tsx +0 -33
- package/table/lib/TableHeader.tsx +0 -31
- package/table/lib/TableRow.tsx +0 -41
- package/table/package.json +0 -6
package/dist/commonjs/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
package/dist/commonjs/index.js
CHANGED
package/dist/es6/index.d.ts
CHANGED
package/dist/es6/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
package/dist/es6/index.js
CHANGED
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-preview-react",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.708-next.0",
|
|
4
4
|
"description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@emotion/react": "^11.7.1",
|
|
48
48
|
"@emotion/styled": "^11.6.0",
|
|
49
|
-
"@workday/canvas-kit-react": "^11.0.0-alpha.
|
|
50
|
-
"@workday/canvas-kit-styling": "^11.0.0-alpha.
|
|
49
|
+
"@workday/canvas-kit-react": "^11.0.0-alpha.708-next.0",
|
|
50
|
+
"@workday/canvas-kit-styling": "^11.0.0-alpha.708-next.0",
|
|
51
51
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
52
52
|
"@workday/canvas-tokens-web": "^1.0.2",
|
|
53
53
|
"@workday/design-assets-types": "^0.2.8"
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"react-hook-form": "7.36.1",
|
|
59
59
|
"yup": "^0.32.11"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "c88b748b4f8ad105e0cc48bd7b67716841abe30d"
|
|
62
62
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../table/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./lib/Table"), exports);
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `Table` is a simple styled compound component that renders a [table](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) element. It is used to present information in a two-dimensional table comprised of rows and columns of cells containing data.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* ```tsx
|
|
6
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
7
|
-
|
|
8
|
-
export default function App() {
|
|
9
|
-
return (
|
|
10
|
-
<Table>
|
|
11
|
-
<Table.Caption>Table Caption</Table.Caption>
|
|
12
|
-
<Table.Head>
|
|
13
|
-
<Table.Row>
|
|
14
|
-
<Table.Header>Table Header</Table.Header>
|
|
15
|
-
<Table.Header>Table Header</Table.Header>
|
|
16
|
-
</Table.Row>
|
|
17
|
-
</Table.Head>
|
|
18
|
-
<Table.Body>
|
|
19
|
-
<Table.Row>
|
|
20
|
-
<Table.Header>Table Header</Table.Header>
|
|
21
|
-
<Table.Header>Table Header</Table.Header>
|
|
22
|
-
</Table.Row>
|
|
23
|
-
<Table.Row>
|
|
24
|
-
<Table.Header>Table Header</Table.Header>
|
|
25
|
-
<Table.Cell>Table Data Cell</Table.Cell>
|
|
26
|
-
</Table.Row>
|
|
27
|
-
<Table.Row>
|
|
28
|
-
<Table.Header>Table Header</Table.Header>
|
|
29
|
-
<Table.Cell>Table Data Cell</Table.Cell>
|
|
30
|
-
</Table.Row>
|
|
31
|
-
</Table.Body>
|
|
32
|
-
<Table.Footer>
|
|
33
|
-
<Table.Row>
|
|
34
|
-
<Table.Header>Table Header</Table.Header>
|
|
35
|
-
<Table.Cell>Table Data Cell</Table.Cell>
|
|
36
|
-
</Table.Row>
|
|
37
|
-
</Table.Footer>
|
|
38
|
-
</Table>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
*/
|
|
43
|
-
export declare const Table: import("@workday/canvas-kit-react/common").ElementComponent<"table", Omit<import("@workday/canvas-kit-react/layout").BoxProps, "display"> & import("@workday/canvas-kit-react/layout").GridStyleProps> & {
|
|
44
|
-
/**
|
|
45
|
-
* `Table.Caption` renders a [caption](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption) element.
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* ```tsx
|
|
49
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
50
|
-
|
|
51
|
-
export default function App() {
|
|
52
|
-
return (
|
|
53
|
-
<Table>
|
|
54
|
-
<Table.Caption>Table Caption</Table.Caption>
|
|
55
|
-
<Table.Body>
|
|
56
|
-
<Table.Row>
|
|
57
|
-
<Table.Header>Table Header</Table.Header>
|
|
58
|
-
<Table.Cell>Table Cell</Table.Cell>
|
|
59
|
-
</Table.Row>
|
|
60
|
-
</Table.Body>
|
|
61
|
-
</Table>
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
*/
|
|
66
|
-
Caption: import("@workday/canvas-kit-react/common").ElementComponent<"caption", Omit<import("@workday/canvas-kit-react/layout").BoxProps, "display"> & import("@workday/canvas-kit-react/layout").FlexStyleProps>;
|
|
67
|
-
/**
|
|
68
|
-
* `Table.Head` renders a [thead](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead) element.
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* ```tsx
|
|
72
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
73
|
-
|
|
74
|
-
export default function App() {
|
|
75
|
-
return (
|
|
76
|
-
<Table>
|
|
77
|
-
<Table.Head>
|
|
78
|
-
<Table.Row>
|
|
79
|
-
<Table.Header>Table Header</Table.Header>
|
|
80
|
-
<Table.Cell>Table Cell</Table.Cell>
|
|
81
|
-
</Table.Row>
|
|
82
|
-
</Table.Head>
|
|
83
|
-
</Table>
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
*/
|
|
88
|
-
Head: import("@workday/canvas-kit-react/common").ElementComponent<"thead", Omit<import("@workday/canvas-kit-react/layout").BoxProps, "display"> & import("@workday/canvas-kit-react/layout").GridStyleProps>;
|
|
89
|
-
/**
|
|
90
|
-
* `Table.Body` renders a [tbody](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody) element.
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* ```tsx
|
|
94
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
95
|
-
|
|
96
|
-
export default function App() {
|
|
97
|
-
return (
|
|
98
|
-
<Table>
|
|
99
|
-
<Table.Body>
|
|
100
|
-
<Table.Row>
|
|
101
|
-
<Table.Header>Table Header</Table.Header>
|
|
102
|
-
<Table.Cell>Table Cell</Table.Cell>
|
|
103
|
-
</Table.Row>
|
|
104
|
-
</Table.Body>
|
|
105
|
-
</Table>
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
```
|
|
109
|
-
*/
|
|
110
|
-
Body: import("@workday/canvas-kit-react/common").ElementComponent<"tbody", Omit<import("@workday/canvas-kit-react/layout").BoxProps, "display"> & import("@workday/canvas-kit-react/layout").GridStyleProps>;
|
|
111
|
-
/**
|
|
112
|
-
* `Table.Row` renders a [tr](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr) element.
|
|
113
|
-
*
|
|
114
|
-
* **Note**: `Table.Row` is built on [Grid](/docs/components-layout-grid--basic). It will look for
|
|
115
|
-
* how many children are there and if those children are valid React Elements. This will adjust the
|
|
116
|
-
* amount of columns automatically using the `gridTemplateColumns` style prop and the width of the
|
|
117
|
-
* columns is also set using a `minmax` function in the `gridTemplateColumns` style prop. If a user
|
|
118
|
-
* would like to adjust this, it can be overwritten on `Table.Row`. See the example below for how to
|
|
119
|
-
* overwrite `gridTemplateColumns`.
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* ```tsx
|
|
123
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
124
|
-
|
|
125
|
-
export default function App() {
|
|
126
|
-
return (
|
|
127
|
-
<Table>
|
|
128
|
-
<Table.Head>
|
|
129
|
-
<Table.Row gridTemplateColumns="repeat(4, minmax(100px, 1fr))">
|
|
130
|
-
<Table.Header>Table Header</Table.Header>
|
|
131
|
-
<Table.Cell>Table Cell</Table.Cell>
|
|
132
|
-
</Table.Row>
|
|
133
|
-
</Table.Head>
|
|
134
|
-
</Table>
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
```
|
|
138
|
-
*/
|
|
139
|
-
Row: import("@workday/canvas-kit-react/common").ElementComponent<"tr", Omit<import("@workday/canvas-kit-react/layout").BoxProps, "display"> & import("@workday/canvas-kit-react/layout").GridStyleProps>;
|
|
140
|
-
/**
|
|
141
|
-
* `Table.Header` renders a [th](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th) element.
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* ```tsx
|
|
145
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
146
|
-
|
|
147
|
-
export default function App() {
|
|
148
|
-
return (
|
|
149
|
-
<Table>
|
|
150
|
-
<Table.Head>
|
|
151
|
-
<Table.Row>
|
|
152
|
-
<Table.Header>Table Header</Table.Header>
|
|
153
|
-
<Table.Cell>Table Cell</Table.Cell>
|
|
154
|
-
</Table.Row>
|
|
155
|
-
</Table.Head>
|
|
156
|
-
</Table>
|
|
157
|
-
);
|
|
158
|
-
}
|
|
159
|
-
```
|
|
160
|
-
*/
|
|
161
|
-
Header: import("@workday/canvas-kit-react/common").ElementComponent<"th", Omit<import("@workday/canvas-kit-react/layout").BoxProps, "display"> & import("@workday/canvas-kit-react/layout").GridStyleProps>;
|
|
162
|
-
/**
|
|
163
|
-
* `Table.Cell` renders a [td](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td) element.
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
* ```tsx
|
|
167
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
168
|
-
|
|
169
|
-
export default function App() {
|
|
170
|
-
return (
|
|
171
|
-
<Table>
|
|
172
|
-
<Table.Body>
|
|
173
|
-
<Table.Row>
|
|
174
|
-
<Table.Header>Table Header</Table.Header>
|
|
175
|
-
<Table.Cell>Table Cell</Table.Cell>
|
|
176
|
-
</Table.Row>
|
|
177
|
-
</Table.Body>
|
|
178
|
-
</Table>
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
```
|
|
182
|
-
*/
|
|
183
|
-
Cell: import("@workday/canvas-kit-react/common").ElementComponent<"td", Omit<import("@workday/canvas-kit-react/layout").BoxProps, "display"> & import("@workday/canvas-kit-react/layout").GridStyleProps>;
|
|
184
|
-
/**
|
|
185
|
-
* `Table.Footer` renders a [tfoot](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot) element.
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
* ```tsx
|
|
189
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
190
|
-
|
|
191
|
-
export default function App() {
|
|
192
|
-
return (
|
|
193
|
-
<Table>
|
|
194
|
-
<Table.Footer>
|
|
195
|
-
<Table.Row>
|
|
196
|
-
<Table.Header>Table Header</Table.Header>
|
|
197
|
-
<Table.Cell>Table Cell</Table.Cell>
|
|
198
|
-
</Table.Row>
|
|
199
|
-
</Table.Footer>
|
|
200
|
-
</Table>
|
|
201
|
-
);
|
|
202
|
-
}
|
|
203
|
-
```
|
|
204
|
-
*/
|
|
205
|
-
Footer: import("@workday/canvas-kit-react/common").ElementComponent<"tfoot", Omit<import("@workday/canvas-kit-react/layout").BoxProps, "display"> & import("@workday/canvas-kit-react/layout").GridStyleProps>;
|
|
206
|
-
};
|
|
207
|
-
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../table/lib/Table.tsx"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,KAAK;IAUd;;;;;;;;;;;;;;;;;;;;;MAqBE;;IAEF;;;;;;;;;;;;;;;;;;;;MAoBE;;IAEF;;;;;;;;;;;;;;;;;;;;MAoBE;;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2BE;;IAEF;;;;;;;;;;;;;;;;;;;;MAoBE;;IAEF;;;;;;;;;;;;;;;;;;;;MAoBE;;IAEF;;;;;;;;;;;;;;;;;;;;MAoBE;;CAGJ,CAAC"}
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Table = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
9
|
-
const common_1 = require("@workday/canvas-kit-react/common");
|
|
10
|
-
const TableHead_1 = require("./TableHead");
|
|
11
|
-
const TableBody_1 = require("./TableBody");
|
|
12
|
-
const TableRow_1 = require("./TableRow");
|
|
13
|
-
const TableHeader_1 = require("./TableHeader");
|
|
14
|
-
const TableCell_1 = require("./TableCell");
|
|
15
|
-
const TableFooter_1 = require("./TableFooter");
|
|
16
|
-
const TableCaption_1 = require("./TableCaption");
|
|
17
|
-
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
18
|
-
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
19
|
-
const tableStencil = canvas_kit_styling_1.createStencil({
|
|
20
|
-
base: { name: "1jt00fi", styles: "font-family:var(--cnvs-base-font-family-50, \"Roboto\");font-weight:var(--cnvs-base-font-weight-400, 400);line-height:var(--cnvs-base-line-height-100, 1.25rem);font-size:var(--cnvs-base-font-size-75, 0.875rem);letter-spacing:var(--cnvs-base-letter-spacing-150, 0.015rem);display:grid;border:0.0625rem solid var(--cnvs-base-palette-soap-500, rgba(206,211,217,1));border-radius:var(--cnvs-sys-shape-x2, calc(0.25rem * 2));overflow:auto;color:var(--cnvs-base-palette-black-pepper-300, rgba(73,73,73,1));box-sizing:border-box;" }
|
|
21
|
-
}, "table");
|
|
22
|
-
/**
|
|
23
|
-
* `Table` is a simple styled compound component that renders a [table](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) element. It is used to present information in a two-dimensional table comprised of rows and columns of cells containing data.
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* ```tsx
|
|
27
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
28
|
-
|
|
29
|
-
export default function App() {
|
|
30
|
-
return (
|
|
31
|
-
<Table>
|
|
32
|
-
<Table.Caption>Table Caption</Table.Caption>
|
|
33
|
-
<Table.Head>
|
|
34
|
-
<Table.Row>
|
|
35
|
-
<Table.Header>Table Header</Table.Header>
|
|
36
|
-
<Table.Header>Table Header</Table.Header>
|
|
37
|
-
</Table.Row>
|
|
38
|
-
</Table.Head>
|
|
39
|
-
<Table.Body>
|
|
40
|
-
<Table.Row>
|
|
41
|
-
<Table.Header>Table Header</Table.Header>
|
|
42
|
-
<Table.Header>Table Header</Table.Header>
|
|
43
|
-
</Table.Row>
|
|
44
|
-
<Table.Row>
|
|
45
|
-
<Table.Header>Table Header</Table.Header>
|
|
46
|
-
<Table.Cell>Table Data Cell</Table.Cell>
|
|
47
|
-
</Table.Row>
|
|
48
|
-
<Table.Row>
|
|
49
|
-
<Table.Header>Table Header</Table.Header>
|
|
50
|
-
<Table.Cell>Table Data Cell</Table.Cell>
|
|
51
|
-
</Table.Row>
|
|
52
|
-
</Table.Body>
|
|
53
|
-
<Table.Footer>
|
|
54
|
-
<Table.Row>
|
|
55
|
-
<Table.Header>Table Header</Table.Header>
|
|
56
|
-
<Table.Cell>Table Data Cell</Table.Cell>
|
|
57
|
-
</Table.Row>
|
|
58
|
-
</Table.Footer>
|
|
59
|
-
</Table>
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
*/
|
|
64
|
-
exports.Table = common_1.createComponent('table')({
|
|
65
|
-
displayName: 'Table',
|
|
66
|
-
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
67
|
-
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, tableStencil())), children));
|
|
68
|
-
},
|
|
69
|
-
subComponents: {
|
|
70
|
-
/**
|
|
71
|
-
* `Table.Caption` renders a [caption](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption) element.
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* ```tsx
|
|
75
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
76
|
-
|
|
77
|
-
export default function App() {
|
|
78
|
-
return (
|
|
79
|
-
<Table>
|
|
80
|
-
<Table.Caption>Table Caption</Table.Caption>
|
|
81
|
-
<Table.Body>
|
|
82
|
-
<Table.Row>
|
|
83
|
-
<Table.Header>Table Header</Table.Header>
|
|
84
|
-
<Table.Cell>Table Cell</Table.Cell>
|
|
85
|
-
</Table.Row>
|
|
86
|
-
</Table.Body>
|
|
87
|
-
</Table>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
```
|
|
91
|
-
*/
|
|
92
|
-
Caption: TableCaption_1.TableCaption,
|
|
93
|
-
/**
|
|
94
|
-
* `Table.Head` renders a [thead](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead) element.
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* ```tsx
|
|
98
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
99
|
-
|
|
100
|
-
export default function App() {
|
|
101
|
-
return (
|
|
102
|
-
<Table>
|
|
103
|
-
<Table.Head>
|
|
104
|
-
<Table.Row>
|
|
105
|
-
<Table.Header>Table Header</Table.Header>
|
|
106
|
-
<Table.Cell>Table Cell</Table.Cell>
|
|
107
|
-
</Table.Row>
|
|
108
|
-
</Table.Head>
|
|
109
|
-
</Table>
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
*/
|
|
114
|
-
Head: TableHead_1.TableHead,
|
|
115
|
-
/**
|
|
116
|
-
* `Table.Body` renders a [tbody](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody) element.
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* ```tsx
|
|
120
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
121
|
-
|
|
122
|
-
export default function App() {
|
|
123
|
-
return (
|
|
124
|
-
<Table>
|
|
125
|
-
<Table.Body>
|
|
126
|
-
<Table.Row>
|
|
127
|
-
<Table.Header>Table Header</Table.Header>
|
|
128
|
-
<Table.Cell>Table Cell</Table.Cell>
|
|
129
|
-
</Table.Row>
|
|
130
|
-
</Table.Body>
|
|
131
|
-
</Table>
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
```
|
|
135
|
-
*/
|
|
136
|
-
Body: TableBody_1.TableBody,
|
|
137
|
-
/**
|
|
138
|
-
* `Table.Row` renders a [tr](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr) element.
|
|
139
|
-
*
|
|
140
|
-
* **Note**: `Table.Row` is built on [Grid](/docs/components-layout-grid--basic). It will look for
|
|
141
|
-
* how many children are there and if those children are valid React Elements. This will adjust the
|
|
142
|
-
* amount of columns automatically using the `gridTemplateColumns` style prop and the width of the
|
|
143
|
-
* columns is also set using a `minmax` function in the `gridTemplateColumns` style prop. If a user
|
|
144
|
-
* would like to adjust this, it can be overwritten on `Table.Row`. See the example below for how to
|
|
145
|
-
* overwrite `gridTemplateColumns`.
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
* ```tsx
|
|
149
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
150
|
-
|
|
151
|
-
export default function App() {
|
|
152
|
-
return (
|
|
153
|
-
<Table>
|
|
154
|
-
<Table.Head>
|
|
155
|
-
<Table.Row gridTemplateColumns="repeat(4, minmax(100px, 1fr))">
|
|
156
|
-
<Table.Header>Table Header</Table.Header>
|
|
157
|
-
<Table.Cell>Table Cell</Table.Cell>
|
|
158
|
-
</Table.Row>
|
|
159
|
-
</Table.Head>
|
|
160
|
-
</Table>
|
|
161
|
-
);
|
|
162
|
-
}
|
|
163
|
-
```
|
|
164
|
-
*/
|
|
165
|
-
Row: TableRow_1.TableRow,
|
|
166
|
-
/**
|
|
167
|
-
* `Table.Header` renders a [th](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th) element.
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
* ```tsx
|
|
171
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
172
|
-
|
|
173
|
-
export default function App() {
|
|
174
|
-
return (
|
|
175
|
-
<Table>
|
|
176
|
-
<Table.Head>
|
|
177
|
-
<Table.Row>
|
|
178
|
-
<Table.Header>Table Header</Table.Header>
|
|
179
|
-
<Table.Cell>Table Cell</Table.Cell>
|
|
180
|
-
</Table.Row>
|
|
181
|
-
</Table.Head>
|
|
182
|
-
</Table>
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
```
|
|
186
|
-
*/
|
|
187
|
-
Header: TableHeader_1.TableHeader,
|
|
188
|
-
/**
|
|
189
|
-
* `Table.Cell` renders a [td](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td) element.
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
* ```tsx
|
|
193
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
194
|
-
|
|
195
|
-
export default function App() {
|
|
196
|
-
return (
|
|
197
|
-
<Table>
|
|
198
|
-
<Table.Body>
|
|
199
|
-
<Table.Row>
|
|
200
|
-
<Table.Header>Table Header</Table.Header>
|
|
201
|
-
<Table.Cell>Table Cell</Table.Cell>
|
|
202
|
-
</Table.Row>
|
|
203
|
-
</Table.Body>
|
|
204
|
-
</Table>
|
|
205
|
-
);
|
|
206
|
-
}
|
|
207
|
-
```
|
|
208
|
-
*/
|
|
209
|
-
Cell: TableCell_1.TableCell,
|
|
210
|
-
/**
|
|
211
|
-
* `Table.Footer` renders a [tfoot](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot) element.
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
* ```tsx
|
|
215
|
-
import {Table} from '@workday/canvas-kit-preview-react/table';
|
|
216
|
-
|
|
217
|
-
export default function App() {
|
|
218
|
-
return (
|
|
219
|
-
<Table>
|
|
220
|
-
<Table.Footer>
|
|
221
|
-
<Table.Row>
|
|
222
|
-
<Table.Header>Table Header</Table.Header>
|
|
223
|
-
<Table.Cell>Table Cell</Table.Cell>
|
|
224
|
-
</Table.Row>
|
|
225
|
-
</Table.Footer>
|
|
226
|
-
</Table>
|
|
227
|
-
);
|
|
228
|
-
}
|
|
229
|
-
```
|
|
230
|
-
*/
|
|
231
|
-
Footer: TableFooter_1.TableFooter,
|
|
232
|
-
},
|
|
233
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableBody.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableBody.tsx"],"names":[],"mappings":"AAgCA,eAAO,MAAM,SAAS,wMASpB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.TableBody = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
9
|
-
const common_1 = require("@workday/canvas-kit-react/common");
|
|
10
|
-
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
11
|
-
const tableBodyStencil = canvas_kit_styling_1.createStencil({
|
|
12
|
-
base: { name: "1aq46he", styles: "display:grid;box-sizing:border-box;tr {&:last-of-type{td, th{border-bottom:none;}}&:first-of-type{td, th{border-top:none;}}}td {&:last-of-type{border-inline-end:none;}&:first-of-type{border-inline-start:none;}}" }
|
|
13
|
-
}, "table-body");
|
|
14
|
-
exports.TableBody = common_1.createComponent('tbody')({
|
|
15
|
-
displayName: 'Table.Body',
|
|
16
|
-
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
17
|
-
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, tableBodyStencil())), children));
|
|
18
|
-
},
|
|
19
|
-
});
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const TableCaption: import("@workday/canvas-kit-react/common").ElementComponent<"caption", Omit<import("@workday/canvas-kit-react/layout").BoxProps, "display"> & import("@workday/canvas-kit-react/layout").FlexStyleProps>;
|
|
2
|
-
//# sourceMappingURL=TableCaption.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableCaption.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableCaption.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,YAAY,0MASvB,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.TableCaption = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
9
|
-
const common_1 = require("@workday/canvas-kit-react/common");
|
|
10
|
-
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
11
|
-
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
12
|
-
const tableCaptionStencil = canvas_kit_styling_1.createStencil({
|
|
13
|
-
base: { name: "mnuok4", styles: "display:flex;border-bottom:0.0625rem solid var(--cnvs-base-palette-soap-500, rgba(206,211,217,1));padding:var(--cnvs-sys-space-x2, calc(0.25rem * 2)) var(--cnvs-sys-space-x4, calc(0.25rem * 4));box-sizing:border-box;" }
|
|
14
|
-
}, "table-caption");
|
|
15
|
-
exports.TableCaption = common_1.createComponent('caption')({
|
|
16
|
-
displayName: 'Table.Caption',
|
|
17
|
-
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
18
|
-
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, tableCaptionStencil())), children));
|
|
19
|
-
},
|
|
20
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableCell.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,SAAS,qMASpB,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.TableCell = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
9
|
-
const common_1 = require("@workday/canvas-kit-react/common");
|
|
10
|
-
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
11
|
-
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
12
|
-
const tableCellStencil = canvas_kit_styling_1.createStencil({
|
|
13
|
-
base: { name: "iww62y", styles: "display:grid;align-items:center;background-color:var(--cnvs-base-palette-french-vanilla-100, rgba(255,255,255,1));border-bottom:0.0625rem solid var(--cnvs-base-palette-soap-400, rgba(223,226,230,1));grid-template-columns:1fr;justify-content:start;min-height:3.5rem;padding:var(--cnvs-sys-space-x2, calc(0.25rem * 2)) var(--cnvs-sys-space-x4, calc(0.25rem * 4));word-break:break-word;box-sizing:border-box;" }
|
|
14
|
-
}, "table-cell");
|
|
15
|
-
exports.TableCell = common_1.createComponent('td')({
|
|
16
|
-
displayName: 'Table.Cell',
|
|
17
|
-
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
18
|
-
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, tableCellStencil())), children));
|
|
19
|
-
},
|
|
20
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableFooter.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableFooter.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,WAAW,wMAStB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.TableFooter = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
9
|
-
const common_1 = require("@workday/canvas-kit-react/common");
|
|
10
|
-
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
11
|
-
const tableFooterStencil = canvas_kit_styling_1.createStencil({
|
|
12
|
-
base: { name: "197vc7s", styles: "display:grid;box-sizing:border-box;" }
|
|
13
|
-
}, "table-footer");
|
|
14
|
-
exports.TableFooter = common_1.createComponent('tfoot')({
|
|
15
|
-
displayName: 'Table.Footer',
|
|
16
|
-
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
17
|
-
return (react_1.default.createElement(Element, Object.assign({ ref: ref }, layout_1.mergeStyles(elemProps, tableFooterStencil())), children));
|
|
18
|
-
},
|
|
19
|
-
});
|