smoothly 0.1.105 → 0.1.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/smoothly-accordion_48.cjs.entry.js +31 -28
- package/dist/cjs/smoothly-app-demo.cjs.entry.js +10 -10
- package/dist/cjs/smoothly-input-date-range.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-input-date.cjs.entry.js +10 -6
- package/dist/cjs/smoothly-menu-options.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-option.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-picker.cjs.entry.js +3 -3
- package/dist/cjs/smoothly-select-demo.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-submit.cjs.entry.js +1 -2
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/components/app-demo/index.js +10 -10
- package/dist/collection/components/input-date/index.js +29 -8
- package/dist/collection/components/input-date-range/index.js +3 -3
- package/dist/collection/components/input-date-range/style.css +5 -1
- package/dist/collection/components/menu-options/index.js +3 -1
- package/dist/collection/components/menu-options/style.css +0 -5
- package/dist/collection/components/option/index.js +2 -4
- package/dist/collection/components/option/style.css +3 -8
- package/dist/collection/components/picker/index.js +3 -3
- package/dist/collection/components/select-demo/index.js +1 -1
- package/dist/collection/components/submit/index.js +1 -2
- package/dist/custom-elements/index.js +32 -29
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-accordion_48.entry.js +31 -28
- package/dist/esm/smoothly-app-demo.entry.js +10 -10
- package/dist/esm/smoothly-input-date-range.entry.js +2 -2
- package/dist/esm/smoothly-input-date.entry.js +10 -6
- package/dist/esm/smoothly-menu-options.entry.js +2 -2
- package/dist/esm/smoothly-option.entry.js +2 -2
- package/dist/esm/smoothly-picker.entry.js +3 -3
- package/dist/esm/smoothly-select-demo.entry.js +1 -1
- package/dist/esm/smoothly-submit.entry.js +1 -2
- package/dist/esm/smoothly.js +1 -1
- package/dist/smoothly/p-20a2aabd.entry.js +1 -0
- package/dist/smoothly/smoothly-app-demo.entry.js +10 -10
- package/dist/smoothly/smoothly-input-date-range.entry.js +2 -2
- package/dist/smoothly/smoothly-input-date.entry.js +10 -6
- package/dist/smoothly/smoothly-menu-options.entry.js +2 -2
- package/dist/smoothly/smoothly-option.entry.js +2 -2
- package/dist/smoothly/smoothly-picker.entry.js +3 -3
- package/dist/smoothly/smoothly-select-demo.entry.js +1 -1
- package/dist/smoothly/smoothly-submit.entry.js +1 -2
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/input-date/index.d.ts +1 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/model/OptionType.d.ts +2 -1
- package/package.json +1 -1
- package/dist/smoothly/p-e14898a9.entry.js +0 -1
|
@@ -20,18 +20,13 @@
|
|
|
20
20
|
width: 100%;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
:host div:last-child :host div:first-child {
|
|
24
|
-
color: rgba(var(--smoothly-primary-color), 0.8);
|
|
25
|
-
font-style: italic;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
23
|
:host([divider]) {
|
|
29
24
|
margin-bottom: 0.5em;
|
|
30
25
|
}
|
|
31
26
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
::slotted([slot=right]) {
|
|
28
|
+
font-style: italic;
|
|
29
|
+
white-space: nowrap;
|
|
35
30
|
}
|
|
36
31
|
|
|
37
32
|
:host([divider])::after {
|
|
@@ -107,7 +107,7 @@ export class SmoothlyPicker {
|
|
|
107
107
|
this.filterOptions();
|
|
108
108
|
}
|
|
109
109
|
getCheckHtml(checked) {
|
|
110
|
-
return checked ? (h("smoothly-icon", {
|
|
110
|
+
return checked ? (h("smoothly-icon", { name: "checkbox", size: "small" })) : (h("smoothly-icon", { name: "square-outline", size: "small" }));
|
|
111
111
|
}
|
|
112
112
|
render() {
|
|
113
113
|
var _a, _b, _c, _d;
|
|
@@ -116,13 +116,13 @@ export class SmoothlyPicker {
|
|
|
116
116
|
"--label-display": this.labelSetting == "hide" ? "none" : "absolute",
|
|
117
117
|
};
|
|
118
118
|
(_b = this.options) === null || _b === void 0 ? void 0 : _b.forEach(o => {
|
|
119
|
-
o.
|
|
119
|
+
o.left = this.getCheckHtml(this.selections.map(s => s.value).includes(o.value));
|
|
120
120
|
});
|
|
121
121
|
const options = [
|
|
122
122
|
{
|
|
123
123
|
value: "select-none",
|
|
124
124
|
name: this.selectNoneName,
|
|
125
|
-
|
|
125
|
+
left: this.getCheckHtml(this.selections.length == ((_c = this.options) === null || _c === void 0 ? void 0 : _c.length)),
|
|
126
126
|
divider: true,
|
|
127
127
|
},
|
|
128
128
|
...((_d = this.options) !== null && _d !== void 0 ? _d : []),
|
|
@@ -78,7 +78,7 @@ export class SmoothlySelectDemo {
|
|
|
78
78
|
] }),
|
|
79
79
|
h("br", null),
|
|
80
80
|
h("smoothly-picker", { label: "Single select", multiple: false, "max-menu-height": "200px", options: [
|
|
81
|
-
{ name: "Dog", value: "dog", aliases: ["WOFF"],
|
|
81
|
+
{ name: "Dog", value: "dog", aliases: ["WOFF"], right: "Woof 🐶" },
|
|
82
82
|
{ name: "Cat", value: "cat", aliases: ["moew"] },
|
|
83
83
|
{ name: "Pig", value: "pig" },
|
|
84
84
|
{ name: "Turtle", value: "turtle" },
|
|
@@ -2499,16 +2499,16 @@ let SmoothlyAppDemo$1 = class extends HTMLElement {
|
|
|
2499
2499
|
render() {
|
|
2500
2500
|
return (h(App, { label: "Smoothly Demo" }, h("a", { slot: "nav-start", href: "display" }, "Display"), h("a", { slot: "nav-start", href: "https://google.com" }, "External"), h("smoothly-room", { path: "" }, h("smoothly-input", { type: "text" }, "Default")), h("smoothly-room", { path: "input", label: "Input" }, h("smoothly-input-demo", null)), h("smoothly-room", { path: "dialog", label: "Dialog" }, h("smoothly-dialog-demo", null)), h("smoothly-room", { path: "display", label: "Display", icon: "eye-outline" }, h("smoothly-display-demo", null)), h("smoothly-room", { path: "table", label: "Table" }, h("smoothly-table-demo", null)), h("smoothly-room", { path: "select", label: "Select" }, h("smoothly-select-demo", null)), h("smoothly-room", { path: "icon", label: "Icon" }, h("smoothly-icon-demo", null)), 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: [
|
|
2501
2501
|
{ name: "Big Dog", value: "dog", aliases: ["WOFF"] },
|
|
2502
|
-
{ name: "Cat Stevens", value: "cat", aliases: ["moew"] },
|
|
2503
|
-
{ name: "Noble Pig", value: "pig" },
|
|
2504
|
-
{ name: "Turtle Wax", value: "turtle" },
|
|
2505
|
-
{ name: "Spider Man", value: "spider" },
|
|
2506
|
-
{ name: "Phoenix Order Long Wooord", value: "phoenix" },
|
|
2507
|
-
{ name: "Horse Back", value: "horse" },
|
|
2508
|
-
{ name: "Unicorn Horn", value: "unicorn" },
|
|
2509
|
-
{ name: "Talking Parrot Parrot", value: "parrot" },
|
|
2510
|
-
{ name: "Hidden Dragon", value: "dragon" },
|
|
2511
|
-
{ name: "Scary Kraken", value: "kraken" },
|
|
2502
|
+
{ name: "Cat Stevens", value: "cat", aliases: ["moew"], right: "🐈" },
|
|
2503
|
+
{ name: "Noble Pig", value: "pig", right: "🐷" },
|
|
2504
|
+
{ name: "Turtle Wax", value: "turtle", right: "" },
|
|
2505
|
+
{ name: "Spider Man", value: "spider", right: "" },
|
|
2506
|
+
{ name: "Phoenix Order Long Wooord", value: "phoenix", right: "" },
|
|
2507
|
+
{ name: "Horse Back", value: "horse", right: "" },
|
|
2508
|
+
{ name: "Unicorn Horn", value: "unicorn", right: "" },
|
|
2509
|
+
{ name: "Talking Parrot Parrot", value: "parrot", right: "" },
|
|
2510
|
+
{ name: "Hidden Dragon", value: "dragon", right: "" },
|
|
2511
|
+
{ name: "Scary Kraken", value: "kraken", right: "" },
|
|
2512
2512
|
] })), h("smoothly-trigger", { slot: "header", type: "link", name: "logout" }, h("smoothly-icon", { toolTip: "Log out", name: "log-out", size: "medium" }))));
|
|
2513
2513
|
}
|
|
2514
2514
|
};
|
|
@@ -42854,12 +42854,16 @@ let InputDate = class extends HTMLElement {
|
|
|
42854
42854
|
render() {
|
|
42855
42855
|
var _a;
|
|
42856
42856
|
return [
|
|
42857
|
-
h("smoothly-input", { onClick: () => (this.open = !this.open), type: "date", value: this.value, onSmoothlyChanged: e => (this.value = e.detail.value) }, h("slot", null)),
|
|
42858
|
-
this.open
|
|
42859
|
-
|
|
42860
|
-
this.
|
|
42861
|
-
|
|
42862
|
-
|
|
42857
|
+
h("smoothly-input", { onClick: () => (this.open = !this.open), disabled: this.disabled, type: "date", value: this.value, onSmoothlyChanged: e => (this.value = e.detail.value) }, h("slot", null)),
|
|
42858
|
+
this.open && !this.disabled
|
|
42859
|
+
? [
|
|
42860
|
+
h("div", { onClick: () => (this.open = false) }),
|
|
42861
|
+
h("nav", null, h("div", { class: "arrow" }), h("smoothly-calendar", { doubleInput: false, value: (_a = this.value) !== null && _a !== void 0 ? _a : dist$3.Date.now(), onValueChanged: event => {
|
|
42862
|
+
this.value = event.detail;
|
|
42863
|
+
event.stopPropagation();
|
|
42864
|
+
}, max: this.max, min: this.min })),
|
|
42865
|
+
]
|
|
42866
|
+
: [],
|
|
42863
42867
|
];
|
|
42864
42868
|
}
|
|
42865
42869
|
static get watchers() { return {
|
|
@@ -42868,7 +42872,7 @@ let InputDate = class extends HTMLElement {
|
|
|
42868
42872
|
static get style() { return styleCss$u; }
|
|
42869
42873
|
};
|
|
42870
42874
|
|
|
42871
|
-
const styleCss$t = ".sc-smoothly-input-date-range-h{position:relative;display:block}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-range-h>div.sc-smoothly-input-date-range{position:fixed;top:0px;left:0px;right:0px;bottom:0px;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range>.arrow.sc-smoothly-input-date-range{position:absolute;z-index:9;transform:translate(10em, -0.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-default-shade))}.sc-smoothly-input-date-range-h>section.sc-smoothly-input-date-range{display:flex}smoothly-input.sc-smoothly-input-date-range{border-radius:var(--border-radius, none);background-color:
|
|
42875
|
+
const styleCss$t = ".sc-smoothly-input-date-range-h{position:relative;display:block;width:fit-content}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-range-h>div.sc-smoothly-input-date-range{position:fixed;top:0px;left:0px;right:0px;bottom:0px;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range>.arrow.sc-smoothly-input-date-range{position:absolute;z-index:9;transform:translate(10em, -0.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-default-shade))}.sc-smoothly-input-date-range-h>section.sc-smoothly-input-date-range{display:flex;background-color:var(--background, transparent);border-radius:0.25rem;cursor:pointer}smoothly-input.sc-smoothly-input-date-range{border-radius:var(--border-radius, none);background-color:transparent;width:var(--input-width)}span.sc-smoothly-input-date-range{padding:0.5em 0.2em 0.5em 0.2em;align-self:center}";
|
|
42872
42876
|
|
|
42873
42877
|
let InputDateRange = class extends HTMLElement {
|
|
42874
42878
|
constructor() {
|
|
@@ -42896,7 +42900,7 @@ let InputDateRange = class extends HTMLElement {
|
|
|
42896
42900
|
render() {
|
|
42897
42901
|
var _a;
|
|
42898
42902
|
return [
|
|
42899
|
-
h("section",
|
|
42903
|
+
h("section", { onClick: () => (this.open = !this.open) }, h("smoothly-input", { type: "date", value: this.start, showLabel: this.showLabel, onSmoothlyChanged: e => (this.start = e.detail.value) }, "from"), h("span", null, "\u2013"), h("smoothly-input", { type: "date", showLabel: this.showLabel, value: this.end, onSmoothlyChanged: e => (this.end = e.detail.value) }, "to")),
|
|
42900
42904
|
this.open ? h("div", { onClick: () => (this.open = false) }) : [],
|
|
42901
42905
|
this.open ? (h("nav", null, h("div", { class: "arrow" }), h("smoothly-calendar", { doubleInput: true, value: (_a = this.value) !== null && _a !== void 0 ? _a : dist$3.Date.now(), onValueChanged: event => {
|
|
42902
42906
|
this.value = event.detail;
|
|
@@ -42992,7 +42996,7 @@ let Item = class extends HTMLElement {
|
|
|
42992
42996
|
static get style() { return styleCss$r; }
|
|
42993
42997
|
};
|
|
42994
42998
|
|
|
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}
|
|
42999
|
+
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}:host:first-child{margin:10em}";
|
|
42996
43000
|
|
|
42997
43001
|
let SmoothlyMenuOptions$1 = class extends HTMLElement {
|
|
42998
43002
|
constructor() {
|
|
@@ -43086,7 +43090,7 @@ let SmoothlyMenuOptions$1 = class extends HTMLElement {
|
|
|
43086
43090
|
}
|
|
43087
43091
|
}
|
|
43088
43092
|
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, divider: option.divider, "data-highlight": this.highlightIndex == index }, option.
|
|
43093
|
+
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)))) : (h("div", null, this.emptyMenuLabel))));
|
|
43090
43094
|
}
|
|
43091
43095
|
get element() { return this; }
|
|
43092
43096
|
static get watchers() { return {
|
|
@@ -43179,7 +43183,7 @@ let Notifier = class extends HTMLElement {
|
|
|
43179
43183
|
static get style() { return styleCss$o; }
|
|
43180
43184
|
};
|
|
43181
43185
|
|
|
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
|
|
43186
|
+
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([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))}";
|
|
43183
43187
|
|
|
43184
43188
|
let SmoothlyOption$1 = class extends HTMLElement {
|
|
43185
43189
|
constructor() {
|
|
@@ -43201,7 +43205,7 @@ let SmoothlyOption$1 = class extends HTMLElement {
|
|
|
43201
43205
|
throw `smoothly-option ${this.element.innerHTML} lacks value-property and can therefore not be selected`;
|
|
43202
43206
|
}
|
|
43203
43207
|
render() {
|
|
43204
|
-
return (h(Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, h("
|
|
43208
|
+
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" })));
|
|
43205
43209
|
}
|
|
43206
43210
|
get element() { return this; }
|
|
43207
43211
|
static get style() { return styleCss$n; }
|
|
@@ -43321,7 +43325,7 @@ let SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
43321
43325
|
this.filterOptions();
|
|
43322
43326
|
}
|
|
43323
43327
|
getCheckHtml(checked) {
|
|
43324
|
-
return checked ? (h("smoothly-icon", {
|
|
43328
|
+
return checked ? (h("smoothly-icon", { name: "checkbox", size: "small" })) : (h("smoothly-icon", { name: "square-outline", size: "small" }));
|
|
43325
43329
|
}
|
|
43326
43330
|
render() {
|
|
43327
43331
|
var _a, _b, _c, _d;
|
|
@@ -43330,13 +43334,13 @@ let SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
43330
43334
|
"--label-display": this.labelSetting == "hide" ? "none" : "absolute",
|
|
43331
43335
|
};
|
|
43332
43336
|
(_b = this.options) === null || _b === void 0 ? void 0 : _b.forEach(o => {
|
|
43333
|
-
o.
|
|
43337
|
+
o.left = this.getCheckHtml(this.selections.map(s => s.value).includes(o.value));
|
|
43334
43338
|
});
|
|
43335
43339
|
const options = [
|
|
43336
43340
|
{
|
|
43337
43341
|
value: "select-none",
|
|
43338
43342
|
name: this.selectNoneName,
|
|
43339
|
-
|
|
43343
|
+
left: this.getCheckHtml(this.selections.length == ((_c = this.options) === null || _c === void 0 ? void 0 : _c.length)),
|
|
43340
43344
|
divider: true,
|
|
43341
43345
|
},
|
|
43342
43346
|
...((_d = this.options) !== null && _d !== void 0 ? _d : []),
|
|
@@ -43628,7 +43632,7 @@ let SmoothlySelectDemo$1 = class extends HTMLElement {
|
|
|
43628
43632
|
] }),
|
|
43629
43633
|
h("br", null),
|
|
43630
43634
|
h("smoothly-picker", { label: "Single select", multiple: false, "max-menu-height": "200px", options: [
|
|
43631
|
-
{ name: "Dog", value: "dog", aliases: ["WOFF"],
|
|
43635
|
+
{ name: "Dog", value: "dog", aliases: ["WOFF"], right: "Woof 🐶" },
|
|
43632
43636
|
{ name: "Cat", value: "cat", aliases: ["moew"] },
|
|
43633
43637
|
{ name: "Pig", value: "pig" },
|
|
43634
43638
|
{ name: "Turtle", value: "turtle" },
|
|
@@ -43809,8 +43813,7 @@ let SmoothlySubmit$1 = class extends HTMLElement {
|
|
|
43809
43813
|
result[element.name] = element.value;
|
|
43810
43814
|
}
|
|
43811
43815
|
}
|
|
43812
|
-
|
|
43813
|
-
console.log("smoothly-submit", innerEvent);
|
|
43816
|
+
this.submitEvent.emit(result);
|
|
43814
43817
|
this.processing = false;
|
|
43815
43818
|
}
|
|
43816
43819
|
}
|
|
@@ -44191,7 +44194,7 @@ const SmoothlyGoogleFont = /*@__PURE__*/proxyCustomElement(SmoothlyGoogleFont$1,
|
|
|
44191
44194
|
const SmoothlyIcon = /*@__PURE__*/proxyCustomElement(SmoothlyIcon$1, [2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]);
|
|
44192
44195
|
const SmoothlyIconDemo = /*@__PURE__*/proxyCustomElement(SmoothlyIconDemo$1, [2,"smoothly-icon-demo"]);
|
|
44193
44196
|
const SmoothlyInput = /*@__PURE__*/proxyCustomElement(SmoothlyInput$1, [6,"smoothly-input",{"name":[513],"value":[1032],"type":[513],"required":[1540],"minLength":[1026,"min-length"],"showLabel":[516,"show-label"],"maxLength":[1026,"max-length"],"autocomplete":[1028],"pattern":[1040],"placeholder":[1025],"disabled":[1028],"currency":[513]}]);
|
|
44194
|
-
const SmoothlyInputDate = /*@__PURE__*/proxyCustomElement(InputDate, [6,"smoothly-input-date",{"value":[1025],"open":[1028],"max":[1025],"min":[1025]},[[0,"dateSet","dateSetHandler"]]]);
|
|
44197
|
+
const SmoothlyInputDate = /*@__PURE__*/proxyCustomElement(InputDate, [6,"smoothly-input-date",{"value":[1025],"open":[1028],"max":[1025],"min":[1025],"disabled":[1028]},[[0,"dateSet","dateSetHandler"]]]);
|
|
44195
44198
|
const SmoothlyInputDateRange = /*@__PURE__*/proxyCustomElement(InputDateRange, [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"]]]);
|
|
44196
44199
|
const SmoothlyInputDemo = /*@__PURE__*/proxyCustomElement(SmoothlyInputDemo$1, [0,"smoothly-input-demo"]);
|
|
44197
44200
|
const SmoothlyInputMonth = /*@__PURE__*/proxyCustomElement(MonthSelector, [2,"smoothly-input-month",{"value":[1025]}]);
|
package/dist/esm/loader.js
CHANGED
|
@@ -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"],"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);
|
|
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],"disabled":[1028]},[[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
|
|
|
@@ -117,16 +117,16 @@ let SmoothlyAppDemo = class {
|
|
|
117
117
|
render() {
|
|
118
118
|
return (h(App, { label: "Smoothly Demo" }, h("a", { slot: "nav-start", href: "display" }, "Display"), h("a", { slot: "nav-start", href: "https://google.com" }, "External"), h("smoothly-room", { path: "" }, h("smoothly-input", { type: "text" }, "Default")), h("smoothly-room", { path: "input", label: "Input" }, h("smoothly-input-demo", null)), h("smoothly-room", { path: "dialog", label: "Dialog" }, h("smoothly-dialog-demo", null)), h("smoothly-room", { path: "display", label: "Display", icon: "eye-outline" }, h("smoothly-display-demo", null)), h("smoothly-room", { path: "table", label: "Table" }, h("smoothly-table-demo", null)), h("smoothly-room", { path: "select", label: "Select" }, h("smoothly-select-demo", null)), h("smoothly-room", { path: "icon", label: "Icon" }, h("smoothly-icon-demo", null)), 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: [
|
|
119
119
|
{ name: "Big Dog", value: "dog", aliases: ["WOFF"] },
|
|
120
|
-
{ name: "Cat Stevens", value: "cat", aliases: ["moew"] },
|
|
121
|
-
{ name: "Noble Pig", value: "pig" },
|
|
122
|
-
{ name: "Turtle Wax", value: "turtle" },
|
|
123
|
-
{ name: "Spider Man", value: "spider" },
|
|
124
|
-
{ name: "Phoenix Order Long Wooord", value: "phoenix" },
|
|
125
|
-
{ name: "Horse Back", value: "horse" },
|
|
126
|
-
{ name: "Unicorn Horn", value: "unicorn" },
|
|
127
|
-
{ name: "Talking Parrot Parrot", value: "parrot" },
|
|
128
|
-
{ name: "Hidden Dragon", value: "dragon" },
|
|
129
|
-
{ name: "Scary Kraken", value: "kraken" },
|
|
120
|
+
{ name: "Cat Stevens", value: "cat", aliases: ["moew"], right: "🐈" },
|
|
121
|
+
{ name: "Noble Pig", value: "pig", right: "🐷" },
|
|
122
|
+
{ name: "Turtle Wax", value: "turtle", right: "" },
|
|
123
|
+
{ name: "Spider Man", value: "spider", right: "" },
|
|
124
|
+
{ name: "Phoenix Order Long Wooord", value: "phoenix", right: "" },
|
|
125
|
+
{ name: "Horse Back", value: "horse", right: "" },
|
|
126
|
+
{ name: "Unicorn Horn", value: "unicorn", right: "" },
|
|
127
|
+
{ name: "Talking Parrot Parrot", value: "parrot", right: "" },
|
|
128
|
+
{ name: "Hidden Dragon", value: "dragon", right: "" },
|
|
129
|
+
{ name: "Scary Kraken", value: "kraken", right: "" },
|
|
130
130
|
] })), h("smoothly-trigger", { slot: "header", type: "link", name: "logout" }, h("smoothly-icon", { toolTip: "Log out", name: "log-out", size: "medium" }))));
|
|
131
131
|
}
|
|
132
132
|
};
|
|
@@ -39880,12 +39880,16 @@ let InputDate = class {
|
|
|
39880
39880
|
render() {
|
|
39881
39881
|
var _a;
|
|
39882
39882
|
return [
|
|
39883
|
-
h("smoothly-input", { onClick: () => (this.open = !this.open), type: "date", value: this.value, onSmoothlyChanged: e => (this.value = e.detail.value) }, h("slot", null)),
|
|
39884
|
-
this.open
|
|
39885
|
-
|
|
39886
|
-
this.
|
|
39887
|
-
|
|
39888
|
-
|
|
39883
|
+
h("smoothly-input", { onClick: () => (this.open = !this.open), disabled: this.disabled, type: "date", value: this.value, onSmoothlyChanged: e => (this.value = e.detail.value) }, h("slot", null)),
|
|
39884
|
+
this.open && !this.disabled
|
|
39885
|
+
? [
|
|
39886
|
+
h("div", { onClick: () => (this.open = false) }),
|
|
39887
|
+
h("nav", null, h("div", { class: "arrow" }), h("smoothly-calendar", { doubleInput: false, value: (_a = this.value) !== null && _a !== void 0 ? _a : dist$3.Date.now(), onValueChanged: event => {
|
|
39888
|
+
this.value = event.detail;
|
|
39889
|
+
event.stopPropagation();
|
|
39890
|
+
}, max: this.max, min: this.min })),
|
|
39891
|
+
]
|
|
39892
|
+
: [],
|
|
39889
39893
|
];
|
|
39890
39894
|
}
|
|
39891
39895
|
static get watchers() { return {
|
|
@@ -39894,7 +39898,7 @@ let InputDate = class {
|
|
|
39894
39898
|
};
|
|
39895
39899
|
InputDate.style = styleCss$q;
|
|
39896
39900
|
|
|
39897
|
-
const styleCss$p = ".sc-smoothly-input-date-range-h{position:relative;display:block}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-range-h>div.sc-smoothly-input-date-range{position:fixed;top:0px;left:0px;right:0px;bottom:0px;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range>.arrow.sc-smoothly-input-date-range{position:absolute;z-index:9;transform:translate(10em, -0.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-default-shade))}.sc-smoothly-input-date-range-h>section.sc-smoothly-input-date-range{display:flex}smoothly-input.sc-smoothly-input-date-range{border-radius:var(--border-radius, none);background-color:
|
|
39901
|
+
const styleCss$p = ".sc-smoothly-input-date-range-h{position:relative;display:block;width:fit-content}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-range-h>div.sc-smoothly-input-date-range{position:fixed;top:0px;left:0px;right:0px;bottom:0px;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range>.arrow.sc-smoothly-input-date-range{position:absolute;z-index:9;transform:translate(10em, -0.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-default-shade))}.sc-smoothly-input-date-range-h>section.sc-smoothly-input-date-range{display:flex;background-color:var(--background, transparent);border-radius:0.25rem;cursor:pointer}smoothly-input.sc-smoothly-input-date-range{border-radius:var(--border-radius, none);background-color:transparent;width:var(--input-width)}span.sc-smoothly-input-date-range{padding:0.5em 0.2em 0.5em 0.2em;align-self:center}";
|
|
39898
39902
|
|
|
39899
39903
|
let InputDateRange = class {
|
|
39900
39904
|
constructor(hostRef) {
|
|
@@ -39921,7 +39925,7 @@ let InputDateRange = class {
|
|
|
39921
39925
|
render() {
|
|
39922
39926
|
var _a;
|
|
39923
39927
|
return [
|
|
39924
|
-
h("section",
|
|
39928
|
+
h("section", { onClick: () => (this.open = !this.open) }, h("smoothly-input", { type: "date", value: this.start, showLabel: this.showLabel, onSmoothlyChanged: e => (this.start = e.detail.value) }, "from"), h("span", null, "\u2013"), h("smoothly-input", { type: "date", showLabel: this.showLabel, value: this.end, onSmoothlyChanged: e => (this.end = e.detail.value) }, "to")),
|
|
39925
39929
|
this.open ? h("div", { onClick: () => (this.open = false) }) : [],
|
|
39926
39930
|
this.open ? (h("nav", null, h("div", { class: "arrow" }), h("smoothly-calendar", { doubleInput: true, value: (_a = this.value) !== null && _a !== void 0 ? _a : dist$3.Date.now(), onValueChanged: event => {
|
|
39927
39931
|
this.value = event.detail;
|
|
@@ -40014,7 +40018,7 @@ let Item = class {
|
|
|
40014
40018
|
};
|
|
40015
40019
|
Item.style = styleCss$n;
|
|
40016
40020
|
|
|
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}
|
|
40021
|
+
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}:host:first-child{margin:10em}";
|
|
40018
40022
|
|
|
40019
40023
|
let SmoothlyMenuOptions = class {
|
|
40020
40024
|
constructor(hostRef) {
|
|
@@ -40106,7 +40110,7 @@ let SmoothlyMenuOptions = class {
|
|
|
40106
40110
|
}
|
|
40107
40111
|
}
|
|
40108
40112
|
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, divider: option.divider, "data-highlight": this.highlightIndex == index }, option.
|
|
40113
|
+
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)))) : (h("div", null, this.emptyMenuLabel))));
|
|
40110
40114
|
}
|
|
40111
40115
|
get element() { return getElement(this); }
|
|
40112
40116
|
static get watchers() { return {
|
|
@@ -40197,7 +40201,7 @@ let Notifier = class {
|
|
|
40197
40201
|
};
|
|
40198
40202
|
Notifier.style = styleCss$k;
|
|
40199
40203
|
|
|
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
|
|
40204
|
+
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([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))}";
|
|
40201
40205
|
|
|
40202
40206
|
let SmoothlyOption = class {
|
|
40203
40207
|
constructor(hostRef) {
|
|
@@ -40217,7 +40221,7 @@ let SmoothlyOption = class {
|
|
|
40217
40221
|
throw `smoothly-option ${this.element.innerHTML} lacks value-property and can therefore not be selected`;
|
|
40218
40222
|
}
|
|
40219
40223
|
render() {
|
|
40220
|
-
return (h(Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, h("
|
|
40224
|
+
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" })));
|
|
40221
40225
|
}
|
|
40222
40226
|
get element() { return getElement(this); }
|
|
40223
40227
|
};
|
|
@@ -40335,7 +40339,7 @@ let SmoothlyPicker = class {
|
|
|
40335
40339
|
this.filterOptions();
|
|
40336
40340
|
}
|
|
40337
40341
|
getCheckHtml(checked) {
|
|
40338
|
-
return checked ? (h("smoothly-icon", {
|
|
40342
|
+
return checked ? (h("smoothly-icon", { name: "checkbox", size: "small" })) : (h("smoothly-icon", { name: "square-outline", size: "small" }));
|
|
40339
40343
|
}
|
|
40340
40344
|
render() {
|
|
40341
40345
|
var _a, _b, _c, _d;
|
|
@@ -40344,13 +40348,13 @@ let SmoothlyPicker = class {
|
|
|
40344
40348
|
"--label-display": this.labelSetting == "hide" ? "none" : "absolute",
|
|
40345
40349
|
};
|
|
40346
40350
|
(_b = this.options) === null || _b === void 0 ? void 0 : _b.forEach(o => {
|
|
40347
|
-
o.
|
|
40351
|
+
o.left = this.getCheckHtml(this.selections.map(s => s.value).includes(o.value));
|
|
40348
40352
|
});
|
|
40349
40353
|
const options = [
|
|
40350
40354
|
{
|
|
40351
40355
|
value: "select-none",
|
|
40352
40356
|
name: this.selectNoneName,
|
|
40353
|
-
|
|
40357
|
+
left: this.getCheckHtml(this.selections.length == ((_c = this.options) === null || _c === void 0 ? void 0 : _c.length)),
|
|
40354
40358
|
divider: true,
|
|
40355
40359
|
},
|
|
40356
40360
|
...((_d = this.options) !== null && _d !== void 0 ? _d : []),
|
|
@@ -40525,7 +40529,7 @@ let SmoothlySelectDemo = class {
|
|
|
40525
40529
|
] }),
|
|
40526
40530
|
h("br", null),
|
|
40527
40531
|
h("smoothly-picker", { label: "Single select", multiple: false, "max-menu-height": "200px", options: [
|
|
40528
|
-
{ name: "Dog", value: "dog", aliases: ["WOFF"],
|
|
40532
|
+
{ name: "Dog", value: "dog", aliases: ["WOFF"], right: "Woof 🐶" },
|
|
40529
40533
|
{ name: "Cat", value: "cat", aliases: ["moew"] },
|
|
40530
40534
|
{ name: "Pig", value: "pig" },
|
|
40531
40535
|
{ name: "Turtle", value: "turtle" },
|
|
@@ -40703,8 +40707,7 @@ let SmoothlySubmit = class {
|
|
|
40703
40707
|
result[element.name] = element.value;
|
|
40704
40708
|
}
|
|
40705
40709
|
}
|
|
40706
|
-
|
|
40707
|
-
console.log("smoothly-submit", innerEvent);
|
|
40710
|
+
this.submitEvent.emit(result);
|
|
40708
40711
|
this.processing = false;
|
|
40709
40712
|
}
|
|
40710
40713
|
}
|
|
@@ -8,16 +8,16 @@ let SmoothlyAppDemo = class {
|
|
|
8
8
|
render() {
|
|
9
9
|
return (h(App, { label: "Smoothly Demo" }, h("a", { slot: "nav-start", href: "display" }, "Display"), h("a", { slot: "nav-start", href: "https://google.com" }, "External"), h("smoothly-room", { path: "" }, h("smoothly-input", { type: "text" }, "Default")), h("smoothly-room", { path: "input", label: "Input" }, h("smoothly-input-demo", null)), h("smoothly-room", { path: "dialog", label: "Dialog" }, h("smoothly-dialog-demo", null)), h("smoothly-room", { path: "display", label: "Display", icon: "eye-outline" }, h("smoothly-display-demo", null)), h("smoothly-room", { path: "table", label: "Table" }, h("smoothly-table-demo", null)), h("smoothly-room", { path: "select", label: "Select" }, h("smoothly-select-demo", null)), h("smoothly-room", { path: "icon", label: "Icon" }, h("smoothly-icon-demo", null)), 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: [
|
|
10
10
|
{ name: "Big Dog", value: "dog", aliases: ["WOFF"] },
|
|
11
|
-
{ name: "Cat Stevens", value: "cat", aliases: ["moew"] },
|
|
12
|
-
{ name: "Noble Pig", value: "pig" },
|
|
13
|
-
{ name: "Turtle Wax", value: "turtle" },
|
|
14
|
-
{ name: "Spider Man", value: "spider" },
|
|
15
|
-
{ name: "Phoenix Order Long Wooord", value: "phoenix" },
|
|
16
|
-
{ name: "Horse Back", value: "horse" },
|
|
17
|
-
{ name: "Unicorn Horn", value: "unicorn" },
|
|
18
|
-
{ name: "Talking Parrot Parrot", value: "parrot" },
|
|
19
|
-
{ name: "Hidden Dragon", value: "dragon" },
|
|
20
|
-
{ name: "Scary Kraken", value: "kraken" },
|
|
11
|
+
{ name: "Cat Stevens", value: "cat", aliases: ["moew"], right: "🐈" },
|
|
12
|
+
{ name: "Noble Pig", value: "pig", right: "🐷" },
|
|
13
|
+
{ name: "Turtle Wax", value: "turtle", right: "" },
|
|
14
|
+
{ name: "Spider Man", value: "spider", right: "" },
|
|
15
|
+
{ name: "Phoenix Order Long Wooord", value: "phoenix", right: "" },
|
|
16
|
+
{ name: "Horse Back", value: "horse", right: "" },
|
|
17
|
+
{ name: "Unicorn Horn", value: "unicorn", right: "" },
|
|
18
|
+
{ name: "Talking Parrot Parrot", value: "parrot", right: "" },
|
|
19
|
+
{ name: "Hidden Dragon", value: "dragon", right: "" },
|
|
20
|
+
{ name: "Scary Kraken", value: "kraken", right: "" },
|
|
21
21
|
] })), h("smoothly-trigger", { slot: "header", type: "link", name: "logout" }, h("smoothly-icon", { toolTip: "Log out", name: "log-out", size: "medium" }))));
|
|
22
22
|
}
|
|
23
23
|
};
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, i as createEvent, h } from './index-02a70ac1.js'
|
|
|
2
2
|
import { d as dist } from './index-a5a08f46.js';
|
|
3
3
|
import './_commonjsHelpers-8fe71198.js';
|
|
4
4
|
|
|
5
|
-
const styleCss = ".sc-smoothly-input-date-range-h{position:relative;display:block}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-range-h>div.sc-smoothly-input-date-range{position:fixed;top:0px;left:0px;right:0px;bottom:0px;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range>.arrow.sc-smoothly-input-date-range{position:absolute;z-index:9;transform:translate(10em, -0.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-default-shade))}.sc-smoothly-input-date-range-h>section.sc-smoothly-input-date-range{display:flex}smoothly-input.sc-smoothly-input-date-range{border-radius:var(--border-radius, none);background-color:
|
|
5
|
+
const styleCss = ".sc-smoothly-input-date-range-h{position:relative;display:block;width:fit-content}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-range-h>div.sc-smoothly-input-date-range{position:fixed;top:0px;left:0px;right:0px;bottom:0px;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range>.arrow.sc-smoothly-input-date-range{position:absolute;z-index:9;transform:translate(10em, -0.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-default-shade))}.sc-smoothly-input-date-range-h>section.sc-smoothly-input-date-range{display:flex;background-color:var(--background, transparent);border-radius:0.25rem;cursor:pointer}smoothly-input.sc-smoothly-input-date-range{border-radius:var(--border-radius, none);background-color:transparent;width:var(--input-width)}span.sc-smoothly-input-date-range{padding:0.5em 0.2em 0.5em 0.2em;align-self:center}";
|
|
6
6
|
|
|
7
7
|
let InputDateRange = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -29,7 +29,7 @@ let InputDateRange = class {
|
|
|
29
29
|
render() {
|
|
30
30
|
var _a;
|
|
31
31
|
return [
|
|
32
|
-
h("section",
|
|
32
|
+
h("section", { onClick: () => (this.open = !this.open) }, h("smoothly-input", { type: "date", value: this.start, showLabel: this.showLabel, onSmoothlyChanged: e => (this.start = e.detail.value) }, "from"), h("span", null, "\u2013"), h("smoothly-input", { type: "date", showLabel: this.showLabel, value: this.end, onSmoothlyChanged: e => (this.end = e.detail.value) }, "to")),
|
|
33
33
|
this.open ? h("div", { onClick: () => (this.open = false) }) : [],
|
|
34
34
|
this.open ? (h("nav", null, h("div", { class: "arrow" }), h("smoothly-calendar", { doubleInput: true, value: (_a = this.value) !== null && _a !== void 0 ? _a : dist.Date.now(), onValueChanged: event => {
|
|
35
35
|
this.value = event.detail;
|
|
@@ -19,12 +19,16 @@ let InputDate = class {
|
|
|
19
19
|
render() {
|
|
20
20
|
var _a;
|
|
21
21
|
return [
|
|
22
|
-
h("smoothly-input", { onClick: () => (this.open = !this.open), type: "date", value: this.value, onSmoothlyChanged: e => (this.value = e.detail.value) }, h("slot", null)),
|
|
23
|
-
this.open
|
|
24
|
-
|
|
25
|
-
this.
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
h("smoothly-input", { onClick: () => (this.open = !this.open), disabled: this.disabled, type: "date", value: this.value, onSmoothlyChanged: e => (this.value = e.detail.value) }, h("slot", null)),
|
|
23
|
+
this.open && !this.disabled
|
|
24
|
+
? [
|
|
25
|
+
h("div", { onClick: () => (this.open = false) }),
|
|
26
|
+
h("nav", null, h("div", { class: "arrow" }), h("smoothly-calendar", { doubleInput: false, value: (_a = this.value) !== null && _a !== void 0 ? _a : dist.Date.now(), onValueChanged: event => {
|
|
27
|
+
this.value = event.detail;
|
|
28
|
+
event.stopPropagation();
|
|
29
|
+
}, max: this.max, min: this.min })),
|
|
30
|
+
]
|
|
31
|
+
: [],
|
|
28
32
|
];
|
|
29
33
|
}
|
|
30
34
|
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);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}
|
|
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}: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, divider: option.divider, "data-highlight": this.highlightIndex == index }, option.
|
|
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.left ? h("div", { slot: "left" }, option.left) : undefined, option.right ? h("div", { slot: "right" }, option.right) : undefined)))) : (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: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
|
|
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([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))}";
|
|
4
4
|
|
|
5
5
|
let SmoothlyOption = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -20,7 +20,7 @@ let SmoothlyOption = class {
|
|
|
20
20
|
throw `smoothly-option ${this.element.innerHTML} lacks value-property and can therefore not be selected`;
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, h("
|
|
23
|
+
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" })));
|
|
24
24
|
}
|
|
25
25
|
get element() { return getElement(this); }
|
|
26
26
|
};
|
|
@@ -112,7 +112,7 @@ let SmoothlyPicker = class {
|
|
|
112
112
|
this.filterOptions();
|
|
113
113
|
}
|
|
114
114
|
getCheckHtml(checked) {
|
|
115
|
-
return checked ? (h("smoothly-icon", {
|
|
115
|
+
return checked ? (h("smoothly-icon", { name: "checkbox", size: "small" })) : (h("smoothly-icon", { name: "square-outline", size: "small" }));
|
|
116
116
|
}
|
|
117
117
|
render() {
|
|
118
118
|
var _a, _b, _c, _d;
|
|
@@ -121,13 +121,13 @@ let SmoothlyPicker = class {
|
|
|
121
121
|
"--label-display": this.labelSetting == "hide" ? "none" : "absolute",
|
|
122
122
|
};
|
|
123
123
|
(_b = this.options) === null || _b === void 0 ? void 0 : _b.forEach(o => {
|
|
124
|
-
o.
|
|
124
|
+
o.left = this.getCheckHtml(this.selections.map(s => s.value).includes(o.value));
|
|
125
125
|
});
|
|
126
126
|
const options = [
|
|
127
127
|
{
|
|
128
128
|
value: "select-none",
|
|
129
129
|
name: this.selectNoneName,
|
|
130
|
-
|
|
130
|
+
left: this.getCheckHtml(this.selections.length == ((_c = this.options) === null || _c === void 0 ? void 0 : _c.length)),
|
|
131
131
|
divider: true,
|
|
132
132
|
},
|
|
133
133
|
...((_d = this.options) !== null && _d !== void 0 ? _d : []),
|
|
@@ -61,7 +61,7 @@ let SmoothlySelectDemo = class {
|
|
|
61
61
|
] }),
|
|
62
62
|
h("br", null),
|
|
63
63
|
h("smoothly-picker", { label: "Single select", multiple: false, "max-menu-height": "200px", options: [
|
|
64
|
-
{ name: "Dog", value: "dog", aliases: ["WOFF"],
|
|
64
|
+
{ name: "Dog", value: "dog", aliases: ["WOFF"], right: "Woof 🐶" },
|
|
65
65
|
{ name: "Cat", value: "cat", aliases: ["moew"] },
|
|
66
66
|
{ name: "Pig", value: "pig" },
|
|
67
67
|
{ name: "Turtle", value: "turtle" },
|