@abgov/react-components 4.0.0-alpha.97 → 4.0.0-alpha.98

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.
@@ -2,6 +2,7 @@ import React, { FC } from "react";
2
2
  interface WCProps {
3
3
  heading: string;
4
4
  backgroundurl: string;
5
+ minheight?: string;
5
6
  }
6
7
  declare global {
7
8
  namespace JSX {
@@ -13,6 +14,7 @@ declare global {
13
14
  interface Props {
14
15
  heading: string;
15
16
  backgroundUrl: string;
17
+ minHeight?: string;
16
18
  children?: React.ReactNode;
17
19
  }
18
20
  export declare const GoAHeroBanner: FC<Props>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "4.0.0-alpha.97",
3
+ "version": "4.0.0-alpha.98",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"
@@ -9299,6 +9299,9 @@ function create_fragment$h(ctx) {
9299
9299
  set_style(div1, "background-size", "cover");
9300
9300
  set_style(div1, "background-position", "center");
9301
9301
  set_style(div1, "background-repeat", "no-repeat");
9302
+ set_style(div1, "min-height",
9303
+ /*minheight*/
9304
+ ctx[2]);
9302
9305
  },
9303
9306
 
9304
9307
  m(target, anchor) {
@@ -9326,6 +9329,14 @@ function create_fragment$h(ctx) {
9326
9329
  /*backgroundurl*/
9327
9330
  ctx[1] + ")");
9328
9331
  }
9332
+
9333
+ if (dirty &
9334
+ /*minheight*/
9335
+ 4) {
9336
+ set_style(div1, "min-height",
9337
+ /*minheight*/
9338
+ ctx[2]);
9339
+ }
9329
9340
  },
9330
9341
 
9331
9342
  i: noop,
@@ -9345,26 +9356,31 @@ function instance$f($$self, $$props, $$invalidate) {
9345
9356
  let {
9346
9357
  backgroundurl
9347
9358
  } = $$props;
9359
+ let {
9360
+ minheight = "600px"
9361
+ } = $$props;
9348
9362
 
9349
9363
  $$self.$$set = $$props => {
9350
9364
  if ('heading' in $$props) $$invalidate(0, heading = $$props.heading);
9351
9365
  if ('backgroundurl' in $$props) $$invalidate(1, backgroundurl = $$props.backgroundurl);
9366
+ if ('minheight' in $$props) $$invalidate(2, minheight = $$props.minheight);
9352
9367
  };
9353
9368
 
9354
- return [heading, backgroundurl];
9369
+ return [heading, backgroundurl, minheight];
9355
9370
  }
9356
9371
 
9357
9372
  class HeroBanner extends SvelteElement {
9358
9373
  constructor(options) {
9359
9374
  super();
9360
- this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.goa-hero{box-sizing:border-box;display:flex;justify-content:flex-end;flex-direction:column;min-height:600px;border-bottom:8px solid var(--goa-color-brand);color:var(--color-white);background-position:center center;width:100%;padding:3.5rem 0}h1{margin:0 0 1.75rem;padding:0;color:var(--color-white);font-size:var(--fs-3xl);line-height:var(--lh-2xl);font-weight:var(--fw-bold)}.goa-hero-banner-content{font-size:1.5rem;line-height:2rem;margin-bottom:1.75rem;color:#fff}</style>`;
9375
+ this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.goa-hero{box-sizing:border-box;display:flex;justify-content:flex-end;flex-direction:column;border-bottom:8px solid var(--goa-color-brand);color:var(--color-white);background-position:center center;width:100%;padding:3.5rem 0}h1{margin:0 0 1.75rem;padding:0;color:var(--color-white);font-size:var(--fs-3xl);line-height:var(--lh-2xl);font-weight:var(--fw-bold)}.goa-hero-banner-content{font-size:1.5rem;line-height:2rem;margin-bottom:1.75rem;color:#fff}</style>`;
9361
9376
  init(this, {
9362
9377
  target: this.shadowRoot,
9363
9378
  props: attribute_to_object(this.attributes),
9364
9379
  customElement: true
9365
9380
  }, instance$f, create_fragment$h, safe_not_equal, {
9366
9381
  heading: 0,
9367
- backgroundurl: 1
9382
+ backgroundurl: 1,
9383
+ minheight: 2
9368
9384
  }, null);
9369
9385
 
9370
9386
  if (options) {
@@ -9380,7 +9396,7 @@ class HeroBanner extends SvelteElement {
9380
9396
  }
9381
9397
 
9382
9398
  static get observedAttributes() {
9383
- return ["heading", "backgroundurl"];
9399
+ return ["heading", "backgroundurl", "minheight"];
9384
9400
  }
9385
9401
 
9386
9402
  get heading() {
@@ -9405,6 +9421,17 @@ class HeroBanner extends SvelteElement {
9405
9421
  flush();
9406
9422
  }
9407
9423
 
9424
+ get minheight() {
9425
+ return this.$$.ctx[2];
9426
+ }
9427
+
9428
+ set minheight(minheight) {
9429
+ this.$$set({
9430
+ minheight
9431
+ });
9432
+ flush();
9433
+ }
9434
+
9408
9435
  }
9409
9436
 
9410
9437
  customElements.define("goa-hero-banner", HeroBanner);
@@ -16489,11 +16516,13 @@ const GoAGrid = ({
16489
16516
  const GoAHeroBanner = ({
16490
16517
  heading,
16491
16518
  backgroundUrl,
16519
+ minHeight,
16492
16520
  children
16493
16521
  }) => {
16494
16522
  return jsx("goa-hero-banner", Object.assign({
16495
16523
  heading: heading,
16496
- backgroundurl: backgroundUrl
16524
+ backgroundurl: backgroundUrl,
16525
+ minheight: minHeight
16497
16526
  }, {
16498
16527
  children: children
16499
16528
  }), void 0);
@@ -9344,6 +9344,9 @@
9344
9344
  set_style(div1, "background-size", "cover");
9345
9345
  set_style(div1, "background-position", "center");
9346
9346
  set_style(div1, "background-repeat", "no-repeat");
9347
+ set_style(div1, "min-height",
9348
+ /*minheight*/
9349
+ ctx[2]);
9347
9350
  },
9348
9351
 
9349
9352
  m(target, anchor) {
@@ -9371,6 +9374,14 @@
9371
9374
  /*backgroundurl*/
9372
9375
  ctx[1] + ")");
9373
9376
  }
9377
+
9378
+ if (dirty &
9379
+ /*minheight*/
9380
+ 4) {
9381
+ set_style(div1, "min-height",
9382
+ /*minheight*/
9383
+ ctx[2]);
9384
+ }
9374
9385
  },
9375
9386
 
9376
9387
  i: noop,
@@ -9390,26 +9401,31 @@
9390
9401
  let {
9391
9402
  backgroundurl
9392
9403
  } = $$props;
9404
+ let {
9405
+ minheight = "600px"
9406
+ } = $$props;
9393
9407
 
9394
9408
  $$self.$$set = $$props => {
9395
9409
  if ('heading' in $$props) $$invalidate(0, heading = $$props.heading);
9396
9410
  if ('backgroundurl' in $$props) $$invalidate(1, backgroundurl = $$props.backgroundurl);
9411
+ if ('minheight' in $$props) $$invalidate(2, minheight = $$props.minheight);
9397
9412
  };
9398
9413
 
9399
- return [heading, backgroundurl];
9414
+ return [heading, backgroundurl, minheight];
9400
9415
  }
9401
9416
 
9402
9417
  class HeroBanner extends SvelteElement {
9403
9418
  constructor(options) {
9404
9419
  super();
9405
- this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.goa-hero{box-sizing:border-box;display:flex;justify-content:flex-end;flex-direction:column;min-height:600px;border-bottom:8px solid var(--goa-color-brand);color:var(--color-white);background-position:center center;width:100%;padding:3.5rem 0}h1{margin:0 0 1.75rem;padding:0;color:var(--color-white);font-size:var(--fs-3xl);line-height:var(--lh-2xl);font-weight:var(--fw-bold)}.goa-hero-banner-content{font-size:1.5rem;line-height:2rem;margin-bottom:1.75rem;color:#fff}</style>`;
9420
+ this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.goa-hero{box-sizing:border-box;display:flex;justify-content:flex-end;flex-direction:column;border-bottom:8px solid var(--goa-color-brand);color:var(--color-white);background-position:center center;width:100%;padding:3.5rem 0}h1{margin:0 0 1.75rem;padding:0;color:var(--color-white);font-size:var(--fs-3xl);line-height:var(--lh-2xl);font-weight:var(--fw-bold)}.goa-hero-banner-content{font-size:1.5rem;line-height:2rem;margin-bottom:1.75rem;color:#fff}</style>`;
9406
9421
  init(this, {
9407
9422
  target: this.shadowRoot,
9408
9423
  props: attribute_to_object(this.attributes),
9409
9424
  customElement: true
9410
9425
  }, instance$f, create_fragment$h, safe_not_equal, {
9411
9426
  heading: 0,
9412
- backgroundurl: 1
9427
+ backgroundurl: 1,
9428
+ minheight: 2
9413
9429
  }, null);
9414
9430
 
9415
9431
  if (options) {
@@ -9425,7 +9441,7 @@
9425
9441
  }
9426
9442
 
9427
9443
  static get observedAttributes() {
9428
- return ["heading", "backgroundurl"];
9444
+ return ["heading", "backgroundurl", "minheight"];
9429
9445
  }
9430
9446
 
9431
9447
  get heading() {
@@ -9450,6 +9466,17 @@
9450
9466
  flush();
9451
9467
  }
9452
9468
 
9469
+ get minheight() {
9470
+ return this.$$.ctx[2];
9471
+ }
9472
+
9473
+ set minheight(minheight) {
9474
+ this.$$set({
9475
+ minheight
9476
+ });
9477
+ flush();
9478
+ }
9479
+
9453
9480
  }
9454
9481
 
9455
9482
  customElements.define("goa-hero-banner", HeroBanner);
@@ -16560,10 +16587,12 @@
16560
16587
  var GoAHeroBanner = function GoAHeroBanner(_a) {
16561
16588
  var heading = _a.heading,
16562
16589
  backgroundUrl = _a.backgroundUrl,
16590
+ minHeight = _a.minHeight,
16563
16591
  children = _a.children;
16564
16592
  return jsxRuntime.jsx("goa-hero-banner", __assign({
16565
16593
  heading: heading,
16566
- backgroundurl: backgroundUrl
16594
+ backgroundurl: backgroundUrl,
16595
+ minheight: minHeight
16567
16596
  }, {
16568
16597
  children: children
16569
16598
  }), void 0);