smoothly 0.1.104 → 0.1.105

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 (29) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/smoothly-accordion_48.cjs.entry.js +22 -15
  3. package/dist/cjs/smoothly-menu-options.cjs.entry.js +2 -2
  4. package/dist/cjs/smoothly-option.cjs.entry.js +3 -2
  5. package/dist/cjs/smoothly-picker.cjs.entry.js +17 -11
  6. package/dist/cjs/smoothly.cjs.js +1 -1
  7. package/dist/collection/components/menu-options/index.js +1 -1
  8. package/dist/collection/components/menu-options/style.css +10 -2
  9. package/dist/collection/components/option/index.js +23 -2
  10. package/dist/collection/components/option/style.css +33 -10
  11. package/dist/collection/components/picker/index.js +40 -12
  12. package/dist/collection/components/picker/style.css +44 -15
  13. package/dist/custom-elements/index.js +24 -17
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/esm/smoothly-accordion_48.entry.js +22 -15
  16. package/dist/esm/smoothly-menu-options.entry.js +2 -2
  17. package/dist/esm/smoothly-option.entry.js +3 -2
  18. package/dist/esm/smoothly-picker.entry.js +17 -11
  19. package/dist/esm/smoothly.js +1 -1
  20. package/dist/smoothly/{p-9603922d.entry.js → p-e14898a9.entry.js} +1 -1
  21. package/dist/smoothly/smoothly-menu-options.entry.js +2 -2
  22. package/dist/smoothly/smoothly-option.entry.js +3 -2
  23. package/dist/smoothly/smoothly-picker.entry.js +17 -11
  24. package/dist/smoothly/smoothly.esm.js +1 -1
  25. package/dist/types/components/option/index.d.ts +1 -0
  26. package/dist/types/components/picker/index.d.ts +3 -2
  27. package/dist/types/components.d.ts +4 -0
  28. package/dist/types/model/OptionType.d.ts +1 -0
  29. package/package.json +1 -1
@@ -4,8 +4,10 @@ export class SmoothlyPicker {
4
4
  this.keepFocusOnReRender = false;
5
5
  this.emptyMenuLabel = "No Options";
6
6
  this.multiple = false;
7
+ this.options = [];
7
8
  this.selections = [];
8
9
  this.selectNoneName = "Select None";
10
+ this.selectionName = "items selected";
9
11
  }
10
12
  isOpenChangeHander() {
11
13
  if (this.isOpen == false) {
@@ -25,13 +27,14 @@ export class SmoothlyPicker {
25
27
  }
26
28
  toggle(option) {
27
29
  option.value == "select-none"
28
- ? this.clearSelection()
30
+ ? this.toggleAll()
29
31
  : this.selections.map(s => s.value).includes(option.value)
30
32
  ? this.unselect(option)
31
33
  : this.select(option);
32
34
  }
33
- clearSelection() {
34
- this.selections = [];
35
+ toggleAll() {
36
+ var _a;
37
+ this.selections = this.selections.length == ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) ? [] : this.options;
35
38
  this.inputElement.focus();
36
39
  this.keepFocusOnReRender = true;
37
40
  }
@@ -103,31 +106,37 @@ export class SmoothlyPicker {
103
106
  this.isOpen = false;
104
107
  this.filterOptions();
105
108
  }
106
- getCheckHtml() {
107
- return h("smoothly-icon", { name: "checkmark-sharp", size: "small" });
109
+ getCheckHtml(checked) {
110
+ return checked ? (h("smoothly-icon", { slot: "left", name: "checkbox", size: "small" })) : (h("smoothly-icon", { slot: "left", name: "square-outline", size: "small" }));
108
111
  }
109
112
  render() {
110
- var _a, _b, _c;
113
+ var _a, _b, _c, _d;
111
114
  const cssVariables = {
112
115
  "--max-height": (_a = this.maxHeight) !== null && _a !== void 0 ? _a : "inherit",
113
116
  "--label-display": this.labelSetting == "hide" ? "none" : "absolute",
114
117
  };
115
118
  (_b = this.options) === null || _b === void 0 ? void 0 : _b.forEach(o => {
116
- o.description = this.selections.map(s => s.value).includes(o.value) ? this.getCheckHtml() : "";
119
+ o.description = this.getCheckHtml(this.selections.map(s => s.value).includes(o.value));
117
120
  });
118
121
  const options = [
119
122
  {
120
123
  value: "select-none",
121
124
  name: this.selectNoneName,
122
- description: this.selections.length == 0 ? this.getCheckHtml() : "",
125
+ description: this.getCheckHtml(this.selections.length == ((_c = this.options) === null || _c === void 0 ? void 0 : _c.length)),
126
+ divider: true,
123
127
  },
124
- ...((_c = this.options) !== null && _c !== void 0 ? _c : []),
128
+ ...((_d = this.options) !== null && _d !== void 0 ? _d : []),
125
129
  ];
126
130
  return (h(Host, { style: cssVariables, "has-selection": this.selections.length > 0, "is-open": this.isOpen ? "" : undefined, onMouseDown: (e) => e.preventDefault(), onClick: () => this.onClick() },
127
131
  h("div", null,
132
+ h("smoothly-icon", { class: "search", name: "search-outline", size: "tiny" }),
128
133
  h("label", null, this.label),
129
- h("input", { type: "text", ref: (el) => (this.inputElement = el ? el : this.inputElement), onFocus: () => this.highlightDefault(), onBlur: () => this.onBlur(), placeholder: this.selections.map(selection => selection.name).join(", "), onKeyDown: e => this.onKeyDown(e), onInput: (e) => this.onInput(e) })),
130
- h("smoothly-menu-options", { style: { width: "100%" }, optionStyle: Object.assign({ padding: "0 1em", height: "2.5em" }, this.optionStyle), order: false, emptyMenuLabel: this.emptyMenuLabel, "max-menu-height": this.maxMenuHeight, ref: (el) => (this.menuElement = el !== null && el !== void 0 ? el : this.menuElement), onClick: e => e.stopPropagation(), resetHighlightOnOptionsChange: false, options: options })));
134
+ h("input", { type: "text", ref: (el) => (this.inputElement = el ? el : this.inputElement), onFocus: () => this.highlightDefault(), onBlur: () => this.onBlur(), placeholder: this.selections.length > 3
135
+ ? this.selections.length.toString() + " " + this.selectionName
136
+ : this.selections.map(selection => selection.name).join(", "), onKeyDown: e => this.onKeyDown(e), onInput: (e) => this.onInput(e) }),
137
+ h("smoothly-icon", { class: "down", name: "chevron-down", size: "tiny" }),
138
+ h("smoothly-icon", { class: "up", name: "chevron-up", size: "tiny" })),
139
+ h("smoothly-menu-options", { style: { width: "100%" }, optionStyle: Object.assign({}, this.optionStyle), order: false, emptyMenuLabel: this.emptyMenuLabel, "max-menu-height": this.maxMenuHeight, ref: (el) => (this.menuElement = el !== null && el !== void 0 ? el : this.menuElement), onClick: e => e.stopPropagation(), resetHighlightOnOptionsChange: false, options: options })));
131
140
  }
132
141
  static get is() { return "smoothly-picker"; }
133
142
  static get encapsulation() { return "shadow"; }
@@ -243,7 +252,8 @@ export class SmoothlyPicker {
243
252
  "docs": {
244
253
  "tags": [],
245
254
  "text": ""
246
- }
255
+ },
256
+ "defaultValue": "[]"
247
257
  },
248
258
  "labelSetting": {
249
259
  "type": "string",
@@ -317,6 +327,24 @@ export class SmoothlyPicker {
317
327
  "attribute": "select-none-name",
318
328
  "reflect": false,
319
329
  "defaultValue": "\"Select None\""
330
+ },
331
+ "selectionName": {
332
+ "type": "string",
333
+ "mutable": true,
334
+ "complexType": {
335
+ "original": "string",
336
+ "resolved": "string",
337
+ "references": {}
338
+ },
339
+ "required": false,
340
+ "optional": false,
341
+ "docs": {
342
+ "tags": [],
343
+ "text": ""
344
+ },
345
+ "attribute": "selection-name",
346
+ "reflect": false,
347
+ "defaultValue": "\"items selected\""
320
348
  }
321
349
  }; }
322
350
  static get states() { return {
@@ -12,19 +12,29 @@
12
12
  :host {
13
13
  display: block;
14
14
  position: relative;
15
+ background-color: rgba(var(--background-color));
15
16
  width: 100%;
16
17
  cursor: pointer;
17
- --intergiro-transition: all 200ms cubic-bezier(0.645, 0.045, 0.355, 1);
18
+ --intergiro-transition: border-color 200ms cubic-bezier(0.645, 0.045, 0.355, 1);
18
19
  transition: var(--intergiro-transition);
19
- border: 1px solid rgba(var(--border-color));
20
+ border: 1px solid rgb(var(--border-color));
21
+ margin: 1px;
22
+ height: 40px;
23
+ border-radius: 0.25rem;
24
+ }
25
+
26
+ :host(:focus-within) {
27
+ border-color: rgb(var(--smoothly-primary-shade));
28
+ border-width: 2px;
29
+ margin: 0px;
20
30
  }
21
31
 
22
32
  :host > div {
23
- border-radius: 0.25rem;
24
33
  display: flex;
25
- min-height: 3em;
26
- background-color: rgba(var(--background-color));
34
+ background-color: transparent;
35
+ min-height: 40px;
27
36
  align-items: center;
37
+ align-self: center;
28
38
  border: none;
29
39
  max-height: var(--max-height);
30
40
  }
@@ -48,7 +58,7 @@
48
58
  border: none;
49
59
  cursor: pointer;
50
60
  color: rgb(var(--color));
51
- padding: 0 1em;
61
+ padding: 0 0.6em;
52
62
  font-family: var(--smoothly-font-family);
53
63
  font-size: 1.05em;
54
64
  }
@@ -57,6 +67,10 @@
57
67
  text-overflow: ellipsis;
58
68
  }
59
69
 
70
+ :host([is-open]) > div input {
71
+ color: rgb(var(--smoothly-medium-color));
72
+ }
73
+
60
74
  :host(:not(:focus-within)[multiple]) ul > li:last-child {
61
75
  /* Remove Input out of the CSS flow Layout. This way input takes up no extra space */
62
76
  position: absolute;
@@ -72,9 +86,8 @@
72
86
  }
73
87
 
74
88
  label {
75
- position: absolute;
76
- top: 1em;
77
- left: 1em;
89
+ padding-left: 0.6em;
90
+ white-space: nowrap;
78
91
  color: rgba(var(--label-color));
79
92
  transition: var(--intergiro-transition);
80
93
  font-family: var(--smoothly-font-family);
@@ -88,7 +101,7 @@ label {
88
101
 
89
102
  :host([has-selection]) label,
90
103
  :host(:focus-within) label {
91
- transform: translateY(-1.2em) scale(0.7);
104
+ display: none;
92
105
  }
93
106
 
94
107
  :host(:hover) smoothly-icon[data-arrow],
@@ -100,19 +113,35 @@ label {
100
113
  pointer-events: none;
101
114
  }
102
115
 
103
- :host(:not([is-open])) smoothly-icon[data-arrow=up] {
104
- display: none;
116
+ :host smoothly-icon {
117
+ flex-shrink: 0;
118
+ width: 1em;
119
+ height: 1em;
105
120
  }
106
121
 
107
- :host([is-open]) smoothly-icon[data-arrow=down] {
122
+ :host(:not([is-open])) smoothly-icon.up,
123
+ :host([is-open]) smoothly-icon.down {
108
124
  display: none;
109
125
  }
110
126
 
111
- :host(:not([has-selection])) smoothly-icon:not([data-arrow]) {
112
- display: none;
127
+ smoothly-icon.search {
128
+ display: flex;
129
+ align-self: center;
130
+ padding-left: 0.8em;
131
+ }
132
+
133
+ smoothly-icon.up,
134
+ smoothly-icon.down {
135
+ display: flex;
136
+ align-self: center;
137
+ padding-right: 0.8em;
138
+ stroke: rgb(var(--smoothly-primary-shade));
113
139
  }
114
140
 
115
141
  :host smoothly-menu-options {
142
+ margin-top: 0.5em;
143
+ padding-top: 0.5em;
144
+ padding-bottom: 0.5em;
116
145
  position: absolute;
117
146
  z-index: 1;
118
147
  }
@@ -42992,7 +42992,7 @@ let Item = class extends HTMLElement {
42992
42992
  static get style() { return styleCss$r; }
42993
42993
  };
42994
42994
 
42995
- const styleCss$q = ":host{max-height:300px;width:85%;max-height:var(--max-menu-height);border:1px solid black;box-sizing:border-box;background-color:rgb(var(--smoothly-default-shade));overflow-y:auto;cursor:pointer}div:last-child:not(:empty){padding:0.5em 1em;font-style:italic}";
42995
+ const styleCss$q = ":host{max-height:300px;width:85%;max-height:var(--max-menu-height);box-sizing:border-box;background-color:rgb(var(--smoothly-default-color));border-radius:0.25em;color:rgb(var(--smoothly-primary-color));stroke:rgb(var(--smoothly-primary-color));fill:rgb(var(--smoothly-primary-color));box-shadow:0px 2px 24px rgba(64, 60, 57, 0.08), inset 0px 0px 1px rgba(64, 60, 57, 0.4);overflow-y:auto;cursor:pointer}div:last-child:not(:empty){padding:0.5em 1em;font-style:italic}:host:first-child{margin:10em}";
42996
42996
 
42997
42997
  let SmoothlyMenuOptions$1 = class extends HTMLElement {
42998
42998
  constructor() {
@@ -43086,7 +43086,7 @@ let SmoothlyMenuOptions$1 = class extends HTMLElement {
43086
43086
  }
43087
43087
  }
43088
43088
  render() {
43089
- 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, "data-highlight": this.highlightIndex == index }, option.description)))) : (h("div", null, this.emptyMenuLabel))));
43089
+ 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.description)))) : (h("div", null, this.emptyMenuLabel))));
43090
43090
  }
43091
43091
  get element() { return this; }
43092
43092
  static get watchers() { return {
@@ -43179,7 +43179,7 @@ let Notifier = class extends HTMLElement {
43179
43179
  static get style() { return styleCss$o; }
43180
43180
  };
43181
43181
 
43182
- const styleCss$n = ":host{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:0.5em 1em}:host([data-highlight]){background-color:rgb(var(--smoothly-primary-color));color:rgb(var(--smoothly-primary-contrast));stroke:rgb(var(--smoothly-primary-contrast));fill:rgb(var(--smoothly-primary-contrast))}:host([data-highlight]) div:last-child{color:rgba(var(--smoothly-primary-contrast), 0.8)}:host div:last-child{color:rgba(var(--smoothly-default-contrast), 0.8);font-style:italic}";
43182
+ const styleCss$n = ":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 div:last-child :host div:first-child{color:rgba(var(--smoothly-primary-color), 0.8);font-style:italic}:host([divider]){margin-bottom:0.5em}:host>div[slot=right]{margin-right:100%;color:rgba(var(--smoothly-primary-color), 0.8)}:host([divider])::after{position:absolute;height:1px;width:100%;left:0;bottom:-0.25em;content:\"\";background-color:rgba(var(--smoothly-dark-color))}";
43183
43183
 
43184
43184
  let SmoothlyOption$1 = class extends HTMLElement {
43185
43185
  constructor() {
@@ -43189,6 +43189,7 @@ let SmoothlyOption$1 = class extends HTMLElement {
43189
43189
  this.optionHover = createEvent(this, "optionHover", 7);
43190
43190
  this.optionSelect = createEvent(this, "optionSelect", 7);
43191
43191
  this.dataHighlight = false;
43192
+ this.divider = false;
43192
43193
  }
43193
43194
  onHover(event) {
43194
43195
  this.optionHover.emit({ name: this.name, value: this.value });
@@ -43200,13 +43201,13 @@ let SmoothlyOption$1 = class extends HTMLElement {
43200
43201
  throw `smoothly-option ${this.element.innerHTML} lacks value-property and can therefore not be selected`;
43201
43202
  }
43202
43203
  render() {
43203
- return (h(Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, h("div", null, this.name), h("div", null, h("slot", null))));
43204
+ return (h(Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, h("div", null, h("slot", { name: "left" })), h("div", { class: "middle" }, this.name), h("div", null, h("slot", { name: "right" }))));
43204
43205
  }
43205
43206
  get element() { return this; }
43206
43207
  static get style() { return styleCss$n; }
43207
43208
  };
43208
43209
 
43209
- const styleCss$m = ":host{--background-color:var(--smoothly-default-color), 1;--color:var(--smoothly-secondary-contrast);--border-color:var(--smoothly-default-shade), 1;--border-highlight-color:var(--smoothly-secondary-contrast), 1;--label-color:var(--smoothly-secondary-contrast), 0.8;--selected-item-border-radius:0.25rem;--selected-item-background-color:var(--smoothly-secondary-color), 1;--selected-item-color:255, 255, 255, 1}:host{display:block;position:relative;width:100%;cursor:pointer;--intergiro-transition:all 200ms cubic-bezier(0.645, 0.045, 0.355, 1);transition:var(--intergiro-transition);border:1px solid rgba(var(--border-color))}:host>div{border-radius:0.25rem;display:flex;min-height:3em;background-color:rgba(var(--background-color));align-items:center;border:none;max-height:var(--max-height)}:host>div .icons>smoothly-icon{flex-shrink:0;padding-left:0.6em;stroke:rgba(var(--color), 0.4);fill:rgba(var(--color), 0.4);width:1.5em !important;height:1.5em !important}:host>div .icons>smoothly-icon:hover{fill:rgba(var(--color), 1)}:host>div input{width:100%;background-color:transparent;outline:none;border:none;cursor:pointer;color:rgb(var(--color));padding:0 1em;font-family:var(--smoothly-font-family);font-size:1.05em}:host>div input::placeholder{opacity:1;text-overflow:ellipsis}:host(:not(:focus-within)[multiple]) ul>li:last-child{position:absolute;pointer-events:none}:host([label=\"\"]) ul,:host:not([label]) ul,:host([label-setting=hide]) ul{padding-top:0.1em;padding-bottom:0.1em}label{position:absolute;top:1em;left:1em;color:rgba(var(--label-color));transition:var(--intergiro-transition);font-family:var(--smoothly-font-family);pointer-events:none;transform-origin:left}:host([has-selection]) label{display:var(--label-display)}:host([has-selection]) label,:host(:focus-within) label{transform:translateY(-1.2em) scale(0.7)}:host(:hover) smoothly-icon[data-arrow],:host(:focus-within) smoothly-icon[data-arrow]{stroke:rgba(var(--color), 1)}:host smoothly-icon[data-arrow]{pointer-events:none}:host(:not([is-open])) smoothly-icon[data-arrow=up]{display:none}:host([is-open]) smoothly-icon[data-arrow=down]{display:none}:host(:not([has-selection])) smoothly-icon:not([data-arrow]){display:none}:host smoothly-menu-options{position:absolute;z-index:1}:host(:not([is-open]))>smoothly-menu-options{display:none}";
43210
+ const styleCss$m = ":host{--background-color:var(--smoothly-default-color), 1;--color:var(--smoothly-secondary-contrast);--border-color:var(--smoothly-default-shade), 1;--border-highlight-color:var(--smoothly-secondary-contrast), 1;--label-color:var(--smoothly-secondary-contrast), 0.8;--selected-item-border-radius:0.25rem;--selected-item-background-color:var(--smoothly-secondary-color), 1;--selected-item-color:255, 255, 255, 1}:host{display:block;position:relative;background-color:rgba(var(--background-color));width:100%;cursor:pointer;--intergiro-transition:border-color 200ms cubic-bezier(0.645, 0.045, 0.355, 1);transition:var(--intergiro-transition);border:1px solid rgb(var(--border-color));margin:1px;height:40px;border-radius:0.25rem}:host(:focus-within){border-color:rgb(var(--smoothly-primary-shade));border-width:2px;margin:0px}:host>div{display:flex;background-color:transparent;min-height:40px;align-items:center;align-self:center;border:none;max-height:var(--max-height)}:host>div .icons>smoothly-icon{flex-shrink:0;padding-left:0.6em;stroke:rgba(var(--color), 0.4);fill:rgba(var(--color), 0.4);width:1.5em !important;height:1.5em !important}:host>div .icons>smoothly-icon:hover{fill:rgba(var(--color), 1)}:host>div input{width:100%;background-color:transparent;outline:none;border:none;cursor:pointer;color:rgb(var(--color));padding:0 0.6em;font-family:var(--smoothly-font-family);font-size:1.05em}:host>div input::placeholder{opacity:1;text-overflow:ellipsis}:host([is-open])>div input{color:rgb(var(--smoothly-medium-color))}:host(:not(:focus-within)[multiple]) ul>li:last-child{position:absolute;pointer-events:none}:host([label=\"\"]) ul,:host:not([label]) ul,:host([label-setting=hide]) ul{padding-top:0.1em;padding-bottom:0.1em}label{padding-left:0.6em;white-space:nowrap;color:rgba(var(--label-color));transition:var(--intergiro-transition);font-family:var(--smoothly-font-family);pointer-events:none;transform-origin:left}:host([has-selection]) label{display:var(--label-display)}:host([has-selection]) label,:host(:focus-within) label{display:none}:host(:hover) smoothly-icon[data-arrow],:host(:focus-within) smoothly-icon[data-arrow]{stroke:rgba(var(--color), 1)}:host smoothly-icon[data-arrow]{pointer-events:none}:host smoothly-icon{flex-shrink:0;width:1em;height:1em}:host(:not([is-open])) smoothly-icon.up,:host([is-open]) smoothly-icon.down{display:none}smoothly-icon.search{display:flex;align-self:center;padding-left:0.8em}smoothly-icon.up,smoothly-icon.down{display:flex;align-self:center;padding-right:0.8em;stroke:rgb(var(--smoothly-primary-shade))}:host smoothly-menu-options{margin-top:0.5em;padding-top:0.5em;padding-bottom:0.5em;position:absolute;z-index:1}:host(:not([is-open]))>smoothly-menu-options{display:none}";
43210
43211
 
43211
43212
  let SmoothlyPicker$1 = class extends HTMLElement {
43212
43213
  constructor() {
@@ -43217,8 +43218,10 @@ let SmoothlyPicker$1 = class extends HTMLElement {
43217
43218
  this.keepFocusOnReRender = false;
43218
43219
  this.emptyMenuLabel = "No Options";
43219
43220
  this.multiple = false;
43221
+ this.options = [];
43220
43222
  this.selections = [];
43221
43223
  this.selectNoneName = "Select None";
43224
+ this.selectionName = "items selected";
43222
43225
  }
43223
43226
  isOpenChangeHander() {
43224
43227
  if (this.isOpen == false) {
@@ -43238,13 +43241,14 @@ let SmoothlyPicker$1 = class extends HTMLElement {
43238
43241
  }
43239
43242
  toggle(option) {
43240
43243
  option.value == "select-none"
43241
- ? this.clearSelection()
43244
+ ? this.toggleAll()
43242
43245
  : this.selections.map(s => s.value).includes(option.value)
43243
43246
  ? this.unselect(option)
43244
43247
  : this.select(option);
43245
43248
  }
43246
- clearSelection() {
43247
- this.selections = [];
43249
+ toggleAll() {
43250
+ var _a;
43251
+ this.selections = this.selections.length == ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) ? [] : this.options;
43248
43252
  this.inputElement.focus();
43249
43253
  this.keepFocusOnReRender = true;
43250
43254
  }
@@ -43316,27 +43320,30 @@ let SmoothlyPicker$1 = class extends HTMLElement {
43316
43320
  this.isOpen = false;
43317
43321
  this.filterOptions();
43318
43322
  }
43319
- getCheckHtml() {
43320
- return h("smoothly-icon", { name: "checkmark-sharp", size: "small" });
43323
+ getCheckHtml(checked) {
43324
+ return checked ? (h("smoothly-icon", { slot: "left", name: "checkbox", size: "small" })) : (h("smoothly-icon", { slot: "left", name: "square-outline", size: "small" }));
43321
43325
  }
43322
43326
  render() {
43323
- var _a, _b, _c;
43327
+ var _a, _b, _c, _d;
43324
43328
  const cssVariables = {
43325
43329
  "--max-height": (_a = this.maxHeight) !== null && _a !== void 0 ? _a : "inherit",
43326
43330
  "--label-display": this.labelSetting == "hide" ? "none" : "absolute",
43327
43331
  };
43328
43332
  (_b = this.options) === null || _b === void 0 ? void 0 : _b.forEach(o => {
43329
- o.description = this.selections.map(s => s.value).includes(o.value) ? this.getCheckHtml() : "";
43333
+ o.description = this.getCheckHtml(this.selections.map(s => s.value).includes(o.value));
43330
43334
  });
43331
43335
  const options = [
43332
43336
  {
43333
43337
  value: "select-none",
43334
43338
  name: this.selectNoneName,
43335
- description: this.selections.length == 0 ? this.getCheckHtml() : "",
43339
+ description: this.getCheckHtml(this.selections.length == ((_c = this.options) === null || _c === void 0 ? void 0 : _c.length)),
43340
+ divider: true,
43336
43341
  },
43337
- ...((_c = this.options) !== null && _c !== void 0 ? _c : []),
43342
+ ...((_d = this.options) !== null && _d !== void 0 ? _d : []),
43338
43343
  ];
43339
- 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("label", null, this.label), h("input", { type: "text", ref: (el) => (this.inputElement = el ? el : this.inputElement), onFocus: () => this.highlightDefault(), onBlur: () => this.onBlur(), placeholder: this.selections.map(selection => selection.name).join(", "), onKeyDown: e => this.onKeyDown(e), onInput: (e) => this.onInput(e) })), h("smoothly-menu-options", { style: { width: "100%" }, optionStyle: Object.assign({ padding: "0 1em", height: "2.5em" }, this.optionStyle), order: false, emptyMenuLabel: this.emptyMenuLabel, "max-menu-height": this.maxMenuHeight, ref: (el) => (this.menuElement = el !== null && el !== void 0 ? el : this.menuElement), onClick: e => e.stopPropagation(), resetHighlightOnOptionsChange: false, options: options })));
43344
+ 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", { class: "search", name: "search-outline", size: "tiny" }), h("label", null, this.label), h("input", { type: "text", ref: (el) => (this.inputElement = el ? el : this.inputElement), onFocus: () => this.highlightDefault(), onBlur: () => this.onBlur(), placeholder: this.selections.length > 3
43345
+ ? this.selections.length.toString() + " " + this.selectionName
43346
+ : this.selections.map(selection => selection.name).join(", "), onKeyDown: e => this.onKeyDown(e), onInput: (e) => this.onInput(e) }), h("smoothly-icon", { class: "down", name: "chevron-down", size: "tiny" }), h("smoothly-icon", { class: "up", name: "chevron-up", size: "tiny" })), h("smoothly-menu-options", { style: { width: "100%" }, optionStyle: Object.assign({}, this.optionStyle), order: false, emptyMenuLabel: this.emptyMenuLabel, "max-menu-height": this.maxMenuHeight, ref: (el) => (this.menuElement = el !== null && el !== void 0 ? el : this.menuElement), onClick: e => e.stopPropagation(), resetHighlightOnOptionsChange: false, options: options })));
43340
43347
  }
43341
43348
  get element() { return this; }
43342
43349
  static get watchers() { return {
@@ -44192,8 +44199,8 @@ const SmoothlyItem = /*@__PURE__*/proxyCustomElement(Item, [6,"smoothly-item",{"
44192
44199
  const SmoothlyMenuOptions = /*@__PURE__*/proxyCustomElement(SmoothlyMenuOptions$1, [1,"smoothly-menu-options",{"emptyMenuLabel":[1025,"empty-menu-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"filteredOptions":[32],"highlightIndex":[32]},[[0,"optionHover","optionHoverHandler"]]]);
44193
44200
  const SmoothlyNotification = /*@__PURE__*/proxyCustomElement(Notification, [2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]]);
44194
44201
  const SmoothlyNotifier = /*@__PURE__*/proxyCustomElement(Notifier, [6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]]);
44195
- const SmoothlyOption = /*@__PURE__*/proxyCustomElement(SmoothlyOption$1, [1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537]}]);
44196
- const SmoothlyPicker = /*@__PURE__*/proxyCustomElement(SmoothlyPicker$1, [1,"smoothly-picker",{"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"optionStyle":[8,"option-style"],"options":[16],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"isOpen":[32]},[[0,"optionSelect","optionSelectHander"]]]);
44202
+ const SmoothlyOption = /*@__PURE__*/proxyCustomElement(SmoothlyOption$1, [1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537],"divider":[1540]}]);
44203
+ const SmoothlyPicker = /*@__PURE__*/proxyCustomElement(SmoothlyPicker$1, [1,"smoothly-picker",{"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"optionStyle":[8,"option-style"],"options":[16],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"selectionName":[1025,"selection-name"],"isOpen":[32]},[[0,"optionSelect","optionSelectHander"]]]);
44197
44204
  const SmoothlyPopup = /*@__PURE__*/proxyCustomElement(SmoothlyPopup$1, [6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}]);
44198
44205
  const SmoothlyQuiet = /*@__PURE__*/proxyCustomElement(SmoothlyQuiet$1, [6,"smoothly-quiet",{"color":[1]}]);
44199
44206
  const SmoothlyRadio = /*@__PURE__*/proxyCustomElement(SmoothlyRadio$1, [6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}]);
@@ -26,7 +26,7 @@ const defineCustomElements = (win, options) => {
26
26
  if (typeof window === 'undefined') return Promise.resolve();
27
27
  return patchEsm().then(() => {
28
28
  globalScripts();
29
- return bootstrapLazy([["smoothly-app-demo",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}]]],["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-input-demo",[[0,"smoothly-input-demo"]]],["smoothly-select-demo",[[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]]]],["smoothly-display-demo",[[0,"smoothly-display-demo"]]],["smoothly-table-demo",[[2,"smoothly-table-demo"]]],["smoothly-app",[[4,"smoothly-app",{"color":[1]}]]],["smoothly-dialog-demo",[[0,"smoothly-dialog-demo"]]],["smoothly-icon-demo",[[2,"smoothly-icon-demo"]]],["smoothly-room",[[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}]]],["smoothly-input-date-range",[[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"]]]]],["smoothly-notifier",[[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]]]],["smoothly-picker",[[1,"smoothly-picker",{"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"optionStyle":[8,"option-style"],"options":[16],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"isOpen":[32]},[[0,"optionSelect","optionSelectHander"]]]]],["smoothly-dialog",[[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]]]],["smoothly-backtotop",[[2,"smoothly-backtotop",{"opacity":[1],"bottom":[1],"right":[1],"visible":[32]}]]],["smoothly-checkbox",[[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"size":[1],"intermediate":[1540],"selected":[1540],"disabled":[1540],"t":[32]}]]],["smoothly-submit",[[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]]]],["smoothly-tuple",[[0,"smoothly-tuple",{"tuple":[16]}]]],["smoothly-urlencoded",[[0,"smoothly-urlencoded",{"data":[1]}]]],["smoothly-accordion",[[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]]]],["smoothly-accordion-item",[[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}]]],["smoothly-display-amount",[[2,"smoothly-display-amount",{"amount":[8],"currency":[1]}]]],["smoothly-frame",[[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}]]],["smoothly-popup",[[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}]]],["smoothly-quiet",[[6,"smoothly-quiet",{"color":[1]}]]],["smoothly-radio",[[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}]]],["smoothly-select",[[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}]]],["smoothly-tab",[[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]]]],["smoothly-tab-switch",[[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]]]],["smoothly-table",[[6,"smoothly-table",null,[[0,"sort","onSort"]]]]],["smoothly-table-cell",[[6,"smoothly-table-cell"]]],["smoothly-table-expandable-cell",[[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-table-expandable-row",[[6,"smoothly-table-expandable-row",null,[[0,"expansionLoaded","onExpansionLoaded"],[0,"expansionOpen","onDetailsLoaded"]]]]],["smoothly-table-header",[[6,"smoothly-table-header",{"name":[1],"sortDirection":[1025,"sort-direction"]},[[0,"click","onClick"]]]]],["smoothly-table-row",[[6,"smoothly-table-row",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-icon",[[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]]],["smoothly-input-date",[[6,"smoothly-input-date",{"value":[1025],"open":[1028],"max":[1025],"min":[1025]},[[0,"dateSet","dateSetHandler"]]]]],["smoothly-notification",[[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]]]],["smoothly-menu-options",[[1,"smoothly-menu-options",{"emptyMenuLabel":[1025,"empty-menu-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"filteredOptions":[32],"highlightIndex":[32],"moveHighlight":[64],"setHighlight":[64],"getHighlighted":[64],"filterOptions":[64]},[[0,"optionHover","optionHoverHandler"]]]]],["smoothly-display",[[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1]}]]],["smoothly-display-date-time",[[2,"smoothly-display-date-time",{"datetime":[1]}]]],["smoothly-option",[[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537]}]]],["smoothly-spinner",[[2,"smoothly-spinner",{"active":[516],"size":[513]}]]],["smoothly-selector",[[6,"smoothly-selector",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]]]],["smoothly-item",[[6,"smoothly-item",{"value":[8],"selected":[1540],"filter":[64]},[[0,"click","onClick"]]]]],["smoothly-calendar",[[2,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"doubleInput":[516,"double-input"],"firstSelected":[32]}]]],["smoothly-input",[[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],"currency":[513],"getFormData":[64],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]}]]],["smoothly-input-month",[[2,"smoothly-input-month",{"value":[1025]}]]],["smoothly-trigger",[[6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]]]]], options);
29
+ return bootstrapLazy([["smoothly-app-demo",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}]]],["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-input-demo",[[0,"smoothly-input-demo"]]],["smoothly-select-demo",[[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]]]],["smoothly-display-demo",[[0,"smoothly-display-demo"]]],["smoothly-table-demo",[[2,"smoothly-table-demo"]]],["smoothly-app",[[4,"smoothly-app",{"color":[1]}]]],["smoothly-dialog-demo",[[0,"smoothly-dialog-demo"]]],["smoothly-icon-demo",[[2,"smoothly-icon-demo"]]],["smoothly-room",[[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}]]],["smoothly-input-date-range",[[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"]]]]],["smoothly-notifier",[[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]]]],["smoothly-picker",[[1,"smoothly-picker",{"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"optionStyle":[8,"option-style"],"options":[16],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"selectionName":[1025,"selection-name"],"isOpen":[32]},[[0,"optionSelect","optionSelectHander"]]]]],["smoothly-dialog",[[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]]]],["smoothly-backtotop",[[2,"smoothly-backtotop",{"opacity":[1],"bottom":[1],"right":[1],"visible":[32]}]]],["smoothly-checkbox",[[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"size":[1],"intermediate":[1540],"selected":[1540],"disabled":[1540],"t":[32]}]]],["smoothly-submit",[[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]]]],["smoothly-tuple",[[0,"smoothly-tuple",{"tuple":[16]}]]],["smoothly-urlencoded",[[0,"smoothly-urlencoded",{"data":[1]}]]],["smoothly-accordion",[[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]]]],["smoothly-accordion-item",[[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}]]],["smoothly-display-amount",[[2,"smoothly-display-amount",{"amount":[8],"currency":[1]}]]],["smoothly-frame",[[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}]]],["smoothly-popup",[[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}]]],["smoothly-quiet",[[6,"smoothly-quiet",{"color":[1]}]]],["smoothly-radio",[[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}]]],["smoothly-select",[[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}]]],["smoothly-tab",[[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]]]],["smoothly-tab-switch",[[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]]]],["smoothly-table",[[6,"smoothly-table",null,[[0,"sort","onSort"]]]]],["smoothly-table-cell",[[6,"smoothly-table-cell"]]],["smoothly-table-expandable-cell",[[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-table-expandable-row",[[6,"smoothly-table-expandable-row",null,[[0,"expansionLoaded","onExpansionLoaded"],[0,"expansionOpen","onDetailsLoaded"]]]]],["smoothly-table-header",[[6,"smoothly-table-header",{"name":[1],"sortDirection":[1025,"sort-direction"]},[[0,"click","onClick"]]]]],["smoothly-table-row",[[6,"smoothly-table-row",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-icon",[[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]]],["smoothly-input-date",[[6,"smoothly-input-date",{"value":[1025],"open":[1028],"max":[1025],"min":[1025]},[[0,"dateSet","dateSetHandler"]]]]],["smoothly-notification",[[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]]]],["smoothly-menu-options",[[1,"smoothly-menu-options",{"emptyMenuLabel":[1025,"empty-menu-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"filteredOptions":[32],"highlightIndex":[32],"moveHighlight":[64],"setHighlight":[64],"getHighlighted":[64],"filterOptions":[64]},[[0,"optionHover","optionHoverHandler"]]]]],["smoothly-display",[[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1]}]]],["smoothly-display-date-time",[[2,"smoothly-display-date-time",{"datetime":[1]}]]],["smoothly-option",[[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537],"divider":[1540]}]]],["smoothly-spinner",[[2,"smoothly-spinner",{"active":[516],"size":[513]}]]],["smoothly-selector",[[6,"smoothly-selector",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]]]],["smoothly-item",[[6,"smoothly-item",{"value":[8],"selected":[1540],"filter":[64]},[[0,"click","onClick"]]]]],["smoothly-calendar",[[2,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"doubleInput":[516,"double-input"],"firstSelected":[32]}]]],["smoothly-input",[[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],"currency":[513],"getFormData":[64],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]}]]],["smoothly-input-month",[[2,"smoothly-input-month",{"value":[1025]}]]],["smoothly-trigger",[[6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]]]]], options);
30
30
  });
31
31
  };
32
32
 
@@ -40014,7 +40014,7 @@ let Item = class {
40014
40014
  };
40015
40015
  Item.style = styleCss$n;
40016
40016
 
40017
- const styleCss$m = ":host{max-height:300px;width:85%;max-height:var(--max-menu-height);border:1px solid black;box-sizing:border-box;background-color:rgb(var(--smoothly-default-shade));overflow-y:auto;cursor:pointer}div:last-child:not(:empty){padding:0.5em 1em;font-style:italic}";
40017
+ const styleCss$m = ":host{max-height:300px;width:85%;max-height:var(--max-menu-height);box-sizing:border-box;background-color:rgb(var(--smoothly-default-color));border-radius:0.25em;color:rgb(var(--smoothly-primary-color));stroke:rgb(var(--smoothly-primary-color));fill:rgb(var(--smoothly-primary-color));box-shadow:0px 2px 24px rgba(64, 60, 57, 0.08), inset 0px 0px 1px rgba(64, 60, 57, 0.4);overflow-y:auto;cursor:pointer}div:last-child:not(:empty){padding:0.5em 1em;font-style:italic}:host:first-child{margin:10em}";
40018
40018
 
40019
40019
  let SmoothlyMenuOptions = class {
40020
40020
  constructor(hostRef) {
@@ -40106,7 +40106,7 @@ let SmoothlyMenuOptions = class {
40106
40106
  }
40107
40107
  }
40108
40108
  render() {
40109
- 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, "data-highlight": this.highlightIndex == index }, option.description)))) : (h("div", null, this.emptyMenuLabel))));
40109
+ 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.description)))) : (h("div", null, this.emptyMenuLabel))));
40110
40110
  }
40111
40111
  get element() { return getElement(this); }
40112
40112
  static get watchers() { return {
@@ -40197,7 +40197,7 @@ let Notifier = class {
40197
40197
  };
40198
40198
  Notifier.style = styleCss$k;
40199
40199
 
40200
- const styleCss$j = ":host{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:0.5em 1em}:host([data-highlight]){background-color:rgb(var(--smoothly-primary-color));color:rgb(var(--smoothly-primary-contrast));stroke:rgb(var(--smoothly-primary-contrast));fill:rgb(var(--smoothly-primary-contrast))}:host([data-highlight]) div:last-child{color:rgba(var(--smoothly-primary-contrast), 0.8)}:host div:last-child{color:rgba(var(--smoothly-default-contrast), 0.8);font-style:italic}";
40200
+ const styleCss$j = ":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 div:last-child :host div:first-child{color:rgba(var(--smoothly-primary-color), 0.8);font-style:italic}:host([divider]){margin-bottom:0.5em}:host>div[slot=right]{margin-right:100%;color:rgba(var(--smoothly-primary-color), 0.8)}:host([divider])::after{position:absolute;height:1px;width:100%;left:0;bottom:-0.25em;content:\"\";background-color:rgba(var(--smoothly-dark-color))}";
40201
40201
 
40202
40202
  let SmoothlyOption = class {
40203
40203
  constructor(hostRef) {
@@ -40205,6 +40205,7 @@ let SmoothlyOption = class {
40205
40205
  this.optionHover = createEvent(this, "optionHover", 7);
40206
40206
  this.optionSelect = createEvent(this, "optionSelect", 7);
40207
40207
  this.dataHighlight = false;
40208
+ this.divider = false;
40208
40209
  }
40209
40210
  onHover(event) {
40210
40211
  this.optionHover.emit({ name: this.name, value: this.value });
@@ -40216,13 +40217,13 @@ let SmoothlyOption = class {
40216
40217
  throw `smoothly-option ${this.element.innerHTML} lacks value-property and can therefore not be selected`;
40217
40218
  }
40218
40219
  render() {
40219
- return (h(Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, h("div", null, this.name), h("div", null, h("slot", null))));
40220
+ return (h(Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, h("div", null, h("slot", { name: "left" })), h("div", { class: "middle" }, this.name), h("div", null, h("slot", { name: "right" }))));
40220
40221
  }
40221
40222
  get element() { return getElement(this); }
40222
40223
  };
40223
40224
  SmoothlyOption.style = styleCss$j;
40224
40225
 
40225
- const styleCss$i = ":host{--background-color:var(--smoothly-default-color), 1;--color:var(--smoothly-secondary-contrast);--border-color:var(--smoothly-default-shade), 1;--border-highlight-color:var(--smoothly-secondary-contrast), 1;--label-color:var(--smoothly-secondary-contrast), 0.8;--selected-item-border-radius:0.25rem;--selected-item-background-color:var(--smoothly-secondary-color), 1;--selected-item-color:255, 255, 255, 1}:host{display:block;position:relative;width:100%;cursor:pointer;--intergiro-transition:all 200ms cubic-bezier(0.645, 0.045, 0.355, 1);transition:var(--intergiro-transition);border:1px solid rgba(var(--border-color))}:host>div{border-radius:0.25rem;display:flex;min-height:3em;background-color:rgba(var(--background-color));align-items:center;border:none;max-height:var(--max-height)}:host>div .icons>smoothly-icon{flex-shrink:0;padding-left:0.6em;stroke:rgba(var(--color), 0.4);fill:rgba(var(--color), 0.4);width:1.5em !important;height:1.5em !important}:host>div .icons>smoothly-icon:hover{fill:rgba(var(--color), 1)}:host>div input{width:100%;background-color:transparent;outline:none;border:none;cursor:pointer;color:rgb(var(--color));padding:0 1em;font-family:var(--smoothly-font-family);font-size:1.05em}:host>div input::placeholder{opacity:1;text-overflow:ellipsis}:host(:not(:focus-within)[multiple]) ul>li:last-child{position:absolute;pointer-events:none}:host([label=\"\"]) ul,:host:not([label]) ul,:host([label-setting=hide]) ul{padding-top:0.1em;padding-bottom:0.1em}label{position:absolute;top:1em;left:1em;color:rgba(var(--label-color));transition:var(--intergiro-transition);font-family:var(--smoothly-font-family);pointer-events:none;transform-origin:left}:host([has-selection]) label{display:var(--label-display)}:host([has-selection]) label,:host(:focus-within) label{transform:translateY(-1.2em) scale(0.7)}:host(:hover) smoothly-icon[data-arrow],:host(:focus-within) smoothly-icon[data-arrow]{stroke:rgba(var(--color), 1)}:host smoothly-icon[data-arrow]{pointer-events:none}:host(:not([is-open])) smoothly-icon[data-arrow=up]{display:none}:host([is-open]) smoothly-icon[data-arrow=down]{display:none}:host(:not([has-selection])) smoothly-icon:not([data-arrow]){display:none}:host smoothly-menu-options{position:absolute;z-index:1}:host(:not([is-open]))>smoothly-menu-options{display:none}";
40226
+ const styleCss$i = ":host{--background-color:var(--smoothly-default-color), 1;--color:var(--smoothly-secondary-contrast);--border-color:var(--smoothly-default-shade), 1;--border-highlight-color:var(--smoothly-secondary-contrast), 1;--label-color:var(--smoothly-secondary-contrast), 0.8;--selected-item-border-radius:0.25rem;--selected-item-background-color:var(--smoothly-secondary-color), 1;--selected-item-color:255, 255, 255, 1}:host{display:block;position:relative;background-color:rgba(var(--background-color));width:100%;cursor:pointer;--intergiro-transition:border-color 200ms cubic-bezier(0.645, 0.045, 0.355, 1);transition:var(--intergiro-transition);border:1px solid rgb(var(--border-color));margin:1px;height:40px;border-radius:0.25rem}:host(:focus-within){border-color:rgb(var(--smoothly-primary-shade));border-width:2px;margin:0px}:host>div{display:flex;background-color:transparent;min-height:40px;align-items:center;align-self:center;border:none;max-height:var(--max-height)}:host>div .icons>smoothly-icon{flex-shrink:0;padding-left:0.6em;stroke:rgba(var(--color), 0.4);fill:rgba(var(--color), 0.4);width:1.5em !important;height:1.5em !important}:host>div .icons>smoothly-icon:hover{fill:rgba(var(--color), 1)}:host>div input{width:100%;background-color:transparent;outline:none;border:none;cursor:pointer;color:rgb(var(--color));padding:0 0.6em;font-family:var(--smoothly-font-family);font-size:1.05em}:host>div input::placeholder{opacity:1;text-overflow:ellipsis}:host([is-open])>div input{color:rgb(var(--smoothly-medium-color))}:host(:not(:focus-within)[multiple]) ul>li:last-child{position:absolute;pointer-events:none}:host([label=\"\"]) ul,:host:not([label]) ul,:host([label-setting=hide]) ul{padding-top:0.1em;padding-bottom:0.1em}label{padding-left:0.6em;white-space:nowrap;color:rgba(var(--label-color));transition:var(--intergiro-transition);font-family:var(--smoothly-font-family);pointer-events:none;transform-origin:left}:host([has-selection]) label{display:var(--label-display)}:host([has-selection]) label,:host(:focus-within) label{display:none}:host(:hover) smoothly-icon[data-arrow],:host(:focus-within) smoothly-icon[data-arrow]{stroke:rgba(var(--color), 1)}:host smoothly-icon[data-arrow]{pointer-events:none}:host smoothly-icon{flex-shrink:0;width:1em;height:1em}:host(:not([is-open])) smoothly-icon.up,:host([is-open]) smoothly-icon.down{display:none}smoothly-icon.search{display:flex;align-self:center;padding-left:0.8em}smoothly-icon.up,smoothly-icon.down{display:flex;align-self:center;padding-right:0.8em;stroke:rgb(var(--smoothly-primary-shade))}:host smoothly-menu-options{margin-top:0.5em;padding-top:0.5em;padding-bottom:0.5em;position:absolute;z-index:1}:host(:not([is-open]))>smoothly-menu-options{display:none}";
40226
40227
 
40227
40228
  let SmoothlyPicker = class {
40228
40229
  constructor(hostRef) {
@@ -40231,8 +40232,10 @@ let SmoothlyPicker = class {
40231
40232
  this.keepFocusOnReRender = false;
40232
40233
  this.emptyMenuLabel = "No Options";
40233
40234
  this.multiple = false;
40235
+ this.options = [];
40234
40236
  this.selections = [];
40235
40237
  this.selectNoneName = "Select None";
40238
+ this.selectionName = "items selected";
40236
40239
  }
40237
40240
  isOpenChangeHander() {
40238
40241
  if (this.isOpen == false) {
@@ -40252,13 +40255,14 @@ let SmoothlyPicker = class {
40252
40255
  }
40253
40256
  toggle(option) {
40254
40257
  option.value == "select-none"
40255
- ? this.clearSelection()
40258
+ ? this.toggleAll()
40256
40259
  : this.selections.map(s => s.value).includes(option.value)
40257
40260
  ? this.unselect(option)
40258
40261
  : this.select(option);
40259
40262
  }
40260
- clearSelection() {
40261
- this.selections = [];
40263
+ toggleAll() {
40264
+ var _a;
40265
+ this.selections = this.selections.length == ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) ? [] : this.options;
40262
40266
  this.inputElement.focus();
40263
40267
  this.keepFocusOnReRender = true;
40264
40268
  }
@@ -40330,27 +40334,30 @@ let SmoothlyPicker = class {
40330
40334
  this.isOpen = false;
40331
40335
  this.filterOptions();
40332
40336
  }
40333
- getCheckHtml() {
40334
- return h("smoothly-icon", { name: "checkmark-sharp", size: "small" });
40337
+ getCheckHtml(checked) {
40338
+ return checked ? (h("smoothly-icon", { slot: "left", name: "checkbox", size: "small" })) : (h("smoothly-icon", { slot: "left", name: "square-outline", size: "small" }));
40335
40339
  }
40336
40340
  render() {
40337
- var _a, _b, _c;
40341
+ var _a, _b, _c, _d;
40338
40342
  const cssVariables = {
40339
40343
  "--max-height": (_a = this.maxHeight) !== null && _a !== void 0 ? _a : "inherit",
40340
40344
  "--label-display": this.labelSetting == "hide" ? "none" : "absolute",
40341
40345
  };
40342
40346
  (_b = this.options) === null || _b === void 0 ? void 0 : _b.forEach(o => {
40343
- o.description = this.selections.map(s => s.value).includes(o.value) ? this.getCheckHtml() : "";
40347
+ o.description = this.getCheckHtml(this.selections.map(s => s.value).includes(o.value));
40344
40348
  });
40345
40349
  const options = [
40346
40350
  {
40347
40351
  value: "select-none",
40348
40352
  name: this.selectNoneName,
40349
- description: this.selections.length == 0 ? this.getCheckHtml() : "",
40353
+ description: this.getCheckHtml(this.selections.length == ((_c = this.options) === null || _c === void 0 ? void 0 : _c.length)),
40354
+ divider: true,
40350
40355
  },
40351
- ...((_c = this.options) !== null && _c !== void 0 ? _c : []),
40356
+ ...((_d = this.options) !== null && _d !== void 0 ? _d : []),
40352
40357
  ];
40353
- 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("label", null, this.label), h("input", { type: "text", ref: (el) => (this.inputElement = el ? el : this.inputElement), onFocus: () => this.highlightDefault(), onBlur: () => this.onBlur(), placeholder: this.selections.map(selection => selection.name).join(", "), onKeyDown: e => this.onKeyDown(e), onInput: (e) => this.onInput(e) })), h("smoothly-menu-options", { style: { width: "100%" }, optionStyle: Object.assign({ padding: "0 1em", height: "2.5em" }, this.optionStyle), order: false, emptyMenuLabel: this.emptyMenuLabel, "max-menu-height": this.maxMenuHeight, ref: (el) => (this.menuElement = el !== null && el !== void 0 ? el : this.menuElement), onClick: e => e.stopPropagation(), resetHighlightOnOptionsChange: false, options: options })));
40358
+ 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", { class: "search", name: "search-outline", size: "tiny" }), h("label", null, this.label), h("input", { type: "text", ref: (el) => (this.inputElement = el ? el : this.inputElement), onFocus: () => this.highlightDefault(), onBlur: () => this.onBlur(), placeholder: this.selections.length > 3
40359
+ ? this.selections.length.toString() + " " + this.selectionName
40360
+ : this.selections.map(selection => selection.name).join(", "), onKeyDown: e => this.onKeyDown(e), onInput: (e) => this.onInput(e) }), h("smoothly-icon", { class: "down", name: "chevron-down", size: "tiny" }), h("smoothly-icon", { class: "up", name: "chevron-up", size: "tiny" })), h("smoothly-menu-options", { style: { width: "100%" }, optionStyle: Object.assign({}, this.optionStyle), order: false, emptyMenuLabel: this.emptyMenuLabel, "max-menu-height": this.maxMenuHeight, ref: (el) => (this.menuElement = el !== null && el !== void 0 ? el : this.menuElement), onClick: e => e.stopPropagation(), resetHighlightOnOptionsChange: false, options: options })));
40354
40361
  }
40355
40362
  get element() { return getElement(this); }
40356
40363
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, k as Host, j as getElement } from './index-02a70ac1.js';
2
2
 
3
- const styleCss = ":host{max-height:300px;width:85%;max-height:var(--max-menu-height);border:1px solid black;box-sizing:border-box;background-color:rgb(var(--smoothly-default-shade));overflow-y:auto;cursor:pointer}div:last-child:not(:empty){padding:0.5em 1em;font-style:italic}";
3
+ const styleCss = ":host{max-height:300px;width:85%;max-height:var(--max-menu-height);box-sizing:border-box;background-color:rgb(var(--smoothly-default-color));border-radius:0.25em;color:rgb(var(--smoothly-primary-color));stroke:rgb(var(--smoothly-primary-color));fill:rgb(var(--smoothly-primary-color));box-shadow:0px 2px 24px rgba(64, 60, 57, 0.08), inset 0px 0px 1px rgba(64, 60, 57, 0.4);overflow-y:auto;cursor:pointer}div:last-child:not(:empty){padding:0.5em 1em;font-style:italic}:host:first-child{margin:10em}";
4
4
 
5
5
  let SmoothlyMenuOptions = class {
6
6
  constructor(hostRef) {
@@ -92,7 +92,7 @@ let SmoothlyMenuOptions = class {
92
92
  }
93
93
  }
94
94
  render() {
95
- 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, "data-highlight": this.highlightIndex == index }, option.description)))) : (h("div", null, this.emptyMenuLabel))));
95
+ 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.description)))) : (h("div", null, this.emptyMenuLabel))));
96
96
  }
97
97
  get element() { return getElement(this); }
98
98
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, i as createEvent, h, k as Host, j as getElement } from './index-02a70ac1.js';
2
2
 
3
- const styleCss = ":host{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:0.5em 1em}:host([data-highlight]){background-color:rgb(var(--smoothly-primary-color));color:rgb(var(--smoothly-primary-contrast));stroke:rgb(var(--smoothly-primary-contrast));fill:rgb(var(--smoothly-primary-contrast))}:host([data-highlight]) div:last-child{color:rgba(var(--smoothly-primary-contrast), 0.8)}:host div:last-child{color:rgba(var(--smoothly-default-contrast), 0.8);font-style:italic}";
3
+ const styleCss = ":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 div:last-child :host div:first-child{color:rgba(var(--smoothly-primary-color), 0.8);font-style:italic}:host([divider]){margin-bottom:0.5em}:host>div[slot=right]{margin-right:100%;color:rgba(var(--smoothly-primary-color), 0.8)}:host([divider])::after{position:absolute;height:1px;width:100%;left:0;bottom:-0.25em;content:\"\";background-color:rgba(var(--smoothly-dark-color))}";
4
4
 
5
5
  let SmoothlyOption = class {
6
6
  constructor(hostRef) {
@@ -8,6 +8,7 @@ let SmoothlyOption = class {
8
8
  this.optionHover = createEvent(this, "optionHover", 7);
9
9
  this.optionSelect = createEvent(this, "optionSelect", 7);
10
10
  this.dataHighlight = false;
11
+ this.divider = false;
11
12
  }
12
13
  onHover(event) {
13
14
  this.optionHover.emit({ name: this.name, value: this.value });
@@ -19,7 +20,7 @@ let SmoothlyOption = class {
19
20
  throw `smoothly-option ${this.element.innerHTML} lacks value-property and can therefore not be selected`;
20
21
  }
21
22
  render() {
22
- return (h(Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, h("div", null, this.name), h("div", null, h("slot", null))));
23
+ return (h(Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, h("div", null, h("slot", { name: "left" })), h("div", { class: "middle" }, this.name), h("div", null, h("slot", { name: "right" }))));
23
24
  }
24
25
  get element() { return getElement(this); }
25
26
  };