imbric-theme 0.7.2 → 0.7.4

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.
@@ -101,6 +101,7 @@ export const DynamicTable = ({
101
101
  optionsSelect={addColumsData}
102
102
  placeholder={placeholderDinamicSelect}
103
103
  defaultValue={handleDefaultValue}
104
+ closeMenuOnSelect={false}
104
105
  // defaultValue= { [{value: 'id', label: 'ID'}, {value: 'idService', label: 'ID Reserva'}] }
105
106
  /> : null
106
107
  }
@@ -108,22 +109,26 @@ export const DynamicTable = ({
108
109
  </div>
109
110
  ) : null}
110
111
 
111
- <Horizontal size="md" />
112
+
112
113
 
113
114
  {isViewBtn ? (
114
- <div className={getStyles('opFunctionBox3')}>
115
115
 
116
- <Button
117
- type={typeBtn}
118
- isInline={true}
119
- onClick={handleBtn}
120
- >
121
- {titleBtn}
122
- </Button>
116
+ <>
123
117
 
124
- <Horizontal size="md" />
118
+ <div className={getStyles('opFunctionBox3')}>
125
119
 
126
- </div>
120
+ <Button
121
+ type={typeBtn}
122
+ isInline={true}
123
+ onClick={handleBtn}
124
+ >
125
+ {titleBtn}
126
+ </Button>
127
+
128
+ <Horizontal size="md" />
129
+
130
+ </div>
131
+ </>
127
132
  ) : null}
128
133
 
129
134
 
@@ -5,6 +5,10 @@
5
5
  width: 100%;
6
6
  }
7
7
 
8
+ .opFunctionBox3 {
9
+ margin-left: 16px;
10
+ }
11
+
8
12
  /* .opFunctionBox1 {
9
13
  display: inline-flex;
10
14
  } */
@@ -1,4 +1,3 @@
1
-
2
1
  /* .is-playground {
3
2
  border: var(--border-width-thick) dashed var(--color-primary);
4
3
  } */
@@ -13,6 +12,7 @@
13
12
  box-shadow: 0px 1px 4px rgb(100 116 139 / 12%);
14
13
  width: calc(100%);
15
14
  padding-left: 18px;
15
+ padding-right: 14px;
16
16
  min-height: 51px;
17
17
  background-color: #f2fcfc;
18
18
  }
@@ -105,6 +105,7 @@ export const ColumnTable = ({ getStyles, handleSorting, columnUppercase, onChang
105
105
  onChange={onChangeSelect}
106
106
  optionsSelect={opSelect}
107
107
  placeholder={props.placeholder}
108
+ maxMenuHeight={110}
108
109
  />
109
110
  :
110
111
  <Input
@@ -9,6 +9,9 @@
9
9
  border-bottom-color: rgba(0, 0, 0, 0.12);
10
10
  border-bottom-width: 1px;
11
11
  border-bottom-style: solid;
12
+ border-top-color: rgba(0, 0, 0, 0.12);
13
+ border-top-width: 1px;
14
+ border-top-style: solid;
12
15
  }
13
16
 
14
17
  .column-uppercase {
@@ -5,7 +5,25 @@ import styles from './DynamicSelect.module.css'
5
5
  import withStyles from '../../hocs/withStyles'
6
6
 
7
7
 
8
- export const DynamicSelect = ({ getStyles, optionsSelect, value, defaultValue, placeholder, isMulti, isClearable, isDisabled, isLoading, isRtl, isSearchable, isInline, onChange, onFocus, onBlur, closeMenuOnSelect }) => {
8
+ export const DynamicSelect = ({
9
+ getStyles,
10
+ optionsSelect,
11
+ value,
12
+ defaultValue,
13
+ placeholder,
14
+ isMulti,
15
+ isClearable,
16
+ isDisabled,
17
+ isLoading,
18
+ isRtl,
19
+ isSearchable,
20
+ isInline,
21
+ onChange,
22
+ onFocus,
23
+ onBlur,
24
+ closeMenuOnSelect,
25
+ maxMenuHeight
26
+ }) => {
9
27
 
10
28
 
11
29
  const customStyles = {
@@ -13,7 +31,9 @@ export const DynamicSelect = ({ getStyles, optionsSelect, value, defaultValue, p
13
31
  option: (base, state) => ({
14
32
  ...base,
15
33
  cursor: 'pointer',
16
- height: '100%',
34
+ width: "max-content",
35
+ minWidth: "100%",
36
+ position: 'relative',
17
37
  backgroundColor: state.isSelected ? 'var(--color-primary)' : 'transparent',
18
38
  "&:hover": {
19
39
  backgroundColor: "var(--color-primary-highlight)",
@@ -52,6 +72,36 @@ export const DynamicSelect = ({ getStyles, optionsSelect, value, defaultValue, p
52
72
  textOverflow: 'ellipsis',
53
73
  }),
54
74
 
75
+ valueContainer: (base, state) => ({
76
+ ...base,
77
+ textOverflow: "ellipsis",
78
+ whiteSpace: "nowrap",
79
+ overflow: "hidden",
80
+ // display: "inline-grid"
81
+ // maxHeight: "38px",
82
+ }),
83
+
84
+ container: (base) => ({
85
+ ...base,
86
+ // width: "max-content",
87
+ minWidth: "100%",
88
+ }),
89
+
90
+ menu: (base) => ({
91
+ ...base,
92
+ width: "max-content",
93
+ minWidth: "100%",
94
+ }),
95
+
96
+ // menu: styles => ({ ...styles,
97
+ // width: '500px'
98
+ // })
99
+
100
+ // indicatorsContainer: (provided, state) => ({
101
+ // ...provided,
102
+ // height: '50px',
103
+ // }),
104
+
55
105
  }
56
106
 
57
107
  // const handleChange = (value) => {
@@ -85,6 +135,8 @@ export const DynamicSelect = ({ getStyles, optionsSelect, value, defaultValue, p
85
135
  onFocus={onFocus}
86
136
  onBlur={onBlur}
87
137
  closeMenuOnSelect={closeMenuOnSelect}
138
+ maxMenuHeight={maxMenuHeight}
139
+ autosize={true}
88
140
  />
89
141
  </div>
90
142
 
@@ -106,7 +158,8 @@ DynamicSelect.propTypes = {
106
158
  onChange: PropTypes.func,
107
159
  onFocus: PropTypes.func,
108
160
  onBlur: PropTypes.func,
109
- closeMenuOnSelect: PropTypes.bool
161
+ closeMenuOnSelect: PropTypes.bool,
162
+ maxMenuHeight: PropTypes.number
110
163
  }
111
164
 
112
165
  DynamicSelect.defaultProps = {
@@ -122,7 +175,8 @@ DynamicSelect.defaultProps = {
122
175
  onChange: () => { },
123
176
  onFocus: () => { },
124
177
  onBlur: () => { },
125
- closeMenuOnSelect: true
178
+ closeMenuOnSelect: true,
179
+ maxMenuHeight: 300
126
180
  }
127
181
 
128
182
  export default withStyles(styles)(DynamicSelect)
@@ -103,7 +103,7 @@ export const RowTable = ({
103
103
  <tbody>
104
104
  {slice.map((item, index) => (
105
105
 
106
- <tr style={{ background: item.colorRow }} className={getStyles({ 'tr-content': isClickRow })} onClick={(e) => { onClickRow(e, item) }} key={index}>
106
+ <tr style={{ background: item.colorRow }} className={getStyles({ 'tr-content': isClickRow }, 'tr')} onClick={(e) => { onClickRow(e, item) }} key={index}>
107
107
 
108
108
  {columnsData.map((itemTd, indexTd) => (
109
109
  itemTd.activeView ?
@@ -4,6 +4,11 @@
4
4
 
5
5
  }
6
6
 
7
+ .tr {
8
+ /* border: 1px solid rgba(0, 0, 0, 0.1); */
9
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
10
+ }
11
+
7
12
  .tbl-content {
8
13
  height: max-content;
9
14
  overflow-x: auto;
@@ -18,7 +23,7 @@
18
23
  font-weight: 300;
19
24
  font-size: 12px;
20
25
  color: var(--color-font-base);
21
- border-bottom: solid 1px rgba(0, 0, 0, 0.1);
26
+ /* border-bottom: solid 1px rgba(0, 0, 0, 0.1); */
22
27
  overflow: hidden;
23
28
  text-overflow: ellipsis;
24
29
  /* white-space: nowrap; */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imbric-theme",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "Components library IMBRIC",
5
5
  "private": false,
6
6
  "main": "index.js",