@spaced-out/ui-design-system 0.0.51 → 0.0.53

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,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.0.53](https://github.com/spaced-out/ui-design-system/compare/v0.0.52...v0.0.53) (2023-03-21)
6
+
7
+
8
+ ### Features
9
+
10
+ * typeahead on clear support ([6348d18](https://github.com/spaced-out/ui-design-system/commit/6348d187f6b75c1ce16e38b47d0106c4200a6867))
11
+
12
+ ### [0.0.52](https://github.com/spaced-out/ui-design-system/compare/v0.0.51...v0.0.52) (2023-03-20)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * modal positioning fix ([0697163](https://github.com/spaced-out/ui-design-system/commit/0697163bdafbb71828a3282a14e0fe8579998278))
18
+
5
19
  ### [0.0.51](https://github.com/spaced-out/ui-design-system/compare/v0.0.50...v0.0.51) (2023-03-20)
6
20
 
7
21
 
@@ -15,7 +15,8 @@
15
15
  .modal {
16
16
  position: fixed;
17
17
  top: spaceHalfFluid;
18
- transform: translateY(spaceNegHalfFluid) scale(0.95);
18
+ left: spaceHalfFluid;
19
+ transform: translate(spaceNegHalfFluid, spaceNegHalfFluid) scale(0.95);
19
20
  opacity: opacity0;
20
21
  composes: boxShadow4 from '../../styles/shadow.module.css';
21
22
  display: flex;
@@ -30,7 +31,7 @@
30
31
 
31
32
  .modalContainer.open.in .modal {
32
33
  opacity: opacity100;
33
- transform: translateY(spaceNegHalfFluid) scale(1);
34
+ transform: translate(spaceNegHalfFluid, spaceNegHalfFluid) scale(1);
34
35
  }
35
36
 
36
37
  .backdrop {
@@ -27,12 +27,14 @@
27
27
  .panel.left {
28
28
  top: spaceNone;
29
29
  left: spaceNone;
30
+ right: initial;
30
31
  transform: translateX(spaceNegFluid);
31
32
  }
32
33
 
33
34
  .panel.right {
34
35
  top: spaceNone;
35
36
  right: spaceNone;
37
+ left: initial;
36
38
  transform: translateX(spaceFluid);
37
39
  }
38
40
 
@@ -28,6 +28,7 @@ const Typeahead = _ref => {
28
28
  onSearch,
29
29
  selectedOption,
30
30
  menuSize,
31
+ onClear,
31
32
  ...inputProps
32
33
  } = _ref;
33
34
  const typeaheadRef = React.useRef();
@@ -95,6 +96,10 @@ const Typeahead = _ref => {
95
96
  } else {
96
97
  clickAway();
97
98
  }
99
+ },
100
+ onClear: _e => {
101
+ setInputValue('');
102
+ onClear?.();
98
103
  }
99
104
  })), isOpen && filteredOptions && !!filteredOptions.length && /*#__PURE__*/React.createElement("div", {
100
105
  onClickCapture: cancelNext,
@@ -45,6 +45,7 @@ export type TypeaheadProps = {
45
45
  options?: Array<MenuOption>,
46
46
  selectedOption?: MenuOption,
47
47
  menuSize?: 'medium' | 'small',
48
+ onClear?: () => void,
48
49
  };
49
50
 
50
51
  export const Typeahead = ({
@@ -56,6 +57,7 @@ export const Typeahead = ({
56
57
  onSearch,
57
58
  selectedOption,
58
59
  menuSize,
60
+ onClear,
59
61
  ...inputProps
60
62
  }: TypeaheadProps): React.Node => {
61
63
  const typeaheadRef = React.useRef();
@@ -123,6 +125,10 @@ export const Typeahead = ({
123
125
  clickAway();
124
126
  }
125
127
  }}
128
+ onClear={(_e) => {
129
+ setInputValue('');
130
+ onClear?.();
131
+ }}
126
132
  />
127
133
 
128
134
  {isOpen && filteredOptions && !!filteredOptions.length && (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.0.51",
3
+ "version": "0.0.53",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {