@spaced-out/ui-design-system 0.1.37 → 0.1.39
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 +19 -0
- package/lib/components/ButtonDropdown/ButtonDropdown.js +2 -0
- package/lib/components/ButtonDropdown/ButtonDropdown.js.flow +2 -0
- package/lib/components/Dropdown/SimpleDropdown.js +0 -1
- package/lib/components/Dropdown/SimpleDropdown.js.flow +0 -1
- package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.js +17 -3
- package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.js.flow +27 -6
- package/lib/components/Table/TableActionBar.js +25 -0
- package/lib/components/Table/TableActionBar.js.flow +28 -0
- package/lib/components/Table/TableBar.module.css +47 -0
- package/lib/components/Table/TableBottomBar.js +25 -0
- package/lib/components/Table/TableBottomBar.js.flow +28 -0
- package/lib/components/Table/TableTopBar.js +25 -0
- package/lib/components/Table/TableTopBar.js.flow +28 -0
- package/lib/components/Table/dummyTableData.js +865 -0
- package/lib/components/Table/dummyTableData.js.flow +967 -0
- package/lib/components/Table/index.js +33 -0
- package/lib/components/Table/index.js.flow +3 -0
- package/lib/components/Typeahead/SimpleTypeahead.js +0 -1
- package/lib/components/Typeahead/SimpleTypeahead.js.flow +0 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.39](https://github.com/spaced-out/ui-design-system/compare/v0.1.38...v0.1.39) (2023-07-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* table top bottom action bar and other enhancements ([#129](https://github.com/spaced-out/ui-design-system/issues/129)) ([6d6a281](https://github.com/spaced-out/ui-design-system/commit/6d6a281d092c5d34e97dbeba79d23e449ae01406))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* typo fixes ([2c028d3](https://github.com/spaced-out/ui-design-system/commit/2c028d3fc6e02ed30f4c259ee4396bfcbe1e3eed))
|
|
16
|
+
|
|
17
|
+
### [0.1.38](https://github.com/spaced-out/ui-design-system/compare/v0.1.37...v0.1.38) (2023-07-19)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* focus manager with arrow key navigation enhancements ([#127](https://github.com/spaced-out/ui-design-system/issues/127)) ([ca183a0](https://github.com/spaced-out/ui-design-system/commit/ca183a04a6dc5c11cbe24267cf95471ef9f698e5))
|
|
23
|
+
|
|
5
24
|
### [0.1.37](https://github.com/spaced-out/ui-design-system/compare/v0.1.37-beta.1...v0.1.37) (2023-07-18)
|
|
6
25
|
|
|
7
26
|
|
|
@@ -43,6 +43,7 @@ const ButtonDropdown = /*#__PURE__*/React.forwardRef((_ref, forwardRef) => {
|
|
|
43
43
|
iconRightType = 'solid',
|
|
44
44
|
isFluid,
|
|
45
45
|
tooltip,
|
|
46
|
+
onClick,
|
|
46
47
|
...restButtonProps
|
|
47
48
|
} = _ref;
|
|
48
49
|
const menuBtnRef = React.useRef(null);
|
|
@@ -96,6 +97,7 @@ const ButtonDropdown = /*#__PURE__*/React.forwardRef((_ref, forwardRef) => {
|
|
|
96
97
|
size: size,
|
|
97
98
|
ref: refs.setReference,
|
|
98
99
|
onClick: e => {
|
|
100
|
+
onClick?.(e);
|
|
99
101
|
e.stopPropagation();
|
|
100
102
|
onOpen();
|
|
101
103
|
},
|
|
@@ -76,6 +76,7 @@ export const ButtonDropdown: React$AbstractComponent<
|
|
|
76
76
|
iconRightType = 'solid',
|
|
77
77
|
isFluid,
|
|
78
78
|
tooltip,
|
|
79
|
+
onClick,
|
|
79
80
|
...restButtonProps
|
|
80
81
|
}: ButtonDropdownProps,
|
|
81
82
|
forwardRef,
|
|
@@ -138,6 +139,7 @@ export const ButtonDropdown: React$AbstractComponent<
|
|
|
138
139
|
size={size}
|
|
139
140
|
ref={refs.setReference}
|
|
140
141
|
onClick={(e) => {
|
|
142
|
+
onClick?.(e);
|
|
141
143
|
e.stopPropagation();
|
|
142
144
|
onOpen();
|
|
143
145
|
}}
|
|
@@ -52,7 +52,6 @@ const SimpleDropdownBase = (props, ref) => {
|
|
|
52
52
|
}));
|
|
53
53
|
return /*#__PURE__*/React.createElement(_Dropdown.Dropdown, _extends({}, inputProps, {
|
|
54
54
|
classNames: classNames,
|
|
55
|
-
label: "Form Label",
|
|
56
55
|
size: size,
|
|
57
56
|
placeholder: placeholder,
|
|
58
57
|
onChange: handleOptionChange,
|
package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.js
CHANGED
|
@@ -7,14 +7,24 @@ exports.SkipElementFromNavigation = exports.FocusManagerWithArrowKeyNavigation =
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _react2 = require("@floating-ui/react");
|
|
9
9
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
10
|
-
var _makeClassNameComponent = require("../../utils/makeClassNameComponent");
|
|
11
10
|
var _FocusManagerWithArrowKeyNavigationModule = _interopRequireDefault(require("./FocusManagerWithArrowKeyNavigation.module.css"));
|
|
12
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
13
|
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; }
|
|
15
14
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
16
15
|
const SKIP_ELEMENT_DISPLAY_NAME = 'SkipElementFromNavigation';
|
|
17
|
-
const SkipElementFromNavigation = (
|
|
16
|
+
const SkipElementFromNavigation = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
17
|
+
let {
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
...restProps
|
|
21
|
+
} = _ref;
|
|
22
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
|
|
23
|
+
className: className,
|
|
24
|
+
tabIndex: -1,
|
|
25
|
+
ref: ref
|
|
26
|
+
}), children);
|
|
27
|
+
});
|
|
18
28
|
exports.SkipElementFromNavigation = SkipElementFromNavigation;
|
|
19
29
|
SkipElementFromNavigation.displayName = SKIP_ELEMENT_DISPLAY_NAME;
|
|
20
30
|
const FocusManagerWithArrowKeyNavigation = props => {
|
|
@@ -25,6 +35,8 @@ const FocusManagerWithArrowKeyNavigation = props => {
|
|
|
25
35
|
orientation = 'vertical',
|
|
26
36
|
modal = false,
|
|
27
37
|
cols = 1,
|
|
38
|
+
focusItemOnOpen = 'auto',
|
|
39
|
+
loop = false,
|
|
28
40
|
...restFloatingFocusManagerProps
|
|
29
41
|
} = props;
|
|
30
42
|
const {
|
|
@@ -83,7 +95,9 @@ const FocusManagerWithArrowKeyNavigation = props => {
|
|
|
83
95
|
cols,
|
|
84
96
|
listRef,
|
|
85
97
|
activeIndex,
|
|
86
|
-
onNavigate: setActiveIndex
|
|
98
|
+
onNavigate: setActiveIndex,
|
|
99
|
+
focusItemOnOpen,
|
|
100
|
+
loop
|
|
87
101
|
});
|
|
88
102
|
const {
|
|
89
103
|
getFloatingProps
|
package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.js.flow
CHANGED
|
@@ -13,8 +13,6 @@ import {
|
|
|
13
13
|
} from '@floating-ui/react';
|
|
14
14
|
|
|
15
15
|
import classify from '../../utils/classify';
|
|
16
|
-
import type {ClassNameComponent} from '../../utils/makeClassNameComponent';
|
|
17
|
-
import {makeClassNameComponent} from '../../utils/makeClassNameComponent';
|
|
18
16
|
import type {FocusManagerProps} from '../FocusManager';
|
|
19
17
|
|
|
20
18
|
import css from './FocusManagerWithArrowKeyNavigation.module.css';
|
|
@@ -22,19 +20,38 @@ import css from './FocusManagerWithArrowKeyNavigation.module.css';
|
|
|
22
20
|
|
|
23
21
|
const SKIP_ELEMENT_DISPLAY_NAME = 'SkipElementFromNavigation';
|
|
24
22
|
|
|
25
|
-
export
|
|
26
|
-
|
|
23
|
+
export type SkipElementFromNavigationProps = {
|
|
24
|
+
children: React.Node,
|
|
25
|
+
className?: string,
|
|
26
|
+
...
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const SkipElementFromNavigation: React$AbstractComponent<
|
|
30
|
+
SkipElementFromNavigationProps,
|
|
31
|
+
HTMLDivElement,
|
|
32
|
+
> = React.forwardRef<SkipElementFromNavigationProps, HTMLDivElement>(
|
|
33
|
+
(
|
|
34
|
+
{children, className, ...restProps}: SkipElementFromNavigationProps,
|
|
35
|
+
ref,
|
|
36
|
+
) => (
|
|
37
|
+
<div {...restProps} className={className} tabIndex={-1} ref={ref}>
|
|
38
|
+
{children}
|
|
39
|
+
</div>
|
|
40
|
+
),
|
|
41
|
+
);
|
|
27
42
|
|
|
28
43
|
SkipElementFromNavigation.displayName = SKIP_ELEMENT_DISPLAY_NAME;
|
|
29
44
|
|
|
30
|
-
export type
|
|
45
|
+
export type FocusManagerWithArrowKeyNavigationProps = {
|
|
31
46
|
...FocusManagerProps,
|
|
32
47
|
cols?: number,
|
|
33
48
|
orientation?: 'horizontal' | 'vertical',
|
|
49
|
+
focusItemOnOpen?: 'auto' | boolean,
|
|
50
|
+
loop?: boolean,
|
|
34
51
|
};
|
|
35
52
|
|
|
36
53
|
export const FocusManagerWithArrowKeyNavigation = (
|
|
37
|
-
props:
|
|
54
|
+
props: FocusManagerWithArrowKeyNavigationProps,
|
|
38
55
|
): React.Node => {
|
|
39
56
|
const {
|
|
40
57
|
classNames,
|
|
@@ -43,6 +60,8 @@ export const FocusManagerWithArrowKeyNavigation = (
|
|
|
43
60
|
orientation = 'vertical',
|
|
44
61
|
modal = false,
|
|
45
62
|
cols = 1,
|
|
63
|
+
focusItemOnOpen = 'auto',
|
|
64
|
+
loop = false,
|
|
46
65
|
...restFloatingFocusManagerProps
|
|
47
66
|
} = props;
|
|
48
67
|
|
|
@@ -95,6 +114,8 @@ export const FocusManagerWithArrowKeyNavigation = (
|
|
|
95
114
|
listRef,
|
|
96
115
|
activeIndex,
|
|
97
116
|
onNavigate: setActiveIndex,
|
|
117
|
+
focusItemOnOpen,
|
|
118
|
+
loop,
|
|
98
119
|
});
|
|
99
120
|
const {getFloatingProps} = useInteractions([listNavigation]);
|
|
100
121
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TableActionBar = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _classify = require("../../utils/classify");
|
|
9
|
+
var _TableBarModule = _interopRequireDefault(require("./TableBar.module.css"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
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
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
+
const TableActionBar = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
} = _ref;
|
|
20
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
21
|
+
className: (0, _classify.classify)(_TableBarModule.default.tableActionBar, className),
|
|
22
|
+
"data-testid": "table-action-bar"
|
|
23
|
+
}), children);
|
|
24
|
+
};
|
|
25
|
+
exports.TableActionBar = TableActionBar;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// @flow strict
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
import {classify} from '../../utils/classify';
|
|
6
|
+
|
|
7
|
+
import css from './TableBar.module.css';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export type TableActionBarProps = {
|
|
11
|
+
children?: React.Node,
|
|
12
|
+
className?: string,
|
|
13
|
+
...
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const TableActionBar = ({
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}: TableActionBarProps): React.Node => (
|
|
21
|
+
<div
|
|
22
|
+
{...props}
|
|
23
|
+
className={classify(css.tableActionBar, className)}
|
|
24
|
+
data-testid="table-action-bar"
|
|
25
|
+
>
|
|
26
|
+
{children}
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@value (spaceNone, spaceXXSmall, spaceXSmall, spaceSmall, spaceMedium, spaceHalfFluid, spaceNegHalfFluid) from '../../styles/variables/_space.css';
|
|
2
|
+
@value (size2, size22, size48, size60, size240, size300) from '../../styles/variables/_size.css';
|
|
3
|
+
@value (borderRadiusMedium, borderRadiusNone) from '../../styles/variables/_border.css';
|
|
4
|
+
@value (colorBackgroundTertiary) from '../../styles/variables/_color.css';
|
|
5
|
+
@value (elevationMenu) from '../../styles/variables/_elevation.css';
|
|
6
|
+
|
|
7
|
+
.tableBar {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
min-height: calc(size22 * 3);
|
|
12
|
+
width: sizeFluid;
|
|
13
|
+
padding: spaceSmall spaceMedium;
|
|
14
|
+
background-color: colorBackgroundTertiary;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.topBar {
|
|
18
|
+
composes: borderPrimary from '../../styles/border.module.css';
|
|
19
|
+
border-bottom: none;
|
|
20
|
+
border-radius: borderRadiusMedium borderRadiusMedium borderRadiusNone
|
|
21
|
+
borderRadiusNone;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.bottomBar {
|
|
25
|
+
composes: borderPrimary from '../../styles/border.module.css';
|
|
26
|
+
min-height: calc(size60 - size2);
|
|
27
|
+
border-top: none;
|
|
28
|
+
border-radius: borderRadiusNone borderRadiusNone borderRadiusMedium
|
|
29
|
+
borderRadiusMedium;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.tableActionBar {
|
|
33
|
+
composes: borderPrimary from '../../styles/border.module.css';
|
|
34
|
+
composes: boxShadow4 from '../../styles/shadow.module.css';
|
|
35
|
+
position: absolute;
|
|
36
|
+
left: spaceHalfFluid;
|
|
37
|
+
z-index: elevationMenu;
|
|
38
|
+
transform: translateX(spaceNegHalfFluid);
|
|
39
|
+
bottom: calc(spaceMedium * -1);
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
min-height: calc(size60 - size2);
|
|
43
|
+
width: fit-content;
|
|
44
|
+
padding: spaceSmall;
|
|
45
|
+
background-color: colorBackgroundTertiary;
|
|
46
|
+
border-radius: borderRadiusMedium;
|
|
47
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TableBottomBar = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _classify = require("../../utils/classify");
|
|
9
|
+
var _TableBarModule = _interopRequireDefault(require("./TableBar.module.css"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
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
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
+
const TableBottomBar = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
} = _ref;
|
|
20
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
21
|
+
className: (0, _classify.classify)(_TableBarModule.default.tableBar, _TableBarModule.default.bottomBar, className),
|
|
22
|
+
"data-testid": "table-bottom-bar"
|
|
23
|
+
}), children);
|
|
24
|
+
};
|
|
25
|
+
exports.TableBottomBar = TableBottomBar;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// @flow strict
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
import {classify} from '../../utils/classify';
|
|
6
|
+
|
|
7
|
+
import css from './TableBar.module.css';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export type TableBottomBarProps = {
|
|
11
|
+
children?: React.Node,
|
|
12
|
+
className?: string,
|
|
13
|
+
...
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const TableBottomBar = ({
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}: TableBottomBarProps): React.Node => (
|
|
21
|
+
<div
|
|
22
|
+
{...props}
|
|
23
|
+
className={classify(css.tableBar, css.bottomBar, className)}
|
|
24
|
+
data-testid="table-bottom-bar"
|
|
25
|
+
>
|
|
26
|
+
{children}
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TableTopBar = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _classify = require("../../utils/classify");
|
|
9
|
+
var _TableBarModule = _interopRequireDefault(require("./TableBar.module.css"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
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
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
+
const TableTopBar = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
} = _ref;
|
|
20
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
21
|
+
className: (0, _classify.classify)(_TableBarModule.default.tableBar, _TableBarModule.default.topBar, className),
|
|
22
|
+
"data-testid": "table-top-bar"
|
|
23
|
+
}), children);
|
|
24
|
+
};
|
|
25
|
+
exports.TableTopBar = TableTopBar;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// @flow strict
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
import {classify} from '../../utils/classify';
|
|
6
|
+
|
|
7
|
+
import css from './TableBar.module.css';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export type TableTopBarProps = {
|
|
11
|
+
children?: React.Node,
|
|
12
|
+
className?: string,
|
|
13
|
+
...
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const TableTopBar = ({
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}: TableTopBarProps): React.Node => (
|
|
21
|
+
<div
|
|
22
|
+
{...props}
|
|
23
|
+
className={classify(css.tableBar, css.topBar, className)}
|
|
24
|
+
data-testid="table-top-bar"
|
|
25
|
+
>
|
|
26
|
+
{children}
|
|
27
|
+
</div>
|
|
28
|
+
);
|