@mjhls/mjh-framework 1.0.670 → 1.0.671

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/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- # mjh-framework v. 1.0.670
2
+ # mjh-framework v. 1.0.671
3
3
 
4
4
  > Foundation Framework
5
5
 
package/dist/cjs/View.js CHANGED
@@ -198,12 +198,27 @@ var ISI = function ISI(props) {
198
198
  active = _useState2[0],
199
199
  setActive = _useState2[1];
200
200
 
201
+ var isi = React.useRef();
202
+ React.useEffect(function () {
203
+ if (active) {
204
+ var offset = '5rem';
205
+ var nav = document.getElementsByTagName('header');
206
+ if (nav && nav.length > 0) {
207
+ offset = nav[0].offsetHeight + 'px';
208
+ }
209
+ isi.current.style.maxHeight = 'calc(100% - ' + offset + ')';
210
+ isi.current.style.overflowY = 'scroll';
211
+ } else {
212
+ isi.current.style.maxHeight = '';
213
+ isi.current.style.overflowY = '';
214
+ }
215
+ }, [active]);
201
216
  return React__default.createElement(
202
217
  React__default.Fragment,
203
218
  null,
204
219
  React__default.createElement(
205
220
  'div',
206
- { id: 'isi', className: active ? 'active' : '' },
221
+ { id: 'isi', ref: isi },
207
222
  React__default.createElement(
208
223
  'div',
209
224
  { id: 'isiContent' },
@@ -232,7 +247,7 @@ var ISI = function ISI(props) {
232
247
  React__default.createElement(
233
248
  'style',
234
249
  { jsx: true },
235
- '\n #isi {\n position: fixed;\n z-index: 9999999;\n bottom: 0;\n left: 0;\n max-height: 10rem;\n background-color: #ffffff;\n overflow-x: hidden;\n overflow-y: hidden;\n transition: max-height 0.2s;\n width: 100%;\n box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.5);\n }\n #isi.active {\n max-height: calc(100% - 5rem) !important;\n overflow-y: scroll !important;\n }\n #isiContent {\n width: 100%;\n max-width: 1000px;\n margin-left: auto;\n margin-right: auto;\n position: relative;\n padding: 1rem;\n font-size: 1rem;\n }\n #isi::-webkit-scrollbar {\n display: none;\n }\n #isiToggle {\n position: absolute;\n top: 0;\n right: 0;\n padding: 1rem;\n font-weight: bold;\n cursor: pointer;\n font-size: 1rem;\n }\n #isiToggle p {\n margin: 0;\n }\n '
250
+ '\n #isi {\n position: fixed;\n z-index: 99999;\n bottom: 0;\n left: 0;\n max-height: 10rem;\n background-color: #ffffff;\n overflow-x: hidden;\n overflow-y: hidden;\n transition: max-height 0.2s;\n width: 100%;\n box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.5);\n }\n #isiContent {\n width: 100%;\n max-width: 1000px;\n margin-left: auto;\n margin-right: auto;\n position: relative;\n padding: 1rem;\n font-size: 1rem;\n }\n #isi::-webkit-scrollbar {\n display: none;\n }\n #isiToggle {\n position: absolute;\n top: 0;\n right: 0;\n padding: 1rem;\n font-weight: bold;\n cursor: pointer;\n font-size: 1rem;\n }\n #isiToggle p {\n margin: 0;\n }\n '
236
251
  )
237
252
  );
238
253
  };
package/dist/esm/View.js CHANGED
@@ -13,7 +13,7 @@ import './define-property-de3fc946.js';
13
13
  import './web.dom.iterable-8956f9a5.js';
14
14
  import { _ as _typeof } from './typeof-08f2c380.js';
15
15
  import './_is-array-49698029.js';
16
- import React__default, { useState, useEffect } from 'react';
16
+ import React__default, { useState, useRef, useEffect } from 'react';
17
17
  import { l as lib_3 } from './index-93ec3c59.js';
18
18
  import 'prop-types';
19
19
  import 'react-bootstrap/Row';
@@ -192,12 +192,27 @@ var ISI = function ISI(props) {
192
192
  active = _useState2[0],
193
193
  setActive = _useState2[1];
194
194
 
195
+ var isi = useRef();
196
+ useEffect(function () {
197
+ if (active) {
198
+ var offset = '5rem';
199
+ var nav = document.getElementsByTagName('header');
200
+ if (nav && nav.length > 0) {
201
+ offset = nav[0].offsetHeight + 'px';
202
+ }
203
+ isi.current.style.maxHeight = 'calc(100% - ' + offset + ')';
204
+ isi.current.style.overflowY = 'scroll';
205
+ } else {
206
+ isi.current.style.maxHeight = '';
207
+ isi.current.style.overflowY = '';
208
+ }
209
+ }, [active]);
195
210
  return React__default.createElement(
196
211
  React__default.Fragment,
197
212
  null,
198
213
  React__default.createElement(
199
214
  'div',
200
- { id: 'isi', className: active ? 'active' : '' },
215
+ { id: 'isi', ref: isi },
201
216
  React__default.createElement(
202
217
  'div',
203
218
  { id: 'isiContent' },
@@ -226,7 +241,7 @@ var ISI = function ISI(props) {
226
241
  React__default.createElement(
227
242
  'style',
228
243
  { jsx: true },
229
- '\n #isi {\n position: fixed;\n z-index: 9999999;\n bottom: 0;\n left: 0;\n max-height: 10rem;\n background-color: #ffffff;\n overflow-x: hidden;\n overflow-y: hidden;\n transition: max-height 0.2s;\n width: 100%;\n box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.5);\n }\n #isi.active {\n max-height: calc(100% - 5rem) !important;\n overflow-y: scroll !important;\n }\n #isiContent {\n width: 100%;\n max-width: 1000px;\n margin-left: auto;\n margin-right: auto;\n position: relative;\n padding: 1rem;\n font-size: 1rem;\n }\n #isi::-webkit-scrollbar {\n display: none;\n }\n #isiToggle {\n position: absolute;\n top: 0;\n right: 0;\n padding: 1rem;\n font-weight: bold;\n cursor: pointer;\n font-size: 1rem;\n }\n #isiToggle p {\n margin: 0;\n }\n '
244
+ '\n #isi {\n position: fixed;\n z-index: 99999;\n bottom: 0;\n left: 0;\n max-height: 10rem;\n background-color: #ffffff;\n overflow-x: hidden;\n overflow-y: hidden;\n transition: max-height 0.2s;\n width: 100%;\n box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.5);\n }\n #isiContent {\n width: 100%;\n max-width: 1000px;\n margin-left: auto;\n margin-right: auto;\n position: relative;\n padding: 1rem;\n font-size: 1rem;\n }\n #isi::-webkit-scrollbar {\n display: none;\n }\n #isiToggle {\n position: absolute;\n top: 0;\n right: 0;\n padding: 1rem;\n font-weight: bold;\n cursor: pointer;\n font-size: 1rem;\n }\n #isiToggle p {\n margin: 0;\n }\n '
230
245
  )
231
246
  );
232
247
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.670",
3
+ "version": "1.0.671",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",