glints-aries 4.0.305 → 4.0.307

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.
@@ -19,7 +19,7 @@ export interface DataTableProps extends React.TableHTMLAttributes<HTMLTableEleme
19
19
  }
20
20
  export declare const DataTable: React.ForwardRefExoticComponent<DataTableProps & React.RefAttributes<HTMLTableElement>> & {
21
21
  Row: ({ children, ...props }: import("./TableRow").TableRowProps) => JSX.Element;
22
- Cell: ({ align, children, noWrap, }: import("./TableCell").TableCellProps) => JSX.Element;
22
+ Cell: ({ align, children, noWrap, verticalAlign, }: import("./TableCell").TableCellProps) => JSX.Element;
23
23
  Footer: ({ children }: {
24
24
  children: React.ReactNode;
25
25
  }) => JSX.Element;
@@ -54,7 +54,7 @@ var DataTableComponent = /*#__PURE__*/React.forwardRef(function DataTable(_ref,
54
54
  align: align
55
55
  }, /*#__PURE__*/React.createElement(Typography, {
56
56
  as: "div",
57
- variant: "body2"
57
+ variant: "caption"
58
58
  }, title));
59
59
  }) : null;
60
60
  var footer;
@@ -4,3 +4,4 @@ export default _default;
4
4
  export declare const Interactive: any;
5
5
  export declare const WithEmptyState: any;
6
6
  export declare const WithNoWrapCell: any;
7
+ export declare const VerticalAlignCenterCell: any;
@@ -2,8 +2,9 @@ import styled from 'styled-components';
2
2
  import * as DropShadow from '../utilities/dropShadow';
3
3
  import { borderRadius8 } from '../utilities/borderRadius';
4
4
  import { Blue, Neutral } from '../utilities/colors';
5
- import { space16 } from '../utilities/spacing';
5
+ import { space16, space8 } from '../utilities/spacing';
6
6
  var alignmentStyle = "\n&[data-text-align='right'] {\n > div {\n display: flex;\n justify-content: right;\n }\n}\n\n&[data-text-align='center'] {\n > div {\n display: flex;\n justify-content: center;\n }\n}\n";
7
+ var cellVerticalAlign = "\n&[data-vertical-align='top'] {\n vertical-align: top;\n}\n\n&[data-vertical-align='center'] {\n vertical-align: center;\n}\n";
7
8
  export var StyledTable = styled.table.withConfig({
8
9
  displayName: "DataTableStyle__StyledTable",
9
10
  componentId: "sc-18v2ula-0"
@@ -15,15 +16,15 @@ export var StyledTableRow = styled.tr.withConfig({
15
16
  export var StyledTabledHeader = styled.th.withConfig({
16
17
  displayName: "DataTableStyle__StyledTabledHeader",
17
18
  componentId: "sc-18v2ula-2"
18
- })(["padding:", ";text-align:left;", " button{padding:0;margin:0;height:auto;border:none;box-shadow:none;background:", ";}button:hover{background:transparent;}button:active{border:none;box-shadow:none;background:transparent;}button:focus{border:none;}button svg{width:24px;height:24px;fill:", ";}"], space16, alignmentStyle, Neutral.B99, Neutral.B40);
19
+ })(["padding:", ";text-align:left;", " button{padding:0;margin:0;height:auto;border:none;box-shadow:none;background:", ";}button:hover{background:transparent;}button:active{border:none;box-shadow:none;background:transparent;}button:focus{border:none;}button svg{width:16px;height:16px;fill:", ";margin-bottom:2px;}"], space16, alignmentStyle, Neutral.B99, Neutral.B40);
19
20
  export var StyledTableCell = styled.td.withConfig({
20
21
  displayName: "DataTableStyle__StyledTableCell",
21
22
  componentId: "sc-18v2ula-3"
22
- })(["text-align:left;padding:", ";vertical-align:top;", " &[data-no-wrap='true']{white-space:nowrap;div{width:max-content;}}"], space16, alignmentStyle);
23
+ })(["text-align:left;padding:", " ", ";", " ", " &[data-no-wrap='true']{white-space:nowrap;div{width:max-content;}}"], space8, space16, alignmentStyle, cellVerticalAlign);
23
24
  export var StyledTableFooterRow = styled.tr.withConfig({
24
25
  displayName: "DataTableStyle__StyledTableFooterRow",
25
26
  componentId: "sc-18v2ula-4"
26
- })(["background:", ";border-top:0;border-radius:0px 0px ", " ", ";td{padding:", ";}"], Neutral.B100, borderRadius8, borderRadius8, space16);
27
+ })(["background:", ";border-top:0;border-radius:0px 0px ", " ", ";td{padding:", " ", ";}"], Neutral.B100, borderRadius8, borderRadius8, space8, space16);
27
28
  export var StyledTableLoadingRow = styled(StyledTableRow).withConfig({
28
29
  displayName: "DataTableStyle__StyledTableLoadingRow",
29
30
  componentId: "sc-18v2ula-5"
@@ -3,5 +3,6 @@ export interface TableCellProps extends React.TdHTMLAttributes<HTMLTableColEleme
3
3
  children: React.ReactNode;
4
4
  /** Sets table cell content to not wrap*/
5
5
  noWrap?: boolean;
6
+ verticalAlign?: 'top' | 'center';
6
7
  }
7
- export declare const TableCell: ({ align, children, noWrap, }: TableCellProps) => JSX.Element;
8
+ export declare const TableCell: ({ align, children, noWrap, verticalAlign, }: TableCellProps) => JSX.Element;
@@ -5,12 +5,15 @@ export var TableCell = function TableCell(_ref) {
5
5
  var align = _ref.align,
6
6
  children = _ref.children,
7
7
  _ref$noWrap = _ref.noWrap,
8
- noWrap = _ref$noWrap === void 0 ? false : _ref$noWrap;
8
+ noWrap = _ref$noWrap === void 0 ? false : _ref$noWrap,
9
+ _ref$verticalAlign = _ref.verticalAlign,
10
+ verticalAlign = _ref$verticalAlign === void 0 ? 'top' : _ref$verticalAlign;
9
11
  return /*#__PURE__*/React.createElement(StyledTableCell, {
10
12
  "data-text-align": align,
11
- "data-no-wrap": noWrap
13
+ "data-no-wrap": noWrap,
14
+ "data-vertical-align": verticalAlign
12
15
  }, /*#__PURE__*/React.createElement(Typography, {
13
16
  as: "div",
14
- variant: "body1"
17
+ variant: "subtitle2"
15
18
  }, children));
16
19
  };
@@ -16,13 +16,16 @@ export var TableHeader = function TableHeader(_ref) {
16
16
  useEffect(function () {
17
17
  setSortDirection(sortDirectionProp);
18
18
  }, [sortDirectionProp]);
19
- var iconName = sortDirection === 'ASCENDING' ? 'ri-arrow-xs-up-fill' : 'ri-arrow-xs-down-fill';
19
+ var iconName = sortDirection === 'ASCENDING' ? 'ri-arrow-up-line' : 'ri-arrow-down-line';
20
20
  var iconMarkup = sortDirection ? /*#__PURE__*/React.createElement(Icon, {
21
- name: iconName
21
+ className: "data-table-sort-button-icon",
22
+ name: iconName,
23
+ height: "10px",
24
+ fill: Neutral.B40
22
25
  }) : null;
23
26
  var titleMarkup = /*#__PURE__*/React.createElement(Typography, {
24
27
  as: "span",
25
- variant: "body2",
28
+ variant: "caption",
26
29
  color: Neutral.B18,
27
30
  style: {
28
31
  whiteSpace: 'nowrap'
@@ -37,6 +40,7 @@ export var TableHeader = function TableHeader(_ref) {
37
40
  onSort == null ? void 0 : onSort(direction);
38
41
  };
39
42
  var sortableCellMarkup = /*#__PURE__*/React.createElement(Button, {
43
+ className: "data-table-sort-button",
40
44
  "data-testid": "data-table-sort-button-" + title,
41
45
  icon: iconMarkup,
42
46
  onClick: function onClick() {
@@ -18,6 +18,6 @@ export var PageButton = function PageButton(_ref) {
18
18
  }
19
19
  }, props), /*#__PURE__*/React.createElement(Typography, {
20
20
  as: "div",
21
- variant: "body1"
21
+ variant: "subtitle2"
22
22
  }, content));
23
23
  };
@@ -52,7 +52,7 @@ export var SimplePagination = /*#__PURE__*/React.forwardRef(function SimplePagin
52
52
  onClick: handlePageNumberChange
53
53
  }, /*#__PURE__*/React.createElement(Typography, {
54
54
  as: "div",
55
- variant: "body1"
55
+ variant: "subtitle2"
56
56
  }, currentPage)), editMode && /*#__PURE__*/React.createElement(StyledSimplePaginationInput, {
57
57
  "data-testid": "current-page-input",
58
58
  autoFocus: true,
@@ -68,12 +68,12 @@ export var SimplePagination = /*#__PURE__*/React.forwardRef(function SimplePagin
68
68
  disabled: disabled
69
69
  }, /*#__PURE__*/React.createElement(Typography, {
70
70
  as: "div",
71
- variant: "body1"
71
+ variant: "subtitle2"
72
72
  }, "/")), /*#__PURE__*/React.createElement(StyledSimplePaginationButton, {
73
73
  disabled: disabled
74
74
  }, /*#__PURE__*/React.createElement(Typography, {
75
75
  as: "div",
76
- variant: "body1"
76
+ variant: "subtitle2"
77
77
  }, totalPages)), /*#__PURE__*/React.createElement(NextStepper, {
78
78
  value: currentPage + 1,
79
79
  disabled: !hasNext || disabled,
@@ -19,7 +19,7 @@ export interface DataTableProps extends React.TableHTMLAttributes<HTMLTableEleme
19
19
  }
20
20
  export declare const DataTable: React.ForwardRefExoticComponent<DataTableProps & React.RefAttributes<HTMLTableElement>> & {
21
21
  Row: ({ children, ...props }: import("./TableRow").TableRowProps) => JSX.Element;
22
- Cell: ({ align, children, noWrap, }: import("./TableCell").TableCellProps) => JSX.Element;
22
+ Cell: ({ align, children, noWrap, verticalAlign, }: import("./TableCell").TableCellProps) => JSX.Element;
23
23
  Footer: ({ children }: {
24
24
  children: React.ReactNode;
25
25
  }) => JSX.Element;
@@ -59,7 +59,7 @@ var DataTableComponent = /*#__PURE__*/_react["default"].forwardRef(function Data
59
59
  align: align
60
60
  }, /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
61
61
  as: "div",
62
- variant: "body2"
62
+ variant: "caption"
63
63
  }, title));
64
64
  }) : null;
65
65
  var footer;
@@ -4,3 +4,4 @@ export default _default;
4
4
  export declare const Interactive: any;
5
5
  export declare const WithEmptyState: any;
6
6
  export declare const WithNoWrapCell: any;
7
+ export declare const VerticalAlignCenterCell: any;
@@ -11,6 +11,7 @@ var _spacing = require("../utilities/spacing");
11
11
  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); }
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
13
  var alignmentStyle = "\n&[data-text-align='right'] {\n > div {\n display: flex;\n justify-content: right;\n }\n}\n\n&[data-text-align='center'] {\n > div {\n display: flex;\n justify-content: center;\n }\n}\n";
14
+ var cellVerticalAlign = "\n&[data-vertical-align='top'] {\n vertical-align: top;\n}\n\n&[data-vertical-align='center'] {\n vertical-align: center;\n}\n";
14
15
  var StyledTable = _styledComponents["default"].table.withConfig({
15
16
  displayName: "DataTableStyle__StyledTable",
16
17
  componentId: "sc-18v2ula-0"
@@ -24,17 +25,17 @@ exports.StyledTableRow = StyledTableRow;
24
25
  var StyledTabledHeader = _styledComponents["default"].th.withConfig({
25
26
  displayName: "DataTableStyle__StyledTabledHeader",
26
27
  componentId: "sc-18v2ula-2"
27
- })(["padding:", ";text-align:left;", " button{padding:0;margin:0;height:auto;border:none;box-shadow:none;background:", ";}button:hover{background:transparent;}button:active{border:none;box-shadow:none;background:transparent;}button:focus{border:none;}button svg{width:24px;height:24px;fill:", ";}"], _spacing.space16, alignmentStyle, _colors.Neutral.B99, _colors.Neutral.B40);
28
+ })(["padding:", ";text-align:left;", " button{padding:0;margin:0;height:auto;border:none;box-shadow:none;background:", ";}button:hover{background:transparent;}button:active{border:none;box-shadow:none;background:transparent;}button:focus{border:none;}button svg{width:16px;height:16px;fill:", ";margin-bottom:2px;}"], _spacing.space16, alignmentStyle, _colors.Neutral.B99, _colors.Neutral.B40);
28
29
  exports.StyledTabledHeader = StyledTabledHeader;
29
30
  var StyledTableCell = _styledComponents["default"].td.withConfig({
30
31
  displayName: "DataTableStyle__StyledTableCell",
31
32
  componentId: "sc-18v2ula-3"
32
- })(["text-align:left;padding:", ";vertical-align:top;", " &[data-no-wrap='true']{white-space:nowrap;div{width:max-content;}}"], _spacing.space16, alignmentStyle);
33
+ })(["text-align:left;padding:", " ", ";", " ", " &[data-no-wrap='true']{white-space:nowrap;div{width:max-content;}}"], _spacing.space8, _spacing.space16, alignmentStyle, cellVerticalAlign);
33
34
  exports.StyledTableCell = StyledTableCell;
34
35
  var StyledTableFooterRow = _styledComponents["default"].tr.withConfig({
35
36
  displayName: "DataTableStyle__StyledTableFooterRow",
36
37
  componentId: "sc-18v2ula-4"
37
- })(["background:", ";border-top:0;border-radius:0px 0px ", " ", ";td{padding:", ";}"], _colors.Neutral.B100, _borderRadius.borderRadius8, _borderRadius.borderRadius8, _spacing.space16);
38
+ })(["background:", ";border-top:0;border-radius:0px 0px ", " ", ";td{padding:", " ", ";}"], _colors.Neutral.B100, _borderRadius.borderRadius8, _borderRadius.borderRadius8, _spacing.space8, _spacing.space16);
38
39
  exports.StyledTableFooterRow = StyledTableFooterRow;
39
40
  var StyledTableLoadingRow = (0, _styledComponents["default"])(StyledTableRow).withConfig({
40
41
  displayName: "DataTableStyle__StyledTableLoadingRow",
@@ -3,5 +3,6 @@ export interface TableCellProps extends React.TdHTMLAttributes<HTMLTableColEleme
3
3
  children: React.ReactNode;
4
4
  /** Sets table cell content to not wrap*/
5
5
  noWrap?: boolean;
6
+ verticalAlign?: 'top' | 'center';
6
7
  }
7
- export declare const TableCell: ({ align, children, noWrap, }: TableCellProps) => JSX.Element;
8
+ export declare const TableCell: ({ align, children, noWrap, verticalAlign, }: TableCellProps) => JSX.Element;
@@ -10,13 +10,16 @@ var TableCell = function TableCell(_ref) {
10
10
  var align = _ref.align,
11
11
  children = _ref.children,
12
12
  _ref$noWrap = _ref.noWrap,
13
- noWrap = _ref$noWrap === void 0 ? false : _ref$noWrap;
13
+ noWrap = _ref$noWrap === void 0 ? false : _ref$noWrap,
14
+ _ref$verticalAlign = _ref.verticalAlign,
15
+ verticalAlign = _ref$verticalAlign === void 0 ? 'top' : _ref$verticalAlign;
14
16
  return /*#__PURE__*/_react["default"].createElement(_DataTableStyle.StyledTableCell, {
15
17
  "data-text-align": align,
16
- "data-no-wrap": noWrap
18
+ "data-no-wrap": noWrap,
19
+ "data-vertical-align": verticalAlign
17
20
  }, /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
18
21
  as: "div",
19
- variant: "body1"
22
+ variant: "subtitle2"
20
23
  }, children));
21
24
  };
22
25
  exports.TableCell = TableCell;
@@ -22,13 +22,16 @@ var TableHeader = function TableHeader(_ref) {
22
22
  (0, _react.useEffect)(function () {
23
23
  setSortDirection(sortDirectionProp);
24
24
  }, [sortDirectionProp]);
25
- var iconName = sortDirection === 'ASCENDING' ? 'ri-arrow-xs-up-fill' : 'ri-arrow-xs-down-fill';
25
+ var iconName = sortDirection === 'ASCENDING' ? 'ri-arrow-up-line' : 'ri-arrow-down-line';
26
26
  var iconMarkup = sortDirection ? /*#__PURE__*/_react["default"].createElement(_Icon.Icon, {
27
- name: iconName
27
+ className: "data-table-sort-button-icon",
28
+ name: iconName,
29
+ height: "10px",
30
+ fill: _colors.Neutral.B40
28
31
  }) : null;
29
32
  var titleMarkup = /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
30
33
  as: "span",
31
- variant: "body2",
34
+ variant: "caption",
32
35
  color: _colors.Neutral.B18,
33
36
  style: {
34
37
  whiteSpace: 'nowrap'
@@ -43,6 +46,7 @@ var TableHeader = function TableHeader(_ref) {
43
46
  onSort == null ? void 0 : onSort(direction);
44
47
  };
45
48
  var sortableCellMarkup = /*#__PURE__*/_react["default"].createElement(_Button.Button, {
49
+ className: "data-table-sort-button",
46
50
  "data-testid": "data-table-sort-button-" + title,
47
51
  icon: iconMarkup,
48
52
  onClick: function onClick() {
@@ -23,7 +23,7 @@ var PageButton = function PageButton(_ref) {
23
23
  }
24
24
  }, props), /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
25
25
  as: "div",
26
- variant: "body1"
26
+ variant: "subtitle2"
27
27
  }, content));
28
28
  };
29
29
  exports.PageButton = PageButton;
@@ -58,7 +58,7 @@ var SimplePagination = /*#__PURE__*/_react["default"].forwardRef(function Simple
58
58
  onClick: handlePageNumberChange
59
59
  }, /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
60
60
  as: "div",
61
- variant: "body1"
61
+ variant: "subtitle2"
62
62
  }, currentPage)), editMode && /*#__PURE__*/_react["default"].createElement(_PaginationStyle.StyledSimplePaginationInput, {
63
63
  "data-testid": "current-page-input",
64
64
  autoFocus: true,
@@ -74,12 +74,12 @@ var SimplePagination = /*#__PURE__*/_react["default"].forwardRef(function Simple
74
74
  disabled: disabled
75
75
  }, /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
76
76
  as: "div",
77
- variant: "body1"
77
+ variant: "subtitle2"
78
78
  }, "/")), /*#__PURE__*/_react["default"].createElement(_PaginationStyle.StyledSimplePaginationButton, {
79
79
  disabled: disabled
80
80
  }, /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
81
81
  as: "div",
82
- variant: "body1"
82
+ variant: "subtitle2"
83
83
  }, totalPages)), /*#__PURE__*/_react["default"].createElement(_Stepper.NextStepper, {
84
84
  value: currentPage + 1,
85
85
  disabled: !hasNext || disabled,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glints-aries",
3
- "version": "4.0.305",
3
+ "version": "4.0.307",
4
4
  "description": "Glints ui-kit for frontend",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",