smoothly 0.2.11 → 0.3.1

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 (30) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/smoothly-accordion_50.cjs.entry.js +41 -30
  3. package/dist/cjs/smoothly.cjs.js +1 -1
  4. package/dist/collection/components/app-demo/index.js +10 -10
  5. package/dist/collection/components/display-amount/index.js +22 -1
  6. package/dist/collection/components/display-demo/index.js +9 -0
  7. package/dist/collection/components/menu-options/index.js +31 -10
  8. package/dist/collection/components/option/index.js +81 -6
  9. package/dist/collection/components/option/style.css +31 -35
  10. package/dist/collection/components/picker/index.js +26 -21
  11. package/dist/collection/components/select-demo/index.js +4 -4
  12. package/dist/collection/components/skeleton/index.js +1 -1
  13. package/dist/collection/model/{OptionType.js → Option.js} +0 -0
  14. package/dist/custom-elements/index.js +46 -35
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/smoothly-accordion_50.entry.js +41 -30
  17. package/dist/esm/smoothly.js +1 -1
  18. package/dist/smoothly/p-b92b1eb7.entry.js +1 -0
  19. package/dist/smoothly/smoothly.esm.js +1 -1
  20. package/dist/types/components/display-amount/index.d.ts +1 -0
  21. package/dist/types/components/menu-options/index.d.ts +10 -6
  22. package/dist/types/components/option/index.d.ts +7 -0
  23. package/dist/types/components/picker/index.d.ts +11 -10
  24. package/dist/types/components.d.ts +22 -11
  25. package/dist/types/index.d.ts +1 -1
  26. package/dist/types/model/Option.d.ts +7 -0
  27. package/dist/types/model/index.d.ts +1 -1
  28. package/package.json +1 -1
  29. package/dist/smoothly/p-956089d5.entry.js +0 -1
  30. package/dist/types/model/OptionType.d.ts +0 -8
@@ -1716,16 +1716,16 @@ const SmoothlyAppDemo$1 = class extends HTMLElement {
1716
1716
  redirect("https://google.com");
1717
1717
  } }, "External")), h("smoothly-room", { path: /^\/routing\/\w+\/?/, label: "No effect" }, h("h2", null, "Regex routing")), h("smoothly-room", { path: "old", label: "Old", to: "select" }), h("span", { slot: "header", style: { width: "100%", maxWidth: "500px" } }, h("smoothly-picker", { label: "All Animals Selected", style: { minWidth: "100px" }, labelSetting: "hide", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, "select-none-name": "Select All", options: [
1718
1718
  { name: "Big Dog", value: "dog", aliases: ["WOFF"] },
1719
- { name: "Cat Stevens", value: "cat", aliases: ["moew"], right: "🐈" },
1720
- { name: "Noble Pig", value: "pig", right: "🐷" },
1721
- { name: "Turtle Wax", value: "turtle", right: "" },
1722
- { name: "Spider Man", value: "spider", right: "" },
1723
- { name: "Phoenix Order Long Wooord", value: "phoenix", right: "" },
1724
- { name: "Horse Back", value: "horse", right: "" },
1725
- { name: "Unicorn Horn", value: "unicorn", right: "" },
1726
- { name: "Talking Parrot Parrot", value: "parrot", right: "" },
1727
- { name: "Hidden Dragon", value: "dragon", right: "" },
1728
- { name: "Scary Kraken", value: "kraken", right: "" },
1719
+ { name: "Cat Stevens", value: "cat", aliases: ["moew"], hint: "moew 🐈" },
1720
+ { name: "Noble Pig", value: "pig", hint: "🐷" },
1721
+ { name: "Turtle Wax", value: "turtle" },
1722
+ { name: "Spider Man", value: "spider" },
1723
+ { name: "Phoenix Order Long Wooord", value: "phoenix" },
1724
+ { name: "Horse Back", value: "horse" },
1725
+ { name: "Unicorn Horn", value: "unicorn" },
1726
+ { name: "Talking Parrot Parrot", value: "parrot" },
1727
+ { name: "Hidden Dragon", value: "dragon" },
1728
+ { name: "Scary Kraken", value: "kraken" },
1729
1729
  ] })), h("smoothly-trigger", { slot: "header", type: "link", name: "logout" }, h("smoothly-icon", { toolTip: "Log out", name: "log-out", size: "medium" }))));
1730
1730
  }
1731
1731
  };
@@ -34258,6 +34258,7 @@ const SmoothlyDisplayAmount$1 = class extends HTMLElement {
34258
34258
  constructor() {
34259
34259
  super();
34260
34260
  this.__registerHost();
34261
+ this.toInteger = false;
34261
34262
  }
34262
34263
  format(amount) {
34263
34264
  const digitsPerGroup = 3;
@@ -34278,7 +34279,7 @@ const SmoothlyDisplayAmount$1 = class extends HTMLElement {
34278
34279
  result = result.padEnd(separator + maxDecimals + 1, "0");
34279
34280
  result = result.substring(0, separator + maxDecimals + 1);
34280
34281
  }
34281
- else {
34282
+ else if (!this.toInteger) {
34282
34283
  result = result + ".";
34283
34284
  separator = result.length - 1;
34284
34285
  result = result.padEnd(separator + maxDecimals + 1, "0");
@@ -34332,7 +34333,7 @@ const SmoothlyDisplayDemo$1 = class extends HTMLElement {
34332
34333
  }
34333
34334
  render() {
34334
34335
  return [
34335
- h("main", null, h("smoothly-popup", null, h("div", null, "Popup, click me"), h("div", { color: "dark", slot: "popup" }, "1 line popup")), h("smoothly-display-date-time", { datetime: "2019-08-15T08:08:17.65Z" }), h("dl", null, h("dt", null, "text"), h("dd", null, h("smoothly-display", { type: "text", value: "text" })), h("dt", null, "postal code"), h("dd", null, h("smoothly-display", { type: "postal-code", value: "752 31" })), h("dt", null, "password"), h("dd", null, h("smoothly-display", { type: "password", value: "password" })), h("dt", null, "email"), h("dd", null, h("smoothly-display", { type: "email", value: "test@example.com" })), h("dt", null, "price"), h("dd", null, h("smoothly-display", { type: "price", value: "13.37", currency: "SEK" })), h("dt", null, "percent"), h("dd", null, h("smoothly-display", { type: "percent", value: "42" })), h("dt", null, "phone"), h("dd", null, h("smoothly-display", { type: "phone", value: "0101881108" })), h("dt", null, "card number"), h("dd", null, h("smoothly-display", { type: "card-number", value: "4111111111111111" })), h("dt", null, "card expires"), h("dd", null, h("smoothly-display", { type: "card-expires", value: "7/22" })), h("dt", null, "card csc"), h("dd", null, h("smoothly-display", { type: "card-csc", value: "987" })), h("dt", null, "date"), h("dd", null, h("smoothly-display", { type: "date", value: "2022-07-07" })), h("dt", null, "date time"), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" }, value: "2022-07-07T02:02:02Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "2-digit", month: "long", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit" }, value: "2022-07-07T02:02:02Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "2-digit", day: "2-digit", hour: "numeric", minute: "numeric", second: "numeric" }, value: "2022-07-07T12:22:24Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "numeric", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" }, value: "2022-07-07T12:22:24Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "short", day: "numeric" }, value: "2022-07-07T00:00+02:00" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "2-digit", month: "numeric", day: "numeric" }, value: "2022-07-07T00:00+02:00" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "2-digit", month: "numeric", day: "numeric", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZone: "+01:00" }, value: "2022-07-07T12:15Z" })), h("dt", null, "Quiet"), h("dd", null, h("smoothly-quiet", { color: "dark" }, "-"))), h("smoothly-skeleton", { period: 3, distance: "20rem", width: "20rem" }), h("smoothly-skeleton", { period: 3, distance: "20rem", color: "200,200,255" }), h("smoothly-skeleton", { period: 3, distance: "20rem", color: "var(--smoothly-warning-color)" }), h("smoothly-skeleton", { period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem", width: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem", width: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), h("smoothly-urlencoded", { data: "hej=hopp&tjena=moss" }), h("div", { style: { display: "flex", justifyContent: "space-between" } }, h("smoothly-popup", { direction: "down" }, "Click for popup", h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup stuff that has a lot of text")), h("smoothly-popup", { direction: "down" }, "Click for popup", h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup with a bunch of text."))), h("p", null, "Test of diffrent kinds of notifier:"), h("button", { onClick: () => this.noticeWarning(Notice.warn("This is a test warning notice.")) }, "warning"), h("button", { onClick: () => this.noticeWarning(Notice.succeded("This is a test success notice.")) }, "success"), h("button", { onClick: () => this.noticeWarning(Notice.failed("This is a test danger notice.")) }, "danger"), h("button", { onClick: () => this.noticeWarning(Notice.execute("This is a test execute notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "execute"), h("button", { onClick: () => this.noticeWarning(Notice.delay("This is a test delay notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "delay")),
34336
+ h("main", null, h("smoothly-popup", null, h("div", null, "Popup, click me"), h("div", { color: "dark", slot: "popup" }, "1 line popup")), h("smoothly-display-date-time", { datetime: "2019-08-15T08:08:17.65Z" }), h("dl", null, h("dt", null, "text"), h("dd", null, h("smoothly-display", { type: "text", value: "text" })), h("dt", null, "postal code"), h("dd", null, h("smoothly-display", { type: "postal-code", value: "752 31" })), h("dt", null, "password"), h("dd", null, h("smoothly-display", { type: "password", value: "password" })), h("dt", null, "email"), h("dd", null, h("smoothly-display", { type: "email", value: "test@example.com" })), h("dt", null, "price"), h("dd", null, h("smoothly-display", { type: "price", value: "13.37", currency: "SEK" })), h("dt", null, "display amount without decimals"), h("dd", null, h("smoothly-display-amount", { amount: 200, currency: "SEK", toInteger: true })), h("dt", null, "display amount with decimals if they are set, otherwise no decimal"), h("dd", null, h("smoothly-display-amount", { amount: 200.20, currency: "SEK", toInteger: true })), h("dt", null, "display amount with decimals"), h("dd", null, h("smoothly-display-amount", { amount: 200.20, currency: "SEK" })), h("dt", null, "percent"), h("dd", null, h("smoothly-display", { type: "percent", value: "42" })), h("dt", null, "phone"), h("dd", null, h("smoothly-display", { type: "phone", value: "0101881108" })), h("dt", null, "card number"), h("dd", null, h("smoothly-display", { type: "card-number", value: "4111111111111111" })), h("dt", null, "card expires"), h("dd", null, h("smoothly-display", { type: "card-expires", value: "7/22" })), h("dt", null, "card csc"), h("dd", null, h("smoothly-display", { type: "card-csc", value: "987" })), h("dt", null, "date"), h("dd", null, h("smoothly-display", { type: "date", value: "2022-07-07" })), h("dt", null, "date time"), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" }, value: "2022-07-07T02:02:02Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "2-digit", month: "long", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit" }, value: "2022-07-07T02:02:02Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "2-digit", day: "2-digit", hour: "numeric", minute: "numeric", second: "numeric" }, value: "2022-07-07T12:22:24Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "numeric", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" }, value: "2022-07-07T12:22:24Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "short", day: "numeric" }, value: "2022-07-07T00:00+02:00" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "2-digit", month: "numeric", day: "numeric" }, value: "2022-07-07T00:00+02:00" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "2-digit", month: "numeric", day: "numeric", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZone: "+01:00" }, value: "2022-07-07T12:15Z" })), h("dt", null, "Quiet"), h("dd", null, h("smoothly-quiet", { color: "dark" }, "-"))), h("smoothly-skeleton", { period: 3, distance: "20rem", width: "20rem" }), h("smoothly-skeleton", { period: 3, distance: "20rem", color: "200,200,255" }), h("smoothly-skeleton", { period: 3, distance: "20rem", color: "var(--smoothly-warning-color)" }), h("smoothly-skeleton", { period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem", width: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem", width: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), h("smoothly-urlencoded", { data: "hej=hopp&tjena=moss" }), h("div", { style: { display: "flex", justifyContent: "space-between" } }, h("smoothly-popup", { direction: "down" }, "Click for popup", h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup stuff that has a lot of text")), h("smoothly-popup", { direction: "down" }, "Click for popup", h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup with a bunch of text."))), h("p", null, "Test of diffrent kinds of notifier:"), h("button", { onClick: () => this.noticeWarning(Notice.warn("This is a test warning notice.")) }, "warning"), h("button", { onClick: () => this.noticeWarning(Notice.succeded("This is a test success notice.")) }, "success"), h("button", { onClick: () => this.noticeWarning(Notice.failed("This is a test danger notice.")) }, "danger"), h("button", { onClick: () => this.noticeWarning(Notice.execute("This is a test execute notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "execute"), h("button", { onClick: () => this.noticeWarning(Notice.delay("This is a test delay notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "delay")),
34336
34337
  ];
34337
34338
  }
34338
34339
  };
@@ -35295,8 +35296,10 @@ const SmoothlyMenuOptions$1 = class extends HTMLElement {
35295
35296
  this.__registerHost();
35296
35297
  this.__attachShadow();
35297
35298
  this.menuEmpty = createEvent(this, "menuEmpty", 7);
35299
+ this.optionElements = [];
35298
35300
  this.filteredOptions = [];
35299
35301
  this.highlightIndex = 0;
35302
+ this.toggle = false;
35300
35303
  this.emptyMenuLabel = "No Options";
35301
35304
  this.newOptionLabel = "Add:";
35302
35305
  this.order = false;
@@ -35304,7 +35307,7 @@ const SmoothlyMenuOptions$1 = class extends HTMLElement {
35304
35307
  this.resetHighlightOnOptionsChange = true;
35305
35308
  this.mutable = false;
35306
35309
  }
35307
- optionsChangeHandler(newOptions) {
35310
+ optionsChangeHandler() {
35308
35311
  this.highlightIndex = this.resetHighlightOnOptionsChange ? 0 : this.highlightIndex;
35309
35312
  }
35310
35313
  optionHoverHandler(event) {
@@ -35386,7 +35389,10 @@ const SmoothlyMenuOptions$1 = class extends HTMLElement {
35386
35389
  }
35387
35390
  }
35388
35391
  render() {
35389
- return (h(Host, { style: { "--max-menu-height": this.maxMenuHeight } }, this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index) => (h("smoothly-option", { style: this.optionStyle, ref: el => index == 0 && (this.firstOptionsElement = el !== null && el !== void 0 ? el : this.firstOptionsElement), value: option.value, name: option.name, divider: option.divider, "data-highlight": this.highlightIndex == index }, option.left ? h("div", { slot: "left" }, option.left) : undefined, option.right ? h("div", { slot: "right" }, option.right) : undefined)))) : this.mutable ? (h("smoothly-option", { style: this.optionStyle, ref: el => (this.firstOptionsElement = el !== null && el !== void 0 ? el : this.firstOptionsElement), value: this.keyword, name: this.keyword, "data-highlight": 0, new: true }, h("div", { slot: "left" }, h("smoothly-icon", { name: "square-outline", size: "small" }), " ", this.newOptionLabel))) : (h("div", null, this.emptyMenuLabel))));
35392
+ return (h(Host, { style: { "--max-menu-height": this.maxMenuHeight } }, this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index) => (h("smoothly-option", { style: this.optionStyle, toggle: this.toggle, ref: el => {
35393
+ index == 0 && (this.firstOptionsElement = el !== null && el !== void 0 ? el : this.firstOptionsElement);
35394
+ el && (this.optionElements[index] = el);
35395
+ }, checked: option.checked, value: option.value, name: option.name, divider: option.divider, "data-highlight": this.highlightIndex == index }, option.hint ? h("div", { slot: "hint" }, option.hint) : undefined)))) : this.mutable ? (h("smoothly-option", { style: this.optionStyle, value: this.keyword, name: this.keyword, "data-highlight": 0, new: true }, h("div", { slot: "left" }, h("smoothly-icon", { name: "square-outline", size: "small" }), " ", this.newOptionLabel))) : (h("div", null, this.emptyMenuLabel))));
35390
35396
  }
35391
35397
  get element() { return this; }
35392
35398
  static get watchers() { return {
@@ -35479,7 +35485,7 @@ const Notifier = class extends HTMLElement {
35479
35485
  static get style() { return styleCss$q; }
35480
35486
  };
35481
35487
 
35482
- const styleCss$p = ":host{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:0.7em 1em;margin-left:1px;margin-right:1px;background-color:transparent;position:relative}:host([data-highlight]){background-color:rgb(var(--smoothly-default-shade))}:host>div.middle{padding-left:0.5em;flex-shrink:1;width:100%}:host([divider]){margin-bottom:0.5em}::slotted([slot=right]){font-style:italic;white-space:nowrap}:host([divider])::after{position:absolute;height:1px;width:100%;left:0;bottom:-0.25em;content:\"\";background-color:rgba(var(--smoothly-dark-color))}::slotted([slot=left]){display:flex;align-items:center;gap:1ch}";
35488
+ const styleCss$p = ":host{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:0.7em 1em;margin-left:1px;margin-right:1px;background-color:transparent;position:relative}:host([data-highlight]){background-color:rgb(var(--smoothly-default-shade))}:host>div.name{padding-left:0.5em;flex-shrink:1;width:100%}:host([divider]){margin-bottom:0.5em}::slotted([slot=right]){font-style:italic;white-space:nowrap}:host([divider])::after{position:absolute;height:1px;width:100%;left:0;bottom:-0.25em;content:\"\";background-color:rgba(var(--smoothly-dark-color))}::slotted([slot=hint]){display:flex;align-items:center;gap:1ch;font-style:italic;white-space:nowrap}";
35483
35489
 
35484
35490
  const SmoothlyOption$1 = class extends HTMLElement {
35485
35491
  constructor() {
@@ -35488,23 +35494,30 @@ const SmoothlyOption$1 = class extends HTMLElement {
35488
35494
  this.__attachShadow();
35489
35495
  this.optionHover = createEvent(this, "optionHover", 7);
35490
35496
  this.optionSelect = createEvent(this, "optionSelect", 7);
35497
+ this.optionUnselect = createEvent(this, "optionUnselect", 7);
35491
35498
  this.optionAdd = createEvent(this, "optionAdd", 7);
35492
35499
  this.dataHighlight = false;
35493
35500
  this.divider = false;
35501
+ this.toggle = false;
35502
+ this.checked = false;
35494
35503
  }
35495
35504
  onHover(event) {
35496
35505
  this.optionHover.emit({ name: this.name, value: this.value });
35497
35506
  }
35498
35507
  onSelect(event) {
35499
- if (this.value)
35508
+ if (this.value) {
35500
35509
  this.new
35501
35510
  ? this.optionAdd.emit({ name: this.name, value: this.value })
35502
- : this.optionSelect.emit({ name: this.name, value: this.value });
35511
+ : !this.toggle || (this.toggle && !this.checked)
35512
+ ? this.optionSelect.emit({ name: this.name, value: this.value })
35513
+ : this.optionUnselect.emit({ name: this.name, value: this.value });
35514
+ this.toggle && (this.checked = !this.checked);
35515
+ }
35503
35516
  else
35504
35517
  throw `smoothly-option ${this.element.innerHTML} lacks value-property and can therefore not be selected`;
35505
35518
  }
35506
35519
  render() {
35507
- return (h(Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, h("slot", { name: "left" }), h("div", { class: "middle" }, this.name), h("slot", { name: "right" })));
35520
+ return (h(Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, this.toggle && h("smoothly-icon", { name: this.checked ? "checkbox" : "square-outline" }), h("div", { class: "name" }, this.name), h("smoothly-quiet", null, h("slot", { name: "hint" }))));
35508
35521
  }
35509
35522
  get element() { return this; }
35510
35523
  static get style() { return styleCss$p; }
@@ -35522,6 +35535,7 @@ const SmoothlyPicker$1 = class extends HTMLElement {
35522
35535
  this.keepFocusOnReRender = false;
35523
35536
  this.disabled = false;
35524
35537
  this.readonly = false;
35538
+ this.maxMenuHeight = "inherit";
35525
35539
  this.emptyMenuLabel = "No Options";
35526
35540
  this.multiple = false;
35527
35541
  this.mutable = false;
@@ -35658,17 +35672,14 @@ const SmoothlyPicker$1 = class extends HTMLElement {
35658
35672
  this.isOpen = false;
35659
35673
  this.filterOptions();
35660
35674
  }
35661
- getCheckHtml(checked) {
35662
- return checked ? (h("smoothly-icon", { name: "checkbox", size: "small" })) : (h("smoothly-icon", { name: "square-outline", size: "small" }));
35663
- }
35664
35675
  render() {
35665
- var _a, _b, _c, _d;
35676
+ var _a, _b, _c;
35666
35677
  const cssVariables = {
35667
35678
  "--max-height": (_a = this.maxHeight) !== null && _a !== void 0 ? _a : "inherit",
35668
35679
  "--label-display": this.labelSetting == "hide" ? "none" : "absolute",
35669
35680
  };
35670
35681
  (_b = this.options) === null || _b === void 0 ? void 0 : _b.forEach(o => {
35671
- o.left = this.getCheckHtml(this.selections.map(s => s.value).includes(o.value));
35682
+ o.checked = this.selections.map(s => s.value).includes(o.value);
35672
35683
  });
35673
35684
  const options = [
35674
35685
  ...(this.multiple
@@ -35676,16 +35687,16 @@ const SmoothlyPicker$1 = class extends HTMLElement {
35676
35687
  {
35677
35688
  value: "select-none",
35678
35689
  name: this.selections.length == this.options.length ? this.selectNoneName : this.selectAllName,
35679
- left: this.getCheckHtml(this.selections.length == ((_c = this.options) === null || _c === void 0 ? void 0 : _c.length)),
35690
+ checked: this.selections.length == this.options.length,
35680
35691
  divider: true,
35681
35692
  },
35682
35693
  ]
35683
35694
  : []),
35684
- ...((_d = this.options) !== null && _d !== void 0 ? _d : []),
35695
+ ...((_c = this.options) !== null && _c !== void 0 ? _c : []),
35685
35696
  ];
35686
35697
  return (h(Host, { style: cssVariables, "has-selection": this.selections.length > 0, "is-open": this.isOpen ? "" : undefined, onMouseDown: (e) => e.preventDefault(), onClick: () => this.onClick() }, h("div", null, h("smoothly-icon", { part: "search", class: "search", name: "search-outline", size: "tiny" }), h("label", { part: "label-element" }, this.label), h("input", { part: "input", disabled: this.disabled, readonly: this.readonly, type: "text", ref: (el) => (this.inputElement = el ? el : this.inputElement), onFocus: () => this.highlightDefault(), onBlur: () => this.onBlur(), placeholder: this.selections.length > 3
35687
35698
  ? this.selections.length.toString() + " " + this.selectionName
35688
- : this.selections.map(selection => selection.name).join(", "), onKeyDown: e => this.onKeyDown(e), onInput: (e) => this.onInput(e) }), h("smoothly-icon", { part: "chevron", class: "down", name: "chevron-down", size: "tiny" }), h("smoothly-icon", { part: "chevron", class: "up", name: "chevron-up", size: "tiny" })), h("smoothly-menu-options", { part: "menu-options", style: { width: "100%" }, optionStyle: Object.assign({}, this.optionStyle), order: false, emptyMenuLabel: this.emptyMenuLabel, newOptionLabel: this.newOptionLabel, "max-menu-height": this.maxMenuHeight, mutable: this.mutable, ref: (el) => (this.menuElement = el !== null && el !== void 0 ? el : this.menuElement), onClick: e => e.stopPropagation(), resetHighlightOnOptionsChange: false, options: options })));
35699
+ : this.selections.map(selection => selection.name).join(", "), onKeyDown: e => this.onKeyDown(e), onInput: (e) => this.onInput(e) }), h("smoothly-icon", { part: "chevron", class: "down", name: "chevron-down", size: "tiny" }), h("smoothly-icon", { part: "chevron", class: "up", name: "chevron-up", size: "tiny" })), h("smoothly-menu-options", { part: "menu-options", style: { width: "100%" }, toggle: true, optionStyle: Object.assign({}, this.optionStyle), order: false, emptyMenuLabel: this.emptyMenuLabel, newOptionLabel: this.newOptionLabel, "max-menu-height": this.maxMenuHeight, mutable: this.mutable, ref: (el) => (this.menuElement = el !== null && el !== void 0 ? el : this.menuElement), onClick: e => e.stopPropagation(), resetHighlightOnOptionsChange: false, options: options })));
35689
35700
  }
35690
35701
  get element() { return this; }
35691
35702
  static get watchers() { return {
@@ -35940,11 +35951,11 @@ const SmoothlySelectDemo$1 = class extends HTMLElement {
35940
35951
  } }),
35941
35952
  h("smoothly-selector", null, h("smoothly-item", { value: "1" }, "January"), h("smoothly-item", { value: "2" }, "February"), h("smoothly-item", { value: "3" }, "March"), h("smoothly-item", { value: "4" }, "April"), h("smoothly-item", { value: "5" }, "May"), h("smoothly-item", { value: "6" }, "June"), h("smoothly-item", { value: "7" }, "July"), h("smoothly-item", { value: "8" }, "August"), h("smoothly-item", { value: "9" }, "September"), h("smoothly-item", { value: "10" }, "October"), h("smoothly-item", { value: "11" }, "November"), h("smoothly-item", { value: "12" }, "December")),
35942
35953
  h("button", { onClick: () => this.alertf() }, "press here"),
35943
- h("smoothly-picker", { label: "Filter", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, options: [
35954
+ h("smoothly-picker", { label: "Filter", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", maxMenuHeight: "20rem", multiple: true, options: [
35944
35955
  { name: "Big Dog", value: "dog", aliases: ["WOFF"] },
35945
- { name: "Cat Stevens", value: "cat", aliases: ["moew"] },
35956
+ { name: "Cat Stevens", value: "cat", aliases: ["moew"], hint: "moew" },
35946
35957
  { name: "Noble Pig", value: "pig" },
35947
- { name: "Turtle Wax", value: "turtle" },
35958
+ { name: "Turtle Wax", value: "turtle", hint: "slow" },
35948
35959
  { name: "Spider Man", value: "spider" },
35949
35960
  { name: "Phoenix Order Long Wooord", value: "phoenix" },
35950
35961
  { name: "Horse Back", value: "horse" },
@@ -35976,7 +35987,7 @@ const SmoothlySelectDemo$1 = class extends HTMLElement {
35976
35987
  ], valueValidator: (email) => email.match(/^\w+@\w+/) ? [true, undefined] : [false, Notice.failed("Incorrectly formatted email")] }),
35977
35988
  h("br", null),
35978
35989
  h("smoothly-picker", { label: "Single select", multiple: false, "max-menu-height": "200px", options: [
35979
- { name: "Dog", value: "dog", aliases: ["WOFF"], right: "Woof 🐶" },
35990
+ { name: "Dog", value: "dog", aliases: ["WOFF"], hint: "Woof 🐶" },
35980
35991
  { name: "Cat", value: "cat", aliases: ["moew"] },
35981
35992
  { name: "Pig", value: "pig" },
35982
35993
  { name: "Turtle", value: "turtle" },
@@ -36579,7 +36590,7 @@ const SmoothlyCheckbox = /*@__PURE__*/proxyCustomElement(SmoothlyCheckbox$1, [2,
36579
36590
  const SmoothlyDialog = /*@__PURE__*/proxyCustomElement(SmoothlyDialog$1, [6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]]);
36580
36591
  const SmoothlyDialogDemo = /*@__PURE__*/proxyCustomElement(SmoothlyDialogDemo$1, [0,"smoothly-dialog-demo"]);
36581
36592
  const SmoothlyDisplay = /*@__PURE__*/proxyCustomElement(SmoothlyDisplay$1, [2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1],"format":[16]}]);
36582
- const SmoothlyDisplayAmount = /*@__PURE__*/proxyCustomElement(SmoothlyDisplayAmount$1, [2,"smoothly-display-amount",{"amount":[8],"currency":[1]}]);
36593
+ const SmoothlyDisplayAmount = /*@__PURE__*/proxyCustomElement(SmoothlyDisplayAmount$1, [2,"smoothly-display-amount",{"amount":[8],"currency":[1],"toInteger":[4,"to-integer"]}]);
36583
36594
  const SmoothlyDisplayDateTime = /*@__PURE__*/proxyCustomElement(SmoothlyDisplayDateTime$1, [2,"smoothly-display-date-time",{"datetime":[1]}]);
36584
36595
  const SmoothlyDisplayDemo = /*@__PURE__*/proxyCustomElement(SmoothlyDisplayDemo$1, [0,"smoothly-display-demo"]);
36585
36596
  const SmoothlyFrame = /*@__PURE__*/proxyCustomElement(SmoothlyFrame$1, [2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1]}]);
@@ -36592,11 +36603,11 @@ const SmoothlyInputDateRange = /*@__PURE__*/proxyCustomElement(InputDateRange, [
36592
36603
  const SmoothlyInputDemo = /*@__PURE__*/proxyCustomElement(SmoothlyInputDemo$1, [0,"smoothly-input-demo"]);
36593
36604
  const SmoothlyInputMonth = /*@__PURE__*/proxyCustomElement(MonthSelector, [2,"smoothly-input-month",{"value":[1025]}]);
36594
36605
  const SmoothlyItem = /*@__PURE__*/proxyCustomElement(Item, [6,"smoothly-item",{"value":[8],"selected":[1540]},[[0,"click","onClick"]]]);
36595
- const SmoothlyMenuOptions = /*@__PURE__*/proxyCustomElement(SmoothlyMenuOptions$1, [1,"smoothly-menu-options",{"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]},[[0,"optionHover","optionHoverHandler"]]]);
36606
+ const SmoothlyMenuOptions = /*@__PURE__*/proxyCustomElement(SmoothlyMenuOptions$1, [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]},[[0,"optionHover","optionHoverHandler"]]]);
36596
36607
  const SmoothlyNotification = /*@__PURE__*/proxyCustomElement(Notification, [2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]]);
36597
36608
  const SmoothlyNotifier = /*@__PURE__*/proxyCustomElement(Notifier, [6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]]);
36598
- const SmoothlyOption = /*@__PURE__*/proxyCustomElement(SmoothlyOption$1, [1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537],"divider":[1540],"new":[4]}]);
36599
- const SmoothlyPicker = /*@__PURE__*/proxyCustomElement(SmoothlyPicker$1, [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":[16],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"selectAllName":[1025,"select-all-name"],"selectionName":[1025,"selection-name"],"newOptionLabel":[1025,"new-option-label"],"valueValidator":[16],"isOpen":[32],"empty":[32]},[[0,"optionSelect","optionSelectHandler"],[0,"optionAdd","optionAddHandler"],[0,"menuEmpty","emptyHandler"]]]);
36609
+ const SmoothlyOption = /*@__PURE__*/proxyCustomElement(SmoothlyOption$1, [1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537],"divider":[1540],"checkbox":[4],"new":[4],"toggle":[4],"checked":[1028]}]);
36610
+ const SmoothlyPicker = /*@__PURE__*/proxyCustomElement(SmoothlyPicker$1, [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"],"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"]]]);
36600
36611
  const SmoothlyPopup = /*@__PURE__*/proxyCustomElement(SmoothlyPopup$1, [6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}]);
36601
36612
  const SmoothlyQuiet = /*@__PURE__*/proxyCustomElement(SmoothlyQuiet$1, [6,"smoothly-quiet",{"color":[1]}]);
36602
36613
  const SmoothlyRadio = /*@__PURE__*/proxyCustomElement(SmoothlyRadio$1, [6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}]);
@@ -36606,7 +36617,7 @@ const SmoothlyRoom = /*@__PURE__*/proxyCustomElement(SmoothlyRoom$1, [4,"smoothl
36606
36617
  const SmoothlySelect = /*@__PURE__*/proxyCustomElement(SmoothlySelect$1, [6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}]);
36607
36618
  const SmoothlySelectDemo = /*@__PURE__*/proxyCustomElement(SmoothlySelectDemo$1, [2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]]);
36608
36619
  const SmoothlySelector = /*@__PURE__*/proxyCustomElement(Selector, [6,"smoothly-selector",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]]);
36609
- const SmoothlySkeleton = /*@__PURE__*/proxyCustomElement(SmoothlySkeleton$1, [2,"smoothly-skeleton",{"widths":[16],"width":[1],"color":[1],"period":[2],"distance":[1],"align":[513]}]);
36620
+ const SmoothlySkeleton = /*@__PURE__*/proxyCustomElement(SmoothlySkeleton$1, [2,"smoothly-skeleton",{"widths":[16],"width":[1025],"color":[1],"period":[2],"distance":[1],"align":[513]}]);
36610
36621
  const SmoothlySpinner = /*@__PURE__*/proxyCustomElement(SmoothlySpinner$1, [2,"smoothly-spinner",{"active":[516],"size":[513]}]);
36611
36622
  const SmoothlySubmit = /*@__PURE__*/proxyCustomElement(SmoothlySubmit$1, [6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4]},[[0,"click","handleSubmit"]]]);
36612
36623
  const SmoothlySvg = /*@__PURE__*/proxyCustomElement(SmoothlySvg$1, [2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}]);
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["smoothly-google-font",[[2,"smoothly-google-font",{"value":[1]}]]],["smoothly-radio-group",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["smoothly-reorder",[[0,"smoothly-reorder"]]],["smoothly-svg",[[2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}]]],["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_50",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}],[0,"smoothly-input-demo"],[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]],[2,"smoothly-table-demo"],[0,"smoothly-display-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],"showLabel":[516,"show-label"]},[[0,"startChanged","onStartChanged"],[0,"endChanged","onEndChanged"],[0,"dateRangeSet","onDateRangeSet"]]],[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[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":[16],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"selectAllName":[1025,"select-all-name"],"selectionName":[1025,"selection-name"],"newOptionLabel":[1025,"new-option-label"],"valueValidator":[16],"isOpen":[32],"empty":[32]},[[0,"optionSelect","optionSelectHandler"],[0,"optionAdd","optionAddHandler"],[0,"menuEmpty","emptyHandler"]]],[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-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]],[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540]},[[0,"click","onClick"]]],[6,"smoothly-table-expandable-row",{"align":[1],"open":[1540]},[[0,"click","onClick"]]],[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]}],[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}],[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}],[6,"smoothly-quiet",{"color":[1]}],[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}],[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}],[2,"smoothly-skeleton",{"widths":[16],"width":[1],"color":[1],"period":[2],"distance":[1],"align":[513]}],[6,"smoothly-table",null,[[0,"expansionLoad","handleEvents"],[0,"expansionOpen","handleEvents"]]],[6,"smoothly-table-cell"],[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]},[[0,"dateSet","dateSetHandler"]]],[1,"smoothly-menu-options",{"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"]]],[2,"smoothly-display-date-time",{"datetime":[1]}],[2,"smoothly-spinner",{"active":[516],"size":[513]}],[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],"new":[4]}],[2,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"doubleInput":[516,"double-input"],"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-selector",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]],[6,"smoothly-item",{"value":[8],"selected":[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);
13
+ return bootstrapLazy([["smoothly-google-font",[[2,"smoothly-google-font",{"value":[1]}]]],["smoothly-radio-group",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["smoothly-reorder",[[0,"smoothly-reorder"]]],["smoothly-svg",[[2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}]]],["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_50",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}],[0,"smoothly-input-demo"],[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]],[2,"smoothly-table-demo"],[0,"smoothly-display-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],"showLabel":[516,"show-label"]},[[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"],"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-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]],[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540]},[[0,"click","onClick"]]],[6,"smoothly-table-expandable-row",{"align":[1],"open":[1540]},[[0,"click","onClick"]]],[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-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-select",{"identifier":[1],"background":[513],"value":[1025]}],[2,"smoothly-skeleton",{"widths":[16],"width":[1025],"color":[1],"period":[2],"distance":[1],"align":[513]}],[6,"smoothly-table",null,[[0,"expansionLoad","handleEvents"],[0,"expansionOpen","handleEvents"]]],[6,"smoothly-table-cell"],[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]},[[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"]]],[2,"smoothly-display-amount",{"amount":[8],"currency":[1],"toInteger":[4,"to-integer"]}],[2,"smoothly-display-date-time",{"datetime":[1]}],[2,"smoothly-spinner",{"active":[516],"size":[513]}],[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-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"doubleInput":[516,"double-input"],"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",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]],[6,"smoothly-item",{"value":[8],"selected":[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
14
  });
15
15
  };
16
16
 
@@ -121,16 +121,16 @@ const SmoothlyAppDemo = class {
121
121
  redirect("https://google.com");
122
122
  } }, "External")), h("smoothly-room", { path: /^\/routing\/\w+\/?/, label: "No effect" }, h("h2", null, "Regex routing")), h("smoothly-room", { path: "old", label: "Old", to: "select" }), h("span", { slot: "header", style: { width: "100%", maxWidth: "500px" } }, h("smoothly-picker", { label: "All Animals Selected", style: { minWidth: "100px" }, labelSetting: "hide", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, "select-none-name": "Select All", options: [
123
123
  { name: "Big Dog", value: "dog", aliases: ["WOFF"] },
124
- { name: "Cat Stevens", value: "cat", aliases: ["moew"], right: "🐈" },
125
- { name: "Noble Pig", value: "pig", right: "🐷" },
126
- { name: "Turtle Wax", value: "turtle", right: "" },
127
- { name: "Spider Man", value: "spider", right: "" },
128
- { name: "Phoenix Order Long Wooord", value: "phoenix", right: "" },
129
- { name: "Horse Back", value: "horse", right: "" },
130
- { name: "Unicorn Horn", value: "unicorn", right: "" },
131
- { name: "Talking Parrot Parrot", value: "parrot", right: "" },
132
- { name: "Hidden Dragon", value: "dragon", right: "" },
133
- { name: "Scary Kraken", value: "kraken", right: "" },
124
+ { name: "Cat Stevens", value: "cat", aliases: ["moew"], hint: "moew 🐈" },
125
+ { name: "Noble Pig", value: "pig", hint: "🐷" },
126
+ { name: "Turtle Wax", value: "turtle" },
127
+ { name: "Spider Man", value: "spider" },
128
+ { name: "Phoenix Order Long Wooord", value: "phoenix" },
129
+ { name: "Horse Back", value: "horse" },
130
+ { name: "Unicorn Horn", value: "unicorn" },
131
+ { name: "Talking Parrot Parrot", value: "parrot" },
132
+ { name: "Hidden Dragon", value: "dragon" },
133
+ { name: "Scary Kraken", value: "kraken" },
134
134
  ] })), h("smoothly-trigger", { slot: "header", type: "link", name: "logout" }, h("smoothly-icon", { toolTip: "Log out", name: "log-out", size: "medium" }))));
135
135
  }
136
136
  };
@@ -32655,6 +32655,7 @@ const styleCss$x = ".sc-smoothly-display-amount-h{display:block}[hidden].sc-smoo
32655
32655
  const SmoothlyDisplayAmount = class {
32656
32656
  constructor(hostRef) {
32657
32657
  registerInstance(this, hostRef);
32658
+ this.toInteger = false;
32658
32659
  }
32659
32660
  format(amount) {
32660
32661
  const digitsPerGroup = 3;
@@ -32675,7 +32676,7 @@ const SmoothlyDisplayAmount = class {
32675
32676
  result = result.padEnd(separator + maxDecimals + 1, "0");
32676
32677
  result = result.substring(0, separator + maxDecimals + 1);
32677
32678
  }
32678
- else {
32679
+ else if (!this.toInteger) {
32679
32680
  result = result + ".";
32680
32681
  separator = result.length - 1;
32681
32682
  result = result.padEnd(separator + maxDecimals + 1, "0");
@@ -32727,7 +32728,7 @@ const SmoothlyDisplayDemo = class {
32727
32728
  }
32728
32729
  render() {
32729
32730
  return [
32730
- h("main", null, h("smoothly-popup", null, h("div", null, "Popup, click me"), h("div", { color: "dark", slot: "popup" }, "1 line popup")), h("smoothly-display-date-time", { datetime: "2019-08-15T08:08:17.65Z" }), h("dl", null, h("dt", null, "text"), h("dd", null, h("smoothly-display", { type: "text", value: "text" })), h("dt", null, "postal code"), h("dd", null, h("smoothly-display", { type: "postal-code", value: "752 31" })), h("dt", null, "password"), h("dd", null, h("smoothly-display", { type: "password", value: "password" })), h("dt", null, "email"), h("dd", null, h("smoothly-display", { type: "email", value: "test@example.com" })), h("dt", null, "price"), h("dd", null, h("smoothly-display", { type: "price", value: "13.37", currency: "SEK" })), h("dt", null, "percent"), h("dd", null, h("smoothly-display", { type: "percent", value: "42" })), h("dt", null, "phone"), h("dd", null, h("smoothly-display", { type: "phone", value: "0101881108" })), h("dt", null, "card number"), h("dd", null, h("smoothly-display", { type: "card-number", value: "4111111111111111" })), h("dt", null, "card expires"), h("dd", null, h("smoothly-display", { type: "card-expires", value: "7/22" })), h("dt", null, "card csc"), h("dd", null, h("smoothly-display", { type: "card-csc", value: "987" })), h("dt", null, "date"), h("dd", null, h("smoothly-display", { type: "date", value: "2022-07-07" })), h("dt", null, "date time"), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" }, value: "2022-07-07T02:02:02Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "2-digit", month: "long", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit" }, value: "2022-07-07T02:02:02Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "2-digit", day: "2-digit", hour: "numeric", minute: "numeric", second: "numeric" }, value: "2022-07-07T12:22:24Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "numeric", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" }, value: "2022-07-07T12:22:24Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "short", day: "numeric" }, value: "2022-07-07T00:00+02:00" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "2-digit", month: "numeric", day: "numeric" }, value: "2022-07-07T00:00+02:00" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "2-digit", month: "numeric", day: "numeric", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZone: "+01:00" }, value: "2022-07-07T12:15Z" })), h("dt", null, "Quiet"), h("dd", null, h("smoothly-quiet", { color: "dark" }, "-"))), h("smoothly-skeleton", { period: 3, distance: "20rem", width: "20rem" }), h("smoothly-skeleton", { period: 3, distance: "20rem", color: "200,200,255" }), h("smoothly-skeleton", { period: 3, distance: "20rem", color: "var(--smoothly-warning-color)" }), h("smoothly-skeleton", { period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem", width: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem", width: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), h("smoothly-urlencoded", { data: "hej=hopp&tjena=moss" }), h("div", { style: { display: "flex", justifyContent: "space-between" } }, h("smoothly-popup", { direction: "down" }, "Click for popup", h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup stuff that has a lot of text")), h("smoothly-popup", { direction: "down" }, "Click for popup", h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup with a bunch of text."))), h("p", null, "Test of diffrent kinds of notifier:"), h("button", { onClick: () => this.noticeWarning(Notice.warn("This is a test warning notice.")) }, "warning"), h("button", { onClick: () => this.noticeWarning(Notice.succeded("This is a test success notice.")) }, "success"), h("button", { onClick: () => this.noticeWarning(Notice.failed("This is a test danger notice.")) }, "danger"), h("button", { onClick: () => this.noticeWarning(Notice.execute("This is a test execute notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "execute"), h("button", { onClick: () => this.noticeWarning(Notice.delay("This is a test delay notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "delay")),
32731
+ h("main", null, h("smoothly-popup", null, h("div", null, "Popup, click me"), h("div", { color: "dark", slot: "popup" }, "1 line popup")), h("smoothly-display-date-time", { datetime: "2019-08-15T08:08:17.65Z" }), h("dl", null, h("dt", null, "text"), h("dd", null, h("smoothly-display", { type: "text", value: "text" })), h("dt", null, "postal code"), h("dd", null, h("smoothly-display", { type: "postal-code", value: "752 31" })), h("dt", null, "password"), h("dd", null, h("smoothly-display", { type: "password", value: "password" })), h("dt", null, "email"), h("dd", null, h("smoothly-display", { type: "email", value: "test@example.com" })), h("dt", null, "price"), h("dd", null, h("smoothly-display", { type: "price", value: "13.37", currency: "SEK" })), h("dt", null, "display amount without decimals"), h("dd", null, h("smoothly-display-amount", { amount: 200, currency: "SEK", toInteger: true })), h("dt", null, "display amount with decimals if they are set, otherwise no decimal"), h("dd", null, h("smoothly-display-amount", { amount: 200.20, currency: "SEK", toInteger: true })), h("dt", null, "display amount with decimals"), h("dd", null, h("smoothly-display-amount", { amount: 200.20, currency: "SEK" })), h("dt", null, "percent"), h("dd", null, h("smoothly-display", { type: "percent", value: "42" })), h("dt", null, "phone"), h("dd", null, h("smoothly-display", { type: "phone", value: "0101881108" })), h("dt", null, "card number"), h("dd", null, h("smoothly-display", { type: "card-number", value: "4111111111111111" })), h("dt", null, "card expires"), h("dd", null, h("smoothly-display", { type: "card-expires", value: "7/22" })), h("dt", null, "card csc"), h("dd", null, h("smoothly-display", { type: "card-csc", value: "987" })), h("dt", null, "date"), h("dd", null, h("smoothly-display", { type: "date", value: "2022-07-07" })), h("dt", null, "date time"), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" }, value: "2022-07-07T02:02:02Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "2-digit", month: "long", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit" }, value: "2022-07-07T02:02:02Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "2-digit", day: "2-digit", hour: "numeric", minute: "numeric", second: "numeric" }, value: "2022-07-07T12:22:24Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "numeric", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" }, value: "2022-07-07T12:22:24Z" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "numeric", month: "short", day: "numeric" }, value: "2022-07-07T00:00+02:00" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "2-digit", month: "numeric", day: "numeric" }, value: "2022-07-07T00:00+02:00" })), h("dd", null, h("smoothly-display", { type: "date-time", format: { year: "2-digit", month: "numeric", day: "numeric", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZone: "+01:00" }, value: "2022-07-07T12:15Z" })), h("dt", null, "Quiet"), h("dd", null, h("smoothly-quiet", { color: "dark" }, "-"))), h("smoothly-skeleton", { period: 3, distance: "20rem", width: "20rem" }), h("smoothly-skeleton", { period: 3, distance: "20rem", color: "200,200,255" }), h("smoothly-skeleton", { period: 3, distance: "20rem", color: "var(--smoothly-warning-color)" }), h("smoothly-skeleton", { period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem", width: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem", width: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), h("smoothly-urlencoded", { data: "hej=hopp&tjena=moss" }), h("div", { style: { display: "flex", justifyContent: "space-between" } }, h("smoothly-popup", { direction: "down" }, "Click for popup", h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup stuff that has a lot of text")), h("smoothly-popup", { direction: "down" }, "Click for popup", h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup with a bunch of text."))), h("p", null, "Test of diffrent kinds of notifier:"), h("button", { onClick: () => this.noticeWarning(Notice.warn("This is a test warning notice.")) }, "warning"), h("button", { onClick: () => this.noticeWarning(Notice.succeded("This is a test success notice.")) }, "success"), h("button", { onClick: () => this.noticeWarning(Notice.failed("This is a test danger notice.")) }, "danger"), h("button", { onClick: () => this.noticeWarning(Notice.execute("This is a test execute notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "execute"), h("button", { onClick: () => this.noticeWarning(Notice.delay("This is a test delay notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "delay")),
32731
32732
  ];
32732
32733
  }
32733
32734
  };
@@ -33669,8 +33670,10 @@ const SmoothlyMenuOptions = class {
33669
33670
  constructor(hostRef) {
33670
33671
  registerInstance(this, hostRef);
33671
33672
  this.menuEmpty = createEvent(this, "menuEmpty", 7);
33673
+ this.optionElements = [];
33672
33674
  this.filteredOptions = [];
33673
33675
  this.highlightIndex = 0;
33676
+ this.toggle = false;
33674
33677
  this.emptyMenuLabel = "No Options";
33675
33678
  this.newOptionLabel = "Add:";
33676
33679
  this.order = false;
@@ -33678,7 +33681,7 @@ const SmoothlyMenuOptions = class {
33678
33681
  this.resetHighlightOnOptionsChange = true;
33679
33682
  this.mutable = false;
33680
33683
  }
33681
- optionsChangeHandler(newOptions) {
33684
+ optionsChangeHandler() {
33682
33685
  this.highlightIndex = this.resetHighlightOnOptionsChange ? 0 : this.highlightIndex;
33683
33686
  }
33684
33687
  optionHoverHandler(event) {
@@ -33760,7 +33763,10 @@ const SmoothlyMenuOptions = class {
33760
33763
  }
33761
33764
  }
33762
33765
  render() {
33763
- return (h(Host, { style: { "--max-menu-height": this.maxMenuHeight } }, this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index) => (h("smoothly-option", { style: this.optionStyle, ref: el => index == 0 && (this.firstOptionsElement = el !== null && el !== void 0 ? el : this.firstOptionsElement), value: option.value, name: option.name, divider: option.divider, "data-highlight": this.highlightIndex == index }, option.left ? h("div", { slot: "left" }, option.left) : undefined, option.right ? h("div", { slot: "right" }, option.right) : undefined)))) : this.mutable ? (h("smoothly-option", { style: this.optionStyle, ref: el => (this.firstOptionsElement = el !== null && el !== void 0 ? el : this.firstOptionsElement), value: this.keyword, name: this.keyword, "data-highlight": 0, new: true }, h("div", { slot: "left" }, h("smoothly-icon", { name: "square-outline", size: "small" }), " ", this.newOptionLabel))) : (h("div", null, this.emptyMenuLabel))));
33766
+ return (h(Host, { style: { "--max-menu-height": this.maxMenuHeight } }, this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index) => (h("smoothly-option", { style: this.optionStyle, toggle: this.toggle, ref: el => {
33767
+ index == 0 && (this.firstOptionsElement = el !== null && el !== void 0 ? el : this.firstOptionsElement);
33768
+ el && (this.optionElements[index] = el);
33769
+ }, checked: option.checked, value: option.value, name: option.name, divider: option.divider, "data-highlight": this.highlightIndex == index }, option.hint ? h("div", { slot: "hint" }, option.hint) : undefined)))) : this.mutable ? (h("smoothly-option", { style: this.optionStyle, value: this.keyword, name: this.keyword, "data-highlight": 0, new: true }, h("div", { slot: "left" }, h("smoothly-icon", { name: "square-outline", size: "small" }), " ", this.newOptionLabel))) : (h("div", null, this.emptyMenuLabel))));
33764
33770
  }
33765
33771
  get element() { return getElement(this); }
33766
33772
  static get watchers() { return {
@@ -33851,30 +33857,37 @@ const Notifier = class {
33851
33857
  };
33852
33858
  Notifier.style = styleCss$l;
33853
33859
 
33854
- const styleCss$k = ":host{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:0.7em 1em;margin-left:1px;margin-right:1px;background-color:transparent;position:relative}:host([data-highlight]){background-color:rgb(var(--smoothly-default-shade))}:host>div.middle{padding-left:0.5em;flex-shrink:1;width:100%}:host([divider]){margin-bottom:0.5em}::slotted([slot=right]){font-style:italic;white-space:nowrap}:host([divider])::after{position:absolute;height:1px;width:100%;left:0;bottom:-0.25em;content:\"\";background-color:rgba(var(--smoothly-dark-color))}::slotted([slot=left]){display:flex;align-items:center;gap:1ch}";
33860
+ const styleCss$k = ":host{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:0.7em 1em;margin-left:1px;margin-right:1px;background-color:transparent;position:relative}:host([data-highlight]){background-color:rgb(var(--smoothly-default-shade))}:host>div.name{padding-left:0.5em;flex-shrink:1;width:100%}:host([divider]){margin-bottom:0.5em}::slotted([slot=right]){font-style:italic;white-space:nowrap}:host([divider])::after{position:absolute;height:1px;width:100%;left:0;bottom:-0.25em;content:\"\";background-color:rgba(var(--smoothly-dark-color))}::slotted([slot=hint]){display:flex;align-items:center;gap:1ch;font-style:italic;white-space:nowrap}";
33855
33861
 
33856
33862
  const SmoothlyOption = class {
33857
33863
  constructor(hostRef) {
33858
33864
  registerInstance(this, hostRef);
33859
33865
  this.optionHover = createEvent(this, "optionHover", 7);
33860
33866
  this.optionSelect = createEvent(this, "optionSelect", 7);
33867
+ this.optionUnselect = createEvent(this, "optionUnselect", 7);
33861
33868
  this.optionAdd = createEvent(this, "optionAdd", 7);
33862
33869
  this.dataHighlight = false;
33863
33870
  this.divider = false;
33871
+ this.toggle = false;
33872
+ this.checked = false;
33864
33873
  }
33865
33874
  onHover(event) {
33866
33875
  this.optionHover.emit({ name: this.name, value: this.value });
33867
33876
  }
33868
33877
  onSelect(event) {
33869
- if (this.value)
33878
+ if (this.value) {
33870
33879
  this.new
33871
33880
  ? this.optionAdd.emit({ name: this.name, value: this.value })
33872
- : this.optionSelect.emit({ name: this.name, value: this.value });
33881
+ : !this.toggle || (this.toggle && !this.checked)
33882
+ ? this.optionSelect.emit({ name: this.name, value: this.value })
33883
+ : this.optionUnselect.emit({ name: this.name, value: this.value });
33884
+ this.toggle && (this.checked = !this.checked);
33885
+ }
33873
33886
  else
33874
33887
  throw `smoothly-option ${this.element.innerHTML} lacks value-property and can therefore not be selected`;
33875
33888
  }
33876
33889
  render() {
33877
- return (h(Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, h("slot", { name: "left" }), h("div", { class: "middle" }, this.name), h("slot", { name: "right" })));
33890
+ return (h(Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, this.toggle && h("smoothly-icon", { name: this.checked ? "checkbox" : "square-outline" }), h("div", { class: "name" }, this.name), h("smoothly-quiet", null, h("slot", { name: "hint" }))));
33878
33891
  }
33879
33892
  get element() { return getElement(this); }
33880
33893
  };
@@ -33890,6 +33903,7 @@ const SmoothlyPicker = class {
33890
33903
  this.keepFocusOnReRender = false;
33891
33904
  this.disabled = false;
33892
33905
  this.readonly = false;
33906
+ this.maxMenuHeight = "inherit";
33893
33907
  this.emptyMenuLabel = "No Options";
33894
33908
  this.multiple = false;
33895
33909
  this.mutable = false;
@@ -34026,17 +34040,14 @@ const SmoothlyPicker = class {
34026
34040
  this.isOpen = false;
34027
34041
  this.filterOptions();
34028
34042
  }
34029
- getCheckHtml(checked) {
34030
- return checked ? (h("smoothly-icon", { name: "checkbox", size: "small" })) : (h("smoothly-icon", { name: "square-outline", size: "small" }));
34031
- }
34032
34043
  render() {
34033
- var _a, _b, _c, _d;
34044
+ var _a, _b, _c;
34034
34045
  const cssVariables = {
34035
34046
  "--max-height": (_a = this.maxHeight) !== null && _a !== void 0 ? _a : "inherit",
34036
34047
  "--label-display": this.labelSetting == "hide" ? "none" : "absolute",
34037
34048
  };
34038
34049
  (_b = this.options) === null || _b === void 0 ? void 0 : _b.forEach(o => {
34039
- o.left = this.getCheckHtml(this.selections.map(s => s.value).includes(o.value));
34050
+ o.checked = this.selections.map(s => s.value).includes(o.value);
34040
34051
  });
34041
34052
  const options = [
34042
34053
  ...(this.multiple
@@ -34044,16 +34055,16 @@ const SmoothlyPicker = class {
34044
34055
  {
34045
34056
  value: "select-none",
34046
34057
  name: this.selections.length == this.options.length ? this.selectNoneName : this.selectAllName,
34047
- left: this.getCheckHtml(this.selections.length == ((_c = this.options) === null || _c === void 0 ? void 0 : _c.length)),
34058
+ checked: this.selections.length == this.options.length,
34048
34059
  divider: true,
34049
34060
  },
34050
34061
  ]
34051
34062
  : []),
34052
- ...((_d = this.options) !== null && _d !== void 0 ? _d : []),
34063
+ ...((_c = this.options) !== null && _c !== void 0 ? _c : []),
34053
34064
  ];
34054
34065
  return (h(Host, { style: cssVariables, "has-selection": this.selections.length > 0, "is-open": this.isOpen ? "" : undefined, onMouseDown: (e) => e.preventDefault(), onClick: () => this.onClick() }, h("div", null, h("smoothly-icon", { part: "search", class: "search", name: "search-outline", size: "tiny" }), h("label", { part: "label-element" }, this.label), h("input", { part: "input", disabled: this.disabled, readonly: this.readonly, type: "text", ref: (el) => (this.inputElement = el ? el : this.inputElement), onFocus: () => this.highlightDefault(), onBlur: () => this.onBlur(), placeholder: this.selections.length > 3
34055
34066
  ? this.selections.length.toString() + " " + this.selectionName
34056
- : this.selections.map(selection => selection.name).join(", "), onKeyDown: e => this.onKeyDown(e), onInput: (e) => this.onInput(e) }), h("smoothly-icon", { part: "chevron", class: "down", name: "chevron-down", size: "tiny" }), h("smoothly-icon", { part: "chevron", class: "up", name: "chevron-up", size: "tiny" })), h("smoothly-menu-options", { part: "menu-options", style: { width: "100%" }, optionStyle: Object.assign({}, this.optionStyle), order: false, emptyMenuLabel: this.emptyMenuLabel, newOptionLabel: this.newOptionLabel, "max-menu-height": this.maxMenuHeight, mutable: this.mutable, ref: (el) => (this.menuElement = el !== null && el !== void 0 ? el : this.menuElement), onClick: e => e.stopPropagation(), resetHighlightOnOptionsChange: false, options: options })));
34067
+ : this.selections.map(selection => selection.name).join(", "), onKeyDown: e => this.onKeyDown(e), onInput: (e) => this.onInput(e) }), h("smoothly-icon", { part: "chevron", class: "down", name: "chevron-down", size: "tiny" }), h("smoothly-icon", { part: "chevron", class: "up", name: "chevron-up", size: "tiny" })), h("smoothly-menu-options", { part: "menu-options", style: { width: "100%" }, toggle: true, optionStyle: Object.assign({}, this.optionStyle), order: false, emptyMenuLabel: this.emptyMenuLabel, newOptionLabel: this.newOptionLabel, "max-menu-height": this.maxMenuHeight, mutable: this.mutable, ref: (el) => (this.menuElement = el !== null && el !== void 0 ? el : this.menuElement), onClick: e => e.stopPropagation(), resetHighlightOnOptionsChange: false, options: options })));
34057
34068
  }
34058
34069
  get element() { return getElement(this); }
34059
34070
  static get watchers() { return {
@@ -34191,11 +34202,11 @@ const SmoothlySelectDemo = class {
34191
34202
  } }),
34192
34203
  h("smoothly-selector", null, h("smoothly-item", { value: "1" }, "January"), h("smoothly-item", { value: "2" }, "February"), h("smoothly-item", { value: "3" }, "March"), h("smoothly-item", { value: "4" }, "April"), h("smoothly-item", { value: "5" }, "May"), h("smoothly-item", { value: "6" }, "June"), h("smoothly-item", { value: "7" }, "July"), h("smoothly-item", { value: "8" }, "August"), h("smoothly-item", { value: "9" }, "September"), h("smoothly-item", { value: "10" }, "October"), h("smoothly-item", { value: "11" }, "November"), h("smoothly-item", { value: "12" }, "December")),
34193
34204
  h("button", { onClick: () => this.alertf() }, "press here"),
34194
- h("smoothly-picker", { label: "Filter", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, options: [
34205
+ h("smoothly-picker", { label: "Filter", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", maxMenuHeight: "20rem", multiple: true, options: [
34195
34206
  { name: "Big Dog", value: "dog", aliases: ["WOFF"] },
34196
- { name: "Cat Stevens", value: "cat", aliases: ["moew"] },
34207
+ { name: "Cat Stevens", value: "cat", aliases: ["moew"], hint: "moew" },
34197
34208
  { name: "Noble Pig", value: "pig" },
34198
- { name: "Turtle Wax", value: "turtle" },
34209
+ { name: "Turtle Wax", value: "turtle", hint: "slow" },
34199
34210
  { name: "Spider Man", value: "spider" },
34200
34211
  { name: "Phoenix Order Long Wooord", value: "phoenix" },
34201
34212
  { name: "Horse Back", value: "horse" },
@@ -34227,7 +34238,7 @@ const SmoothlySelectDemo = class {
34227
34238
  ], valueValidator: (email) => email.match(/^\w+@\w+/) ? [true, undefined] : [false, Notice.failed("Incorrectly formatted email")] }),
34228
34239
  h("br", null),
34229
34240
  h("smoothly-picker", { label: "Single select", multiple: false, "max-menu-height": "200px", options: [
34230
- { name: "Dog", value: "dog", aliases: ["WOFF"], right: "Woof 🐶" },
34241
+ { name: "Dog", value: "dog", aliases: ["WOFF"], hint: "Woof 🐶" },
34231
34242
  { name: "Cat", value: "cat", aliases: ["moew"] },
34232
34243
  { name: "Pig", value: "pig" },
34233
34244
  { name: "Turtle", value: "turtle" },