@abgov/react-components 4.0.0-alpha.61 → 4.0.0-alpha.62

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/index.d.ts CHANGED
@@ -26,8 +26,7 @@ export * from './lib/microsite-header/microsite-header';
26
26
  export * from './lib/modal/modal';
27
27
  export * from './lib/notification/notification';
28
28
  export * from './lib/page-block/page-block';
29
- export * from './lib/page/page';
30
- export * from './lib/page/page';
29
+ export * from './lib/one-column-layout/one-column-layout';
31
30
  export * from './lib/radio-group/radio-group';
32
31
  export * from './lib/skeleton/skeleton';
33
32
  export * from './lib/spinner/spinner';
@@ -27,7 +27,7 @@ declare type ButtonProps = {
27
27
  disabled?: boolean;
28
28
  leadingIcon?: GoAIconType;
29
29
  trailingIcon?: GoAIconType;
30
- onClick: (e: any) => void;
30
+ onClick?: (e: any) => void;
31
31
  children?: ReactNode;
32
32
  };
33
33
  export declare const GoAButton: FC<ButtonProps>;
@@ -0,0 +1,13 @@
1
+ import React, { ReactNode } from "react";
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ 'goa-one-column-layout': React.HTMLAttributes<HTMLElement>;
6
+ }
7
+ }
8
+ }
9
+ export interface PageProps {
10
+ children?: ReactNode;
11
+ }
12
+ export declare function GoAOneColumnLayout(props: PageProps): JSX.Element;
13
+ export default GoAOneColumnLayout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "4.0.0-alpha.61",
3
+ "version": "4.0.0-alpha.62",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"
@@ -5316,7 +5316,7 @@ function create_fragment$r(ctx) {
5316
5316
  };
5317
5317
  }
5318
5318
 
5319
- const MAX_HEIGHT = "300px";
5319
+ const MAX_HEIGHT = "276px";
5320
5320
 
5321
5321
  function instance$p($$self, $$props, $$invalidate) {
5322
5322
  let _disabled;
@@ -13551,9 +13551,60 @@ class TextArea extends SvelteElement {
13551
13551
  }
13552
13552
 
13553
13553
  customElements.define("goa-textarea", TextArea);
13554
- /* libs/web-components/src/layouts/two-column-layout/TwoColumnLayout.svelte generated by Svelte v3.49.0 */
13554
+ /* libs/web-components/src/layouts/one-column-layout/OneColumnLayout.svelte generated by Svelte v3.49.0 */
13555
13555
 
13556
13556
  function create_fragment$4(ctx) {
13557
+ let div;
13558
+ return {
13559
+ c() {
13560
+ div = element("div");
13561
+ div.innerHTML = `<section class="header"><slot name="header"></slot></section>
13562
+
13563
+ <main><slot></slot></main>
13564
+
13565
+ <section class="footer"><slot name="footer"></slot></section>`;
13566
+ this.c = noop;
13567
+ attr(div, "class", "page");
13568
+ },
13569
+
13570
+ m(target, anchor) {
13571
+ insert(target, div, anchor);
13572
+ },
13573
+
13574
+ p: noop,
13575
+ i: noop,
13576
+ o: noop,
13577
+
13578
+ d(detaching) {
13579
+ if (detaching) detach(div);
13580
+ }
13581
+
13582
+ };
13583
+ }
13584
+
13585
+ class OneColumnLayout extends SvelteElement {
13586
+ constructor(options) {
13587
+ super();
13588
+ this.shadowRoot.innerHTML = `<style>.page{height:100vh;display:flex;flex-direction:column}.header,.footer{flex:0 0 auto}main{flex:1 1 auto}</style>`;
13589
+ init(this, {
13590
+ target: this.shadowRoot,
13591
+ props: attribute_to_object(this.attributes),
13592
+ customElement: true
13593
+ }, null, create_fragment$4, safe_not_equal, {}, null);
13594
+
13595
+ if (options) {
13596
+ if (options.target) {
13597
+ insert(options.target, this, options.anchor);
13598
+ }
13599
+ }
13600
+ }
13601
+
13602
+ }
13603
+
13604
+ customElements.define("goa-one-column-layout", OneColumnLayout);
13605
+ /* libs/web-components/src/layouts/two-column-layout/TwoColumnLayout.svelte generated by Svelte v3.49.0 */
13606
+
13607
+ function create_fragment$3(ctx) {
13557
13608
  let div;
13558
13609
  let header;
13559
13610
  let t0;
@@ -13647,7 +13698,7 @@ class TwoColumnLayout extends SvelteElement {
13647
13698
  target: this.shadowRoot,
13648
13699
  props: attribute_to_object(this.attributes),
13649
13700
  customElement: true
13650
- }, instance$2, create_fragment$4, safe_not_equal, {
13701
+ }, instance$2, create_fragment$3, safe_not_equal, {
13651
13702
  navcolumnwidth: 0,
13652
13703
  maxcontentwidth: 1
13653
13704
  }, null);
@@ -13695,7 +13746,7 @@ class TwoColumnLayout extends SvelteElement {
13695
13746
  customElements.define("goa-two-column-layout", TwoColumnLayout);
13696
13747
  /* libs/web-components/src/layouts/FullScreenNavbarLayout.svelte generated by Svelte v3.49.0 */
13697
13748
 
13698
- function create_fragment$3(ctx) {
13749
+ function create_fragment$2(ctx) {
13699
13750
  let div;
13700
13751
  return {
13701
13752
  c() {
@@ -13739,7 +13790,7 @@ class FullScreenNavbarLayout extends SvelteElement {
13739
13790
  target: this.shadowRoot,
13740
13791
  props: attribute_to_object(this.attributes),
13741
13792
  customElement: true
13742
- }, null, create_fragment$3, safe_not_equal, {}, null);
13793
+ }, null, create_fragment$2, safe_not_equal, {}, null);
13743
13794
 
13744
13795
  if (options) {
13745
13796
  if (options.target) {
@@ -13818,7 +13869,7 @@ function create_if_block(ctx) {
13818
13869
  };
13819
13870
  }
13820
13871
 
13821
- function create_fragment$2(ctx) {
13872
+ function create_fragment$1(ctx) {
13822
13873
  let goa_container;
13823
13874
  let t0;
13824
13875
  let t1;
@@ -13961,7 +14012,7 @@ class ContainerWrapper_test extends SvelteElement {
13961
14012
  target: this.shadowRoot,
13962
14013
  props: attribute_to_object(this.attributes),
13963
14014
  customElement: true
13964
- }, instance$1, create_fragment$2, safe_not_equal, {
14015
+ }, instance$1, create_fragment$1, safe_not_equal, {
13965
14016
  title: 0,
13966
14017
  actions: 1,
13967
14018
  content: 2,
@@ -14045,7 +14096,7 @@ class ContainerWrapper_test extends SvelteElement {
14045
14096
  customElements.define("test-container", ContainerWrapper_test);
14046
14097
  /* libs/web-components/src/components/divider/Divider.svelte generated by Svelte v3.49.0 */
14047
14098
 
14048
- function create_fragment$1(ctx) {
14099
+ function create_fragment(ctx) {
14049
14100
  let hr;
14050
14101
  return {
14051
14102
  c() {
@@ -14125,7 +14176,7 @@ class Divider extends SvelteElement {
14125
14176
  target: this.shadowRoot,
14126
14177
  props: attribute_to_object(this.attributes),
14127
14178
  customElement: true
14128
- }, instance, create_fragment$1, safe_not_equal, {
14179
+ }, instance, create_fragment, safe_not_equal, {
14129
14180
  spacing: 1
14130
14181
  }, null);
14131
14182
 
@@ -14159,57 +14210,6 @@ class Divider extends SvelteElement {
14159
14210
  }
14160
14211
 
14161
14212
  customElements.define("goa-divider", Divider);
14162
- /* libs/web-components/src/components/page/Page.svelte generated by Svelte v3.49.0 */
14163
-
14164
- function create_fragment(ctx) {
14165
- let div;
14166
- return {
14167
- c() {
14168
- div = element("div");
14169
- div.innerHTML = `<section class="header"><slot name="header"></slot></section>
14170
-
14171
- <main><slot></slot></main>
14172
-
14173
- <section class="footer"><slot name="footer"></slot></section>`;
14174
- this.c = noop;
14175
- attr(div, "class", "page");
14176
- },
14177
-
14178
- m(target, anchor) {
14179
- insert(target, div, anchor);
14180
- },
14181
-
14182
- p: noop,
14183
- i: noop,
14184
- o: noop,
14185
-
14186
- d(detaching) {
14187
- if (detaching) detach(div);
14188
- }
14189
-
14190
- };
14191
- }
14192
-
14193
- class Page extends SvelteElement {
14194
- constructor(options) {
14195
- super();
14196
- this.shadowRoot.innerHTML = `<style>.page{height:100vh;display:flex;flex-direction:column}.header,.footer{flex:0 0 auto}main{flex:1 1 auto}</style>`;
14197
- init(this, {
14198
- target: this.shadowRoot,
14199
- props: attribute_to_object(this.attributes),
14200
- customElement: true
14201
- }, null, create_fragment, safe_not_equal, {}, null);
14202
-
14203
- if (options) {
14204
- if (options.target) {
14205
- insert(options.target, this, options.anchor);
14206
- }
14207
- }
14208
- }
14209
-
14210
- }
14211
-
14212
- customElements.define("goa-page", Page);
14213
14213
 
14214
14214
  const GoAAppHeader = ({
14215
14215
  heading,
@@ -14348,6 +14348,10 @@ const GoAButton = ({
14348
14348
  return;
14349
14349
  }
14350
14350
 
14351
+ if (!onClick) {
14352
+ return;
14353
+ }
14354
+
14351
14355
  const current = el.current;
14352
14356
 
14353
14357
  const listener = e => {
@@ -15009,8 +15013,8 @@ const GoAPageBlock = props => {
15009
15013
  }), void 0);
15010
15014
  };
15011
15015
 
15012
- function GoAPage(props) {
15013
- return jsx("goa-page", {
15016
+ function GoAOneColumnLayout(props) {
15017
+ return jsx("goa-one-column-layout", {
15014
15018
  children: props.children
15015
15019
  }, void 0);
15016
15020
  }
@@ -15178,4 +15182,4 @@ function GoATwoColumnLayout(props) {
15178
15182
  }), void 0);
15179
15183
  }
15180
15184
 
15181
- export { GoAAppFooter, GoAAppFooterMetaSection, GoAAppFooterNavSection, GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAChip, GoACircularProgress, GoAContainer, GoADivider, GoADropdown, GoADropdownOption, GoAEmergencyBadge, GoAFlexCol, GoAFlexRow, GoAFormItem, GoAHeroBanner, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAImportantBadge, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAMicrositeHeader, GoAModal, GoANotification, GoAPage, GoAPageBlock, GoARadioGroup, GoARadioItem, GoASkeleton, GoASpinner, GoASuccessBadge, GoATextArea, GoATwoColumnLayout };
15185
+ export { GoAAppFooter, GoAAppFooterMetaSection, GoAAppFooterNavSection, GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAChip, GoACircularProgress, GoAContainer, GoADivider, GoADropdown, GoADropdownOption, GoAEmergencyBadge, GoAFlexCol, GoAFlexRow, GoAFormItem, GoAHeroBanner, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAImportantBadge, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAMicrositeHeader, GoAModal, GoANotification, GoAOneColumnLayout, GoAPageBlock, GoARadioGroup, GoARadioItem, GoASkeleton, GoASpinner, GoASuccessBadge, GoATextArea, GoATwoColumnLayout };
@@ -5358,7 +5358,7 @@
5358
5358
  };
5359
5359
  }
5360
5360
 
5361
- const MAX_HEIGHT = "300px";
5361
+ const MAX_HEIGHT = "276px";
5362
5362
 
5363
5363
  function instance$p($$self, $$props, $$invalidate) {
5364
5364
  const showMenu = _async(function () {
@@ -13600,9 +13600,60 @@
13600
13600
  }
13601
13601
 
13602
13602
  customElements.define("goa-textarea", TextArea);
13603
- /* libs/web-components/src/layouts/two-column-layout/TwoColumnLayout.svelte generated by Svelte v3.49.0 */
13603
+ /* libs/web-components/src/layouts/one-column-layout/OneColumnLayout.svelte generated by Svelte v3.49.0 */
13604
13604
 
13605
13605
  function create_fragment$4(ctx) {
13606
+ let div;
13607
+ return {
13608
+ c() {
13609
+ div = element("div");
13610
+ div.innerHTML = `<section class="header"><slot name="header"></slot></section>
13611
+
13612
+ <main><slot></slot></main>
13613
+
13614
+ <section class="footer"><slot name="footer"></slot></section>`;
13615
+ this.c = noop;
13616
+ attr(div, "class", "page");
13617
+ },
13618
+
13619
+ m(target, anchor) {
13620
+ insert(target, div, anchor);
13621
+ },
13622
+
13623
+ p: noop,
13624
+ i: noop,
13625
+ o: noop,
13626
+
13627
+ d(detaching) {
13628
+ if (detaching) detach(div);
13629
+ }
13630
+
13631
+ };
13632
+ }
13633
+
13634
+ class OneColumnLayout extends SvelteElement {
13635
+ constructor(options) {
13636
+ super();
13637
+ this.shadowRoot.innerHTML = `<style>.page{height:100vh;display:flex;flex-direction:column}.header,.footer{flex:0 0 auto}main{flex:1 1 auto}</style>`;
13638
+ init(this, {
13639
+ target: this.shadowRoot,
13640
+ props: attribute_to_object(this.attributes),
13641
+ customElement: true
13642
+ }, null, create_fragment$4, safe_not_equal, {}, null);
13643
+
13644
+ if (options) {
13645
+ if (options.target) {
13646
+ insert(options.target, this, options.anchor);
13647
+ }
13648
+ }
13649
+ }
13650
+
13651
+ }
13652
+
13653
+ customElements.define("goa-one-column-layout", OneColumnLayout);
13654
+ /* libs/web-components/src/layouts/two-column-layout/TwoColumnLayout.svelte generated by Svelte v3.49.0 */
13655
+
13656
+ function create_fragment$3(ctx) {
13606
13657
  let div;
13607
13658
  let header;
13608
13659
  let t0;
@@ -13696,7 +13747,7 @@
13696
13747
  target: this.shadowRoot,
13697
13748
  props: attribute_to_object(this.attributes),
13698
13749
  customElement: true
13699
- }, instance$2, create_fragment$4, safe_not_equal, {
13750
+ }, instance$2, create_fragment$3, safe_not_equal, {
13700
13751
  navcolumnwidth: 0,
13701
13752
  maxcontentwidth: 1
13702
13753
  }, null);
@@ -13744,7 +13795,7 @@
13744
13795
  customElements.define("goa-two-column-layout", TwoColumnLayout);
13745
13796
  /* libs/web-components/src/layouts/FullScreenNavbarLayout.svelte generated by Svelte v3.49.0 */
13746
13797
 
13747
- function create_fragment$3(ctx) {
13798
+ function create_fragment$2(ctx) {
13748
13799
  let div;
13749
13800
  return {
13750
13801
  c() {
@@ -13788,7 +13839,7 @@
13788
13839
  target: this.shadowRoot,
13789
13840
  props: attribute_to_object(this.attributes),
13790
13841
  customElement: true
13791
- }, null, create_fragment$3, safe_not_equal, {}, null);
13842
+ }, null, create_fragment$2, safe_not_equal, {}, null);
13792
13843
 
13793
13844
  if (options) {
13794
13845
  if (options.target) {
@@ -13867,7 +13918,7 @@
13867
13918
  };
13868
13919
  }
13869
13920
 
13870
- function create_fragment$2(ctx) {
13921
+ function create_fragment$1(ctx) {
13871
13922
  let goa_container;
13872
13923
  let t0;
13873
13924
  let t1;
@@ -14010,7 +14061,7 @@
14010
14061
  target: this.shadowRoot,
14011
14062
  props: attribute_to_object(this.attributes),
14012
14063
  customElement: true
14013
- }, instance$1, create_fragment$2, safe_not_equal, {
14064
+ }, instance$1, create_fragment$1, safe_not_equal, {
14014
14065
  title: 0,
14015
14066
  actions: 1,
14016
14067
  content: 2,
@@ -14094,7 +14145,7 @@
14094
14145
  customElements.define("test-container", ContainerWrapper_test);
14095
14146
  /* libs/web-components/src/components/divider/Divider.svelte generated by Svelte v3.49.0 */
14096
14147
 
14097
- function create_fragment$1(ctx) {
14148
+ function create_fragment(ctx) {
14098
14149
  let hr;
14099
14150
  return {
14100
14151
  c() {
@@ -14174,7 +14225,7 @@
14174
14225
  target: this.shadowRoot,
14175
14226
  props: attribute_to_object(this.attributes),
14176
14227
  customElement: true
14177
- }, instance, create_fragment$1, safe_not_equal, {
14228
+ }, instance, create_fragment, safe_not_equal, {
14178
14229
  spacing: 1
14179
14230
  }, null);
14180
14231
 
@@ -14208,57 +14259,6 @@
14208
14259
  }
14209
14260
 
14210
14261
  customElements.define("goa-divider", Divider);
14211
- /* libs/web-components/src/components/page/Page.svelte generated by Svelte v3.49.0 */
14212
-
14213
- function create_fragment(ctx) {
14214
- let div;
14215
- return {
14216
- c() {
14217
- div = element("div");
14218
- div.innerHTML = `<section class="header"><slot name="header"></slot></section>
14219
-
14220
- <main><slot></slot></main>
14221
-
14222
- <section class="footer"><slot name="footer"></slot></section>`;
14223
- this.c = noop;
14224
- attr(div, "class", "page");
14225
- },
14226
-
14227
- m(target, anchor) {
14228
- insert(target, div, anchor);
14229
- },
14230
-
14231
- p: noop,
14232
- i: noop,
14233
- o: noop,
14234
-
14235
- d(detaching) {
14236
- if (detaching) detach(div);
14237
- }
14238
-
14239
- };
14240
- }
14241
-
14242
- class Page extends SvelteElement {
14243
- constructor(options) {
14244
- super();
14245
- this.shadowRoot.innerHTML = `<style>.page{height:100vh;display:flex;flex-direction:column}.header,.footer{flex:0 0 auto}main{flex:1 1 auto}</style>`;
14246
- init(this, {
14247
- target: this.shadowRoot,
14248
- props: attribute_to_object(this.attributes),
14249
- customElement: true
14250
- }, null, create_fragment, safe_not_equal, {}, null);
14251
-
14252
- if (options) {
14253
- if (options.target) {
14254
- insert(options.target, this, options.anchor);
14255
- }
14256
- }
14257
- }
14258
-
14259
- }
14260
-
14261
- customElements.define("goa-page", Page);
14262
14262
 
14263
14263
  /*! *****************************************************************************
14264
14264
  Copyright (c) Microsoft Corporation.
@@ -14429,6 +14429,10 @@
14429
14429
  return;
14430
14430
  }
14431
14431
 
14432
+ if (!onClick) {
14433
+ return;
14434
+ }
14435
+
14432
14436
  var current = el.current;
14433
14437
 
14434
14438
  var listener = function listener(e) {
@@ -15048,8 +15052,8 @@
15048
15052
  }), void 0);
15049
15053
  };
15050
15054
 
15051
- function GoAPage(props) {
15052
- return jsxRuntime.jsx("goa-page", {
15055
+ function GoAOneColumnLayout(props) {
15056
+ return jsxRuntime.jsx("goa-one-column-layout", {
15053
15057
  children: props.children
15054
15058
  }, void 0);
15055
15059
  }
@@ -15257,7 +15261,7 @@
15257
15261
  exports.GoAMicrositeHeader = GoAMicrositeHeader;
15258
15262
  exports.GoAModal = GoAModal;
15259
15263
  exports.GoANotification = GoANotification;
15260
- exports.GoAPage = GoAPage;
15264
+ exports.GoAOneColumnLayout = GoAOneColumnLayout;
15261
15265
  exports.GoAPageBlock = GoAPageBlock;
15262
15266
  exports.GoARadioGroup = GoARadioGroup;
15263
15267
  exports.GoARadioItem = GoARadioItem;
@@ -1,13 +0,0 @@
1
- import React, { ReactNode } from "react";
2
- declare global {
3
- namespace JSX {
4
- interface IntrinsicElements {
5
- 'goa-page': React.HTMLAttributes<HTMLElement>;
6
- }
7
- }
8
- }
9
- export interface PageProps {
10
- children?: ReactNode;
11
- }
12
- export declare function GoAPage(props: PageProps): JSX.Element;
13
- export default GoAPage;