smoothly 0.1.82 → 0.1.86
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/{generate-14aca5d2.js → generate-a6821b82.js} +2 -2
- package/dist/cjs/index.cjs.js +214 -116
- package/dist/cjs/smoothly-accordion_47.cjs.entry.js +9 -17
- package/dist/cjs/smoothly-calendar.cjs.entry.js +6 -14
- package/dist/cjs/smoothly-input-date-range.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-input-date.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-input-month.cjs.entry.js +1 -1
- package/dist/collection/components/calendar/generate.js +2 -2
- package/dist/collection/components/calendar/index.js +9 -17
- package/dist/collection/components/input-date/style.css +4 -0
- package/dist/collection/components/input-date-range/style.css +4 -0
- package/dist/collection/index.js +1 -1
- package/dist/collection/utilities/Cosmetic/Color/CommaRgb.js +90 -0
- package/dist/collection/utilities/Cosmetic/Color/Hex.js +11 -0
- package/dist/collection/utilities/Cosmetic/Color/Hsl.js +32 -0
- package/dist/collection/utilities/{colorNames.js → Cosmetic/Color/Name.js} +9 -1
- package/dist/collection/utilities/Cosmetic/Color/Rgb.js +19 -0
- package/dist/collection/utilities/Cosmetic/Color/index.js +23 -0
- package/dist/collection/utilities/Cosmetic/index.js +40 -0
- package/dist/collection/utilities/index.js +1 -1
- package/dist/custom-elements/index.js +230 -139
- package/dist/{smoothly/generate-be25a8d1.js → esm/generate-776b3b0f.js} +2 -2
- package/dist/esm/index.js +215 -116
- package/dist/esm/smoothly-accordion_47.entry.js +9 -17
- package/dist/esm/smoothly-calendar.entry.js +6 -14
- package/dist/esm/smoothly-input-date-range.entry.js +1 -1
- package/dist/esm/smoothly-input-date.entry.js +1 -1
- package/dist/esm/smoothly-input-month.entry.js +1 -1
- package/dist/{esm/generate-be25a8d1.js → smoothly/generate-776b3b0f.js} +2 -2
- package/dist/smoothly/index.esm.js +215 -116
- package/dist/smoothly/p-375a8d94.entry.js +1 -0
- package/dist/smoothly/smoothly-calendar.entry.js +6 -14
- package/dist/smoothly/smoothly-input-date-range.entry.js +1 -1
- package/dist/smoothly/smoothly-input-date.entry.js +1 -1
- package/dist/smoothly/smoothly-input-month.entry.js +1 -1
- package/dist/types/components/calendar/index.d.ts +2 -2
- package/dist/types/components.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utilities/Cosmetic/Color/CommaRgb.d.ts +11 -0
- package/dist/types/utilities/Cosmetic/Color/Hex.d.ts +4 -0
- package/dist/types/utilities/Cosmetic/Color/Hsl.d.ts +4 -0
- package/dist/types/utilities/Cosmetic/Color/Name.d.ts +155 -0
- package/dist/types/utilities/Cosmetic/Color/Rgb.d.ts +4 -0
- package/dist/types/utilities/Cosmetic/Color/index.d.ts +170 -0
- package/dist/types/utilities/Cosmetic/index.d.ts +23 -0
- package/dist/types/utilities/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/collection/utilities/colorTransform.js +0 -120
- package/dist/smoothly/p-e3ae8b97.entry.js +0 -1
- package/dist/types/utilities/colorNames.d.ts +0 -3
- package/dist/types/utilities/colorTransform.d.ts +0 -8
|
@@ -1555,7 +1555,7 @@ var Symmetric;
|
|
|
1555
1555
|
Symmetric.is = is;
|
|
1556
1556
|
})(Symmetric || (Symmetric = {}));
|
|
1557
1557
|
|
|
1558
|
-
var Name$
|
|
1558
|
+
var Name$4;
|
|
1559
1559
|
(function (Name) {
|
|
1560
1560
|
function is(value) {
|
|
1561
1561
|
return value == "none" || Symmetric.is(value) || Asymmetric.is(value);
|
|
@@ -1569,7 +1569,7 @@ var Name$3;
|
|
|
1569
1569
|
(function (Asymmetric$1) {
|
|
1570
1570
|
Asymmetric$1.is = Asymmetric.is;
|
|
1571
1571
|
})(Asymmetric$1 = Name.Asymmetric || (Name.Asymmetric = {}));
|
|
1572
|
-
})(Name$
|
|
1572
|
+
})(Name$4 || (Name$4 = {}));
|
|
1573
1573
|
|
|
1574
1574
|
var __awaiter$2 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
1575
1575
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -1681,14 +1681,14 @@ class Algorithm {
|
|
|
1681
1681
|
(function (Algorithm) {
|
|
1682
1682
|
let Name;
|
|
1683
1683
|
(function (Name) {
|
|
1684
|
-
Name.is = Name$
|
|
1684
|
+
Name.is = Name$4.is;
|
|
1685
1685
|
let Symmetric;
|
|
1686
1686
|
(function (Symmetric) {
|
|
1687
|
-
Symmetric.is = Name$
|
|
1687
|
+
Symmetric.is = Name$4.Symmetric.is;
|
|
1688
1688
|
})(Symmetric = Name.Symmetric || (Name.Symmetric = {}));
|
|
1689
1689
|
let Asymmetric;
|
|
1690
1690
|
(function (Asymmetric) {
|
|
1691
|
-
Asymmetric.is = Name$
|
|
1691
|
+
Asymmetric.is = Name$4.Asymmetric.is;
|
|
1692
1692
|
})(Asymmetric = Name.Asymmetric || (Name.Asymmetric = {}));
|
|
1693
1693
|
})(Name = Algorithm.Name || (Algorithm.Name = {}));
|
|
1694
1694
|
})(Algorithm || (Algorithm = {}));
|
|
@@ -1989,7 +1989,52 @@ class Trigger {
|
|
|
1989
1989
|
}
|
|
1990
1990
|
}
|
|
1991
1991
|
|
|
1992
|
-
|
|
1992
|
+
var Hex;
|
|
1993
|
+
(function (Hex) {
|
|
1994
|
+
function is(value) {
|
|
1995
|
+
const matchArray = (typeof value == "string" && value.match(/[0-9a-fA-F]/g)) || undefined;
|
|
1996
|
+
return (typeof value == "string" &&
|
|
1997
|
+
value.length > 3 &&
|
|
1998
|
+
value[0] == "#" &&
|
|
1999
|
+
((matchArray === null || matchArray === void 0 ? void 0 : matchArray.length) == 3 || (matchArray === null || matchArray === void 0 ? void 0 : matchArray.length) == 6));
|
|
2000
|
+
}
|
|
2001
|
+
Hex.is = is;
|
|
2002
|
+
})(Hex || (Hex = {}));
|
|
2003
|
+
|
|
2004
|
+
var Hsl;
|
|
2005
|
+
(function (Hsl) {
|
|
2006
|
+
function is(value) {
|
|
2007
|
+
const values = typeof value == "string" && value.length > 11 ? value.substring(4, value.length - 1).split(",") : [];
|
|
2008
|
+
return (typeof value == "string" &&
|
|
2009
|
+
value.length > 11 &&
|
|
2010
|
+
value.substr(0, 4) == "hsl(" &&
|
|
2011
|
+
value.substr(value.length - 1, 1) == ")" &&
|
|
2012
|
+
values.length == 3 &&
|
|
2013
|
+
values.every((single, index) => {
|
|
2014
|
+
var _a, _b;
|
|
2015
|
+
let result = false;
|
|
2016
|
+
if (index == 0)
|
|
2017
|
+
result =
|
|
2018
|
+
!Number.isNaN(single) &&
|
|
2019
|
+
((_a = single.match(/[0-9]/g)) === null || _a === void 0 ? void 0 : _a.length) == single.length &&
|
|
2020
|
+
Number(single) >= 0 &&
|
|
2021
|
+
Number(single) <= 360;
|
|
2022
|
+
else {
|
|
2023
|
+
const number = single.substr(0, single.length - 1);
|
|
2024
|
+
result =
|
|
2025
|
+
single[single.length - 1] == "%" &&
|
|
2026
|
+
!Number.isNaN(number) &&
|
|
2027
|
+
((_b = number.match(/[0-9]/g)) === null || _b === void 0 ? void 0 : _b.length) == number.length &&
|
|
2028
|
+
Number(number) >= 0 &&
|
|
2029
|
+
Number(number) <= 100;
|
|
2030
|
+
}
|
|
2031
|
+
return result;
|
|
2032
|
+
}));
|
|
2033
|
+
}
|
|
2034
|
+
Hsl.is = is;
|
|
2035
|
+
})(Hsl || (Hsl = {}));
|
|
2036
|
+
|
|
2037
|
+
const Names = {
|
|
1993
2038
|
aliceblue: "#f0f8ff",
|
|
1994
2039
|
antiquewhite: "#faebd7",
|
|
1995
2040
|
aqua: "#00ffff",
|
|
@@ -2139,126 +2184,180 @@ const colorNames = {
|
|
|
2139
2184
|
yellow: "#ffff00",
|
|
2140
2185
|
yellowgreen: "#9acd32",
|
|
2141
2186
|
};
|
|
2187
|
+
var Name$3;
|
|
2188
|
+
(function (Name) {
|
|
2189
|
+
Name.types = () => Object.keys(Names);
|
|
2190
|
+
function is(value) {
|
|
2191
|
+
return typeof value == "string" && Name.types().includes(value.toLowerCase());
|
|
2192
|
+
}
|
|
2193
|
+
Name.is = is;
|
|
2194
|
+
})(Name$3 || (Name$3 = {}));
|
|
2142
2195
|
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
result
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
}
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2196
|
+
var Rgb;
|
|
2197
|
+
(function (Rgb) {
|
|
2198
|
+
function is(value) {
|
|
2199
|
+
const values = typeof value == "string" && value.length > 9 ? value.substring(4, value.length - 1).split(",") : [];
|
|
2200
|
+
return (typeof value == "string" &&
|
|
2201
|
+
value.length > 9 &&
|
|
2202
|
+
value.substr(0, 4) == "rgb(" &&
|
|
2203
|
+
value.substr(value.length - 1, 1) == ")" &&
|
|
2204
|
+
values.length == 3 &&
|
|
2205
|
+
values.every((value) => {
|
|
2206
|
+
var _a;
|
|
2207
|
+
return !Number.isNaN(value) &&
|
|
2208
|
+
((_a = value.match(/[0-9]/g)) === null || _a === void 0 ? void 0 : _a.length) == value.length &&
|
|
2209
|
+
Number(value) >= 0 &&
|
|
2210
|
+
Number(value) <= 255;
|
|
2211
|
+
}));
|
|
2212
|
+
}
|
|
2213
|
+
Rgb.is = is;
|
|
2214
|
+
})(Rgb || (Rgb = {}));
|
|
2215
|
+
|
|
2216
|
+
var CommaRgb;
|
|
2217
|
+
(function (CommaRgb) {
|
|
2218
|
+
function is(value) {
|
|
2219
|
+
const values = typeof value == "string" ? value.split(",") : [];
|
|
2220
|
+
return (values.length == 3 &&
|
|
2221
|
+
values.every((value) => {
|
|
2222
|
+
var _a;
|
|
2223
|
+
return !Number.isNaN(value) &&
|
|
2224
|
+
((_a = value.match(/[0-9]/g)) === null || _a === void 0 ? void 0 : _a.length) == value.length &&
|
|
2225
|
+
Number(value) >= 0 &&
|
|
2226
|
+
Number(value) <= 255;
|
|
2227
|
+
}));
|
|
2228
|
+
}
|
|
2229
|
+
CommaRgb.is = is;
|
|
2230
|
+
function from(color) {
|
|
2231
|
+
let result;
|
|
2232
|
+
const colorWithoutSpace = typeof color == "string" ? color.replace(/ /g, "").toLowerCase() : undefined;
|
|
2233
|
+
if (!colorWithoutSpace)
|
|
2234
|
+
result = undefined;
|
|
2235
|
+
else if (CommaRgb.is(colorWithoutSpace))
|
|
2236
|
+
result = colorWithoutSpace;
|
|
2237
|
+
else if (Hex.is(colorWithoutSpace))
|
|
2238
|
+
result = fromHex(colorWithoutSpace);
|
|
2239
|
+
else if (Rgb.is(colorWithoutSpace))
|
|
2240
|
+
result = fromRgb(colorWithoutSpace);
|
|
2241
|
+
else if (Name$3.is(colorWithoutSpace))
|
|
2242
|
+
result = fromHex(Names[colorWithoutSpace]);
|
|
2243
|
+
else if (Hsl.is(colorWithoutSpace))
|
|
2244
|
+
result = fromHsl(colorWithoutSpace);
|
|
2245
|
+
return result;
|
|
2246
|
+
}
|
|
2247
|
+
CommaRgb.from = from;
|
|
2248
|
+
function fromHex(hex) {
|
|
2249
|
+
let result = "0,0,0";
|
|
2250
|
+
if (hex.length == 7)
|
|
2251
|
+
result = `${parseInt(hex.substr(1, 2), 16)},${parseInt(hex.substr(3, 2), 16)},${parseInt(hex.substr(5, 2), 16)}`;
|
|
2252
|
+
else if (hex.length == 4)
|
|
2253
|
+
result = fromHex(`#${hex[1]}${hex[1]}${hex[2]}${hex[2]}${hex[3]}${hex[3]}`);
|
|
2254
|
+
return result;
|
|
2255
|
+
}
|
|
2256
|
+
CommaRgb.fromHex = fromHex;
|
|
2257
|
+
function fromRgb(rgb) {
|
|
2258
|
+
return rgb.substring(4, rgb.length - 1);
|
|
2259
|
+
}
|
|
2260
|
+
CommaRgb.fromRgb = fromRgb;
|
|
2261
|
+
function fromHsl(hsl) {
|
|
2262
|
+
let result = "";
|
|
2263
|
+
let h, s, l;
|
|
2264
|
+
let r, g, b;
|
|
2265
|
+
const HSL = hsl
|
|
2266
|
+
.substring(4, hsl.length - 1)
|
|
2267
|
+
.split(",")
|
|
2268
|
+
.map((value, index) => Number(index == 0 ? value : value.substr(0, value.length - 1)));
|
|
2269
|
+
if (HSL.length == 3) {
|
|
2270
|
+
h = HSL[0] / 360;
|
|
2271
|
+
s = HSL[1] / 100;
|
|
2272
|
+
l = HSL[2] / 100;
|
|
2273
|
+
if (s == 0)
|
|
2274
|
+
r = g = b = l;
|
|
2211
2275
|
else {
|
|
2212
|
-
const
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
Number(number) >= 0 &&
|
|
2218
|
-
Number(number) <= 100;
|
|
2276
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
2277
|
+
const p = 2 * l - q;
|
|
2278
|
+
r = hue2rgb(p, q, h + 1 / 3);
|
|
2279
|
+
g = hue2rgb(p, q, h);
|
|
2280
|
+
b = hue2rgb(p, q, h - 1 / 3);
|
|
2219
2281
|
}
|
|
2220
|
-
|
|
2221
|
-
}));
|
|
2222
|
-
}
|
|
2223
|
-
function hue2rgb(p, q, t) {
|
|
2224
|
-
let result = p;
|
|
2225
|
-
if (t < 0)
|
|
2226
|
-
t += 1;
|
|
2227
|
-
if (t > 1)
|
|
2228
|
-
t -= 1;
|
|
2229
|
-
if (t < 1 / 6)
|
|
2230
|
-
result = p + (q - p) * 6 * t;
|
|
2231
|
-
else if (t < 1 / 2)
|
|
2232
|
-
result = q;
|
|
2233
|
-
else if (t < 2 / 3)
|
|
2234
|
-
result = p + (q - p) * (2 / 3 - t) * 6;
|
|
2235
|
-
return result;
|
|
2236
|
-
}
|
|
2237
|
-
function hslToCommaRgb(hsl) {
|
|
2238
|
-
let result;
|
|
2239
|
-
let h, s, l;
|
|
2240
|
-
let r, g, b;
|
|
2241
|
-
const HSL = hsl
|
|
2242
|
-
.substring(4, hsl.length - 1)
|
|
2243
|
-
.split(",")
|
|
2244
|
-
.map((value, index) => Number(index == 0 ? value : value.substr(0, value.length - 1)));
|
|
2245
|
-
if (HSL.length == 3) {
|
|
2246
|
-
h = HSL[0] / 360;
|
|
2247
|
-
s = HSL[1] / 100;
|
|
2248
|
-
l = HSL[2] / 100;
|
|
2249
|
-
if (s == 0)
|
|
2250
|
-
r = g = b = l;
|
|
2251
|
-
else {
|
|
2252
|
-
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
2253
|
-
const p = 2 * l - q;
|
|
2254
|
-
r = hue2rgb(p, q, h + 1 / 3);
|
|
2255
|
-
g = hue2rgb(p, q, h);
|
|
2256
|
-
b = hue2rgb(p, q, h - 1 / 3);
|
|
2282
|
+
result = `${Math.round(255 * r)},${Math.round(255 * g)},${Math.round(255 * b)}`;
|
|
2257
2283
|
}
|
|
2258
|
-
result
|
|
2284
|
+
return result;
|
|
2259
2285
|
}
|
|
2260
|
-
|
|
2261
|
-
|
|
2286
|
+
CommaRgb.fromHsl = fromHsl;
|
|
2287
|
+
function hue2rgb(p, q, t) {
|
|
2288
|
+
let result = p;
|
|
2289
|
+
if (t < 0)
|
|
2290
|
+
t += 1;
|
|
2291
|
+
if (t > 1)
|
|
2292
|
+
t -= 1;
|
|
2293
|
+
if (t < 1 / 6)
|
|
2294
|
+
result = p + (q - p) * 6 * t;
|
|
2295
|
+
else if (t < 1 / 2)
|
|
2296
|
+
result = q;
|
|
2297
|
+
else if (t < 2 / 3)
|
|
2298
|
+
result = p + (q - p) * (2 / 3 - t) * 6;
|
|
2299
|
+
return result;
|
|
2300
|
+
}
|
|
2301
|
+
})(CommaRgb || (CommaRgb = {}));
|
|
2302
|
+
|
|
2303
|
+
var Color;
|
|
2304
|
+
(function (Color) {
|
|
2305
|
+
function is(value) {
|
|
2306
|
+
return (typeof value == "string" &&
|
|
2307
|
+
(CommaRgb.is(value) || Hex.is(value) || Hsl.is(value) || Name$3.is(value) || Rgb.is(value)));
|
|
2308
|
+
}
|
|
2309
|
+
Color.is = is;
|
|
2310
|
+
function from(value) {
|
|
2311
|
+
return is(value) ? value : undefined;
|
|
2312
|
+
}
|
|
2313
|
+
Color.from = from;
|
|
2314
|
+
Color.Names = Names;
|
|
2315
|
+
Color.Name = Name$3;
|
|
2316
|
+
Color.CommaRgb = CommaRgb;
|
|
2317
|
+
Color.Rgb = Rgb;
|
|
2318
|
+
Color.Hex = Hex;
|
|
2319
|
+
Color.Hsl = Hsl;
|
|
2320
|
+
})(Color || (Color = {}));
|
|
2321
|
+
|
|
2322
|
+
function reduce(types, value) {
|
|
2323
|
+
return types.reduce((r, c) => typeof value == "object" && value != null && typeof value[c] == "string"
|
|
2324
|
+
? Object.assign(Object.assign({}, r), { [c]: value[c] }) : r, {});
|
|
2325
|
+
}
|
|
2326
|
+
var Cosmetic;
|
|
2327
|
+
(function (Cosmetic) {
|
|
2328
|
+
Cosmetic.types = Cosmetic;
|
|
2329
|
+
function from(value) {
|
|
2330
|
+
let result = {};
|
|
2331
|
+
if (typeof value == "object" && value) {
|
|
2332
|
+
result = {
|
|
2333
|
+
text: reduce(["background", "color"], value.text),
|
|
2334
|
+
border: reduce(["background", "color", "style", "radius", "width"], value.border),
|
|
2335
|
+
gap: typeof value.gap == "string" ? value.gap : undefined,
|
|
2336
|
+
dangerColor: typeof value.dangerColor == "string"
|
|
2337
|
+
? value.dangerColor
|
|
2338
|
+
: typeof value.danger_color == "string"
|
|
2339
|
+
? value.danger_color
|
|
2340
|
+
: undefined,
|
|
2341
|
+
fontFamily: typeof value.fontFamily == "string"
|
|
2342
|
+
? value.fontFamily
|
|
2343
|
+
: typeof value.font_family == "string"
|
|
2344
|
+
? value.font_family
|
|
2345
|
+
: undefined,
|
|
2346
|
+
background: typeof value.background == "string" ? value.background : undefined,
|
|
2347
|
+
};
|
|
2348
|
+
Object.keys(result).forEach((key) => {
|
|
2349
|
+
var _a;
|
|
2350
|
+
if (result[key] == undefined ||
|
|
2351
|
+
(typeof result[key] == "object" && result[key] && Object.keys((_a = result[key]) !== null && _a !== void 0 ? _a : {}).length == 0)) {
|
|
2352
|
+
delete result[key];
|
|
2353
|
+
}
|
|
2354
|
+
});
|
|
2355
|
+
}
|
|
2356
|
+
return result;
|
|
2357
|
+
}
|
|
2358
|
+
Cosmetic.from = from;
|
|
2359
|
+
Cosmetic.Color = Color;
|
|
2360
|
+
})(Cosmetic || (Cosmetic = {}));
|
|
2262
2361
|
|
|
2263
2362
|
const globalScripts = () => {};
|
|
2264
2363
|
|
|
@@ -21267,12 +21366,12 @@ function months(current) {
|
|
|
21267
21366
|
const day = new globalThis.Date(current);
|
|
21268
21367
|
const result = [];
|
|
21269
21368
|
for (let i = 0; i < 12; i++) {
|
|
21270
|
-
day.setMonth(i);
|
|
21369
|
+
day.setMonth(i, 28);
|
|
21271
21370
|
const date = dist$4.Date.create(day);
|
|
21272
21371
|
result.push({
|
|
21273
21372
|
date,
|
|
21274
21373
|
name: day.toLocaleString(undefined, { month: "long" }),
|
|
21275
|
-
selected: date == current,
|
|
21374
|
+
selected: date.substr(0, 7) == current.substr(0, 7),
|
|
21276
21375
|
});
|
|
21277
21376
|
}
|
|
21278
21377
|
return result;
|
|
@@ -21332,22 +21431,14 @@ let Calendar = class extends HTMLElement {
|
|
|
21332
21431
|
event.stopPropagation();
|
|
21333
21432
|
} }),
|
|
21334
21433
|
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 => {
|
|
21335
|
-
var _a, _b, _c
|
|
21336
|
-
return (h("td", { tabindex: 1, onClick: this.min || this.max
|
|
21337
|
-
|
|
21338
|
-
|
|
21339
|
-
: undefined
|
|
21340
|
-
: () => this.onClick(date), class: (date == this.value ? ["selected"] : [])
|
|
21341
|
-
.concat(...(date == dist$4.Date.now() ? ["today"] : []), dist$4.Date.firstOfMonth((_c = this.month) !== null && _c !== void 0 ? _c : this.value) == dist$4.Date.firstOfMonth(date) ? ["currentMonth"] : [], this.doubleInput
|
|
21342
|
-
? date >= ((_d = this.start) !== null && _d !== void 0 ? _d : "") && date <= ((_e = this.end) !== null && _e !== void 0 ? _e : "")
|
|
21434
|
+
var _a, _b, _c;
|
|
21435
|
+
return (h("td", { tabindex: 1, onClick: (this.min || this.max) && (date < this.min || date > this.max) ? undefined : () => this.onClick(date), class: (date == this.value ? ["selected"] : [])
|
|
21436
|
+
.concat(...(date == dist$4.Date.now() ? ["today"] : []), dist$4.Date.firstOfMonth((_a = this.month) !== null && _a !== void 0 ? _a : this.value) == dist$4.Date.firstOfMonth(date) ? ["currentMonth"] : [], this.doubleInput
|
|
21437
|
+
? date >= ((_b = this.start) !== null && _b !== void 0 ? _b : "") && date <= ((_c = this.end) !== null && _c !== void 0 ? _c : "")
|
|
21343
21438
|
? ["dateRange"]
|
|
21344
21439
|
: []
|
|
21345
21440
|
: "")
|
|
21346
|
-
.concat(...(this.min || this.max
|
|
21347
|
-
? date < ((_f = this.min) !== null && _f !== void 0 ? _f : "") || date > ((_g = this.max) !== null && _g !== void 0 ? _g : "")
|
|
21348
|
-
? ["disable"]
|
|
21349
|
-
: []
|
|
21350
|
-
: ""))
|
|
21441
|
+
.concat(...(this.min || this.max ? (date < this.min || date > this.max ? ["disable"] : []) : ""))
|
|
21351
21442
|
.join(" ") }, date.substring(8, 10)));
|
|
21352
21443
|
}))))),
|
|
21353
21444
|
];
|
|
@@ -60835,7 +60926,7 @@ let SmoothlyInput$1 = class extends HTMLElement {
|
|
|
60835
60926
|
static get style() { return styleCss$v; }
|
|
60836
60927
|
};
|
|
60837
60928
|
|
|
60838
|
-
const styleCss$u = ".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))}";
|
|
60929
|
+
const styleCss$u = ".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;top:0px;left:0px;right:0px;bottom:0px;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))}";
|
|
60839
60930
|
|
|
60840
60931
|
let InputDate = class extends HTMLElement {
|
|
60841
60932
|
constructor() {
|
|
@@ -60863,7 +60954,7 @@ let InputDate = class extends HTMLElement {
|
|
|
60863
60954
|
static get style() { return styleCss$u; }
|
|
60864
60955
|
};
|
|
60865
60956
|
|
|
60866
|
-
const styleCss$t = ".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}";
|
|
60957
|
+
const styleCss$t = ".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;top:0px;left:0px;right:0px;bottom:0px;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}";
|
|
60867
60958
|
|
|
60868
60959
|
let InputDateRange = class extends HTMLElement {
|
|
60869
60960
|
constructor() {
|
|
@@ -62259,4 +62350,4 @@ const defineCustomElements = (opts) => {
|
|
|
62259
62350
|
}
|
|
62260
62351
|
};
|
|
62261
62352
|
|
|
62262
|
-
export { App, ClientIdentifier, Message, Notice, SmoothlyAccordion, SmoothlyAccordionItem, SmoothlyApp, SmoothlyAppDemo, SmoothlyCalendar, SmoothlyCheckbox, SmoothlyDialog, SmoothlyDialogDemo, SmoothlyDisplay, SmoothlyDisplayAmount, SmoothlyDisplayDateTime, SmoothlyDisplayDemo, SmoothlyFrame, SmoothlyIcon, SmoothlyIconDemo, SmoothlyInput, SmoothlyInputDate, SmoothlyInputDateRange, SmoothlyInputDemo, SmoothlyInputMonth, SmoothlyItem, SmoothlyMenuOptions, SmoothlyNotification, SmoothlyNotifier, SmoothlyOption, SmoothlyPicker, SmoothlyPopup, SmoothlyQuiet, SmoothlyRadio, SmoothlyRadioGroup, SmoothlyReorder, SmoothlyRoom, SmoothlySelect, SmoothlySelectDemo, SmoothlySelector, SmoothlySpinner, SmoothlySubmit, SmoothlyTab, SmoothlyTabSwitch, SmoothlyTable, SmoothlyTableCell, SmoothlyTableDemo, SmoothlyTableExpandableCell, SmoothlyTableExpandableRow, SmoothlyTableHeader, SmoothlyTableRow, SmoothlyTrigger, SmoothlyTriggerSink, SmoothlyTriggerSource, SmoothlyTuple, SmoothlyUrlencoded, Trigger, defineCustomElements
|
|
62353
|
+
export { App, ClientIdentifier, Cosmetic, Message, Notice, SmoothlyAccordion, SmoothlyAccordionItem, SmoothlyApp, SmoothlyAppDemo, SmoothlyCalendar, SmoothlyCheckbox, SmoothlyDialog, SmoothlyDialogDemo, SmoothlyDisplay, SmoothlyDisplayAmount, SmoothlyDisplayDateTime, SmoothlyDisplayDemo, SmoothlyFrame, SmoothlyIcon, SmoothlyIconDemo, SmoothlyInput, SmoothlyInputDate, SmoothlyInputDateRange, SmoothlyInputDemo, SmoothlyInputMonth, SmoothlyItem, SmoothlyMenuOptions, SmoothlyNotification, SmoothlyNotifier, SmoothlyOption, SmoothlyPicker, SmoothlyPopup, SmoothlyQuiet, SmoothlyRadio, SmoothlyRadioGroup, SmoothlyReorder, SmoothlyRoom, SmoothlySelect, SmoothlySelectDemo, SmoothlySelector, SmoothlySpinner, SmoothlySubmit, SmoothlyTab, SmoothlyTabSwitch, SmoothlyTable, SmoothlyTableCell, SmoothlyTableDemo, SmoothlyTableExpandableCell, SmoothlyTableExpandableRow, SmoothlyTableHeader, SmoothlyTableRow, SmoothlyTrigger, SmoothlyTriggerSink, SmoothlyTriggerSource, SmoothlyTuple, SmoothlyUrlencoded, Trigger, defineCustomElements };
|
|
@@ -31,12 +31,12 @@ function months(current) {
|
|
|
31
31
|
const day = new globalThis.Date(current);
|
|
32
32
|
const result = [];
|
|
33
33
|
for (let i = 0; i < 12; i++) {
|
|
34
|
-
day.setMonth(i);
|
|
34
|
+
day.setMonth(i, 28);
|
|
35
35
|
const date = dist.Date.create(day);
|
|
36
36
|
result.push({
|
|
37
37
|
date,
|
|
38
38
|
name: day.toLocaleString(undefined, { month: "long" }),
|
|
39
|
-
selected: date == current,
|
|
39
|
+
selected: date.substr(0, 7) == current.substr(0, 7),
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
return result;
|