@spaced-out/ui-design-system 0.1.128 → 0.1.130-beta.0

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.
@@ -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
- "doc"
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,20 @@
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.130-beta.0](https://github.com/spaced-out/ui-design-system/compare/v0.1.129...v0.1.130-beta.0) (2024-09-11)
6
+
7
+
8
+ ### Features
9
+
10
+ * large size in chips ([#266](https://github.com/spaced-out/ui-design-system/issues/266)) ([b4cf45c](https://github.com/spaced-out/ui-design-system/commit/b4cf45c84bf954253321834ccedc9ffb7f4c2019))
11
+
12
+ ### [0.1.129](https://github.com/spaced-out/ui-design-system/compare/v0.1.128...v0.1.129) (2024-09-10)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * 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))
18
+
5
19
  ### [0.1.128](https://github.com/spaced-out/ui-design-system/compare/v0.1.127...v0.1.128) (2024-09-02)
6
20
 
7
21
 
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> <a href="https://github.com/Spaced-Out/ui-design-system/commits?author=Anant-Raj" 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></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 data-testid="ButtonTabDropdown" ref={menuBtnRef}>
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}
@@ -0,0 +1,4 @@
1
+ .buttonTabDropDownWrapper {
2
+ display: flex;
3
+ flex-shrink: 0;
4
+ }
@@ -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<{wrapper?: string}>;
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>,
@@ -76,6 +76,7 @@ const Chip = /*#__PURE__*/React.forwardRef((_ref, ref) => {
76
76
  [_ChipModule.default.warning]: semantic === CHIP_SEMANTIC.warning,
77
77
  [_ChipModule.default.danger]: semantic === CHIP_SEMANTIC.danger,
78
78
  [_ChipModule.default.secondary]: semantic === CHIP_SEMANTIC.secondary,
79
+ [_ChipModule.default.large]: size === 'large',
79
80
  [_ChipModule.default.medium]: size === 'medium',
80
81
  [_ChipModule.default.small]: size === 'small',
81
82
  [_ChipModule.default.dismissable]: dismissable,
@@ -40,13 +40,18 @@ export type BaseChipProps = {
40
40
  onMouseLeave?: ?(SyntheticEvent<HTMLElement>) => mixed,
41
41
  };
42
42
 
43
- export type MediumChipProps = {
43
+ export type LargeChipProps = {
44
44
  ...BaseChipProps,
45
- size?: 'medium',
46
45
  iconName?: string,
47
46
  iconType?: IconType,
48
47
  dismissable?: boolean,
49
48
  onDismiss?: ?(SyntheticEvent<HTMLElement>) => mixed,
49
+ size?: 'large',
50
+ };
51
+
52
+ export type MediumChipProps = {
53
+ ...LargeChipProps,
54
+ size?: 'medium',
50
55
  };
51
56
 
52
57
  export type SmallChipProps = {
@@ -54,7 +59,7 @@ export type SmallChipProps = {
54
59
  size?: 'small',
55
60
  };
56
61
 
57
- export type ChipProps = MediumChipProps | SmallChipProps;
62
+ export type ChipProps = LargeChipProps | MediumChipProps | SmallChipProps;
58
63
 
59
64
  export const Chip: React$AbstractComponent<ChipProps, HTMLDivElement> =
60
65
  React.forwardRef<ChipProps, HTMLDivElement>(
@@ -114,6 +119,7 @@ export const Chip: React$AbstractComponent<ChipProps, HTMLDivElement> =
114
119
  [css.warning]: semantic === CHIP_SEMANTIC.warning,
115
120
  [css.danger]: semantic === CHIP_SEMANTIC.danger,
116
121
  [css.secondary]: semantic === CHIP_SEMANTIC.secondary,
122
+ [css.large]: size === 'large',
117
123
  [css.medium]: size === 'medium',
118
124
  [css.small]: size === 'small',
119
125
  [css.dismissable]: dismissable,
@@ -26,7 +26,8 @@
26
26
  ) from '../../styles/variables/_border.css';
27
27
  @value (
28
28
  size18,
29
- size26
29
+ size26,
30
+ size34
30
31
  ) from '../../styles/variables/_size.css';
31
32
 
32
33
  @value (
@@ -53,6 +54,12 @@
53
54
  borderWidthTertiary colorFocusPrimary;
54
55
  }
55
56
 
57
+ .large {
58
+ padding: spaceNone spaceXSmall;
59
+ height: size34;
60
+ min-height: size34;
61
+ }
62
+
56
63
  .medium {
57
64
  height: size26;
58
65
  min-height: size26;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.1.128",
3
+ "version": "0.1.130-beta.0",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {