@mjhls/mjh-framework 1.0.86 → 1.0.89

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.86
2
+ # mjh-framework v. 1.0.89
3
3
 
4
4
 
5
5
  > Foundation Framework
package/dist/index.es.js CHANGED
@@ -15,12 +15,13 @@ import Head from 'next/head';
15
15
  import Accordion from 'react-bootstrap/Accordion';
16
16
  import { useAccordionToggle } from 'react-bootstrap/AccordionToggle';
17
17
  import { FacebookShareButton, TwitterShareButton, PinterestShareButton, EmailShareButton, FacebookIcon, TwitterIcon, PinterestIcon, EmailIcon } from 'react-share';
18
- import Nav from 'react-bootstrap/Nav';
19
- import Navbar from 'react-bootstrap/Navbar';
20
- import NavDropdown from 'react-bootstrap/NavDropdown';
21
18
  import Form from 'react-bootstrap/Form';
22
19
  import FormControl from 'react-bootstrap/FormControl';
23
20
  import Button from 'react-bootstrap/Button';
21
+ import Nav from 'react-bootstrap/Nav';
22
+ import Navbar from 'react-bootstrap/Navbar';
23
+ import NavDropdown from 'react-bootstrap/NavDropdown';
24
+ import Carousel$1 from 'react-bootstrap/Carousel';
24
25
 
25
26
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
26
27
 
@@ -6978,6 +6979,47 @@ var MdMouse = function (props) {
6978
6979
  };
6979
6980
  MdMouse.displayName = "MdMouse";
6980
6981
 
6982
+ var Search = function Search(_ref) {
6983
+ var _ref$placeholder = _ref.placeholder,
6984
+ placeholder = _ref$placeholder === undefined ? 'Search' : _ref$placeholder,
6985
+ _ref$btnText = _ref.btnText,
6986
+ btnText = _ref$btnText === undefined ? 'Search' : _ref$btnText;
6987
+
6988
+ var router = useRouter();
6989
+
6990
+ var _useState = useState(''),
6991
+ _useState2 = slicedToArray(_useState, 2),
6992
+ searchKey = _useState2[0],
6993
+ setSearchKey = _useState2[1];
6994
+
6995
+ var handleSearch = function handleSearch(value) {
6996
+ router.push({
6997
+ pathname: '/search',
6998
+ query: { searchTerm: value }
6999
+ });
7000
+ };
7001
+
7002
+ return React__default.createElement(
7003
+ Form,
7004
+ {
7005
+ inline: true,
7006
+ onSubmit: function onSubmit(e) {
7007
+ e.preventDefault();
7008
+ handleSearch(searchKey);
7009
+ } },
7010
+ React__default.createElement(FormControl, { type: 'text', placeholder: placeholder, className: 'mr-sm-2', value: searchKey, onChange: function onChange(e) {
7011
+ return setSearchKey(e.target.value);
7012
+ } }),
7013
+ React__default.createElement(
7014
+ Button,
7015
+ { variant: 'secondary', onClick: function onClick() {
7016
+ return handleSearch(searchKey);
7017
+ } },
7018
+ btnText
7019
+ )
7020
+ );
7021
+ };
7022
+
6981
7023
  var NavMagazine = function NavMagazine(props) {
6982
7024
  var logo = props.logo,
6983
7025
  dataObject = props.dataObject;
@@ -7098,16 +7140,7 @@ var NavMagazine = function NavMagazine(props) {
7098
7140
  }
7099
7141
  })
7100
7142
  ),
7101
- React__default.createElement(
7102
- Form,
7103
- { inline: true },
7104
- React__default.createElement(FormControl, { type: 'text', placeholder: 'Search', className: 'mr-sm-2' }),
7105
- React__default.createElement(
7106
- Button,
7107
- { variant: 'secondary' },
7108
- 'Search'
7109
- )
7110
- )
7143
+ React__default.createElement(Search, null)
7111
7144
  )
7112
7145
  )
7113
7146
  )
@@ -7178,16 +7211,7 @@ var NavNative = function NavNative(props) {
7178
7211
  }
7179
7212
  })
7180
7213
  ),
7181
- React__default.createElement(
7182
- Form,
7183
- { inline: true },
7184
- React__default.createElement(FormControl, { type: 'text', placeholder: 'Search', className: 'mr-sm-2' }),
7185
- React__default.createElement(
7186
- Button,
7187
- { variant: 'secondary' },
7188
- 'Search'
7189
- )
7190
- )
7214
+ React__default.createElement(Search, null)
7191
7215
  )
7192
7216
  )
7193
7217
  )
@@ -7261,62 +7285,12 @@ var NavNormal = function NavNormal(props) {
7261
7285
  })
7262
7286
  )
7263
7287
  ),
7264
- React__default.createElement(
7265
- Form,
7266
- { inline: true },
7267
- React__default.createElement(FormControl, { type: 'text', placeholder: 'Search', style: { width: '60%', margin: '0px 10px' } }),
7268
- React__default.createElement(
7269
- Button,
7270
- { variant: 'secondary' },
7271
- 'Search'
7272
- )
7273
- )
7288
+ React__default.createElement(Search, null)
7274
7289
  )
7275
7290
  )
7276
7291
  );
7277
7292
  };
7278
7293
 
7279
- var Search = function Search(_ref) {
7280
- var _ref$placeholder = _ref.placeholder,
7281
- placeholder = _ref$placeholder === undefined ? 'Search' : _ref$placeholder,
7282
- _ref$btnText = _ref.btnText,
7283
- btnText = _ref$btnText === undefined ? 'Search' : _ref$btnText;
7284
-
7285
- var router = useRouter();
7286
-
7287
- var _useState = useState(''),
7288
- _useState2 = slicedToArray(_useState, 2),
7289
- searchKey = _useState2[0],
7290
- setSearchKey = _useState2[1];
7291
-
7292
- var handleSearch = function handleSearch(value) {
7293
- router.push({
7294
- pathname: '/search',
7295
- query: { searchTerm: value }
7296
- });
7297
- };
7298
-
7299
- return React__default.createElement(
7300
- Form,
7301
- {
7302
- inline: true,
7303
- onSubmit: function onSubmit(e) {
7304
- e.preventDefault();
7305
- handleSearch(searchKey);
7306
- } },
7307
- React__default.createElement(FormControl, { type: 'text', placeholder: placeholder, className: 'mr-sm-2', value: searchKey, onChange: function onChange(e) {
7308
- return setSearchKey(e.target.value);
7309
- } }),
7310
- React__default.createElement(
7311
- Button,
7312
- { variant: 'secondary', onClick: function onClick() {
7313
- return handleSearch(searchKey);
7314
- } },
7315
- btnText
7316
- )
7317
- );
7318
- };
7319
-
7320
7294
  var NavDvm = function NavDvm(props) {
7321
7295
  var logo = props.logo,
7322
7296
  mobileLogo = props.mobileLogo,
@@ -12430,5 +12404,58 @@ var getSerializers$1 = function getSerializers(client, pageview) {
12430
12404
  };
12431
12405
  };
12432
12406
 
12433
- export { ContentCard as DeckContent, GridContent, DeckQueue, ThumbnailCard, TaxonomyCard, GroupDeck, YoutubeGroup, QueueDeckExpanded, Column1, Column2, Column3, Header, LeftNav, AccordionPanel, SocialShare, NavMagazine, NavNative, NavNormal, NavDvm, TemplateNormal, AD300x250, AD300x250x600, AD728x90, getSerializers$1 as getSerializers, Search };
12407
+ //Feature query to be used
12408
+ // const featureQuery = `*[_type == 'feature' && is_active == true && feature_url == "/"] | order(_updatedAt asc)[0..5]{
12409
+ // ...,
12410
+ // feature_img { asset-> {url} }
12411
+ // }`
12412
+ var Feature = function Feature(props) {
12413
+ var dataset = props.dataset;
12414
+
12415
+ return React__default.createElement(
12416
+ 'div',
12417
+ null,
12418
+ React__default.createElement(
12419
+ Carousel$1,
12420
+ null,
12421
+ dataset.map(function (feature, index) {
12422
+ var feature_title = feature.feature_title,
12423
+ feature_body = feature.feature_body,
12424
+ feature_img = feature.feature_img,
12425
+ feature_alt = feature.feature_alt,
12426
+ feature_link = feature.feature_link;
12427
+
12428
+ return React__default.createElement(
12429
+ Carousel$1.Item,
12430
+ { key: index, style: { background: 'var(--primary)' } },
12431
+ React__default.createElement('img', { style: { maxHeight: '375px', minHeight: '300px', objectFit: 'cover', paddingLeft: '50%' }, className: 'd-block w-100', src: feature_img, alt: feature_alt }),
12432
+ React__default.createElement(
12433
+ Carousel$1.Caption,
12434
+ { style: { paddingRight: '50%', left: '3rem', right: '3rem', top: '0', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
12435
+ React__default.createElement(
12436
+ Link,
12437
+ { href: feature_link },
12438
+ React__default.createElement(
12439
+ 'a',
12440
+ null,
12441
+ React__default.createElement(
12442
+ 'h3',
12443
+ { style: { color: 'white' } },
12444
+ feature_title
12445
+ ),
12446
+ React__default.createElement(
12447
+ 'p',
12448
+ { style: { color: '#eee' } },
12449
+ feature_body
12450
+ )
12451
+ )
12452
+ )
12453
+ )
12454
+ );
12455
+ })
12456
+ )
12457
+ );
12458
+ };
12459
+
12460
+ export { ContentCard as DeckContent, GridContent, DeckQueue, ThumbnailCard, TaxonomyCard, GroupDeck, YoutubeGroup, QueueDeckExpanded, Column1, Column2, Column3, Header, LeftNav, AccordionPanel, SocialShare, NavMagazine, NavNative, NavNormal, NavDvm, TemplateNormal, AD300x250, AD300x250x600, AD728x90, getSerializers$1 as getSerializers, Search, Feature };
12434
12461
  //# sourceMappingURL=index.es.js.map