cmat 0.0.21 → 0.0.23
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/components/material-color-picker/base-color.d.ts +1 -0
- package/components/select-tree/select-tree.component.d.ts +1 -1
- package/fesm2022/cmat-components-adapter.mjs +9 -9
- package/fesm2022/cmat-components-breadcrumb.mjs +9 -9
- package/fesm2022/cmat-components-card.mjs +4 -4
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +12 -12
- package/fesm2022/cmat-components-cascade.mjs +9 -9
- package/fesm2022/cmat-components-chip-input.mjs +3 -3
- package/fesm2022/cmat-components-custom-formly.mjs +94 -94
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +3 -3
- package/fesm2022/cmat-components-drawer.mjs +6 -6
- package/fesm2022/cmat-components-fullscreen.mjs +3 -3
- package/fesm2022/cmat-components-highlight.mjs +6 -6
- package/fesm2022/cmat-components-image-viewer.mjs +3 -3
- package/fesm2022/cmat-components-json-editor.mjs +3 -3
- package/fesm2022/cmat-components-knob-input.mjs +3 -3
- package/fesm2022/cmat-components-masonry.mjs +3 -3
- package/fesm2022/cmat-components-material-color-picker.mjs +16 -4
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +43 -43
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +40 -40
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +3 -3
- package/fesm2022/cmat-components-org-chart.mjs +9 -9
- package/fesm2022/cmat-components-pagination.mjs +15 -13
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +9 -9
- package/fesm2022/cmat-components-popover.mjs +9 -9
- package/fesm2022/cmat-components-progress-bar.mjs +4 -4
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +3 -3
- package/fesm2022/cmat-components-select-search.mjs +9 -9
- package/fesm2022/cmat-components-select-table.mjs +4 -4
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +6 -6
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +9 -9
- package/fesm2022/cmat-components-timeline.mjs +13 -13
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +9 -9
- package/fesm2022/cmat-components-transfer-picker.mjs +19 -19
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +6 -6
- package/fesm2022/cmat-components-upload.mjs +11 -11
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +9 -11
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +3 -3
- package/fesm2022/cmat-directives-autofocus.mjs +3 -3
- package/fesm2022/cmat-directives-data-exporter.mjs +21 -21
- package/fesm2022/cmat-directives-debounce.mjs +9 -9
- package/fesm2022/cmat-directives-digit-only.mjs +6 -6
- package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
- package/fesm2022/cmat-lib-mock-api.mjs +6 -6
- package/fesm2022/cmat-pipes-bytes.mjs +3 -3
- package/fesm2022/cmat-pipes-date-format.mjs +3 -3
- package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
- package/fesm2022/cmat-pipes-group-by.mjs +3 -3
- package/fesm2022/cmat-pipes-keys.mjs +3 -3
- package/fesm2022/cmat-pipes-secure.mjs +3 -3
- package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
- package/fesm2022/cmat-services-alert.mjs +3 -3
- package/fesm2022/cmat-services-config.mjs +6 -6
- package/fesm2022/cmat-services-confirmation.mjs +7 -7
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +3 -3
- package/fesm2022/cmat-services-export-as.mjs +7 -7
- package/fesm2022/cmat-services-export-as.mjs.map +1 -1
- package/fesm2022/cmat-services-loading.mjs +6 -6
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-media-watcher.mjs +3 -3
- package/fesm2022/cmat-services-platform.mjs +3 -3
- package/fesm2022/cmat-services-splash-screen.mjs +3 -3
- package/fesm2022/cmat-services-title.mjs +3 -3
- package/fesm2022/cmat-services-translation.mjs +3 -3
- package/fesm2022/cmat-services-utils.mjs +3 -3
- package/package.json +56 -56
- package/styles/components/bundle.scss +23 -25
- package/styles/components/input.scss +2 -0
- package/styles/overrides/angular-material.scss +75 -59
- package/styles/overrides/fullcalendar.scss +3 -1
- package/styles/overrides/quill.scss +8 -6
- package/styles/tailwind.scss +99 -15
- package/styles/user-themes.scss +1 -1
- package/tailwind/plugins/helpers.js +16 -0
- package/tailwind/plugins/scrollbar/index.js +31 -0
- package/tailwind/plugins/scrollbar/typedefs.js +9 -0
- package/tailwind/plugins/scrollbar/utilities.js +201 -0
- package/tailwind/plugins/scrollbar/variants.js +30 -0
- package/tailwind/plugins/theming.js +257 -256
- package/tailwind/plugins/utilities.js +12 -25
- package/tailwind/utils/json-to-sass-map.js +28 -36
|
@@ -1,67 +1,59 @@
|
|
|
1
1
|
const _ = require('lodash');
|
|
2
|
+
const Color = require('colorjs.io').default;
|
|
2
3
|
|
|
3
|
-
module.exports = (data) =>
|
|
4
|
-
{
|
|
5
|
-
if ( !data )
|
|
6
|
-
{
|
|
4
|
+
module.exports = (data) => {
|
|
5
|
+
if (!data) {
|
|
7
6
|
return;
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
data = JSON.parse(data);
|
|
11
10
|
|
|
12
|
-
const getSCSS = (chunk) =>
|
|
13
|
-
{
|
|
11
|
+
const getSCSS = (chunk) => {
|
|
14
12
|
let scss = '';
|
|
15
13
|
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
_.mapKeys(chunk, (value, key) =>
|
|
19
|
-
{
|
|
14
|
+
if (typeof chunk === "object" && !Array.isArray(chunk)) {
|
|
15
|
+
_.mapKeys(chunk, (value, key) => {
|
|
20
16
|
scss += key + ': ';
|
|
21
17
|
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
if ( Array.isArray(value) )
|
|
25
|
-
{
|
|
18
|
+
if (typeof value === "object") {
|
|
19
|
+
if (Array.isArray(value)) {
|
|
26
20
|
scss += '(';
|
|
27
|
-
_.each(value, (val1) =>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
_.each(val1, (val2) =>
|
|
32
|
-
{
|
|
33
|
-
scss += val2 + ' ';
|
|
21
|
+
_.each(value, (val1) => {
|
|
22
|
+
if (Array.isArray(val1)) {
|
|
23
|
+
_.each(val1, (val2) => {
|
|
24
|
+
scss += convertColor(val2) + ' ';
|
|
34
25
|
});
|
|
35
26
|
scss = scss.slice(0, -1) + ', ';
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
{
|
|
39
|
-
scss += val1 + ', ';
|
|
27
|
+
} else {
|
|
28
|
+
scss += convertColor(val1) + ', ';
|
|
40
29
|
}
|
|
41
30
|
});
|
|
42
31
|
scss = scss.slice(0, -2);
|
|
43
32
|
scss += ')';
|
|
44
|
-
}
|
|
45
|
-
else
|
|
46
|
-
{
|
|
33
|
+
} else {
|
|
47
34
|
scss += '(' + getSCSS(value) + ')';
|
|
48
35
|
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
{
|
|
52
|
-
scss += getSCSS(value);
|
|
36
|
+
} else {
|
|
37
|
+
scss += convertColor(value);
|
|
53
38
|
}
|
|
54
39
|
scss += ', ';
|
|
55
40
|
});
|
|
56
41
|
scss = scss.slice(0, -2);
|
|
57
|
-
}
|
|
58
|
-
else
|
|
59
|
-
{
|
|
42
|
+
} else {
|
|
60
43
|
scss += chunk;
|
|
61
44
|
}
|
|
62
45
|
|
|
63
46
|
return scss;
|
|
64
47
|
};
|
|
65
48
|
|
|
49
|
+
const convertColor = (colorValue) => {
|
|
50
|
+
try {
|
|
51
|
+
const color = new Color(colorValue);
|
|
52
|
+
return color.to('srgb').toString({ format: 'hex' });
|
|
53
|
+
} catch (error) {
|
|
54
|
+
return colorValue; // Return original value if conversion fails
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
66
58
|
return '$' + getSCSS(data) + ';';
|
|
67
|
-
};
|
|
59
|
+
};
|