smoothly 0.1.85 → 0.1.89

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.
Files changed (60) hide show
  1. package/dist/cjs/{generate-a6821b82.js → generate-f9a36f25.js} +1 -1
  2. package/dist/cjs/{index-fc82954f.js → index-ac32385c.js} +230 -184
  3. package/dist/cjs/index-bc3845e8.js +1670 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/smoothly-accordion_47.cjs.entry.js +1166 -19145
  6. package/dist/cjs/smoothly-calendar.cjs.entry.js +40 -12
  7. package/dist/cjs/smoothly-display-amount.cjs.entry.js +1 -1
  8. package/dist/cjs/smoothly-display.cjs.entry.js +2 -1
  9. package/dist/cjs/smoothly-input-date-range.cjs.entry.js +10 -11
  10. package/dist/cjs/smoothly-input-date.cjs.entry.js +6 -2
  11. package/dist/cjs/smoothly-input-month.cjs.entry.js +2 -2
  12. package/dist/cjs/smoothly-input.cjs.entry.js +19 -12
  13. package/dist/cjs/smoothly-select-demo.cjs.entry.js +3 -2
  14. package/dist/cjs/smoothly.cjs.js +1 -1
  15. package/dist/collection/components/calendar/index.js +80 -11
  16. package/dist/collection/components/display/index.js +1 -1
  17. package/dist/collection/components/input/index.js +20 -13
  18. package/dist/collection/components/input-date/index.js +12 -1
  19. package/dist/collection/components/input-date/style.css +4 -0
  20. package/dist/collection/components/input-date-range/index.js +14 -15
  21. package/dist/collection/components/input-date-range/style.css +4 -0
  22. package/dist/collection/components/select-demo/index.js +3 -2
  23. package/dist/custom-elements/index.js +1335 -19513
  24. package/dist/{smoothly/generate-776b3b0f.js → esm/generate-50b98474.js} +1 -1
  25. package/dist/esm/index-37a67c97.js +1668 -0
  26. package/dist/{smoothly/index-a28d88cf.js → esm/index-a5a08f46.js} +230 -184
  27. package/dist/esm/loader.js +1 -1
  28. package/dist/esm/smoothly-accordion_47.entry.js +1166 -19145
  29. package/dist/esm/smoothly-calendar.entry.js +40 -12
  30. package/dist/esm/smoothly-display-amount.entry.js +1 -1
  31. package/dist/esm/smoothly-display.entry.js +2 -1
  32. package/dist/esm/smoothly-input-date-range.entry.js +10 -11
  33. package/dist/esm/smoothly-input-date.entry.js +6 -2
  34. package/dist/esm/smoothly-input-month.entry.js +2 -2
  35. package/dist/esm/smoothly-input.entry.js +19 -12
  36. package/dist/esm/smoothly-select-demo.entry.js +3 -2
  37. package/dist/esm/smoothly.js +1 -1
  38. package/dist/{esm/generate-776b3b0f.js → smoothly/generate-50b98474.js} +1 -1
  39. package/dist/smoothly/index-37a67c97.js +1668 -0
  40. package/dist/{esm/index-a28d88cf.js → smoothly/index-a5a08f46.js} +230 -184
  41. package/dist/smoothly/p-8a51635f.entry.js +1 -0
  42. package/dist/smoothly/smoothly-calendar.entry.js +40 -12
  43. package/dist/smoothly/smoothly-display-amount.entry.js +1 -1
  44. package/dist/smoothly/smoothly-display.entry.js +2 -1
  45. package/dist/smoothly/smoothly-input-date-range.entry.js +10 -11
  46. package/dist/smoothly/smoothly-input-date.entry.js +6 -2
  47. package/dist/smoothly/smoothly-input-month.entry.js +2 -2
  48. package/dist/smoothly/smoothly-input.entry.js +19 -12
  49. package/dist/smoothly/smoothly-select-demo.entry.js +3 -2
  50. package/dist/smoothly/smoothly.esm.js +1 -1
  51. package/dist/types/components/calendar/index.d.ts +6 -1
  52. package/dist/types/components/input/index.d.ts +1 -0
  53. package/dist/types/components/input-date/index.d.ts +1 -0
  54. package/dist/types/components/input-date-range/index.d.ts +2 -2
  55. package/dist/types/components.d.ts +3 -1
  56. package/package.json +3 -3
  57. package/dist/cjs/index-42db74b3.js +0 -19931
  58. package/dist/esm/index-36a04e8c.js +0 -19929
  59. package/dist/smoothly/index-36a04e8c.js +0 -19929
  60. package/dist/smoothly/p-5ca32c49.entry.js +0 -1
@@ -1,19 +1,21 @@
1
1
  import { Component, Event, h, Listen, Prop, Watch } from "@stencil/core";
2
- import { Date } from "isoly";
2
+ import { Date, DateRange } from "isoly";
3
3
  export class InputDateRange {
4
4
  onValue(next) {
5
5
  this.valueChanged.emit(next);
6
6
  }
7
- onClose(open) {
8
- if (open == false && Date.is(this.start) && Date.is(this.end))
9
- this.dateRangeSelected.emit({ start: this.start, end: this.end });
10
- }
11
7
  onStartChanged(event) {
12
8
  this.start = event.detail;
13
9
  }
14
10
  onEndChanged(event) {
15
11
  this.end = event.detail;
16
12
  }
13
+ onDateRangeSet(event) {
14
+ console.log("dateRangeSet", event.detail);
15
+ this.open = false;
16
+ event.stopPropagation();
17
+ DateRange.is(event.detail) && this.dateRangeSelected.emit(event.detail);
18
+ }
17
19
  render() {
18
20
  var _a;
19
21
  return [
@@ -26,7 +28,7 @@ export class InputDateRange {
26
28
  h("smoothly-calendar", { doubleInput: true, value: (_a = this.value) !== null && _a !== void 0 ? _a : Date.now(), onValueChanged: event => {
27
29
  this.value = event.detail;
28
30
  event.stopPropagation();
29
- }, max: this.max, min: this.min }))) : ([]),
31
+ }, start: this.start, end: this.end, max: this.max, min: this.min }))) : ([]),
30
32
  ];
31
33
  }
32
34
  static get is() { return "smoothly-input-date-range"; }
@@ -210,15 +212,6 @@ export class InputDateRange {
210
212
  static get watchers() { return [{
211
213
  "propName": "value",
212
214
  "methodName": "onValue"
213
- }, {
214
- "propName": "open",
215
- "methodName": "onClose"
216
- }, {
217
- "propName": "start",
218
- "methodName": "onClose"
219
- }, {
220
- "propName": "end",
221
- "methodName": "onClose"
222
215
  }]; }
223
216
  static get listeners() { return [{
224
217
  "name": "startChanged",
@@ -232,5 +225,11 @@ export class InputDateRange {
232
225
  "target": undefined,
233
226
  "capture": false,
234
227
  "passive": false
228
+ }, {
229
+ "name": "dateRangeSet",
230
+ "method": "onDateRangeSet",
231
+ "target": undefined,
232
+ "capture": false,
233
+ "passive": false
235
234
  }]; }
236
235
  }
@@ -13,6 +13,10 @@
13
13
  }
14
14
  :host > div {
15
15
  position: fixed;
16
+ top: 0px;
17
+ left: 0px;
18
+ right: 0px;
19
+ bottom: 0px;
16
20
  width: 100vw;
17
21
  height: 100vh;
18
22
  z-index: 2;
@@ -26,8 +26,9 @@ export class SmoothlySelectDemo {
26
26
  h("option", { value: "1" }, "1"),
27
27
  h("option", { value: "2" }, "2"),
28
28
  h("option", { value: "3" }, "3")),
29
- h("smoothly-input-date", { max: "2021-12-30", min: "2021-10-10" }, "Date"),
30
- h("smoothly-input-date-range", { max: "2021-12-30", min: "2021-10-10" }),
29
+ h("smoothly-input-date", null, "Date"),
30
+ h("smoothly-input-date", { value: "2021-10-28", max: "2021-12-30", min: "2021-10-10" }, "Date"),
31
+ h("smoothly-input-date-range", { start: "2021-10-28", end: "2021-11-27", min: "2021-10-10", max: "2021-12-30" }),
31
32
  h("smoothly-selector", null,
32
33
  h("smoothly-item", { value: "1" }, "January"),
33
34
  h("smoothly-item", { value: "2" }, "February"),