smoothly 0.1.112 → 0.1.115
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/{Notice-9c2b52b7.js → Notice-839702d8.js} +34 -26
- package/dist/cjs/{Trigger-74bd1ee8.js → Trigger-cf376531.js} +55 -146
- package/dist/cjs/{index-41a36ce2.js → index-1c61bdd3.js} +27 -1
- package/dist/cjs/index.cjs.js +20 -8
- package/dist/cjs/loader.cjs.js +3 -19
- package/dist/cjs/{smoothly-accordion_50.cjs.entry.js → smoothly-accordion_51.cjs.entry.js} +7694 -1487
- package/dist/cjs/smoothly-google-font.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-reorder.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +5 -5
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js +5 -5
- package/dist/cjs/smoothly.cjs.js +5 -113
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/app-demo/index.js +6 -1
- package/dist/collection/components/button/index.js +168 -0
- package/dist/collection/components/button/style.css +49 -0
- package/dist/collection/components/input/style.css +2 -2
- package/dist/collection/components/picker/index.js +10 -6
- package/dist/collection/components/trigger/style.css +3 -3
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +7781 -2970
- package/dist/esm/{Notice-4131b4e0.js → Notice-608b552c.js} +34 -26
- package/dist/esm/{Trigger-d7b181ec.js → Trigger-365408f0.js} +55 -146
- package/dist/esm/{index-dcb2b612.js → index-a3737440.js} +27 -1
- package/dist/esm/index.js +17 -4
- package/dist/esm/loader.js +3 -19
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{smoothly-accordion_50.entry.js → smoothly-accordion_51.entry.js} +7694 -1488
- package/dist/esm/smoothly-google-font.entry.js +2 -2
- package/dist/esm/smoothly-radio-group.entry.js +2 -2
- package/dist/esm/smoothly-reorder.entry.js +2 -2
- package/dist/esm/smoothly-trigger-sink.entry.js +3 -3
- package/dist/esm/smoothly-trigger-source.entry.js +3 -3
- package/dist/esm/smoothly.js +5 -113
- package/dist/smoothly/index.esm.js +1 -376
- package/dist/smoothly/p-0215b4da.entry.js +1 -0
- package/dist/smoothly/{p-074a0448.js → p-0cba3e3d.js} +1 -1
- package/dist/smoothly/p-18a1063c.entry.js +1 -0
- package/dist/smoothly/p-6ca0d36c.js +1 -0
- package/dist/smoothly/p-6f009ac9.entry.js +1 -0
- package/dist/smoothly/p-7a30d9b8.js +1 -0
- package/dist/smoothly/p-8ae38136.entry.js +1 -0
- package/dist/smoothly/p-993534fa.entry.js +1 -0
- package/dist/smoothly/p-eec1c703.entry.js +1 -0
- package/dist/smoothly/smoothly.esm.js +1 -125
- package/dist/types/components/button/index.d.ts +11 -0
- package/dist/types/components.d.ts +27 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/package.json +18 -18
- package/dist/cjs/App-339acc9b.js +0 -647
- package/dist/cjs/_commonjsHelpers-10109b76.js +0 -48
- package/dist/cjs/app-globals-3a1e7e63.js +0 -5
- package/dist/cjs/css-shim-88cc6900.js +0 -6
- package/dist/cjs/dom-95afd968.js +0 -75
- package/dist/cjs/generate-f9a36f25.js +0 -66
- package/dist/cjs/index-138c41c2.js +0 -3066
- package/dist/cjs/index-40d009d5.js +0 -1354
- package/dist/cjs/index-ac32385c.js +0 -18850
- package/dist/cjs/index-d66869d7.js +0 -1672
- package/dist/cjs/shadow-css-71d0f821.js +0 -391
- package/dist/cjs/smoothly-accordion-item.cjs.entry.js +0 -54
- package/dist/cjs/smoothly-accordion.cjs.entry.js +0 -55
- package/dist/cjs/smoothly-app-demo.cjs.entry.js +0 -29
- package/dist/cjs/smoothly-app.cjs.entry.js +0 -19
- package/dist/cjs/smoothly-backtotop.cjs.entry.js +0 -37
- package/dist/cjs/smoothly-calendar.cjs.entry.js +0 -95
- package/dist/cjs/smoothly-checkbox.cjs.entry.js +0 -18671
- package/dist/cjs/smoothly-dialog-demo.cjs.entry.js +0 -16
- package/dist/cjs/smoothly-dialog.cjs.entry.js +0 -38
- package/dist/cjs/smoothly-display-amount.cjs.entry.js +0 -59
- package/dist/cjs/smoothly-display-date-time.cjs.entry.js +0 -20
- package/dist/cjs/smoothly-display-demo.cjs.entry.js +0 -25
- package/dist/cjs/smoothly-display.cjs.entry.js +0 -41
- package/dist/cjs/smoothly-frame.cjs.entry.js +0 -50
- package/dist/cjs/smoothly-icon-demo.cjs.entry.js +0 -491
- package/dist/cjs/smoothly-icon.cjs.entry.js +0 -52
- package/dist/cjs/smoothly-input-date-range.cjs.entry.js +0 -50
- package/dist/cjs/smoothly-input-date.cjs.entry.js +0 -44
- package/dist/cjs/smoothly-input-demo.cjs.entry.js +0 -19
- package/dist/cjs/smoothly-input-month.cjs.entry.js +0 -41
- package/dist/cjs/smoothly-input.cjs.entry.js +0 -202
- package/dist/cjs/smoothly-item.cjs.entry.js +0 -43
- package/dist/cjs/smoothly-menu-options.cjs.entry.js +0 -108
- package/dist/cjs/smoothly-notification.cjs.entry.js +0 -67
- package/dist/cjs/smoothly-notifier.cjs.entry.js +0 -29
- package/dist/cjs/smoothly-option.cjs.entry.js +0 -33
- package/dist/cjs/smoothly-picker.cjs.entry.js +0 -151
- package/dist/cjs/smoothly-popup.cjs.entry.js +0 -38
- package/dist/cjs/smoothly-quiet.cjs.entry.js +0 -19
- package/dist/cjs/smoothly-radio.cjs.entry.js +0 -28
- package/dist/cjs/smoothly-room.cjs.entry.js +0 -16
- package/dist/cjs/smoothly-select-demo.cjs.entry.js +0 -86
- package/dist/cjs/smoothly-select.cjs.entry.js +0 -31
- package/dist/cjs/smoothly-selector.cjs.entry.js +0 -119
- package/dist/cjs/smoothly-skeleton.cjs.entry.js +0 -27
- package/dist/cjs/smoothly-spinner.cjs.entry.js +0 -24
- package/dist/cjs/smoothly-submit.cjs.entry.js +0 -60
- package/dist/cjs/smoothly-svg.cjs.entry.js +0 -41
- package/dist/cjs/smoothly-tab-switch.cjs.entry.js +0 -32
- package/dist/cjs/smoothly-tab.cjs.entry.js +0 -37
- package/dist/cjs/smoothly-table-cell.cjs.entry.js +0 -19
- package/dist/cjs/smoothly-table-demo.cjs.entry.js +0 -22
- package/dist/cjs/smoothly-table-expandable-cell.cjs.entry.js +0 -45
- package/dist/cjs/smoothly-table-expandable-row.cjs.entry.js +0 -32
- package/dist/cjs/smoothly-table-header.cjs.entry.js +0 -41
- package/dist/cjs/smoothly-table-row.cjs.entry.js +0 -38
- package/dist/cjs/smoothly-table.cjs.entry.js +0 -26
- package/dist/cjs/smoothly-trigger.cjs.entry.js +0 -36
- package/dist/cjs/smoothly-tuple.cjs.entry.js +0 -16
- package/dist/cjs/smoothly-urlencoded.cjs.entry.js +0 -19
- package/dist/esm/App-22187759.js +0 -645
- package/dist/esm/_commonjsHelpers-8fe71198.js +0 -44
- package/dist/esm/app-globals-0f993ce5.js +0 -3
- package/dist/esm/css-shim-c64026cd.js +0 -4
- package/dist/esm/dom-a712b575.js +0 -73
- package/dist/esm/generate-50b98474.js +0 -61
- package/dist/esm/index-02a70ac1.js +0 -3027
- package/dist/esm/index-401c6ce3.js +0 -1670
- package/dist/esm/index-a5a08f46.js +0 -18848
- package/dist/esm/index-c8b5d468.js +0 -1349
- package/dist/esm/shadow-css-1e16431b.js +0 -389
- package/dist/esm/smoothly-accordion-item.entry.js +0 -50
- package/dist/esm/smoothly-accordion.entry.js +0 -51
- package/dist/esm/smoothly-app-demo.entry.js +0 -25
- package/dist/esm/smoothly-app.entry.js +0 -15
- package/dist/esm/smoothly-backtotop.entry.js +0 -33
- package/dist/esm/smoothly-calendar.entry.js +0 -91
- package/dist/esm/smoothly-checkbox.entry.js +0 -18667
- package/dist/esm/smoothly-dialog-demo.entry.js +0 -12
- package/dist/esm/smoothly-dialog.entry.js +0 -34
- package/dist/esm/smoothly-display-amount.entry.js +0 -55
- package/dist/esm/smoothly-display-date-time.entry.js +0 -16
- package/dist/esm/smoothly-display-demo.entry.js +0 -21
- package/dist/esm/smoothly-display.entry.js +0 -37
- package/dist/esm/smoothly-frame.entry.js +0 -46
- package/dist/esm/smoothly-icon-demo.entry.js +0 -487
- package/dist/esm/smoothly-icon.entry.js +0 -48
- package/dist/esm/smoothly-input-date-range.entry.js +0 -46
- package/dist/esm/smoothly-input-date.entry.js +0 -40
- package/dist/esm/smoothly-input-demo.entry.js +0 -15
- package/dist/esm/smoothly-input-month.entry.js +0 -37
- package/dist/esm/smoothly-input.entry.js +0 -198
- package/dist/esm/smoothly-item.entry.js +0 -39
- package/dist/esm/smoothly-menu-options.entry.js +0 -104
- package/dist/esm/smoothly-notification.entry.js +0 -63
- package/dist/esm/smoothly-notifier.entry.js +0 -25
- package/dist/esm/smoothly-option.entry.js +0 -29
- package/dist/esm/smoothly-picker.entry.js +0 -147
- package/dist/esm/smoothly-popup.entry.js +0 -34
- package/dist/esm/smoothly-quiet.entry.js +0 -15
- package/dist/esm/smoothly-radio.entry.js +0 -24
- package/dist/esm/smoothly-room.entry.js +0 -12
- package/dist/esm/smoothly-select-demo.entry.js +0 -82
- package/dist/esm/smoothly-select.entry.js +0 -27
- package/dist/esm/smoothly-selector.entry.js +0 -115
- package/dist/esm/smoothly-skeleton.entry.js +0 -23
- package/dist/esm/smoothly-spinner.entry.js +0 -20
- package/dist/esm/smoothly-submit.entry.js +0 -56
- package/dist/esm/smoothly-svg.entry.js +0 -37
- package/dist/esm/smoothly-tab-switch.entry.js +0 -28
- package/dist/esm/smoothly-tab.entry.js +0 -33
- package/dist/esm/smoothly-table-cell.entry.js +0 -15
- package/dist/esm/smoothly-table-demo.entry.js +0 -18
- package/dist/esm/smoothly-table-expandable-cell.entry.js +0 -41
- package/dist/esm/smoothly-table-expandable-row.entry.js +0 -28
- package/dist/esm/smoothly-table-header.entry.js +0 -37
- package/dist/esm/smoothly-table-row.entry.js +0 -34
- package/dist/esm/smoothly-table.entry.js +0 -22
- package/dist/esm/smoothly-trigger.entry.js +0 -32
- package/dist/esm/smoothly-tuple.entry.js +0 -12
- package/dist/esm/smoothly-urlencoded.entry.js +0 -15
- package/dist/smoothly/App-22187759.js +0 -645
- package/dist/smoothly/GoogleFont-8474516b.js +0 -21
- package/dist/smoothly/_commonjsHelpers-8fe71198.js +0 -44
- package/dist/smoothly/app-globals-0f993ce5.js +0 -3
- package/dist/smoothly/css-shim-c64026cd.js +0 -4
- package/dist/smoothly/dom-a712b575.js +0 -73
- package/dist/smoothly/generate-50b98474.js +0 -61
- package/dist/smoothly/index-02a70ac1.js +0 -3027
- package/dist/smoothly/index-401c6ce3.js +0 -1670
- package/dist/smoothly/index-a5a08f46.js +0 -18848
- package/dist/smoothly/index-c8b5d468.js +0 -1349
- package/dist/smoothly/p-0c1e9588.entry.js +0 -1
- package/dist/smoothly/p-14232157.entry.js +0 -1
- package/dist/smoothly/p-19518931.js +0 -1
- package/dist/smoothly/p-22d4d5a7.entry.js +0 -1
- package/dist/smoothly/p-2cda1784.js +0 -1
- package/dist/smoothly/p-436cd558.entry.js +0 -1
- package/dist/smoothly/p-9fa3ab06.entry.js +0 -1
- package/dist/smoothly/p-b8a3e273.entry.js +0 -1
- package/dist/smoothly/shadow-css-1e16431b.js +0 -389
- package/dist/smoothly/smoothly-accordion-item.entry.js +0 -50
- package/dist/smoothly/smoothly-accordion.entry.js +0 -51
- package/dist/smoothly/smoothly-app-demo.entry.js +0 -25
- package/dist/smoothly/smoothly-app.entry.js +0 -15
- package/dist/smoothly/smoothly-backtotop.entry.js +0 -33
- package/dist/smoothly/smoothly-calendar.entry.js +0 -91
- package/dist/smoothly/smoothly-checkbox.entry.js +0 -18667
- package/dist/smoothly/smoothly-dialog-demo.entry.js +0 -12
- package/dist/smoothly/smoothly-dialog.entry.js +0 -34
- package/dist/smoothly/smoothly-display-amount.entry.js +0 -55
- package/dist/smoothly/smoothly-display-date-time.entry.js +0 -16
- package/dist/smoothly/smoothly-display-demo.entry.js +0 -21
- package/dist/smoothly/smoothly-display.entry.js +0 -37
- package/dist/smoothly/smoothly-frame.entry.js +0 -46
- package/dist/smoothly/smoothly-google-font.entry.js +0 -13
- package/dist/smoothly/smoothly-icon-demo.entry.js +0 -487
- package/dist/smoothly/smoothly-icon.entry.js +0 -48
- package/dist/smoothly/smoothly-input-date-range.entry.js +0 -46
- package/dist/smoothly/smoothly-input-date.entry.js +0 -40
- package/dist/smoothly/smoothly-input-demo.entry.js +0 -15
- package/dist/smoothly/smoothly-input-month.entry.js +0 -37
- package/dist/smoothly/smoothly-input.entry.js +0 -198
- package/dist/smoothly/smoothly-item.entry.js +0 -39
- package/dist/smoothly/smoothly-menu-options.entry.js +0 -104
- package/dist/smoothly/smoothly-notification.entry.js +0 -63
- package/dist/smoothly/smoothly-notifier.entry.js +0 -25
- package/dist/smoothly/smoothly-option.entry.js +0 -29
- package/dist/smoothly/smoothly-picker.entry.js +0 -147
- package/dist/smoothly/smoothly-popup.entry.js +0 -34
- package/dist/smoothly/smoothly-quiet.entry.js +0 -15
- package/dist/smoothly/smoothly-radio-group.entry.js +0 -16
- package/dist/smoothly/smoothly-radio.entry.js +0 -24
- package/dist/smoothly/smoothly-reorder.entry.js +0 -99
- package/dist/smoothly/smoothly-room.entry.js +0 -12
- package/dist/smoothly/smoothly-select-demo.entry.js +0 -82
- package/dist/smoothly/smoothly-select.entry.js +0 -27
- package/dist/smoothly/smoothly-selector.entry.js +0 -115
- package/dist/smoothly/smoothly-skeleton.entry.js +0 -23
- package/dist/smoothly/smoothly-spinner.entry.js +0 -20
- package/dist/smoothly/smoothly-submit.entry.js +0 -56
- package/dist/smoothly/smoothly-svg.entry.js +0 -37
- package/dist/smoothly/smoothly-tab-switch.entry.js +0 -28
- package/dist/smoothly/smoothly-tab.entry.js +0 -33
- package/dist/smoothly/smoothly-table-cell.entry.js +0 -15
- package/dist/smoothly/smoothly-table-demo.entry.js +0 -18
- package/dist/smoothly/smoothly-table-expandable-cell.entry.js +0 -41
- package/dist/smoothly/smoothly-table-expandable-row.entry.js +0 -28
- package/dist/smoothly/smoothly-table-header.entry.js +0 -37
- package/dist/smoothly/smoothly-table-row.entry.js +0 -34
- package/dist/smoothly/smoothly-table.entry.js +0 -22
- package/dist/smoothly/smoothly-trigger-sink.entry.js +0 -29
- package/dist/smoothly/smoothly-trigger-source.entry.js +0 -28
- package/dist/smoothly/smoothly-trigger.entry.js +0 -32
- package/dist/smoothly/smoothly-tuple.entry.js +0 -12
- package/dist/smoothly/smoothly-urlencoded.entry.js +0 -15
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, i as createEvent, h } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-radio-h{display:block;position:relative}[hidden].sc-smoothly-radio-h{display:none}label.sc-smoothly-radio{display:block;width:calc(100% - 2 * 0.4em);padding:0.2em 0.4em 0.2em 0.4em}input[type=radio].sc-smoothly-radio{position:absolute;left:0;top:0;width:calc(100%);height:100%;margin:0;appearance:none;-webkit-appearance:none}input[type=radio].sc-smoothly-radio~label.sc-smoothly-radio{border:1px solid rgb(var(--smoothly-default-color));color:rgba(var(--smoothly-default-contrast), 0.5);background:rgb(var(--smoothly-default-color))}input[type=radio].sc-smoothly-radio:checked~label.sc-smoothly-radio{background-color:rgb(var(--smoothly-default-shade));color:rgb(var(--smoothly-default-contrast))}";
|
|
4
|
-
|
|
5
|
-
let SmoothlyRadio = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.smoothlySelected = createEvent(this, "smoothlySelected", 7);
|
|
9
|
-
}
|
|
10
|
-
async onInput(e) {
|
|
11
|
-
if (e.target && e.target.value && (this.checked = e.target.checked))
|
|
12
|
-
this.smoothlySelected.emit({ name: this.name, value: this.value });
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
return [
|
|
17
|
-
h("input", { type: "radio", name: this.name, id: this.value, tabindex: this.tabIndex, checked: this.checked, value: this.value, onChange: e => this.onInput(e) }),
|
|
18
|
-
h("label", { htmlFor: this.value }, h("slot", null)),
|
|
19
|
-
];
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
SmoothlyRadio.style = styleCss;
|
|
23
|
-
|
|
24
|
-
export { SmoothlyRadio as smoothly_radio };
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-select-demo-h{display:block}[hidden].sc-smoothly-select-demo-h{display:none}button.sc-smoothly-select-demo:focus{outline:none}smoothly-selector.sc-smoothly-select-demo{outline:none}";
|
|
4
|
-
|
|
5
|
-
let SmoothlySelectDemo = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.currencies = ["SEK", "EUR"];
|
|
9
|
-
this.currency = "SEK";
|
|
10
|
-
}
|
|
11
|
-
alertf() {
|
|
12
|
-
var _a;
|
|
13
|
-
console.log(this.quantityElement);
|
|
14
|
-
alert((_a = this.quantityElement) === null || _a === void 0 ? void 0 : _a.value);
|
|
15
|
-
}
|
|
16
|
-
handleSelectionChanged(event) {
|
|
17
|
-
console.log("selectionChanged", event.detail);
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
return [
|
|
21
|
-
h("smoothly-select", { identifier: "currency" }, this.currencies.map(option => this.currency == option ? (h("option", { value: option, selected: true }, option)) : (h("option", { value: option }, option)))),
|
|
22
|
-
h("smoothly-select", { identifier: "language" }, h("optgroup", { label: "Nordic" }, h("option", { value: "sv" }, "Swedish"), h("option", { value: "da", selected: true }, "Danish"), h("option", { value: "no" }, "Norwegian")), h("optgroup", { label: "Other" }, h("option", { value: "en" }, "English"))),
|
|
23
|
-
h("smoothly-select", { identifier: "quantity", ref: e => (this.quantityElement = e) }, h("option", { value: "1" }, "1"), h("option", { value: "2" }, "2"), h("option", { value: "3" }, "3")),
|
|
24
|
-
h("smoothly-input-date", null, "Date"),
|
|
25
|
-
h("smoothly-input-date", { value: "2021-10-28", max: "2021-12-30", min: "2021-10-10" }, "Date"),
|
|
26
|
-
h("smoothly-input-date-range", { start: "2022-10-28", end: "2022-11-27", min: "2021-10-10", max: "2022-12-30" }),
|
|
27
|
-
h("smoothly-input-date-range", { start: "2022-10-28", end: "2022-11-27", min: "2021-10-10", max: "2022-12-30", showLabel: false, style: {
|
|
28
|
-
"--background": "rgb(var(--smoothly-dark-shade))",
|
|
29
|
-
"--border-radius": "4px",
|
|
30
|
-
"--padding": "0 0.75em",
|
|
31
|
-
"--input-width": "6rem",
|
|
32
|
-
} }),
|
|
33
|
-
h("smoothly-selector", null, h("smoothly-item", { value: "1" }, "January"), h("smoothly-item", { value: "2" }, "February"), h("smoothly-item", { value: "3" }, "March"), h("smoothly-item", { value: "4" }, "April"), h("smoothly-item", { value: "5" }, "May"), h("smoothly-item", { value: "6" }, "June"), h("smoothly-item", { value: "7" }, "July"), h("smoothly-item", { value: "8" }, "August"), h("smoothly-item", { value: "9" }, "September"), h("smoothly-item", { value: "10" }, "October"), h("smoothly-item", { value: "11" }, "November"), h("smoothly-item", { value: "12" }, "December")),
|
|
34
|
-
h("button", { onClick: () => this.alertf() }, "press here"),
|
|
35
|
-
h("smoothly-picker", { label: "Filter", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, options: [
|
|
36
|
-
{ name: "Big Dog", value: "dog", aliases: ["WOFF"] },
|
|
37
|
-
{ name: "Cat Stevens", value: "cat", aliases: ["moew"] },
|
|
38
|
-
{ name: "Noble Pig", value: "pig" },
|
|
39
|
-
{ name: "Turtle Wax", value: "turtle" },
|
|
40
|
-
{ name: "Spider Man", value: "spider" },
|
|
41
|
-
{ name: "Phoenix Order Long Wooord", value: "phoenix" },
|
|
42
|
-
{ name: "Horse Back", value: "horse" },
|
|
43
|
-
{ name: "Unicorn Horn", value: "unicorn" },
|
|
44
|
-
{ name: "Talking Parrot Parrot", value: "parrot" },
|
|
45
|
-
{ name: "Hidden Dragon", value: "dragon" },
|
|
46
|
-
{ name: "Scary Kraken", value: "kraken" },
|
|
47
|
-
] }),
|
|
48
|
-
h("br", null),
|
|
49
|
-
h("smoothly-picker", { label: "", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, options: [
|
|
50
|
-
{ name: "Big Dog", value: "dog", aliases: ["WOFF"] },
|
|
51
|
-
{ name: "Cat Stevens", value: "cat", aliases: ["moew"] },
|
|
52
|
-
{ name: "Noble Pig", value: "pig" },
|
|
53
|
-
{ name: "Turtle Wax", value: "turtle" },
|
|
54
|
-
{ name: "Spider Man", value: "spider" },
|
|
55
|
-
{ name: "Phoenix Order Long Wooord", value: "phoenix" },
|
|
56
|
-
{ name: "Horse Back", value: "horse" },
|
|
57
|
-
{ name: "Unicorn Horn", value: "unicorn" },
|
|
58
|
-
{ name: "Talking Parrot Parrot", value: "parrot" },
|
|
59
|
-
{ name: "Hidden Dragon", value: "dragon" },
|
|
60
|
-
{ name: "Scary Kraken", value: "kraken" },
|
|
61
|
-
] }),
|
|
62
|
-
h("br", null),
|
|
63
|
-
h("smoothly-picker", { label: "Single select", multiple: false, "max-menu-height": "200px", options: [
|
|
64
|
-
{ name: "Dog", value: "dog", aliases: ["WOFF"], right: "Woof 🐶" },
|
|
65
|
-
{ name: "Cat", value: "cat", aliases: ["moew"] },
|
|
66
|
-
{ name: "Pig", value: "pig" },
|
|
67
|
-
{ name: "Turtle", value: "turtle" },
|
|
68
|
-
{ name: "Spider", value: "spider" },
|
|
69
|
-
{ name: "Phoenix", value: "phoenix" },
|
|
70
|
-
{ name: "Horse", value: "horse" },
|
|
71
|
-
{ name: "Unicorn", value: "unicorn" },
|
|
72
|
-
{ name: "Parrot", value: "parrot" },
|
|
73
|
-
{ name: "Dragon", value: "dragon" },
|
|
74
|
-
{ name: "Kraken", value: "kraken" },
|
|
75
|
-
] }),
|
|
76
|
-
h("smoothly-tab-switch", null, h("smoothly-tab", { label: "test1", open: true }, "Hello world!"), h("smoothly-tab", { label: "test2" }, "this is a test message!"), h("smoothly-tab", { label: "test3" }, "this is a test message again!")),
|
|
77
|
-
];
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
SmoothlySelectDemo.style = styleCss;
|
|
81
|
-
|
|
82
|
-
export { SmoothlySelectDemo as smoothly_select_demo };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, i as createEvent, h } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-select-h{display:block}[hidden].sc-smoothly-select-h{display:none}select.sc-smoothly-select{min-width:1.5em;padding-top:0.5em;border:none;-webkit-appearance:none;background-color:rgb(var(--smoothly-color));padding:0.3em}select.sc-smoothly-select>option.sc-smoothly-select{background-color:inherit}select.sc-smoothly-select:focus{outline:none}";
|
|
4
|
-
|
|
5
|
-
let SmoothlySelect = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.selectionChanged = createEvent(this, "selectionChanged", 7);
|
|
9
|
-
}
|
|
10
|
-
optionSelected() {
|
|
11
|
-
if (this.selectElement)
|
|
12
|
-
this.selectionChanged.emit({ identifier: this.identifier, value: (this.value = this.selectElement.value) });
|
|
13
|
-
}
|
|
14
|
-
componentDidLoad() {
|
|
15
|
-
var _a;
|
|
16
|
-
if (this.selectElement)
|
|
17
|
-
this.value = (_a = this.selectElement) === null || _a === void 0 ? void 0 : _a.value;
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
return [
|
|
21
|
-
h("select", { ref: e => (this.selectElement = e), id: this.identifier, onChange: () => this.optionSelected(), style: { background: this.background } }, h("slot", null)),
|
|
22
|
-
];
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
SmoothlySelect.style = styleCss;
|
|
26
|
-
|
|
27
|
-
export { SmoothlySelect as smoothly_select };
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, i as createEvent, h, k as Host, j as getElement } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-selector-h{position:relative;height:100%}.sc-smoothly-selector-h>main.sc-smoothly-selector,.sc-smoothly-selector-h>main.sc-smoothly-selector>*.sc-smoothly-selector{height:100%;display:flex;align-items:center}.sc-smoothly-selector-h>div.sc-smoothly-selector>nav.sc-smoothly-selector{display:flex;flex-direction:column;position:absolute;z-index:10}.sc-smoothly-selector-h>aside.sc-smoothly-selector{position:absolute;top:0;left:5em;z-index:10;background-color:rgb(var(--smoothly-tertiary-color));color:rgb(var(--smoothly-tertiary-contrast));height:20px;border-radius:5px;padding:5px;display:flex;align-items:center}.missing.sc-smoothly-selector-h>aside.sc-smoothly-selector{background-color:rgb(var(--smoothly-warning-color));color:rgb(var(--smoothly-warning-contast))}.hidden.sc-smoothly-selector{display:none}.sc-smoothly-selector-h>section.sc-smoothly-selector{position:fixed;top:0px;left:0px;width:100vw;height:100vh;z-index:10}";
|
|
4
|
-
|
|
5
|
-
let Selector = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.selected = createEvent(this, "selected", 7);
|
|
9
|
-
this.opened = false;
|
|
10
|
-
this.items = [];
|
|
11
|
-
this.missing = false;
|
|
12
|
-
this.filter = "";
|
|
13
|
-
}
|
|
14
|
-
onSelectedChange(value, old) {
|
|
15
|
-
if (old)
|
|
16
|
-
old.selected = false;
|
|
17
|
-
this.selected.emit(value === null || value === void 0 ? void 0 : value.value);
|
|
18
|
-
}
|
|
19
|
-
async onFilterChange(value) {
|
|
20
|
-
value = value.toLowerCase();
|
|
21
|
-
if (!(await Promise.all(this.items.map(item => item.filter(value)))).some(r => r)) {
|
|
22
|
-
this.missing = true;
|
|
23
|
-
this.items.forEach(el => el.filter(""));
|
|
24
|
-
}
|
|
25
|
-
else
|
|
26
|
-
this.missing = false;
|
|
27
|
-
}
|
|
28
|
-
onClick(event) {
|
|
29
|
-
event.stopPropagation();
|
|
30
|
-
this.opened = !this.opened;
|
|
31
|
-
}
|
|
32
|
-
onItemSelected(event) {
|
|
33
|
-
this.selectedElement = event.target;
|
|
34
|
-
if (this.mainElement)
|
|
35
|
-
this.mainElement.innerHTML = this.selectedElement.innerHTML;
|
|
36
|
-
}
|
|
37
|
-
onKeyDown(event) {
|
|
38
|
-
event.stopPropagation();
|
|
39
|
-
if (this.opened) {
|
|
40
|
-
let direction = 0;
|
|
41
|
-
switch (event.key) {
|
|
42
|
-
case "ArrowUp":
|
|
43
|
-
direction = -1;
|
|
44
|
-
break;
|
|
45
|
-
case "ArrowDown":
|
|
46
|
-
direction = 1;
|
|
47
|
-
break;
|
|
48
|
-
case "Escape":
|
|
49
|
-
this.filter = "";
|
|
50
|
-
break;
|
|
51
|
-
case "Backspace":
|
|
52
|
-
this.filter = this.filter.slice(0, -1);
|
|
53
|
-
break;
|
|
54
|
-
case "Enter":
|
|
55
|
-
this.items.forEach(element => {
|
|
56
|
-
if (!element.hidden) {
|
|
57
|
-
this.selected.emit(element.value);
|
|
58
|
-
if (this.mainElement && this.selectedElement)
|
|
59
|
-
this.mainElement.innerHTML = this.selectedElement.innerHTML;
|
|
60
|
-
this.opened = false;
|
|
61
|
-
this.filter = "";
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
break;
|
|
65
|
-
default:
|
|
66
|
-
if (event.key.length == 1)
|
|
67
|
-
this.filter += event.key;
|
|
68
|
-
break;
|
|
69
|
-
}
|
|
70
|
-
this.move(direction);
|
|
71
|
-
}
|
|
72
|
-
else if (event.key == "Enter")
|
|
73
|
-
this.opened = true;
|
|
74
|
-
}
|
|
75
|
-
move(direction) {
|
|
76
|
-
if (direction) {
|
|
77
|
-
let selectedIndex = this.items.findIndex(item => item == this.selectedElement);
|
|
78
|
-
console.log("selectedindex", selectedIndex);
|
|
79
|
-
do {
|
|
80
|
-
selectedIndex = (selectedIndex + direction + this.items.length) % this.items.length;
|
|
81
|
-
} while (this.items[selectedIndex].hidden);
|
|
82
|
-
this.selectedElement = this.items[selectedIndex];
|
|
83
|
-
this.selectedElement.selected = true;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
render() {
|
|
87
|
-
return (h(Host, { tabIndex: 2, class: this.missing ? "missing" : "" }, h("main", { ref: element => (this.mainElement = element) }, "(none)"), this.filter.length != 0 ? (h("aside", { ref: element => (this.aside = element) }, this.filter, h("button", { onClick: e => {
|
|
88
|
-
e.stopPropagation();
|
|
89
|
-
this.filter = "";
|
|
90
|
-
} }, h("smoothly-icon", { name: "close", size: "small" })))) : undefined, this.opened ? h("section", { onClick: () => (this.opened = true) }) : [], h("div", { class: this.opened ? "" : "hidden" }, h("nav", null, h("slot", null)))));
|
|
91
|
-
}
|
|
92
|
-
componentDidRender() {
|
|
93
|
-
const items = [];
|
|
94
|
-
const children = this.element.querySelectorAll("div > nav > smoothly-item");
|
|
95
|
-
for (let i = 0; i < children.length; i++) {
|
|
96
|
-
const node = children.item(i);
|
|
97
|
-
if (isItem(node))
|
|
98
|
-
items.push(node);
|
|
99
|
-
}
|
|
100
|
-
this.items = items;
|
|
101
|
-
}
|
|
102
|
-
get element() { return getElement(this); }
|
|
103
|
-
static get watchers() { return {
|
|
104
|
-
"selectedElement": ["onSelectedChange"],
|
|
105
|
-
"filter": ["onFilterChange"]
|
|
106
|
-
}; }
|
|
107
|
-
};
|
|
108
|
-
function isItem(value) {
|
|
109
|
-
return (typeof value == "object" &&
|
|
110
|
-
(typeof value.selected == "boolean" || value.selected == undefined) &&
|
|
111
|
-
typeof value.filter == "function");
|
|
112
|
-
}
|
|
113
|
-
Selector.style = styleCss;
|
|
114
|
-
|
|
115
|
-
export { Selector as smoothly_selector };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, k as Host } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-skeleton-h{display:block;height:1rem}.sc-smoothly-skeleton-h::before{content:\"\";display:block;width:var(--width);height:100%;border-radius:0.4rem;background-image:linear-gradient(90deg, rgb(var(--color, var(--smoothly-dark-color))) 0, transparent 2.5rem, rgb(var(--color, var(--smoothly-dark-color))) 5rem);background-size:calc(var(--distance) + 5rem);animation-duration:var(--period, 1.6s);animation-iteration-count:infinite;animation-timing-function:linear;animation-name:shine-lines-left}@keyframes shine-lines-left{0%{background-position:-5rem}40%,100%{background-position:var(--distance)}}[align=center].sc-smoothly-skeleton-h::before{margin:0 auto;animation-name:shine-lines-center}@keyframes shine-lines-center{0%{background-position:calc((var(--width) - var(--distance)) / 2 - 5rem)}40%,100%{background-position:calc(var(--width) + (var(--distance) - var(--width)) / 2)}}[align=right].sc-smoothly-skeleton-h::before{margin:0;margin-left:auto;animation-name:shine-lines-right}@keyframes shine-lines-right{0%{background-position:calc(var(--width) - var(--distance) - 5rem)}40%,100%{background-position:var(--width)}}";
|
|
4
|
-
|
|
5
|
-
let SmoothlySkeleton = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.widths = ["8rem", "9rem", "10rem"];
|
|
9
|
-
this.align = "left";
|
|
10
|
-
}
|
|
11
|
-
componentWillLoad() {
|
|
12
|
-
var _a;
|
|
13
|
-
this.width = (_a = this.width) !== null && _a !== void 0 ? _a : this.widths[Math.floor(Math.random() * this.widths.length)];
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
var _a;
|
|
17
|
-
const cssVariables = Object.assign(Object.assign({ "--width": this.width, "--distance": (_a = this.distance) !== null && _a !== void 0 ? _a : "10rem" }, (this.color ? { "--color": this.color } : undefined)), (this.period ? { "--period": this.period + "s" } : undefined));
|
|
18
|
-
return h(Host, { style: cssVariables });
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
SmoothlySkeleton.style = styleCss;
|
|
22
|
-
|
|
23
|
-
export { SmoothlySkeleton as smoothly_skeleton };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, k as Host } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-spinner-h:not([active]){display:none}[hidden].sc-smoothly-spinner-h{display:none}.sc-smoothly-spinner-h{display:block;stroke:rgb(var(--spinner-color, var(--smoothly-primary-tint)));position:absolute;inset:0;width:100%;height:100%;background-color:rgba(var(--background-color, var(--smoothly-default-color)), var(--background-opacity, var(--smoothly-semitransparent, 0.8)))}.sc-smoothly-spinner-h svg.sc-smoothly-spinner{position:absolute;left:calc(50% - var(--size) / 2);top:calc(50% - var(--size) / 2);width:var(--size);animation:SPIN-SVG 1.4s linear infinite}.sc-smoothly-spinner-h svg.sc-smoothly-spinner circle.sc-smoothly-spinner{transform-origin:center;animation:SPIN-CIRCLE 1.4s ease-in-out infinite;stroke-dasharray:187;stroke-dashoffset:0}@keyframes SPIN-SVG{0%{transform:rotate(0deg)}100%{transform:rotate(270deg)}}@keyframes SPIN-CIRCLE{0%{stroke-dashoffset:187}50%{stroke-dashoffset:46.75;transform:rotate(135deg)}100%{stroke-dashoffset:187;transform:rotate(450deg)}}";
|
|
4
|
-
|
|
5
|
-
let SmoothlySpinner = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.size = "large";
|
|
9
|
-
}
|
|
10
|
-
render() {
|
|
11
|
-
const strokeWidth = this.size == "large" ? 6 : this.size == "medium" ? 8 : 12;
|
|
12
|
-
return (h(Host, { style: {
|
|
13
|
-
"--color": `var(--spinner-color)`,
|
|
14
|
-
"--size": this.size == "large" ? "5em" : this.size == "medium" ? "3em" : "1.2em",
|
|
15
|
-
} }, h("svg", { class: "spinner", viewBox: `0 0 ${60 + strokeWidth} ${60 + strokeWidth}`, xmlns: "http://www.w3.org/2000/svg" }, h("circle", { class: "path", fill: "none", "stroke-width": strokeWidth, "stroke-linecap": "round", cx: `${30 + strokeWidth / 2}`, cy: `${30 + strokeWidth / 2}`, r: "30" }))));
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
SmoothlySpinner.style = styleCss;
|
|
19
|
-
|
|
20
|
-
export { SmoothlySpinner as smoothly_spinner };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, i as createEvent, h } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-submit-h{display:block;border-width:1px;border-style:solid;border-radius:3px}[hidden].sc-smoothly-submit-h{display:none}[disabled].sc-smoothly-submit-h{opacity:0.5}button.sc-smoothly-submit{padding:0.2em 0.3em;font-size:110%;font-weight:400}[processing].sc-smoothly-submit-h{border-color:rgb(var(--smoothly-light-color))}[processing].sc-smoothly-submit-h>button.sc-smoothly-submit{color:rgb(var(--smoothly-light-contrast));background:rgb(var(--smoothly-light-color))}.sc-smoothly-submit-h:not([processing]):not([disabled]):hover,.sc-smoothly-submit-h:not([processing]):not([disabled]):focus,.sc-smoothly-submit-h:not([processing]):not([disabled]):active{border-color:rgb(var(--smoothly-submit-border))}[expand=fill].sc-smoothly-submit-h>button.sc-smoothly-submit,[expand=block].sc-smoothly-submit-h>button.sc-smoothly-submit{width:100%}[expand=fill].sc-smoothly-submit-h{border-left:none;border-right:none}";
|
|
4
|
-
|
|
5
|
-
let SmoothlySubmit = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.submitEvent = createEvent(this, "submit", 7);
|
|
9
|
-
this.disabled = false;
|
|
10
|
-
}
|
|
11
|
-
get form() {
|
|
12
|
-
return (this.button && this.button.form) || undefined;
|
|
13
|
-
}
|
|
14
|
-
async handleSubmit(event) {
|
|
15
|
-
if (!this.processing) {
|
|
16
|
-
this.processing = true;
|
|
17
|
-
if (this.prevent)
|
|
18
|
-
event.preventDefault();
|
|
19
|
-
const result = {};
|
|
20
|
-
if (this.form) {
|
|
21
|
-
const elements = this.form.elements;
|
|
22
|
-
for (let i = 0; i < elements.length; i++) {
|
|
23
|
-
const element = elements.item(i);
|
|
24
|
-
if (hasNameAndValue(element) && element.name)
|
|
25
|
-
result[element.name] = element.value;
|
|
26
|
-
}
|
|
27
|
-
const smoothlyInputs = this.form.getElementsByTagName("smoothly-input");
|
|
28
|
-
for (let i = 0; i < smoothlyInputs.length; i++) {
|
|
29
|
-
const element = smoothlyInputs.item(i);
|
|
30
|
-
if (hasNameAndValue(element) && element.name)
|
|
31
|
-
result[element.name] = element.value;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
this.submitEvent.emit(result);
|
|
35
|
-
this.processing = false;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
async submit() {
|
|
39
|
-
let result;
|
|
40
|
-
if ((result = !!this.form))
|
|
41
|
-
this.form.submit();
|
|
42
|
-
return result;
|
|
43
|
-
}
|
|
44
|
-
render() {
|
|
45
|
-
return [
|
|
46
|
-
h("smoothly-spinner", { active: this.processing }),
|
|
47
|
-
h("button", { type: "submit", disabled: this.disabled || this.processing, ref: (element) => (this.button = element) }, h("slot", null)),
|
|
48
|
-
];
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
function hasNameAndValue(element) {
|
|
52
|
-
return (typeof element.name == "string" && typeof element.value == "string");
|
|
53
|
-
}
|
|
54
|
-
SmoothlySubmit.style = styleCss;
|
|
55
|
-
|
|
56
|
-
export { SmoothlySubmit as smoothly_submit };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, k as Host } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-svg-h{display:block;min-width:var(--size-width);min-height:var(--size-height);background-color:rgb(var(--color))}object.sc-smoothly-svg{min-width:var(--size-width);min-height:var(--size-height);background-color:rgb(var(--color))}";
|
|
4
|
-
|
|
5
|
-
let SmoothlySvg = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.defaultSizes = {
|
|
9
|
-
large: { height: "50rem", width: "50rem" },
|
|
10
|
-
medium: { height: "30rem", width: "30rem" },
|
|
11
|
-
small: { height: "10rem", width: "10rem" },
|
|
12
|
-
tiny: { height: "5rem", width: "5rem" },
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
const height = this.size
|
|
17
|
-
? typeof this.size == "object"
|
|
18
|
-
? this.size.height
|
|
19
|
-
: this.defaultSizes[this.size].height
|
|
20
|
-
: "10rem";
|
|
21
|
-
const width = this.size
|
|
22
|
-
? typeof this.size == "object"
|
|
23
|
-
? this.size.width
|
|
24
|
-
: this.defaultSizes[this.size].width
|
|
25
|
-
: "10rem";
|
|
26
|
-
return (h(Host, { style: {
|
|
27
|
-
"min-height": height,
|
|
28
|
-
"min-width": width,
|
|
29
|
-
"--size-height": height,
|
|
30
|
-
"--size-width": width,
|
|
31
|
-
"--color": this.color,
|
|
32
|
-
} }, h("object", { height: height, width: width, type: "image/svg+xml", data: this.url })));
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
SmoothlySvg.style = styleCss;
|
|
36
|
-
|
|
37
|
-
export { SmoothlySvg as smoothly_svg };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, k as Host, j as getElement } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-tab-switch-h{display:flex;flex-direction:row;margin:1em 1em 0em 0em}";
|
|
4
|
-
|
|
5
|
-
let SmoothlyTabSwitch = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
}
|
|
9
|
-
openChanged(event) {
|
|
10
|
-
this.selectedElement = event.target;
|
|
11
|
-
this.selectedElement.open = true;
|
|
12
|
-
this.element.after(event.detail);
|
|
13
|
-
}
|
|
14
|
-
onSelectedChange(value, old) {
|
|
15
|
-
if (old)
|
|
16
|
-
old.open = false;
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
return (h(Host, null, h("slot", null)));
|
|
20
|
-
}
|
|
21
|
-
get element() { return getElement(this); }
|
|
22
|
-
static get watchers() { return {
|
|
23
|
-
"selectedElement": ["onSelectedChange"]
|
|
24
|
-
}; }
|
|
25
|
-
};
|
|
26
|
-
SmoothlyTabSwitch.style = styleCss;
|
|
27
|
-
|
|
28
|
-
export { SmoothlyTabSwitch as smoothly_tab_switch };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, i as createEvent, h, k as Host } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-tab-h:not([open])>label.sc-smoothly-tab{background-color:rgb(var(--smoothly-dark-shade))}.hide.sc-smoothly-tab{display:none}label.sc-smoothly-tab{display:block;padding:1em;background-color:rgb(var(--smoothly-default-shade));border-top-left-radius:5px;border-top-right-radius:5px;width:100px}div.sc-smoothly-tab{background-color:rgb(var(--smoothly-default-shade));padding:1em}";
|
|
4
|
-
|
|
5
|
-
let SmoothlyTab = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.expansionOpen = createEvent(this, "expansionOpen", 7);
|
|
9
|
-
}
|
|
10
|
-
openChanged() {
|
|
11
|
-
if (this.expansionElement) {
|
|
12
|
-
this.expansionOpen.emit(this.expansionElement);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
onClick(e) {
|
|
16
|
-
this.open = !this.open;
|
|
17
|
-
e.stopPropagation();
|
|
18
|
-
}
|
|
19
|
-
componentDidLoad() {
|
|
20
|
-
if (this.expansionElement && this.open) {
|
|
21
|
-
this.expansionOpen.emit(this.expansionElement);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
render() {
|
|
25
|
-
return (h(Host, null, h("label", null, this.label), h("div", { ref: e => (this.expansionElement = e), class: !this.open ? "hide" : "" }, h("slot", null))));
|
|
26
|
-
}
|
|
27
|
-
static get watchers() { return {
|
|
28
|
-
"open": ["openChanged"]
|
|
29
|
-
}; }
|
|
30
|
-
};
|
|
31
|
-
SmoothlyTab.style = styleCss;
|
|
32
|
-
|
|
33
|
-
export { SmoothlyTab as smoothly_tab };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, k as Host } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-table-cell-h{display:table-cell;padding:0.5em}";
|
|
4
|
-
|
|
5
|
-
let TableCell = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
return (h(Host, null, h("slot", null)));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
TableCell.style = styleCss;
|
|
14
|
-
|
|
15
|
-
export { TableCell as smoothly_table_cell };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = "";
|
|
4
|
-
|
|
5
|
-
let TableDemo = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
return [
|
|
11
|
-
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header A"), h("smoothly-table-header", null, "Header B"), h("smoothly-table-header", null, "Header C")), h("smoothly-table-expandable-row", null, h("smoothly-table-expandable-cell", null, "Value 1A", h("div", { slot: "detail" }, "1A details")), h("smoothly-table-expandable-cell", null, h("smoothly-display", { type: "price", value: 20, currency: "EUR" }), h("div", { slot: "detail" }, "Budget details.")), h("smoothly-table-expandable-cell", null, h("smoothly-display", { type: "price", value: 18, currency: "EUR" }), h("div", { slot: "detail" }, "Cost details."))), h("smoothly-table-expandable-row", null, h("smoothly-table-expandable-cell", null, "Value 1A", h("div", { slot: "detail" }, "2A details")), h("smoothly-table-expandable-cell", null, h("smoothly-display", { type: "price", value: 30, currency: "EUR" }), h("div", { slot: "detail" }, "Budget details.")), h("smoothly-table-expandable-cell", null, h("smoothly-display", { type: "price", value: 38, currency: "EUR" }), h("div", { slot: "detail" }, "Cost details.")))),
|
|
12
|
-
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header D"), h("smoothly-table-header", null, "Header E"), h("smoothly-table-header", null, "Header F")), h("smoothly-table-row", null, h("smoothly-table-cell", null, "Value 1A"), h("smoothly-table-cell", null, h("smoothly-display", { type: "price", value: 20, currency: "EUR" })), h("smoothly-table-cell", null, h("smoothly-display", { type: "price", value: 18, currency: "EUR" })), h("div", { slot: "detail" }, "Cost details.")), h("smoothly-table-row", null, h("smoothly-table-cell", null, "Value 1A"), h("smoothly-table-cell", null, h("smoothly-display", { type: "price", value: 20, currency: "EUR" })), h("smoothly-table-cell", null, h("smoothly-display", { type: "price", value: 18, currency: "EUR" })), h("div", { slot: "detail" }, "Cost details."))),
|
|
13
|
-
];
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
TableDemo.style = styleCss;
|
|
17
|
-
|
|
18
|
-
export { TableDemo as smoothly_table_demo };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, i as createEvent, h, k as Host, j as getElement } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-table-expandable-cell-h{display:table-cell;padding:0.5em}.hide.sc-smoothly-table-expandable-cell{display:none}";
|
|
4
|
-
|
|
5
|
-
let TableExpandableCell = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.expansionOpen = createEvent(this, "expansionOpen", 7);
|
|
9
|
-
this.expansionLoaded = createEvent(this, "expansionLoaded", 7);
|
|
10
|
-
this.align = "left";
|
|
11
|
-
}
|
|
12
|
-
openChanged(value) {
|
|
13
|
-
if (this.expansionElement)
|
|
14
|
-
if (value)
|
|
15
|
-
this.beginOpen = true;
|
|
16
|
-
else
|
|
17
|
-
this.element.append(this.expansionElement);
|
|
18
|
-
}
|
|
19
|
-
onClick() {
|
|
20
|
-
this.open = !this.open;
|
|
21
|
-
}
|
|
22
|
-
componentDidLoad() {
|
|
23
|
-
this.expansionLoaded.emit();
|
|
24
|
-
}
|
|
25
|
-
componentDidRender() {
|
|
26
|
-
if (this.beginOpen) {
|
|
27
|
-
this.beginOpen = false;
|
|
28
|
-
this.expansionOpen.emit(this.expansionElement);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
render() {
|
|
32
|
-
return (h(Host, { style: { textAlign: this.align } }, h("slot", null), h("tr", { ref: e => (this.expansionElement = e) }, h("td", { colSpan: 500, class: !this.open ? "hide" : "" }, h("slot", { name: "detail" })))));
|
|
33
|
-
}
|
|
34
|
-
get element() { return getElement(this); }
|
|
35
|
-
static get watchers() { return {
|
|
36
|
-
"open": ["openChanged"]
|
|
37
|
-
}; }
|
|
38
|
-
};
|
|
39
|
-
TableExpandableCell.style = styleCss;
|
|
40
|
-
|
|
41
|
-
export { TableExpandableCell as smoothly_table_expandable_cell };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, k as Host, j as getElement } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-table-expandable-row-h{display:table-row;border:1px solid rgb(var(--smoothly-default-color));cursor:pointer}.sc-smoothly-table-expandable-row-h:nth-child(even){background-color:rgb(var(--smoothly-default-tint))}.sc-smoothly-table-expandable-row-h:hover{background-color:rgb(var(--smoothly-default-color))}";
|
|
4
|
-
|
|
5
|
-
let TableExpandableRow = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.expansions = [];
|
|
9
|
-
}
|
|
10
|
-
onExpansionLoaded(event) {
|
|
11
|
-
this.expansions.push(event.target);
|
|
12
|
-
}
|
|
13
|
-
onDetailsLoaded(event) {
|
|
14
|
-
this.expansions.forEach(cell => {
|
|
15
|
-
if (cell != event.target)
|
|
16
|
-
cell.open = false;
|
|
17
|
-
});
|
|
18
|
-
if (event.detail)
|
|
19
|
-
this.element.after(event.detail);
|
|
20
|
-
}
|
|
21
|
-
render() {
|
|
22
|
-
return (h(Host, null, h("slot", null)));
|
|
23
|
-
}
|
|
24
|
-
get element() { return getElement(this); }
|
|
25
|
-
};
|
|
26
|
-
TableExpandableRow.style = styleCss;
|
|
27
|
-
|
|
28
|
-
export { TableExpandableRow as smoothly_table_expandable_row };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, i as createEvent, h, k as Host } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-table-header-h{display:table-cell;padding-top:12px;padding-bottom:12px;background-color:rgb(var(--smoothly-default-color));border:1px solid rgb(var(--smoothly-dark-color), 0.5);padding:0.5em;line-height:40px}.sc-smoothly-table-header-h>ion-icon.sc-smoothly-table-header{height:12px;margin-left:20px}";
|
|
4
|
-
|
|
5
|
-
let TableHeader = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.sort = createEvent(this, "sort", 7);
|
|
9
|
-
}
|
|
10
|
-
onClick(event) {
|
|
11
|
-
this.sort.emit({
|
|
12
|
-
property: this.name,
|
|
13
|
-
direction: (this.sortDirection = this.sortDirection == "ascending" ? "descending" : "ascending"),
|
|
14
|
-
});
|
|
15
|
-
console.log("sort", this.name, this.sortDirection);
|
|
16
|
-
event.preventDefault();
|
|
17
|
-
event.stopPropagation();
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
return (h(Host, null, h("slot", null), this.renderSortIcon()));
|
|
21
|
-
}
|
|
22
|
-
renderSortIcon() {
|
|
23
|
-
let result;
|
|
24
|
-
switch (this.sortDirection) {
|
|
25
|
-
case "ascending":
|
|
26
|
-
result = h("ion-icon", { name: "chevron-up-outline", class: "sort-icon" });
|
|
27
|
-
break;
|
|
28
|
-
case "descending":
|
|
29
|
-
result = h("ion-icon", { name: "chevron-down-outline", class: "sort-icon" });
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
32
|
-
return result;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
TableHeader.style = styleCss;
|
|
36
|
-
|
|
37
|
-
export { TableHeader as smoothly_table_header };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, i as createEvent, h, k as Host, j as getElement } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-table-row-h{display:table-row;border:1px solid rgb(var(--smoothly-dark-color), 0.5);cursor:pointer}.sc-smoothly-table-row-h:nth-child(even){background-color:rgb(var(--smoothly-default-color))}.sc-smoothly-table-row-h:hover{background-color:rgb(var(--smoothly-default-color))}.hide.sc-smoothly-table-row{display:none}";
|
|
4
|
-
|
|
5
|
-
let TableRow = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.expansionOpen = createEvent(this, "expansionOpen", 7);
|
|
9
|
-
this.align = "left";
|
|
10
|
-
}
|
|
11
|
-
openChanged(value) {
|
|
12
|
-
if (this.expansionElement)
|
|
13
|
-
this.element.after(this.expansionElement);
|
|
14
|
-
}
|
|
15
|
-
onClick(e) {
|
|
16
|
-
this.open = !this.open;
|
|
17
|
-
e.stopPropagation();
|
|
18
|
-
}
|
|
19
|
-
componentDidRender() {
|
|
20
|
-
this.expansionOpen.emit(this.expansionElement);
|
|
21
|
-
if (this.expansionElement && this.open)
|
|
22
|
-
this.element.after(this.expansionElement);
|
|
23
|
-
}
|
|
24
|
-
render() {
|
|
25
|
-
return (h(Host, { style: { textAlign: this.align } }, h("slot", null), h("tr", { ref: e => (this.expansionElement = e) }, h("td", { colSpan: 500, class: !this.open ? "hide" : "" }, h("slot", { name: "detail" })))));
|
|
26
|
-
}
|
|
27
|
-
get element() { return getElement(this); }
|
|
28
|
-
static get watchers() { return {
|
|
29
|
-
"open": ["openChanged"]
|
|
30
|
-
}; }
|
|
31
|
-
};
|
|
32
|
-
TableRow.style = styleCss;
|
|
33
|
-
|
|
34
|
-
export { TableRow as smoothly_table_row };
|