smoothly 0.1.69 → 0.1.70
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/{generate-5e7cd3f7.js → generate-7f7f7d99.js} +3 -2
- package/dist/cjs/{index-b8688617.js → index-e37f73fe.js} +89 -19
- package/dist/cjs/smoothly-accordion_43.cjs.entry.js +104 -33
- package/dist/cjs/smoothly-calendar.cjs.entry.js +7 -7
- package/dist/cjs/smoothly-display-amount.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-input-date-range.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-input-date.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-input-month.cjs.entry.js +11 -11
- package/dist/collection/components/calendar/generate.js +2 -1
- package/dist/collection/components/calendar/index.js +4 -4
- package/dist/collection/components/calendar/style.css +29 -11
- package/dist/collection/components/input-month/index.js +8 -8
- package/dist/collection/components/input-month/style.css +0 -6
- package/dist/custom-elements/index.js +105 -34
- package/dist/{smoothly/generate-fc812e0f.js → esm/generate-7090dc14.js} +3 -2
- package/dist/{smoothly/index-046ba252.js → esm/index-13251390.js} +89 -19
- package/dist/esm/smoothly-accordion_43.entry.js +104 -33
- package/dist/esm/smoothly-calendar.entry.js +7 -7
- package/dist/esm/smoothly-display-amount.entry.js +1 -1
- package/dist/esm/smoothly-input-date-range.entry.js +1 -1
- package/dist/esm/smoothly-input-date.entry.js +1 -1
- package/dist/esm/smoothly-input-month.entry.js +11 -11
- package/dist/{esm/generate-fc812e0f.js → smoothly/generate-7090dc14.js} +3 -2
- package/dist/{esm/index-046ba252.js → smoothly/index-13251390.js} +89 -19
- package/dist/smoothly/p-2e35abfc.entry.js +1 -0
- package/dist/smoothly/smoothly-calendar.entry.js +7 -7
- package/dist/smoothly/smoothly-display-amount.entry.js +1 -1
- package/dist/smoothly/smoothly-input-date-range.entry.js +1 -1
- package/dist/smoothly/smoothly-input-date.entry.js +1 -1
- package/dist/smoothly/smoothly-input-month.entry.js +11 -11
- package/dist/types/components/input-month/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/smoothly/p-9439cb96.entry.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, i as createEvent, h, j as getElement } from './index-0dd5f791.js';
|
|
2
|
-
import { d as dist } from './index-
|
|
3
|
-
import { w as weekdays, m as month } from './generate-
|
|
2
|
+
import { d as dist } from './index-13251390.js';
|
|
3
|
+
import { w as weekdays, m as month } from './generate-7090dc14.js';
|
|
4
4
|
import './_commonjsHelpers-8fe71198.js';
|
|
5
5
|
|
|
6
|
-
const styleCss = ".sc-smoothly-calendar-h{display:block}.sc-smoothly-calendar-h>smoothly-input-month.sc-smoothly-calendar{width:calc(100% - 1em);padding
|
|
6
|
+
const styleCss = ".sc-smoothly-calendar-h{display:block;--other-month-opacity:0.5}.sc-smoothly-calendar-h>smoothly-input-month.sc-smoothly-calendar{width:calc(100% - 1em);padding:0.5em 0.5em 0 0.5em}th.sc-smoothly-calendar,td.sc-smoothly-calendar{text-align:center;padding:0.5em;min-width:2em;background-color:rgb(var(--smoothly-default-shade));cursor:pointer;user-select:none}td.currentMonth.sc-smoothly-calendar{color:rgb(var(--smoothly-default-contrast))}td.sc-smoothly-calendar:not(.currentMonth){color:rgba(var(--smoothly-default-contrast), var(--other-month-opacity))}td.sc-smoothly-calendar:nth-child(6):not(.currentMonth).selected,td.sc-smoothly-calendar:nth-child(6):not(.currentMonth).dateRange,td.sc-smoothly-calendar:nth-child(7):not(.currentMonth).selected,td.sc-smoothly-calendar:nth-child(7):not(.currentMonth).dateRange{color:rgba(var(--smoothly-default-contrast))}td.sc-smoothly-calendar:nth-child(6),td.sc-smoothly-calendar:nth-child(7){color:rgb(var(--smoothly-danger-tint))}td.sc-smoothly-calendar:nth-child(6):not(.currentMonth),td.sc-smoothly-calendar:nth-child(7):not(.currentMonth){color:rgba(var(--smoothly-danger-tint), var(--other-month-opacity))}td.sc-smoothly-calendar:not(.selected):hover{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-tint))}td.selected.sc-smoothly-calendar{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-color))}td.sc-smoothly-calendar:not(.selected,.dateRange).sc-smoothly-calendar:not(:hover).today{background:rgb(var(--smoothly-dark-tint));color:rgb(var(--smoothly-dark-contrast))}td.dateRange.sc-smoothly-calendar{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-tint))}";
|
|
7
7
|
|
|
8
8
|
const Calendar = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -28,7 +28,7 @@ const Calendar = class {
|
|
|
28
28
|
event.stopPropagation();
|
|
29
29
|
} }),
|
|
30
30
|
h("table", null, h("thead", null, h("tr", null, weekdays().map(day => (h("th", null, day))))), month((_b = this.month) !== null && _b !== void 0 ? _b : this.value).map(week => (h("tr", null, week.map(date => {
|
|
31
|
-
var _a, _b;
|
|
31
|
+
var _a, _b, _c;
|
|
32
32
|
return (h("td", { tabindex: 1, onClick: () => {
|
|
33
33
|
this.valueChanged.emit((this.value = date));
|
|
34
34
|
this.clickCounter += 1;
|
|
@@ -41,9 +41,9 @@ const Calendar = class {
|
|
|
41
41
|
this.start = date;
|
|
42
42
|
}
|
|
43
43
|
}, class: (date == this.value ? ["selected"] : [])
|
|
44
|
-
.concat(...(date == dist.Date.now() ? ["today"] : []),
|
|
45
|
-
? dist.Date.parse(date) >= dist.Date.parse((
|
|
46
|
-
dist.Date.parse(date) <= dist.Date.parse((
|
|
44
|
+
.concat(...(date == dist.Date.now() ? ["today"] : []), dist.Date.firstOfMonth((_a = this.month) !== null && _a !== void 0 ? _a : this.value) == dist.Date.firstOfMonth(date) ? ["currentMonth"] : [], this.doubleInput
|
|
45
|
+
? dist.Date.parse(date) >= dist.Date.parse((_b = this.start) !== null && _b !== void 0 ? _b : "") &&
|
|
46
|
+
dist.Date.parse(date) <= dist.Date.parse((_c = this.end) !== null && _c !== void 0 ? _c : "")
|
|
47
47
|
? ["dateRange"]
|
|
48
48
|
: []
|
|
49
49
|
: "")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance } from './index-0dd5f791.js';
|
|
2
|
-
import { d as dist } from './index-
|
|
2
|
+
import { d as dist } from './index-13251390.js';
|
|
3
3
|
import './_commonjsHelpers-8fe71198.js';
|
|
4
4
|
|
|
5
5
|
const styleCss = ".sc-smoothly-display-amount-h{display:block}[hidden].sc-smoothly-display-amount-h{display:none}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, i as createEvent, h } from './index-0dd5f791.js';
|
|
2
|
-
import { d as dist } from './index-
|
|
2
|
+
import { d as dist } from './index-13251390.js';
|
|
3
3
|
import './_commonjsHelpers-8fe71198.js';
|
|
4
4
|
|
|
5
5
|
const styleCss = ".sc-smoothly-input-date-range-h{position:relative;display:block}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-range-h>div.sc-smoothly-input-date-range{position:fixed;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range>.arrow.sc-smoothly-input-date-range{position:absolute;z-index:9;transform:translate(10em, -.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-default-shade))}.sc-smoothly-input-date-range-h>section.sc-smoothly-input-date-range{display:flex;flex-direction:row;align-items:center}.sc-smoothly-input-date-range-h>smoothly-input.sc-smoothly-input-date-range{padding:0}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, i as createEvent, h } from './index-0dd5f791.js';
|
|
2
|
-
import { d as dist } from './index-
|
|
2
|
+
import { d as dist } from './index-13251390.js';
|
|
3
3
|
import './_commonjsHelpers-8fe71198.js';
|
|
4
4
|
|
|
5
5
|
const styleCss = ".sc-smoothly-input-date-h{position:relative}nav.sc-smoothly-input-date{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-h>div.sc-smoothly-input-date{position:fixed;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-h>nav.sc-smoothly-input-date>.arrow.sc-smoothly-input-date{position:absolute;z-index:9;transform:translate(2em, -.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-default-shade))}";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, i as createEvent, h } from './index-0dd5f791.js';
|
|
2
|
-
import { d as dist } from './index-
|
|
3
|
-
import { y as years, a as months } from './generate-
|
|
2
|
+
import { d as dist } from './index-13251390.js';
|
|
3
|
+
import { y as years, a as months } from './generate-7090dc14.js';
|
|
4
4
|
import './_commonjsHelpers-8fe71198.js';
|
|
5
5
|
|
|
6
|
-
const styleCss = ".sc-smoothly-input-month-h{display:flex;justify-content:space-between;font-size:large}
|
|
6
|
+
const styleCss = ".sc-smoothly-input-month-h{display:flex;justify-content:space-between;font-size:large}smoothly-icon.sc-smoothly-input-month{font-size:smaller}";
|
|
7
7
|
|
|
8
8
|
const MonthSelector = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -13,21 +13,21 @@ const MonthSelector = class {
|
|
|
13
13
|
onValueChanged(next) {
|
|
14
14
|
this.valueChanged.emit(next);
|
|
15
15
|
}
|
|
16
|
+
adjustMonth(delta) {
|
|
17
|
+
var _a;
|
|
18
|
+
const date = dist.Date.parse((_a = this.value) !== null && _a !== void 0 ? _a : dist.Date.now());
|
|
19
|
+
date.setMonth(date.getMonth() + delta);
|
|
20
|
+
this.value = dist.Date.create(date);
|
|
21
|
+
}
|
|
16
22
|
render() {
|
|
17
23
|
var _a, _b;
|
|
18
24
|
return [
|
|
19
|
-
h("
|
|
25
|
+
h("div", { onClick: () => this.adjustMonth(-1) }, h("smoothly-icon", { name: "chevron-back-outline", size: "small" })),
|
|
20
26
|
h("smoothly-selector", { onSelected: (e) => (this.value = e.detail) }, years((_a = this.value) !== null && _a !== void 0 ? _a : dist.Date.now()).map(year => (h("smoothly-item", { value: year.date, selected: year.selected }, year.name)))),
|
|
21
27
|
h("smoothly-selector", { onSelected: (e) => (this.value = e.detail) }, months((_b = this.value) !== null && _b !== void 0 ? _b : dist.Date.now()).map(month => (h("smoothly-item", { value: month.date, selected: month.selected }, month.name)))),
|
|
22
|
-
h("
|
|
28
|
+
h("div", { onClick: () => this.adjustMonth(1) }, h("smoothly-icon", { name: "chevron-forward-outline", size: "small" })),
|
|
23
29
|
];
|
|
24
30
|
}
|
|
25
|
-
adjustMonth(delta) {
|
|
26
|
-
var _a;
|
|
27
|
-
const date = dist.Date.parse((_a = this.value) !== null && _a !== void 0 ? _a : dist.Date.now());
|
|
28
|
-
date.setMonth(date.getMonth() + delta);
|
|
29
|
-
this.value = dist.Date.create(date);
|
|
30
|
-
}
|
|
31
31
|
static get watchers() { return {
|
|
32
32
|
"value": ["onValueChanged"]
|
|
33
33
|
}; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smoothly",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.70",
|
|
4
4
|
"description": "Web component library written in Stencil.",
|
|
5
5
|
"author": "PayFunc",
|
|
6
6
|
"license": "MIT",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"authly": "0.2.4",
|
|
65
|
-
"isoly": "0.0.
|
|
65
|
+
"isoly": "0.0.34",
|
|
66
66
|
"langly": "0.0.11",
|
|
67
67
|
"normalize.css": "^8.0.1",
|
|
68
68
|
"stencil-router-v2": "^0.6.0",
|