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.
- package/layout/DynamicTable/DynamicTable.js +16 -11
- package/layout/DynamicTable/DynamicTable.module.css +4 -0
- package/layout/Navbar/Navbar.module.css +1 -1
- package/molecules/ColumnTable/ColumnTable.js +1 -0
- package/molecules/ColumnTable/ColumnTable.module.css +3 -0
- package/molecules/DynamicSelect/DynamicSelect.js +58 -4
- package/molecules/RowTable/RowTable.js +1 -1
- package/molecules/RowTable/RowTable.module.css +6 -1
- package/package.json +1 -1
@@ -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
|
-
|
112
|
+
|
112
113
|
|
113
114
|
{isViewBtn ? (
|
114
|
-
<div className={getStyles('opFunctionBox3')}>
|
115
115
|
|
116
|
-
|
117
|
-
type={typeBtn}
|
118
|
-
isInline={true}
|
119
|
-
onClick={handleBtn}
|
120
|
-
>
|
121
|
-
{titleBtn}
|
122
|
-
</Button>
|
116
|
+
<>
|
123
117
|
|
124
|
-
<
|
118
|
+
<div className={getStyles('opFunctionBox3')}>
|
125
119
|
|
126
|
-
|
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
|
|
@@ -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
|
}
|
@@ -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 = ({
|
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
|
-
|
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; */
|