smoothly 0.3.23 → 0.3.25
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_53.cjs.entry.js +8 -13
- package/dist/collection/components/app-demo/index.js +1 -1
- package/dist/collection/components/button/index.js +1 -1
- package/dist/collection/components/button/style.css +5 -1
- package/dist/collection/components/selector/index.js +5 -10
- package/dist/custom-elements/index.js +8 -13
- package/dist/esm/smoothly-accordion_53.entry.js +8 -13
- package/dist/smoothly/p-67aac6ff.entry.js +1 -0
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/package.json +1 -1
- package/dist/smoothly/p-605a20ab.entry.js +0 -1
|
@@ -120,7 +120,7 @@ const SmoothlyAppDemo = class {
|
|
|
120
120
|
index.registerInstance(this, hostRef);
|
|
121
121
|
}
|
|
122
122
|
render() {
|
|
123
|
-
return (index.h(index$1.App, { label: "Smoothly Demo" }, index.h("a", { slot: "nav-start", href: "display" }, "Display"), index.h("a", { slot: "nav-start", href: "https://google.com" }, "External"), index.h("smoothly-room", { path: "" }, index.h("smoothly-input", { type: "text" }, "Default"), index.h("div", { style: { padding: "1em", maxWidth: "12em" } }, index.h("smoothly-button", { fill: "solid", color: "danger", link: "https://google.com" }, "open"), index.h("smoothly-button", { fill: "solid", color: "danger", link: "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf", download: true }, "download"), index.h("smoothly-button", { fill: "solid", color: "danger", onClick: () => alert("clicked") }, "action"), index.h("smoothly-button", { type: "link", fill: "clear", color: "danger", onClick: () => alert("clicked") }, "action link"))), index.h("smoothly-room", { path: "input", label: "Input" }, index.h("smoothly-input-demo", null)), index.h("smoothly-room", { path: "dialog", label: "Dialog" }, index.h("smoothly-dialog-demo", null)), index.h("smoothly-room", { path: "display", label: "Display", icon: "eye-outline" }, index.h("smoothly-display-demo", null)), index.h("smoothly-room", { path: "table", label: "Table" }, index.h("smoothly-table-demo", null)), index.h("smoothly-room", { path: "select", label: "Select" }, index.h("smoothly-select-demo", null)), index.h("smoothly-room", { path: "icon", label: "Icon" }, index.h("smoothly-icon-demo", null)), index.h("smoothly-room", { path: "/redirect", label: "Redirect" }, index.h("smoothly-button", { style: { "max-width": "300px" }, onClick: () => {
|
|
123
|
+
return (index.h(index$1.App, { label: "Smoothly Demo" }, index.h("a", { slot: "nav-start", href: "display" }, "Display"), index.h("a", { slot: "nav-start", href: "https://google.com" }, "External"), index.h("smoothly-room", { path: "" }, index.h("smoothly-input", { type: "text" }, "Default"), index.h("div", { style: { padding: "1em", maxWidth: "12em" } }, index.h("smoothly-button", { fill: "solid", color: "danger", link: "https://google.com" }, "open"), index.h("smoothly-button", { fill: "solid", color: "danger", link: "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf", download: true }, "download"), index.h("smoothly-button", { fill: "solid", color: "danger", onClick: () => alert("clicked") }, "action"), index.h("smoothly-button", { disabled: true, fill: "solid", color: "danger", onClick: () => alert("clicked") }, "action"), index.h("smoothly-button", { type: "link", fill: "clear", color: "danger", onClick: () => alert("clicked") }, "action link"))), index.h("smoothly-room", { path: "input", label: "Input" }, index.h("smoothly-input-demo", null)), index.h("smoothly-room", { path: "dialog", label: "Dialog" }, index.h("smoothly-dialog-demo", null)), index.h("smoothly-room", { path: "display", label: "Display", icon: "eye-outline" }, index.h("smoothly-display-demo", null)), index.h("smoothly-room", { path: "table", label: "Table" }, index.h("smoothly-table-demo", null)), index.h("smoothly-room", { path: "select", label: "Select" }, index.h("smoothly-select-demo", null)), index.h("smoothly-room", { path: "icon", label: "Icon" }, index.h("smoothly-icon-demo", null)), index.h("smoothly-room", { path: "/redirect", label: "Redirect" }, index.h("smoothly-button", { style: { "max-width": "300px" }, onClick: () => {
|
|
124
124
|
index$1.redirect("/routing/pathParameter1");
|
|
125
125
|
} }, "Internal"), index.h("smoothly-button", { style: { "max-width": "300px" }, onClick: () => {
|
|
126
126
|
index$1.redirect("https://google.com");
|
|
@@ -170,7 +170,7 @@ const SmoothlyBacktotop = class {
|
|
|
170
170
|
};
|
|
171
171
|
SmoothlyBacktotop.style = styleCss$G;
|
|
172
172
|
|
|
173
|
-
const styleCss$F = "[type=link].sc-smoothly-button-h{display:inline;border:none}.sc-smoothly-button-h:not([type=link]){display:
|
|
173
|
+
const styleCss$F = "[type=link].sc-smoothly-button-h{display:inline;border:none}.sc-smoothly-button-h:not([type=link]){display:flex;align-items:center;justify-content:center}.sc-smoothly-button-h{margin:1em;border-style:solid;border-width:1px;border-radius:3px}[hidden].sc-smoothly-button-h{display:none}[disabled].sc-smoothly-button-h{opacity:0.5;pointer-events:none}a.sc-smoothly-button,button.sc-smoothly-button{display:block;border-color:transparent;background-color:transparent;padding:0.2em 0.3em;font-size:110%;font-weight:400}.sc-smoothly-button-h:not([disabled]):hover,.sc-smoothly-button-h:not([disabled]):focus,.sc-smoothly-button-h:not([disabled]):active{border-color:var(--smoothly-button-border)}[type=button].sc-smoothly-button-h>a.sc-smoothly-button{display:block;text-align:center;text-decoration:inherit}[type=button].sc-smoothly-button-h>a.sc-smoothly-button{width:calc(100% - 0.6em)}.sc-smoothly-button-h>button.sc-smoothly-button{height:100%;width:100%}[expand=fill].sc-smoothly-button-h{width:100%;border-left:none;border-right:none}";
|
|
174
174
|
|
|
175
175
|
const SmoothlyButton = class {
|
|
176
176
|
constructor(hostRef) {
|
|
@@ -185,7 +185,7 @@ const SmoothlyButton = class {
|
|
|
185
185
|
result = this.disabled ? (index.h("slot", null)) : (index.h("a", { href: this.link }, index.h("slot", null)));
|
|
186
186
|
break;
|
|
187
187
|
case "button":
|
|
188
|
-
result = this.link ? (index.h("a", { href: this.link, target: "_blank", download: this.download }, index.h("slot", null))) : (index.h("button", { disabled: this.disabled }, index.h("slot", null)));
|
|
188
|
+
result = this.link ? (this.disabled ? (index.h("slot", null)) : (index.h("a", { href: this.link, target: "_blank", download: this.download }, index.h("slot", null)))) : (index.h("button", { disabled: this.disabled }, index.h("slot", null)));
|
|
189
189
|
break;
|
|
190
190
|
}
|
|
191
191
|
return result;
|
|
@@ -22408,15 +22408,11 @@ const Selector = class {
|
|
|
22408
22408
|
this.filter = this.filter.slice(0, -1);
|
|
22409
22409
|
break;
|
|
22410
22410
|
case "Enter":
|
|
22411
|
-
this.items.
|
|
22412
|
-
|
|
22413
|
-
|
|
22414
|
-
|
|
22415
|
-
|
|
22416
|
-
this.opened = false;
|
|
22417
|
-
this.filter = "";
|
|
22418
|
-
}
|
|
22419
|
-
});
|
|
22411
|
+
const result = this.items.find(item => item.selected);
|
|
22412
|
+
if (result === null || result === void 0 ? void 0 : result.value)
|
|
22413
|
+
this.selected.emit(result === null || result === void 0 ? void 0 : result.value);
|
|
22414
|
+
this.opened = false;
|
|
22415
|
+
this.filter = "";
|
|
22420
22416
|
break;
|
|
22421
22417
|
default:
|
|
22422
22418
|
if (event.key.length == 1)
|
|
@@ -22431,7 +22427,6 @@ const Selector = class {
|
|
|
22431
22427
|
move(direction) {
|
|
22432
22428
|
if (direction) {
|
|
22433
22429
|
let selectedIndex = this.items.findIndex(item => item == this.selectedElement);
|
|
22434
|
-
console.log("selectedindex", selectedIndex);
|
|
22435
22430
|
do {
|
|
22436
22431
|
selectedIndex = (selectedIndex + direction + this.items.length) % this.items.length;
|
|
22437
22432
|
} while (this.items[selectedIndex].hidden);
|
|
@@ -3,7 +3,7 @@ import { redirect } from "../../index";
|
|
|
3
3
|
import { App } from "../App";
|
|
4
4
|
export class SmoothlyAppDemo {
|
|
5
5
|
render() {
|
|
6
|
-
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("div", { style: { padding: "1em", maxWidth: "12em" } }, h("smoothly-button", { fill: "solid", color: "danger", link: "https://google.com" }, "open"), h("smoothly-button", { fill: "solid", color: "danger", link: "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf", download: true }, "download"), h("smoothly-button", { fill: "solid", color: "danger", onClick: () => alert("clicked") }, "action"), h("smoothly-button", { type: "link", fill: "clear", color: "danger", onClick: () => alert("clicked") }, "action link"))), 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: "/redirect", label: "Redirect" }, h("smoothly-button", { style: { "max-width": "300px" }, onClick: () => {
|
|
6
|
+
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("div", { style: { padding: "1em", maxWidth: "12em" } }, h("smoothly-button", { fill: "solid", color: "danger", link: "https://google.com" }, "open"), h("smoothly-button", { fill: "solid", color: "danger", link: "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf", download: true }, "download"), h("smoothly-button", { fill: "solid", color: "danger", onClick: () => alert("clicked") }, "action"), h("smoothly-button", { disabled: true, fill: "solid", color: "danger", onClick: () => alert("clicked") }, "action"), h("smoothly-button", { type: "link", fill: "clear", color: "danger", onClick: () => alert("clicked") }, "action link"))), 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: "/redirect", label: "Redirect" }, h("smoothly-button", { style: { "max-width": "300px" }, onClick: () => {
|
|
7
7
|
redirect("/routing/pathParameter1");
|
|
8
8
|
} }, "Internal"), h("smoothly-button", { style: { "max-width": "300px" }, onClick: () => {
|
|
9
9
|
redirect("https://google.com");
|
|
@@ -11,7 +11,7 @@ export class SmoothlyButton {
|
|
|
11
11
|
result = this.disabled ? (h("slot", null)) : (h("a", { href: this.link }, h("slot", null)));
|
|
12
12
|
break;
|
|
13
13
|
case "button":
|
|
14
|
-
result = this.link ? (h("a", { href: this.link, target: "_blank", download: this.download }, h("slot", null))) : (h("button", { disabled: this.disabled }, h("slot", null)));
|
|
14
|
+
result = this.link ? (this.disabled ? (h("slot", null)) : (h("a", { href: this.link, target: "_blank", download: this.download }, h("slot", null)))) : (h("button", { disabled: this.disabled }, h("slot", null)));
|
|
15
15
|
break;
|
|
16
16
|
}
|
|
17
17
|
return result;
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
border: none;
|
|
4
4
|
}
|
|
5
5
|
:host:not([type=link]) {
|
|
6
|
-
display:
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
7
9
|
}
|
|
8
10
|
:host {
|
|
9
11
|
margin: 1em;
|
|
@@ -16,6 +18,7 @@
|
|
|
16
18
|
}
|
|
17
19
|
:host[disabled] {
|
|
18
20
|
opacity: 0.5;
|
|
21
|
+
pointer-events: none;
|
|
19
22
|
}
|
|
20
23
|
a,
|
|
21
24
|
button {
|
|
@@ -40,6 +43,7 @@ button {
|
|
|
40
43
|
width: calc(100% - 0.6em);
|
|
41
44
|
}
|
|
42
45
|
:host > button {
|
|
46
|
+
height: 100%;
|
|
43
47
|
width: 100%;
|
|
44
48
|
}
|
|
45
49
|
:host[expand=fill] {
|
|
@@ -47,15 +47,11 @@ export class Selector {
|
|
|
47
47
|
this.filter = this.filter.slice(0, -1);
|
|
48
48
|
break;
|
|
49
49
|
case "Enter":
|
|
50
|
-
this.items.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
this.opened = false;
|
|
56
|
-
this.filter = "";
|
|
57
|
-
}
|
|
58
|
-
});
|
|
50
|
+
const result = this.items.find(item => item.selected);
|
|
51
|
+
if (result === null || result === void 0 ? void 0 : result.value)
|
|
52
|
+
this.selected.emit(result === null || result === void 0 ? void 0 : result.value);
|
|
53
|
+
this.opened = false;
|
|
54
|
+
this.filter = "";
|
|
59
55
|
break;
|
|
60
56
|
default:
|
|
61
57
|
if (event.key.length == 1)
|
|
@@ -70,7 +66,6 @@ export class Selector {
|
|
|
70
66
|
move(direction) {
|
|
71
67
|
if (direction) {
|
|
72
68
|
let selectedIndex = this.items.findIndex(item => item == this.selectedElement);
|
|
73
|
-
console.log("selectedindex", selectedIndex);
|
|
74
69
|
do {
|
|
75
70
|
selectedIndex = (selectedIndex + direction + this.items.length) % this.items.length;
|
|
76
71
|
} while (this.items[selectedIndex].hidden);
|
|
@@ -1710,7 +1710,7 @@ const SmoothlyAppDemo$1 = class extends HTMLElement {
|
|
|
1710
1710
|
this.__registerHost();
|
|
1711
1711
|
}
|
|
1712
1712
|
render() {
|
|
1713
|
-
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("div", { style: { padding: "1em", maxWidth: "12em" } }, h("smoothly-button", { fill: "solid", color: "danger", link: "https://google.com" }, "open"), h("smoothly-button", { fill: "solid", color: "danger", link: "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf", download: true }, "download"), h("smoothly-button", { fill: "solid", color: "danger", onClick: () => alert("clicked") }, "action"), h("smoothly-button", { type: "link", fill: "clear", color: "danger", onClick: () => alert("clicked") }, "action link"))), 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: "/redirect", label: "Redirect" }, h("smoothly-button", { style: { "max-width": "300px" }, onClick: () => {
|
|
1713
|
+
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("div", { style: { padding: "1em", maxWidth: "12em" } }, h("smoothly-button", { fill: "solid", color: "danger", link: "https://google.com" }, "open"), h("smoothly-button", { fill: "solid", color: "danger", link: "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf", download: true }, "download"), h("smoothly-button", { fill: "solid", color: "danger", onClick: () => alert("clicked") }, "action"), h("smoothly-button", { disabled: true, fill: "solid", color: "danger", onClick: () => alert("clicked") }, "action"), h("smoothly-button", { type: "link", fill: "clear", color: "danger", onClick: () => alert("clicked") }, "action link"))), 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: "/redirect", label: "Redirect" }, h("smoothly-button", { style: { "max-width": "300px" }, onClick: () => {
|
|
1714
1714
|
redirect("/routing/pathParameter1");
|
|
1715
1715
|
} }, "Internal"), h("smoothly-button", { style: { "max-width": "300px" }, onClick: () => {
|
|
1716
1716
|
redirect("https://google.com");
|
|
@@ -1761,7 +1761,7 @@ const SmoothlyBacktotop$1 = class extends HTMLElement {
|
|
|
1761
1761
|
static get style() { return styleCss$K; }
|
|
1762
1762
|
};
|
|
1763
1763
|
|
|
1764
|
-
const styleCss$J = "[type=link].sc-smoothly-button-h{display:inline;border:none}.sc-smoothly-button-h:not([type=link]){display:
|
|
1764
|
+
const styleCss$J = "[type=link].sc-smoothly-button-h{display:inline;border:none}.sc-smoothly-button-h:not([type=link]){display:flex;align-items:center;justify-content:center}.sc-smoothly-button-h{margin:1em;border-style:solid;border-width:1px;border-radius:3px}[hidden].sc-smoothly-button-h{display:none}[disabled].sc-smoothly-button-h{opacity:0.5;pointer-events:none}a.sc-smoothly-button,button.sc-smoothly-button{display:block;border-color:transparent;background-color:transparent;padding:0.2em 0.3em;font-size:110%;font-weight:400}.sc-smoothly-button-h:not([disabled]):hover,.sc-smoothly-button-h:not([disabled]):focus,.sc-smoothly-button-h:not([disabled]):active{border-color:var(--smoothly-button-border)}[type=button].sc-smoothly-button-h>a.sc-smoothly-button{display:block;text-align:center;text-decoration:inherit}[type=button].sc-smoothly-button-h>a.sc-smoothly-button{width:calc(100% - 0.6em)}.sc-smoothly-button-h>button.sc-smoothly-button{height:100%;width:100%}[expand=fill].sc-smoothly-button-h{width:100%;border-left:none;border-right:none}";
|
|
1765
1765
|
|
|
1766
1766
|
const SmoothlyButton$1 = class extends HTMLElement {
|
|
1767
1767
|
constructor() {
|
|
@@ -1777,7 +1777,7 @@ const SmoothlyButton$1 = class extends HTMLElement {
|
|
|
1777
1777
|
result = this.disabled ? (h("slot", null)) : (h("a", { href: this.link }, h("slot", null)));
|
|
1778
1778
|
break;
|
|
1779
1779
|
case "button":
|
|
1780
|
-
result = this.link ? (h("a", { href: this.link, target: "_blank", download: this.download }, h("slot", null))) : (h("button", { disabled: this.disabled }, h("slot", null)));
|
|
1780
|
+
result = this.link ? (this.disabled ? (h("slot", null)) : (h("a", { href: this.link, target: "_blank", download: this.download }, h("slot", null)))) : (h("button", { disabled: this.disabled }, h("slot", null)));
|
|
1781
1781
|
break;
|
|
1782
1782
|
}
|
|
1783
1783
|
return result;
|
|
@@ -48096,15 +48096,11 @@ const Selector = class extends HTMLElement {
|
|
|
48096
48096
|
this.filter = this.filter.slice(0, -1);
|
|
48097
48097
|
break;
|
|
48098
48098
|
case "Enter":
|
|
48099
|
-
this.items.
|
|
48100
|
-
|
|
48101
|
-
|
|
48102
|
-
|
|
48103
|
-
|
|
48104
|
-
this.opened = false;
|
|
48105
|
-
this.filter = "";
|
|
48106
|
-
}
|
|
48107
|
-
});
|
|
48099
|
+
const result = this.items.find(item => item.selected);
|
|
48100
|
+
if (result === null || result === void 0 ? void 0 : result.value)
|
|
48101
|
+
this.selected.emit(result === null || result === void 0 ? void 0 : result.value);
|
|
48102
|
+
this.opened = false;
|
|
48103
|
+
this.filter = "";
|
|
48108
48104
|
break;
|
|
48109
48105
|
default:
|
|
48110
48106
|
if (event.key.length == 1)
|
|
@@ -48119,7 +48115,6 @@ const Selector = class extends HTMLElement {
|
|
|
48119
48115
|
move(direction) {
|
|
48120
48116
|
if (direction) {
|
|
48121
48117
|
let selectedIndex = this.items.findIndex(item => item == this.selectedElement);
|
|
48122
|
-
console.log("selectedindex", selectedIndex);
|
|
48123
48118
|
do {
|
|
48124
48119
|
selectedIndex = (selectedIndex + direction + this.items.length) % this.items.length;
|
|
48125
48120
|
} while (this.items[selectedIndex].hidden);
|
|
@@ -116,7 +116,7 @@ const SmoothlyAppDemo = class {
|
|
|
116
116
|
registerInstance(this, hostRef);
|
|
117
117
|
}
|
|
118
118
|
render() {
|
|
119
|
-
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("div", { style: { padding: "1em", maxWidth: "12em" } }, h("smoothly-button", { fill: "solid", color: "danger", link: "https://google.com" }, "open"), h("smoothly-button", { fill: "solid", color: "danger", link: "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf", download: true }, "download"), h("smoothly-button", { fill: "solid", color: "danger", onClick: () => alert("clicked") }, "action"), h("smoothly-button", { type: "link", fill: "clear", color: "danger", onClick: () => alert("clicked") }, "action link"))), 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: "/redirect", label: "Redirect" }, h("smoothly-button", { style: { "max-width": "300px" }, onClick: () => {
|
|
119
|
+
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("div", { style: { padding: "1em", maxWidth: "12em" } }, h("smoothly-button", { fill: "solid", color: "danger", link: "https://google.com" }, "open"), h("smoothly-button", { fill: "solid", color: "danger", link: "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf", download: true }, "download"), h("smoothly-button", { fill: "solid", color: "danger", onClick: () => alert("clicked") }, "action"), h("smoothly-button", { disabled: true, fill: "solid", color: "danger", onClick: () => alert("clicked") }, "action"), h("smoothly-button", { type: "link", fill: "clear", color: "danger", onClick: () => alert("clicked") }, "action link"))), 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: "/redirect", label: "Redirect" }, h("smoothly-button", { style: { "max-width": "300px" }, onClick: () => {
|
|
120
120
|
redirect("/routing/pathParameter1");
|
|
121
121
|
} }, "Internal"), h("smoothly-button", { style: { "max-width": "300px" }, onClick: () => {
|
|
122
122
|
redirect("https://google.com");
|
|
@@ -166,7 +166,7 @@ const SmoothlyBacktotop = class {
|
|
|
166
166
|
};
|
|
167
167
|
SmoothlyBacktotop.style = styleCss$G;
|
|
168
168
|
|
|
169
|
-
const styleCss$F = "[type=link].sc-smoothly-button-h{display:inline;border:none}.sc-smoothly-button-h:not([type=link]){display:
|
|
169
|
+
const styleCss$F = "[type=link].sc-smoothly-button-h{display:inline;border:none}.sc-smoothly-button-h:not([type=link]){display:flex;align-items:center;justify-content:center}.sc-smoothly-button-h{margin:1em;border-style:solid;border-width:1px;border-radius:3px}[hidden].sc-smoothly-button-h{display:none}[disabled].sc-smoothly-button-h{opacity:0.5;pointer-events:none}a.sc-smoothly-button,button.sc-smoothly-button{display:block;border-color:transparent;background-color:transparent;padding:0.2em 0.3em;font-size:110%;font-weight:400}.sc-smoothly-button-h:not([disabled]):hover,.sc-smoothly-button-h:not([disabled]):focus,.sc-smoothly-button-h:not([disabled]):active{border-color:var(--smoothly-button-border)}[type=button].sc-smoothly-button-h>a.sc-smoothly-button{display:block;text-align:center;text-decoration:inherit}[type=button].sc-smoothly-button-h>a.sc-smoothly-button{width:calc(100% - 0.6em)}.sc-smoothly-button-h>button.sc-smoothly-button{height:100%;width:100%}[expand=fill].sc-smoothly-button-h{width:100%;border-left:none;border-right:none}";
|
|
170
170
|
|
|
171
171
|
const SmoothlyButton = class {
|
|
172
172
|
constructor(hostRef) {
|
|
@@ -181,7 +181,7 @@ const SmoothlyButton = class {
|
|
|
181
181
|
result = this.disabled ? (h("slot", null)) : (h("a", { href: this.link }, h("slot", null)));
|
|
182
182
|
break;
|
|
183
183
|
case "button":
|
|
184
|
-
result = this.link ? (h("a", { href: this.link, target: "_blank", download: this.download }, h("slot", null))) : (h("button", { disabled: this.disabled }, h("slot", null)));
|
|
184
|
+
result = this.link ? (this.disabled ? (h("slot", null)) : (h("a", { href: this.link, target: "_blank", download: this.download }, h("slot", null)))) : (h("button", { disabled: this.disabled }, h("slot", null)));
|
|
185
185
|
break;
|
|
186
186
|
}
|
|
187
187
|
return result;
|
|
@@ -22404,15 +22404,11 @@ const Selector = class {
|
|
|
22404
22404
|
this.filter = this.filter.slice(0, -1);
|
|
22405
22405
|
break;
|
|
22406
22406
|
case "Enter":
|
|
22407
|
-
this.items.
|
|
22408
|
-
|
|
22409
|
-
|
|
22410
|
-
|
|
22411
|
-
|
|
22412
|
-
this.opened = false;
|
|
22413
|
-
this.filter = "";
|
|
22414
|
-
}
|
|
22415
|
-
});
|
|
22407
|
+
const result = this.items.find(item => item.selected);
|
|
22408
|
+
if (result === null || result === void 0 ? void 0 : result.value)
|
|
22409
|
+
this.selected.emit(result === null || result === void 0 ? void 0 : result.value);
|
|
22410
|
+
this.opened = false;
|
|
22411
|
+
this.filter = "";
|
|
22416
22412
|
break;
|
|
22417
22413
|
default:
|
|
22418
22414
|
if (event.key.length == 1)
|
|
@@ -22427,7 +22423,6 @@ const Selector = class {
|
|
|
22427
22423
|
move(direction) {
|
|
22428
22424
|
if (direction) {
|
|
22429
22425
|
let selectedIndex = this.items.findIndex(item => item == this.selectedElement);
|
|
22430
|
-
console.log("selectedindex", selectedIndex);
|
|
22431
22426
|
do {
|
|
22432
22427
|
selectedIndex = (selectedIndex + direction + this.items.length) % this.items.length;
|
|
22433
22428
|
} while (this.items[selectedIndex].hidden);
|