willba-component-library 0.0.66 → 0.0.67

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/lib/index.js CHANGED
@@ -402,6 +402,82 @@ function SelectButton(_a) {
402
402
  return (React__default.createElement("button", { className: "will-filter-bar-select-button", onClick: onClick, style: style }, label));
403
403
  }
404
404
 
405
+ var DefaultContext = {
406
+ color: undefined,
407
+ size: undefined,
408
+ className: undefined,
409
+ style: undefined,
410
+ attr: undefined
411
+ };
412
+ var IconContext = React__default.createContext && React__default.createContext(DefaultContext);
413
+
414
+ var __assign$1 = undefined && undefined.__assign || function () {
415
+ __assign$1 = Object.assign || function (t) {
416
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
417
+ s = arguments[i];
418
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
419
+ }
420
+ return t;
421
+ };
422
+ return __assign$1.apply(this, arguments);
423
+ };
424
+ var __rest$1 = undefined && undefined.__rest || function (s, e) {
425
+ var t = {};
426
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
427
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
428
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
429
+ }
430
+ return t;
431
+ };
432
+ function Tree2Element(tree) {
433
+ return tree && tree.map(function (node, i) {
434
+ return React__default.createElement(node.tag, __assign$1({
435
+ key: i
436
+ }, node.attr), Tree2Element(node.child));
437
+ });
438
+ }
439
+ function GenIcon(data) {
440
+ // eslint-disable-next-line react/display-name
441
+ return function (props) {
442
+ return React__default.createElement(IconBase, __assign$1({
443
+ attr: __assign$1({}, data.attr)
444
+ }, props), Tree2Element(data.child));
445
+ };
446
+ }
447
+ function IconBase(props) {
448
+ var elem = function (conf) {
449
+ var attr = props.attr,
450
+ size = props.size,
451
+ title = props.title,
452
+ svgProps = __rest$1(props, ["attr", "size", "title"]);
453
+ var computedSize = size || conf.size || "1em";
454
+ var className;
455
+ if (conf.className) className = conf.className;
456
+ if (props.className) className = (className ? className + " " : "") + props.className;
457
+ return React__default.createElement("svg", __assign$1({
458
+ stroke: "currentColor",
459
+ fill: "currentColor",
460
+ strokeWidth: "0"
461
+ }, conf.attr, attr, svgProps, {
462
+ className: className,
463
+ style: __assign$1(__assign$1({
464
+ color: props.color || conf.color
465
+ }, conf.style), props.style),
466
+ height: computedSize,
467
+ width: computedSize,
468
+ xmlns: "http://www.w3.org/2000/svg"
469
+ }), title && React__default.createElement("title", null, title), props.children);
470
+ };
471
+ return IconContext !== undefined ? React__default.createElement(IconContext.Consumer, null, function (conf) {
472
+ return elem(conf);
473
+ }) : elem(DefaultContext);
474
+ }
475
+
476
+ // THIS FILE IS AUTO GENERATED
477
+ function FaSearch (props) {
478
+ return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"}}]})(props);
479
+ }
480
+
405
481
  var css_248z$6 = ".will-filter-bar-submit-button {\n width: auto;\n height: auto;\n background-color: var(--will-primary);\n color: var(--will-white);\n padding: 10px 20px;\n border-radius: 20px;\n cursor: pointer;\n border: none;\n white-space: nowrap;\n text-transform: uppercase;\n font-size: 12px;\n display: flex;\n align-items: center;\n}\n\n.will-filter-bar-submit-button span {\n margin-right: 10px;\n display: flex;\n}\n\n@media (max-width: 1024px) {\n .will-filter-bar-submit-button {\n justify-content: center;\n margin-bottom: 25px;\n }\n}\n";
406
482
  styleInject(css_248z$6);
407
483
 
@@ -409,7 +485,8 @@ function SubmitButton(_a) {
409
485
  var onClick = _a.onClick;
410
486
  var t = useTranslation('filterBar').t;
411
487
  return (React__default.createElement("button", { className: "will-filter-bar-submit-button", onClick: onClick },
412
- React__default.createElement("span", null),
488
+ React__default.createElement("span", null,
489
+ React__default.createElement(FaSearch, null)),
413
490
  t('submit.label')));
414
491
  }
415
492
 
@@ -7912,7 +7989,9 @@ function useFilterBar() {
7912
7989
  }
7913
7990
  }
7914
7991
  var url = "http://localhost:4000/en/events/?".concat(queryParams.toString());
7915
- window.location.href = url;
7992
+ if (typeof window !== 'undefined') {
7993
+ window.location.href = url;
7994
+ }
7916
7995
  handleSelectedFilter(false);
7917
7996
  };
7918
7997
  return {
@@ -7934,7 +8013,7 @@ function useFilterBar() {
7934
8013
  var css_248z$1 = ".will-root {\r\n position: relative;\r\n}\r\n\r\n.will-filter-bar {\r\n box-sizing: border-box;\r\n position: relative;\r\n}\r\n\r\n.will-filter-bar-underlay {\r\n background-color: rgba(0,0,0,.6);\r\n position: absolute;\r\n top:0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n cursor: pointer;\r\n min-height: 100vh;\r\n}\r\n\r\n/* Header */\r\n.will-filter-bar-header {\r\n display: flex;\r\n justify-content: space-between;\r\n padding: 10px 20px;\r\n position: relative;\r\n z-index: 222;\r\n \r\n \r\n border-radius: 40px;\r\n background-color: var(--will-white);\r\n box-shadow: var(--will-box-shadow);\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .will-filter-bar-header {\r\n flex-direction: column;\r\n padding: 20px;\r\n }\r\n}\r\n\r\n/* Container */\r\n\r\n.will-filter-bar-container {\r\n background-color: var(--will-white);\r\n min-height: 100px;\r\n \r\n padding: 90px 40px 30px 40px;\r\n position: absolute;\r\n top: 0;\r\n z-index: 111;\r\n border-radius: 25px;\r\n width: -webkit-fill-available;\r\n box-shadow: var(--will-box-shadow);\r\n}\r\n\r\n@media (max-width: 1024px) {\r\n .will-filter-bar-container {\r\n margin-top: 20px;\r\n padding: 30px 40px;\r\n position: initial;\r\n }\r\n}\r\n\r\n";
7935
8014
  styleInject(css_248z$1);
7936
8015
 
7937
- var css_248z = "/* @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap'); */\n\n.will-root * {\n font-family: 'Montserrat', sans-serif;\n}\n\n.will-root {\n \n box-sizing: border-box;\n font-size: 14px;\n \n color: #1E1E1E;\n\n /* Pallete */\n --will-primary: #374269;\n --will-grey: #ABA7AF;\n --will-white: #fff;\n --will-onahau: #CDEEFF;\n --will-text: #5A5959;\n \n\n /* Confines */\n --will-box-shadow: 0px 6px 11px 0px #a7a4a480;\n\n /* Breakpoints */\n\n --will-lg: 1140px;\n --will-md: 960px;\n --will-sm: 600px;\n --will-xl: 1280px;\n --will-xs: 0px;\n}\n\n/* Typography */\n\n.will-root h1, h2, h3, h4, h5, h6 {\n font-weight: 700;\n} \n\n.will-root p, h1, h2, h3, h4, h5, h6, span {\n margin: 0;\n padding: 0;\n} \n\n/* Overrides as themes */\n\n.will-root-kis {\n --will-primary: #374269;\n}\n\n.will-root-paj {\n --will-primary: #1897D8;\n}";
8016
+ var css_248z = "@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');\n\n.will-root * {\n font-family: 'Montserrat', sans-serif;\n}\n\n.will-root {\n \n box-sizing: border-box;\n font-size: 14px;\n \n color: #1E1E1E;\n\n /* Pallete */\n --will-primary: #374269;\n --will-grey: #ABA7AF;\n --will-white: #fff;\n --will-onahau: #CDEEFF;\n --will-text: #5A5959;\n \n\n /* Confines */\n --will-box-shadow: 0px 6px 11px 0px #a7a4a480;\n\n /* Breakpoints */\n\n --will-lg: 1140px;\n --will-md: 960px;\n --will-sm: 600px;\n --will-xl: 1280px;\n --will-xs: 0px;\n}\n\n/* Typography */\n\n.will-root h1, h2, h3, h4, h5, h6 {\n font-weight: 700;\n} \n\n.will-root p, h1, h2, h3, h4, h5, h6, span {\n margin: 0;\n padding: 0;\n} \n\n/* Overrides as themes */\n\n.will-root-kis {\n --will-primary: #374269;\n}\n\n.will-root-paj {\n --will-primary: #1897D8;\n}";
7938
8017
  styleInject(css_248z);
7939
8018
 
7940
8019
  const consoleLogger = {