@bimdata/design-system 1.4.0-rc.6 → 1.4.0-rc.61

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.
Files changed (84) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +4 -0
  3. package/components.js +2 -1
  4. package/dist/colors.js +82 -0
  5. package/dist/css/design-system.css +137 -137
  6. package/dist/js/BIMDataComponents/BIMDataBigSpinner.js +1 -1
  7. package/dist/js/BIMDataComponents/BIMDataButton.js +1 -1
  8. package/dist/js/BIMDataComponents/BIMDataCard.js +1 -1
  9. package/dist/js/BIMDataComponents/BIMDataCarousel.js +1 -1
  10. package/dist/js/BIMDataComponents/BIMDataCheckbox.js +1 -1
  11. package/dist/js/BIMDataComponents/BIMDataColorSelector.js +1 -1
  12. package/dist/js/BIMDataComponents/BIMDataDatePicker.js +1 -0
  13. package/dist/js/BIMDataComponents/BIMDataDropdownList.js +1 -1
  14. package/dist/js/BIMDataComponents/BIMDataDropdownMenu.js +1 -1
  15. package/dist/js/BIMDataComponents/BIMDataFileIcon.js +1 -1
  16. package/dist/js/BIMDataComponents/BIMDataIcon.js +1 -1
  17. package/dist/js/BIMDataComponents/BIMDataIllustration.js +1 -1
  18. package/dist/js/BIMDataComponents/BIMDataInput.js +1 -1
  19. package/dist/js/BIMDataComponents/BIMDataLoading.js +1 -1
  20. package/dist/js/BIMDataComponents/BIMDataModelPreview.js +1 -0
  21. package/dist/js/BIMDataComponents/BIMDataMultiplePieChart.js +1 -1
  22. package/dist/js/BIMDataComponents/BIMDataNavigation.js +1 -1
  23. package/dist/js/BIMDataComponents/BIMDataPaginatedList.js +1 -1
  24. package/dist/js/BIMDataComponents/BIMDataPieSpinner.js +1 -1
  25. package/dist/js/BIMDataComponents/BIMDataRadio.js +1 -1
  26. package/dist/js/BIMDataComponents/BIMDataResponsiveGrid.js +1 -1
  27. package/dist/js/BIMDataComponents/BIMDataSafeZoneModal.js +1 -1
  28. package/dist/js/BIMDataComponents/BIMDataSearch.js +1 -1
  29. package/dist/js/BIMDataComponents/BIMDataSearchAutocomplete.js +1 -0
  30. package/dist/js/BIMDataComponents/BIMDataSelect.js +1 -1
  31. package/dist/js/BIMDataComponents/BIMDataSimplePieChart.js +1 -1
  32. package/dist/js/BIMDataComponents/BIMDataSpinner.js +1 -1
  33. package/dist/js/BIMDataComponents/BIMDataTable.js +1 -1
  34. package/dist/js/BIMDataComponents/BIMDataTabs.js +1 -1
  35. package/dist/js/BIMDataComponents/BIMDataText.js +1 -1
  36. package/dist/js/BIMDataComponents/BIMDataTextarea.js +1 -1
  37. package/dist/js/BIMDataComponents/BIMDataTextbox.js +1 -1
  38. package/dist/js/BIMDataComponents/BIMDataToggle.js +1 -1
  39. package/dist/js/BIMDataComponents/BIMDataTooltip.js +1 -1
  40. package/dist/js/BIMDataComponents/index.js +1 -1
  41. package/dist/js/BIMDataComponents/vue3/BIMDataBigSpinner.js +1 -1
  42. package/dist/js/BIMDataComponents/vue3/BIMDataButton.js +1 -1
  43. package/dist/js/BIMDataComponents/vue3/BIMDataCard.js +1 -1
  44. package/dist/js/BIMDataComponents/vue3/BIMDataCarousel.js +1 -1
  45. package/dist/js/BIMDataComponents/vue3/BIMDataCheckbox.js +1 -1
  46. package/dist/js/BIMDataComponents/vue3/BIMDataColorSelector.js +1 -1
  47. package/dist/js/BIMDataComponents/vue3/BIMDataDatePicker.js +1 -0
  48. package/dist/js/BIMDataComponents/vue3/BIMDataDropdownList.js +1 -1
  49. package/dist/js/BIMDataComponents/vue3/BIMDataDropdownMenu.js +1 -1
  50. package/dist/js/BIMDataComponents/vue3/BIMDataFileIcon.js +1 -1
  51. package/dist/js/BIMDataComponents/vue3/BIMDataIcon.js +1 -1
  52. package/dist/js/BIMDataComponents/vue3/BIMDataIllustration.js +1 -1
  53. package/dist/js/BIMDataComponents/vue3/BIMDataInput.js +1 -1
  54. package/dist/js/BIMDataComponents/vue3/BIMDataLoading.js +1 -1
  55. package/dist/js/BIMDataComponents/vue3/BIMDataModelPreview.js +1 -0
  56. package/dist/js/BIMDataComponents/vue3/BIMDataMultiplePieChart.js +1 -1
  57. package/dist/js/BIMDataComponents/vue3/BIMDataNavigation.js +1 -1
  58. package/dist/js/BIMDataComponents/vue3/BIMDataPaginatedList.js +1 -1
  59. package/dist/js/BIMDataComponents/vue3/BIMDataRadio.js +1 -1
  60. package/dist/js/BIMDataComponents/vue3/BIMDataSafeZoneModal.js +1 -1
  61. package/dist/js/BIMDataComponents/vue3/BIMDataSearch.js +1 -1
  62. package/dist/js/BIMDataComponents/vue3/BIMDataSearchAutocomplete.js +1 -0
  63. package/dist/js/BIMDataComponents/vue3/BIMDataSelect.js +1 -1
  64. package/dist/js/BIMDataComponents/vue3/BIMDataSimplePieChart.js +1 -1
  65. package/dist/js/BIMDataComponents/vue3/BIMDataSpinner.js +1 -1
  66. package/dist/js/BIMDataComponents/vue3/BIMDataTable.js +1 -1
  67. package/dist/js/BIMDataComponents/vue3/BIMDataTabs.js +1 -1
  68. package/dist/js/BIMDataComponents/vue3/BIMDataText.js +1 -1
  69. package/dist/js/BIMDataComponents/vue3/BIMDataTextarea.js +1 -1
  70. package/dist/js/BIMDataComponents/vue3/BIMDataTextbox.js +1 -1
  71. package/dist/js/BIMDataComponents/vue3/BIMDataToggle.js +1 -1
  72. package/dist/js/BIMDataComponents/vue3/BIMDataTooltip.js +1 -1
  73. package/dist/js/BIMDataComponents/vue3/index.js +1 -1
  74. package/dist/js/BIMDataDirectives/index.js +1 -1
  75. package/dist/js/BIMDataDirectives/vue3/index.js +1 -1
  76. package/dist/js/BIMDataSmartComponents/BIMDataFileManager.js +1 -1
  77. package/dist/js/BIMDataSmartComponents/vue3/BIMDataFileManager.js +1 -0
  78. package/dist/scss/_BIMDataTransitions.scss +26 -0
  79. package/dist/scss/_BIMDataTypography.scss +0 -0
  80. package/dist/scss/elements/_BIMDataSubmenus.scss +2 -1
  81. package/dist/scss/mixins/_font-size.scss +2 -2
  82. package/package.json +31 -29
  83. package/dist/js/BIMDataComponents/BIMDataGuidedTour.js +0 -1
  84. package/dist/js/BIMDataComponents/vue3/BIMDataGuidedTour.js +0 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 BIMData.io
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -94,3 +94,7 @@ The branches on which it is possible to publish are the following:
94
94
 
95
95
  For Merging this branches together, and to avoid any unexpected behavior, use `--no-ff` git merge option.
96
96
  After deploying a new latest tag with master branch, merge master into develop to update `package.json` and `CHANGELOG.md`.
97
+
98
+ ## License
99
+
100
+ BIMData Design System is published under the term of MIT License (see [LICENSE](./LICENSE)).
package/components.js CHANGED
@@ -4,10 +4,10 @@ export { default as BIMDataCard } from "./dist/js/BIMDataComponents/BIMDataCard.
4
4
  export { default as BIMDataCarousel } from "./dist/js/BIMDataComponents/BIMDataCarousel.js";
5
5
  export { default as BIMDataCheckbox } from "./dist/js/BIMDataComponents/BIMDataCheckbox.js";
6
6
  export { default as BIMDataColorSelector } from "./dist/js/BIMDataComponents/BIMDataColorSelector.js";
7
+ export { default as BIMDataDatePicker } from "./dist/js/BIMDataComponents/BIMDataDatePicker.js";
7
8
  export { default as BIMDataDropdownList } from "./dist/js/BIMDataComponents/BIMDataDropdownList.js";
8
9
  export { default as BIMDataDropdownMenu } from "./dist/js/BIMDataComponents/BIMDataDropdownMenu.js";
9
10
  export { default as BIMDataFileIcon } from "./dist/js/BIMDataComponents/BIMDataFileIcon.js";
10
- export { default as BIMDataGuidedTour } from "./dist/js/BIMDataComponents/BIMDataGuidedTour.js";
11
11
  export { default as BIMDataIcon } from "./dist/js/BIMDataComponents/BIMDataIcon.js";
12
12
  export { default as BIMDataIllustration } from "./dist/js/BIMDataComponents/BIMDataIllustration.js";
13
13
  export { default as BIMDataInput } from "./dist/js/BIMDataComponents/BIMDataInput.js";
@@ -20,6 +20,7 @@ export { default as BIMDataRadio } from "./dist/js/BIMDataComponents/BIMDataRadi
20
20
  export { default as BIMDataResponsiveGrid } from "./dist/js/BIMDataComponents/BIMDataResponsiveGrid.js";
21
21
  export { default as BIMDataSafeZoneModal } from "./dist/js/BIMDataComponents/BIMDataSafeZoneModal.js";
22
22
  export { default as BIMDataSearch } from "./dist/js/BIMDataComponents/BIMDataSearch.js";
23
+ export { default as BIMDataSearchAutocomplete } from "./dist/js/BIMDataComponents/BIMDataSearchAutocomplete.js";
23
24
  export { default as BIMDataSelect } from "./dist/js/BIMDataComponents/BIMDataSelect.js";
24
25
  export { default as BIMDataSimplePieChart } from "./dist/js/BIMDataComponents/BIMDataSimplePieChart.js";
25
26
  export { default as BIMDataSpinner } from "./dist/js/BIMDataComponents/BIMDataSpinner.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 };