@pingux/astro 2.129.0 → 2.130.0-alpha.1
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/Button/Button.stories.d.ts +1 -0
- package/lib/cjs/components/Button/Button.stories.js +8 -2
- package/lib/cjs/components/Button/Buttons.styles.d.ts +48 -0
- package/lib/cjs/components/Button/Buttons.styles.js +9 -1
- package/lib/cjs/components/Callout/Callout.js +14 -16
- package/lib/cjs/components/Callout/Callout.stories.d.ts +9 -0
- package/lib/cjs/components/Callout/Callout.stories.js +24 -1
- package/lib/cjs/components/Callout/Callout.styles.d.ts +14 -22
- package/lib/cjs/components/Callout/Callout.styles.js +19 -23
- package/lib/cjs/components/Callout/stories/CalloutNextGenComponent.d.ts +2 -0
- package/lib/cjs/components/Callout/stories/CalloutNextGenComponent.js +33 -0
- package/lib/cjs/components/Callout/stories/NextGenCallout.chromatic.stories.d.ts +6 -0
- package/lib/cjs/components/Callout/stories/NextGenCallout.chromatic.stories.js +22 -0
- package/lib/cjs/components/Callout/stories/NextGenDarkCallout.chomatic.stories.d.ts +6 -0
- package/lib/cjs/components/Callout/stories/NextGenDarkCallout.chomatic.stories.js +22 -0
- package/lib/cjs/components/Card/Card.styles.d.ts +11 -0
- package/lib/cjs/components/Card/Card.styles.js +6 -1
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.mdx +1 -1
- package/lib/cjs/components/Table/Table.stories.js +4 -5
- package/lib/cjs/components/Table/Table.styles.d.ts +5 -3
- package/lib/cjs/components/Table/Table.styles.js +8 -6
- package/lib/cjs/components/TableBase/TableBase.d.ts +9 -0
- package/lib/cjs/components/TableBase/TableBase.js +238 -0
- package/lib/cjs/components/TableBase/TableBase.mdx +30 -0
- package/lib/cjs/components/TableBase/TableBase.stories.d.ts +6 -0
- package/lib/cjs/components/TableBase/TableBase.stories.js +111 -0
- package/lib/cjs/components/TableBase/TableBase.styles.d.ts +76 -0
- package/lib/cjs/components/TableBase/TableBase.styles.js +80 -0
- package/lib/cjs/components/TableBase/TableBase.test.d.ts +1 -0
- package/lib/cjs/components/TableBase/TableBase.test.js +122 -0
- package/lib/cjs/components/TableBase/index.d.ts +1 -0
- package/lib/cjs/components/TableBase/index.js +14 -0
- package/lib/cjs/components/TableBase/stories/NextGenDarkTableBase.chromatic.stories.d.ts +6 -0
- package/lib/cjs/components/TableBase/stories/NextGenDarkTableBase.chromatic.stories.js +22 -0
- package/lib/cjs/components/TableBase/stories/NextGenTableBase.chromatic.stories.d.ts +6 -0
- package/lib/cjs/components/TableBase/stories/NextGenTableBase.chromatic.stories.js +22 -0
- package/lib/cjs/components/TableBase/stories/NextGenTableBase.d.ts +3 -0
- package/lib/cjs/components/TableBase/stories/NextGenTableBase.js +67 -0
- package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +3 -41
- package/lib/cjs/index.d.ts +3 -2
- package/lib/cjs/index.js +74 -20
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/callout.d.ts +27 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/callout.js +35 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +48 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +24 -0
- 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 +1 -0
- package/lib/cjs/styles/themes/next-gen/colors/colors.js +2 -1
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +3 -2
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +179 -1
- package/lib/cjs/styles/themes/next-gen/variants/callout.d.ts +34 -0
- package/lib/cjs/styles/themes/next-gen/variants/callout.js +45 -0
- package/lib/cjs/styles/themes/next-gen/variants/cards.d.ts +14 -1
- package/lib/cjs/styles/themes/next-gen/variants/cards.js +7 -2
- package/lib/cjs/styles/themes/next-gen/variants/table.d.ts +45 -0
- package/lib/cjs/styles/themes/next-gen/variants/table.js +65 -0
- package/lib/cjs/styles/themes/next-gen/variants/tableBase.d.ts +86 -0
- package/lib/cjs/styles/themes/next-gen/variants/tableBase.js +99 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +164 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +7 -1
- package/lib/cjs/styles/variants/variants.js +5 -2
- package/lib/cjs/types/callout.d.ts +2 -0
- package/lib/cjs/types/cell.d.ts +12 -0
- package/lib/cjs/types/cell.js +6 -0
- package/lib/cjs/types/tableBase.d.ts +45 -0
- package/lib/cjs/types/tableBase.js +6 -0
- package/lib/cjs/utils/devUtils/constants/items.d.ts +10 -0
- package/lib/cjs/utils/devUtils/constants/items.js +87 -0
- package/lib/components/Button/Button.stories.js +5 -0
- package/lib/components/Button/Buttons.styles.js +9 -1
- package/lib/components/Callout/Callout.js +14 -16
- package/lib/components/Callout/Callout.stories.js +22 -0
- package/lib/components/Callout/Callout.styles.js +19 -24
- package/lib/components/Callout/stories/CalloutNextGenComponent.js +24 -0
- package/lib/components/Callout/stories/NextGenCallout.chromatic.stories.js +12 -0
- package/lib/components/Callout/stories/NextGenDarkCallout.chomatic.stories.js +12 -0
- package/lib/components/Card/Card.styles.js +6 -1
- package/lib/components/RockerButtonGroup/RockerButtonGroup.mdx +1 -1
- package/lib/components/Table/Table.stories.js +5 -6
- package/lib/components/Table/Table.styles.js +8 -6
- package/lib/components/TableBase/TableBase.js +221 -0
- package/lib/components/TableBase/TableBase.mdx +30 -0
- package/lib/components/TableBase/TableBase.stories.js +100 -0
- package/lib/components/TableBase/TableBase.styles.js +72 -0
- package/lib/components/TableBase/TableBase.test.js +119 -0
- package/lib/components/TableBase/index.js +1 -0
- package/lib/components/TableBase/stories/NextGenDarkTableBase.chromatic.stories.js +12 -0
- package/lib/components/TableBase/stories/NextGenTableBase.chromatic.stories.js +12 -0
- package/lib/components/TableBase/stories/NextGenTableBase.js +58 -0
- package/lib/index.js +3 -2
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/callout.js +27 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +24 -0
- package/lib/styles/themes/astro/customProperties/tShirtSizes.js +4 -4
- package/lib/styles/themes/next-gen/colors/colors.js +2 -1
- package/lib/styles/themes/next-gen/convertedComponentList.js +3 -2
- package/lib/styles/themes/next-gen/variants/callout.js +36 -0
- package/lib/styles/themes/next-gen/variants/cards.js +7 -2
- package/lib/styles/themes/next-gen/variants/table.js +57 -0
- package/lib/styles/themes/next-gen/variants/tableBase.js +91 -0
- package/lib/styles/themes/next-gen/variants/variants.js +7 -1
- package/lib/styles/variants/variants.js +5 -2
- package/lib/types/cell.js +1 -0
- package/lib/types/tableBase.js +1 -0
- package/lib/utils/devUtils/constants/items.js +79 -0
- package/package.json +1 -1
@@ -0,0 +1,119 @@
|
|
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
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './TableBase';
|
@@ -0,0 +1,12 @@
|
|
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
|
+
};
|
@@ -0,0 +1,12 @@
|
|
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
|
+
};
|
@@ -0,0 +1,58 @@
|
|
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;
|
package/lib/index.js
CHANGED
@@ -188,6 +188,8 @@ export { default as Tab } from './components/Tab';
|
|
188
188
|
export * from './components/Tab';
|
189
189
|
export { default as Table } from './components/Table';
|
190
190
|
export * from './components/Table';
|
191
|
+
export * from './components/TableBase';
|
192
|
+
export { default as TableBase } from './components/TableBase';
|
191
193
|
export { default as TableBody } from './components/TableBody';
|
192
194
|
export * from './components/TableBody';
|
193
195
|
export { default as TableCaption } from './components/TableCaption';
|
@@ -222,5 +224,4 @@ export { default as NextGenTheme } from './styles/themes/next-gen';
|
|
222
224
|
export { default as OnyxTheme } from './styles/themes/next-gen';
|
223
225
|
export * from './types';
|
224
226
|
export { OverlayProvider, useOverlayPosition, useOverlayTrigger } from 'react-aria';
|
225
|
-
export { Item, Section, useOverlayTriggerState, useTreeData } from 'react-stately';
|
226
|
-
export { TableBody as DataTableBody, Cell as DataTableCell, Column as DataTableColumn, TableHeader as DataTableHeader, Row as DataTableRow } from 'react-stately';
|
227
|
+
export { Cell, Column, TableBody as DataTableBody, Cell as DataTableCell, Column as DataTableColumn, TableHeader as DataTableHeader, Row as DataTableRow, Item, Row, Section, TableBody as TBody, TableHeader as THead, useOverlayTriggerState, useTreeData } from 'react-stately';
|
@@ -0,0 +1,27 @@
|
|
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,4 +1,5 @@
|
|
1
1
|
import { avatar } from './avatar';
|
2
|
+
import callout from './callout';
|
2
3
|
import { footer } from './footer';
|
3
4
|
import iconBadge from './iconBadge';
|
4
5
|
import { listView, listViewItem, lisViewItemChart } from './listview';
|
@@ -116,5 +117,28 @@ export default {
|
|
116
117
|
boxShadow: '0 0 0 3px inset #1a73e8'
|
117
118
|
}
|
118
119
|
}
|
120
|
+
},
|
121
|
+
callout: callout,
|
122
|
+
table: {
|
123
|
+
caption: {
|
124
|
+
color: 'text.secondary'
|
125
|
+
},
|
126
|
+
head: {
|
127
|
+
color: 'text.secondary'
|
128
|
+
},
|
129
|
+
data: {
|
130
|
+
color: 'text.secondary'
|
131
|
+
}
|
132
|
+
},
|
133
|
+
tableBase: {
|
134
|
+
caption: {
|
135
|
+
color: 'text.secondary'
|
136
|
+
},
|
137
|
+
head: {
|
138
|
+
color: 'text.secondary'
|
139
|
+
},
|
140
|
+
data: {
|
141
|
+
color: 'text.secondary'
|
142
|
+
}
|
119
143
|
}
|
120
144
|
};
|
@@ -99,7 +99,8 @@ var background = {
|
|
99
99
|
base: 'white',
|
100
100
|
secondary: nextGenColors['gray-100'],
|
101
101
|
card: nextGenColors['blue-100'],
|
102
|
-
suggestion: '#ecf0f5'
|
102
|
+
suggestion: '#ecf0f5',
|
103
|
+
hover: nextGenColors['gray-100']
|
103
104
|
};
|
104
105
|
var card = {
|
105
106
|
blue: nextGenColors['blue-100'],
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'RockerButtonGroup', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'NavigationHeader', 'Avatar', 'MultivaluesField', 'Text', 'Link', 'Card', 'IconWrapper', 'ComboBoxField', 'CodeView', 'Sticker Sheet', 'NextGen ListViewItem', 'Skeleton', 'TooltipTrigger', 'ListViewItem', 'Pagination'];
|
1
|
+
var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'RockerButtonGroup', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'NavigationHeader', 'Avatar', 'MultivaluesField', 'Text', 'Link', 'Card', 'IconWrapper', 'ComboBoxField', 'CodeView', 'Sticker Sheet', 'NextGen ListViewItem', 'Skeleton', 'TooltipTrigger', 'ListViewItem', 'Pagination', 'Callout', 'Table', 'TableBase'];
|
2
2
|
export var componentSpecificNextGenBlacklist = {
|
3
3
|
AstroProvider: ['Default', 'With Custom Theme Override'],
|
4
4
|
Badge: ['Status Badge Variants', 'Badge With Left Slot And Icon', 'Callout Badges', 'Removable'],
|
@@ -12,7 +12,8 @@ export var componentSpecificNextGenBlacklist = {
|
|
12
12
|
export var astroBlacklistStory = {
|
13
13
|
DataTable: ['Onyx Default'],
|
14
14
|
NavBar: ['Onyx Default'],
|
15
|
-
SearchField: ['Onyx With Filter']
|
15
|
+
SearchField: ['Onyx With Filter'],
|
16
|
+
Callout: ['Customizations']
|
16
17
|
};
|
17
18
|
export var nextGenOnlyComponents = ['NavigationHeader', 'Prompt', 'AI Panel', 'Response', 'Suggestions', 'Prompt Input', 'Footer'];
|
18
19
|
export default nextGenConvertedComponents;
|
@@ -0,0 +1,36 @@
|
|
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
|
+
};
|
@@ -28,7 +28,8 @@ var interactive = {
|
|
28
28
|
}
|
29
29
|
};
|
30
30
|
var container = _objectSpread(_objectSpread({}, flat), {}, {
|
31
|
-
p: 'lg'
|
31
|
+
p: 'lg',
|
32
|
+
borderColor: 'border.base'
|
32
33
|
});
|
33
34
|
var dark = _objectSpread(_objectSpread({}, flat), {}, {
|
34
35
|
border: 'none',
|
@@ -73,6 +74,9 @@ var suggestionRow = _objectSpread(_objectSpread({}, baseSuggestion), {}, {
|
|
73
74
|
var suggestionColumn = _objectSpread(_objectSpread({}, baseSuggestion), {}, {
|
74
75
|
display: 'flex'
|
75
76
|
});
|
77
|
+
var tableWrapper = _objectSpread(_objectSpread({}, container), {}, {
|
78
|
+
overflowY: 'hidden'
|
79
|
+
});
|
76
80
|
export default {
|
77
81
|
interactive: interactive,
|
78
82
|
dark: dark,
|
@@ -80,5 +84,6 @@ export default {
|
|
80
84
|
activeCard: activeCard,
|
81
85
|
container: container,
|
82
86
|
suggestionColumn: suggestionColumn,
|
83
|
-
suggestionRow: suggestionRow
|
87
|
+
suggestionRow: suggestionRow,
|
88
|
+
tableWrapper: tableWrapper
|
84
89
|
};
|
@@ -0,0 +1,57 @@
|
|
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
|
+
};
|
@@ -0,0 +1,91 @@
|
|
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
|
+
};
|
@@ -14,6 +14,7 @@ import skeleton from '../../../../components/Skeleton/Skeleton.styles';
|
|
14
14
|
import codeView from '../codeView/codeView';
|
15
15
|
import { avatar } from './avatar';
|
16
16
|
import button from './button';
|
17
|
+
import callout from './callout';
|
17
18
|
import { dataTable } from './dataTable';
|
18
19
|
import { footer } from './footer';
|
19
20
|
import iconWrapper from './iconWrapper';
|
@@ -26,6 +27,8 @@ import prompt from './prompt';
|
|
26
27
|
import response from './response';
|
27
28
|
import suggestion from './suggestion';
|
28
29
|
import suggestions from './suggestions';
|
30
|
+
import { table } from './table';
|
31
|
+
import { tableBase } from './tableBase';
|
29
32
|
import { menuTab, tab, tabs } from './tabs';
|
30
33
|
import tooltip from './tooltip';
|
31
34
|
var fieldHelperText = {
|
@@ -380,5 +383,8 @@ export default {
|
|
380
383
|
rockerButton: rockerButton,
|
381
384
|
tooltip: tooltip,
|
382
385
|
footer: footer,
|
383
|
-
loader: loader
|
386
|
+
loader: loader,
|
387
|
+
callout: callout,
|
388
|
+
table: table,
|
389
|
+
tableBase: tableBase
|
384
390
|
};
|
@@ -52,12 +52,13 @@ import skeleton from '../../components/Skeleton/Skeleton.styles';
|
|
52
52
|
import slider from '../../components/SliderField/Slider.styles';
|
53
53
|
import stepper from '../../components/Stepper/Stepper.styles';
|
54
54
|
import table from '../../components/Table/Table.styles';
|
55
|
+
import tableBase from '../../components/TableBase/TableBase.styles';
|
55
56
|
import * as tab from '../../components/Tabs/Tabs.style';
|
56
57
|
import timefield from '../../components/TimeField/TimeField.styles';
|
57
58
|
import timeZone from '../../components/TimeZonePicker/TimeZone.styles';
|
58
59
|
import tooltip from '../../components/TooltipTrigger/Tooltip.styles';
|
59
60
|
import treeView from '../../components/TreeView/TreeView.styles';
|
60
|
-
export default _objectSpread({
|
61
|
+
export default _objectSpread(_objectSpread({
|
61
62
|
accordion: accordion,
|
62
63
|
accordionGrid: accordionGrid,
|
63
64
|
box: box,
|
@@ -105,4 +106,6 @@ export default _objectSpread({
|
|
105
106
|
timeZone: timeZone,
|
106
107
|
tooltip: tooltip,
|
107
108
|
treeView: treeView
|
108
|
-
}, tab)
|
109
|
+
}, tab), {}, {
|
110
|
+
tableBase: tableBase
|
111
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|