techsbcn-storybook 0.22.6 → 0.22.7
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/dist/components/tables/SearchComponent/SearchComponent.d.ts +2 -1
- package/dist/techsbcn-storybook.cjs.development.js +16 -12
- package/dist/techsbcn-storybook.cjs.development.js.map +1 -1
- package/dist/techsbcn-storybook.cjs.production.min.js +1 -1
- package/dist/techsbcn-storybook.cjs.production.min.js.map +1 -1
- package/dist/techsbcn-storybook.esm.js +22 -18
- package/dist/techsbcn-storybook.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/fields/TextFieldComponent/TextFieldComponent.scss +3 -0
- package/src/components/fields/TextFieldComponent/TextFieldComponent.tsx +2 -1
- package/src/components/fields/TextSimpleComponent/TextSimpleComponent.scss +4 -1
- package/src/components/fields/TextSimpleComponent/TextSimpleComponent.tsx +3 -1
- package/src/components/tables/SearchComponent/SearchComponent.tsx +81 -77
- package/src/components/wrappers/MainWrapperComponent/MainWrapperComponent.tsx +1 -1
- package/src/stories/Layouts/MainLayoutSimple.stories.tsx +1 -1
- package/src/stories/MainWrapper/MainWrapper.stories.tsx +8 -6
- package/src/stories/Tables/Tables.stories.tsx +3 -3
|
@@ -5,7 +5,7 @@ export interface SearchComponentProps {
|
|
|
5
5
|
title?: string;
|
|
6
6
|
searchBar?: any;
|
|
7
7
|
actions?: {
|
|
8
|
-
|
|
8
|
+
action: any;
|
|
9
9
|
}[];
|
|
10
10
|
filters?: {
|
|
11
11
|
singleFilter?: any;
|
|
@@ -14,6 +14,7 @@ export interface SearchComponentProps {
|
|
|
14
14
|
filtersSize?: number;
|
|
15
15
|
enableAfter?: boolean;
|
|
16
16
|
fixedOpen?: boolean;
|
|
17
|
+
divider?: boolean;
|
|
17
18
|
}
|
|
18
19
|
interface DoubleFilter {
|
|
19
20
|
label?: string;
|
|
@@ -85,7 +85,7 @@ var ActionsList = function ActionsList(actions) {
|
|
|
85
85
|
ml: 2,
|
|
86
86
|
key: i,
|
|
87
87
|
className: "btn-action main-color"
|
|
88
|
-
}, action.
|
|
88
|
+
}, action.action);
|
|
89
89
|
}));
|
|
90
90
|
};
|
|
91
91
|
|
|
@@ -136,13 +136,16 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
136
136
|
var randId = Math.random().toString(36).substring(7);
|
|
137
137
|
return React__default.createElement(material.Box, {
|
|
138
138
|
className: "search-component " + props.className
|
|
139
|
+
}, React__default.createElement(material.Box, {
|
|
140
|
+
mb: props.divider ? 2 : 0,
|
|
141
|
+
px: 2
|
|
139
142
|
}, React__default.createElement(material.Grid, {
|
|
140
143
|
container: true,
|
|
141
144
|
alignItems: "center"
|
|
142
145
|
}, React__default.createElement(material.Grid, {
|
|
143
146
|
item: true,
|
|
144
147
|
xs: props.actions ? 8 : 12,
|
|
145
|
-
md: props.actions && props.searchBar ? 4 : props.searchBar ?
|
|
148
|
+
md: props.actions && props.searchBar ? 4 : props.searchBar ? 7 : props.actions ? 6 : 12
|
|
146
149
|
}, React__default.createElement(material.Box, {
|
|
147
150
|
pr: 1,
|
|
148
151
|
className: (props.enableAfter ? 'main-background-color-after' : '') + " title"
|
|
@@ -193,14 +196,14 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
193
196
|
className: "wrapper-actions"
|
|
194
197
|
}, React__default.createElement(material.Box, {
|
|
195
198
|
className: "btn-action main-color"
|
|
196
|
-
}, action.
|
|
199
|
+
}, action.action));
|
|
197
200
|
}))) : React__default.createElement(material.Box, {
|
|
198
201
|
ml: "auto",
|
|
199
202
|
className: "wrapper-actions " + (props.title ? 'min-action-width' : '')
|
|
200
203
|
}, ActionsList(props.actions)))), (props.searchBar || props.filters || props.actions) && React__default.createElement(material.Grid, {
|
|
201
204
|
item: true,
|
|
202
205
|
xs: 12,
|
|
203
|
-
md: props.actions && props.searchBar ? 8 : props.actions ? 6 :
|
|
206
|
+
md: props.actions && props.searchBar ? 8 : props.actions ? 6 : 5
|
|
204
207
|
}, React__default.createElement(material.Box, {
|
|
205
208
|
display: "flex",
|
|
206
209
|
alignItems: "center"
|
|
@@ -227,11 +230,13 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
227
230
|
}
|
|
228
231
|
},
|
|
229
232
|
className: "wrapper-actions"
|
|
230
|
-
}, ActionsList(props.actions))))), React__default.createElement(material.Collapse, {
|
|
233
|
+
}, ActionsList(props.actions)))))), props.divider && React__default.createElement(material.Divider, null), React__default.createElement(material.Collapse, {
|
|
231
234
|
"in": isOpen
|
|
232
235
|
}, React__default.createElement(material.Box, {
|
|
233
236
|
className: "filters",
|
|
234
|
-
|
|
237
|
+
px: 2,
|
|
238
|
+
mt: 2,
|
|
239
|
+
mb: props.divider ? 0 : 1
|
|
235
240
|
}, React__default.createElement(material.Grid, {
|
|
236
241
|
container: true,
|
|
237
242
|
spacing: 3,
|
|
@@ -284,8 +289,7 @@ var MainWrapperComponent = function MainWrapperComponent(props) {
|
|
|
284
289
|
}, React__default.createElement(_.CircularProgress, {
|
|
285
290
|
className: "circular-progress-main-color"
|
|
286
291
|
})) : React__default.createElement(React__default.Fragment, null, props.headerProps && React__default.createElement(_.Box, {
|
|
287
|
-
mb: props.divider ? 1 : 0
|
|
288
|
-
px: 2
|
|
292
|
+
mb: props.divider ? 1.5 : 0
|
|
289
293
|
}, React__default.createElement(SearchComponent, Object.assign({}, props.headerProps, {
|
|
290
294
|
enableAfter: true
|
|
291
295
|
}))), props.divider && React__default.createElement(_.Divider, null), props.children && !props.loadingChildren ? React__default.createElement(_.Box, {
|
|
@@ -306,7 +310,7 @@ var MainWrapperComponent = function MainWrapperComponent(props) {
|
|
|
306
310
|
var css_248z$4 = ".table-component .paper-container {\n box-shadow: none;\n background-color: transparent !important;\n}\n.table-component .paper-container .checkbox-cell .MuiCheckbox-root {\n padding: 0 !important;\n}\n.table-component .paper-container .checkbox-cell .MuiCheckbox-root:hover {\n background-color: transparent !important;\n}\n.table-component .paper-container .checkbox-cell .Mui-checked {\n color: rgba(0, 0, 0, 0.54) !important;\n}\n.table-component .paper-container .checkbox-cell .MuiCheckbox-indeterminate {\n color: #212529 !important;\n}\n.table-component .paper-container .table-container.with-scroll {\n max-height: 68vh;\n}\n.table-component .paper-container .table-container .table-column {\n font-weight: bold;\n font-size: calc(9pt + (11 - 9) * calc(100vw - 300px)/1300) !important;\n padding: 10px !important;\n border-top: 1px solid #e0e0e0;\n border-right: 1px solid #e0e0e0;\n border-bottom: 2px solid #e0e0e0;\n}\n.table-component .paper-container .table-container .table-column .table-header-cell {\n color: black;\n font-weight: bold;\n padding: 0px 10px 0px 10px !important;\n}\n.table-component .paper-container .table-container.table-simple {\n border-bottom: 1px solid black;\n}\n.table-component .paper-container .table-container.table-simple .table-column:first-child {\n border-radius: 5px 0 0 5px;\n}\n.table-component .paper-container .table-container.table-simple .table-column:last-child {\n border-right: none !important;\n border-radius: 0 5px 5px 0;\n}\n.table-component .paper-container .table-container.table-bordered .table-column {\n border-bottom: 1px solid #eaeaea !important;\n border-top: 1px solid #eaeaea !important;\n border-right: 1px solid #eaeaea !important;\n border-bottom: 1px solid #eaeaea !important;\n color: #7a7a7a !important;\n}\n.table-component .paper-container .table-container.table-bordered .table-column .table-header-cell {\n color: #7a7a7a !important;\n}\n.table-component .paper-container .table-container.table-bordered .table-column:first-child {\n border-left: 1px solid #eaeaea;\n}\n.table-component .paper-container .table-container.table-bordered .table-rows .table-cell {\n border-right: 1px solid #eaeaea;\n color: #505050 !important;\n}\n.table-component .paper-container .table-container.table-bordered .table-rows .table-cell:first-child {\n border-left: 1px solid #eaeaea;\n}\n.table-component .paper-container .table-container .table-rows.table-striped td {\n background-color: rgba(255, 255, 255, 0.95);\n}\n.table-component .paper-container .table-container .table-rows.row-click {\n cursor: pointer;\n}\n.table-component .paper-container .table-container .table-rows.row-click:hover {\n background-color: rgba(0, 0, 0, 0.04);\n}\n.table-component .paper-container .table-container .table-rows.row-click:hover.table-striped {\n background-color: transparent !important;\n}\n.table-component .paper-container .table-container .table-rows.row-click:hover.table-striped td {\n background-color: rgba(0, 0, 0, 0.04);\n}\n.table-component .paper-container .table-container .table-rows.Mui-selected {\n background-color: rgba(0, 0, 0, 0.04);\n}\n.table-component .paper-container .table-container .table-rows.Mui-selected.table-striped {\n background-color: transparent !important;\n}\n.table-component .paper-container .table-container .table-rows.Mui-selected.table-striped td {\n background-color: rgba(0, 0, 0, 0.04);\n}\n.table-component .paper-container .table-container .table-rows .Mui-selected {\n background-color: transparent !important;\n}\n.table-component .paper-container .table-container .table-rows .MuiTableCell-root {\n padding: 6px !important;\n overflow: hidden;\n}\n.table-component .paper-container .table-container .table-rows .img-table {\n width: 100%;\n height: 110px;\n}\n.table-component .paper-container .table-container .table-rows .img-table img {\n object-fit: contain;\n}\n.table-component .paper-container .table-container .table-rows .actions {\n float: right;\n}\n.table-component .paper-container .table-container .table-rows .btn-action {\n color: rgba(0, 0, 0, 0.54);\n display: inline-block;\n text-decoration: none;\n font-size: 1.6em !important;\n padding: 0px 7px;\n cursor: pointer;\n}\n.table-component .paper-container .table-container .table-rows .format-value {\n font-size: calc(9pt + (11 - 9) * calc(100vw - 300px)/1300) !important;\n}\n.table-component .paper-container .table-container .table-rows .format-value .MuiTypography-root {\n font-size: calc(9pt + (11 - 9) * calc(100vw - 300px)/1300);\n}\n.table-component .paper-container .MuiTable-root.loading {\n opacity: 0.5;\n}\n.table-component .paper-container .MuiTable-root.loading .MuiCircularProgress-root {\n width: 80px !important;\n height: 80px !important;\n position: absolute;\n left: 0;\n right: 0;\n top: 5px;\n margin: auto;\n color: grey;\n}\n.table-component .paper-container .MuiTablePagination-root {\n overflow: unset;\n}\n.table-component .paper-container .MuiTablePagination-root .MuiToolbar-root {\n justify-content: center !important;\n flex-wrap: wrap;\n padding: 0px !important;\n}\n.table-component .paper-container .MuiTablePagination-root .MuiTablePagination-spacer {\n flex: 0 !important;\n}\n.table-component .paper-container .MuiTablePagination-root.table-bordered {\n color: #7a7a7a !important;\n}\n.table-component .paper-container .MuiTablePagination-root.table-bordered .pagination {\n margin-left: auto;\n}\n.table-component .paper-container .MuiTablePagination-root.table-bordered .pagination li button {\n border-color: #dee2e6 !important;\n margin: 0px;\n border-radius: 0px !important;\n color: #7a7a7a !important;\n border-top: 1px solid;\n border-bottom: 1px solid;\n border-left: 0px solid;\n border-right: 1px solid;\n}\n.table-component .paper-container .MuiTablePagination-root.table-bordered .pagination li:nth-child(1) .MuiPaginationItem-root {\n border-radius: 5px 0 0 5px !important;\n border-left: 1px solid;\n}\n.table-component .paper-container .MuiTablePagination-root.table-bordered .pagination li:nth-last-child(1) .MuiPaginationItem-root {\n border-radius: 0 5px 5px 0 !important;\n}\n.table-component .paper-container .MuiTablePagination-root.table-bordered .pagination .MuiPaginationItem-icon {\n color: #7a7a7a !important;\n}\n.table-component .paper-container .MuiTablePagination-root.table-simple .pagination .MuiPaginationItem-page {\n background-color: #3f4d67;\n color: white !important;\n}\n.table-component .paper-container .MuiTablePagination-root.table-simple .pagination li:nth-child(2) .MuiPaginationItem-page {\n border-radius: 5px 0 0 5px !important;\n}\n.table-component .paper-container .MuiTablePagination-root.table-simple .pagination li:nth-last-child(2) .MuiPaginationItem-page {\n border-radius: 0 5px 5px 0 !important;\n}\n.table-component .paper-container .MuiTablePagination-root .pagination .MuiPaginationItem-page {\n border-radius: 0px;\n margin: 1px;\n}\n.table-component .paper-container .MuiTablePagination-root .pagination .MuiPaginationItem-page.Mui-selected {\n color: white !important;\n background-color: #3299C7;\n}\n.table-component .paper-container .MuiTablePagination-root .pagination li button {\n padding: 14px;\n}\n@media (max-width: 992px) {\n .table-component .paper-container .table-container {\n max-height: 60vh;\n border-top: 1px solid #cccccc;\n }\n .table-component .paper-container .table-container .MuiTable-root {\n border-collapse: collapse !important;\n }\n .table-component .paper-container .table-container .MuiTableHead-root {\n display: none !important;\n }\n .table-component .paper-container .table-container .table-rows {\n border-bottom: 2px solid #cccccc;\n }\n .table-component .paper-container .table-container .table-rows .MuiTableCell-root {\n width: auto;\n border-bottom: none !important;\n }\n .table-component .paper-container .table-container .table-rows .MuiTableCell-root .label-cell {\n font-size: 1rem;\n vertical-align: top;\n width: 50%;\n height: auto;\n }\n .table-component .paper-container .table-container .table-rows .MuiTableCell-root .label-cell + div {\n display: inline-block;\n }\n .table-component .paper-container .table-container .table-rows .table-cell {\n display: block !important;\n }\n .table-component .paper-container .table-container .table-rows .format-value {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n width: 50%;\n max-width: 299px;\n }\n .table-component .MuiTablePagination-root.table-bordered .pagination {\n margin-left: 0;\n }\n}";
|
|
307
311
|
styleInject(css_248z$4);
|
|
308
312
|
|
|
309
|
-
var css_248z$5 = ".text-field-component .MuiFormLabel-root {\n color: #666666 !important;\n font-size: 1rem !important;\n transform: translate(0, 0.5px) scale(0.85);\n transform-origin: top left;\n text-overflow: initial !important;\n}\n.text-field-component .MuiFormLabel-root + .MuiInputBase-formControl {\n margin-top: 25px !important;\n}\n.text-field-component .MuiInputBase-root.no-border {\n border: none !important;\n padding: 0 !important;\n width: fit-content !important;\n}\n.text-field-component .MuiInputBase-root {\n color: #666666 !important;\n border: 1px solid grey;\n padding: 0.33rem 0.87rem;\n background-color: white !important;\n border-radius: 3px !important;\n font-size: 14px !important;\n}\n.text-field-component .MuiInputBase-root.Mui-error {\n border: 1px solid #F24726 !important;\n}\n.text-field-component .MuiInputBase-root:not(.Mui-disabled):hover {\n border: 1px solid grey;\n}\n.text-field-component .MuiInputBase-root.Mui-focused {\n border: 1px solid #3299C7;\n}\n.text-field-component .MuiInputBase-root .MuiInputBase-input {\n color: #666666 !important;\n background-color: white !important;\n}\n.text-field-component .MuiInputBase-root .MuiInputBase-input::placeholder {\n text-overflow: ellipsis !important;\n color: #666666 !important;\n opacity: 1;\n}\n.text-field-component .MuiInputBase-root .Mui-disabled {\n -webkit-text-fill-color: #666666 !important;\n}\n.text-field-component .MuiFormHelperText-root {\n padding: 0 !important;\n font-size: 0.85rem !important;\n color: #666666;\n}";
|
|
313
|
+
var css_248z$5 = ".text-field-component .MuiFormLabel-root {\n color: #666666 !important;\n font-size: 1rem !important;\n transform: translate(0, 0.5px) scale(0.85);\n transform-origin: top left;\n text-overflow: initial !important;\n}\n.text-field-component .MuiFormLabel-root + .MuiInputBase-formControl {\n margin-top: 25px !important;\n}\n.text-field-component .MuiInputBase-root.no-border {\n border: none !important;\n padding: 0 !important;\n width: fit-content !important;\n}\n.text-field-component .MuiInputBase-root {\n color: #666666 !important;\n border: 1px solid grey;\n padding: 0.33rem 0.87rem;\n background-color: white !important;\n border-radius: 3px !important;\n font-size: 14px !important;\n}\n.text-field-component .MuiInputBase-root.end-icon-padding {\n padding: 0.1769rem 0.87rem;\n}\n.text-field-component .MuiInputBase-root.Mui-error {\n border: 1px solid #F24726 !important;\n}\n.text-field-component .MuiInputBase-root:not(.Mui-disabled):hover {\n border: 1px solid grey;\n}\n.text-field-component .MuiInputBase-root.Mui-focused {\n border: 1px solid #3299C7;\n}\n.text-field-component .MuiInputBase-root .MuiInputBase-input {\n color: #666666 !important;\n background-color: white !important;\n}\n.text-field-component .MuiInputBase-root .MuiInputBase-input::placeholder {\n text-overflow: ellipsis !important;\n color: #666666 !important;\n opacity: 1;\n}\n.text-field-component .MuiInputBase-root .Mui-disabled {\n -webkit-text-fill-color: #666666 !important;\n}\n.text-field-component .MuiFormHelperText-root {\n padding: 0 !important;\n font-size: 0.85rem !important;\n color: #666666;\n}";
|
|
310
314
|
styleInject(css_248z$5);
|
|
311
315
|
|
|
312
316
|
var TextFieldComponent = function TextFieldComponent(props) {
|
|
@@ -339,7 +343,7 @@ var TextFieldComponent = function TextFieldComponent(props) {
|
|
|
339
343
|
variant: "standard",
|
|
340
344
|
ref: props.inputRef,
|
|
341
345
|
InputProps: {
|
|
342
|
-
className: (props.noBorders ? 'no-border' : '') + " " + (!props.disabled && hover ? 'main-border-color' : ''),
|
|
346
|
+
className: (props.noBorders ? 'no-border' : '') + " " + (!props.disabled && hover ? 'main-border-color' : '') + " \n " + (props.endIcon ? 'end-icon-padding' : ''),
|
|
343
347
|
disableUnderline: true,
|
|
344
348
|
startAdornment: props.startIcon,
|
|
345
349
|
endAdornment: props.endIcon,
|
|
@@ -1618,7 +1622,7 @@ ButtonComponent.defaultProps = {
|
|
|
1618
1622
|
component: 'button'
|
|
1619
1623
|
};
|
|
1620
1624
|
|
|
1621
|
-
var css_248z$e = ".text-simple-component .MuiFormLabel-root {\n color: #666666;\n font-size: 1rem !important;\n transform: translate(0, 0.5px) scale(0.85);\n transform-origin: top left;\n text-overflow: initial !important;\n}\n.text-simple-component .MuiFormLabel-root + .text-simple-box.no-border {\n margin-top: 16px !important;\n}\n.text-simple-component .MuiFormLabel-root + .text-simple-box.no-margin.no-border {\n margin-top: 7px !important;\n}\n.text-simple-component .text-simple-box.no-border {\n border: none !important;\n padding: 0 !important;\n}\n.text-simple-component .text-simple-box {\n color: #666666;\n font-size: 14px;\n border: 1px solid grey;\n border-radius: 3px !important;\n padding: 0.
|
|
1625
|
+
var css_248z$e = ".text-simple-component .MuiFormLabel-root {\n color: #666666;\n font-size: 1rem !important;\n transform: translate(0, 0.5px) scale(0.85);\n transform-origin: top left;\n text-overflow: initial !important;\n}\n.text-simple-component .MuiFormLabel-root + .text-simple-box.no-border {\n margin-top: 16px !important;\n}\n.text-simple-component .MuiFormLabel-root + .text-simple-box.no-margin.no-border {\n margin-top: 7px !important;\n}\n.text-simple-component .text-simple-box.no-border {\n border: none !important;\n padding: 0 !important;\n}\n.text-simple-component .text-simple-box {\n color: #666666;\n font-size: 14px;\n border: 1px solid grey;\n border-radius: 3px !important;\n padding: 0.611rem 0.87rem;\n line-height: 1.4375em;\n letter-spacing: 0.00938em;\n}\n.text-simple-component .text-simple-box.icon-padding {\n padding: 0.49rem 0.87rem;\n}\n.text-simple-component .text-simple-box.end-icon-padding {\n padding: 0.177rem 0.87rem;\n}\n.text-simple-component .helper-text {\n font-size: 0.85rem !important;\n padding: 0 !important;\n margin-top: 3px;\n line-height: 1.66;\n color: #666666 !important;\n letter-spacing: 0.03333em;\n}\n.text-simple-component .has-error-border {\n border-color: #F24726 !important;\n}\n.text-simple-component .has-error {\n color: #F24726 !important;\n}";
|
|
1622
1626
|
styleInject(css_248z$e);
|
|
1623
1627
|
|
|
1624
1628
|
var TextSimpleComponent = function TextSimpleComponent(props) {
|
|
@@ -1651,7 +1655,7 @@ var TextSimpleComponent = function TextSimpleComponent(props) {
|
|
|
1651
1655
|
}, props.labelBoxProps), props.label) : React__default.createElement(React__default.Fragment, null), React__default.createElement(_.Box, Object.assign({
|
|
1652
1656
|
display: "" + (props.skeletonValue && props.skeletonValue.useSkeleton ? 'block' : props.startIcon || props.endIcon ? 'flex' : 'block'),
|
|
1653
1657
|
alignItems: "center",
|
|
1654
|
-
className: "text-simple-box " + ((_props$className = props.className) != null ? _props$className : '') + " " + (props.noMargin ? 'no-margin' : '') + " " + (props.noBorders || props.skeletonValue && props.skeletonValue.useSkeleton ? 'no-border' : '') + " " + (props.error ? 'has-error-border' : '') + " " + (props.startIcon
|
|
1658
|
+
className: "text-simple-box " + ((_props$className = props.className) != null ? _props$className : '') + " " + (props.noMargin ? 'no-margin' : '') + " " + (props.noBorders || props.skeletonValue && props.skeletonValue.useSkeleton ? 'no-border' : '') + " " + (props.error ? 'has-error-border' : '') + " " + (props.startIcon ? 'icon-padding' : props.endIcon ? 'end-icon-padding' : ''),
|
|
1655
1659
|
width: "" + (props.fullWidth ? 'auto' : 'fit-content')
|
|
1656
1660
|
}, props.valueBoxProps), props.skeletonValue && props.skeletonValue.useSkeleton ? React__default.createElement(SkeletonCompleteDefault, Object.assign({}, props.skeletonValue)) : React__default.createElement(React__default.Fragment, null, props.startIcon && React__default.createElement(_.Box, {
|
|
1657
1661
|
mr: 1,
|