@bimdata/design-system 1.4.0-rc.2 → 1.4.0-rc.22
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.js +2 -1
- package/dist/colors.js +82 -0
- package/dist/css/design-system.css +139 -139
- package/dist/js/BIMDataComponents/BIMDataBigSpinner.js +1 -1
- package/dist/js/BIMDataComponents/BIMDataCarousel.js +1 -1
- package/dist/js/BIMDataComponents/BIMDataDropdownList.js +1 -1
- package/dist/js/BIMDataComponents/BIMDataDropdownMenu.js +1 -1
- package/dist/js/BIMDataComponents/BIMDataFileIcon.js +1 -1
- package/dist/js/BIMDataComponents/BIMDataIcon.js +1 -1
- package/dist/js/BIMDataComponents/BIMDataInput.js +1 -1
- package/dist/js/BIMDataComponents/BIMDataMultiplePieChart.js +1 -0
- package/dist/js/BIMDataComponents/BIMDataPaginatedList.js +1 -1
- package/dist/js/BIMDataComponents/BIMDataPieSpinner.js +1 -1
- package/dist/js/BIMDataComponents/BIMDataSafeZoneModal.js +1 -1
- package/dist/js/BIMDataComponents/BIMDataSearch.js +1 -1
- package/dist/js/BIMDataComponents/BIMDataSelect.js +1 -1
- package/dist/js/BIMDataComponents/BIMDataSimplePieChart.js +1 -0
- package/dist/js/BIMDataComponents/BIMDataTable.js +1 -1
- package/dist/js/BIMDataComponents/BIMDataTabs.js +1 -1
- package/dist/js/BIMDataComponents/BIMDataTextbox.js +1 -1
- package/dist/js/BIMDataComponents/BIMDataTooltip.js +1 -1
- package/dist/js/BIMDataComponents/index.js +1 -1
- package/dist/js/BIMDataComponents/vue3/BIMDataCarousel.js +1 -1
- package/dist/js/BIMDataComponents/vue3/BIMDataDropdownList.js +1 -1
- package/dist/js/BIMDataComponents/vue3/BIMDataDropdownMenu.js +1 -1
- package/dist/js/BIMDataComponents/vue3/BIMDataFileIcon.js +1 -1
- package/dist/js/BIMDataComponents/vue3/BIMDataIcon.js +1 -1
- package/dist/js/BIMDataComponents/vue3/BIMDataInput.js +1 -1
- package/dist/js/BIMDataComponents/vue3/BIMDataMultiplePieChart.js +1 -0
- package/dist/js/BIMDataComponents/vue3/BIMDataSafeZoneModal.js +1 -1
- package/dist/js/BIMDataComponents/vue3/BIMDataSearch.js +1 -1
- package/dist/js/BIMDataComponents/vue3/BIMDataSelect.js +1 -1
- package/dist/js/BIMDataComponents/vue3/BIMDataSimplePieChart.js +1 -0
- package/dist/js/BIMDataComponents/vue3/BIMDataTooltip.js +1 -1
- package/dist/js/BIMDataComponents/vue3/index.js +1 -1
- package/dist/js/BIMDataDirectives/index.js +1 -1
- package/dist/js/BIMDataDirectives/vue3/index.js +1 -1
- package/dist/js/BIMDataSmartComponents/BIMDataFileManager.js +1 -1
- package/dist/scss/mixins/_font-size.scss +1 -1
- package/package.json +2 -2
- package/dist/js/BIMDataComponents/BIMDataGuidedTour.js +0 -1
- package/dist/js/BIMDataComponents/vue3/BIMDataGuidedTour.js +0 -1
package/components.js
CHANGED
|
@@ -7,11 +7,11 @@ export { default as BIMDataColorSelector } from "./dist/js/BIMDataComponents/BIM
|
|
|
7
7
|
export { default as BIMDataDropdownList } from "./dist/js/BIMDataComponents/BIMDataDropdownList.js";
|
|
8
8
|
export { default as BIMDataDropdownMenu } from "./dist/js/BIMDataComponents/BIMDataDropdownMenu.js";
|
|
9
9
|
export { default as BIMDataFileIcon } from "./dist/js/BIMDataComponents/BIMDataFileIcon.js";
|
|
10
|
-
export { default as BIMDataGuidedTour } from "./dist/js/BIMDataComponents/BIMDataGuidedTour.js";
|
|
11
10
|
export { default as BIMDataIcon } from "./dist/js/BIMDataComponents/BIMDataIcon.js";
|
|
12
11
|
export { default as BIMDataIllustration } from "./dist/js/BIMDataComponents/BIMDataIllustration.js";
|
|
13
12
|
export { default as BIMDataInput } from "./dist/js/BIMDataComponents/BIMDataInput.js";
|
|
14
13
|
export { default as BIMDataLoading } from "./dist/js/BIMDataComponents/BIMDataLoading.js";
|
|
14
|
+
export { default as BIMDataMultiplePieChart } from "./dist/js/BIMDataComponents/BIMDataMultiplePieChart.js";
|
|
15
15
|
export { default as BIMDataNavigation } from "./dist/js/BIMDataComponents/BIMDataNavigation.js";
|
|
16
16
|
export { default as BIMDataPaginatedList } from "./dist/js/BIMDataComponents/BIMDataPaginatedList.js";
|
|
17
17
|
export { default as BIMDataPieSpinner } from "./dist/js/BIMDataComponents/BIMDataPieSpinner.js";
|
|
@@ -20,6 +20,7 @@ export { default as BIMDataResponsiveGrid } from "./dist/js/BIMDataComponents/BI
|
|
|
20
20
|
export { default as BIMDataSafeZoneModal } from "./dist/js/BIMDataComponents/BIMDataSafeZoneModal.js";
|
|
21
21
|
export { default as BIMDataSearch } from "./dist/js/BIMDataComponents/BIMDataSearch.js";
|
|
22
22
|
export { default as BIMDataSelect } from "./dist/js/BIMDataComponents/BIMDataSelect.js";
|
|
23
|
+
export { default as BIMDataSimplePieChart } from "./dist/js/BIMDataComponents/BIMDataSimplePieChart.js";
|
|
23
24
|
export { default as BIMDataSpinner } from "./dist/js/BIMDataComponents/BIMDataSpinner.js";
|
|
24
25
|
export { default as BIMDataTable } from "./dist/js/BIMDataComponents/BIMDataTable.js";
|
|
25
26
|
export { default as BIMDataTabs } from "./dist/js/BIMDataComponents/BIMDataTabs.js";
|
package/dist/colors.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
const colors = Object.freeze({
|
|
2
|
+
bisque: "ffe4c4",
|
|
3
|
+
orange: "ffa500",
|
|
4
|
+
coral: "ff7f50",
|
|
5
|
+
red: "ff3d1e",
|
|
6
|
+
maroon: "800000",
|
|
7
|
+
khaki: "f0e68c",
|
|
8
|
+
tan: "d2b48c",
|
|
9
|
+
peru: "cd853f",
|
|
10
|
+
sienna: "a0522d",
|
|
11
|
+
brown: "a52a2a",
|
|
12
|
+
greenyellow: "adff2f",
|
|
13
|
+
yellowgreen: "9acd32",
|
|
14
|
+
forestgreen: "00af50",
|
|
15
|
+
green: "008000",
|
|
16
|
+
darkgreen: "006400",
|
|
17
|
+
lightcyan: "e0ffff",
|
|
18
|
+
skyblue: "87ceeb",
|
|
19
|
+
steelblue: "4682b4",
|
|
20
|
+
blue: "0000ff",
|
|
21
|
+
darkblue: "00008b",
|
|
22
|
+
mistyrose: "ffe4e1",
|
|
23
|
+
hotpink: "ff69b4",
|
|
24
|
+
magenta: "ff00ff",
|
|
25
|
+
purple: "800080",
|
|
26
|
+
indigo: "4b0082",
|
|
27
|
+
whitesmoke: "f5f5f5",
|
|
28
|
+
silver: "c0c0c0",
|
|
29
|
+
darkgray: "a9a9a9",
|
|
30
|
+
grey: "7a7a7a",
|
|
31
|
+
black: "000000",
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// Some colors are too bright to be selected randomnly, but in some cases user may want to have it.
|
|
35
|
+
const tooBrightColors = [
|
|
36
|
+
"bisque",
|
|
37
|
+
"khaki",
|
|
38
|
+
"greenyellow",
|
|
39
|
+
"lightcyan",
|
|
40
|
+
"mistyrose",
|
|
41
|
+
"whitesmoke",
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
const validColors = Object.entries(colors).filter(
|
|
45
|
+
([name]) => !tooBrightColors.includes(name)
|
|
46
|
+
);
|
|
47
|
+
function getRandomHexColor() {
|
|
48
|
+
const index = Math.floor(Math.random() * validColors.length);
|
|
49
|
+
|
|
50
|
+
return validColors[index][1];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html
|
|
54
|
+
// https://www.w3.org/TR/AERT/#color-contrast
|
|
55
|
+
function adjustTextColor(bgColor, lightTextColor, darkTextColor) {
|
|
56
|
+
const color = bgColor.charAt(0) === "#" ? bgColor.substring(1, 7) : bgColor;
|
|
57
|
+
// hex to R
|
|
58
|
+
const r = parseInt(color.substring(0, 2), 16);
|
|
59
|
+
// hex to G
|
|
60
|
+
const g = parseInt(color.substring(2, 4), 16);
|
|
61
|
+
// hex to B
|
|
62
|
+
const b = parseInt(color.substring(4, 6), 16);
|
|
63
|
+
return r * 0.299 + g * 0.587 + b * 0.114 > 186
|
|
64
|
+
? darkTextColor
|
|
65
|
+
: lightTextColor;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function adjustBorderColor(color, amount) {
|
|
69
|
+
return (
|
|
70
|
+
"#" +
|
|
71
|
+
color
|
|
72
|
+
.replace(/^#/, "")
|
|
73
|
+
.replace(/../g, color =>
|
|
74
|
+
(
|
|
75
|
+
"0" +
|
|
76
|
+
Math.min(255, Math.max(0, parseInt(color, 16) + amount)).toString(16)
|
|
77
|
+
).slice(-2)
|
|
78
|
+
)
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { colors, getRandomHexColor, adjustTextColor, adjustBorderColor };
|