smoothly 0.1.68 → 0.1.72

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 (71) hide show
  1. package/dist/cjs/{generate-5e7cd3f7.js → generate-7f7f7d99.js} +3 -2
  2. package/dist/cjs/{index-896ac706.js → index-7c9d0102.js} +806 -638
  3. package/dist/cjs/{index-b8688617.js → index-e37f73fe.js} +89 -19
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{smoothly-accordion_43.cjs.entry.js → smoothly-accordion_44.cjs.entry.js} +1000 -737
  6. package/dist/cjs/smoothly-calendar.cjs.entry.js +7 -7
  7. package/dist/cjs/smoothly-display-amount.cjs.entry.js +2 -4
  8. package/dist/cjs/smoothly-display.cjs.entry.js +1 -1
  9. package/dist/cjs/smoothly-input-date-range.cjs.entry.js +1 -1
  10. package/dist/cjs/smoothly-input-date.cjs.entry.js +1 -1
  11. package/dist/cjs/smoothly-input-month.cjs.entry.js +11 -11
  12. package/dist/cjs/smoothly-input.cjs.entry.js +2 -2
  13. package/dist/cjs/smoothly-select.cjs.entry.js +1 -1
  14. package/dist/cjs/smoothly-table-demo.cjs.entry.js +4 -1
  15. package/dist/cjs/smoothly-table-header.cjs.entry.js +1 -1
  16. package/dist/cjs/smoothly-table-row.cjs.entry.js +21 -2
  17. package/dist/cjs/smoothly.cjs.js +1 -1
  18. package/dist/collection/components/calendar/generate.js +2 -1
  19. package/dist/collection/components/calendar/index.js +4 -4
  20. package/dist/collection/components/calendar/style.css +29 -11
  21. package/dist/collection/components/display-amount/index.js +1 -3
  22. package/dist/collection/components/input/index.js +1 -1
  23. package/dist/collection/components/input-month/index.js +8 -8
  24. package/dist/collection/components/input-month/style.css +0 -6
  25. package/dist/collection/components/select/index.js +1 -1
  26. package/dist/collection/components/table/demo/index.js +45 -24
  27. package/dist/collection/components/table/exandable/row/style.css +1 -0
  28. package/dist/collection/components/table/header/index.js +1 -1
  29. package/dist/collection/components/table/row/index.js +94 -3
  30. package/dist/collection/components/table/row/style.css +3 -0
  31. package/dist/custom-elements/index.js +941 -682
  32. package/dist/esm/{generate-fc812e0f.js → generate-7090dc14.js} +3 -2
  33. package/dist/{smoothly/index-a7e44b28.js → esm/index-01fedb5b.js} +806 -638
  34. package/dist/esm/{index-046ba252.js → index-13251390.js} +89 -19
  35. package/dist/esm/loader.js +1 -1
  36. package/dist/esm/{smoothly-accordion_43.entry.js → smoothly-accordion_44.entry.js} +1000 -738
  37. package/dist/esm/smoothly-calendar.entry.js +7 -7
  38. package/dist/esm/smoothly-display-amount.entry.js +2 -4
  39. package/dist/esm/smoothly-display.entry.js +1 -1
  40. package/dist/esm/smoothly-input-date-range.entry.js +1 -1
  41. package/dist/esm/smoothly-input-date.entry.js +1 -1
  42. package/dist/esm/smoothly-input-month.entry.js +11 -11
  43. package/dist/esm/smoothly-input.entry.js +2 -2
  44. package/dist/esm/smoothly-select.entry.js +1 -1
  45. package/dist/esm/smoothly-table-demo.entry.js +4 -1
  46. package/dist/esm/smoothly-table-header.entry.js +1 -1
  47. package/dist/esm/smoothly-table-row.entry.js +22 -3
  48. package/dist/esm/smoothly.js +1 -1
  49. package/dist/smoothly/{generate-fc812e0f.js → generate-7090dc14.js} +3 -2
  50. package/dist/{esm/index-a7e44b28.js → smoothly/index-01fedb5b.js} +806 -638
  51. package/dist/smoothly/{index-046ba252.js → index-13251390.js} +89 -19
  52. package/dist/smoothly/p-485244c2.entry.js +1 -0
  53. package/dist/smoothly/smoothly-calendar.entry.js +7 -7
  54. package/dist/smoothly/smoothly-display-amount.entry.js +2 -4
  55. package/dist/smoothly/smoothly-display.entry.js +1 -1
  56. package/dist/smoothly/smoothly-input-date-range.entry.js +1 -1
  57. package/dist/smoothly/smoothly-input-date.entry.js +1 -1
  58. package/dist/smoothly/smoothly-input-month.entry.js +11 -11
  59. package/dist/smoothly/smoothly-input.entry.js +2 -2
  60. package/dist/smoothly/smoothly-select.entry.js +1 -1
  61. package/dist/smoothly/smoothly-table-demo.entry.js +4 -1
  62. package/dist/smoothly/smoothly-table-header.entry.js +1 -1
  63. package/dist/smoothly/smoothly-table-row.entry.js +22 -3
  64. package/dist/smoothly/smoothly.esm.js +1 -1
  65. package/dist/types/components/input-month/index.d.ts +1 -1
  66. package/dist/types/components/table/demo/index.d.ts +1 -1
  67. package/dist/types/components/table/row/index.d.ts +10 -0
  68. package/dist/types/components.d.ts +5 -0
  69. package/package.json +5 -5
  70. package/dist/smoothly/p-07627dfe.entry.js +0 -1
  71. package/dist/smoothly/p-f2ed989e.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-046ba252.js';
3
- import { w as weekdays, m as month } from './generate-fc812e0f.js';
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:.5em .5em 0 .5em}th.sc-smoothly-calendar,td.sc-smoothly-calendar{text-align:center;padding:.5em;min-width:2em;background-color:rgb(var(--smoothly-default-shade))}td.sc-smoothly-calendar:nth-child(6),td.sc-smoothly-calendar:nth-child(7){color:rgb(var(--smoothly-light-shade))}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))}";
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"] : []), date == this.value ? ["selected"] : [], this.doubleInput
45
- ? dist.Date.parse(date) >= dist.Date.parse((_a = this.start) !== null && _a !== void 0 ? _a : "") &&
46
- dist.Date.parse(date) <= dist.Date.parse((_b = this.end) !== null && _b !== void 0 ? _b : "")
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-046ba252.js';
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}";
@@ -11,9 +11,7 @@ const SmoothlyDisplayAmount = class {
11
11
  format(amount) {
12
12
  const digitsPerGroup = 3;
13
13
  const defaultDecimals = 2;
14
- const maxDecimals = (dist.Currency.decimalDigits(this.currency)
15
- ? dist.Currency.decimalDigits(this.currency)
16
- : defaultDecimals);
14
+ const maxDecimals = (dist.Currency.decimalDigits(this.currency) ? dist.Currency.decimalDigits(this.currency) : defaultDecimals);
17
15
  let beforeSeparator = amount.length;
18
16
  let separator;
19
17
  let result = amount;
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h } from './index-0dd5f791.js';
2
- import { d as dist } from './index-a7e44b28.js';
2
+ import { d as dist } from './index-01fedb5b.js';
3
3
  import './_commonjsHelpers-8fe71198.js';
4
4
 
5
5
  const styleCss = ".sc-smoothly-display-h{display:block}[hidden].sc-smoothly-display-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-046ba252.js';
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-046ba252.js';
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-046ba252.js';
3
- import { y as years, a as months } from './generate-fc812e0f.js';
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}button.sc-smoothly-input-month{border:none;background:none;cursor:pointer;font-size:large}smoothly-icon.sc-smoothly-input-month{font-size:smaller}";
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("button", { onClick: () => this.adjustMonth(-1) }, h("smoothly-icon", { name: "chevron-back-outline", size: "small" })),
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("button", { onClick: () => this.adjustMonth(1) }, h("smoothly-icon", { name: "chevron-forward-outline", size: "small" })),
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
  }; }
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, i as createEvent, h, k as Host } from './index-0dd5f791.js';
2
- import { d as dist } from './index-a7e44b28.js';
2
+ import { d as dist } from './index-01fedb5b.js';
3
3
  import './_commonjsHelpers-8fe71198.js';
4
4
 
5
5
  const styleCss = ".sc-smoothly-input-h{display:block;position:relative}[hidden].sc-smoothly-input-h{display:none}label.sc-smoothly-input{position:absolute;left:0.4em;top:0.6em;color:rgb(var(--smoothly-text-tint));opacity:0.8;user-select:none;cursor:inherit;transition:font-size 0.1s;transition-timing-function:ease}input.sc-smoothly-input{padding:1em 0.2em 0.2em 0.2em;width:calc(100% - 0.4em);background:none;border:0;z-index:1;position:relative;font-size:1rem;font-family:var(--smoothly-font-family)}smoothly-icon.sc-smoothly-input{display:none;position:absolute;right:0.2em;top:0.6em}input.sc-smoothly-input:invalid+smoothly-icon.sc-smoothly-input{display:block}.has-value.sc-smoothly-input-h>label.sc-smoothly-input{top:0.3em;top:0.4em;font-size:60%;z-index:0}.sc-smoothly-input-h:focus-within>label.sc-smoothly-input{top:0.3em;top:0.4em;font-size:60%;z-index:0}input.sc-smoothly-input:focus{outline:none}input.sc-smoothly-input:-webkit-autofill,input.sc-smoothly-input:-webkit-autofill:hover,input.sc-smoothly-input:-webkit-autofill:focus,input.sc-smoothly-input:-webkit-autofill:active{box-shadow:0 0 0 30px unset inset !important;-webkit-box-shadow:0 0 0 30px unset inset !important}input.sc-smoothly-input:-webkit-autofill{-webkit-text-fill-color:unset !important}input.sc-smoothly-input:-internal-autofill-previewed,input.sc-smoothly-input:-internal-autofill-selected,textarea.sc-smoothly-input:-internal-autofill-previewed,textarea.sc-smoothly-input:-internal-autofill-selected,select.sc-smoothly-input:-internal-autofill-previewed,select.sc-smoothly-input:-internal-autofill-selected{background-color:none !important;background-image:none !important;color:unset !important}";
@@ -84,7 +84,7 @@ const SmoothlyInput = class {
84
84
  end: backend.selectionEnd != undefined ? backend.selectionEnd : backend.value.length,
85
85
  direction: backend.selectionDirection ? backend.selectionDirection : "none",
86
86
  } });
87
- if ((!(event.ctrlKey && event.key == "v") && event.key.length == 1) ||
87
+ if ((!((event.ctrlKey || event.metaKey) && event.key == "v") && event.key.length == 1) ||
88
88
  event.key == "ArrowLeft" ||
89
89
  event.key == "ArrowRight" ||
90
90
  event.key == "Delete" ||
@@ -9,7 +9,7 @@ const SmoothlySelect = class {
9
9
  }
10
10
  optionSelected() {
11
11
  if (this.selectElement)
12
- this.selectionChanged.emit({ identifier: this.identifier, value: this.value = this.selectElement.value });
12
+ this.selectionChanged.emit({ identifier: this.identifier, value: (this.value = this.selectElement.value) });
13
13
  }
14
14
  componentDidLoad() {
15
15
  var _a;
@@ -7,7 +7,10 @@ const TableDemo = class {
7
7
  registerInstance(this, hostRef);
8
8
  }
9
9
  render() {
10
- return (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.")))));
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
+ ];
11
14
  }
12
15
  };
13
16
  TableDemo.style = styleCss;
@@ -10,7 +10,7 @@ const TableHeader = class {
10
10
  onClick(event) {
11
11
  this.sort.emit({
12
12
  property: this.name,
13
- direction: this.sortDirection = this.sortDirection == "ascending" ? "descending" : "ascending",
13
+ direction: (this.sortDirection = this.sortDirection == "ascending" ? "descending" : "ascending"),
14
14
  });
15
15
  console.log("sort", this.name, this.sortDirection);
16
16
  event.preventDefault();
@@ -1,14 +1,33 @@
1
- import { r as registerInstance, h, k as Host } from './index-0dd5f791.js';
1
+ import { r as registerInstance, i as createEvent, h, k as Host, j as getElement } from './index-0dd5f791.js';
2
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))}";
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
4
 
5
5
  const TableRow = class {
6
6
  constructor(hostRef) {
7
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);
8
23
  }
9
24
  render() {
10
- return (h(Host, null, h("slot", null)));
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" })))));
11
26
  }
27
+ get element() { return getElement(this); }
28
+ static get watchers() { return {
29
+ "open": ["openChanged"]
30
+ }; }
12
31
  };
13
32
  TableRow.style = styleCss;
14
33
 
@@ -118,5 +118,5 @@ const patchCloneNodeFix = (HTMLElementPrototype) => {
118
118
 
119
119
  patchBrowser().then(options => {
120
120
  globalScripts();
121
- return bootstrapLazy([["smoothly-app-demo",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}]]],["smoothly-radio-group",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["smoothly-reorder",[[0,"smoothly-reorder"]]],["smoothly-table-cell",[[6,"smoothly-table-cell"]]],["smoothly-trigger-sink",[[6,"smoothly-trigger-sink",{"context":[16],"destination":[1],"filter":[1]},[[0,"trigger","TriggerListener"]]]]],["smoothly-trigger-source",[[6,"smoothly-trigger-source",{"listen":[1]}]]],["smoothly-input-demo",[[0,"smoothly-input-demo"]]],["smoothly-select-demo",[[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]]]],["smoothly-table-demo",[[2,"smoothly-table-demo"]]],["smoothly-display-demo",[[0,"smoothly-display-demo"]]],["smoothly-notifier",[[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]]]],["smoothly-app",[[4,"smoothly-app",{"color":[1]}]]],["smoothly-dialog-demo",[[0,"smoothly-dialog-demo"]]],["smoothly-icon-demo",[[2,"smoothly-icon-demo"]]],["smoothly-room",[[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}]]],["smoothly-input-date-range",[[2,"smoothly-input-date-range",{"value":[1025],"start":[1025],"end":[1025],"open":[1028]},[[0,"startChanged","onStartChanged"],[0,"endChanged","onEndChanged"]]]]],["smoothly-picker",[[1,"smoothly-picker",{"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"optionStyle":[8,"option-style"],"options":[16],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"isOpen":[32]},[[0,"optionSelect","optionSelectHander"]]]]],["smoothly-dialog",[[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]]]],["smoothly-checkbox",[[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"selected":[1540],"disabled":[1540],"t":[32]}]]],["smoothly-spinner",[[2,"smoothly-spinner",{"active":[516]}]]],["smoothly-submit",[[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]]]],["smoothly-urlencoded",[[0,"smoothly-urlencoded",{"data":[1]}]]],["smoothly-accordion",[[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]]]],["smoothly-accordion-item",[[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}]]],["smoothly-display-amount",[[2,"smoothly-display-amount",{"amount":[8],"currency":[1]}]]],["smoothly-frame",[[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}]]],["smoothly-popup",[[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}]]],["smoothly-radio",[[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}]]],["smoothly-select",[[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}]]],["smoothly-table",[[6,"smoothly-table",null,[[0,"sort","onSort"]]]]],["smoothly-table-expandable-cell",[[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-table-expandable-row",[[6,"smoothly-table-expandable-row",null,[[0,"expansionLoaded","onExpansionLoaded"],[0,"expansionOpen","onDetailsLoaded"]]]]],["smoothly-table-header",[[6,"smoothly-table-header",{"name":[1],"sortDirection":[1025,"sort-direction"]},[[0,"click","onClick"]]]]],["smoothly-table-row",[[6,"smoothly-table-row"]]],["smoothly-icon",[[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]]],["smoothly-selector",[[6,"smoothly-selector",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]]]],["smoothly-input-date",[[6,"smoothly-input-date",{"value":[1025],"open":[1028]}]]],["smoothly-notification",[[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]]]],["smoothly-menu-options",[[1,"smoothly-menu-options",{"emptyMenuLabel":[1025,"empty-menu-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"filteredOptions":[32],"highlightIndex":[32],"moveHighlight":[64],"setHighlight":[64],"getHighlighted":[64],"filterOptions":[64]},[[0,"optionHover","optionHoverHandler"]]]]],["smoothly-display",[[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1]}]]],["smoothly-display-date-time",[[2,"smoothly-display-date-time",{"datetime":[1]}]]],["smoothly-tuple",[[0,"smoothly-tuple",{"tuple":[16]}]]],["smoothly-option",[[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537]}]]],["smoothly-item",[[6,"smoothly-item",{"value":[8],"selected":[1540],"filter":[64]},[[0,"click","onClick"]]]]],["smoothly-input-month",[[2,"smoothly-input-month",{"value":[1025]}]]],["smoothly-calendar",[[2,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"doubleInput":[516,"double-input"]}]]],["smoothly-input",[[6,"smoothly-input",{"name":[513],"value":[1032],"type":[513],"required":[1540],"minLength":[1026,"min-length"],"maxLength":[1026,"max-length"],"autocomplete":[1028],"pattern":[1040],"placeholder":[1025],"disabled":[1028],"currency":[513],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]}]]],["smoothly-trigger",[[6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]]]]], options);
121
+ return bootstrapLazy([["smoothly-app-demo",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}]]],["smoothly-radio-group",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["smoothly-reorder",[[0,"smoothly-reorder"]]],["smoothly-trigger-sink",[[6,"smoothly-trigger-sink",{"context":[16],"destination":[1],"filter":[1]},[[0,"trigger","TriggerListener"]]]]],["smoothly-trigger-source",[[6,"smoothly-trigger-source",{"listen":[1]}]]],["smoothly-input-demo",[[0,"smoothly-input-demo"]]],["smoothly-select-demo",[[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]]]],["smoothly-table-demo",[[2,"smoothly-table-demo"]]],["smoothly-display-demo",[[0,"smoothly-display-demo"]]],["smoothly-app",[[4,"smoothly-app",{"color":[1]}]]],["smoothly-dialog-demo",[[0,"smoothly-dialog-demo"]]],["smoothly-icon-demo",[[2,"smoothly-icon-demo"]]],["smoothly-room",[[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}]]],["smoothly-input-date-range",[[2,"smoothly-input-date-range",{"value":[1025],"start":[1025],"end":[1025],"open":[1028]},[[0,"startChanged","onStartChanged"],[0,"endChanged","onEndChanged"]]]]],["smoothly-notifier",[[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]]]],["smoothly-picker",[[1,"smoothly-picker",{"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"optionStyle":[8,"option-style"],"options":[16],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"isOpen":[32]},[[0,"optionSelect","optionSelectHander"]]]]],["smoothly-dialog",[[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]]]],["smoothly-checkbox",[[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"selected":[1540],"disabled":[1540],"t":[32]}]]],["smoothly-submit",[[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]]]],["smoothly-tuple",[[0,"smoothly-tuple",{"tuple":[16]}]]],["smoothly-urlencoded",[[0,"smoothly-urlencoded",{"data":[1]}]]],["smoothly-accordion",[[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]]]],["smoothly-accordion-item",[[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}]]],["smoothly-display-amount",[[2,"smoothly-display-amount",{"amount":[8],"currency":[1]}]]],["smoothly-frame",[[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}]]],["smoothly-popup",[[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}]]],["smoothly-radio",[[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}]]],["smoothly-select",[[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}]]],["smoothly-table",[[6,"smoothly-table",null,[[0,"sort","onSort"]]]]],["smoothly-table-cell",[[6,"smoothly-table-cell"]]],["smoothly-table-expandable-cell",[[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-table-expandable-row",[[6,"smoothly-table-expandable-row",null,[[0,"expansionLoaded","onExpansionLoaded"],[0,"expansionOpen","onDetailsLoaded"]]]]],["smoothly-table-header",[[6,"smoothly-table-header",{"name":[1],"sortDirection":[1025,"sort-direction"]},[[0,"click","onClick"]]]]],["smoothly-table-row",[[6,"smoothly-table-row",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-icon",[[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]]],["smoothly-selector",[[6,"smoothly-selector",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]]]],["smoothly-input-date",[[6,"smoothly-input-date",{"value":[1025],"open":[1028]}]]],["smoothly-notification",[[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]]]],["smoothly-menu-options",[[1,"smoothly-menu-options",{"emptyMenuLabel":[1025,"empty-menu-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"filteredOptions":[32],"highlightIndex":[32],"moveHighlight":[64],"setHighlight":[64],"getHighlighted":[64],"filterOptions":[64]},[[0,"optionHover","optionHoverHandler"]]]]],["smoothly-display",[[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1]}]]],["smoothly-display-date-time",[[2,"smoothly-display-date-time",{"datetime":[1]}]]],["smoothly-spinner",[[2,"smoothly-spinner",{"active":[516]}]]],["smoothly-option",[[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537]}]]],["smoothly-item",[[6,"smoothly-item",{"value":[8],"selected":[1540],"filter":[64]},[[0,"click","onClick"]]]]],["smoothly-input-month",[[2,"smoothly-input-month",{"value":[1025]}]]],["smoothly-calendar",[[2,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"doubleInput":[516,"double-input"]}]]],["smoothly-input",[[6,"smoothly-input",{"name":[513],"value":[1032],"type":[513],"required":[1540],"minLength":[1026,"min-length"],"maxLength":[1026,"max-length"],"autocomplete":[1028],"pattern":[1040],"placeholder":[1025],"disabled":[1028],"currency":[513],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]}]]],["smoothly-trigger",[[6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]]]]], options);
122
122
  });
@@ -1,4 +1,4 @@
1
- import { d as dist } from './index-046ba252.js';
1
+ import { d as dist } from './index-13251390.js';
2
2
 
3
3
  function month(date) {
4
4
  const d = new Date(date);
@@ -12,7 +12,8 @@ function month(date) {
12
12
  d.setDate(day++);
13
13
  r.push(dist.Date.create(d));
14
14
  }
15
- result.push(r);
15
+ if (row < 5 || dist.Date.firstOfMonth(r[0]) == dist.Date.firstOfMonth(date))
16
+ result.push(r);
16
17
  }
17
18
  return result;
18
19
  }