@pingux/astro 2.129.0-alpha.5 → 2.129.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/lib/cjs/components/Callout/Callout.js +16 -14
- package/lib/cjs/components/Callout/Callout.stories.d.ts +0 -9
- package/lib/cjs/components/Callout/Callout.stories.js +1 -24
- package/lib/cjs/components/Callout/Callout.styles.d.ts +22 -14
- package/lib/cjs/components/Callout/Callout.styles.js +23 -19
- package/lib/cjs/components/Card/Card.styles.d.ts +0 -11
- package/lib/cjs/components/Card/Card.styles.js +1 -6
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.mdx +1 -1
- package/lib/cjs/components/Table/Table.stories.js +5 -4
- package/lib/cjs/components/Table/Table.styles.d.ts +3 -5
- package/lib/cjs/components/Table/Table.styles.js +6 -8
- package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +41 -3
- package/lib/cjs/index.d.ts +2 -3
- package/lib/cjs/index.js +20 -74
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +0 -48
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +0 -24
- package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +4 -4
- package/lib/cjs/styles/themes/astro/customProperties/tShirtSizes.d.ts +4 -4
- package/lib/cjs/styles/themes/astro/customProperties/tShirtSizes.js +4 -4
- package/lib/cjs/styles/themes/next-gen/colors/colors.d.ts +0 -1
- package/lib/cjs/styles/themes/next-gen/colors/colors.js +1 -2
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.d.ts +0 -1
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +2 -3
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +1 -179
- package/lib/cjs/styles/themes/next-gen/variants/cards.d.ts +1 -14
- package/lib/cjs/styles/themes/next-gen/variants/cards.js +2 -7
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +0 -164
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +1 -7
- package/lib/cjs/styles/variants/variants.js +2 -5
- package/lib/cjs/types/callout.d.ts +0 -2
- package/lib/components/Callout/Callout.js +16 -14
- package/lib/components/Callout/Callout.stories.js +0 -22
- package/lib/components/Callout/Callout.styles.js +24 -19
- package/lib/components/Card/Card.styles.js +1 -6
- package/lib/components/RockerButtonGroup/RockerButtonGroup.mdx +1 -1
- package/lib/components/Table/Table.stories.js +6 -5
- package/lib/components/Table/Table.styles.js +6 -8
- package/lib/index.js +2 -3
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +0 -24
- package/lib/styles/themes/astro/customProperties/tShirtSizes.js +4 -4
- package/lib/styles/themes/next-gen/colors/colors.js +1 -2
- package/lib/styles/themes/next-gen/convertedComponentList.js +2 -3
- package/lib/styles/themes/next-gen/variants/cards.js +2 -7
- package/lib/styles/themes/next-gen/variants/variants.js +1 -7
- package/lib/styles/variants/variants.js +2 -5
- package/package.json +1 -1
- package/lib/cjs/components/Callout/stories/CalloutNextGenComponent.d.ts +0 -2
- package/lib/cjs/components/Callout/stories/CalloutNextGenComponent.js +0 -33
- package/lib/cjs/components/Callout/stories/NextGenCallout.chromatic.stories.d.ts +0 -6
- package/lib/cjs/components/Callout/stories/NextGenCallout.chromatic.stories.js +0 -22
- package/lib/cjs/components/Callout/stories/NextGenDarkCallout.chomatic.stories.d.ts +0 -6
- package/lib/cjs/components/Callout/stories/NextGenDarkCallout.chomatic.stories.js +0 -22
- package/lib/cjs/components/TableBase/TableBase.d.ts +0 -9
- package/lib/cjs/components/TableBase/TableBase.js +0 -238
- package/lib/cjs/components/TableBase/TableBase.mdx +0 -30
- package/lib/cjs/components/TableBase/TableBase.stories.d.ts +0 -6
- package/lib/cjs/components/TableBase/TableBase.stories.js +0 -111
- package/lib/cjs/components/TableBase/TableBase.styles.d.ts +0 -76
- package/lib/cjs/components/TableBase/TableBase.styles.js +0 -80
- package/lib/cjs/components/TableBase/TableBase.test.d.ts +0 -1
- package/lib/cjs/components/TableBase/TableBase.test.js +0 -122
- package/lib/cjs/components/TableBase/index.d.ts +0 -1
- package/lib/cjs/components/TableBase/index.js +0 -14
- package/lib/cjs/components/TableBase/stories/NextGenDarkTableBase.chromatic.stories.d.ts +0 -6
- package/lib/cjs/components/TableBase/stories/NextGenDarkTableBase.chromatic.stories.js +0 -22
- package/lib/cjs/components/TableBase/stories/NextGenTableBase.chromatic.stories.d.ts +0 -6
- package/lib/cjs/components/TableBase/stories/NextGenTableBase.chromatic.stories.js +0 -22
- package/lib/cjs/components/TableBase/stories/NextGenTableBase.d.ts +0 -3
- package/lib/cjs/components/TableBase/stories/NextGenTableBase.js +0 -67
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/callout.d.ts +0 -27
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/callout.js +0 -35
- package/lib/cjs/styles/themes/next-gen/variants/callout.d.ts +0 -34
- package/lib/cjs/styles/themes/next-gen/variants/callout.js +0 -45
- package/lib/cjs/styles/themes/next-gen/variants/table.d.ts +0 -45
- package/lib/cjs/styles/themes/next-gen/variants/table.js +0 -65
- package/lib/cjs/styles/themes/next-gen/variants/tableBase.d.ts +0 -86
- package/lib/cjs/styles/themes/next-gen/variants/tableBase.js +0 -99
- package/lib/cjs/types/cell.d.ts +0 -12
- package/lib/cjs/types/cell.js +0 -6
- package/lib/cjs/types/tableBase.d.ts +0 -45
- package/lib/cjs/types/tableBase.js +0 -6
- package/lib/cjs/utils/devUtils/constants/items.d.ts +0 -10
- package/lib/cjs/utils/devUtils/constants/items.js +0 -87
- package/lib/components/Callout/stories/CalloutNextGenComponent.js +0 -24
- package/lib/components/Callout/stories/NextGenCallout.chromatic.stories.js +0 -12
- package/lib/components/Callout/stories/NextGenDarkCallout.chomatic.stories.js +0 -12
- package/lib/components/TableBase/TableBase.js +0 -221
- package/lib/components/TableBase/TableBase.mdx +0 -30
- package/lib/components/TableBase/TableBase.stories.js +0 -100
- package/lib/components/TableBase/TableBase.styles.js +0 -72
- package/lib/components/TableBase/TableBase.test.js +0 -119
- package/lib/components/TableBase/index.js +0 -1
- package/lib/components/TableBase/stories/NextGenDarkTableBase.chromatic.stories.js +0 -12
- package/lib/components/TableBase/stories/NextGenTableBase.chromatic.stories.js +0 -12
- package/lib/components/TableBase/stories/NextGenTableBase.js +0 -58
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/callout.js +0 -27
- package/lib/styles/themes/next-gen/variants/callout.js +0 -36
- package/lib/styles/themes/next-gen/variants/table.js +0 -57
- package/lib/styles/themes/next-gen/variants/tableBase.js +0 -91
- package/lib/types/cell.js +0 -1
- package/lib/types/tableBase.js +0 -1
- package/lib/utils/devUtils/constants/items.js +0 -79
@@ -1,100 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
3
|
-
import { Badge, Card, Cell, Column, Row, TableBase, TBody, THead } from '../..';
|
4
|
-
import { items } from '../../utils/devUtils/constants/items';
|
5
|
-
import TableReadme from './TableBase.mdx';
|
6
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
7
|
-
export default {
|
8
|
-
title: 'Experimental/Table',
|
9
|
-
component: TableBase,
|
10
|
-
parameters: {
|
11
|
-
docs: {
|
12
|
-
page: function page() {
|
13
|
-
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(TableReadme, null), ___EmotionJSX(DocsLayout, null));
|
14
|
-
}
|
15
|
-
}
|
16
|
-
}
|
17
|
-
};
|
18
|
-
var headers = [{
|
19
|
-
key: 'type',
|
20
|
-
name: 'Type'
|
21
|
-
}, {
|
22
|
-
key: 'date',
|
23
|
-
name: 'Date'
|
24
|
-
}, {
|
25
|
-
key: 'additional_grant',
|
26
|
-
name: 'Additional Grant'
|
27
|
-
}, {
|
28
|
-
key: 'total_grant',
|
29
|
-
name: 'Total Grant'
|
30
|
-
}];
|
31
|
-
var objects = [{
|
32
|
-
id: 1,
|
33
|
-
type: 'Lorem ipsum',
|
34
|
-
date: '2020-06-12',
|
35
|
-
additional_grant: '+25,000',
|
36
|
-
total_grant: '25,000'
|
37
|
-
}, {
|
38
|
-
id: 2,
|
39
|
-
type: 'Lorem ipsum',
|
40
|
-
date: '2020-10-01',
|
41
|
-
additional_grant: '+25,000',
|
42
|
-
total_grant: '50,000'
|
43
|
-
}, {
|
44
|
-
id: 3,
|
45
|
-
type: 'Lorem ipsum',
|
46
|
-
date: '2021-01-01',
|
47
|
-
additional_grant: '+25,000',
|
48
|
-
total_grant: '75,000'
|
49
|
-
}];
|
50
|
-
export var Default = function Default() {
|
51
|
-
return ___EmotionJSX(Card, {
|
52
|
-
variant: "cards.tableWrapper"
|
53
|
-
}, ___EmotionJSX(TableBase, {
|
54
|
-
caption: "Lorem ipsum",
|
55
|
-
"aria-label": "table"
|
56
|
-
}, ___EmotionJSX(THead, {
|
57
|
-
columns: headers
|
58
|
-
}, function (column) {
|
59
|
-
return ___EmotionJSX(Column, {
|
60
|
-
key: column.key
|
61
|
-
}, column.name);
|
62
|
-
}), ___EmotionJSX(TBody, {
|
63
|
-
items: objects
|
64
|
-
}, function (item) {
|
65
|
-
return ___EmotionJSX(Row, {
|
66
|
-
key: item.id
|
67
|
-
}, function (columnKey) {
|
68
|
-
return ___EmotionJSX(Cell, null, item[columnKey]);
|
69
|
-
});
|
70
|
-
})));
|
71
|
-
};
|
72
|
-
export var Customization = function Customization() {
|
73
|
-
var statusVariant = {
|
74
|
-
'Pending': 'warningStatusBadge',
|
75
|
-
'Failed': 'criticalStatusBadge',
|
76
|
-
'Rejected': 'criticalStatusBadge',
|
77
|
-
'Active': 'healthyStatusBadge',
|
78
|
-
'Inactive': 'secondaryStatusBadge'
|
79
|
-
};
|
80
|
-
return ___EmotionJSX(Card, {
|
81
|
-
variant: "cards.tableWrapper"
|
82
|
-
}, ___EmotionJSX(TableBase, {
|
83
|
-
"aria-label": "table"
|
84
|
-
}, ___EmotionJSX(THead, null, ___EmotionJSX(Column, {
|
85
|
-
width: 70
|
86
|
-
}, "#"), ___EmotionJSX(Column, null, "Name"), ___EmotionJSX(Column, null, "Email"), ___EmotionJSX(Column, null, "Status"), ___EmotionJSX(Column, null, "Bio")), ___EmotionJSX(TBody, {
|
87
|
-
items: items
|
88
|
-
}, function (item) {
|
89
|
-
return ___EmotionJSX(Row, {
|
90
|
-
key: item.email
|
91
|
-
}, ___EmotionJSX(Cell, null, item.id), ___EmotionJSX(Cell, {
|
92
|
-
noWrap: true
|
93
|
-
}, item.firstName, ' ', item.lastName), ___EmotionJSX(Cell, {
|
94
|
-
noWrap: true
|
95
|
-
}, item.email), ___EmotionJSX(Cell, null, ___EmotionJSX(Badge, {
|
96
|
-
variant: statusVariant[item.status],
|
97
|
-
label: item.status
|
98
|
-
})), ___EmotionJSX(Cell, null, "Lorem ipsum dolor sit amet consectetur adipisicing elit. Quo quidem accusantium architecto tempore facere!"));
|
99
|
-
})));
|
100
|
-
};
|
@@ -1,72 +0,0 @@
|
|
1
|
-
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
2
|
-
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
3
|
-
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
4
|
-
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
5
|
-
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
6
|
-
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
7
|
-
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
8
|
-
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
9
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
10
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
11
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
12
|
-
import { text } from '../Text/Text.styles';
|
13
|
-
var defaultFocus = {
|
14
|
-
outline: '1px',
|
15
|
-
outlineStyle: 'solid',
|
16
|
-
outlineColor: 'focus',
|
17
|
-
outlineOffset: '-1px'
|
18
|
-
};
|
19
|
-
var container = {
|
20
|
-
width: '100%',
|
21
|
-
borderSpacing: '0',
|
22
|
-
borderCollapse: 'collapse'
|
23
|
-
};
|
24
|
-
var caption = {
|
25
|
-
fontFamily: 'standard',
|
26
|
-
fontSize: 'lg',
|
27
|
-
fontWeight: '2',
|
28
|
-
p: 'sm',
|
29
|
-
textAlign: 'left'
|
30
|
-
};
|
31
|
-
var thead = {};
|
32
|
-
var head = _objectSpread(_objectSpread({}, text.label), {}, {
|
33
|
-
fontWeight: 500,
|
34
|
-
textAlign: 'left',
|
35
|
-
p: 'sm',
|
36
|
-
cursor: 'default',
|
37
|
-
'&.is-focused': _objectSpread({}, defaultFocus)
|
38
|
-
});
|
39
|
-
var tbody = {
|
40
|
-
borderTop: '1px solid',
|
41
|
-
borderTopColor: 'neutral.40',
|
42
|
-
borderBottom: '1px solid',
|
43
|
-
borderBottomColor: 'neutral.80'
|
44
|
-
};
|
45
|
-
var row = {
|
46
|
-
'&:nth-of-type(odd) ': {
|
47
|
-
bg: 'neutral.95'
|
48
|
-
},
|
49
|
-
'&.is-focused': _objectSpread({}, defaultFocus),
|
50
|
-
'&.is-hovered': {
|
51
|
-
// This is the hover state for the row
|
52
|
-
},
|
53
|
-
'&.is-selected': {
|
54
|
-
// This is the selected state for the row
|
55
|
-
}
|
56
|
-
};
|
57
|
-
var data = _objectSpread(_objectSpread({}, text.tableData), {}, {
|
58
|
-
p: 'sm',
|
59
|
-
'&.no-wrap': {
|
60
|
-
whiteSpace: 'nowrap'
|
61
|
-
},
|
62
|
-
'&.is-focused': _objectSpread({}, defaultFocus)
|
63
|
-
});
|
64
|
-
export default {
|
65
|
-
thead: thead,
|
66
|
-
tbody: tbody,
|
67
|
-
caption: caption,
|
68
|
-
container: container,
|
69
|
-
data: data,
|
70
|
-
head: head,
|
71
|
-
row: row
|
72
|
-
};
|
@@ -1,119 +0,0 @@
|
|
1
|
-
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
|
-
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
3
|
-
import React from 'react';
|
4
|
-
import { render, screen } from '@testing-library/react';
|
5
|
-
import { Cell, Column, Row, TBody, THead } from '../../index';
|
6
|
-
import { universalComponentTests } from '../../utils/testUtils/universalComponentTest';
|
7
|
-
import TableBase from './TableBase';
|
8
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
9
|
-
var testId = 'test-table';
|
10
|
-
var defaultProps = {
|
11
|
-
'aria-label': 'table',
|
12
|
-
'data-testid': testId,
|
13
|
-
caption: 'Populations of Countries'
|
14
|
-
};
|
15
|
-
var headers = [{
|
16
|
-
key: 'country',
|
17
|
-
name: 'Country'
|
18
|
-
}, {
|
19
|
-
key: 'population',
|
20
|
-
name: 'Population'
|
21
|
-
}, {
|
22
|
-
key: 'continent',
|
23
|
-
name: 'Continent'
|
24
|
-
}];
|
25
|
-
var objects = [{
|
26
|
-
key: '1',
|
27
|
-
country: 'USA',
|
28
|
-
population: '320,000,000',
|
29
|
-
continent: 'South America',
|
30
|
-
cellProps: {
|
31
|
-
noWrap: true
|
32
|
-
}
|
33
|
-
}, {
|
34
|
-
key: '2',
|
35
|
-
country: 'Canada',
|
36
|
-
population: '37,000,000',
|
37
|
-
continent: 'North America'
|
38
|
-
}, {
|
39
|
-
key: '3',
|
40
|
-
country: 'China',
|
41
|
-
population: '1,398,000,000',
|
42
|
-
continent: 'Asia'
|
43
|
-
}, {
|
44
|
-
key: '4',
|
45
|
-
country: 'France',
|
46
|
-
population: '67,000,000',
|
47
|
-
continent: 'Europe'
|
48
|
-
}];
|
49
|
-
var getComponent = function getComponent() {
|
50
|
-
return render(___EmotionJSX(TableBase, defaultProps, ___EmotionJSX(THead, {
|
51
|
-
columns: headers
|
52
|
-
}, function (head) {
|
53
|
-
return ___EmotionJSX(Column, {
|
54
|
-
key: head.key
|
55
|
-
}, head.name);
|
56
|
-
}), ___EmotionJSX(TBody, {
|
57
|
-
items: objects
|
58
|
-
}, function (row) {
|
59
|
-
return ___EmotionJSX(Row, {
|
60
|
-
key: row.key
|
61
|
-
}, function (columnKey) {
|
62
|
-
return ___EmotionJSX(Cell, row.cellProps || {}, row[columnKey]);
|
63
|
-
});
|
64
|
-
})));
|
65
|
-
};
|
66
|
-
|
67
|
-
// Needs to be added to each components test file
|
68
|
-
universalComponentTests({
|
69
|
-
renderComponent: function renderComponent(props) {
|
70
|
-
return ___EmotionJSX(TableBase, _extends({}, defaultProps, props), ___EmotionJSX(THead, {
|
71
|
-
columns: headers
|
72
|
-
}, function (head) {
|
73
|
-
return ___EmotionJSX(Column, {
|
74
|
-
key: head.key
|
75
|
-
}, head.name);
|
76
|
-
}), ___EmotionJSX(TBody, {
|
77
|
-
items: objects
|
78
|
-
}, function (row) {
|
79
|
-
return ___EmotionJSX(Row, {
|
80
|
-
key: row.key
|
81
|
-
}, function (columnKey) {
|
82
|
-
return ___EmotionJSX(Cell, null, row[columnKey]);
|
83
|
-
});
|
84
|
-
}));
|
85
|
-
}
|
86
|
-
});
|
87
|
-
test('default table', function () {
|
88
|
-
getComponent();
|
89
|
-
var table = screen.getByTestId(testId);
|
90
|
-
expect(table).toBeInTheDocument();
|
91
|
-
});
|
92
|
-
test('renders caption', function () {
|
93
|
-
getComponent();
|
94
|
-
var caption = screen.getByText(defaultProps.caption);
|
95
|
-
expect(caption).toBeInTheDocument();
|
96
|
-
});
|
97
|
-
test('renders table headers', function () {
|
98
|
-
getComponent();
|
99
|
-
var headerCells = screen.getAllByRole('columnheader');
|
100
|
-
expect(headerCells).toHaveLength(headers.length);
|
101
|
-
_forEachInstanceProperty(headers).call(headers, function (header) {
|
102
|
-
expect(screen.getByText(header.name)).toBeInTheDocument();
|
103
|
-
});
|
104
|
-
});
|
105
|
-
test('renders table rows', function () {
|
106
|
-
getComponent();
|
107
|
-
var rows = screen.getAllByRole('row');
|
108
|
-
expect(rows).toHaveLength(objects.length + 1);
|
109
|
-
_forEachInstanceProperty(objects).call(objects, function (object) {
|
110
|
-
expect(screen.getByText(object.country)).toBeInTheDocument();
|
111
|
-
expect(screen.getByText(object.population)).toBeInTheDocument();
|
112
|
-
expect(screen.getByText(object.continent)).toBeInTheDocument();
|
113
|
-
});
|
114
|
-
});
|
115
|
-
test('renders cell with noWrap prop', function () {
|
116
|
-
getComponent();
|
117
|
-
var cell = screen.getByText('South America');
|
118
|
-
expect(cell).toHaveClass('no-wrap');
|
119
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
export { default } from './TableBase';
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { AstroProvider, NextGenDarkTheme } from '../../..';
|
3
|
-
import NextGenTableBase from './NextGenTableBase';
|
4
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
|
-
export default {
|
6
|
-
title: 'Chromatic Only Onyx Dark TableBase'
|
7
|
-
};
|
8
|
-
export var Default = function Default() {
|
9
|
-
return ___EmotionJSX(AstroProvider, {
|
10
|
-
themeOverrides: [NextGenDarkTheme]
|
11
|
-
}, ___EmotionJSX(NextGenTableBase, null));
|
12
|
-
};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { AstroProvider, NextGenTheme } from '../../..';
|
3
|
-
import NextGenTableBase from './NextGenTableBase';
|
4
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
|
-
export default {
|
6
|
-
title: 'Chromatic Only Onyx TableBase'
|
7
|
-
};
|
8
|
-
export var Default = function Default() {
|
9
|
-
return ___EmotionJSX(AstroProvider, {
|
10
|
-
themeOverrides: [NextGenTheme]
|
11
|
-
}, ___EmotionJSX(NextGenTableBase, null));
|
12
|
-
};
|
@@ -1,58 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { Card, Cell, Column, Row, TableBase, TBody, THead } from '../../..';
|
3
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
4
|
-
var NextGenTableBase = function NextGenTableBase() {
|
5
|
-
var headers = [{
|
6
|
-
key: 'type',
|
7
|
-
name: 'Type'
|
8
|
-
}, {
|
9
|
-
key: 'date',
|
10
|
-
name: 'Date'
|
11
|
-
}, {
|
12
|
-
key: 'additional_grant',
|
13
|
-
name: 'Additional Grant'
|
14
|
-
}, {
|
15
|
-
key: 'total_grant',
|
16
|
-
name: 'Total Grant'
|
17
|
-
}];
|
18
|
-
var objects = [{
|
19
|
-
id: 1,
|
20
|
-
type: 'Lorem ipsum',
|
21
|
-
date: '2020-06-12',
|
22
|
-
additional_grant: '+25,000',
|
23
|
-
total_grant: '25,000'
|
24
|
-
}, {
|
25
|
-
id: 2,
|
26
|
-
type: 'Lorem ipsum',
|
27
|
-
date: '2020-10-01',
|
28
|
-
additional_grant: '+25,000',
|
29
|
-
total_grant: '50,000'
|
30
|
-
}, {
|
31
|
-
id: 3,
|
32
|
-
type: 'Lorem ipsum',
|
33
|
-
date: '2021-01-01',
|
34
|
-
additional_grant: '+25,000',
|
35
|
-
total_grant: '75,000'
|
36
|
-
}];
|
37
|
-
return ___EmotionJSX(Card, {
|
38
|
-
variant: "cards.tableWrapper"
|
39
|
-
}, ___EmotionJSX(TableBase, {
|
40
|
-
caption: "Lorem ipsum",
|
41
|
-
"aria-label": "table"
|
42
|
-
}, ___EmotionJSX(THead, {
|
43
|
-
columns: headers
|
44
|
-
}, function (column) {
|
45
|
-
return ___EmotionJSX(Column, {
|
46
|
-
key: column.key
|
47
|
-
}, column.name);
|
48
|
-
}), ___EmotionJSX(TBody, {
|
49
|
-
items: objects
|
50
|
-
}, function (item) {
|
51
|
-
return ___EmotionJSX(Row, {
|
52
|
-
key: item.id
|
53
|
-
}, function (columnKey) {
|
54
|
-
return ___EmotionJSX(Cell, null, item[columnKey]);
|
55
|
-
});
|
56
|
-
})));
|
57
|
-
};
|
58
|
-
export default NextGenTableBase;
|
@@ -1,27 +0,0 @@
|
|
1
|
-
var base = {
|
2
|
-
color: 'text.secondary',
|
3
|
-
'> span': {
|
4
|
-
color: 'text.secondary'
|
5
|
-
},
|
6
|
-
'& > svg > path': {
|
7
|
-
fill: 'text.secondary'
|
8
|
-
},
|
9
|
-
'&.is-success, > .is-success': {
|
10
|
-
'& > svg > path': {
|
11
|
-
fill: 'text.secondary'
|
12
|
-
}
|
13
|
-
},
|
14
|
-
'&.is-warning, > .is-warning': {
|
15
|
-
'& > svg > path': {
|
16
|
-
fill: 'text.secondary'
|
17
|
-
}
|
18
|
-
},
|
19
|
-
'&.is-error, > .is-error': {
|
20
|
-
'& > svg > path': {
|
21
|
-
fill: 'text.secondary'
|
22
|
-
}
|
23
|
-
}
|
24
|
-
};
|
25
|
-
export default {
|
26
|
-
base: base
|
27
|
-
};
|
@@ -1,36 +0,0 @@
|
|
1
|
-
import tShirtSizes from '../customProperties/tShirtSizes';
|
2
|
-
var base = {
|
3
|
-
width: '100%',
|
4
|
-
backgroundColor: 'background.secondary',
|
5
|
-
lineHeight: 'md',
|
6
|
-
p: 'md',
|
7
|
-
border: 'none',
|
8
|
-
borderLeft: '5px solid',
|
9
|
-
borderLeftColor: 'active',
|
10
|
-
borderRadius: '.25rem',
|
11
|
-
alignItems: 'flex-start',
|
12
|
-
color: 'text.primary',
|
13
|
-
'&.is-success, > .is-success': {
|
14
|
-
borderColor: 'unset',
|
15
|
-
borderLeftColor: 'success.bright'
|
16
|
-
},
|
17
|
-
'&.is-warning, > .is-warning': {
|
18
|
-
borderColor: 'unset',
|
19
|
-
borderLeftColor: 'warning.bright'
|
20
|
-
},
|
21
|
-
'&.is-error, > .is-error': {
|
22
|
-
borderColor: 'unset',
|
23
|
-
borderLeftColor: 'critical.bright'
|
24
|
-
}
|
25
|
-
};
|
26
|
-
var icon = {
|
27
|
-
ml: '0',
|
28
|
-
mr: 'md',
|
29
|
-
minWidth: "".concat(tShirtSizes.sm, " !important"),
|
30
|
-
width: "".concat(tShirtSizes.sm, " !important"),
|
31
|
-
height: "".concat(tShirtSizes.sm, " !important")
|
32
|
-
};
|
33
|
-
export default {
|
34
|
-
base: base,
|
35
|
-
icon: icon
|
36
|
-
};
|
@@ -1,57 +0,0 @@
|
|
1
|
-
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
2
|
-
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
3
|
-
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
4
|
-
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
5
|
-
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
6
|
-
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
7
|
-
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
8
|
-
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
9
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
10
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
11
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
12
|
-
var container = {
|
13
|
-
overflow: 'hidden'
|
14
|
-
};
|
15
|
-
var caption = {
|
16
|
-
px: 'lg',
|
17
|
-
color: 'text.primary',
|
18
|
-
borderBottom: '1px solid',
|
19
|
-
borderBottomColor: 'border.base'
|
20
|
-
};
|
21
|
-
var head = {
|
22
|
-
px: 'lg',
|
23
|
-
py: 'sm',
|
24
|
-
fontSize: 'md',
|
25
|
-
fontWeight: '2',
|
26
|
-
color: 'text.primary',
|
27
|
-
lineHeight: 'body'
|
28
|
-
};
|
29
|
-
var body = {
|
30
|
-
borderTopColor: 'border.base',
|
31
|
-
borderBottom: 'unset',
|
32
|
-
backgroundColor: 'background.base',
|
33
|
-
borderBottomLeftRadius: '16px',
|
34
|
-
borderBottomRightRadius: '16px',
|
35
|
-
'&& > tr:not(:last-child)': {
|
36
|
-
borderBottom: '1px solid',
|
37
|
-
borderBottomColor: 'border.base'
|
38
|
-
},
|
39
|
-
'&& > tr:nth-of-type(odd) ': {
|
40
|
-
backgroundColor: 'background.base'
|
41
|
-
},
|
42
|
-
'&& > tr:last-child': {
|
43
|
-
borderBottomLeftRadius: '16px',
|
44
|
-
borderBottomRightRadius: '16px'
|
45
|
-
}
|
46
|
-
};
|
47
|
-
var data = _objectSpread(_objectSpread({}, head), {}, {
|
48
|
-
py: 'md',
|
49
|
-
fontWeight: '1'
|
50
|
-
});
|
51
|
-
export var table = {
|
52
|
-
container: container,
|
53
|
-
caption: caption,
|
54
|
-
head: head,
|
55
|
-
body: body,
|
56
|
-
data: data
|
57
|
-
};
|
@@ -1,91 +0,0 @@
|
|
1
|
-
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
2
|
-
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
3
|
-
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
4
|
-
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
5
|
-
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
6
|
-
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
7
|
-
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
8
|
-
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
9
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
10
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
11
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
12
|
-
import { defaultFocus as baseFocus } from './button';
|
13
|
-
var borderRadius = '16px';
|
14
|
-
var defaultFocus = _objectSpread(_objectSpread({}, baseFocus), {}, {
|
15
|
-
outlineOffset: '-2px'
|
16
|
-
});
|
17
|
-
var caption = {
|
18
|
-
backgroundColor: 'background.base',
|
19
|
-
px: 'lg',
|
20
|
-
color: 'text.primary',
|
21
|
-
borderBottom: '1px solid',
|
22
|
-
borderBottomColor: 'border.base',
|
23
|
-
borderTopLeftRadius: borderRadius,
|
24
|
-
borderTopRightRadius: borderRadius
|
25
|
-
};
|
26
|
-
var row = {
|
27
|
-
borderBottom: '1px solid',
|
28
|
-
borderBottomColor: 'border.base',
|
29
|
-
'&.is-focused': _objectSpread({}, defaultFocus),
|
30
|
-
'&.is-hovered': {
|
31
|
-
bg: 'background.hover'
|
32
|
-
},
|
33
|
-
'&:nth-of-type(odd)': {
|
34
|
-
bg: 'background.base',
|
35
|
-
'&.is-hovered': {
|
36
|
-
bg: 'background.hover'
|
37
|
-
}
|
38
|
-
}
|
39
|
-
};
|
40
|
-
var thead = {
|
41
|
-
backgroundColor: 'background.base',
|
42
|
-
'&:not(.has-caption)': {
|
43
|
-
'& > tr:first-child': {
|
44
|
-
borderTopLeftRadius: borderRadius,
|
45
|
-
borderTopRightRadius: borderRadius,
|
46
|
-
'& > th:first-of-type': {
|
47
|
-
borderTopLeftRadius: borderRadius
|
48
|
-
},
|
49
|
-
'& > th:last-of-type': {
|
50
|
-
borderTopRightRadius: borderRadius
|
51
|
-
}
|
52
|
-
}
|
53
|
-
}
|
54
|
-
};
|
55
|
-
var head = {
|
56
|
-
px: 'lg',
|
57
|
-
py: 'sm',
|
58
|
-
fontSize: 'md',
|
59
|
-
fontWeight: '2',
|
60
|
-
color: 'text.primary',
|
61
|
-
lineHeight: 'body',
|
62
|
-
'&.is-focused': _objectSpread({}, defaultFocus)
|
63
|
-
};
|
64
|
-
var tbody = {
|
65
|
-
borderTopColor: 'border.base',
|
66
|
-
borderBottom: 'unset',
|
67
|
-
backgroundColor: 'background.base',
|
68
|
-
'& > tr:last-child': {
|
69
|
-
borderBottom: 'unset',
|
70
|
-
borderBottomLeftRadius: borderRadius,
|
71
|
-
borderBottomRightRadius: borderRadius,
|
72
|
-
'& > td:first-of-type': {
|
73
|
-
borderBottomLeftRadius: borderRadius
|
74
|
-
},
|
75
|
-
'& > td:last-of-type': {
|
76
|
-
borderBottomRightRadius: borderRadius
|
77
|
-
}
|
78
|
-
}
|
79
|
-
};
|
80
|
-
var data = _objectSpread(_objectSpread({}, head), {}, {
|
81
|
-
py: 'md',
|
82
|
-
fontWeight: '1'
|
83
|
-
});
|
84
|
-
export var tableBase = {
|
85
|
-
caption: caption,
|
86
|
-
row: row,
|
87
|
-
thead: thead,
|
88
|
-
head: head,
|
89
|
-
tbody: tbody,
|
90
|
-
data: data
|
91
|
-
};
|
package/lib/types/cell.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
package/lib/types/tableBase.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,79 +0,0 @@
|
|
1
|
-
export var items = [{
|
2
|
-
id: '1',
|
3
|
-
email: 'dburkitt5@columbia.edu',
|
4
|
-
firstName: 'Nicola',
|
5
|
-
lastName: 'Burkitt',
|
6
|
-
status: 'Failed'
|
7
|
-
}, {
|
8
|
-
id: '2',
|
9
|
-
email: 'idixie2@elegantthemes.com',
|
10
|
-
firstName: 'Cacilia',
|
11
|
-
lastName: 'Dixie',
|
12
|
-
status: 'Active'
|
13
|
-
}, {
|
14
|
-
id: '3',
|
15
|
-
email: 'dfowler0@rambler.ru',
|
16
|
-
firstName: 'Stavro',
|
17
|
-
lastName: 'Fowler',
|
18
|
-
status: 'Active'
|
19
|
-
}, {
|
20
|
-
id: '4',
|
21
|
-
email: 'jgolde8@jimdo.com',
|
22
|
-
firstName: 'Celisse',
|
23
|
-
lastName: 'Golde',
|
24
|
-
status: 'Active'
|
25
|
-
}, {
|
26
|
-
id: '5',
|
27
|
-
email: 'shearst9@answers.com',
|
28
|
-
firstName: 'Jeth',
|
29
|
-
lastName: 'Hearst',
|
30
|
-
status: 'Pending'
|
31
|
-
}, {
|
32
|
-
id: '6',
|
33
|
-
email: 'ajinaa@mapquest.com',
|
34
|
-
firstName: 'Kaycee',
|
35
|
-
lastName: 'Jina',
|
36
|
-
status: 'Active'
|
37
|
-
}, {
|
38
|
-
id: '7',
|
39
|
-
email: 'vmalster4@biblegateway.com',
|
40
|
-
firstName: 'Lorry',
|
41
|
-
lastName: 'Malster',
|
42
|
-
status: 'Pending'
|
43
|
-
}, {
|
44
|
-
id: '8',
|
45
|
-
email: 'yphipp6@yellowpages.com',
|
46
|
-
firstName: 'Stanley',
|
47
|
-
lastName: 'Phipp',
|
48
|
-
status: 'Active'
|
49
|
-
}, {
|
50
|
-
id: '9',
|
51
|
-
email: 'mskilbeck3@bbc.co.uk',
|
52
|
-
firstName: 'Gradey',
|
53
|
-
lastName: 'Skilbeck',
|
54
|
-
status: 'Pending'
|
55
|
-
}, {
|
56
|
-
id: '10',
|
57
|
-
email: 'dstebbing1@msu.edu',
|
58
|
-
firstName: 'Marnia',
|
59
|
-
lastName: 'Stebbing',
|
60
|
-
status: 'Rejected'
|
61
|
-
}, {
|
62
|
-
id: '11',
|
63
|
-
email: 'lsterley7@lulu.com',
|
64
|
-
firstName: 'Joshua',
|
65
|
-
lastName: 'Sterley',
|
66
|
-
status: 'Pending'
|
67
|
-
}, {
|
68
|
-
id: '12',
|
69
|
-
email: 'luttleyb@hugedomains.com',
|
70
|
-
firstName: 'Jarrod',
|
71
|
-
lastName: 'Uttley',
|
72
|
-
status: 'Active'
|
73
|
-
}, {
|
74
|
-
id: '13',
|
75
|
-
email: 'lidelc@yelp.com',
|
76
|
-
firstName: 'Andromache',
|
77
|
-
lastName: 'Idel',
|
78
|
-
status: 'Pending'
|
79
|
-
}];
|