smoothly 0.3.51 → 0.3.53

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.
Files changed (52) hide show
  1. package/dist/cjs/{getLanguage-7e53766b.js → getLanguage-892e255f.js} +15 -0
  2. package/dist/cjs/{index-e7dd6fd1.js → index-679a68de.js} +1 -1
  3. package/dist/cjs/{index-50415e95.js → index-8352a4e0.js} +104 -4
  4. package/dist/cjs/index.cjs.js +2 -2
  5. package/dist/cjs/loader.cjs.js +4 -3
  6. package/dist/cjs/smoothly-accordion_53.cjs.entry.js +8 -7
  7. package/dist/cjs/smoothly-country.cjs.entry.js +2 -2
  8. package/dist/cjs/smoothly-google-font.cjs.entry.js +1 -1
  9. package/dist/cjs/smoothly-radio-group.cjs.entry.js +1 -1
  10. package/dist/cjs/smoothly-reorder.cjs.entry.js +4 -4
  11. package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +1 -1
  12. package/dist/cjs/smoothly-trigger-source.cjs.entry.js +1 -1
  13. package/dist/cjs/smoothly.cjs.js +7 -3
  14. package/dist/collection/collection-manifest.json +1 -1
  15. package/dist/collection/components/input/index.js +1 -1
  16. package/dist/collection/components/input-date/index.js +20 -1
  17. package/dist/collection/components/input-date/style.css +3 -0
  18. package/dist/collection/components/input-demo/index.js +1 -1
  19. package/dist/custom-elements/index.js +21 -5
  20. package/dist/esm/{getLanguage-9c833eef.js → getLanguage-bff35c81.js} +15 -0
  21. package/dist/esm/{index-15966109.js → index-7b57a52c.js} +104 -4
  22. package/dist/esm/{index-d89593d4.js → index-990cc22d.js} +1 -1
  23. package/dist/esm/index.js +2 -2
  24. package/dist/esm/loader.js +4 -3
  25. package/dist/esm/smoothly-accordion_53.entry.js +8 -7
  26. package/dist/esm/smoothly-country.entry.js +2 -2
  27. package/dist/esm/smoothly-google-font.entry.js +1 -1
  28. package/dist/esm/smoothly-radio-group.entry.js +1 -1
  29. package/dist/esm/smoothly-reorder.entry.js +2 -2
  30. package/dist/esm/smoothly-trigger-sink.entry.js +1 -1
  31. package/dist/esm/smoothly-trigger-source.entry.js +1 -1
  32. package/dist/esm/smoothly.js +4 -3
  33. package/dist/smoothly/index.esm.js +1 -1
  34. package/dist/smoothly/{p-b3c569ae.entry.js → p-0c7edd4c.entry.js} +1 -1
  35. package/dist/smoothly/{p-bfe744c5.entry.js → p-0ed63b7b.entry.js} +1 -1
  36. package/dist/smoothly/{p-b7a8f2bb.entry.js → p-1eb28ea6.entry.js} +1 -1
  37. package/dist/smoothly/{p-13dac490.entry.js → p-29f0b550.entry.js} +1 -1
  38. package/dist/smoothly/{p-22402fa5.entry.js → p-5fb08944.entry.js} +1 -1
  39. package/dist/smoothly/p-607abd83.entry.js +1 -0
  40. package/dist/smoothly/{p-b72a0f8f.js → p-675a8d09.js} +1 -1
  41. package/dist/smoothly/p-8878611c.js +1 -0
  42. package/dist/smoothly/{p-f1114814.entry.js → p-ad6e177e.entry.js} +1 -1
  43. package/dist/smoothly/p-c88ae468.js +2 -0
  44. package/dist/smoothly/smoothly.esm.js +1 -1
  45. package/dist/types/components/input-date/index.d.ts +1 -0
  46. package/dist/types/components.d.ts +2 -0
  47. package/dist/types/stencil-public-runtime.d.ts +20 -0
  48. package/loader/index.d.ts +9 -0
  49. package/package.json +6 -5
  50. package/dist/smoothly/p-1b714a63.js +0 -1
  51. package/dist/smoothly/p-38158601.entry.js +0 -1
  52. package/dist/smoothly/p-e67158ee.js +0 -2
@@ -8,6 +8,7 @@ export class InputDate {
8
8
  this.max = undefined;
9
9
  this.min = undefined;
10
10
  this.disabled = undefined;
11
+ this.flexible = false;
11
12
  this.color = "default";
12
13
  }
13
14
  onStart(next) {
@@ -24,7 +25,7 @@ export class InputDate {
24
25
  this.open && !this.disabled
25
26
  ? [
26
27
  h("div", { onClick: () => (this.open = false) }),
27
- h("nav", null, h("div", { class: "arrow", color: this.color }), h("smoothly-calendar", { doubleInput: false, value: (_a = this.value) !== null && _a !== void 0 ? _a : Date.now(), onValueChanged: event => {
28
+ h("nav", { class: { flexible: this.flexible } }, h("div", { class: "arrow", color: this.color }), h("smoothly-calendar", { doubleInput: false, value: (_a = this.value) !== null && _a !== void 0 ? _a : Date.now(), onValueChanged: event => {
28
29
  this.value = event.detail;
29
30
  event.stopPropagation();
30
31
  }, color: this.color, max: this.max, min: this.min })),
@@ -163,6 +164,24 @@ export class InputDate {
163
164
  "attribute": "disabled",
164
165
  "reflect": false
165
166
  },
167
+ "flexible": {
168
+ "type": "boolean",
169
+ "mutable": false,
170
+ "complexType": {
171
+ "original": "boolean",
172
+ "resolved": "boolean",
173
+ "references": {}
174
+ },
175
+ "required": false,
176
+ "optional": false,
177
+ "docs": {
178
+ "tags": [],
179
+ "text": ""
180
+ },
181
+ "attribute": "flexible",
182
+ "reflect": true,
183
+ "defaultValue": "false"
184
+ },
166
185
  "color": {
167
186
  "type": "string",
168
187
  "mutable": true,
@@ -9,6 +9,9 @@
9
9
  background-color: rgb(var(--smoothly-color-shade));
10
10
  min-width: 18em;
11
11
  }
12
+ :host > .flexible {
13
+ min-width: unset;
14
+ }
12
15
  :host > div {
13
16
  position: fixed;
14
17
  top: 0;
@@ -2,7 +2,7 @@ import { h } from "@stencil/core";
2
2
  export class SmoothlyInputDemo {
3
3
  render() {
4
4
  return [
5
- h("form", { action: "done", style: { position: "relative" } }, h("header", null, h("h5", null, "Form")), h("main", null, h("fieldset", null, h("h2", null, "Smoothly Input"), h("h3", null, "Card"), h("smoothly-input", { type: "text", name: "name", readonly: true, value: "Readonly", onSmoothlyBlur: () => console.log("smoothly blur") }, "Readonly"), h("smoothly-input", { type: "text", name: "name.last", onSmoothlyChange: e => console.log("smoothly change event") }, "Name"), h("smoothly-input", { type: "text", name: "name.first", onSmoothlyChange: e => console.log("smoothly change event") }, "Name"), h("smoothly-input-date", null), h("smoothly-input", { type: "date", name: "date" }, "Date"), h("smoothly-input", { type: "date-time", name: "date-time" }, "Date-Time"), h("smoothly-input", { type: "divisor", name: "divisor" }, "Divisor"), h("smoothly-input", { type: "text", name: "street", value: "street" }, "Street"), h("smoothly-input", { type: "card-number", name: "card" }, "Card #"), h("smoothly-input", { type: "card-expires", name: "card", style: { width: "calc(60% - 2px)" } }, "Expires"), h("smoothly-input", { type: "card-csc", name: "card", style: { width: "calc(40% - 1px)", borderLeft: "none" } }, "CVV/CVC"), h("h3", null, "Contact"), h("smoothly-input", { type: "postal-code", name: "zip", style: { width: "calc(60% - 2px)" } }, "ZipCode"), h("smoothly-input", { type: "text", name: "testing" }, "Texttest"), h("smoothly-input", { type: "password", name: "password" }, "Password"), h("smoothly-input", { type: "email", name: "email" }, "Email"), h("smoothly-input", { type: "price", currency: "SEK", name: "price" }, "Price"), h("smoothly-input", { type: "percent", name: "percent" }, "Percent"), h("smoothly-input", { type: "phone", name: "phone" }, "Phone"), h("smoothly-input-date", { name: "some-date" }, "Calendar"), h("smoothly-input-date", { name: "some-date", color: "tertiary" }, "Calendar (chosen color)")), h("fieldset", null, h("h2", null, "Smoothly Radio"), h("h3", null, "Deselectable Radio List with button"), h("smoothly-radio-button", { deselectable: true, decoration: "button" }, h("smoothly-radio-button-item", { value: { some: "content", yes: "sir" }, color: "primary", iconColor: "medium" }, h("span", null, "Option 1"), h("span", { slot: "expansion" }, "Some description.")), h("smoothly-radio-button-item", { value: { some: "thing", yes: "miss" }, iconColor: "light" }, h("span", null, "Option 2"), h("span", { slot: "expansion" }, "Some other description.")), h("smoothly-radio-button-item", { value: { some: "one", yes: "kid" }, iconColor: "danger" }, h("span", null, "Option 3")), h("smoothly-radio-button-item", { value: { some: "some", yes: "thing" }, disabled: true }, h("span", null, "Option 4 (Disabled)"))), h("h3", null, "Radio List with button"), h("smoothly-radio-button", { decoration: "button" }, h("smoothly-radio-button-item", { value: { some: "content", yes: "sir" }, color: "warning" }, h("span", null, "Option 1"), h("span", { slot: "expansion" }, "Some description.")), h("smoothly-radio-button-item", { value: { some: "thing", yes: "miss" } }, h("span", null, "Option 2"), h("span", { slot: "expansion" }, "Some other description.")), h("smoothly-radio-button-item", { value: { some: "one", yes: "kid" } }, h("span", null, "Option 3"))), h("h3", null, "Radio List ", h("b", null, "without button")), h("smoothly-radio-button", null, h("smoothly-radio-button-item", { value: { some: "content", yes: "sir" }, selected: true, color: "light" }, h("span", null, "Option 1"), h("span", { slot: "expansion" }, "Some description.")), h("smoothly-radio-button-item", { value: { some: "thing", yes: "miss" }, color: "light" }, h("span", null, "Option 2"), h("span", { slot: "expansion" }, "Some other description.")), h("smoothly-radio-button-item", { value: { some: "one", yes: "kid" }, color: "light" }, h("span", null, "Option 3"))), h("smoothly-radio", { name: "option", value: "1" }, "option 1"), h("smoothly-radio", { name: "option", value: "2", checked: true }, "option 2"), h("smoothly-radio", { name: "option", value: "3" }, "option 3")), h("fieldset", null, h("h2", null, "Smoothly Accordion"), h("smoothly-accordion", null, h("smoothly-accordion-item", { name: "A", open: true }, h("smoothly-radio", { name: "a", value: "1" }, "a 1"), h("smoothly-radio", { name: "a", value: "2", checked: true }, "a 2"), h("smoothly-radio", { name: "a", value: "3" }, "a 3")), h("smoothly-accordion-item", { name: "B" }, h("smoothly-radio", { name: "b", value: "1" }, "b 1"), h("smoothly-radio", { name: "b", value: "2" }, "b 2"), h("smoothly-radio", { name: "b", value: "3" }, "b 3")))), h("fieldset", null, h("h2", null, "Smoothly checkbox"), h("smoothly-checkbox", { selectAll: true, intermediate: true }), h("smoothly-checkbox", null), h("smoothly-checkbox", { disabled: true })), h("fieldset", null, h("h2", null, "Smoothly addresses"), h("smoothly-address-display", { value: '{ "countryCode": "SE", "street": "Korkstigen 2", "zipCode": "654 31", "city": "Fejksala" }' }), h("smoothly-address", { editable: false, value: '{ "countryCode": "SE", "street": "Stigv\u00E4gen 34", "zipCode": "123 45", "city": "Hobbiton" }' }), h("smoothly-addresses", { allowed: "billing delivery visit", editable: true, value: '{ "billing": { "countryCode": "SE", "street": "Rundslingan 3", "zipCode": "987 65", "city": "Klotby" }, "visit": { "countryCode": "SE", "street": "G\u00E5ngbanan 34", "zipCode": "543 21", "city": "Trasktr\u00E4sk" } }' }))), h("footer", null, h("smoothly-submit", { expand: "block", onSubmit: (e) => alert(e), color: "success" }, "Submit"), h("smoothly-submit", { disabled: true, expand: "block", onClick: e => console.log(e), onSubmit: (e) => alert(e), color: "success" }, "Submit"), h("smoothly-trigger", { expand: "block", color: "success", onClick: (e) => console.log(e.detail) }, "Trigger"))),
5
+ h("form", { action: "done", style: { position: "relative" } }, h("header", null, h("h5", null, "Form")), h("main", null, h("fieldset", null, h("h2", null, "Smoothly Input"), h("h3", null, "Card"), h("smoothly-input", { type: "text", name: "name", readonly: true, value: "Readonly", onSmoothlyBlur: () => console.log("smoothly blur") }, "Readonly"), h("smoothly-input", { type: "text", name: "name.last", onSmoothlyChange: e => console.log("smoothly change event") }, "Name"), h("smoothly-input", { type: "text", name: "name.first", onSmoothlyChange: e => console.log("smoothly change event") }, "Name"), h("smoothly-input-date", null), h("smoothly-input", { type: "date", name: "date" }, "Date"), h("smoothly-input", { type: "date-time", name: "date-time" }, "Date-Time"), h("smoothly-input", { type: "divisor", name: "divisor" }, "Divisor"), h("smoothly-input", { type: "text", name: "street", value: "street" }, "Street"), h("smoothly-input", { type: "card-number", name: "card" }, "Card #"), h("smoothly-input", { type: "card-expires", name: "card", style: { width: "calc(60% - 2px)" } }, "Expires"), h("smoothly-input", { type: "card-csc", name: "card", style: { width: "calc(40% - 1px)", borderLeft: "none" } }, "CVV/CVC"), h("h3", null, "Contact"), h("smoothly-input", { type: "postal-code", name: "zip", style: { width: "calc(60% - 2px)" } }, "ZipCode"), h("smoothly-input", { type: "text", name: "testing" }, "Texttest"), h("smoothly-input", { type: "password", name: "password" }, "Password"), h("smoothly-input", { type: "email", name: "email" }, "Email"), h("smoothly-input", { type: "price", currency: "SEK", name: "price" }, "Price"), h("smoothly-input", { type: "percent", name: "percent" }, "Percent"), h("smoothly-input", { type: "phone", name: "phone" }, "Phone"), h("smoothly-input-date", { name: "some-date" }, "Calendar"), h("smoothly-input-date", { name: "some-date", color: "tertiary" }, "Calendar (chosen color)"), h("smoothly-input-date", { name: "some-date", flexible: true }, "Calendar (no min-width)")), h("fieldset", null, h("h2", null, "Smoothly Radio"), h("h3", null, "Deselectable Radio List with button"), h("smoothly-radio-button", { deselectable: true, decoration: "button" }, h("smoothly-radio-button-item", { value: { some: "content", yes: "sir" }, color: "primary", iconColor: "medium" }, h("span", null, "Option 1"), h("span", { slot: "expansion" }, "Some description.")), h("smoothly-radio-button-item", { value: { some: "thing", yes: "miss" }, iconColor: "light" }, h("span", null, "Option 2"), h("span", { slot: "expansion" }, "Some other description.")), h("smoothly-radio-button-item", { value: { some: "one", yes: "kid" }, iconColor: "danger" }, h("span", null, "Option 3")), h("smoothly-radio-button-item", { value: { some: "some", yes: "thing" }, disabled: true }, h("span", null, "Option 4 (Disabled)"))), h("h3", null, "Radio List with button"), h("smoothly-radio-button", { decoration: "button" }, h("smoothly-radio-button-item", { value: { some: "content", yes: "sir" }, color: "warning" }, h("span", null, "Option 1"), h("span", { slot: "expansion" }, "Some description.")), h("smoothly-radio-button-item", { value: { some: "thing", yes: "miss" } }, h("span", null, "Option 2"), h("span", { slot: "expansion" }, "Some other description.")), h("smoothly-radio-button-item", { value: { some: "one", yes: "kid" } }, h("span", null, "Option 3"))), h("h3", null, "Radio List ", h("b", null, "without button")), h("smoothly-radio-button", null, h("smoothly-radio-button-item", { value: { some: "content", yes: "sir" }, selected: true, color: "light" }, h("span", null, "Option 1"), h("span", { slot: "expansion" }, "Some description.")), h("smoothly-radio-button-item", { value: { some: "thing", yes: "miss" }, color: "light" }, h("span", null, "Option 2"), h("span", { slot: "expansion" }, "Some other description.")), h("smoothly-radio-button-item", { value: { some: "one", yes: "kid" }, color: "light" }, h("span", null, "Option 3"))), h("smoothly-radio", { name: "option", value: "1" }, "option 1"), h("smoothly-radio", { name: "option", value: "2", checked: true }, "option 2"), h("smoothly-radio", { name: "option", value: "3" }, "option 3")), h("fieldset", null, h("h2", null, "Smoothly Accordion"), h("smoothly-accordion", null, h("smoothly-accordion-item", { name: "A", open: true }, h("smoothly-radio", { name: "a", value: "1" }, "a 1"), h("smoothly-radio", { name: "a", value: "2", checked: true }, "a 2"), h("smoothly-radio", { name: "a", value: "3" }, "a 3")), h("smoothly-accordion-item", { name: "B" }, h("smoothly-radio", { name: "b", value: "1" }, "b 1"), h("smoothly-radio", { name: "b", value: "2" }, "b 2"), h("smoothly-radio", { name: "b", value: "3" }, "b 3")))), h("fieldset", null, h("h2", null, "Smoothly checkbox"), h("smoothly-checkbox", { selectAll: true, intermediate: true }), h("smoothly-checkbox", null), h("smoothly-checkbox", { disabled: true })), h("fieldset", null, h("h2", null, "Smoothly addresses"), h("smoothly-address-display", { value: '{ "countryCode": "SE", "street": "Korkstigen 2", "zipCode": "654 31", "city": "Fejksala" }' }), h("smoothly-address", { editable: false, value: '{ "countryCode": "SE", "street": "Stigv\u00E4gen 34", "zipCode": "123 45", "city": "Hobbiton" }' }), h("smoothly-addresses", { allowed: "billing delivery visit", editable: true, value: '{ "billing": { "countryCode": "SE", "street": "Rundslingan 3", "zipCode": "987 65", "city": "Klotby" }, "visit": { "countryCode": "SE", "street": "G\u00E5ngbanan 34", "zipCode": "543 21", "city": "Trasktr\u00E4sk" } }' }))), h("footer", null, h("smoothly-submit", { expand: "block", onSubmit: (e) => alert(e), color: "success" }, "Submit"), h("smoothly-submit", { disabled: true, expand: "block", onClick: e => console.log(e), onSubmit: (e) => alert(e), color: "success" }, "Submit"), h("smoothly-trigger", { expand: "block", color: "success", onClick: (e) => console.log(e.detail) }, "Trigger"))),
6
6
  h("smoothly-backtotop", null),
7
7
  ];
8
8
  }
@@ -17420,6 +17420,21 @@ var Date$2;
17420
17420
  return nextYear(date, -years);
17421
17421
  }
17422
17422
  Date.previousYear = previousYear;
17423
+ function firstOfYear(date) {
17424
+ const result = parse(date);
17425
+ result.setMonth(0);
17426
+ result.setDate(1);
17427
+ return Date.create(result);
17428
+ }
17429
+ Date.firstOfYear = firstOfYear;
17430
+ function lastOfYear(date) {
17431
+ const result = parse(date);
17432
+ result.setFullYear(result.getFullYear() + 1);
17433
+ result.setMonth(0);
17434
+ result.setDate(0);
17435
+ return Date.create(result);
17436
+ }
17437
+ Date.lastOfYear = lastOfYear;
17423
17438
  function firstOfMonth(date) {
17424
17439
  const result = parse(date);
17425
17440
  result.setDate(1);
@@ -47307,7 +47322,7 @@ const SmoothlyInput$1 = class extends HTMLElement {
47307
47322
  }
47308
47323
  onPaste(event) {
47309
47324
  event.preventDefault();
47310
- let pasted = event.clipboardData ? event.clipboardData.getData("text") : "";
47325
+ let pasted = event.clipboardData ? event.clipboardData.getData("text").trim() : "";
47311
47326
  const backend = event.target;
47312
47327
  pasted = this.expiresAutocompleteFix(backend, pasted);
47313
47328
  this.processPaste(pasted, backend);
@@ -47380,7 +47395,7 @@ function getLocale() {
47380
47395
  return Locale$1.is(result) ? result : Language$1.is(result) ? Locale$1.toLocale(result) : undefined;
47381
47396
  }
47382
47397
 
47383
- const styleCss$y = ".sc-smoothly-input-date-h{position:relative;max-width:100vw}.sc-smoothly-input-date-h>nav.sc-smoothly-input-date{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-color-shade));min-width:18em}.sc-smoothly-input-date-h>div.sc-smoothly-input-date{position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-h>nav.sc-smoothly-input-date>.arrow.sc-smoothly-input-date{position:absolute;z-index:9;transform:translate(2em, -0.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-color-shade))}@media screen and (min-width: 400px){nav.sc-smoothly-input-date{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-color-shade));max-width:22em}}";
47398
+ const styleCss$y = ".sc-smoothly-input-date-h{position:relative;max-width:100vw}.sc-smoothly-input-date-h>nav.sc-smoothly-input-date{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-color-shade));min-width:18em}.sc-smoothly-input-date-h>.flexible.sc-smoothly-input-date{min-width:unset}.sc-smoothly-input-date-h>div.sc-smoothly-input-date{position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-h>nav.sc-smoothly-input-date>.arrow.sc-smoothly-input-date{position:absolute;z-index:9;transform:translate(2em, -0.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-color-shade))}@media screen and (min-width: 400px){nav.sc-smoothly-input-date{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-color-shade));max-width:22em}}";
47384
47399
 
47385
47400
  const InputDate = class extends HTMLElement {
47386
47401
  constructor() {
@@ -47393,6 +47408,7 @@ const InputDate = class extends HTMLElement {
47393
47408
  this.max = undefined;
47394
47409
  this.min = undefined;
47395
47410
  this.disabled = undefined;
47411
+ this.flexible = false;
47396
47412
  this.color = "default";
47397
47413
  }
47398
47414
  onStart(next) {
@@ -47409,7 +47425,7 @@ const InputDate = class extends HTMLElement {
47409
47425
  this.open && !this.disabled
47410
47426
  ? [
47411
47427
  h("div", { onClick: () => (this.open = false) }),
47412
- h("nav", null, h("div", { class: "arrow", color: this.color }), h("smoothly-calendar", { doubleInput: false, value: (_a = this.value) !== null && _a !== void 0 ? _a : Date$2.now(), onValueChanged: event => {
47428
+ h("nav", { class: { flexible: this.flexible } }, h("div", { class: "arrow", color: this.color }), h("smoothly-calendar", { doubleInput: false, value: (_a = this.value) !== null && _a !== void 0 ? _a : Date$2.now(), onValueChanged: event => {
47413
47429
  this.value = event.detail;
47414
47430
  event.stopPropagation();
47415
47431
  }, color: this.color, max: this.max, min: this.min })),
@@ -47481,7 +47497,7 @@ const SmoothlyInputDemo$1 = class extends HTMLElement {
47481
47497
  }
47482
47498
  render() {
47483
47499
  return [
47484
- h("form", { action: "done", style: { position: "relative" } }, h("header", null, h("h5", null, "Form")), h("main", null, h("fieldset", null, h("h2", null, "Smoothly Input"), h("h3", null, "Card"), h("smoothly-input", { type: "text", name: "name", readonly: true, value: "Readonly", onSmoothlyBlur: () => console.log("smoothly blur") }, "Readonly"), h("smoothly-input", { type: "text", name: "name.last", onSmoothlyChange: e => console.log("smoothly change event") }, "Name"), h("smoothly-input", { type: "text", name: "name.first", onSmoothlyChange: e => console.log("smoothly change event") }, "Name"), h("smoothly-input-date", null), h("smoothly-input", { type: "date", name: "date" }, "Date"), h("smoothly-input", { type: "date-time", name: "date-time" }, "Date-Time"), h("smoothly-input", { type: "divisor", name: "divisor" }, "Divisor"), h("smoothly-input", { type: "text", name: "street", value: "street" }, "Street"), h("smoothly-input", { type: "card-number", name: "card" }, "Card #"), h("smoothly-input", { type: "card-expires", name: "card", style: { width: "calc(60% - 2px)" } }, "Expires"), h("smoothly-input", { type: "card-csc", name: "card", style: { width: "calc(40% - 1px)", borderLeft: "none" } }, "CVV/CVC"), h("h3", null, "Contact"), h("smoothly-input", { type: "postal-code", name: "zip", style: { width: "calc(60% - 2px)" } }, "ZipCode"), h("smoothly-input", { type: "text", name: "testing" }, "Texttest"), h("smoothly-input", { type: "password", name: "password" }, "Password"), h("smoothly-input", { type: "email", name: "email" }, "Email"), h("smoothly-input", { type: "price", currency: "SEK", name: "price" }, "Price"), h("smoothly-input", { type: "percent", name: "percent" }, "Percent"), h("smoothly-input", { type: "phone", name: "phone" }, "Phone"), h("smoothly-input-date", { name: "some-date" }, "Calendar"), h("smoothly-input-date", { name: "some-date", color: "tertiary" }, "Calendar (chosen color)")), h("fieldset", null, h("h2", null, "Smoothly Radio"), h("h3", null, "Deselectable Radio List with button"), h("smoothly-radio-button", { deselectable: true, decoration: "button" }, h("smoothly-radio-button-item", { value: { some: "content", yes: "sir" }, color: "primary", iconColor: "medium" }, h("span", null, "Option 1"), h("span", { slot: "expansion" }, "Some description.")), h("smoothly-radio-button-item", { value: { some: "thing", yes: "miss" }, iconColor: "light" }, h("span", null, "Option 2"), h("span", { slot: "expansion" }, "Some other description.")), h("smoothly-radio-button-item", { value: { some: "one", yes: "kid" }, iconColor: "danger" }, h("span", null, "Option 3")), h("smoothly-radio-button-item", { value: { some: "some", yes: "thing" }, disabled: true }, h("span", null, "Option 4 (Disabled)"))), h("h3", null, "Radio List with button"), h("smoothly-radio-button", { decoration: "button" }, h("smoothly-radio-button-item", { value: { some: "content", yes: "sir" }, color: "warning" }, h("span", null, "Option 1"), h("span", { slot: "expansion" }, "Some description.")), h("smoothly-radio-button-item", { value: { some: "thing", yes: "miss" } }, h("span", null, "Option 2"), h("span", { slot: "expansion" }, "Some other description.")), h("smoothly-radio-button-item", { value: { some: "one", yes: "kid" } }, h("span", null, "Option 3"))), h("h3", null, "Radio List ", h("b", null, "without button")), h("smoothly-radio-button", null, h("smoothly-radio-button-item", { value: { some: "content", yes: "sir" }, selected: true, color: "light" }, h("span", null, "Option 1"), h("span", { slot: "expansion" }, "Some description.")), h("smoothly-radio-button-item", { value: { some: "thing", yes: "miss" }, color: "light" }, h("span", null, "Option 2"), h("span", { slot: "expansion" }, "Some other description.")), h("smoothly-radio-button-item", { value: { some: "one", yes: "kid" }, color: "light" }, h("span", null, "Option 3"))), h("smoothly-radio", { name: "option", value: "1" }, "option 1"), h("smoothly-radio", { name: "option", value: "2", checked: true }, "option 2"), h("smoothly-radio", { name: "option", value: "3" }, "option 3")), h("fieldset", null, h("h2", null, "Smoothly Accordion"), h("smoothly-accordion", null, h("smoothly-accordion-item", { name: "A", open: true }, h("smoothly-radio", { name: "a", value: "1" }, "a 1"), h("smoothly-radio", { name: "a", value: "2", checked: true }, "a 2"), h("smoothly-radio", { name: "a", value: "3" }, "a 3")), h("smoothly-accordion-item", { name: "B" }, h("smoothly-radio", { name: "b", value: "1" }, "b 1"), h("smoothly-radio", { name: "b", value: "2" }, "b 2"), h("smoothly-radio", { name: "b", value: "3" }, "b 3")))), h("fieldset", null, h("h2", null, "Smoothly checkbox"), h("smoothly-checkbox", { selectAll: true, intermediate: true }), h("smoothly-checkbox", null), h("smoothly-checkbox", { disabled: true })), h("fieldset", null, h("h2", null, "Smoothly addresses"), h("smoothly-address-display", { value: '{ "countryCode": "SE", "street": "Korkstigen 2", "zipCode": "654 31", "city": "Fejksala" }' }), h("smoothly-address", { editable: false, value: '{ "countryCode": "SE", "street": "Stigv\u00E4gen 34", "zipCode": "123 45", "city": "Hobbiton" }' }), h("smoothly-addresses", { allowed: "billing delivery visit", editable: true, value: '{ "billing": { "countryCode": "SE", "street": "Rundslingan 3", "zipCode": "987 65", "city": "Klotby" }, "visit": { "countryCode": "SE", "street": "G\u00E5ngbanan 34", "zipCode": "543 21", "city": "Trasktr\u00E4sk" } }' }))), h("footer", null, h("smoothly-submit", { expand: "block", onSubmit: (e) => alert(e), color: "success" }, "Submit"), h("smoothly-submit", { disabled: true, expand: "block", onClick: e => console.log(e), onSubmit: (e) => alert(e), color: "success" }, "Submit"), h("smoothly-trigger", { expand: "block", color: "success", onClick: (e) => console.log(e.detail) }, "Trigger"))),
47500
+ h("form", { action: "done", style: { position: "relative" } }, h("header", null, h("h5", null, "Form")), h("main", null, h("fieldset", null, h("h2", null, "Smoothly Input"), h("h3", null, "Card"), h("smoothly-input", { type: "text", name: "name", readonly: true, value: "Readonly", onSmoothlyBlur: () => console.log("smoothly blur") }, "Readonly"), h("smoothly-input", { type: "text", name: "name.last", onSmoothlyChange: e => console.log("smoothly change event") }, "Name"), h("smoothly-input", { type: "text", name: "name.first", onSmoothlyChange: e => console.log("smoothly change event") }, "Name"), h("smoothly-input-date", null), h("smoothly-input", { type: "date", name: "date" }, "Date"), h("smoothly-input", { type: "date-time", name: "date-time" }, "Date-Time"), h("smoothly-input", { type: "divisor", name: "divisor" }, "Divisor"), h("smoothly-input", { type: "text", name: "street", value: "street" }, "Street"), h("smoothly-input", { type: "card-number", name: "card" }, "Card #"), h("smoothly-input", { type: "card-expires", name: "card", style: { width: "calc(60% - 2px)" } }, "Expires"), h("smoothly-input", { type: "card-csc", name: "card", style: { width: "calc(40% - 1px)", borderLeft: "none" } }, "CVV/CVC"), h("h3", null, "Contact"), h("smoothly-input", { type: "postal-code", name: "zip", style: { width: "calc(60% - 2px)" } }, "ZipCode"), h("smoothly-input", { type: "text", name: "testing" }, "Texttest"), h("smoothly-input", { type: "password", name: "password" }, "Password"), h("smoothly-input", { type: "email", name: "email" }, "Email"), h("smoothly-input", { type: "price", currency: "SEK", name: "price" }, "Price"), h("smoothly-input", { type: "percent", name: "percent" }, "Percent"), h("smoothly-input", { type: "phone", name: "phone" }, "Phone"), h("smoothly-input-date", { name: "some-date" }, "Calendar"), h("smoothly-input-date", { name: "some-date", color: "tertiary" }, "Calendar (chosen color)"), h("smoothly-input-date", { name: "some-date", flexible: true }, "Calendar (no min-width)")), h("fieldset", null, h("h2", null, "Smoothly Radio"), h("h3", null, "Deselectable Radio List with button"), h("smoothly-radio-button", { deselectable: true, decoration: "button" }, h("smoothly-radio-button-item", { value: { some: "content", yes: "sir" }, color: "primary", iconColor: "medium" }, h("span", null, "Option 1"), h("span", { slot: "expansion" }, "Some description.")), h("smoothly-radio-button-item", { value: { some: "thing", yes: "miss" }, iconColor: "light" }, h("span", null, "Option 2"), h("span", { slot: "expansion" }, "Some other description.")), h("smoothly-radio-button-item", { value: { some: "one", yes: "kid" }, iconColor: "danger" }, h("span", null, "Option 3")), h("smoothly-radio-button-item", { value: { some: "some", yes: "thing" }, disabled: true }, h("span", null, "Option 4 (Disabled)"))), h("h3", null, "Radio List with button"), h("smoothly-radio-button", { decoration: "button" }, h("smoothly-radio-button-item", { value: { some: "content", yes: "sir" }, color: "warning" }, h("span", null, "Option 1"), h("span", { slot: "expansion" }, "Some description.")), h("smoothly-radio-button-item", { value: { some: "thing", yes: "miss" } }, h("span", null, "Option 2"), h("span", { slot: "expansion" }, "Some other description.")), h("smoothly-radio-button-item", { value: { some: "one", yes: "kid" } }, h("span", null, "Option 3"))), h("h3", null, "Radio List ", h("b", null, "without button")), h("smoothly-radio-button", null, h("smoothly-radio-button-item", { value: { some: "content", yes: "sir" }, selected: true, color: "light" }, h("span", null, "Option 1"), h("span", { slot: "expansion" }, "Some description.")), h("smoothly-radio-button-item", { value: { some: "thing", yes: "miss" }, color: "light" }, h("span", null, "Option 2"), h("span", { slot: "expansion" }, "Some other description.")), h("smoothly-radio-button-item", { value: { some: "one", yes: "kid" }, color: "light" }, h("span", null, "Option 3"))), h("smoothly-radio", { name: "option", value: "1" }, "option 1"), h("smoothly-radio", { name: "option", value: "2", checked: true }, "option 2"), h("smoothly-radio", { name: "option", value: "3" }, "option 3")), h("fieldset", null, h("h2", null, "Smoothly Accordion"), h("smoothly-accordion", null, h("smoothly-accordion-item", { name: "A", open: true }, h("smoothly-radio", { name: "a", value: "1" }, "a 1"), h("smoothly-radio", { name: "a", value: "2", checked: true }, "a 2"), h("smoothly-radio", { name: "a", value: "3" }, "a 3")), h("smoothly-accordion-item", { name: "B" }, h("smoothly-radio", { name: "b", value: "1" }, "b 1"), h("smoothly-radio", { name: "b", value: "2" }, "b 2"), h("smoothly-radio", { name: "b", value: "3" }, "b 3")))), h("fieldset", null, h("h2", null, "Smoothly checkbox"), h("smoothly-checkbox", { selectAll: true, intermediate: true }), h("smoothly-checkbox", null), h("smoothly-checkbox", { disabled: true })), h("fieldset", null, h("h2", null, "Smoothly addresses"), h("smoothly-address-display", { value: '{ "countryCode": "SE", "street": "Korkstigen 2", "zipCode": "654 31", "city": "Fejksala" }' }), h("smoothly-address", { editable: false, value: '{ "countryCode": "SE", "street": "Stigv\u00E4gen 34", "zipCode": "123 45", "city": "Hobbiton" }' }), h("smoothly-addresses", { allowed: "billing delivery visit", editable: true, value: '{ "billing": { "countryCode": "SE", "street": "Rundslingan 3", "zipCode": "987 65", "city": "Klotby" }, "visit": { "countryCode": "SE", "street": "G\u00E5ngbanan 34", "zipCode": "543 21", "city": "Trasktr\u00E4sk" } }' }))), h("footer", null, h("smoothly-submit", { expand: "block", onSubmit: (e) => alert(e), color: "success" }, "Submit"), h("smoothly-submit", { disabled: true, expand: "block", onClick: e => console.log(e), onSubmit: (e) => alert(e), color: "success" }, "Submit"), h("smoothly-trigger", { expand: "block", color: "success", onClick: (e) => console.log(e.detail) }, "Trigger"))),
47485
47501
  h("smoothly-backtotop", null),
47486
47502
  ];
47487
47503
  }
@@ -49086,7 +49102,7 @@ const SmoothlyGoogleFont = /*@__PURE__*/proxyCustomElement(SmoothlyGoogleFont$1,
49086
49102
  const SmoothlyIcon = /*@__PURE__*/proxyCustomElement(SmoothlyIcon$1, [2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]);
49087
49103
  const SmoothlyIconDemo = /*@__PURE__*/proxyCustomElement(SmoothlyIconDemo$1, [2,"smoothly-icon-demo"]);
49088
49104
  const SmoothlyInput = /*@__PURE__*/proxyCustomElement(SmoothlyInput$1, [6,"smoothly-input",{"name":[513],"value":[1032],"type":[513],"required":[1540],"minLength":[1026,"min-length"],"showLabel":[516,"show-label"],"maxLength":[1026,"max-length"],"autocomplete":[1028],"pattern":[1040],"placeholder":[1025],"disabled":[1028],"readonly":[1028],"currency":[513],"initialValue":[32]}]);
49089
- const SmoothlyInputDate = /*@__PURE__*/proxyCustomElement(InputDate, [6,"smoothly-input-date",{"name":[513],"value":[1025],"open":[1028],"max":[1025],"min":[1025],"disabled":[1028],"color":[1025]},[[0,"dateSet","dateSetHandler"]]]);
49105
+ const SmoothlyInputDate = /*@__PURE__*/proxyCustomElement(InputDate, [6,"smoothly-input-date",{"name":[513],"value":[1025],"open":[1028],"max":[1025],"min":[1025],"disabled":[1028],"flexible":[516],"color":[1025]},[[0,"dateSet","dateSetHandler"]]]);
49090
49106
  const SmoothlyInputDateRange = /*@__PURE__*/proxyCustomElement(InputDateRange, [2,"smoothly-input-date-range",{"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"open":[1028],"disabled":[516],"showLabel":[516,"show-label"],"labelStart":[1,"label-start"],"labelEnd":[1,"label-end"]},[[0,"startChanged","onStartChanged"],[0,"endChanged","onEndChanged"],[0,"dateRangeSet","onDateRangeSet"]]]);
49091
49107
  const SmoothlyInputDemo = /*@__PURE__*/proxyCustomElement(SmoothlyInputDemo$1, [0,"smoothly-input-demo"]);
49092
49108
  const SmoothlyInputMonth = /*@__PURE__*/proxyCustomElement(MonthSelector, [2,"smoothly-input-month",{"value":[1025]}]);
@@ -3588,6 +3588,21 @@ var Date$2;
3588
3588
  return nextYear(date, -years);
3589
3589
  }
3590
3590
  Date.previousYear = previousYear;
3591
+ function firstOfYear(date) {
3592
+ const result = parse(date);
3593
+ result.setMonth(0);
3594
+ result.setDate(1);
3595
+ return Date.create(result);
3596
+ }
3597
+ Date.firstOfYear = firstOfYear;
3598
+ function lastOfYear(date) {
3599
+ const result = parse(date);
3600
+ result.setFullYear(result.getFullYear() + 1);
3601
+ result.setMonth(0);
3602
+ result.setDate(0);
3603
+ return Date.create(result);
3604
+ }
3605
+ Date.lastOfYear = lastOfYear;
3591
3606
  function firstOfMonth(date) {
3592
3607
  const result = parse(date);
3593
3608
  result.setDate(1);
@@ -52,6 +52,18 @@ const isComplexType = (o) => {
52
52
  o = typeof o;
53
53
  return o === 'object' || o === 'function';
54
54
  };
55
+ /**
56
+ * Helper method for querying a `meta` tag that contains a nonce value
57
+ * out of a DOM's head.
58
+ *
59
+ * @param doc The DOM containing the `head` to query against
60
+ * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
61
+ * exists or the tag has no content.
62
+ */
63
+ function queryNonceMetaTagContent(doc) {
64
+ var _a, _b, _c;
65
+ return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
66
+ }
55
67
  /**
56
68
  * Production h() function based on Preact by
57
69
  * Jason Miller (@developit)
@@ -129,6 +141,14 @@ const h = (nodeName, vnodeData, ...children) => {
129
141
  }
130
142
  return vnode;
131
143
  };
144
+ /**
145
+ * A utility function for creating a virtual DOM node from a tag and some
146
+ * possible text content.
147
+ *
148
+ * @param tag the tag for this element
149
+ * @param text possible text content for the node
150
+ * @returns a newly-minted virtual DOM node
151
+ */
132
152
  const newVNode = (tag, text) => {
133
153
  const vnode = {
134
154
  $flags$: 0,
@@ -149,6 +169,12 @@ const newVNode = (tag, text) => {
149
169
  return vnode;
150
170
  };
151
171
  const Host = {};
172
+ /**
173
+ * Check whether a given node is a Host node or not
174
+ *
175
+ * @param node the virtual DOM node to check
176
+ * @returns whether it's a Host node or not
177
+ */
152
178
  const isHost = (node) => node && node.$tag$ === Host;
153
179
  /**
154
180
  * Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
@@ -161,6 +187,13 @@ const vdomFnUtils = {
161
187
  forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
162
188
  map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
163
189
  };
190
+ /**
191
+ * Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
192
+ * friendlier public interface (hence, 'convertToPublic').
193
+ *
194
+ * @param node the virtual DOM node to convert
195
+ * @returns a converted child node
196
+ */
164
197
  const convertToPublic = (node) => ({
165
198
  vattrs: node.$attrs$,
166
199
  vchildren: node.$children$,
@@ -169,6 +202,15 @@ const convertToPublic = (node) => ({
169
202
  vtag: node.$tag$,
170
203
  vtext: node.$text$,
171
204
  });
205
+ /**
206
+ * Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
207
+ * order to use the resulting object in the virtual DOM. The initial object was
208
+ * likely created as part of presenting a public API, so converting it back
209
+ * involved making it 'private' again (hence, `convertToPrivate`).
210
+ *
211
+ * @param node the child node to convert
212
+ * @returns a converted virtual DOM node
213
+ */
172
214
  const convertToPrivate = (node) => {
173
215
  if (typeof node.vtag === 'function') {
174
216
  const vnodeData = Object.assign({}, node.vattrs);
@@ -278,6 +320,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
278
320
  styles.set(scopeId, style);
279
321
  };
280
322
  const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
323
+ var _a;
281
324
  let scopeId = getScopeId(cmpMeta);
282
325
  const style = styles.get(scopeId);
283
326
  // if an element is NOT connected then getRootNode() will return the wrong root node
@@ -297,6 +340,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
297
340
  styleElm = doc.createElement('style');
298
341
  styleElm.innerHTML = style;
299
342
  }
343
+ // Apply CSP nonce to the style tag if it exists
344
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
345
+ if (nonce != null) {
346
+ styleElm.setAttribute('nonce', nonce);
347
+ }
300
348
  styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
301
349
  }
302
350
  if (appliedStyles) {
@@ -633,6 +681,21 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
633
681
  }
634
682
  plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
635
683
  };
684
+ /**
685
+ * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
686
+ * add them to the DOM in the appropriate place.
687
+ *
688
+ * @param parentElm the DOM node which should be used as a parent for the new
689
+ * DOM nodes
690
+ * @param before a child of the `parentElm` which the new children should be
691
+ * inserted before (optional)
692
+ * @param parentVNode the parent virtual DOM node
693
+ * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
694
+ * @param startIdx the index in the child virtual DOM nodes at which to start
695
+ * creating DOM nodes (inclusive)
696
+ * @param endIdx the index in the child virtual DOM nodes at which to stop
697
+ * creating DOM nodes (inclusive)
698
+ */
636
699
  const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
637
700
  let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
638
701
  let childNode;
@@ -649,6 +712,19 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
649
712
  }
650
713
  }
651
714
  };
715
+ /**
716
+ * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
717
+ * This can be used to, for instance, clean up after a list of children which
718
+ * should no longer be shown.
719
+ *
720
+ * This function also handles some of Stencil's slot relocation logic.
721
+ *
722
+ * @param vnodes a list of virtual DOM nodes to remove
723
+ * @param startIdx the index at which to start removing nodes (inclusive)
724
+ * @param endIdx the index at which to stop removing nodes (inclusive)
725
+ * @param vnode a VNode
726
+ * @param elm an element
727
+ */
652
728
  const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
653
729
  for (; startIdx <= endIdx; ++startIdx) {
654
730
  if ((vnode = vnodes[startIdx])) {
@@ -927,7 +1003,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
927
1003
  *
928
1004
  * So, in other words, if `key` attrs are not set on VNodes which may be
929
1005
  * changing order within a `children` array or something along those lines then
930
- * we could obtain a false positive and then have to do needless re-rendering.
1006
+ * we could obtain a false negative and then have to do needless re-rendering
1007
+ * (i.e. we'd say two VNodes aren't equal when in fact they should be).
931
1008
  *
932
1009
  * @param leftVNode the first VNode to check
933
1010
  * @param rightVNode the second VNode to check
@@ -1155,6 +1232,18 @@ const callNodeRefs = (vNode) => {
1155
1232
  vNode.$children$ && vNode.$children$.map(callNodeRefs);
1156
1233
  }
1157
1234
  };
1235
+ /**
1236
+ * The main entry point for Stencil's virtual DOM-based rendering engine
1237
+ *
1238
+ * Given a {@link d.HostRef} container and some virtual DOM nodes, this
1239
+ * function will handle creating a virtual DOM tree with a single root, patching
1240
+ * the current virtual DOM tree onto an old one (if any), dealing with slot
1241
+ * relocation, and reflecting attributes.
1242
+ *
1243
+ * @param hostRef data needed to root and render the virtual DOM tree, such as
1244
+ * the DOM node into which it should be rendered.
1245
+ * @param renderFnResults the virtual DOM nodes to be rendered
1246
+ */
1158
1247
  const renderVdom = (hostRef, renderFnResults) => {
1159
1248
  const hostElm = hostRef.$hostElement$;
1160
1249
  const cmpMeta = hostRef.$cmpMeta$;
@@ -1762,6 +1851,7 @@ const disconnectedCallback = (elm) => {
1762
1851
  }
1763
1852
  };
1764
1853
  const bootstrapLazy = (lazyBundles, options = {}) => {
1854
+ var _a;
1765
1855
  const endBootstrap = createTime();
1766
1856
  const cmpTags = [];
1767
1857
  const exclude = options.exclude || [];
@@ -1844,6 +1934,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1844
1934
  {
1845
1935
  visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1846
1936
  visibilityStyle.setAttribute('data-styles', '');
1937
+ // Apply CSP nonce to the style tag if it exists
1938
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1939
+ if (nonce != null) {
1940
+ visibilityStyle.setAttribute('nonce', nonce);
1941
+ }
1847
1942
  head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1848
1943
  }
1849
1944
  // Process deferred connectedCallbacks now all components have been registered
@@ -1888,6 +1983,13 @@ const hostListenerProxy = (hostRef, methodName) => (ev) => {
1888
1983
  };
1889
1984
  // prettier-ignore
1890
1985
  const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
1986
+ /**
1987
+ * Assigns the given value to the nonce property on the runtime platform object.
1988
+ * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1989
+ * @param nonce The value to be assigned to the platform nonce property.
1990
+ * @returns void
1991
+ */
1992
+ const setNonce = (nonce) => (plt.$nonce$ = nonce);
1891
1993
  const hostRefs = /*@__PURE__*/ new WeakMap();
1892
1994
  const getHostRef = (ref) => hostRefs.get(ref);
1893
1995
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
@@ -1936,8 +2038,6 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1936
2038
  const styles = /*@__PURE__*/ new Map();
1937
2039
  const win = typeof window !== 'undefined' ? window : {};
1938
2040
  const doc = win.document || { head: {} };
1939
- const H = (win.HTMLElement || class {
1940
- });
1941
2041
  const plt = {
1942
2042
  $flags$: 0,
1943
2043
  $resourcesUrl$: '',
@@ -2000,4 +2100,4 @@ const flush = () => {
2000
2100
  const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
2001
2101
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2002
2102
 
2003
- export { Host as H, getElement as a, bootstrapLazy as b, createEvent as c, H as d, forceUpdate as f, getRenderingRef as g, h, promiseResolve as p, registerInstance as r };
2103
+ export { Host as H, getElement as a, bootstrapLazy as b, createEvent as c, forceUpdate as f, getRenderingRef as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
@@ -1,4 +1,4 @@
1
- import { g as getRenderingRef, f as forceUpdate, h } from './index-15966109.js';
1
+ import { g as getRenderingRef, f as forceUpdate, h } from './index-7b57a52c.js';
2
2
 
3
3
  const appendToMap = (map, propName, value) => {
4
4
  const items = map.get(propName);
package/dist/esm/index.js CHANGED
@@ -1,8 +1,8 @@
1
- export { A as App, C as Cosmetic, N as Notice, r as redirect } from './index-d89593d4.js';
1
+ export { A as App, C as Cosmetic, N as Notice, r as redirect } from './index-990cc22d.js';
2
2
  import { I as Identifier } from './Listenable-79ce5567.js';
3
3
  export { a as Icon, L as Listenable, M as Message, T as Trigger } from './Listenable-79ce5567.js';
4
4
  export { G as GoogleFont } from './GoogleFont-8474516b.js';
5
- import './index-15966109.js';
5
+ import './index-7b57a52c.js';
6
6
 
7
7
  class ClientIdentifier {
8
8
  constructor() { }
@@ -1,7 +1,8 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-15966109.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-7b57a52c.js';
2
+ export { s as setNonce } from './index-7b57a52c.js';
2
3
 
3
4
  /*
4
- Stencil Client Patch Esm v2.21.0 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
5
6
  */
6
7
  const patchEsm = () => {
7
8
  return promiseResolve();
@@ -10,7 +11,7 @@ const patchEsm = () => {
10
11
  const defineCustomElements = (win, options) => {
11
12
  if (typeof window === 'undefined') return Promise.resolve();
12
13
  return patchEsm().then(() => {
13
- return bootstrapLazy([["smoothly-country",[[2,"smoothly-country",{"value":[1],"text":[1],"language":[32]}]]],["smoothly-google-font",[[2,"smoothly-google-font",{"value":[1]}]]],["smoothly-radio-group",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["smoothly-reorder",[[0,"smoothly-reorder"]]],["smoothly-trigger-sink",[[6,"smoothly-trigger-sink",{"context":[16],"destination":[1],"filter":[1]},[[0,"trigger","TriggerListener"]]]]],["smoothly-trigger-source",[[6,"smoothly-trigger-source",{"listen":[1]}]]],["smoothly-accordion_53",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}],[0,"smoothly-input-demo"],[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]],[0,"smoothly-display-demo"],[2,"smoothly-table-demo"],[4,"smoothly-app",{"color":[1]}],[0,"smoothly-dialog-demo"],[2,"smoothly-icon-demo"],[6,"smoothly-button",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"link":[1],"download":[4]}],[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}],[2,"smoothly-input-date-range",{"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"open":[1028],"disabled":[516],"showLabel":[516,"show-label"],"labelStart":[1,"label-start"],"labelEnd":[1,"label-end"]},[[0,"startChanged","onStartChanged"],[0,"endChanged","onEndChanged"],[0,"dateRangeSet","onDateRangeSet"]]],[1,"smoothly-picker",{"disabled":[516],"readonly":[516],"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"mutable":[4],"optionStyle":[8,"option-style"],"options":[1040],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"selectAllName":[1025,"select-all-name"],"selectAllEnabled":[1028,"select-all-enabled"],"selectionName":[1025,"selection-name"],"newOptionLabel":[1025,"new-option-label"],"valueValidator":[16],"isOpen":[32],"empty":[32]},[[0,"optionSelect","optionSelectHandler"],[0,"optionUnselect","optionSelectHandler"],[0,"optionAdd","optionAddHandler"],[0,"menuEmpty","emptyHandler"]]],[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]],[2,"smoothly-backtotop",{"opacity":[1],"bottom":[1],"right":[1],"visible":[32]}],[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"size":[1],"intermediate":[1540],"selected":[1540],"disabled":[1540],"t":[32]}],[6,"smoothly-radio-button-item",{"value":[8],"selected":[1540],"color":[513],"iconColor":[1,"icon-color"],"disabled":[1540]}],[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]],[6,"smoothly-table-cell"],[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"click","onClick"],[0,"tableLoad","handleTableLoaded"]]],[0,"smoothly-urlencoded",{"data":[1]}],[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]],[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}],[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1],"format":[16]}],[2,"smoothly-display-amount",{"amount":[8],"currency":[1],"toInteger":[4,"to-integer"]}],[2,"smoothly-display-date-time",{"datetime":[1]}],[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}],[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}],[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}],[6,"smoothly-radio-button",{"name":[1],"value":[1032],"deselectable":[516],"decoration":[513]},[[2,"radioItemSelectInternal","radioSelectHandler"]]],[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}],[2,"smoothly-skeleton",{"widths":[16],"width":[1025],"color":[1],"period":[2],"distance":[1],"align":[513]}],[2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}],[6,"smoothly-table",{"root":[1540]},[[0,"expandableLoad","handleExpandableLoaded"],[0,"expandableChange","handleExpandableState"],[0,"spotlightChange","handleSpotlightState"],[0,"smoothlyNestedTable","handleNestedTable"],[0,"expansionLoad","handleEvents"],[0,"expansionOpen","handleEvents"]]],[6,"smoothly-table-expandable-row",{"align":[1],"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"click","onClick"],[0,"tableLoad","handleTableLoaded"]]],[6,"smoothly-table-header",{"name":[1]}],[6,"smoothly-table-row",null,[[0,"expansionLoad","onExpansionLoad"],[0,"expansionOpen","onExpansionOpen"]]],[6,"smoothly-input-date",{"name":[513],"value":[1025],"open":[1028],"max":[1025],"min":[1025],"disabled":[1028],"color":[1025]},[[0,"dateSet","dateSetHandler"]]],[1,"smoothly-menu-options",{"toggle":[4],"emptyMenuLabel":[1025,"empty-menu-label"],"newOptionLabel":[1,"new-option-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"mutable":[4],"filteredOptions":[32],"highlightIndex":[32],"keyword":[32],"moveHighlight":[64],"setHighlight":[64],"getHighlighted":[64],"filterOptions":[64]},[[0,"optionHover","optionHoverHandler"]]],[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]],[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]],[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]],[0,"smoothly-tuple",{"tuple":[16]}],[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537],"divider":[1540],"checkbox":[4],"new":[4],"toggle":[4],"checked":[1028]}],[2,"smoothly-spinner",{"active":[516],"size":[513]}],[2,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"doubleInput":[516,"double-input"],"color":[513],"firstSelected":[32]}],[6,"smoothly-input",{"name":[513],"value":[1032],"type":[513],"required":[1540],"minLength":[1026,"min-length"],"showLabel":[516,"show-label"],"maxLength":[1026,"max-length"],"autocomplete":[1028],"pattern":[1040],"placeholder":[1025],"disabled":[1028],"readonly":[1028],"currency":[513],"initialValue":[32],"getFormData":[64],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]}],[2,"smoothly-input-month",{"value":[1025]}],[6,"smoothly-quiet",{"color":[1]}],[6,"smoothly-selector",{"initialPrompt":[1,"initial-prompt"],"disableFilter":[4,"disable-filter"],"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32],"reset":[64]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]],[6,"smoothly-item",{"value":[8],"selected":[1540],"marked":[1540],"filter":[64]},[[0,"click","onClick"]]],[6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]],[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]]]], options);
14
+ return bootstrapLazy([["smoothly-country",[[2,"smoothly-country",{"value":[1],"text":[1],"language":[32]}]]],["smoothly-google-font",[[2,"smoothly-google-font",{"value":[1]}]]],["smoothly-radio-group",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["smoothly-reorder",[[0,"smoothly-reorder"]]],["smoothly-trigger-sink",[[6,"smoothly-trigger-sink",{"context":[16],"destination":[1],"filter":[1]},[[0,"trigger","TriggerListener"]]]]],["smoothly-trigger-source",[[6,"smoothly-trigger-source",{"listen":[1]}]]],["smoothly-accordion_53",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}],[0,"smoothly-input-demo"],[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]],[0,"smoothly-display-demo"],[2,"smoothly-table-demo"],[4,"smoothly-app",{"color":[1]}],[0,"smoothly-dialog-demo"],[2,"smoothly-icon-demo"],[6,"smoothly-button",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"link":[1],"download":[4]}],[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}],[2,"smoothly-input-date-range",{"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"open":[1028],"disabled":[516],"showLabel":[516,"show-label"],"labelStart":[1,"label-start"],"labelEnd":[1,"label-end"]},[[0,"startChanged","onStartChanged"],[0,"endChanged","onEndChanged"],[0,"dateRangeSet","onDateRangeSet"]]],[1,"smoothly-picker",{"disabled":[516],"readonly":[516],"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"mutable":[4],"optionStyle":[8,"option-style"],"options":[1040],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"selectAllName":[1025,"select-all-name"],"selectAllEnabled":[1028,"select-all-enabled"],"selectionName":[1025,"selection-name"],"newOptionLabel":[1025,"new-option-label"],"valueValidator":[16],"isOpen":[32],"empty":[32]},[[0,"optionSelect","optionSelectHandler"],[0,"optionUnselect","optionSelectHandler"],[0,"optionAdd","optionAddHandler"],[0,"menuEmpty","emptyHandler"]]],[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]],[2,"smoothly-backtotop",{"opacity":[1],"bottom":[1],"right":[1],"visible":[32]}],[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"size":[1],"intermediate":[1540],"selected":[1540],"disabled":[1540],"t":[32]}],[6,"smoothly-radio-button-item",{"value":[8],"selected":[1540],"color":[513],"iconColor":[1,"icon-color"],"disabled":[1540]}],[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]],[6,"smoothly-table-cell"],[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"click","onClick"],[0,"tableLoad","handleTableLoaded"]]],[0,"smoothly-urlencoded",{"data":[1]}],[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]],[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}],[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1],"format":[16]}],[2,"smoothly-display-amount",{"amount":[8],"currency":[1],"toInteger":[4,"to-integer"]}],[2,"smoothly-display-date-time",{"datetime":[1]}],[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}],[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}],[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}],[6,"smoothly-radio-button",{"name":[1],"value":[1032],"deselectable":[516],"decoration":[513]},[[2,"radioItemSelectInternal","radioSelectHandler"]]],[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}],[2,"smoothly-skeleton",{"widths":[16],"width":[1025],"color":[1],"period":[2],"distance":[1],"align":[513]}],[2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}],[6,"smoothly-table",{"root":[1540]},[[0,"expandableLoad","handleExpandableLoaded"],[0,"expandableChange","handleExpandableState"],[0,"spotlightChange","handleSpotlightState"],[0,"smoothlyNestedTable","handleNestedTable"],[0,"expansionLoad","handleEvents"],[0,"expansionOpen","handleEvents"]]],[6,"smoothly-table-expandable-row",{"align":[1],"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"click","onClick"],[0,"tableLoad","handleTableLoaded"]]],[6,"smoothly-table-header",{"name":[1]}],[6,"smoothly-table-row",null,[[0,"expansionLoad","onExpansionLoad"],[0,"expansionOpen","onExpansionOpen"]]],[6,"smoothly-input-date",{"name":[513],"value":[1025],"open":[1028],"max":[1025],"min":[1025],"disabled":[1028],"flexible":[516],"color":[1025]},[[0,"dateSet","dateSetHandler"]]],[1,"smoothly-menu-options",{"toggle":[4],"emptyMenuLabel":[1025,"empty-menu-label"],"newOptionLabel":[1,"new-option-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"mutable":[4],"filteredOptions":[32],"highlightIndex":[32],"keyword":[32],"moveHighlight":[64],"setHighlight":[64],"getHighlighted":[64],"filterOptions":[64]},[[0,"optionHover","optionHoverHandler"]]],[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]],[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]],[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]],[0,"smoothly-tuple",{"tuple":[16]}],[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537],"divider":[1540],"checkbox":[4],"new":[4],"toggle":[4],"checked":[1028]}],[2,"smoothly-spinner",{"active":[516],"size":[513]}],[2,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"doubleInput":[516,"double-input"],"color":[513],"firstSelected":[32]}],[6,"smoothly-input",{"name":[513],"value":[1032],"type":[513],"required":[1540],"minLength":[1026,"min-length"],"showLabel":[516,"show-label"],"maxLength":[1026,"max-length"],"autocomplete":[1028],"pattern":[1040],"placeholder":[1025],"disabled":[1028],"readonly":[1028],"currency":[513],"initialValue":[32],"getFormData":[64],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]}],[2,"smoothly-input-month",{"value":[1025]}],[6,"smoothly-quiet",{"color":[1]}],[6,"smoothly-selector",{"initialPrompt":[1,"initial-prompt"],"disableFilter":[4,"disable-filter"],"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32],"reset":[64]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]],[6,"smoothly-item",{"value":[8],"selected":[1540],"marked":[1540],"filter":[64]},[[0,"click","onClick"]]],[6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]],[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]]]], options);
14
15
  });
15
16
  };
16
17