smoothly 1.0.0-alpha.130 → 1.0.0-alpha.132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{getLanguage-28ce96e4.js → getLanguage-9f898047.js} +43 -34
- package/dist/cjs/getLanguage-9f898047.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/smoothly-accordion_70.cjs.entry.js +87 -6090
- package/dist/cjs/smoothly-accordion_70.cjs.entry.js.map +1 -1
- package/dist/cjs/smoothly-country.cjs.entry.js +1 -1
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/components/app/index.js +6 -2
- package/dist/collection/components/app/index.js.map +1 -1
- package/dist/collection/components/display-demo/index.js +1 -1
- package/dist/collection/components/display-demo/index.js.map +1 -1
- package/dist/collection/components/icon/index.js +5 -7
- package/dist/collection/components/icon/index.js.map +1 -1
- package/dist/collection/components/input/demo/index.js +17 -1
- package/dist/collection/components/input/demo/index.js.map +1 -1
- package/dist/custom-elements/index.js +413 -6407
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/{getLanguage-5233a597.js → getLanguage-02b3c8d3.js} +42 -33
- package/dist/esm/getLanguage-02b3c8d3.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-accordion_70.entry.js +101 -6104
- package/dist/esm/smoothly-accordion_70.entry.js.map +1 -1
- package/dist/esm/smoothly-country.entry.js +1 -1
- package/dist/esm/smoothly.js +1 -1
- package/dist/smoothly/p-1a108f60.js +2 -0
- package/dist/smoothly/p-1a108f60.js.map +1 -0
- package/dist/smoothly/p-99d32826.entry.js +2 -0
- package/dist/smoothly/p-99d32826.entry.js.map +1 -0
- package/dist/smoothly/{p-bf63d2e6.entry.js → p-fd6ce760.entry.js} +2 -2
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/smoothly/smoothly.esm.js.map +1 -1
- package/dist/types/components/app/index.d.ts +1 -1
- package/dist/types/components/icon/index.d.ts +0 -1
- package/dist/types/components/input/demo/index.d.ts +2 -0
- package/package.json +3 -3
- package/dist/cjs/getLanguage-28ce96e4.js.map +0 -1
- package/dist/esm/getLanguage-5233a597.js.map +0 -1
- package/dist/smoothly/p-2a0c2387.js +0 -2
- package/dist/smoothly/p-2a0c2387.js.map +0 -1
- package/dist/smoothly/p-d6185f62.entry.js +0 -2
- package/dist/smoothly/p-d6185f62.entry.js.map +0 -1
- /package/dist/smoothly/{p-bf63d2e6.entry.js.map → p-fd6ce760.entry.js.map} +0 -0
|
@@ -5962,7 +5962,7 @@ var TimeRange$1;
|
|
|
5962
5962
|
TimeRange.create = create;
|
|
5963
5963
|
})(TimeRange$1 || (TimeRange$1 = {}));
|
|
5964
5964
|
|
|
5965
|
-
|
|
5965
|
+
exports.TimeSpan = void 0;
|
|
5966
5966
|
(function (TimeSpan) {
|
|
5967
5967
|
function is(value) {
|
|
5968
5968
|
return (typeof value == "object" &&
|
|
@@ -6010,20 +6010,15 @@ var TimeSpan$1;
|
|
|
6010
6010
|
return performRound$1(result, round);
|
|
6011
6011
|
}
|
|
6012
6012
|
TimeSpan.toMilliseconds = toMilliseconds;
|
|
6013
|
-
function
|
|
6014
|
-
return
|
|
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), {});
|
|
6013
|
+
function unitByUnit(operation, left, ...rights) {
|
|
6014
|
+
return rights.reduce((result, span) => Object.entries(span).reduce((result, [key, right]) => (({ [key]: left, ...result }) => Object.assign(result, { [key]: +operation(left ?? 0, right ?? 0).toFixed(9) }))(result), result), left);
|
|
6020
6015
|
}
|
|
6021
6016
|
function add(...addends) {
|
|
6022
|
-
return
|
|
6017
|
+
return normalize(unitByUnit((left, right) => left + right, {}, ...addends));
|
|
6023
6018
|
}
|
|
6024
6019
|
TimeSpan.add = add;
|
|
6025
6020
|
function subtract(minuend, ...subtrahends) {
|
|
6026
|
-
return
|
|
6021
|
+
return normalize(unitByUnit((left, right) => left - right, minuend, ...subtrahends));
|
|
6027
6022
|
}
|
|
6028
6023
|
TimeSpan.subtract = subtract;
|
|
6029
6024
|
function fromHours(value, options) {
|
|
@@ -6032,13 +6027,11 @@ var TimeSpan$1;
|
|
|
6032
6027
|
const hours = Math.trunc(value);
|
|
6033
6028
|
const remainder = +(value % 1).toFixed(9);
|
|
6034
6029
|
if (precision != "hours") {
|
|
6035
|
-
result = fromMinutes(remainder * 60, { precision });
|
|
6036
|
-
if (hours)
|
|
6037
|
-
result.hours = hours;
|
|
6030
|
+
result = { hours: hours, ...fromMinutes(remainder * 60, { precision, normalize: false }) };
|
|
6038
6031
|
}
|
|
6039
6032
|
else
|
|
6040
|
-
result =
|
|
6041
|
-
return result;
|
|
6033
|
+
result = { hours: hours + Math.round(remainder) };
|
|
6034
|
+
return options?.normalize == false ? result : normalize(result);
|
|
6042
6035
|
}
|
|
6043
6036
|
TimeSpan.fromHours = fromHours;
|
|
6044
6037
|
function fromMinutes(value, options) {
|
|
@@ -6047,12 +6040,12 @@ var TimeSpan$1;
|
|
|
6047
6040
|
const minutes = Math.trunc(value);
|
|
6048
6041
|
const remainder = +(value % 1).toFixed(7);
|
|
6049
6042
|
if (precision != "minutes")
|
|
6050
|
-
result =
|
|
6043
|
+
result = { minutes: minutes, ...fromSeconds(remainder * 60, { precision, normalize: false }) };
|
|
6051
6044
|
else {
|
|
6052
6045
|
const rounded = minutes + Math.round(remainder);
|
|
6053
|
-
result =
|
|
6046
|
+
result = add({ minutes: rounded % 60 }, fromHours(Math.trunc(rounded / 60), { precision: "hours", normalize: false }));
|
|
6054
6047
|
}
|
|
6055
|
-
return result;
|
|
6048
|
+
return options?.normalize == false ? result : normalize(result);
|
|
6056
6049
|
}
|
|
6057
6050
|
TimeSpan.fromMinutes = fromMinutes;
|
|
6058
6051
|
function fromSeconds(value, options) {
|
|
@@ -6061,29 +6054,45 @@ var TimeSpan$1;
|
|
|
6061
6054
|
const seconds = Math.trunc(value);
|
|
6062
6055
|
const remainder = +(value % 1).toFixed(5);
|
|
6063
6056
|
if (precision != "seconds")
|
|
6064
|
-
result =
|
|
6057
|
+
result = { ...(seconds && { seconds: seconds }), ...fromMilliseconds(remainder * 1000, { normalize: false }) };
|
|
6065
6058
|
else {
|
|
6066
6059
|
const rounded = seconds + Math.round(remainder);
|
|
6067
|
-
result =
|
|
6060
|
+
result = add({ seconds: rounded % 60 }, fromMinutes(Math.trunc(rounded / 60), { precision: "minutes", normalize: false }));
|
|
6068
6061
|
}
|
|
6069
|
-
return result;
|
|
6062
|
+
return options?.normalize == false ? result : normalize(result);
|
|
6070
6063
|
}
|
|
6071
6064
|
TimeSpan.fromSeconds = fromSeconds;
|
|
6072
|
-
function fromMilliseconds(value) {
|
|
6065
|
+
function fromMilliseconds(value, options) {
|
|
6073
6066
|
const rounded = Math.round(value);
|
|
6074
|
-
|
|
6067
|
+
const result = add(!rounded ? {} : { milliseconds: rounded % 1000 }, Math.abs(rounded) < 1000
|
|
6068
|
+
? {}
|
|
6069
|
+
: fromSeconds(Math.trunc(rounded / 1000), { precision: "seconds", normalize: false }));
|
|
6070
|
+
return options?.normalize == false ? result : normalize(result);
|
|
6075
6071
|
}
|
|
6076
6072
|
TimeSpan.fromMilliseconds = fromMilliseconds;
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
milliseconds
|
|
6085
|
-
|
|
6086
|
-
|
|
6073
|
+
function normalize(value) {
|
|
6074
|
+
const result = {
|
|
6075
|
+
milliseconds: Math.round(toMilliseconds(value) % 1000),
|
|
6076
|
+
seconds: Math.trunc(toSeconds(value) % 60),
|
|
6077
|
+
minutes: Math.trunc(toMinutes(value) % 60),
|
|
6078
|
+
hours: Math.trunc(toHours(value)),
|
|
6079
|
+
};
|
|
6080
|
+
if (!(-1000 < result.milliseconds && result.milliseconds < 1000)) {
|
|
6081
|
+
result.seconds += Math.trunc(result.milliseconds / 1000);
|
|
6082
|
+
result.milliseconds = result.milliseconds % 1000;
|
|
6083
|
+
}
|
|
6084
|
+
if (!(-60 < result.seconds && result.seconds < 60)) {
|
|
6085
|
+
result.minutes += Math.trunc(result.seconds / 60);
|
|
6086
|
+
result.seconds = result.seconds % 60;
|
|
6087
|
+
}
|
|
6088
|
+
if (!(-60 < result.minutes && result.minutes < 60)) {
|
|
6089
|
+
result.hours += Math.trunc(result.minutes);
|
|
6090
|
+
result.minutes = result.minutes % 60;
|
|
6091
|
+
}
|
|
6092
|
+
return Object.fromEntries(Object.entries(result).filter(([, value]) => !!value));
|
|
6093
|
+
}
|
|
6094
|
+
TimeSpan.normalize = normalize;
|
|
6095
|
+
})(exports.TimeSpan || (exports.TimeSpan = {}));
|
|
6087
6096
|
function dateToMilliseconds$1(span) {
|
|
6088
6097
|
const now = Date.UTC(0, 0);
|
|
6089
6098
|
const date = new Date(now);
|
|
@@ -12230,4 +12239,4 @@ function convert(language) {
|
|
|
12230
12239
|
|
|
12231
12240
|
exports.getLanguage = getLanguage;
|
|
12232
12241
|
|
|
12233
|
-
//# sourceMappingURL=getLanguage-
|
|
12242
|
+
//# sourceMappingURL=getLanguage-9f898047.js.map
|