smoothly 0.1.105 → 0.1.106
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/smoothly-accordion_48.cjs.entry.js +19 -20
- package/dist/cjs/smoothly-app-demo.cjs.entry.js +10 -10
- 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/collection/components/app-demo/index.js +10 -10
- 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 +19 -20
- package/dist/esm/smoothly-accordion_48.entry.js +19 -20
- package/dist/esm/smoothly-app-demo.entry.js +10 -10
- 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/smoothly/p-c43da6c0.entry.js +1 -0
- package/dist/smoothly/smoothly-app-demo.entry.js +10 -10
- 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/types/model/OptionType.d.ts +2 -1
- package/package.json +1 -1
- package/dist/smoothly/p-e14898a9.entry.js +0 -1
|
@@ -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
|
};
|
|
@@ -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" },
|