smoothly 0.1.87 → 0.1.91

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 (85) hide show
  1. package/dist/cjs/GoogleFont-6c4f0da1.js +21 -0
  2. package/dist/cjs/{index-de5d1ee1.js → index-40d009d5.js} +2 -0
  3. package/dist/cjs/{index-328edd81.js → index-bc3845e8.js} +253 -182
  4. package/dist/cjs/index.cjs.js +8 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/smoothly-accordion_47.cjs.entry.js +296 -201
  7. package/dist/cjs/smoothly-calendar.cjs.entry.js +38 -10
  8. package/dist/cjs/smoothly-dialog.cjs.entry.js +2 -1
  9. package/dist/cjs/smoothly-display-demo.cjs.entry.js +2 -1
  10. package/dist/cjs/smoothly-display.cjs.entry.js +1 -1
  11. package/dist/cjs/smoothly-frame.cjs.entry.js +2 -1
  12. package/dist/cjs/smoothly-google-font.cjs.entry.js +17 -0
  13. package/dist/cjs/smoothly-input-date-range.cjs.entry.js +8 -9
  14. package/dist/cjs/smoothly-input-date.cjs.entry.js +4 -0
  15. package/dist/cjs/smoothly-input.cjs.entry.js +4 -4
  16. package/dist/cjs/smoothly-select-demo.cjs.entry.js +1 -0
  17. package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +2 -1
  18. package/dist/cjs/smoothly-trigger-source.cjs.entry.js +2 -1
  19. package/dist/cjs/smoothly.cjs.js +1 -1
  20. package/dist/collection/collection-manifest.json +1 -0
  21. package/dist/collection/components/calendar/index.js +80 -11
  22. package/dist/collection/components/google-font/index.js +33 -0
  23. package/dist/collection/components/input/index.js +3 -3
  24. package/dist/collection/components/input/style.css +1 -0
  25. package/dist/collection/components/input-date/index.js +12 -1
  26. package/dist/collection/components/input-date-range/index.js +14 -15
  27. package/dist/collection/components/select-demo/index.js +1 -0
  28. package/dist/collection/index.js +1 -1
  29. package/dist/collection/model/GoogleFont.js +19 -0
  30. package/dist/collection/model/index.js +1 -0
  31. package/dist/custom-elements/index.d.ts +6 -0
  32. package/dist/custom-elements/index.js +349 -214
  33. package/dist/esm/GoogleFont-8474516b.js +21 -0
  34. package/dist/esm/{index-1be6d668.js → index-37a67c97.js} +253 -182
  35. package/dist/{smoothly/index-68492ed9.js → esm/index-c8b5d468.js} +2 -0
  36. package/dist/esm/index.js +2 -1
  37. package/dist/esm/loader.js +1 -1
  38. package/dist/esm/smoothly-accordion_47.entry.js +296 -201
  39. package/dist/esm/smoothly-calendar.entry.js +38 -10
  40. package/dist/esm/smoothly-dialog.entry.js +2 -1
  41. package/dist/esm/smoothly-display-demo.entry.js +2 -1
  42. package/dist/esm/smoothly-display.entry.js +1 -1
  43. package/dist/esm/smoothly-frame.entry.js +2 -1
  44. package/dist/esm/smoothly-google-font.entry.js +13 -0
  45. package/dist/esm/smoothly-input-date-range.entry.js +8 -9
  46. package/dist/esm/smoothly-input-date.entry.js +4 -0
  47. package/dist/esm/smoothly-input.entry.js +4 -4
  48. package/dist/esm/smoothly-select-demo.entry.js +1 -0
  49. package/dist/esm/smoothly-trigger-sink.entry.js +2 -1
  50. package/dist/esm/smoothly-trigger-source.entry.js +2 -1
  51. package/dist/esm/smoothly.js +1 -1
  52. package/dist/smoothly/GoogleFont-8474516b.js +21 -0
  53. package/dist/smoothly/{index-1be6d668.js → index-37a67c97.js} +253 -182
  54. package/dist/{esm/index-68492ed9.js → smoothly/index-c8b5d468.js} +2 -0
  55. package/dist/smoothly/index.esm.js +2 -1
  56. package/dist/smoothly/p-14232157.entry.js +1 -0
  57. package/dist/smoothly/p-22d4d5a7.entry.js +1 -0
  58. package/dist/smoothly/p-9947e4bf.entry.js +1 -0
  59. package/dist/smoothly/p-b8a3e273.entry.js +1 -0
  60. package/dist/smoothly/p-bd478a53.js +1 -0
  61. package/dist/smoothly/smoothly-calendar.entry.js +38 -10
  62. package/dist/smoothly/smoothly-dialog.entry.js +2 -1
  63. package/dist/smoothly/smoothly-display-demo.entry.js +2 -1
  64. package/dist/smoothly/smoothly-display.entry.js +1 -1
  65. package/dist/smoothly/smoothly-frame.entry.js +2 -1
  66. package/dist/smoothly/smoothly-google-font.entry.js +13 -0
  67. package/dist/smoothly/smoothly-input-date-range.entry.js +8 -9
  68. package/dist/smoothly/smoothly-input-date.entry.js +4 -0
  69. package/dist/smoothly/smoothly-input.entry.js +4 -4
  70. package/dist/smoothly/smoothly-select-demo.entry.js +1 -0
  71. package/dist/smoothly/smoothly-trigger-sink.entry.js +2 -1
  72. package/dist/smoothly/smoothly-trigger-source.entry.js +2 -1
  73. package/dist/smoothly/smoothly.esm.js +1 -1
  74. package/dist/types/components/calendar/index.d.ts +6 -1
  75. package/dist/types/components/google-font/index.d.ts +5 -0
  76. package/dist/types/components/input-date/index.d.ts +1 -0
  77. package/dist/types/components/input-date-range/index.d.ts +2 -2
  78. package/dist/types/components.d.ts +19 -1
  79. package/dist/types/index.d.ts +1 -1
  80. package/dist/types/model/GoogleFont.d.ts +6 -0
  81. package/dist/types/model/index.d.ts +1 -0
  82. package/package.json +2 -2
  83. package/dist/smoothly/p-09d633f8.entry.js +0 -1
  84. package/dist/smoothly/p-1a81597b.entry.js +0 -1
  85. package/dist/smoothly/p-7b43df84.entry.js +0 -1
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-41a36ce2.js');
6
6
  const Notice = require('./Notice-9120d311.js');
7
7
  const Trigger = require('./Trigger-74bd1ee8.js');
8
+ require('./GoogleFont-6c4f0da1.js');
8
9
 
9
10
  const styleCss$D = "smoothly-accordion-item.sc-smoothly-accordion{border:1px solid rgb(var(--smoothly-dark-color));border-bottom:none}smoothly-accordion-item.sc-smoothly-accordion:first-of-type{border-top-left-radius:4px;border-top-right-radius:4px;margin-top:0.4em}smoothly-accordion-item.sc-smoothly-accordion:last-of-type{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:1px solid rgb(var(--smoothly-dark-color));margin-bottom:0.6em}smoothly-accordion-item[open].sc-smoothly-accordion{border-color:rgb(var(--smoothly-primary-color));border-bottom:1px solid rgb(var(--smoothly-primary-color))}smoothly-accordion-item[open].sc-smoothly-accordion+smoothly-accordion-item.sc-smoothly-accordion{border-top:none}";
10
11
 
@@ -18835,6 +18836,8 @@ let Calendar = class {
18835
18836
  this.valueChanged = index.createEvent(this, "valueChanged", 7);
18836
18837
  this.startChanged = index.createEvent(this, "startChanged", 7);
18837
18838
  this.endChanged = index.createEvent(this, "endChanged", 7);
18839
+ this.dateSet = index.createEvent(this, "dateSet", 7);
18840
+ this.dateRangeSet = index.createEvent(this, "dateRangeSet", 7);
18838
18841
  this.value = dist$3.Date.now();
18839
18842
  this.clickCounter = 0;
18840
18843
  }
@@ -18847,13 +18850,33 @@ let Calendar = class {
18847
18850
  onClick(date) {
18848
18851
  this.valueChanged.emit((this.value = date));
18849
18852
  this.clickCounter += 1;
18850
- if (this.clickCounter % 2 == 1)
18851
- this.start = this.end = date;
18852
- else {
18853
- if (this.start && date > this.start)
18854
- this.end = date;
18855
- else
18853
+ if (this.doubleInput) {
18854
+ if (this.clickCounter % 2 == 1)
18855
+ this.start = this.end = this.frozenDate = date;
18856
+ else {
18857
+ if (this.start && date > this.start)
18858
+ this.end = date;
18859
+ else
18860
+ this.start = date;
18861
+ }
18862
+ }
18863
+ !this.doubleInput && this.dateSet.emit(this.value);
18864
+ this.doubleInput &&
18865
+ this.clickCounter % 2 == 0 &&
18866
+ this.start &&
18867
+ this.end &&
18868
+ this.dateRangeSet.emit({ start: this.start, end: this.end });
18869
+ }
18870
+ onHover(date) {
18871
+ if (this.doubleInput && this.clickCounter % 2 == 1) {
18872
+ if (date < this.frozenDate) {
18856
18873
  this.start = date;
18874
+ this.end = this.frozenDate;
18875
+ }
18876
+ else {
18877
+ this.start = this.frozenDate;
18878
+ this.end = date;
18879
+ }
18857
18880
  }
18858
18881
  }
18859
18882
  render() {
@@ -18865,11 +18888,17 @@ let Calendar = class {
18865
18888
  } }),
18866
18889
  index.h("table", null, index.h("thead", null, index.h("tr", null, weekdays().map(day => (index.h("th", null, day))))), month((_b = this.month) !== null && _b !== void 0 ? _b : this.value).map(week => (index.h("tr", null, week.map(date => {
18867
18890
  var _a, _b, _c;
18868
- return (index.h("td", { tabindex: 1, onClick: (this.min || this.max) && (date < this.min || date > this.max) ? undefined : () => this.onClick(date), class: (date == this.value ? ["selected"] : [])
18891
+ return (index.h("td", { tabindex: 1, onMouseOver: () => {
18892
+ !this.doubleInput && (this.min || this.max) && (date < this.min || date > this.max)
18893
+ ? undefined
18894
+ : this.onHover(date);
18895
+ }, onClick: (this.min || this.max) && (date < this.min || date > this.max) ? undefined : () => this.onClick(date), class: (date == this.value ? ["selected"] : [])
18869
18896
  .concat(...(date == dist$3.Date.now() ? ["today"] : []), dist$3.Date.firstOfMonth((_a = this.month) !== null && _a !== void 0 ? _a : this.value) == dist$3.Date.firstOfMonth(date) ? ["currentMonth"] : [], this.doubleInput
18870
- ? date >= ((_b = this.start) !== null && _b !== void 0 ? _b : "") && date <= ((_c = this.end) !== null && _c !== void 0 ? _c : "")
18871
- ? ["dateRange"]
18872
- : []
18897
+ ? this.start == date || this.end == date
18898
+ ? ["selected"]
18899
+ : date >= ((_b = this.start) !== null && _b !== void 0 ? _b : "") && date <= ((_c = this.end) !== null && _c !== void 0 ? _c : "")
18900
+ ? ["dateRange"]
18901
+ : []
18873
18902
  : "")
18874
18903
  .concat(...(this.min || this.max ? (date < this.min || date > this.max ? ["disable"] : []) : ""))
18875
18904
  .join(" ") }, date.substring(8, 10)));
@@ -37837,17 +37866,31 @@ exports.DateFormat = void 0;
37837
37866
  function fromLocale(locale) {
37838
37867
  let result;
37839
37868
  switch (locale) {
37869
+ case "sq-AL":
37870
+ case "es-AR":
37871
+ case "it-IT":
37840
37872
  case "en-GB":
37873
+ case "fr-FR":
37841
37874
  result = "dd/mm/YYYY";
37842
37875
  break;
37843
37876
  case "en-US":
37844
37877
  result = "mm/dd/YYYY";
37845
37878
  break;
37879
+ case "et-EE":
37880
+ case "de-AT":
37846
37881
  case "de-DE":
37882
+ case "he-IL":
37883
+ case "is-IS":
37884
+ case "lv-LV":
37847
37885
  case "pl-PL":
37848
37886
  case "ru-RU":
37887
+ case "fi-FI":
37849
37888
  result = "dd.mm.YYYY";
37850
37889
  break;
37890
+ case "hi-IN":
37891
+ case "en-IN":
37892
+ result = "dd-mm-YYYY";
37893
+ break;
37851
37894
  default:
37852
37895
  result = "YYYY-mm-dd";
37853
37896
  break;
@@ -37883,146 +37926,254 @@ exports.DateFormat = void 0;
37883
37926
  //# sourceMappingURL=DateFormat.js.map
37884
37927
  });
37885
37928
 
37886
- var helper = createCommonjsModule(function (module, exports) {
37929
+ var Base_1 = createCommonjsModule(function (module, exports) {
37887
37930
  Object.defineProperty(exports, "__esModule", { value: true });
37888
- exports.validFormat = exports.validSymbol = exports.validYear = exports.validMonth = exports.validDay = void 0;
37889
- function validDay(symbol, state, startIndex, endIndex) {
37890
- let result = false;
37891
- if (state.value.length == startIndex)
37892
- result = symbol <= "3" && symbol >= "0";
37893
- else if (state.value.length == endIndex) {
37894
- if (state.value.substring(startIndex, startIndex + 1) == "2" ||
37895
- state.value.substring(startIndex, startIndex + 1) == "1")
37896
- result = symbol <= "9" && symbol >= "0";
37897
- else if (state.value.substring(startIndex, startIndex + 1) == "0")
37898
- result = symbol <= "9" && symbol >= "1";
37899
- else
37900
- result = symbol == "1" || symbol == "0";
37931
+ exports.register = exports.Base = void 0;
37932
+
37933
+
37934
+
37935
+ class Base {
37936
+ constructor(seperator) {
37937
+ this.seperator = seperator;
37901
37938
  }
37902
- return result;
37903
- }
37904
- exports.validDay = validDay;
37905
- function validMonth(symbol, state, startIndex, endIndex) {
37906
- let result = false;
37907
- if (state.value.length == startIndex)
37908
- result = symbol == "1" || symbol == "0";
37909
- else if (state.value.length == endIndex) {
37910
- if (state.value.substring(startIndex, startIndex + 1) != "1")
37911
- result = symbol <= "9" && symbol >= "1";
37912
- else
37913
- result = symbol < "3" && symbol >= "0";
37939
+ unformat(formated) {
37940
+ return formated.delete(this.seperator);
37941
+ }
37942
+ daysInMonth(value) {
37943
+ var _a;
37944
+ return (32 -
37945
+ Number.parseInt(dist$3.Date.next(((_a = this.fromString(value.padEnd(8, "1"))) !== null && _a !== void 0 ? _a : "1970-01-01").substring(0, 8) + "28", 4).substring(8, 10)));
37946
+ }
37947
+ validMonth(day, month, year) {
37948
+ return (new Date(Number.parseInt(year !== null && year !== void 0 ? year : "2004"), Number.parseInt(month), 0).getDate() >=
37949
+ Number.parseInt(day));
37914
37950
  }
37915
- return result;
37916
- }
37917
- exports.validMonth = validMonth;
37918
- function validYear(symbol, state, startIndex, endIndex) {
37919
- return state.value.length < endIndex && state.value.length >= startIndex && symbol >= "0" && symbol <= "9";
37920
37951
  }
37921
- exports.validYear = validYear;
37922
- function validSymbol(symbol, state, firstSplitter, lastSplitter, character) {
37923
- return (state.value.length == firstSplitter || state.value.length == lastSplitter) && symbol == character;
37952
+ exports.Base = Base;
37953
+ const handlers = {};
37954
+ function register(format, create) {
37955
+ handlers[format] = create;
37924
37956
  }
37925
- exports.validSymbol = validSymbol;
37926
- function validFormat(symbol, state, format) {
37927
- let result;
37928
- switch (format) {
37929
- case "dd/mm/YYYY":
37930
- result =
37931
- validDay(symbol, state, 0, 1) ||
37932
- validSymbol(symbol, state, 2, 5, "/") ||
37933
- validMonth(symbol, state, 3, 4) ||
37934
- validYear(symbol, state, 6, 10);
37935
- break;
37936
- case "dd.mm.YYYY":
37937
- result =
37938
- validDay(symbol, state, 0, 1) ||
37939
- validSymbol(symbol, state, 2, 5, ".") ||
37940
- validMonth(symbol, state, 3, 4) ||
37941
- validYear(symbol, state, 6, 10);
37942
- break;
37943
- case "mm/dd/YYYY":
37944
- result =
37945
- validDay(symbol, state, 3, 4) ||
37946
- validSymbol(symbol, state, 2, 5, "/") ||
37947
- validMonth(symbol, state, 0, 1) ||
37948
- validYear(symbol, state, 6, 10);
37949
- break;
37950
- default:
37951
- result =
37952
- validDay(symbol, state, 8, 9) ||
37953
- validSymbol(symbol, state, 4, 7, "-") ||
37954
- validMonth(symbol, state, 5, 6) ||
37955
- validYear(symbol, state, 0, 4);
37956
- break;
37957
+ exports.register = register;
37958
+ base.add("date", (parameters) => {
37959
+ var _a;
37960
+ const argument = parameters && parameters.length > 0 ? parameters[0] : undefined;
37961
+ const format = DateFormat_1.DateFormat.is(argument) ? argument : DateFormat_1.DateFormat.fromLocale(argument);
37962
+ const create = (_a = handlers[format]) !== null && _a !== void 0 ? _a : handlers["YYYY-mm-dd"];
37963
+ return create();
37964
+ });
37965
+ //# sourceMappingURL=Base.js.map
37966
+ });
37967
+
37968
+ createCommonjsModule(function (module, exports) {
37969
+ Object.defineProperty(exports, "__esModule", { value: true });
37970
+
37971
+
37972
+ class Handler extends Base_1.Base {
37973
+ constructor(seperator) {
37974
+ super(seperator);
37975
+ }
37976
+ toString(data) {
37977
+ return data.length == 10
37978
+ ? [data.substring(8, 10), data.substring(5, 7), data.substring(0, 4)].join(this.seperator)
37979
+ : "";
37980
+ }
37981
+ fromString(value) {
37982
+ const result = value.length == 8 ? `${value.substring(4, 8)}-${value.substring(2, 4)}-${value.substring(0, 2)}` : undefined;
37983
+ return dist$3.Date.is(result) ? result : undefined;
37984
+ }
37985
+ format(unformatted) {
37986
+ let result = unformatted;
37987
+ if (result.get(0, 1) > "3")
37988
+ result = result.insert(0, "0");
37989
+ if (result.value.length > 1)
37990
+ result = result.insert(2, this.seperator);
37991
+ if (result.get(3, 1) > "1")
37992
+ result = result.insert(3, "0");
37993
+ if (result.value.length > 4)
37994
+ result = result.insert(5, this.seperator);
37995
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|[12][0-9]|3[01])", "(0[1-9]|1[012])", "\\d{4}$"].join(this.seperator)) });
37996
+ }
37997
+ allowed(symbol, state) {
37998
+ return state.selection.start == 1 && state.value[0] == "3"
37999
+ ? symbol >= "0" && symbol <= "1"
38000
+ : state.selection.start == 1 && state.value[0] == "0"
38001
+ ? symbol >= "1" && symbol <= "9"
38002
+ : state.selection.start == 2
38003
+ ? symbol >= "0" &&
38004
+ symbol <= "9" &&
38005
+ (symbol == "0" || symbol == "1" || this.validMonth(state.value.substring(0, 2), symbol))
38006
+ : state.selection.start == 3
38007
+ ? symbol >= "0" && symbol <= "9" && this.validMonth(state.value.substring(0, 2), state.value[2] + symbol)
38008
+ : state.selection.start == 7
38009
+ ? symbol >= "0" &&
38010
+ symbol <= "9" &&
38011
+ this.validMonth(state.value.substring(0, 2), state.value.substring(2, 4), state.value.substring(4, 7) + symbol)
38012
+ : state.selection.start < 8 && symbol >= "0" && symbol <= "9";
37957
38013
  }
37958
- return result;
37959
38014
  }
37960
- exports.validFormat = validFormat;
37961
- //# sourceMappingURL=helper.js.map
38015
+ Base_1.register("dd.mm.YYYY", () => new Handler("."));
38016
+ Base_1.register("dd/mm/YYYY", () => new Handler("/"));
38017
+ Base_1.register("dd-mm-YYYY", () => new Handler("-"));
38018
+ //# sourceMappingURL=dmy.js.map
37962
38019
  });
37963
38020
 
37964
- var date = createCommonjsModule(function (module, exports) {
38021
+ createCommonjsModule(function (module, exports) {
37965
38022
  Object.defineProperty(exports, "__esModule", { value: true });
37966
- exports.formatDate = void 0;
37967
38023
 
37968
38024
 
38025
+ class Handler extends Base_1.Base {
38026
+ constructor(seperator) {
38027
+ super(seperator);
38028
+ }
38029
+ toString(data) {
38030
+ return data.length == 10
38031
+ ? [data.substring(5, 7), data.substring(8, 10), data.substring(0, 4)].join(this.seperator)
38032
+ : "";
38033
+ }
38034
+ fromString(value) {
38035
+ const result = value.length == 8 ? `${value.substring(4, 8)}-${value.substring(0, 2)}-${value.substring(2, 4)}` : undefined;
38036
+ return dist$3.Date.is(result) ? result : undefined;
38037
+ }
38038
+ format(unformatted) {
38039
+ let result = unformatted;
38040
+ if (result.get(0, 1) > "1")
38041
+ result = result.insert(0, "0");
38042
+ if (result.value.length > 1)
38043
+ result = result.insert(2, this.seperator);
38044
+ if (result.get(3, 1) > (result.get(0, 2) == "02" ? "2" : "3"))
38045
+ result = result.insert(3, "0");
38046
+ if (result.value.length > 4)
38047
+ result = result.insert(5, this.seperator);
38048
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])", "\\d{4}$"].join(this.seperator)) });
38049
+ }
38050
+ allowed(symbol, state) {
38051
+ const result = state.selection.start == 1 && state.value[0] == "1"
38052
+ ? symbol >= "0" && symbol <= "2"
38053
+ : state.selection.start == 1 && state.value[0] == "0"
38054
+ ? symbol >= "1" && symbol <= "9"
38055
+ : state.selection.start == 3
38056
+ ? symbol >= "0" && symbol <= "9" && this.validMonth(state.value[2] + symbol, state.value.substring(0, 2))
38057
+ : state.selection.start == 7
38058
+ ? symbol >= "0" &&
38059
+ symbol <= "9" &&
38060
+ this.validMonth(state.value.substring(2, 4), state.value.substring(0, 2), state.value.substring(4, 7) + symbol)
38061
+ : state.selection.start < 8 && symbol >= "0" && symbol <= "9";
38062
+ return result;
38063
+ }
38064
+ }
38065
+ Base_1.register("mm/dd/YYYY", () => new Handler("/"));
38066
+ //# sourceMappingURL=mdy.js.map
38067
+ });
38068
+
38069
+ createCommonjsModule(function (module, exports) {
38070
+ Object.defineProperty(exports, "__esModule", { value: true });
37969
38071
 
37970
38072
 
37971
- class Handler {
37972
- constructor(formatting) {
37973
- this.formatting = DateFormat_1.DateFormat.is(formatting) ? formatting : DateFormat_1.DateFormat.fromLocale(formatting);
37974
- this.locale = dist$3.Locale.is(formatting)
37975
- ? formatting
37976
- : DateFormat_1.DateFormat.is(formatting)
37977
- ? DateFormat_1.DateFormat.toLocale(formatting)
37978
- : undefined;
38073
+ class Handler extends Base_1.Base {
38074
+ constructor(seperator) {
38075
+ super(seperator);
37979
38076
  }
37980
38077
  toString(data) {
37981
- return typeof data != "string" ? "" : dist$3.Date.is(data) ? dist$3.Date.localize(data, this.locale) : data;
38078
+ return typeof data != "string" ? "" : data;
37982
38079
  }
37983
38080
  fromString(value) {
37984
- let result;
37985
- switch (this.formatting) {
37986
- case "dd/mm/YYYY":
37987
- case "dd.mm.YYYY":
37988
- result = `${value.substring(6, 10)}-${value.substring(3, 5)}-${value.substring(0, 2)}`;
37989
- break;
37990
- case "mm/dd/YYYY":
37991
- result = `${value.substring(6, 10)}-${value.substring(0, 2)}-${value.substring(3, 5)}`;
37992
- break;
37993
- default:
37994
- result = value;
37995
- break;
37996
- }
38081
+ const result = value.length == 8 ? `${value.substring(0, 4)}-${value.substring(4, 6)}-${value.substring(6, 8)}` : undefined;
37997
38082
  return dist$3.Date.is(result) ? result : undefined;
37998
38083
  }
37999
- format(unformated) {
38000
- let result;
38001
- switch (this.formatting) {
38002
- case "dd/mm/YYYY":
38003
- result = Object.assign(Object.assign({}, formatDate(unformated, "dd/mm/YYYY")), { type: "text", length: [0, 10], pattern: /^([0-2][0-9]|(3)[0-1])(\/)(((0)[0-9])|((1)[0-2]))(\/)\d{4}$/ });
38004
- break;
38005
- case "dd.mm.YYYY":
38006
- result = Object.assign(Object.assign({}, formatDate(unformated, "dd.mm.YYYY")), { type: "text", length: [0, 10], pattern: /^([0-2][0-9]|(3)[0-1])(\.)(((0)[0-9])|((1)[0-2]))(\.)\d{4}$/ });
38007
- break;
38008
- case "mm/dd/YYYY":
38009
- result = Object.assign(Object.assign({}, formatDate(unformated, "mm/dd/YYYY")), { type: "text", length: [0, 10], pattern: /^(((0)[0-9])|((1)[0-2]))(\/)([0-2][0-9]|(3)[0-1])(\/)\d{4}$/ });
38010
- break;
38011
- default:
38012
- result = Object.assign(Object.assign({}, formatDate(unformated)), { type: "text", length: [0, 10], pattern: /^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/ });
38013
- break;
38084
+ format(unformatted) {
38085
+ let result = unformatted;
38086
+ if (result.value.length > 3) {
38087
+ result = result.insert(4, this.seperator);
38088
+ if (result.get(5, 1) > "1")
38089
+ result = result.insert(5, "0");
38090
+ if (result.value.length > 6) {
38091
+ result = result.insert(7, this.seperator);
38092
+ if (result.get(8, 1) > this.daysInMonth(unformatted.value).toString().substring(0, 1))
38093
+ result = result.insert(8, "0");
38094
+ }
38014
38095
  }
38015
- return result;
38096
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^\\d{4}", "(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])$"].join(this.seperator)) });
38097
+ }
38098
+ allowed(symbol, state) {
38099
+ const daysInMonth = this.daysInMonth(state.value);
38100
+ return state.selection.start == 5 && state.value[4] == "0"
38101
+ ? symbol >= "1" && symbol <= "9"
38102
+ : state.selection.start == 5 && state.value[4] == "1"
38103
+ ? symbol >= "0" && symbol <= "2"
38104
+ : state.selection.start == 7 && state.value[6] == "0"
38105
+ ? symbol >= "1" && symbol <= "9"
38106
+ : state.selection.start == 7 && ((state.value[6] == "2" && daysInMonth < 30) || state.value[6] == "3")
38107
+ ? symbol >= "0" && symbol <= daysInMonth.toString().substring(1)
38108
+ : state.selection.start < 8 && symbol >= "0" && symbol <= "9";
38109
+ }
38110
+ }
38111
+ Base_1.register("YYYY-mm-dd", () => new Handler("-"));
38112
+ //# sourceMappingURL=ymd.js.map
38113
+ });
38114
+
38115
+ createCommonjsModule(function (module, exports) {
38116
+ Object.defineProperty(exports, "__esModule", { value: true });
38117
+
38118
+
38119
+
38120
+ //# sourceMappingURL=index.js.map
38121
+ });
38122
+
38123
+ createCommonjsModule(function (module, exports) {
38124
+ Object.defineProperty(exports, "__esModule", { value: true });
38125
+ exports.formatDate = void 0;
38126
+
38127
+
38128
+ class Handler {
38129
+ toString(data) {
38130
+ return typeof data == "string" ? data : "";
38131
+ }
38132
+ fromString(value) {
38133
+ let result = value.replace(" ", "T");
38134
+ const fillerDate = "0000-01-01T00:00:00.000Z";
38135
+ if (result === null || result === void 0 ? void 0 : result.match(/-\d$/))
38136
+ result = result.substring(0, result.length - 1) + "0" + result.substring(result.length - 1, result.length);
38137
+ result = !result.match(/^\d{4}-(0[1-9]|1[012])/)
38138
+ ? undefined
38139
+ : result + fillerDate.substring(result.length, fillerDate.length);
38140
+ return dist$3.DateTime.is(result) ? result : undefined;
38141
+ }
38142
+ format(unformated) {
38143
+ let result = formatDate(unformated);
38144
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[\d:.-]$/))
38145
+ result = result.insert(10, " ");
38146
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 3$/))
38147
+ result = result.replace(11, 12, "23:");
38148
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) [45]$/))
38149
+ result = result.insert(11, "23:");
38150
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) [6-9]$/))
38151
+ result = result.insert(11, "23:5");
38152
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 24$/))
38153
+ result = result.replace(10, 13, "00:");
38154
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 25$/))
38155
+ result = result.insert(12, "3:");
38156
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 2[6-9]$/))
38157
+ result = result.insert(12, "3:5").append(":");
38158
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3])\d[\s\S]$/))
38159
+ result = result.insert(13, ":");
38160
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3]):[6-9]$/))
38161
+ result = result.insert(14, "5");
38162
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3]):[0-5]\d\d$/))
38163
+ result = result.insert(16, ":");
38164
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3]):[0-5]\d:[6-9]$/))
38165
+ result = result.insert(17, "5");
38166
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 19], pattern: /^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3])(:[0-5]\d){2}$/ });
38016
38167
  }
38017
38168
  unformat(formated) {
38018
38169
  return formated;
38019
38170
  }
38020
38171
  allowed(symbol, state) {
38021
- var _a;
38022
- return helper.validFormat(symbol, state, (_a = this.formatting) !== null && _a !== void 0 ? _a : "YYYY-mm-dd");
38172
+ return (state.value.length < 19 &&
38173
+ ((symbol >= "0" && symbol <= "9") || symbol == "-" || symbol == ":" || symbol == "." || symbol == " "));
38023
38174
  }
38024
38175
  }
38025
- base.add("date", (argument) => new Handler(argument && argument.length > 0 ? argument[0] : undefined));
38176
+ base.add("date-time", () => new Handler());
38026
38177
  function formatDate(unformated, format) {
38027
38178
  let result = unformated;
38028
38179
  switch (format) {
@@ -38053,7 +38204,7 @@ function formatDate(unformated, format) {
38053
38204
  break;
38054
38205
  default:
38055
38206
  if (unformated.value.length == 10) {
38056
- if (!validDate(result.value))
38207
+ if (!validDate(result.value)) {
38057
38208
  result = result.replace(0, 10, validDate(result.value.substring(0, 8) + "31")
38058
38209
  ? result.value.substring(0, 8) + "31"
38059
38210
  : validDate(result.value.substring(0, 8) + "30")
@@ -38063,7 +38214,9 @@ function formatDate(unformated, format) {
38063
38214
  : validDate(result.value.substring(0, 8) + "28")
38064
38215
  ? result.value.substring(0, 8) + "28"
38065
38216
  : result.value);
38066
- break;
38217
+ break;
38218
+ }
38219
+ return unformated;
38067
38220
  }
38068
38221
  }
38069
38222
  return result;
@@ -38073,29 +38226,24 @@ function validDate(date, format) {
38073
38226
  let year;
38074
38227
  let month;
38075
38228
  let day;
38076
- let result;
38077
38229
  switch (format) {
38078
38230
  case "dd/mm/YYYY":
38079
38231
  case "dd.mm.YYYY":
38080
38232
  year = parseInt(date.substring(6, 10));
38081
38233
  month = parseInt(date.substring(3, 5));
38082
38234
  day = parseInt(date.substring(0, 2));
38083
- result = year && month && day ? day > 0 && daysPerMonth(year, month) >= day : false;
38084
- break;
38235
+ return year && month && day ? day > 0 && daysPerMonth(year, month) >= day : false;
38085
38236
  case "mm/dd/YYYY":
38086
38237
  year = parseInt(date.substring(6, 10));
38087
38238
  month = parseInt(date.substring(0, 2));
38088
38239
  day = parseInt(date.substring(3, 5));
38089
- result = year && month && day ? day > 0 && daysPerMonth(year, month) >= day : false;
38090
- break;
38240
+ return year && month && day ? day > 0 && daysPerMonth(year, month) >= day : false;
38091
38241
  default:
38092
38242
  year = parseInt(date.substring(0, 4));
38093
38243
  month = parseInt(date.substring(5, 7));
38094
38244
  day = parseInt(date.substring(8, 10));
38095
- result = year && month && day ? day > 0 && daysPerMonth(year, month) >= day : false;
38096
- break;
38245
+ return year && month && day ? day > 0 && daysPerMonth(year, month) >= day : false;
38097
38246
  }
38098
- return result;
38099
38247
  }
38100
38248
  function daysPerMonth(year, month) {
38101
38249
  let result;
@@ -38122,63 +38270,6 @@ function daysPerMonth(year, month) {
38122
38270
  }
38123
38271
  return result;
38124
38272
  }
38125
- //# sourceMappingURL=index.js.map
38126
- });
38127
-
38128
- createCommonjsModule(function (module, exports) {
38129
- Object.defineProperty(exports, "__esModule", { value: true });
38130
-
38131
-
38132
-
38133
- class Handler {
38134
- toString(data) {
38135
- return typeof data == "string" ? data : "";
38136
- }
38137
- fromString(value) {
38138
- let result = value.replace(" ", "T");
38139
- const fillerDate = "0000-01-01T00:00:00.000Z";
38140
- if (result === null || result === void 0 ? void 0 : result.match(/-\d$/))
38141
- result = result.substring(0, result.length - 1) + "0" + result.substring(result.length - 1, result.length);
38142
- result = !result.match(/^\d{4}-(0[1-9]|1[012])/)
38143
- ? undefined
38144
- : result + fillerDate.substring(result.length, fillerDate.length);
38145
- return dist$3.DateTime.is(result) ? result : undefined;
38146
- }
38147
- format(unformated) {
38148
- let result = date.formatDate(unformated);
38149
- if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[\d:.-]$/))
38150
- result = result.insert(10, " ");
38151
- if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 3$/))
38152
- result = result.replace(11, 12, "23:");
38153
- if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) [45]$/))
38154
- result = result.insert(11, "23:");
38155
- if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) [6-9]$/))
38156
- result = result.insert(11, "23:5");
38157
- if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 24$/))
38158
- result = result.replace(10, 13, "00:");
38159
- if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 25$/))
38160
- result = result.insert(12, "3:");
38161
- if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 2[6-9]$/))
38162
- result = result.insert(12, "3:5").append(":");
38163
- if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3])\d[\s\S]$/))
38164
- result = result.insert(13, ":");
38165
- if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3]):[6-9]$/))
38166
- result = result.insert(14, "5");
38167
- if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3]):[0-5]\d\d$/))
38168
- result = result.insert(16, ":");
38169
- if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3]):[0-5]\d:[6-9]$/))
38170
- result = result.insert(17, "5");
38171
- return Object.assign(Object.assign({}, result), { type: "text", length: [0, 19], pattern: /^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3])(:[0-5]\d){2}$/ });
38172
- }
38173
- unformat(formated) {
38174
- return formated;
38175
- }
38176
- allowed(symbol, state) {
38177
- return (state.value.length < 19 &&
38178
- ((symbol >= "0" && symbol <= "9") || symbol == "-" || symbol == ":" || symbol == "." || symbol == " "));
38179
- }
38180
- }
38181
- base.add("date-time", () => new Handler());
38182
38273
  //# sourceMappingURL=date-time.js.map
38183
38274
  });
38184
38275
 
@@ -39550,7 +39641,7 @@ let SmoothlyIconDemo = class {
39550
39641
  };
39551
39642
  SmoothlyIconDemo.style = styleCss$s;
39552
39643
 
39553
- const styleCss$r = ".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}";
39644
+ const styleCss$r = ".sc-smoothly-input-h{display:block;position:relative;font-weight:var(--smoothly-font-weight)}[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}";
39554
39645
 
39555
39646
  let SmoothlyInput = class {
39556
39647
  constructor(hostRef) {
@@ -39702,8 +39793,8 @@ let SmoothlyInput = class {
39702
39793
  this.value = this.lastValue = this.formatter.fromString(this.formatter.unformat(dist.StateEditor.copy(Object.assign({}, this.state))).value);
39703
39794
  }
39704
39795
  render() {
39705
- var _a;
39706
- return (index.h(index.Host, { class: { "has-value": ((_a = this.state) === null || _a === void 0 ? void 0 : _a.value) != "" } }, index.h("input", { name: this.name, type: this.state.type, placeholder: this.placeholder, required: this.required, autocomplete: this.autocomplete ? this.state.autocomplete : "off", disabled: this.disabled, pattern: this.state.pattern && this.state.pattern.source, value: this.state.value, onInput: (e) => this.onInput(e), onFocus: e => this.onFocus(e), onClick: e => this.onClick(e), onBlur: e => this.onBlur(e), onKeyDown: e => this.onKeyDown(e), ref: (el) => (this.inputElement = el), onPaste: e => this.onPaste(e) }), index.h("smoothly-icon", { name: "alert-circle", color: "danger", fill: "clear", size: "small" }), index.h("label", { htmlFor: this.name }, index.h("slot", null))));
39796
+ var _a, _b, _c, _d, _e, _f, _g;
39797
+ return (index.h(index.Host, { class: { "has-value": ((_a = this.state) === null || _a === void 0 ? void 0 : _a.value) != undefined && ((_b = this.state) === null || _b === void 0 ? void 0 : _b.value) != "" } }, index.h("input", { name: this.name, type: (_c = this.state) === null || _c === void 0 ? void 0 : _c.type, placeholder: this.placeholder, required: this.required, autocomplete: this.autocomplete ? (_d = this.state) === null || _d === void 0 ? void 0 : _d.autocomplete : "off", disabled: this.disabled, pattern: ((_e = this.state) === null || _e === void 0 ? void 0 : _e.pattern) && ((_f = this.state) === null || _f === void 0 ? void 0 : _f.pattern.source), value: (_g = this.state) === null || _g === void 0 ? void 0 : _g.value, onInput: (e) => this.onInput(e), onFocus: e => this.onFocus(e), onClick: e => this.onClick(e), onBlur: e => this.onBlur(e), onKeyDown: e => this.onKeyDown(e), ref: (el) => (this.inputElement = el), onPaste: e => this.onPaste(e) }), index.h("smoothly-icon", { name: "alert-circle", color: "danger", fill: "clear", size: "small" }), index.h("label", { htmlFor: this.name }, index.h("slot", null))));
39707
39798
  }
39708
39799
  static get watchers() { return {
39709
39800
  "value": ["valueWatcher"]
@@ -39725,6 +39816,10 @@ let InputDate = class {
39725
39816
  onStart(next) {
39726
39817
  this.valueChanged.emit(next);
39727
39818
  }
39819
+ dateSetHandler(e) {
39820
+ this.open = false;
39821
+ e.stopPropagation();
39822
+ }
39728
39823
  render() {
39729
39824
  var _a;
39730
39825
  return [
@@ -39753,16 +39848,18 @@ let InputDateRange = class {
39753
39848
  onValue(next) {
39754
39849
  this.valueChanged.emit(next);
39755
39850
  }
39756
- onClose(open) {
39757
- if (open == false && dist$3.Date.is(this.start) && dist$3.Date.is(this.end))
39758
- this.dateRangeSelected.emit({ start: this.start, end: this.end });
39759
- }
39760
39851
  onStartChanged(event) {
39761
39852
  this.start = event.detail;
39762
39853
  }
39763
39854
  onEndChanged(event) {
39764
39855
  this.end = event.detail;
39765
39856
  }
39857
+ onDateRangeSet(event) {
39858
+ console.log("dateRangeSet", event.detail);
39859
+ this.open = false;
39860
+ event.stopPropagation();
39861
+ dist$3.DateRange.is(event.detail) && this.dateRangeSelected.emit(event.detail);
39862
+ }
39766
39863
  render() {
39767
39864
  var _a;
39768
39865
  return [
@@ -39771,14 +39868,11 @@ let InputDateRange = class {
39771
39868
  this.open ? (index.h("nav", null, index.h("div", { class: "arrow" }), index.h("smoothly-calendar", { doubleInput: true, value: (_a = this.value) !== null && _a !== void 0 ? _a : dist$3.Date.now(), onValueChanged: event => {
39772
39869
  this.value = event.detail;
39773
39870
  event.stopPropagation();
39774
- }, max: this.max, min: this.min }))) : ([]),
39871
+ }, start: this.start, end: this.end, max: this.max, min: this.min }))) : ([]),
39775
39872
  ];
39776
39873
  }
39777
39874
  static get watchers() { return {
39778
- "value": ["onValue"],
39779
- "open": ["onClose"],
39780
- "start": ["onClose"],
39781
- "end": ["onClose"]
39875
+ "value": ["onValue"]
39782
39876
  }; }
39783
39877
  };
39784
39878
  InputDateRange.style = styleCss$p;
@@ -40323,6 +40417,7 @@ let SmoothlySelectDemo = class {
40323
40417
  index.h("smoothly-select", { identifier: "currency" }, this.currencies.map(option => this.currency == option ? (index.h("option", { value: option, selected: true }, option)) : (index.h("option", { value: option }, option)))),
40324
40418
  index.h("smoothly-select", { identifier: "language" }, index.h("optgroup", { label: "Nordic" }, index.h("option", { value: "sv" }, "Swedish"), index.h("option", { value: "da", selected: true }, "Danish"), index.h("option", { value: "no" }, "Norwegian")), index.h("optgroup", { label: "Other" }, index.h("option", { value: "en" }, "English"))),
40325
40419
  index.h("smoothly-select", { identifier: "quantity", ref: e => (this.quantityElement = e) }, index.h("option", { value: "1" }, "1"), index.h("option", { value: "2" }, "2"), index.h("option", { value: "3" }, "3")),
40420
+ index.h("smoothly-input-date", null, "Date"),
40326
40421
  index.h("smoothly-input-date", { value: "2021-10-28", max: "2021-12-30", min: "2021-10-10" }, "Date"),
40327
40422
  index.h("smoothly-input-date-range", { start: "2021-10-28", end: "2021-11-27", min: "2021-10-10", max: "2021-12-30" }),
40328
40423
  index.h("smoothly-selector", null, index.h("smoothly-item", { value: "1" }, "January"), index.h("smoothly-item", { value: "2" }, "February"), index.h("smoothly-item", { value: "3" }, "March"), index.h("smoothly-item", { value: "4" }, "April"), index.h("smoothly-item", { value: "5" }, "May"), index.h("smoothly-item", { value: "6" }, "June"), index.h("smoothly-item", { value: "7" }, "July"), index.h("smoothly-item", { value: "8" }, "August"), index.h("smoothly-item", { value: "9" }, "September"), index.h("smoothly-item", { value: "10" }, "October"), index.h("smoothly-item", { value: "11" }, "November"), index.h("smoothly-item", { value: "12" }, "December")),