smoothly 0.1.114 → 0.1.117
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 -1488
- 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 +5 -4
- package/dist/collection/components/app/style.css +6 -7
- 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/menu-options/style.css +2 -2
- package/dist/collection/components/picker/index.js +10 -6
- package/dist/collection/components/picker/style.css +14 -14
- package/dist/collection/components/selector/style.css +3 -3
- package/dist/collection/components/tab/style.css +3 -3
- package/dist/collection/components/table/{exandable → expandable}/cell/index.js +0 -0
- package/dist/collection/components/table/{exandable → expandable}/cell/style.css +0 -0
- package/dist/collection/components/table/{exandable → expandable}/row/index.js +0 -0
- package/dist/collection/components/table/{exandable → expandable}/row/style.css +0 -0
- package/dist/collection/components/table/header/style.css +5 -5
- 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 -2971
- 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 -1489
- 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-4fa231df.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/table/{exandable → expandable}/cell/index.d.ts +0 -0
- package/dist/types/components/table/{exandable → expandable}/row/index.d.ts +0 -0
- package/dist/types/components.d.ts +27 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/package.json +17 -17
- 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-36da3c23.js +0 -1673
- package/dist/cjs/index-40d009d5.js +0 -1354
- package/dist/cjs/index-ac32385c.js +0 -18850
- 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-a5a08f46.js +0 -18848
- package/dist/esm/index-c8b5d468.js +0 -1349
- package/dist/esm/index-d1360bcf.js +0 -1671
- 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-a5a08f46.js +0 -18848
- package/dist/smoothly/index-c8b5d468.js +0 -1349
- package/dist/smoothly/index-d1360bcf.js +0 -1671
- package/dist/smoothly/p-0bad2c46.entry.js +0 -1
- 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-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,12 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
let SmoothlyDialogDemo = class {
|
|
4
|
-
constructor(hostRef) {
|
|
5
|
-
registerInstance(this, hostRef);
|
|
6
|
-
}
|
|
7
|
-
render() {
|
|
8
|
-
return (h("smoothly-dialog", { color: "default", style: { "margin-top": "6vh" }, closable: true }, h("smoothly-frame", { url: "https://www.wikipedia.org/", name: "parent", style: { height: "80vh" } })));
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export { SmoothlyDialogDemo as smoothly_dialog_demo };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, k as Host } from './index-02a70ac1.js';
|
|
2
|
-
import { T as Trigger } from './index-c8b5d468.js';
|
|
3
|
-
import './GoogleFont-8474516b.js';
|
|
4
|
-
|
|
5
|
-
const styleCss = ".sc-smoothly-dialog-h{display:block;position:fixed;left:0;top:0;width:100%;height:100%;z-index:1;background:rgba(var(--smoothly-default-color), var(--smoothly-semitransparent)) !important}[hidden].sc-smoothly-dialog-h{display:none}.sc-smoothly-dialog-h>header.sc-smoothly-dialog{border-top-left-radius:8px;border-top-right-radius:8px;margin-top:2em;color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-color));border-color:rgb(var(--smoothly-primary-color))}.sc-smoothly-dialog-h:not([header]) header.sc-smoothly-dialog{border:none}.sc-smoothly-dialog-h>*.sc-smoothly-dialog{position:relative;color:rgb(var(--smoothly-default-contrast));background-color:rgb(var(--smoothly-default-color));border-color:rgb(var(--smoothly-color));border-width:1px;border-style:solid;max-width:40em;width:calc(100vw - 4em - 2px);max-height:calc(100vh - 6em - 2px);height:auto;margin-left:auto;margin-right:auto;border-collapse:collapse}.sc-smoothly-dialog-h>main.sc-smoothly-dialog{border-bottom-left-radius:8px;border-bottom-right-radius:8px;margin-bottom:2em;border:1px solid rgb(var(--smoothly-default-contrast));box-sizing:border-box;overflow:hidden}.sc-smoothly-dialog-h:not([header]) main.sc-smoothly-dialog{border-radius:8px}.sc-smoothly-dialog-h>*.sc-smoothly-dialog>smoothly-trigger.sc-smoothly-dialog{position:absolute;right:-2em;top:-2em;z-index:1;border-color:transparent}.sc-smoothly-dialog-h>*.sc-smoothly-dialog>smoothly-trigger.sc-smoothly-dialog:hover{border-color:transparent}.sc-smoothly-dialog-h smoothly-icon.sc-smoothly-dialog{background-color:rgb(var(--smoothly-color));border-radius:50%}.sc-smoothly-dialog-h>*.sc-smoothly-dialog>*.sc-smoothly-dialog{margin:10px}";
|
|
6
|
-
|
|
7
|
-
let SmoothlyDialog = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
this.open = true;
|
|
11
|
-
this.closable = false;
|
|
12
|
-
}
|
|
13
|
-
TriggerListener(event) {
|
|
14
|
-
if (Trigger.is(event.detail) && event.detail.name == "close")
|
|
15
|
-
this.open = false;
|
|
16
|
-
}
|
|
17
|
-
hostData() {
|
|
18
|
-
return {
|
|
19
|
-
style: {
|
|
20
|
-
display: this.open ? "block" : "none",
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
__stencil_render() {
|
|
25
|
-
return [
|
|
26
|
-
h("header", null, this.closable ? (h("smoothly-trigger", { fill: "clear", name: "close" }, h("smoothly-icon", { name: "close-circle", fill: "solid", color: this.color }))) : ([]), this.header ? h("h1", null, this.header) : h("slot", { name: "header" })),
|
|
27
|
-
h("main", null, h("slot", null)),
|
|
28
|
-
];
|
|
29
|
-
}
|
|
30
|
-
render() { return h(Host, this.hostData(), this.__stencil_render()); }
|
|
31
|
-
};
|
|
32
|
-
SmoothlyDialog.style = styleCss;
|
|
33
|
-
|
|
34
|
-
export { SmoothlyDialog as smoothly_dialog };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance } from './index-02a70ac1.js';
|
|
2
|
-
import { d as dist } from './index-a5a08f46.js';
|
|
3
|
-
import './_commonjsHelpers-8fe71198.js';
|
|
4
|
-
|
|
5
|
-
const styleCss = ".sc-smoothly-display-amount-h{display:block}[hidden].sc-smoothly-display-amount-h{display:none}";
|
|
6
|
-
|
|
7
|
-
let SmoothlyDisplayAmount = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
}
|
|
11
|
-
format(amount) {
|
|
12
|
-
const digitsPerGroup = 3;
|
|
13
|
-
const defaultDecimals = 2;
|
|
14
|
-
const maxDecimals = (dist.Currency.decimalDigits(this.currency) ? dist.Currency.decimalDigits(this.currency) : defaultDecimals);
|
|
15
|
-
let beforeSeparator = amount.length;
|
|
16
|
-
let separator;
|
|
17
|
-
let result = amount;
|
|
18
|
-
if (result == "")
|
|
19
|
-
result = "0";
|
|
20
|
-
if (amount.includes(".")) {
|
|
21
|
-
separator = amount.indexOf(".");
|
|
22
|
-
if (separator == 0) {
|
|
23
|
-
result = "0" + result;
|
|
24
|
-
separator++;
|
|
25
|
-
}
|
|
26
|
-
beforeSeparator = separator;
|
|
27
|
-
result = result.padEnd(separator + maxDecimals + 1, "0");
|
|
28
|
-
result = result.substring(0, separator + maxDecimals + 1);
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
result = result + ".";
|
|
32
|
-
separator = result.length - 1;
|
|
33
|
-
result = result.padEnd(separator + maxDecimals + 1, "0");
|
|
34
|
-
}
|
|
35
|
-
const spaces = Math.ceil(beforeSeparator / digitsPerGroup) - 1;
|
|
36
|
-
if (spaces > 0) {
|
|
37
|
-
for (let i = 0; i < spaces; i++) {
|
|
38
|
-
const position = beforeSeparator - (spaces - i) * digitsPerGroup;
|
|
39
|
-
result = result.slice(0, position) + " " + result.slice(position, result.length);
|
|
40
|
-
beforeSeparator++;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return result;
|
|
44
|
-
}
|
|
45
|
-
render() {
|
|
46
|
-
return [
|
|
47
|
-
typeof this.amount == "number" ? this.format(this.amount.toString()) : this.format(this.amount),
|
|
48
|
-
" ",
|
|
49
|
-
this.currency,
|
|
50
|
-
];
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
SmoothlyDisplayAmount.style = styleCss;
|
|
54
|
-
|
|
55
|
-
export { SmoothlyDisplayAmount as smoothly_display_amount };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance } from './index-02a70ac1.js';
|
|
2
|
-
|
|
3
|
-
const styleCss = ".sc-smoothly-display-date-time-h{display:block}[hidden].sc-smoothly-display-date-time-h{display:none}";
|
|
4
|
-
|
|
5
|
-
let SmoothlyDisplayDateTime = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
const datetime = this.datetime.split("T");
|
|
11
|
-
return [datetime[0], " ", datetime[1]];
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
SmoothlyDisplayDateTime.style = styleCss;
|
|
15
|
-
|
|
16
|
-
export { SmoothlyDisplayDateTime as smoothly_display_date_time };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, i as createEvent, h } from './index-02a70ac1.js';
|
|
2
|
-
import { N as Notice } from './index-c8b5d468.js';
|
|
3
|
-
import './GoogleFont-8474516b.js';
|
|
4
|
-
|
|
5
|
-
let SmoothlyDisplayDemo = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.notice = createEvent(this, "notice", 7);
|
|
9
|
-
}
|
|
10
|
-
noticeWarning(notice) {
|
|
11
|
-
console.log("emit", notice);
|
|
12
|
-
this.notice.emit(notice);
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
return [
|
|
16
|
-
h("main", null, h("smoothly-popup", null, h("div", null, "Popup, click me"), h("div", { color: "dark", slot: "popup" }, "1 line popup")), h("smoothly-display-date-time", { datetime: "2019-08-15T08:08:17.65Z" }), h("dl", null, h("dt", null, "text"), h("dd", null, h("smoothly-display", { type: "text", value: "text" })), h("dt", null, "postal code"), h("dd", null, h("smoothly-display", { type: "postal-code", value: "752 31" })), h("dt", null, "password"), h("dd", null, h("smoothly-display", { type: "password", value: "password" })), h("dt", null, "email"), h("dd", null, h("smoothly-display", { type: "email", value: "test@example.com" })), h("dt", null, "price"), h("dd", null, h("smoothly-display", { type: "price", value: "13.37", currency: "SEK" })), h("dt", null, "percent"), h("dd", null, h("smoothly-display", { type: "percent", value: "42" })), h("dt", null, "phone"), h("dd", null, h("smoothly-display", { type: "phone", value: "0101881108" })), h("dt", null, "card number"), h("dd", null, h("smoothly-display", { type: "card-number", value: "4111111111111111" })), h("dt", null, "card expires"), h("dd", null, h("smoothly-display", { type: "card-expires", value: "7/22" })), h("dt", null, "card csc"), h("dd", null, h("smoothly-display", { type: "card-csc", value: "987" })), h("dt", null, "Quiet"), h("dd", null, h("smoothly-quiet", { color: "dark" }, "-"))), h("smoothly-skeleton", { period: 3, distance: "20rem", width: "20rem" }), h("smoothly-skeleton", { period: 3, distance: "20rem", color: "200,200,255" }), h("smoothly-skeleton", { period: 3, distance: "20rem", color: "var(--smoothly-warning-color)" }), h("smoothly-skeleton", { period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem", width: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem", width: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), h("smoothly-urlencoded", { data: "hej=hopp&tjena=moss" }), h("div", { style: { display: "flex", justifyContent: "space-between" } }, h("smoothly-popup", { direction: "down" }, "Click for popup", h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup stuff that has a lot of text")), h("smoothly-popup", { direction: "down" }, "Click for popup", h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup with a bunch of text."))), h("p", null, "Test of diffrent kinds of notifier:"), h("button", { onClick: () => this.noticeWarning(Notice.warn("This is a test warning notice.")) }, "warning"), h("button", { onClick: () => this.noticeWarning(Notice.succeded("This is a test success notice.")) }, "success"), h("button", { onClick: () => this.noticeWarning(Notice.failed("This is a test danger notice.")) }, "danger"), h("button", { onClick: () => this.noticeWarning(Notice.execute("This is a test execute notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "execute"), h("button", { onClick: () => this.noticeWarning(Notice.delay("This is a test delay notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "delay"), h("div", { style: { position: "relative", height: "10em" } }, "Large Spinner", h("smoothly-spinner", { active: true, size: "large", style: { "--background-color": "255,255,255", "--background-opacity": "0.2", "--spinner-color": "0,130,0", } })), h("div", { style: { position: "relative", height: "10em" } }, "Medium Spinner", h("smoothly-spinner", { active: true, size: "medium" })), h("div", { style: { position: "relative", height: "10em" } }, "Small Spinner", h("smoothly-spinner", { active: true, size: "small" })), h("div", { style: { position: "absolute", left: "500px", top: "150px" } }, h("smoothly-svg", { url: "https://theme.payfunc.com/intergiro/animated-logo.svg" }))),
|
|
17
|
-
];
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export { SmoothlyDisplayDemo as smoothly_display_demo };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-02a70ac1.js';
|
|
2
|
-
import { d as dist } from './index-d1360bcf.js';
|
|
3
|
-
import './_commonjsHelpers-8fe71198.js';
|
|
4
|
-
import './index-a5a08f46.js';
|
|
5
|
-
|
|
6
|
-
const styleCss = ".sc-smoothly-display-h{display:block}[hidden].sc-smoothly-display-h{display:none}";
|
|
7
|
-
|
|
8
|
-
let SmoothlyDisplay = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
registerInstance(this, hostRef);
|
|
11
|
-
}
|
|
12
|
-
render() {
|
|
13
|
-
let result;
|
|
14
|
-
const type = this.type;
|
|
15
|
-
switch (type) {
|
|
16
|
-
default:
|
|
17
|
-
result = dist.format(this.value, type);
|
|
18
|
-
break;
|
|
19
|
-
case "email":
|
|
20
|
-
result = h("a", { href: "mailto:" + this.value }, dist.format(this.value, type));
|
|
21
|
-
break;
|
|
22
|
-
case "phone":
|
|
23
|
-
result = h("a", { href: "tel:" + this.value }, dist.format(this.value, type, this.country));
|
|
24
|
-
break;
|
|
25
|
-
case "postal-code":
|
|
26
|
-
result = dist.format(this.value, type, this.country);
|
|
27
|
-
break;
|
|
28
|
-
case "price":
|
|
29
|
-
result = dist.format(this.value, type, this.currency);
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
32
|
-
return result;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
SmoothlyDisplay.style = styleCss;
|
|
36
|
-
|
|
37
|
-
export { SmoothlyDisplay as smoothly_display };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, i as createEvent, h, j as getElement } from './index-02a70ac1.js';
|
|
2
|
-
import { M as Message, T as Trigger } from './index-c8b5d468.js';
|
|
3
|
-
import './GoogleFont-8474516b.js';
|
|
4
|
-
|
|
5
|
-
const styleCss = ".sc-smoothly-frame-h{display:block;width:100%;height:100%}[hidden].sc-smoothly-frame-h{display:none}.sc-smoothly-frame-h>iframe.sc-smoothly-frame{border:none;padding:none;margin:none}";
|
|
6
|
-
|
|
7
|
-
let SmoothlyFrame = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
this.trigger = createEvent(this, "trigger", 7);
|
|
11
|
-
this.message = createEvent(this, "message", 7);
|
|
12
|
-
}
|
|
13
|
-
get contentWindow() {
|
|
14
|
-
const iframe = this.element && this.element.firstElementChild ? this.element.firstElementChild : undefined;
|
|
15
|
-
return (iframe && iframe.contentWindow) || undefined;
|
|
16
|
-
}
|
|
17
|
-
get defaultOrigin() {
|
|
18
|
-
const match = this.url.match(/^(([a-z]+\+)*[a-z]+:\/\/)?[^/^\n]+/);
|
|
19
|
-
return match ? match[0] : "*";
|
|
20
|
-
}
|
|
21
|
-
componentDidLoad() {
|
|
22
|
-
var _a;
|
|
23
|
-
if (this.contentWindow)
|
|
24
|
-
Message.listen((_a = this.origin) !== null && _a !== void 0 ? _a : this.defaultOrigin, (destination, content) => {
|
|
25
|
-
if (destination == this.name)
|
|
26
|
-
if (Trigger.is(content))
|
|
27
|
-
this.trigger.emit(content);
|
|
28
|
-
else
|
|
29
|
-
this.message.emit({ destination, content });
|
|
30
|
-
}, window);
|
|
31
|
-
}
|
|
32
|
-
async send(message, content) {
|
|
33
|
-
var _a, _b;
|
|
34
|
-
if (typeof message == "string")
|
|
35
|
-
Message.send(((_a = this.origin) !== null && _a !== void 0 ? _a : this.defaultOrigin) + "#" + message, content, this.contentWindow);
|
|
36
|
-
else if (Message.is(message) && this.contentWindow)
|
|
37
|
-
Message.send({ destination: ((_b = this.origin) !== null && _b !== void 0 ? _b : this.defaultOrigin) + "#" + message.destination, content: message.destination }, this.contentWindow);
|
|
38
|
-
}
|
|
39
|
-
render() {
|
|
40
|
-
return h("iframe", { src: this.url + "#" + window.location.origin, height: "100%", width: "100%" });
|
|
41
|
-
}
|
|
42
|
-
get element() { return getElement(this); }
|
|
43
|
-
};
|
|
44
|
-
SmoothlyFrame.style = styleCss;
|
|
45
|
-
|
|
46
|
-
export { SmoothlyFrame as smoothly_frame };
|