smoothly 0.1.83 → 0.1.87
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-a6821b82.js → generate-f9a36f25.js} +1 -1
- package/dist/cjs/index-328edd81.js +1599 -0
- package/dist/cjs/{index-fc82954f.js → index-ac32385c.js} +230 -184
- package/dist/cjs/index.cjs.js +214 -116
- package/dist/cjs/smoothly-accordion_47.cjs.entry.js +1031 -19112
- package/dist/cjs/smoothly-calendar.cjs.entry.js +7 -15
- package/dist/cjs/smoothly-display-amount.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-display.cjs.entry.js +2 -1
- package/dist/cjs/smoothly-input-date-range.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-input-date.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-input-month.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-input.cjs.entry.js +17 -10
- package/dist/cjs/smoothly-select-demo.cjs.entry.js +2 -2
- package/dist/collection/components/calendar/index.js +9 -17
- package/dist/collection/components/display/index.js +1 -1
- package/dist/collection/components/input/index.js +17 -10
- package/dist/collection/components/input-date/style.css +4 -0
- package/dist/collection/components/input-date-range/style.css +4 -0
- package/dist/collection/components/select-demo/index.js +2 -2
- 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 +1387 -19577
- package/dist/esm/{generate-776b3b0f.js → generate-50b98474.js} +1 -1
- package/dist/esm/index-1be6d668.js +1597 -0
- package/dist/{smoothly/index-a28d88cf.js → esm/index-a5a08f46.js} +230 -184
- package/dist/esm/index.js +215 -116
- package/dist/esm/smoothly-accordion_47.entry.js +1031 -19112
- package/dist/esm/smoothly-calendar.entry.js +7 -15
- package/dist/esm/smoothly-display-amount.entry.js +1 -1
- package/dist/esm/smoothly-display.entry.js +2 -1
- package/dist/esm/smoothly-input-date-range.entry.js +2 -2
- package/dist/esm/smoothly-input-date.entry.js +2 -2
- package/dist/esm/smoothly-input-month.entry.js +2 -2
- package/dist/esm/smoothly-input.entry.js +17 -10
- package/dist/esm/smoothly-select-demo.entry.js +2 -2
- package/dist/smoothly/{generate-776b3b0f.js → generate-50b98474.js} +1 -1
- package/dist/smoothly/index-1be6d668.js +1597 -0
- package/dist/{esm/index-a28d88cf.js → smoothly/index-a5a08f46.js} +230 -184
- package/dist/smoothly/index.esm.js +215 -116
- package/dist/smoothly/p-7b43df84.entry.js +1 -0
- package/dist/smoothly/smoothly-calendar.entry.js +7 -15
- package/dist/smoothly/smoothly-display-amount.entry.js +1 -1
- package/dist/smoothly/smoothly-display.entry.js +2 -1
- package/dist/smoothly/smoothly-input-date-range.entry.js +2 -2
- package/dist/smoothly/smoothly-input-date.entry.js +2 -2
- package/dist/smoothly/smoothly-input-month.entry.js +2 -2
- package/dist/smoothly/smoothly-input.entry.js +17 -10
- package/dist/smoothly/smoothly-select-demo.entry.js +2 -2
- package/dist/types/components/calendar/index.d.ts +2 -2
- package/dist/types/components/input/index.d.ts +1 -0
- 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 +3 -3
- package/dist/cjs/index-42db74b3.js +0 -19931
- package/dist/collection/utilities/colorTransform.js +0 -120
- package/dist/esm/index-36a04e8c.js +0 -19929
- package/dist/smoothly/index-36a04e8c.js +0 -19929
- package/dist/smoothly/p-c4dd9866.entry.js +0 -1
- package/dist/types/utilities/colorNames.d.ts +0 -3
- package/dist/types/utilities/colorTransform.d.ts +0 -8
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Color as CosmeticColor } from "./Color";
|
|
2
|
+
function reduce(types, value) {
|
|
3
|
+
return types.reduce((r, c) => typeof value == "object" && value != null && typeof value[c] == "string"
|
|
4
|
+
? Object.assign(Object.assign({}, r), { [c]: value[c] }) : r, {});
|
|
5
|
+
}
|
|
6
|
+
export var Cosmetic;
|
|
7
|
+
(function (Cosmetic) {
|
|
8
|
+
Cosmetic.types = Cosmetic;
|
|
9
|
+
function from(value) {
|
|
10
|
+
let result = {};
|
|
11
|
+
if (typeof value == "object" && value) {
|
|
12
|
+
result = {
|
|
13
|
+
text: reduce(["background", "color"], value.text),
|
|
14
|
+
border: reduce(["background", "color", "style", "radius", "width"], value.border),
|
|
15
|
+
gap: typeof value.gap == "string" ? value.gap : undefined,
|
|
16
|
+
dangerColor: typeof value.dangerColor == "string"
|
|
17
|
+
? value.dangerColor
|
|
18
|
+
: typeof value.danger_color == "string"
|
|
19
|
+
? value.danger_color
|
|
20
|
+
: undefined,
|
|
21
|
+
fontFamily: typeof value.fontFamily == "string"
|
|
22
|
+
? value.fontFamily
|
|
23
|
+
: typeof value.font_family == "string"
|
|
24
|
+
? value.font_family
|
|
25
|
+
: undefined,
|
|
26
|
+
background: typeof value.background == "string" ? value.background : undefined,
|
|
27
|
+
};
|
|
28
|
+
Object.keys(result).forEach((key) => {
|
|
29
|
+
var _a;
|
|
30
|
+
if (result[key] == undefined ||
|
|
31
|
+
(typeof result[key] == "object" && result[key] && Object.keys((_a = result[key]) !== null && _a !== void 0 ? _a : {}).length == 0)) {
|
|
32
|
+
delete result[key];
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
Cosmetic.from = from;
|
|
39
|
+
Cosmetic.Color = CosmeticColor;
|
|
40
|
+
})(Cosmetic || (Cosmetic = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Cosmetic } from "./Cosmetic";
|