@pingux/astro 1.28.0 → 1.28.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/CHANGELOG.md +12 -0
- package/lib/cjs/components/DataTable/DataTable.js +30 -26
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/styles/forms/index.js +1 -1
- package/lib/cjs/styles/forms/label.js +1 -1
- package/lib/cjs/styles/forms/select.js +1 -1
- package/lib/components/DataTable/DataTable.js +30 -25
- package/lib/index.js +1 -1
- package/lib/styles/forms/index.js +1 -1
- package/lib/styles/forms/label.js +1 -1
- package/lib/styles/forms/select.js +1 -1
- package/package.json +1 -9
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,18 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [1.28.1](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.28.0...@pingux/astro@1.28.1) (2022-09-22)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* Change DataTable prop type definitions for width and height ([e295973](https://gitlab.corp.pingidentity.com/ux/pingux/commit/e29597388e30eec017532a262bf79a37e147f87d))
|
12
|
+
* Hotfix to address React Spectrum build error happening for some users ([9dccf35](https://gitlab.corp.pingidentity.com/ux/pingux/commit/9dccf35dd2a91e2517c975812649592bef51ef43))
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
|
6
18
|
# [1.28.0](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.27.0...@pingux/astro@1.28.0) (2022-09-22)
|
7
19
|
|
8
20
|
|
@@ -46,8 +46,6 @@ var _virtualizer = require("@react-aria/virtualizer");
|
|
46
46
|
|
47
47
|
var _table = require("@react-stately/table");
|
48
48
|
|
49
|
-
var _utils2 = require("@react-spectrum/utils");
|
50
|
-
|
51
49
|
var _layout = require("@react-stately/layout");
|
52
50
|
|
53
51
|
var _table2 = require("@react-aria/table");
|
@@ -106,11 +104,9 @@ var ROW_HEIGHTS = {
|
|
106
104
|
*/
|
107
105
|
|
108
106
|
var DataTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
109
|
-
var
|
110
|
-
|
111
|
-
|
112
|
-
styleProps = _useStyleProps.styleProps;
|
113
|
-
|
107
|
+
var width = props.width,
|
108
|
+
height = props.height,
|
109
|
+
onAction = props.onAction;
|
114
110
|
var direction = 'ltr'; // useLocale override
|
115
111
|
|
116
112
|
var scale = 'large'; // useProvider override
|
@@ -243,7 +239,9 @@ var DataTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
243
239
|
style: {
|
244
240
|
whiteSpace: props.overflowMode === 'wrap' ? 'normal' : 'initial'
|
245
241
|
}
|
246
|
-
}, gridProps,
|
242
|
+
}, gridProps, {
|
243
|
+
width: width,
|
244
|
+
height: height,
|
247
245
|
layout: layout,
|
248
246
|
collection: state.collection,
|
249
247
|
focusedKey: state.selectionManager.focusedKey,
|
@@ -256,6 +254,30 @@ var DataTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
256
254
|
getColumnWidth: columnState.getColumnWidth
|
257
255
|
})));
|
258
256
|
});
|
257
|
+
DataTable.propTypes = {
|
258
|
+
/**
|
259
|
+
* Sets the amount of vertical padding within each cell.
|
260
|
+
* density: 'compact' | 'regular' | 'spacious'
|
261
|
+
* @default 'regular'
|
262
|
+
*/
|
263
|
+
density: _propTypes["default"].string,
|
264
|
+
|
265
|
+
/**
|
266
|
+
* Sets the overflow behavior for the cell contents.
|
267
|
+
* overflowMode: 'wrap' | 'truncate'
|
268
|
+
* @default 'truncate'
|
269
|
+
*/
|
270
|
+
overflowMode: _propTypes["default"].string,
|
271
|
+
|
272
|
+
/** Handler that is called when a user performs an action on a row. */
|
273
|
+
onAction: _propTypes["default"].func,
|
274
|
+
width: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
|
275
|
+
height: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number])
|
276
|
+
};
|
277
|
+
DataTable.defaultProps = {
|
278
|
+
width: '100%',
|
279
|
+
height: 565
|
280
|
+
};
|
259
281
|
|
260
282
|
function TableHeader(_ref) {
|
261
283
|
var children = _ref.children,
|
@@ -423,24 +445,6 @@ function CenteredWrapper(_ref6) {
|
|
423
445
|
}, children));
|
424
446
|
}
|
425
447
|
|
426
|
-
DataTable.propTypes = {
|
427
|
-
/**
|
428
|
-
* Sets the amount of vertical padding within each cell.
|
429
|
-
* density: 'compact' | 'regular' | 'spacious'
|
430
|
-
* @default 'regular'
|
431
|
-
*/
|
432
|
-
density: _propTypes["default"].string,
|
433
|
-
|
434
|
-
/**
|
435
|
-
* Sets the overflow behavior for the cell contents.
|
436
|
-
* overflowMode: 'wrap' | 'truncate'
|
437
|
-
* @default 'truncate'
|
438
|
-
*/
|
439
|
-
overflowMode: _propTypes["default"].string,
|
440
|
-
|
441
|
-
/** Handler that is called when a user performs an action on a row. */
|
442
|
-
onAction: _propTypes["default"].func
|
443
|
-
};
|
444
448
|
TableCell.propTypes = {
|
445
449
|
cell: _propTypes["default"].shape({
|
446
450
|
column: _propTypes["default"].shape({
|
package/lib/cjs/index.js
CHANGED
@@ -1804,7 +1804,7 @@ _forEachInstanceProperty(_context69 = _Object$keys(_DataTable)).call(_context69,
|
|
1804
1804
|
});
|
1805
1805
|
});
|
1806
1806
|
|
1807
|
-
var _table = require("@react-
|
1807
|
+
var _table = require("@react-stately/table");
|
1808
1808
|
|
1809
1809
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
1810
1810
|
|
@@ -56,7 +56,7 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
|
|
56
56
|
|
57
57
|
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) { (0, _defineProperty2["default"])(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; }
|
58
58
|
|
59
|
-
// See
|
59
|
+
// See ThemeUI docs on variants and themes for intended structure
|
60
60
|
// Variants should be defined in the approprate file.
|
61
61
|
var _default = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, checkbox), {}, {
|
62
62
|
comboBox: _comboBox["default"]
|
@@ -79,7 +79,7 @@ label.radio = _objectSpread(_objectSpread({}, _text.text.base), {}, {
|
|
79
79
|
cursor: 'pointer',
|
80
80
|
alignItems: 'center',
|
81
81
|
mb: 'xs'
|
82
|
-
}); // NOTE:
|
82
|
+
}); // NOTE: ThemeUI label adds 'flex' after other styles, so we have to use !important to override it
|
83
83
|
|
84
84
|
label.checkbox = _objectSpread(_objectSpread({}, _text.text.base), {}, {
|
85
85
|
display: 'inline-flex !important',
|
@@ -58,7 +58,7 @@ select.currentValue = {
|
|
58
58
|
overflow: 'hidden',
|
59
59
|
whiteSpace: 'nowrap',
|
60
60
|
textOverflow: 'ellipsis',
|
61
|
-
//
|
61
|
+
// ThemeUI adds display: flex after other styles and ellipsis goes away
|
62
62
|
display: 'inline !important'
|
63
63
|
};
|
64
64
|
select.listBoxPopup = _objectSpread(_objectSpread({}, _input.input), {}, {
|
@@ -23,7 +23,6 @@ import { FocusRing, useFocusRing } from '@react-aria/focus';
|
|
23
23
|
import { VisuallyHidden } from '@react-aria/visually-hidden';
|
24
24
|
import { layoutInfoToStyle, VirtualizerItem } from '@react-aria/virtualizer';
|
25
25
|
import { useTableColumnResizeState, useTableState } from '@react-stately/table';
|
26
|
-
import { useStyleProps } from '@react-spectrum/utils';
|
27
26
|
import { TableLayout } from '@react-stately/layout';
|
28
27
|
import { useTable, useTableCell, useTableColumnHeader, useTableHeaderRow, useTableRow, useTableRowGroup } from '@react-aria/table';
|
29
28
|
import PropTypes from 'prop-types';
|
@@ -60,11 +59,9 @@ var ROW_HEIGHTS = {
|
|
60
59
|
*/
|
61
60
|
|
62
61
|
var DataTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
63
|
-
var
|
64
|
-
|
65
|
-
|
66
|
-
styleProps = _useStyleProps.styleProps;
|
67
|
-
|
62
|
+
var width = props.width,
|
63
|
+
height = props.height,
|
64
|
+
onAction = props.onAction;
|
68
65
|
var direction = 'ltr'; // useLocale override
|
69
66
|
|
70
67
|
var scale = 'large'; // useProvider override
|
@@ -197,7 +194,9 @@ var DataTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
197
194
|
style: {
|
198
195
|
whiteSpace: props.overflowMode === 'wrap' ? 'normal' : 'initial'
|
199
196
|
}
|
200
|
-
}, gridProps,
|
197
|
+
}, gridProps, {
|
198
|
+
width: width,
|
199
|
+
height: height,
|
201
200
|
layout: layout,
|
202
201
|
collection: state.collection,
|
203
202
|
focusedKey: state.selectionManager.focusedKey,
|
@@ -210,6 +209,30 @@ var DataTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
210
209
|
getColumnWidth: columnState.getColumnWidth
|
211
210
|
})));
|
212
211
|
});
|
212
|
+
DataTable.propTypes = {
|
213
|
+
/**
|
214
|
+
* Sets the amount of vertical padding within each cell.
|
215
|
+
* density: 'compact' | 'regular' | 'spacious'
|
216
|
+
* @default 'regular'
|
217
|
+
*/
|
218
|
+
density: PropTypes.string,
|
219
|
+
|
220
|
+
/**
|
221
|
+
* Sets the overflow behavior for the cell contents.
|
222
|
+
* overflowMode: 'wrap' | 'truncate'
|
223
|
+
* @default 'truncate'
|
224
|
+
*/
|
225
|
+
overflowMode: PropTypes.string,
|
226
|
+
|
227
|
+
/** Handler that is called when a user performs an action on a row. */
|
228
|
+
onAction: PropTypes.func,
|
229
|
+
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
230
|
+
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
231
|
+
};
|
232
|
+
DataTable.defaultProps = {
|
233
|
+
width: '100%',
|
234
|
+
height: 565
|
235
|
+
};
|
213
236
|
|
214
237
|
function TableHeader(_ref) {
|
215
238
|
var children = _ref.children,
|
@@ -378,24 +401,6 @@ function CenteredWrapper(_ref6) {
|
|
378
401
|
}, children));
|
379
402
|
}
|
380
403
|
|
381
|
-
DataTable.propTypes = {
|
382
|
-
/**
|
383
|
-
* Sets the amount of vertical padding within each cell.
|
384
|
-
* density: 'compact' | 'regular' | 'spacious'
|
385
|
-
* @default 'regular'
|
386
|
-
*/
|
387
|
-
density: PropTypes.string,
|
388
|
-
|
389
|
-
/**
|
390
|
-
* Sets the overflow behavior for the cell contents.
|
391
|
-
* overflowMode: 'wrap' | 'truncate'
|
392
|
-
* @default 'truncate'
|
393
|
-
*/
|
394
|
-
overflowMode: PropTypes.string,
|
395
|
-
|
396
|
-
/** Handler that is called when a user performs an action on a row. */
|
397
|
-
onAction: PropTypes.func
|
398
|
-
};
|
399
404
|
TableCell.propTypes = {
|
400
405
|
cell: PropTypes.shape({
|
401
406
|
column: PropTypes.shape({
|
package/lib/index.js
CHANGED
@@ -154,4 +154,4 @@ export { OverlayProvider, useOverlayPosition, useOverlayTrigger } from '@react-a
|
|
154
154
|
export { useOverlayTriggerState } from '@react-stately/overlays';
|
155
155
|
export { default as DataTable } from './components/DataTable';
|
156
156
|
export * from './components/DataTable';
|
157
|
-
export { Cell as DataTableCell, Column as DataTableColumn, Row as DataTableRow, TableBody as DataTableBody, TableHeader as DataTableHeader } from '@react-
|
157
|
+
export { Cell as DataTableCell, Column as DataTableColumn, Row as DataTableRow, TableBody as DataTableBody, TableHeader as DataTableHeader } from '@react-stately/table';
|
@@ -21,7 +21,7 @@ import search from './search';
|
|
21
21
|
import * as select from './select';
|
22
22
|
import * as switchable from './switch'; // 'switch' is a reserved keyword
|
23
23
|
|
24
|
-
import * as textarea from './textarea'; // See
|
24
|
+
import * as textarea from './textarea'; // See ThemeUI docs on variants and themes for intended structure
|
25
25
|
// Variants should be defined in the approprate file.
|
26
26
|
|
27
27
|
export default _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, checkbox), {}, {
|
@@ -59,7 +59,7 @@ label.radio = _objectSpread(_objectSpread({}, text.base), {}, {
|
|
59
59
|
cursor: 'pointer',
|
60
60
|
alignItems: 'center',
|
61
61
|
mb: 'xs'
|
62
|
-
}); // NOTE:
|
62
|
+
}); // NOTE: ThemeUI label adds 'flex' after other styles, so we have to use !important to override it
|
63
63
|
|
64
64
|
label.checkbox = _objectSpread(_objectSpread({}, text.base), {}, {
|
65
65
|
display: 'inline-flex !important',
|
@@ -37,7 +37,7 @@ select.currentValue = {
|
|
37
37
|
overflow: 'hidden',
|
38
38
|
whiteSpace: 'nowrap',
|
39
39
|
textOverflow: 'ellipsis',
|
40
|
-
//
|
40
|
+
// ThemeUI adds display: flex after other styles and ellipsis goes away
|
41
41
|
display: 'inline !important'
|
42
42
|
};
|
43
43
|
select.listBoxPopup = _objectSpread(_objectSpread({}, input), {}, {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pingux/astro",
|
3
|
-
"version": "1.28.
|
3
|
+
"version": "1.28.1",
|
4
4
|
"description": "PingUX themeable React component library",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -66,10 +66,6 @@
|
|
66
66
|
"@react-aria/utils": "^3.12.0",
|
67
67
|
"@react-aria/virtualizer": "^3.3.2",
|
68
68
|
"@react-aria/visually-hidden": "3.2.1",
|
69
|
-
"@react-spectrum/provider": "^3.2.1",
|
70
|
-
"@react-spectrum/table": "^3.3.0",
|
71
|
-
"@react-spectrum/tooltip": "^3.2.1",
|
72
|
-
"@react-spectrum/utils": "3.6.1",
|
73
69
|
"@react-stately/collections": "~3.3.8",
|
74
70
|
"@react-stately/color": "^3.0.0-beta.2",
|
75
71
|
"@react-stately/combobox": "^3.0.0",
|
@@ -92,11 +88,9 @@
|
|
92
88
|
"@react-stately/tree": "^3.1.2",
|
93
89
|
"@react-stately/utils": "~3.4.1",
|
94
90
|
"@react-stately/virtualizer": "^3.2.1",
|
95
|
-
"@rebass/forms": "^4.0.6",
|
96
91
|
"@styled-system/prop-types": "^5.1.5",
|
97
92
|
"@styled-system/props": "^5.1.5",
|
98
93
|
"@styled-system/theme-get": "^5.1.2",
|
99
|
-
"@tippyjs/react": "4.2.0",
|
100
94
|
"chroma-js": "^2.1.0",
|
101
95
|
"classnames": "^2.2.6",
|
102
96
|
"emotion-normalize": "^11.0.1",
|
@@ -109,12 +103,10 @@
|
|
109
103
|
"react-calendar": "^3.4.0",
|
110
104
|
"react-color": "^2.19.3",
|
111
105
|
"react-dropzone": "^11.4.2",
|
112
|
-
"rebass": "^4.0.7",
|
113
106
|
"recharts": "^2.1.4",
|
114
107
|
"regenerator-runtime": "^0.13.7",
|
115
108
|
"styled-system": "^5.1.5",
|
116
109
|
"theme-ui": "^0.10.0",
|
117
|
-
"tippy.js": "6.2.7",
|
118
110
|
"uuid": "^8.3.2"
|
119
111
|
},
|
120
112
|
"devDependencies": {
|