trepur_components 0.3.12 → 0.3.13

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.
@@ -71,7 +71,7 @@ const Column = _ref => {
71
71
 
72
72
  const classList = (0, _classnames.default)({
73
73
  [columnProps === null || columnProps === void 0 ? void 0 : columnProps.classes]: columnProps === null || columnProps === void 0 ? void 0 : columnProps.classes,
74
- ["sm:".concat(calculateWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.sm))]: columnProps === null || columnProps === void 0 ? void 0 : columnProps.sm,
74
+ ["".concat(calculateWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.sm))]: columnProps === null || columnProps === void 0 ? void 0 : columnProps.sm,
75
75
  ["md:".concat(calculateWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.md))]: columnProps === null || columnProps === void 0 ? void 0 : columnProps.md,
76
76
  ["lg:".concat(calculateWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.lg))]: columnProps === null || columnProps === void 0 ? void 0 : columnProps.lg,
77
77
  ["xl:".concat(calculateWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.xl))]: columnProps === null || columnProps === void 0 ? void 0 : columnProps.xl
@@ -51,11 +51,14 @@ const Nav = _ref => {
51
51
  mobileClasses,
52
52
  borderBottom,
53
53
  borderBottomColor,
54
- closeMobileIconProps
54
+ closeMobileIconProps,
55
+ rowHeight,
56
+ showDesktopNavOnScreenSize
55
57
  } = _ref;
56
58
  const [showSideNav, setShowSideNav] = (0, _react.useState)(false);
57
59
  const [showDropdownNav, setShowDropdownNav] = (0, _react.useState)(false);
58
- const navRowHeight = 'h-16';
60
+ const size = showDesktopNavOnScreenSize ? "".concat(showDesktopNavOnScreenSize, ":") : 'sm:';
61
+ const navRowHeight = rowHeight ? rowHeight : 'h-16';
59
62
  const firstRowClassList = (0, _classnames.default)({
60
63
  [firstRowClasses]: firstRowClasses
61
64
  }, 'flex');
@@ -80,14 +83,14 @@ const Nav = _ref => {
80
83
  'bg-white': !mobileBgColor,
81
84
  'w-0': !showSideNav,
82
85
  ["w-".concat(sideBarWidth)]: showSideNav
83
- }, "z-50 shadow-inner shaddow-lg lg:hidden pt-20 \n fixed top-0 left-0 z-1 overflow-hidden h-full\n duration-700");
86
+ }, "z-50 shadow-inner shaddow-lg ".concat(size, "hidden pt-20 \n fixed top-0 left-0 z-1 overflow-hidden h-full\n duration-700"));
84
87
  const dropdownNavClasses = (0, _classnames.default)({
85
88
  [mobileBgColor]: mobileBgColor,
86
89
  [bgColor]: !mobileBgColor && bgColor,
87
90
  'bg-white': !mobileBgColor && !bgColor,
88
91
  'h-0': !showDropdownNav,
89
92
  ["h-".concat(dropdownNavHeight)]: showDropdownNav
90
- }, 'z-50 lg:hidden duration-500 overflow-hidden');
93
+ }, "z-50 ".concat(size, "hidden duration-500 overflow-hidden"));
91
94
  const logoImageClassList = (0, _classnames.default)({
92
95
  [mobileLogoBannerClasses]: mobileLogoBannerClasses
93
96
  }, 'h-16 w-auto');
@@ -95,7 +98,7 @@ const Nav = _ref => {
95
98
  'fixed w-full z-50 top-0 mt-0': fixedTop,
96
99
  'border-b': borderBottom,
97
100
  [mobileClasses]: mobileClasses
98
- }, 'flex items-center lg:hidden py-2');
101
+ }, "flex items-center ".concat(size, "hidden py-2"));
99
102
  const colors = (0, _classnames.default)({
100
103
  [bgColor]: bgColor,
101
104
  'bg-blue': !bgColor,
@@ -105,12 +108,12 @@ const Nav = _ref => {
105
108
  const desktopClassList = (0, _classnames.default)({
106
109
  'fixed w-full z-50 top-0 mt-0': fixedTop,
107
110
  'border-b': borderBottom
108
- }, 'hidden lg:block items-center justify-between sm:items-stretch text-center');
111
+ }, "hidden ".concat(size, "block items-center justify-between sm:items-stretch text-center"));
109
112
  return /*#__PURE__*/_react.default.createElement("nav", {
110
113
  id: id,
111
114
  className: classes
112
115
  }, /*#__PURE__*/_react.default.createElement("div", {
113
- id: "sm-nav",
116
+ id: "mobile-nav",
114
117
  className: "".concat(mobileClassList, " ").concat(colors)
115
118
  }, /*#__PURE__*/_react.default.createElement("div", {
116
119
  id: "nav-collapse-btn-wrapper",
@@ -148,16 +151,20 @@ const Nav = _ref => {
148
151
  src: mobileLogo,
149
152
  alt: "Logo"
150
153
  }))), /*#__PURE__*/_react.default.createElement("div", {
154
+ id: "destop-nav",
151
155
  className: "".concat(desktopClassList, " ").concat(colors)
152
156
  }, /*#__PURE__*/_react.default.createElement("div", {
153
157
  className: firstRowClassList
154
158
  }, firstRow && firstRow.map((rowItem, i) => {
159
+ const columnClassList = (0, _classnames.default)({
160
+ [rowItem === null || rowItem === void 0 ? void 0 : rowItem.columnClasses]: rowItem === null || rowItem === void 0 ? void 0 : rowItem.columnClasses
161
+ }, navRowHeight);
155
162
  return /*#__PURE__*/_react.default.createElement(_Column.default, {
156
163
  key: "row_item_1.".concat(i),
157
164
  columnProps: {
158
- classes: "".concat(navRowHeight, " ").concat(rowItem.columnClasses),
165
+ classes: columnClassList,
159
166
  sm: rowItem.smColumnWidth,
160
- md: rowItem.columnWidth,
167
+ md: rowItem.mdColumnWidth,
161
168
  lg: rowItem.lgColumnWidth,
162
169
  xl: rowItem.xlColumnWidth
163
170
  },
@@ -166,12 +173,15 @@ const Nav = _ref => {
166
173
  })), /*#__PURE__*/_react.default.createElement("div", {
167
174
  className: secondRowClassList
168
175
  }, secondRow && secondRow.map((rowItem, i) => {
176
+ const columnClassList = (0, _classnames.default)({
177
+ [rowItem === null || rowItem === void 0 ? void 0 : rowItem.columnClasses]: rowItem === null || rowItem === void 0 ? void 0 : rowItem.columnClasses
178
+ }, navRowHeight);
169
179
  return /*#__PURE__*/_react.default.createElement(_Column.default, {
170
180
  key: "row_item_2.".concat(i),
171
181
  columnProps: {
172
- classes: "".concat(navRowHeight, " ").concat(rowItem.columnClasses),
182
+ classes: columnClassList,
173
183
  sm: rowItem.smColumnWidth,
174
- md: rowItem.columnWidth,
184
+ md: rowItem.mdColumnWidth,
175
185
  lg: rowItem.lgColumnWidth,
176
186
  xl: rowItem.xlColumnWidth
177
187
  },
@@ -180,12 +190,15 @@ const Nav = _ref => {
180
190
  })), /*#__PURE__*/_react.default.createElement("div", {
181
191
  className: thirdRowClassList
182
192
  }, thirdRow && thirdRow.map((rowItem, i) => {
193
+ const columnClassList = (0, _classnames.default)({
194
+ [rowItem === null || rowItem === void 0 ? void 0 : rowItem.columnClasses]: rowItem === null || rowItem === void 0 ? void 0 : rowItem.columnClasses
195
+ }, navRowHeight);
183
196
  return /*#__PURE__*/_react.default.createElement(_Column.default, {
184
197
  key: "row_item_3.".concat(i),
185
198
  columnProps: {
186
- classes: "".concat(navRowHeight, " ").concat(rowItem.columnClasses),
199
+ classes: columnClassList,
187
200
  sm: rowItem.smColumnWidth,
188
- md: rowItem.columnWidth,
201
+ md: rowItem.mdColumnWidth,
189
202
  lg: rowItem.lgColumnWidth,
190
203
  xl: rowItem.xlColumnWidth
191
204
  },
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "trepur_components",
3
3
  "description": "component lib",
4
4
  "author": "trepur_ttenneb",
5
- "version": "0.3.12",
5
+ "version": "0.3.13",
6
6
  "private": false,
7
7
  "keywords": [
8
8
  "react",