@spaced-out/ui-design-system 0.1.39 → 0.1.41

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 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.41](https://github.com/spaced-out/ui-design-system/compare/v0.1.40...v0.1.41) (2023-08-02)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * card padding fixes ([6cd15dc](https://github.com/spaced-out/ui-design-system/commit/6cd15dc489d790c450d1e146d17a0ecd4ce69411))
11
+
12
+ ### [0.1.40](https://github.com/spaced-out/ui-design-system/compare/v0.1.39...v0.1.40) (2023-08-02)
13
+
14
+
15
+ ### Features
16
+
17
+ * new sticky footer component and card enhancements ([#130](https://github.com/spaced-out/ui-design-system/issues/130)) ([b683fc8](https://github.com/spaced-out/ui-design-system/commit/b683fc8158290a2a93f66387776a64cf55581450))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * accessibility fixes for table ([41adca4](https://github.com/spaced-out/ui-design-system/commit/41adca49344a2495ac07ca884124bf939c4a7028))
23
+
5
24
  ### [0.1.39](https://github.com/spaced-out/ui-design-system/compare/v0.1.38...v0.1.39) (2023-07-19)
6
25
 
7
26
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.PADDING_SIZES = exports.ClickableCard = exports.Card = void 0;
6
+ exports.PADDING_SIZES = exports.ClickableCard = exports.CardTitle = exports.CardHeader = exports.CardFooter = exports.CardContent = exports.CardActions = exports.Card = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var SPACES = _interopRequireWildcard(require("../../styles/variables/_space"));
9
9
  var _classify = _interopRequireDefault(require("../../utils/classify"));
@@ -23,7 +23,62 @@ const getPaddingValue = size => {
23
23
  const spaceKey = 'space' + (0, _string.capitalize)(size);
24
24
  return SPACES[spaceKey] || SPACES['spaceNone'];
25
25
  };
26
- const Card = /*#__PURE__*/React.forwardRef((_ref, ref) => {
26
+ const CardHeader = _ref => {
27
+ let {
28
+ className,
29
+ children,
30
+ ...props
31
+ } = _ref;
32
+ return /*#__PURE__*/React.createElement("div", _extends({}, props, {
33
+ className: (0, _classify.default)(_CardModule.default.cardHeader, className)
34
+ }), children);
35
+ };
36
+ exports.CardHeader = CardHeader;
37
+ const CardTitle = _ref2 => {
38
+ let {
39
+ className,
40
+ children,
41
+ ...props
42
+ } = _ref2;
43
+ return /*#__PURE__*/React.createElement("div", _extends({}, props, {
44
+ className: (0, _classify.default)(_CardModule.default.cardTitle, className)
45
+ }), children);
46
+ };
47
+ exports.CardTitle = CardTitle;
48
+ const CardActions = _ref3 => {
49
+ let {
50
+ className,
51
+ children,
52
+ ...props
53
+ } = _ref3;
54
+ return /*#__PURE__*/React.createElement("div", _extends({}, props, {
55
+ className: (0, _classify.default)(_CardModule.default.cardActions, className)
56
+ }), children);
57
+ };
58
+ exports.CardActions = CardActions;
59
+ const CardFooter = _ref4 => {
60
+ let {
61
+ className,
62
+ children,
63
+ ...props
64
+ } = _ref4;
65
+ return /*#__PURE__*/React.createElement("div", _extends({}, props, {
66
+ className: (0, _classify.default)(_CardModule.default.cardFooter, className)
67
+ }), children);
68
+ };
69
+ exports.CardFooter = CardFooter;
70
+ const CardContent = _ref5 => {
71
+ let {
72
+ className,
73
+ children,
74
+ ...props
75
+ } = _ref5;
76
+ return /*#__PURE__*/React.createElement("div", _extends({}, props, {
77
+ className: (0, _classify.default)(_CardModule.default.cardContent, className)
78
+ }), children);
79
+ };
80
+ exports.CardContent = CardContent;
81
+ const Card = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
27
82
  let {
28
83
  children,
29
84
  classNames,
@@ -32,7 +87,7 @@ const Card = /*#__PURE__*/React.forwardRef((_ref, ref) => {
32
87
  paddingBottom = 'medium',
33
88
  paddingLeft = 'medium',
34
89
  ...props
35
- } = _ref;
90
+ } = _ref6;
36
91
  return /*#__PURE__*/React.createElement("div", _extends({}, props, {
37
92
  style: {
38
93
  '--card-padding-top': getPaddingValue(paddingTop),
@@ -46,13 +101,13 @@ const Card = /*#__PURE__*/React.forwardRef((_ref, ref) => {
46
101
  }), children);
47
102
  });
48
103
  exports.Card = Card;
49
- const ClickableCard = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
104
+ const ClickableCard = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
50
105
  let {
51
106
  classNames,
52
107
  onClick,
53
108
  disabled = false,
54
109
  ...props
55
- } = _ref2;
110
+ } = _ref7;
56
111
  const componentRef = React.useRef(null);
57
112
  React.useImperativeHandle(ref, () => componentRef.current);
58
113
  React.useEffect(() => {
@@ -29,6 +29,12 @@ export type CardProps = {
29
29
  ...
30
30
  };
31
31
 
32
+ export type CardChildProps = {
33
+ className?: string,
34
+ children: React.Node,
35
+ ...
36
+ };
37
+
32
38
  export type ClickableCardProps = {
33
39
  ...CardProps,
34
40
  onClick?: ?(SyntheticEvent<HTMLElement>) => mixed,
@@ -41,6 +47,56 @@ const getPaddingValue = (size: PaddingSizeType): string => {
41
47
  return SPACES[spaceKey] || SPACES['spaceNone'];
42
48
  };
43
49
 
50
+ export const CardHeader = ({
51
+ className,
52
+ children,
53
+ ...props
54
+ }: CardChildProps): React.Node => (
55
+ <div {...props} className={classify(css.cardHeader, className)}>
56
+ {children}
57
+ </div>
58
+ );
59
+
60
+ export const CardTitle = ({
61
+ className,
62
+ children,
63
+ ...props
64
+ }: CardChildProps): React.Node => (
65
+ <div {...props} className={classify(css.cardTitle, className)}>
66
+ {children}
67
+ </div>
68
+ );
69
+
70
+ export const CardActions = ({
71
+ className,
72
+ children,
73
+ ...props
74
+ }: CardChildProps): React.Node => (
75
+ <div {...props} className={classify(css.cardActions, className)}>
76
+ {children}
77
+ </div>
78
+ );
79
+
80
+ export const CardFooter = ({
81
+ className,
82
+ children,
83
+ ...props
84
+ }: CardChildProps): React.Node => (
85
+ <div {...props} className={classify(css.cardFooter, className)}>
86
+ {children}
87
+ </div>
88
+ );
89
+
90
+ export const CardContent = ({
91
+ className,
92
+ children,
93
+ ...props
94
+ }: CardChildProps): React.Node => (
95
+ <div {...props} className={classify(css.cardContent, className)}>
96
+ {children}
97
+ </div>
98
+ );
99
+
44
100
  export const Card: React$AbstractComponent<CardProps, HTMLDivElement> =
45
101
  React.forwardRef<CardProps, HTMLDivElement>(
46
102
  (
@@ -1,16 +1,72 @@
1
1
  @value (colorBackgroundTertiary, colorFillPrimary, colorBorderSecondary, colorFocusPrimary) from '../../styles/variables/_color.css';
2
2
  @value (borderRadiusMedium, borderWidthNone, borderWidthTertiary) from '../../styles/variables/_border.css';
3
- @value (spaceSmall, spaceMedium, spaceLarge) from '../../styles/variables/_space.css';
3
+ @value (spaceSmall, spaceMedium, spaceLarge, spaceXSmall) from '../../styles/variables/_space.css';
4
+ @value (size58, sizeFluid) from '../../styles/variables/_size.css';
4
5
 
5
6
  .cardWrapper {
6
7
  --card-padding-top: spaceMedium;
7
8
  --card-padding-right: spaceMedium;
8
9
  --card-padding-bottom: spaceMedium;
9
10
  --card-padding-left: spaceMedium;
11
+ }
12
+
13
+ .cardWrapper {
10
14
  display: flex;
11
15
  composes: borderPrimary from '../../styles/border.module.css';
12
16
  background-color: colorBackgroundTertiary;
13
17
  border-radius: borderRadiusMedium;
18
+ }
19
+
20
+ .cardWrapper:not(:has(.cardHeader, .cardFooter, .cardContent)) {
21
+ padding-top: var(--card-padding-top);
22
+ padding-right: var(--card-padding-right);
23
+ padding-bottom: var(--card-padding-bottom);
24
+ padding-left: var(--card-padding-left);
25
+ }
26
+
27
+ .cardWrapper:has(.cardHeader, .cardFooter, .cardContent) {
28
+ flex-flow: column;
29
+ }
30
+
31
+ .cardHeader {
32
+ display: flex;
33
+ justify-content: space-between;
34
+ width: sizeFluid;
35
+ align-items: center;
36
+ min-height: size58;
37
+ composes: subTitleSmall from '../../styles/typography.module.css';
38
+ composes: borderBottomPrimary from '../../styles/border.module.css';
39
+ padding: spaceSmall var(--card-padding-right) spaceSmall
40
+ var(--card-padding-left);
41
+ gap: spaceXSmall;
42
+ }
43
+
44
+ .cardFooter {
45
+ display: flex;
46
+ justify-content: space-between;
47
+ width: sizeFluid;
48
+ align-items: center;
49
+ min-height: size58;
50
+ composes: subTitleSmall from '../../styles/typography.module.css';
51
+ composes: borderTopPrimary from '../../styles/border.module.css';
52
+ padding: spaceSmall var(--card-padding-right) spaceSmall
53
+ var(--card-padding-left);
54
+ gap: spaceXSmall;
55
+ margin-top: auto;
56
+ }
57
+
58
+ .cardTitle {
59
+ display: flex;
60
+ }
61
+
62
+ .cardActions {
63
+ display: flex;
64
+ gap: spaceXSmall;
65
+ margin-left: auto;
66
+ }
67
+
68
+ .cardContent {
69
+ display: flex;
14
70
  padding-top: var(--card-padding-top);
15
71
  padding-right: var(--card-padding-right);
16
72
  padding-bottom: var(--card-padding-bottom);
@@ -43,7 +43,8 @@ const PaginationButton = props => {
43
43
  onClick: onClick,
44
44
  disabled: disabled,
45
45
  ref: paginationBtnRef,
46
- iconLeftName: "chevrons-left"
46
+ iconLeftName: "chevrons-left",
47
+ ariaLabel: "First page"
47
48
  });
48
49
  case 'previous':
49
50
  return /*#__PURE__*/React.createElement(_Button.Button, {
@@ -60,7 +61,8 @@ const PaginationButton = props => {
60
61
  onClick: onClick,
61
62
  disabled: disabled,
62
63
  ref: paginationBtnRef,
63
- iconLeftName: "chevron-left"
64
+ iconLeftName: "chevron-left",
65
+ ariaLabel: "Previous page"
64
66
  });
65
67
  case 'page':
66
68
  return /*#__PURE__*/React.createElement(_Button.Button, {
@@ -98,7 +100,8 @@ const PaginationButton = props => {
98
100
  onClick: onClick,
99
101
  disabled: disabled,
100
102
  ref: paginationBtnRef,
101
- iconLeftName: "chevron-right"
103
+ iconLeftName: "chevron-right",
104
+ ariaLabel: "Next page"
102
105
  });
103
106
  case 'last':
104
107
  return /*#__PURE__*/React.createElement(_Button.Button, {
@@ -115,7 +118,8 @@ const PaginationButton = props => {
115
118
  onClick: onClick,
116
119
  disabled: disabled,
117
120
  ref: paginationBtnRef,
118
- iconLeftName: "chevrons-right"
121
+ iconLeftName: "chevrons-right",
122
+ ariaLabel: "Last page"
119
123
  });
120
124
  default:
121
125
  break;
@@ -35,6 +35,7 @@ export const PaginationButton = (props: PaginationItemProps): React.Node => {
35
35
  disabled={disabled}
36
36
  ref={paginationBtnRef}
37
37
  iconLeftName="chevrons-left"
38
+ ariaLabel="First page"
38
39
  ></Button>
39
40
  );
40
41
  case 'previous':
@@ -50,6 +51,7 @@ export const PaginationButton = (props: PaginationItemProps): React.Node => {
50
51
  disabled={disabled}
51
52
  ref={paginationBtnRef}
52
53
  iconLeftName="chevron-left"
54
+ ariaLabel="Previous page"
53
55
  ></Button>
54
56
  );
55
57
  case 'page':
@@ -88,6 +90,7 @@ export const PaginationButton = (props: PaginationItemProps): React.Node => {
88
90
  disabled={disabled}
89
91
  ref={paginationBtnRef}
90
92
  iconLeftName="chevron-right"
93
+ ariaLabel="Next page"
91
94
  ></Button>
92
95
  );
93
96
  case 'last':
@@ -103,6 +106,7 @@ export const PaginationButton = (props: PaginationItemProps): React.Node => {
103
106
  disabled={disabled}
104
107
  ref={paginationBtnRef}
105
108
  iconLeftName="chevrons-right"
109
+ ariaLabel="Last page"
106
110
  ></Button>
107
111
  );
108
112
 
@@ -23,7 +23,9 @@ const Step = /*#__PURE__*/React.forwardRef((_ref, ref) => {
23
23
  last,
24
24
  classNames,
25
25
  onClick,
26
- allowClick
26
+ allowClick,
27
+ iconName,
28
+ iconType
27
29
  } = _ref;
28
30
  const childrenArray = React.Children.toArray(children).filter(Boolean);
29
31
  const stepContent = childrenArray.map(stepContent => /*#__PURE__*/React.cloneElement(stepContent, {
@@ -50,13 +52,24 @@ const Step = /*#__PURE__*/React.forwardRef((_ref, ref) => {
50
52
  [_StepperModule.default.completed]: completed,
51
53
  [_StepperModule.default.expanded]: expanded,
52
54
  [_StepperModule.default.last]: last,
53
- [_StepperModule.default.disabled]: disabled
55
+ [_StepperModule.default.disabled]: disabled,
56
+ [_StepperModule.default.withIcon]: !!iconName
54
57
  }, classNames?.stepCounter)
55
58
  }, completed && !active ? /*#__PURE__*/React.createElement(_Icon.Icon, {
56
59
  name: "check",
57
- color: "inversePrimary",
58
- size: "small"
59
- }) : /*#__PURE__*/React.createElement(React.Fragment, null, (index + 1).toString())), /*#__PURE__*/React.createElement("div", {
60
+ color: iconName ? 'success' : 'inversePrimary',
61
+ type: "solid",
62
+ size: iconName ? 'medium' : 'small'
63
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null, iconName ? /*#__PURE__*/React.createElement(_Icon.Icon, {
64
+ name: iconName,
65
+ className: (0, _classify.default)(_StepperModule.default.stepIcon, {
66
+ [_StepperModule.default.selected]: active,
67
+ [_StepperModule.default.completed]: completed,
68
+ [_StepperModule.default.disabled]: disabled
69
+ }),
70
+ size: "medium",
71
+ type: iconType
72
+ }) : (index + 1).toString())), /*#__PURE__*/React.createElement("div", {
60
73
  className: (0, _classify.default)(_StepperModule.default.stepContent, classNames?.content)
61
74
  }, stepContent));
62
75
  });
@@ -3,6 +3,7 @@
3
3
  import * as React from 'react';
4
4
 
5
5
  import classify from '../../../utils/classify';
6
+ import type {IconType} from '../../Icon';
6
7
  import {Icon} from '../../Icon';
7
8
 
8
9
  import css from '../Stepper.module.css';
@@ -25,6 +26,8 @@ export type StepProps = {
25
26
  classNames?: ClassNames,
26
27
  allowClick?: boolean,
27
28
  onClick?: (idx: number, e?: ?SyntheticEvent<HTMLElement>) => mixed,
29
+ iconName?: string,
30
+ iconType?: IconType,
28
31
  };
29
32
 
30
33
  export const Step: React$AbstractComponent<StepProps, HTMLDivElement> =
@@ -41,6 +44,8 @@ export const Step: React$AbstractComponent<StepProps, HTMLDivElement> =
41
44
  classNames,
42
45
  onClick,
43
46
  allowClick,
47
+ iconName,
48
+ iconType,
44
49
  }: StepProps,
45
50
  ref,
46
51
  ): React.Node => {
@@ -82,14 +87,35 @@ export const Step: React$AbstractComponent<StepProps, HTMLDivElement> =
82
87
  [css.expanded]: expanded,
83
88
  [css.last]: last,
84
89
  [css.disabled]: disabled,
90
+ [css.withIcon]: !!iconName,
85
91
  },
86
92
  classNames?.stepCounter,
87
93
  )}
88
94
  >
89
95
  {completed && !active ? (
90
- <Icon name="check" color="inversePrimary" size="small" />
96
+ <Icon
97
+ name="check"
98
+ color={iconName ? 'success' : 'inversePrimary'}
99
+ type="solid"
100
+ size={iconName ? 'medium' : 'small'}
101
+ />
91
102
  ) : (
92
- <React.Fragment>{(index + 1).toString()}</React.Fragment>
103
+ <React.Fragment>
104
+ {iconName ? (
105
+ <Icon
106
+ name={iconName}
107
+ className={classify(css.stepIcon, {
108
+ [css.selected]: active,
109
+ [css.completed]: completed,
110
+ [css.disabled]: disabled,
111
+ })}
112
+ size="medium"
113
+ type={iconType}
114
+ />
115
+ ) : (
116
+ (index + 1).toString()
117
+ )}
118
+ </React.Fragment>
93
119
  )}
94
120
  </div>
95
121
  <div className={classify(css.stepContent, classNames?.content)}>
@@ -39,6 +39,7 @@
39
39
  .stepWrapper {
40
40
  position: relative;
41
41
  display: flex;
42
+ align-items: baseline;
42
43
  gap: spaceSmall;
43
44
  width: sizeFluid;
44
45
  }
@@ -77,6 +78,28 @@
77
78
  color: colorTextDisabled;
78
79
  }
79
80
 
81
+ .stepWrapperCounter.withIcon {
82
+ border: initial;
83
+ border-radius: initial;
84
+ background-color: initial;
85
+ }
86
+
87
+ .stepIcon {
88
+ color: inherit;
89
+ }
90
+
91
+ .stepIcon.selected {
92
+ color: colorFillPrimary;
93
+ }
94
+
95
+ .stepIcon.completed {
96
+ color: colorSuccessDark;
97
+ }
98
+
99
+ .stepIcon.disabled {
100
+ color: colorTextDisabled;
101
+ }
102
+
80
103
  .stepContent {
81
104
  display: flex;
82
105
  flex-flow: column;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StickyBarRightSlot = exports.StickyBarLeftSlot = exports.StickyBar = void 0;
7
+ var React = _interopRequireWildcard(require("react"));
8
+ var _classify = _interopRequireDefault(require("../../utils/classify"));
9
+ var _StickyBarModule = _interopRequireDefault(require("./StickyBar.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 StickyBarLeftSlot = _ref => {
15
+ let {
16
+ className,
17
+ children,
18
+ ...props
19
+ } = _ref;
20
+ return /*#__PURE__*/React.createElement("div", _extends({}, props, {
21
+ className: (0, _classify.default)(_StickyBarModule.default.leftSlot, className)
22
+ }), children);
23
+ };
24
+ exports.StickyBarLeftSlot = StickyBarLeftSlot;
25
+ const StickyBarRightSlot = _ref2 => {
26
+ let {
27
+ className,
28
+ children,
29
+ ...props
30
+ } = _ref2;
31
+ return /*#__PURE__*/React.createElement("div", _extends({}, props, {
32
+ className: (0, _classify.default)(_StickyBarModule.default.rightSlot, className)
33
+ }), children);
34
+ };
35
+ exports.StickyBarRightSlot = StickyBarRightSlot;
36
+ const StickyBar = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
37
+ let {
38
+ className,
39
+ children,
40
+ position = 'bottom',
41
+ ...props
42
+ } = _ref3;
43
+ return /*#__PURE__*/React.createElement("div", _extends({}, props, {
44
+ ref: ref,
45
+ "data-testid": "StickyBar",
46
+ className: (0, _classify.default)(_StickyBarModule.default.wrapper, {
47
+ [_StickyBarModule.default.top]: position === 'top',
48
+ [_StickyBarModule.default.bottom]: position === 'bottom'
49
+ }, className)
50
+ }), children);
51
+ });
52
+ exports.StickyBar = StickyBar;
@@ -0,0 +1,67 @@
1
+ // @flow strict
2
+
3
+ import * as React from 'react';
4
+
5
+ import classify from '../../utils/classify';
6
+
7
+ import css from './StickyBar.module.css';
8
+
9
+
10
+ export type StickyBarProps = {
11
+ className?: string,
12
+ children: React.Node,
13
+ position?: 'top' | 'bottom',
14
+ ...
15
+ };
16
+
17
+ export type StickyBarChildProps = {
18
+ className?: string,
19
+ children: React.Node,
20
+ ...
21
+ };
22
+
23
+ export const StickyBarLeftSlot = ({
24
+ className,
25
+ children,
26
+ ...props
27
+ }: StickyBarChildProps): React.Node => (
28
+ <div {...props} className={classify(css.leftSlot, className)}>
29
+ {children}
30
+ </div>
31
+ );
32
+
33
+ export const StickyBarRightSlot = ({
34
+ className,
35
+ children,
36
+ ...props
37
+ }: StickyBarChildProps): React.Node => (
38
+ <div {...props} className={classify(css.rightSlot, className)}>
39
+ {children}
40
+ </div>
41
+ );
42
+
43
+ export const StickyBar: React$AbstractComponent<
44
+ StickyBarProps,
45
+ HTMLDivElement,
46
+ > = React.forwardRef<StickyBarProps, HTMLDivElement>(
47
+ (
48
+ {className, children, position = 'bottom', ...props}: StickyBarProps,
49
+ ref,
50
+ ) => (
51
+ <div
52
+ {...props}
53
+ ref={ref}
54
+ data-testid="StickyBar"
55
+ className={classify(
56
+ css.wrapper,
57
+ {
58
+ [css.top]: position === 'top',
59
+ [css.bottom]: position === 'bottom',
60
+ },
61
+ className,
62
+ )}
63
+ >
64
+ {children}
65
+ </div>
66
+ ),
67
+ );
@@ -0,0 +1,28 @@
1
+ @value (colorFillPrimary, colorBackgroundTertiary) from '../../styles/variables/_color.css';
2
+ @value (sizeFluid) from '../../styles/variables/_size.css';
3
+ @value (spaceLarge, spaceMedium, spaceXSmall, spaceSmall) from '../../styles/variables/_space.css';
4
+
5
+ .wrapper {
6
+ display: flex;
7
+ width: sizeFluid;
8
+ align-items: center;
9
+ justify-content: space-between;
10
+ padding: spaceMedium spaceLarge;
11
+ gap: spaceXSmall;
12
+ background: colorBackgroundTertiary;
13
+ }
14
+
15
+ .top {
16
+ composes: borderBottomPrimary from '../../styles/border.module.css';
17
+ }
18
+
19
+ .bottom {
20
+ composes: borderTopPrimary from '../../styles/border.module.css';
21
+ }
22
+
23
+ .leftSlot,
24
+ .rightSlot {
25
+ display: flex;
26
+ align-items: center;
27
+ gap: spaceSmall;
28
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _StickyBar = require("./StickyBar");
7
+ Object.keys(_StickyBar).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _StickyBar[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _StickyBar[key];
14
+ }
15
+ });
16
+ });
@@ -0,0 +1,3 @@
1
+ // @flow strict
2
+
3
+ export * from './StickyBar';
@@ -68,7 +68,8 @@ function DefaultRow(_ref2) {
68
68
  }, /*#__PURE__*/React.createElement(_Checkbox.Checkbox, {
69
69
  checked: selected ? true : false,
70
70
  onChange: onSelect,
71
- disabled: disabled
71
+ disabled: disabled,
72
+ ariaLabel: "Select row"
72
73
  })), headers.map((item, index) => {
73
74
  const {
74
75
  key,
@@ -121,6 +121,7 @@ export function DefaultRow<T: GenericObject, U: GenericObject>({
121
121
  checked={selected ? true : false}
122
122
  onChange={onSelect}
123
123
  disabled={disabled}
124
+ ariaLabel="Select row"
124
125
  />
125
126
  </PaddedContentCell>
126
127
  )}
@@ -142,6 +142,7 @@ function DefaultTableHeader(props) {
142
142
  checked: checked === 'true' ? true : false,
143
143
  indeterminate: checked === 'mixed',
144
144
  onChange: handleCheckboxClick,
145
- disabled: disabled
145
+ disabled: disabled,
146
+ ariaLabel: "Select all rows"
146
147
  }))), tableHeaderCells()));
147
148
  }
@@ -219,6 +219,7 @@ export function DefaultTableHeader<T: GenericObject, U: GenericObject>(
219
219
  indeterminate={checked === 'mixed'}
220
220
  onChange={handleCheckboxClick}
221
221
  disabled={disabled}
222
+ ariaLabel="Select all rows"
222
223
  />
223
224
  </div>
224
225
  </BasicHeadCell>
@@ -44,4 +44,5 @@
44
44
  padding: spaceSmall;
45
45
  background-color: colorBackgroundTertiary;
46
46
  border-radius: borderRadiusMedium;
47
+ width: max-content;
47
48
  }
@@ -432,6 +432,17 @@ Object.keys(_Stepper).forEach(function (key) {
432
432
  }
433
433
  });
434
434
  });
435
+ var _StickyBar = require("./StickyBar");
436
+ Object.keys(_StickyBar).forEach(function (key) {
437
+ if (key === "default" || key === "__esModule") return;
438
+ if (key in exports && exports[key] === _StickyBar[key]) return;
439
+ Object.defineProperty(exports, key, {
440
+ enumerable: true,
441
+ get: function () {
442
+ return _StickyBar[key];
443
+ }
444
+ });
445
+ });
435
446
  var _SubMenu = require("./SubMenu");
436
447
  Object.keys(_SubMenu).forEach(function (key) {
437
448
  if (key === "default" || key === "__esModule") return;
@@ -39,6 +39,7 @@ export * from './SearchInput';
39
39
  export * from './SideMenuLink';
40
40
  export * from './StatusIndicator';
41
41
  export * from './Stepper';
42
+ export * from './StickyBar';
42
43
  export * from './SubMenu';
43
44
  export * from './Table';
44
45
  export * from './Tabs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {