@spaced-out/ui-design-system 0.1.128 → 0.1.129
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/.all-contributorsrc +10 -2
- package/CHANGELOG.md +7 -0
- package/README.md +2 -1
- package/lib/components/ButtonTabs/ButtonTabDropdown.js +7 -2
- package/lib/components/ButtonTabs/ButtonTabDropdown.js.flow +10 -1
- package/lib/components/ButtonTabs/ButtonTabDropdown.module.css +4 -0
- package/lib/components/ButtonTabs/ButtonTabs.js +2 -1
- package/lib/components/ButtonTabs/ButtonTabs.js.flow +5 -1
- package/package.json +1 -1
package/.all-contributorsrc
CHANGED
|
@@ -27,8 +27,16 @@
|
|
|
27
27
|
"avatar_url": "https://avatars.githubusercontent.com/u/8904071?v=4",
|
|
28
28
|
"profile": "https://github.com/Anant-Raj",
|
|
29
29
|
"contributions": [
|
|
30
|
-
"code"
|
|
31
|
-
|
|
30
|
+
"code"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"login": "ashwinikemshetty",
|
|
35
|
+
"name": "Ashwini Kemshetty",
|
|
36
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/12839599?v=4",
|
|
37
|
+
"profile": "https://github.com/ashwinikemshetty",
|
|
38
|
+
"contributions": [
|
|
39
|
+
"code"
|
|
32
40
|
]
|
|
33
41
|
}
|
|
34
42
|
],
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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.129](https://github.com/spaced-out/ui-design-system/compare/v0.1.128...v0.1.129) (2024-09-10)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* more-tab width bug fix ([#264](https://github.com/spaced-out/ui-design-system/issues/264)) ([f05dd2b](https://github.com/spaced-out/ui-design-system/commit/f05dd2b1d27558626f010bb4c2e2d688869ff487))
|
|
11
|
+
|
|
5
12
|
### [0.1.128](https://github.com/spaced-out/ui-design-system/compare/v0.1.127...v0.1.128) (2024-09-02)
|
|
6
13
|
|
|
7
14
|
|
package/README.md
CHANGED
|
@@ -262,7 +262,8 @@ Check out our [**Changelog here**](https://spaced-out.github.io/ui-design-system
|
|
|
262
262
|
<tbody>
|
|
263
263
|
<tr>
|
|
264
264
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/superrover"><img src="https://avatars.githubusercontent.com/u/86281150?v=4?s=100" width="100px;" alt="Nishant Gaurav"/><br /><sub><b>Nishant Gaurav</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=superrover" title="Code">💻</a> <a href="https://github.com/Spaced-Out/ui-design-system/commits?author=superrover" title="Documentation">📖</a></td>
|
|
265
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Anant-Raj"><img src="https://avatars.githubusercontent.com/u/8904071?v=4?s=100" width="100px;" alt="Anant Raj"/><br /><sub><b>Anant Raj</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=Anant-Raj" title="Code">💻</a
|
|
265
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Anant-Raj"><img src="https://avatars.githubusercontent.com/u/8904071?v=4?s=100" width="100px;" alt="Anant Raj"/><br /><sub><b>Anant Raj</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=Anant-Raj" title="Code">💻</a></td>
|
|
266
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ashwinikemshetty"><img src="https://avatars.githubusercontent.com/u/12839599?v=4?s=100" width="100px;" alt="Ashwini Kemshetty"/><br /><sub><b>Ashwini Kemshetty</b></sub></a><br /><a href="https://github.com/Spaced-Out/ui-design-system/commits?author=ashwinikemshetty" title="Code">💻</a></td>
|
|
266
267
|
</tr>
|
|
267
268
|
</tbody>
|
|
268
269
|
</table>
|
|
@@ -8,9 +8,12 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _react2 = require("@floating-ui/react");
|
|
9
9
|
var _lodash = require("lodash");
|
|
10
10
|
var _space = require("../../styles/variables/_space");
|
|
11
|
+
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
11
12
|
var _clickAway = require("../../utils/click-away");
|
|
12
13
|
var _Menu = require("../Menu");
|
|
13
14
|
var _ButtonTab = require("./ButtonTab");
|
|
15
|
+
var _ButtonTabDropdownModule = _interopRequireDefault(require("./ButtonTabDropdown.module.css"));
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
17
|
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); }
|
|
15
18
|
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; }
|
|
16
19
|
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); }
|
|
@@ -25,7 +28,8 @@ const ButtonTabDropdown = _ref => {
|
|
|
25
28
|
size,
|
|
26
29
|
children,
|
|
27
30
|
selectedButtonTabId,
|
|
28
|
-
onButtonTabSelect: onTabSelect
|
|
31
|
+
onButtonTabSelect: onTabSelect,
|
|
32
|
+
dropdownClass
|
|
29
33
|
} = buttonTabProps;
|
|
30
34
|
const childrenArray = React.Children.toArray(children);
|
|
31
35
|
const menuOptions = childrenArray.map(child => {
|
|
@@ -76,7 +80,8 @@ const ButtonTabDropdown = _ref => {
|
|
|
76
80
|
} = _ref3;
|
|
77
81
|
return /*#__PURE__*/React.createElement("div", {
|
|
78
82
|
"data-testid": "ButtonTabDropdown",
|
|
79
|
-
ref: menuBtnRef
|
|
83
|
+
ref: menuBtnRef,
|
|
84
|
+
className: (0, _classify.default)(_ButtonTabDropdownModule.default.buttonTabDropDownWrapper, dropdownClass)
|
|
80
85
|
}, /*#__PURE__*/React.createElement(_ButtonTab.ButtonTab, _extends({}, buttonTabProps, {
|
|
81
86
|
ref: refs.setReference,
|
|
82
87
|
selectedButtonTabId: moreTabSelectedId,
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
import {includes} from 'lodash';
|
|
17
17
|
|
|
18
18
|
import {spaceNone, spaceXXSmall} from '../../styles/variables/_space';
|
|
19
|
+
import classify from '../../utils/classify';
|
|
19
20
|
import {ClickAway} from '../../utils/click-away';
|
|
20
21
|
import type {AnchorType} from '../ButtonDropdown';
|
|
21
22
|
import {Menu} from '../Menu';
|
|
@@ -23,11 +24,14 @@ import {Menu} from '../Menu';
|
|
|
23
24
|
import type {ButtonTabProps} from './ButtonTab';
|
|
24
25
|
import {ButtonTab} from './ButtonTab';
|
|
25
26
|
|
|
27
|
+
import css from './ButtonTabDropdown.module.css';
|
|
28
|
+
|
|
26
29
|
|
|
27
30
|
export type ButtonTabDropdownProps = {
|
|
28
31
|
...ButtonTabProps,
|
|
29
32
|
title: string,
|
|
30
33
|
anchorPosition?: AnchorType,
|
|
34
|
+
dropdownClass?: string,
|
|
31
35
|
...
|
|
32
36
|
};
|
|
33
37
|
|
|
@@ -42,6 +46,7 @@ export const ButtonTabDropdown = ({
|
|
|
42
46
|
children,
|
|
43
47
|
selectedButtonTabId,
|
|
44
48
|
onButtonTabSelect: onTabSelect,
|
|
49
|
+
dropdownClass,
|
|
45
50
|
} = buttonTabProps;
|
|
46
51
|
const childrenArray = React.Children.toArray(children);
|
|
47
52
|
const menuOptions = childrenArray.map((child) => {
|
|
@@ -83,7 +88,11 @@ export const ButtonTabDropdown = ({
|
|
|
83
88
|
return (
|
|
84
89
|
<ClickAway>
|
|
85
90
|
{({isOpen, onOpen, cancelNext, clickAway}) => (
|
|
86
|
-
<div
|
|
91
|
+
<div
|
|
92
|
+
data-testid="ButtonTabDropdown"
|
|
93
|
+
ref={menuBtnRef}
|
|
94
|
+
className={classify(css.buttonTabDropDownWrapper, dropdownClass)}
|
|
95
|
+
>
|
|
87
96
|
<ButtonTab
|
|
88
97
|
{...buttonTabProps}
|
|
89
98
|
ref={refs.setReference}
|
|
@@ -36,7 +36,8 @@ const ButtonTabs = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
36
36
|
id: "more-tab",
|
|
37
37
|
title: wrapTabTitle,
|
|
38
38
|
iconName: "ellipsis-vertical",
|
|
39
|
-
anchorPosition: anchorPosition
|
|
39
|
+
anchorPosition: anchorPosition,
|
|
40
|
+
dropdownClass: classNames?.buttonTabDropdownWrapper
|
|
40
41
|
}, wrappedNodes));
|
|
41
42
|
}
|
|
42
43
|
}
|
|
@@ -10,7 +10,10 @@ import {ButtonTabDropdown} from './ButtonTabDropdown';
|
|
|
10
10
|
import css from './ButtonTabs.module.css';
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
type ClassNames = $ReadOnly<{
|
|
13
|
+
type ClassNames = $ReadOnly<{
|
|
14
|
+
wrapper?: string,
|
|
15
|
+
buttonTabDropdownWrapper?: string,
|
|
16
|
+
}>;
|
|
14
17
|
|
|
15
18
|
export type ButtonTabsProps = {
|
|
16
19
|
classNames?: ClassNames,
|
|
@@ -60,6 +63,7 @@ export const ButtonTabs: React$AbstractComponent<
|
|
|
60
63
|
title={wrapTabTitle}
|
|
61
64
|
iconName="ellipsis-vertical"
|
|
62
65
|
anchorPosition={anchorPosition}
|
|
66
|
+
dropdownClass={classNames?.buttonTabDropdownWrapper}
|
|
63
67
|
>
|
|
64
68
|
{wrappedNodes}
|
|
65
69
|
</ButtonTabDropdown>,
|