smoothly 1.0.0-alpha.127 → 1.0.0-alpha.129

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 (95) hide show
  1. package/dist/cjs/{getLanguage-09187b0a.js → getLanguage-28ce96e4.js} +102 -22
  2. package/dist/cjs/getLanguage-28ce96e4.js.map +1 -0
  3. package/dist/cjs/{index-6ae370b4.js → index-43af753b.js} +1 -4
  4. package/dist/cjs/index-43af753b.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/smoothly-accordion_70.cjs.entry.js +6098 -41
  7. package/dist/cjs/smoothly-accordion_70.cjs.entry.js.map +1 -1
  8. package/dist/cjs/smoothly-address-display.cjs.entry.js +1 -1
  9. package/dist/cjs/smoothly-address.cjs.entry.js +1 -1
  10. package/dist/cjs/smoothly-addresses.cjs.entry.js +1 -1
  11. package/dist/cjs/smoothly-color.cjs.entry.js +1 -1
  12. package/dist/cjs/smoothly-country.cjs.entry.js +2 -2
  13. package/dist/cjs/smoothly-display-date-time.cjs.entry.js +1 -1
  14. package/dist/cjs/smoothly-google-font.cjs.entry.js +1 -1
  15. package/dist/cjs/smoothly-radio-group.cjs.entry.js +1 -1
  16. package/dist/cjs/smoothly-reorder.cjs.entry.js +4 -4
  17. package/dist/cjs/smoothly-reorder.cjs.entry.js.map +1 -1
  18. package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +1 -1
  19. package/dist/cjs/smoothly-trigger-source.cjs.entry.js +1 -1
  20. package/dist/cjs/smoothly.cjs.js +2 -2
  21. package/dist/collection/components/app/index.js +23 -0
  22. package/dist/collection/components/app/index.js.map +1 -1
  23. package/dist/collection/components/app-demo/index.js +5 -1
  24. package/dist/collection/components/app-demo/index.js.map +1 -1
  25. package/dist/collection/components/input/demo/index.js +1 -1
  26. package/dist/collection/components/input/demo/index.js.map +1 -1
  27. package/dist/collection/components/input/index.js +8 -23
  28. package/dist/collection/components/input/index.js.map +1 -1
  29. package/dist/custom-elements/index.js +6428 -291
  30. package/dist/custom-elements/index.js.map +1 -1
  31. package/dist/esm/{getLanguage-09ad210c.js → getLanguage-5233a597.js} +102 -22
  32. package/dist/esm/getLanguage-5233a597.js.map +1 -0
  33. package/dist/esm/{index-c196715a.js → index-258984d3.js} +2 -4
  34. package/dist/esm/index-258984d3.js.map +1 -0
  35. package/dist/esm/loader.js +3 -3
  36. package/dist/esm/smoothly-accordion_70.entry.js +6112 -55
  37. package/dist/esm/smoothly-accordion_70.entry.js.map +1 -1
  38. package/dist/esm/smoothly-address-display.entry.js +1 -1
  39. package/dist/esm/smoothly-address.entry.js +1 -1
  40. package/dist/esm/smoothly-addresses.entry.js +1 -1
  41. package/dist/esm/smoothly-color.entry.js +1 -1
  42. package/dist/esm/smoothly-country.entry.js +2 -2
  43. package/dist/esm/smoothly-display-date-time.entry.js +1 -1
  44. package/dist/esm/smoothly-google-font.entry.js +1 -1
  45. package/dist/esm/smoothly-radio-group.entry.js +1 -1
  46. package/dist/esm/smoothly-reorder.entry.js +2 -2
  47. package/dist/esm/smoothly-reorder.entry.js.map +1 -1
  48. package/dist/esm/smoothly-trigger-sink.entry.js +1 -1
  49. package/dist/esm/smoothly-trigger-source.entry.js +1 -1
  50. package/dist/esm/smoothly.js +3 -3
  51. package/dist/smoothly/{p-663ccbd0.entry.js → p-12182a73.entry.js} +2 -2
  52. package/dist/smoothly/p-2a0c2387.js +2 -0
  53. package/dist/smoothly/p-2a0c2387.js.map +1 -0
  54. package/dist/smoothly/p-34ed5201.entry.js +2 -0
  55. package/dist/smoothly/p-34ed5201.entry.js.map +1 -0
  56. package/dist/smoothly/{p-9992c8c4.entry.js → p-47151a53.entry.js} +2 -2
  57. package/dist/smoothly/{p-5edb65c6.entry.js → p-4c1bb81e.entry.js} +2 -2
  58. package/dist/smoothly/{p-d0b8061e.js → p-5e387578.js} +3 -3
  59. package/dist/smoothly/p-5e387578.js.map +1 -0
  60. package/dist/smoothly/{p-1efa3261.entry.js → p-66e9a8b1.entry.js} +2 -2
  61. package/dist/smoothly/{p-dbd1afa9.entry.js → p-6aebb818.entry.js} +2 -2
  62. package/dist/smoothly/{p-73442332.entry.js → p-6fad95bf.entry.js} +2 -2
  63. package/dist/smoothly/{p-4d743f07.entry.js → p-7bf147bf.entry.js} +2 -2
  64. package/dist/smoothly/p-b3eac6af.entry.js +2 -0
  65. package/dist/smoothly/{p-4ff439dd.entry.js.map → p-b3eac6af.entry.js.map} +1 -1
  66. package/dist/smoothly/{p-e67339b8.entry.js → p-bf63d2e6.entry.js} +2 -2
  67. package/dist/smoothly/{p-f96e41aa.entry.js → p-cb493516.entry.js} +2 -2
  68. package/dist/smoothly/{p-ce4e6f44.entry.js → p-eef1c80b.entry.js} +2 -2
  69. package/dist/smoothly/smoothly.esm.js +1 -1
  70. package/dist/smoothly/smoothly.esm.js.map +1 -1
  71. package/dist/types/components/app/index.d.ts +1 -0
  72. package/dist/types/components/app-demo/index.d.ts +2 -0
  73. package/dist/types/components/input/index.d.ts +2 -2
  74. package/dist/types/components.d.ts +1 -2
  75. package/package.json +3 -3
  76. package/dist/cjs/getLanguage-09187b0a.js.map +0 -1
  77. package/dist/cjs/index-6ae370b4.js.map +0 -1
  78. package/dist/esm/getLanguage-09ad210c.js.map +0 -1
  79. package/dist/esm/index-c196715a.js.map +0 -1
  80. package/dist/smoothly/p-1e687c2f.entry.js +0 -2
  81. package/dist/smoothly/p-1e687c2f.entry.js.map +0 -1
  82. package/dist/smoothly/p-4ff439dd.entry.js +0 -2
  83. package/dist/smoothly/p-758d93c4.js +0 -2
  84. package/dist/smoothly/p-758d93c4.js.map +0 -1
  85. package/dist/smoothly/p-d0b8061e.js.map +0 -1
  86. /package/dist/smoothly/{p-663ccbd0.entry.js.map → p-12182a73.entry.js.map} +0 -0
  87. /package/dist/smoothly/{p-9992c8c4.entry.js.map → p-47151a53.entry.js.map} +0 -0
  88. /package/dist/smoothly/{p-5edb65c6.entry.js.map → p-4c1bb81e.entry.js.map} +0 -0
  89. /package/dist/smoothly/{p-1efa3261.entry.js.map → p-66e9a8b1.entry.js.map} +0 -0
  90. /package/dist/smoothly/{p-dbd1afa9.entry.js.map → p-6aebb818.entry.js.map} +0 -0
  91. /package/dist/smoothly/{p-73442332.entry.js.map → p-6fad95bf.entry.js.map} +0 -0
  92. /package/dist/smoothly/{p-4d743f07.entry.js.map → p-7bf147bf.entry.js.map} +0 -0
  93. /package/dist/smoothly/{p-e67339b8.entry.js.map → p-bf63d2e6.entry.js.map} +0 -0
  94. /package/dist/smoothly/{p-f96e41aa.entry.js.map → p-cb493516.entry.js.map} +0 -0
  95. /package/dist/smoothly/{p-ce4e6f44.entry.js.map → p-eef1c80b.entry.js.map} +0 -0
@@ -3679,6 +3679,19 @@ exports.Date = void 0;
3679
3679
  return result;
3680
3680
  }
3681
3681
  Date.nextWeekday = nextWeekday;
3682
+ function nextBusinessDay(date, bankingDays = 1, bankingHolidays = []) {
3683
+ const holidaySet = new Set(bankingHolidays);
3684
+ if (bankingDays <= 0 && isBusinessDay(date, holidaySet))
3685
+ return date;
3686
+ const tomorrow = next(date);
3687
+ const tomorrowIsBusinessDay = isBusinessDay(tomorrow, holidaySet);
3688
+ return nextBusinessDay(tomorrow, tomorrowIsBusinessDay ? bankingDays - 1 : bankingDays, holidaySet);
3689
+ }
3690
+ Date.nextBusinessDay = nextBusinessDay;
3691
+ function isBusinessDay(date, holidaySet = new Set()) {
3692
+ const weekday = getWeekDay(date);
3693
+ return !(weekday == 6 || weekday == 0 || holidaySet.has(date));
3694
+ }
3682
3695
  function span(date, relative) {
3683
3696
  return {
3684
3697
  years: getYear(date) - getYear(relative),
@@ -3731,10 +3744,11 @@ var DateSpan$1;
3731
3744
  (function (DateSpan) {
3732
3745
  function is(value) {
3733
3746
  return (typeof value == "object" &&
3747
+ !!value &&
3748
+ !Array.isArray(value) &&
3734
3749
  (typeof value.years == "number" || value.years == undefined) &&
3735
3750
  (typeof value.months == "number" || value.months == undefined) &&
3736
- (typeof value.days == "number" || value.days == undefined) &&
3737
- (typeof value.years == "number" || typeof value.months == "number" || typeof value.days == "number"));
3751
+ (typeof value.days == "number" || value.days == undefined));
3738
3752
  }
3739
3753
  DateSpan.is = is;
3740
3754
  })(DateSpan$1 || (DateSpan$1 = {}));
@@ -4069,7 +4083,7 @@ exports.DateTime = void 0;
4069
4083
  DateTime.previous = previous;
4070
4084
  function nextMillisecond(time, milliseconds = 1) {
4071
4085
  const result = parse(time);
4072
- result.setMilliseconds(result.getMilliseconds() + milliseconds);
4086
+ result.setUTCMilliseconds(result.getUTCMilliseconds() + milliseconds);
4073
4087
  return DateTime.create(result);
4074
4088
  }
4075
4089
  DateTime.nextMillisecond = nextMillisecond;
@@ -4079,7 +4093,7 @@ exports.DateTime = void 0;
4079
4093
  DateTime.previousMillisecond = previousMillisecond;
4080
4094
  function nextSecond(time, seconds = 1) {
4081
4095
  const result = parse(time);
4082
- result.setSeconds(result.getSeconds() + seconds);
4096
+ result.setUTCSeconds(result.getUTCSeconds() + seconds);
4083
4097
  return DateTime.create(result);
4084
4098
  }
4085
4099
  DateTime.nextSecond = nextSecond;
@@ -4089,7 +4103,7 @@ exports.DateTime = void 0;
4089
4103
  DateTime.previousSecond = previousSecond;
4090
4104
  function nextMinute(time, minutes = 1) {
4091
4105
  const result = parse(time);
4092
- result.setMinutes(result.getMinutes() + minutes);
4106
+ result.setUTCMinutes(result.getUTCMinutes() + minutes);
4093
4107
  return DateTime.create(result);
4094
4108
  }
4095
4109
  DateTime.nextMinute = nextMinute;
@@ -4099,7 +4113,7 @@ exports.DateTime = void 0;
4099
4113
  DateTime.previousMinute = previousMinute;
4100
4114
  function nextHour(time, hours = 1) {
4101
4115
  const result = parse(time);
4102
- result.setHours(result.getHours() + hours);
4116
+ result.setUTCHours(result.getUTCHours() + hours);
4103
4117
  return DateTime.create(result);
4104
4118
  }
4105
4119
  DateTime.nextHour = nextHour;
@@ -4109,9 +4123,8 @@ exports.DateTime = void 0;
4109
4123
  DateTime.previousHour = previousHour;
4110
4124
  function nextDay(time, days = 1) {
4111
4125
  const result = parse(time);
4112
- const offset = result.getTimezoneOffset();
4113
- result.setDate(result.getDate() + days);
4114
- result.setMinutes(result.getMinutes() + offset - result.getTimezoneOffset()); // handle changing potential daylight saving time
4126
+ result.setUTCDate(result.getUTCDate() + days);
4127
+ result.setUTCMinutes(result.getUTCMinutes());
4115
4128
  return DateTime.create(result);
4116
4129
  }
4117
4130
  DateTime.nextDay = nextDay;
@@ -4121,9 +4134,8 @@ exports.DateTime = void 0;
4121
4134
  DateTime.previousDay = previousDay;
4122
4135
  function nextMonth(time, months = 1) {
4123
4136
  const result = parse(time);
4124
- const offset = result.getTimezoneOffset();
4125
- result.setMonth(result.getMonth() + months);
4126
- result.setMinutes(result.getMinutes() + offset - result.getTimezoneOffset()); // handle changing potential daylight saving time
4137
+ result.setUTCMonth(result.getUTCMonth() + months);
4138
+ result.setUTCMinutes(result.getUTCMinutes());
4127
4139
  return DateTime.create(result);
4128
4140
  }
4129
4141
  DateTime.nextMonth = nextMonth;
@@ -4133,7 +4145,7 @@ exports.DateTime = void 0;
4133
4145
  DateTime.previousMonth = previousMonth;
4134
4146
  function nextYear(time, years = 1) {
4135
4147
  const result = parse(time);
4136
- result.setFullYear(result.getFullYear() + years);
4148
+ result.setUTCFullYear(result.getUTCFullYear() + years);
4137
4149
  return DateTime.create(result);
4138
4150
  }
4139
4151
  DateTime.nextYear = nextYear;
@@ -5954,20 +5966,15 @@ var TimeSpan$1;
5954
5966
  (function (TimeSpan) {
5955
5967
  function is(value) {
5956
5968
  return (typeof value == "object" &&
5969
+ !!value &&
5970
+ !Array.isArray(value) &&
5957
5971
  (typeof value.years == "number" || value.years == undefined) &&
5958
5972
  (typeof value.months == "number" || value.months == undefined) &&
5959
5973
  (typeof value.days == "number" || value.days == undefined) &&
5960
5974
  (typeof value.hours == "number" || value.hours == undefined) &&
5961
5975
  (typeof value.minutes == "number" || value.minutes == undefined) &&
5962
5976
  (typeof value.seconds == "number" || value.seconds == undefined) &&
5963
- (typeof value.milliseconds == "number" || value.milliseconds == undefined) &&
5964
- (typeof value.years == "number" ||
5965
- typeof value.months == "number" ||
5966
- typeof value.days == "number" ||
5967
- typeof value.hours == "number" ||
5968
- typeof value.minutes == "number" ||
5969
- typeof value.seconds == "number" ||
5970
- typeof value.milliseconds == "number"));
5977
+ (typeof value.milliseconds == "number" || value.milliseconds == undefined));
5971
5978
  }
5972
5979
  TimeSpan.is = is;
5973
5980
  function toHours(value, round) {
@@ -6003,6 +6010,79 @@ var TimeSpan$1;
6003
6010
  return performRound$1(result, round);
6004
6011
  }
6005
6012
  TimeSpan.toMilliseconds = toMilliseconds;
6013
+ function sum(...addends) {
6014
+ return addends.reduce((result, addend) => Object.entries(addend).reduce((result, [key, addend]) => {
6015
+ const sum = (result[key] ?? 0) + addend;
6016
+ return !sum
6017
+ ? (({ [key]: _, ...result }) => result)(result)
6018
+ : Object.assign(result, { [key]: (result[key] ?? 0) + addend });
6019
+ }, result), {});
6020
+ }
6021
+ function add(...addends) {
6022
+ return addends.reduce((result, addend) => Object.entries(addend).reduce((result, [key, addend]) => (({ [key]: value, ...result }) => sum(result, from[key]((value ?? 0) + addend)))(result), result), {});
6023
+ }
6024
+ TimeSpan.add = add;
6025
+ function subtract(minuend, ...subtrahends) {
6026
+ return subtrahends.reduce((result, subtrahend) => Object.entries(subtrahend).reduce((result, [key, subtrahend]) => (({ [key]: value, ...result }) => sum(result, from[key]((value ?? 0) - subtrahend)))(result), result), minuend);
6027
+ }
6028
+ TimeSpan.subtract = subtract;
6029
+ function fromHours(value, options) {
6030
+ let result;
6031
+ const precision = options?.precision ?? "milliseconds";
6032
+ const hours = Math.trunc(value);
6033
+ const remainder = +(value % 1).toFixed(9);
6034
+ if (precision != "hours") {
6035
+ result = fromMinutes(remainder * 60, { precision });
6036
+ if (hours)
6037
+ result.hours = hours;
6038
+ }
6039
+ else
6040
+ result = sum({ hours: hours + Math.round(remainder) });
6041
+ return result;
6042
+ }
6043
+ TimeSpan.fromHours = fromHours;
6044
+ function fromMinutes(value, options) {
6045
+ let result;
6046
+ const precision = options?.precision ?? "milliseconds";
6047
+ const minutes = Math.trunc(value);
6048
+ const remainder = +(value % 1).toFixed(7);
6049
+ if (precision != "minutes")
6050
+ result = sum({ minutes: minutes % 60 }, fromSeconds(remainder * 60, { precision }), Math.abs(minutes) < 60 ? {} : fromHours(Math.trunc(minutes / 60), { precision: "hours" }));
6051
+ else {
6052
+ const rounded = minutes + Math.round(remainder);
6053
+ result = sum({ minutes: rounded % 60 }, fromHours(Math.trunc(rounded / 60), { precision: "hours" }));
6054
+ }
6055
+ return result;
6056
+ }
6057
+ TimeSpan.fromMinutes = fromMinutes;
6058
+ function fromSeconds(value, options) {
6059
+ let result;
6060
+ const precision = options?.precision ?? "milliseconds";
6061
+ const seconds = Math.trunc(value);
6062
+ const remainder = +(value % 1).toFixed(5);
6063
+ if (precision != "seconds")
6064
+ result = sum({ seconds: seconds % 60 }, fromMilliseconds(remainder * 1000), Math.abs(seconds) < 60 ? {} : fromMinutes(Math.trunc(seconds / 60), { precision: "minutes" }));
6065
+ else {
6066
+ const rounded = seconds + Math.round(remainder);
6067
+ result = sum({ seconds: rounded % 60 }, fromMinutes(Math.trunc(rounded / 60), { precision: "minutes" }));
6068
+ }
6069
+ return result;
6070
+ }
6071
+ TimeSpan.fromSeconds = fromSeconds;
6072
+ function fromMilliseconds(value) {
6073
+ const rounded = Math.round(value);
6074
+ return sum({ milliseconds: rounded % 1000 }, Math.abs(rounded) < 1000 ? {} : fromSeconds(Math.trunc(rounded / 1000), { precision: "seconds" }));
6075
+ }
6076
+ TimeSpan.fromMilliseconds = fromMilliseconds;
6077
+ const from = {
6078
+ years: (value) => ({ ...(value && { years: value }) }),
6079
+ months: (value) => ({ ...(value && { months: value }) }),
6080
+ days: (value) => ({ ...(value && { days: value }) }),
6081
+ hours: fromHours,
6082
+ minutes: fromMinutes,
6083
+ seconds: fromSeconds,
6084
+ milliseconds: fromMilliseconds,
6085
+ };
6006
6086
  })(TimeSpan$1 || (TimeSpan$1 = {}));
6007
6087
  function dateToMilliseconds$1(span) {
6008
6088
  const now = Date.UTC(0, 0);
@@ -12150,4 +12230,4 @@ function convert(language) {
12150
12230
 
12151
12231
  exports.getLanguage = getLanguage;
12152
12232
 
12153
- //# sourceMappingURL=getLanguage-09187b0a.js.map
12233
+ //# sourceMappingURL=getLanguage-28ce96e4.js.map