@axinom/mosaic-ui 0.55.0-rc.10 → 0.55.0-rc.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axinom/mosaic-ui",
3
- "version": "0.55.0-rc.10",
3
+ "version": "0.55.0-rc.12",
4
4
  "description": "UI components for building Axinom Mosaic applications",
5
5
  "author": "Axinom",
6
6
  "license": "PROPRIETARY",
@@ -32,7 +32,7 @@
32
32
  "build-storybook": "storybook build"
33
33
  },
34
34
  "dependencies": {
35
- "@axinom/mosaic-core": "^0.4.28-rc.10",
35
+ "@axinom/mosaic-core": "^0.4.28-rc.12",
36
36
  "@faker-js/faker": "^7.4.0",
37
37
  "@geoffcox/react-splitter": "^2.1.2",
38
38
  "@mui/base": "5.0.0-beta.40",
@@ -107,5 +107,5 @@
107
107
  "publishConfig": {
108
108
  "access": "public"
109
109
  },
110
- "gitHead": "0029071f94fd1de080b503960fbea3425c10a7d6"
110
+ "gitHead": "ed3063f536d5054925480f0f8959f44e58990b5e"
111
111
  }
@@ -8,8 +8,8 @@
8
8
  grid-template-columns: 1fr;
9
9
  grid-template-rows: min-content min-content;
10
10
 
11
- select {
12
- max-width: none;
13
- width: 100%;
11
+ div:has(> input) {
12
+ max-width: none !important;
13
+ width: 100% !important;
14
14
  }
15
15
  }
@@ -2,32 +2,14 @@
2
2
 
3
3
  .container {
4
4
  .inputWrapper {
5
- position: relative;
6
- max-width: var(--input-max-width, $input-max-width);
7
-
8
- .button {
9
- position: absolute;
10
- right: 0;
11
- top: 0;
12
-
13
- svg {
14
- height: 50%;
15
- * {
16
- stroke: var(
17
- --popper-trigger-button-color,
18
- $popper-trigger-button-color
19
- );
20
- }
21
- }
22
-
23
- &:disabled {
24
- svg * {
25
- stroke: var(--select-arrow-color, $select-disabled-arrow-color);
26
- }
27
- }
28
- }
5
+ display: grid;
6
+ grid-template-columns: 1fr auto;
7
+ align-items: center;
8
+ max-width: var(--select-max-width, $select-max-width);
9
+ width: var(--select-max-width, $select-max-width);
29
10
 
30
11
  input {
12
+ grid-column: 1/2;
31
13
  color: var(--input-color, $input-color);
32
14
  border: 1px solid var(--input-border-color, $input-border-color);
33
15
  padding: 0 48px 0 12px;
@@ -82,6 +64,29 @@
82
64
  }
83
65
  }
84
66
  }
67
+
68
+ .button {
69
+ grid-column: 2/3;
70
+ margin-left: -50px;
71
+ svg {
72
+ height: 50%;
73
+ * {
74
+ stroke: var(
75
+ --popper-trigger-button-color,
76
+ $popper-trigger-button-color
77
+ );
78
+ }
79
+ }
80
+
81
+ &:disabled {
82
+ svg * {
83
+ stroke: var(
84
+ --select-disabled-arrow-color,
85
+ $select-disabled-arrow-color
86
+ );
87
+ }
88
+ }
89
+ }
85
90
  }
86
91
  }
87
92
 
@@ -1,6 +1,7 @@
1
1
  import { Popper, useAutocomplete, UseAutocompleteProps } from '@mui/base';
2
2
  import clsx from 'clsx';
3
3
  import React, { ChangeEvent } from 'react';
4
+ import { noop } from '../../../helpers/utils';
4
5
  import { Button, ButtonContext } from '../../Buttons';
5
6
  import { IconName } from '../../Icons';
6
7
  import { BaseFormControl, BaseInputEvents } from '../Form.models';
@@ -65,7 +66,7 @@ export const Select: React.FC<SelectProps> = (props) => {
65
66
  id,
66
67
  disabled,
67
68
  value:
68
- autoCompleteProps.options.find((option) => option.value === value) ??
69
+ autoCompleteProps.options?.find((option) => option.value === value) ??
69
70
  null,
70
71
  onChange: ({ target: _, ...event }, value) => {
71
72
  onChange?.({
@@ -76,6 +77,7 @@ export const Select: React.FC<SelectProps> = (props) => {
76
77
  name,
77
78
  value: value?.value ?? '',
78
79
  },
80
+ preventDefault: noop,
79
81
  } as ChangeEvent<HTMLInputElement>);
80
82
  },
81
83
  disableClearable: !addEmptyOption,