@brad-frost-web/eddie-recipes 0.34.0 → 0.37.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brad-frost-web/eddie-recipes",
3
- "version": "0.34.0",
3
+ "version": "0.37.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1,4 +1,4 @@
1
- import { EdElement as l } from "@brad-frost-web/eddie-web-components/components/EdElement";
1
+ import { EdElement as o } from "@brad-frost-web/eddie-web-components/components/EdElement";
2
2
  import "@brad-frost-web/eddie-web-components/components/button-group/button-group";
3
3
  import "@brad-frost-web/eddie-web-components/components/button/button";
4
4
  import "@brad-frost-web/eddie-web-components/components/checkbox-field-item/checkbox-field-item";
@@ -11,20 +11,20 @@ import "@brad-frost-web/eddie-web-components/components/select-field/select-fiel
11
11
  import "@brad-frost-web/eddie-web-components/components/text-field/text-field";
12
12
  import "@brad-frost-web/eddie-web-components/components/textarea-field/textarea-field";
13
13
  import "@brad-frost-web/eddie-web-components/components/toggle/toggle";
14
- import { unsafeCSS as p, nothing as g, html as m } from "lit";
15
- import { state as u } from "lit/decorators.js";
16
- const s = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-u-margin-none{margin:0!important}.ed-u-margin-sm{margin:.5rem!important}.ed-u-margin-md{margin:1rem!important}.ed-u-margin-lg{margin:1.5rem!important}.ed-u-margin-xl{margin:2rem!important}.ed-u-margin-xxl{margin:4rem!important}.ed-u-margin-top-none{margin-block-start:0!important}.ed-u-margin-top-sm{margin-block-start:.5rem!important}.ed-u-margin-top-md{margin-block-start:1rem!important}.ed-u-margin-top-lg{margin-block-start:1.5rem!important}.ed-u-margin-top-xl{margin-block-start:2rem!important}.ed-u-margin-top-xxl{margin-block-start:4rem!important}.ed-u-margin-right-none{margin-inline-end:0!important}.ed-u-margin-right-sm{margin-inline-end:.5rem!important}.ed-u-margin-right-md{margin-inline-end:1rem!important}.ed-u-margin-right-lg{margin-inline-end:1.5rem!important}.ed-u-margin-right-xl{margin-inline-end:2rem!important}.ed-u-margin-right-xxl{margin-inline-end:4rem!important}.ed-u-margin-bottom-none{margin-block-end:0!important}.ed-u-margin-bottom-sm{margin-block-end:.5rem!important}.ed-u-margin-bottom-md{margin-block-end:1rem!important}.ed-u-margin-bottom-lg{margin-block-end:1.5rem!important}.ed-u-margin-bottom-xl{margin-block-end:2rem!important}.ed-u-margin-bottom-xxl{margin-block-end:4rem!important}.ed-u-margin-bottom-xl-xxl{margin-block-end:2rem!important}@media all and (min-width:48rem){.ed-u-margin-bottom-xl-xxl{margin-block-end:4rem!important}}.ed-u-margin-left-none{margin-inline-start:0!important}.ed-u-margin-left-sm{margin-inline-start:.5rem!important}.ed-u-margin-left-md{margin-inline-start:1rem!important}.ed-u-margin-left-lg{margin-inline-start:1.5rem!important}.ed-u-margin-left-xl{margin-inline-start:2rem!important}.ed-u-margin-left-xxl{margin-inline-start:4rem!important}.ed-u-padding-none{padding:0!important}.ed-u-padding-sm{padding:.5rem!important}.ed-u-padding-md{padding:1rem!important}.ed-u-padding-lg{padding:1.5rem!important}.ed-u-padding-xl{padding:2rem!important}.ed-u-padding-xxl{padding:4rem!important}.ed-u-padding-top-none{padding-block-start:0!important}.ed-u-padding-top-sm{padding-block-start:.5rem!important}.ed-u-padding-top-md{padding-block-start:1rem!important}.ed-u-padding-top-lg{padding-block-start:1.5rem!important}.ed-u-padding-top-xl{padding-block-start:2rem!important}.ed-u-padding-top-xxl{padding-block-start:4rem!important}.ed-u-padding-right-none{padding-inline-end:0!important}.ed-u-padding-right-sm{padding-inline-end:.5rem!important}.ed-u-padding-right-md{padding-inline-end:1rem!important}.ed-u-padding-right-lg{padding-inline-end:1.5rem!important}.ed-u-padding-right-xl{padding-inline-end:2rem!important}.ed-u-padding-right-xxl{padding-inline-end:4rem!important}.ed-u-padding-bottom-none{padding-block-end:0!important}.ed-u-padding-bottom-sm{padding-block-end:.5rem!important}.ed-u-padding-bottom-md{padding-block-end:1rem!important}.ed-u-padding-bottom-lg{padding-block-end:1.5rem!important}.ed-u-padding-bottom-xl{padding-block-end:2rem!important}.ed-u-padding-bottom-xxl{padding-block-end:4rem!important}.ed-u-padding-left-none{padding-inline-start:0!important}.ed-u-padding-left-sm{padding-inline-start:.5rem!important}.ed-u-padding-left-md{padding-inline-start:1rem!important}.ed-u-padding-left-lg{padding-inline-start:1.5rem!important}.ed-u-padding-left-xl{padding-inline-start:2rem!important}.ed-u-padding-left-xxl{padding-inline-start:4rem!important}.ed-u-display-flex{display:flex!important}.ed-u-display-block{display:block!important}';
17
- var b = Object.defineProperty, c = (n, e, d, a) => {
18
- for (var t = void 0, i = n.length - 1, r; i >= 0; i--)
19
- (r = n[i]) && (t = r(e, d, t) || t);
20
- return t && b(e, d, t), t;
14
+ import { unsafeCSS as p, nothing as g, html as l } from "lit";
15
+ import { state as s } from "lit/decorators.js";
16
+ const u = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-u-margin-none{margin:0!important}.ed-u-margin-sm{margin:.5rem!important}.ed-u-margin-md{margin:1rem!important}.ed-u-margin-lg{margin:1.5rem!important}.ed-u-margin-xl{margin:2rem!important}.ed-u-margin-xxl{margin:4rem!important}.ed-u-margin-block-start-none{margin-block-start:0!important}.ed-u-margin-block-start-sm{margin-block-start:.5rem!important}.ed-u-margin-block-start-md{margin-block-start:1rem!important}.ed-u-margin-block-start-lg{margin-block-start:1.5rem!important}.ed-u-margin-block-start-xl{margin-block-start:2rem!important}.ed-u-margin-block-start-xxl{margin-block-start:4rem!important}.ed-u-margin-inline-end-none{margin-inline-end:0!important}.ed-u-margin-inline-end-sm{margin-inline-end:.5rem!important}.ed-u-margin-inline-end-md{margin-inline-end:1rem!important}.ed-u-margin-inline-end-lg{margin-inline-end:1.5rem!important}.ed-u-margin-inline-end-xl{margin-inline-end:2rem!important}.ed-u-margin-inline-end-xxl{margin-inline-end:4rem!important}.ed-u-margin-block-end-none{margin-block-end:0!important}.ed-u-margin-block-end-sm{margin-block-end:.5rem!important}.ed-u-margin-block-end-md{margin-block-end:1rem!important}.ed-u-margin-block-end-lg{margin-block-end:1.5rem!important}.ed-u-margin-block-end-xl{margin-block-end:2rem!important}.ed-u-margin-block-end-xxl{margin-block-end:4rem!important}.ed-u-margin-block-end-xl-xxl{margin-block-end:2rem!important}@media all and (min-width:48rem){.ed-u-margin-block-end-xl-xxl{margin-block-end:4rem!important}}.ed-u-margin-inline-start-none{margin-inline-start:0!important}.ed-u-margin-inline-start-sm{margin-inline-start:.5rem!important}.ed-u-margin-inline-start-md{margin-inline-start:1rem!important}.ed-u-margin-inline-start-lg{margin-inline-start:1.5rem!important}.ed-u-margin-inline-start-xl{margin-inline-start:2rem!important}.ed-u-margin-inline-start-xxl{margin-inline-start:4rem!important}.ed-u-padding-none{padding:0!important}.ed-u-padding-sm{padding:.5rem!important}.ed-u-padding-md{padding:1rem!important}.ed-u-padding-lg{padding:1.5rem!important}.ed-u-padding-xl{padding:2rem!important}.ed-u-padding-xxl{padding:4rem!important}.ed-u-padding-block-start-none{padding-block-start:0!important}.ed-u-padding-block-start-sm{padding-block-start:.5rem!important}.ed-u-padding-block-start-md{padding-block-start:1rem!important}.ed-u-padding-block-start-lg{padding-block-start:1.5rem!important}.ed-u-padding-block-start-xl{padding-block-start:2rem!important}.ed-u-padding-block-start-xxl{padding-block-start:4rem!important}.ed-u-padding-inline-end-none{padding-inline-end:0!important}.ed-u-padding-inline-end-sm{padding-inline-end:.5rem!important}.ed-u-padding-inline-end-md{padding-inline-end:1rem!important}.ed-u-padding-inline-end-lg{padding-inline-end:1.5rem!important}.ed-u-padding-inline-end-xl{padding-inline-end:2rem!important}.ed-u-padding-inline-end-xxl{padding-inline-end:4rem!important}.ed-u-padding-block-end-none{padding-block-end:0!important}.ed-u-padding-block-end-sm{padding-block-end:.5rem!important}.ed-u-padding-block-end-md{padding-block-end:1rem!important}.ed-u-padding-block-end-lg{padding-block-end:1.5rem!important}.ed-u-padding-block-end-xl{padding-block-end:2rem!important}.ed-u-padding-block-end-xxl{padding-block-end:4rem!important}.ed-u-padding-inline-start-none{padding-inline-start:0!important}.ed-u-padding-inline-start-sm{padding-inline-start:.5rem!important}.ed-u-padding-inline-start-md{padding-inline-start:1rem!important}.ed-u-padding-inline-start-lg{padding-inline-start:1.5rem!important}.ed-u-padding-inline-start-xl{padding-inline-start:2rem!important}.ed-u-padding-inline-start-xxl{padding-inline-start:4rem!important}.ed-u-display-flex{display:flex!important}.ed-u-display-block{display:block!important}';
17
+ var c = Object.defineProperty, b = (a, e, d, t) => {
18
+ for (var i = void 0, n = a.length - 1, r; n >= 0; n--)
19
+ (r = a[n]) && (i = r(e, d, i) || i);
20
+ return i && c(e, d, i), i;
21
21
  };
22
- class o extends l {
22
+ class m extends o {
23
23
  constructor() {
24
24
  super(...arguments), this.formData = "";
25
25
  }
26
26
  static get styles() {
27
- return p(s);
27
+ return p(u);
28
28
  }
29
29
  logFiles(e) {
30
30
  console.log(e.detail.uploadedFiles), e.detail.uploadedFiles.forEach((d) => {
@@ -60,23 +60,23 @@ class o extends l {
60
60
  value: "no-option-group-item-2"
61
61
  }
62
62
  ];
63
- return m`
63
+ return l`
64
64
  <iframe class="ed-r-example-form__iframe" name="dummyframe" id="dummyframe" style="display: none;"></iframe>
65
65
  <form class="ed-r-example-form__form" id="fakeform" action="#" target="dummyframe" @submit=${this.handleSubmit}>
66
- <ed-textarea-field class="ed-u-display-block ed-u-margin-bottom-lg" name="limerick" label="Write a limerick"></ed-textarea-field>
67
- <ed-text-field class="ed-u-display-block ed-u-margin-bottom-lg" name="name" label="Enter your name"></ed-text-field>
68
- <ed-text-field class="ed-u-display-block ed-u-margin-bottom-lg" name="textfield2" value="beagles" label="Best breed of dog"></ed-text-field>
69
- <ed-checkbox-field class="ed-u-display-block ed-u-margin-bottom-lg">
66
+ <ed-textarea-field class="ed-u-display-block ed-u-margin-block-end-lg" name="limerick" label="Write a limerick"></ed-textarea-field>
67
+ <ed-text-field class="ed-u-display-block ed-u-margin-block-end-lg" name="name" label="Enter your name"></ed-text-field>
68
+ <ed-text-field class="ed-u-display-block ed-u-margin-block-end-lg" name="textfield2" value="beagles" label="Best breed of dog"></ed-text-field>
69
+ <ed-checkbox-field class="ed-u-display-block ed-u-margin-block-end-lg">
70
70
  <ed-checkbox-field-item name="checkbox-example" value="1">Checkbox field item 1</ed-checkbox-field-item>
71
71
  <ed-checkbox-field-item name="checkbox-example" value="2" checked>Checkbox field item 2</ed-checkbox-field-item>
72
72
  <ed-checkbox-field-item name="checkbox-example" value="3">Checkbox field item 3</ed-checkbox-field-item>
73
73
  </ed-checkbox-field>
74
- <ed-radio-field class="ed-u-display-block ed-u-margin-bottom-lg">
74
+ <ed-radio-field class="ed-u-display-block ed-u-margin-block-end-lg">
75
75
  <ed-radio-field-item name="radio-example" value="on" checked="${!0}">On</ed-radio-field-item>
76
76
  <ed-radio-field-item name="radio-example" value="off">Off</ed-radio-field-item>
77
77
  </ed-radio-field>
78
78
  <ed-select-field
79
- class="ed-u-display-block ed-u-margin-bottom-lg"
79
+ class="ed-u-display-block ed-u-margin-block-end-lg"
80
80
  .items=${e}
81
81
  name="select"
82
82
  ?inverted=${!0}
@@ -84,7 +84,7 @@ class o extends l {
84
84
  ></ed-select-field>
85
85
 
86
86
  <ed-file-upload
87
- class="ed-u-display-block ed-u-margin-bottom-lg"
87
+ class="ed-u-display-block ed-u-margin-block-end-lg"
88
88
  label="Upload files"
89
89
  ?hideLabel=${!0}
90
90
  name="file-upload-field"
@@ -97,7 +97,7 @@ class o extends l {
97
97
 
98
98
  <ed-toggle
99
99
  ?checked=${!0}
100
- class="ed-u-display-block ed-u-margin-bottom-lg"
100
+ class="ed-u-display-block ed-u-margin-block-end-lg"
101
101
  label="Toggle label"
102
102
  name="example-toggle"
103
103
  value="Toggle value"
@@ -108,7 +108,7 @@ class o extends l {
108
108
  <ed-button text="Reset" type="reset"></ed-button>
109
109
  </ed-button-group>
110
110
  </form>
111
- ${this.formData ? m`
111
+ ${this.formData ? l`
112
112
  <ed-heading>Submitted form data</ed-heading>
113
113
  <pre>
114
114
  ${this.formData}
@@ -119,16 +119,16 @@ class o extends l {
119
119
  }
120
120
  handleSubmit(e) {
121
121
  e.preventDefault();
122
- const d = new FormData(e.target), a = {};
123
- d.forEach((t, i) => {
124
- a[i] ? Array.isArray(a[i]) ? a[i].push(t) : a[i] = [a[i], t] : a[i] = t;
125
- }), this.formData = JSON.stringify(a, null, 2);
122
+ const d = new FormData(e.target), t = {};
123
+ d.forEach((i, n) => {
124
+ t[n] ? Array.isArray(t[n]) ? t[n].push(i) : t[n] = [t[n], i] : t[n] = i;
125
+ }), this.formData = JSON.stringify(t, null, 2);
126
126
  }
127
127
  }
128
- c([
129
- u()
130
- ], o.prototype, "formData");
131
- customElements.get("ed-r-example-form") === void 0 && customElements.define("ed-r-example-form", o);
128
+ b([
129
+ s()
130
+ ], m.prototype, "formData");
131
+ customElements.get("ed-r-example-form") === void 0 && customElements.define("ed-r-example-form", m);
132
132
  export {
133
- o as EdRExampleForm
133
+ m as EdRExampleForm
134
134
  };