techsbcn-storybook 0.22.2 → 0.22.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/dist/components/layouts/Standard/AppHeader/AppHeader.d.ts +2 -0
- package/dist/components/tables/SearchComponent/SearchComponent.d.ts +1 -0
- package/dist/stories/Fields/TextFieldComponent.stories.d.ts +4 -0
- package/dist/stories/Layouts/MainLayoutSimple.stories.d.ts +3 -4
- package/dist/techsbcn-storybook.cjs.development.js +14 -7
- 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 +14 -7
- package/dist/techsbcn-storybook.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/layouts/Standard/AppHeader/AppHeader.tsx +8 -2
- package/src/components/tables/SearchComponent/SearchComponent.tsx +15 -9
- package/src/stories/Fields/TextFieldComponent.stories.tsx +42 -0
- package/src/stories/Layouts/MainLayoutSimple.stories.tsx +166 -31
- package/src/stories/Tables/TableComponent.stories.tsx +8 -11
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
|
2
2
|
declare const meta: Meta;
|
|
3
3
|
export default meta;
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const DrawerSidebarAndHeaderLayout: Story;
|
|
4
|
+
export declare const SideBarLayoutProps: Story<import("@storybook/react").Args>;
|
|
5
|
+
export declare const SidebarAndHeaderProps: Story<import("@storybook/react").Args>;
|
|
6
|
+
export declare const DrawerSidebarAndHeaderLayoutProps: Story<import("@storybook/react").Args>;
|
|
@@ -115,7 +115,7 @@ var DoubleFilter = function DoubleFilter(filters) {
|
|
|
115
115
|
};
|
|
116
116
|
|
|
117
117
|
var SearchComponent = function SearchComponent(props) {
|
|
118
|
-
var _useState = React.useState(!props.searchBar && !!props.filters),
|
|
118
|
+
var _useState = React.useState(!props.searchBar && !!props.filters || props.fixedOpen),
|
|
119
119
|
isOpen = _useState[0],
|
|
120
120
|
setIsOpen = _useState[1];
|
|
121
121
|
|
|
@@ -142,7 +142,7 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
142
142
|
}, React__default.createElement(material.Grid, {
|
|
143
143
|
item: true,
|
|
144
144
|
xs: props.actions ? 8 : 12,
|
|
145
|
-
md: props.searchBar ? 4 : props.actions ? 6 : 12
|
|
145
|
+
md: props.actions && props.searchBar ? 4 : props.searchBar ? 8 : props.actions ? 6 : 12
|
|
146
146
|
}, React__default.createElement(material.Box, {
|
|
147
147
|
px: 1,
|
|
148
148
|
className: (props.enableAfter ? 'main-background-color-after' : '') + " title"
|
|
@@ -200,7 +200,7 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
200
200
|
}, ActionsList(props.actions)))), (props.searchBar || props.filters || props.actions) && React__default.createElement(material.Grid, {
|
|
201
201
|
item: true,
|
|
202
202
|
xs: 12,
|
|
203
|
-
md: props.actions && props.searchBar ? 8 : props.actions ? 6 :
|
|
203
|
+
md: props.actions && props.searchBar ? 8 : props.actions ? 6 : 4
|
|
204
204
|
}, React__default.createElement(material.Box, {
|
|
205
205
|
display: "flex",
|
|
206
206
|
alignItems: "center"
|
|
@@ -214,7 +214,7 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
214
214
|
},
|
|
215
215
|
display: "flex",
|
|
216
216
|
width: "100%"
|
|
217
|
-
}, props.searchBar, props.filters && props.searchBar && React__default.createElement(material.Box, {
|
|
217
|
+
}, props.searchBar, !!props.fixedOpen || props.filters && props.searchBar && React__default.createElement(material.Box, {
|
|
218
218
|
onClick: function onClick() {
|
|
219
219
|
return setIsOpen(!isOpen);
|
|
220
220
|
},
|
|
@@ -234,7 +234,8 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
234
234
|
my: 2
|
|
235
235
|
}, React__default.createElement(material.Grid, {
|
|
236
236
|
container: true,
|
|
237
|
-
spacing: 3
|
|
237
|
+
spacing: 3,
|
|
238
|
+
justifyContent: "end"
|
|
238
239
|
}, props.filters && props.filters.length > 0 && props.filters.map(function (filter, i) {
|
|
239
240
|
var _props$filtersSize, _props$filtersSize2;
|
|
240
241
|
|
|
@@ -1571,14 +1572,20 @@ var AppHeader = function AppHeader(props) {
|
|
|
1571
1572
|
|
|
1572
1573
|
return React__default.createElement(material.AppBar, {
|
|
1573
1574
|
position: "sticky",
|
|
1575
|
+
sx: {
|
|
1576
|
+
display: {
|
|
1577
|
+
xs: "block",
|
|
1578
|
+
lg: props.appBarResponsiveShow ? "none" : "block"
|
|
1579
|
+
}
|
|
1580
|
+
},
|
|
1574
1581
|
className: "app-bar main-background-body " + ((_props$className = props.className) != null ? _props$className : '')
|
|
1575
1582
|
}, React__default.createElement(material.Toolbar, {
|
|
1576
1583
|
className: "app-toolbar"
|
|
1577
1584
|
}, props.handleDrawerOpen && React__default.createElement(material.IconButton, {
|
|
1578
1585
|
sx: {
|
|
1579
1586
|
display: {
|
|
1580
|
-
xs:
|
|
1581
|
-
lg:
|
|
1587
|
+
xs: "inline-flex",
|
|
1588
|
+
lg: props.drawerVisible ? "inline-flex" : "none"
|
|
1582
1589
|
}
|
|
1583
1590
|
},
|
|
1584
1591
|
edge: "start",
|