@bimdata/design-system 3.0.0-beta.4 → 3.0.0-beta.41

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 (122) hide show
  1. package/package.json +17 -14
  2. package/src/BIMDataComponents/BIMDataAvatar/BIMDataAvatar.vue +6 -0
  3. package/src/BIMDataComponents/BIMDataButton/BIMDataButton.css +274 -55
  4. package/src/BIMDataComponents/BIMDataCheckbox/BIMDataCheckbox.css +8 -9
  5. package/src/BIMDataComponents/BIMDataCheckbox/BIMDataCheckbox.vue +21 -1
  6. package/src/BIMDataComponents/BIMDataDatePicker/{_BIMDataDatePicker.scss → BIMDataDatePicker.css} +141 -53
  7. package/src/BIMDataComponents/BIMDataDatePicker/BIMDataDatePicker.vue +13 -4
  8. package/src/BIMDataComponents/BIMDataDatePicker/components/DateInput.vue +11 -2
  9. package/src/BIMDataComponents/BIMDataDatePicker/components/PickerCells.vue +2 -2
  10. package/src/BIMDataComponents/BIMDataDropdownMenu/BIMDataDropdownMenu.css +1 -1
  11. package/src/BIMDataComponents/BIMDataIcon/BIMDataIcon.css +18 -0
  12. package/src/BIMDataComponents/BIMDataIcon/BIMDataIcon.vue +10 -0
  13. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconAccountSettings.vue +19 -0
  14. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconAddFavorite.vue +19 -0
  15. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconArchive2.vue +19 -0
  16. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconAssigned.vue +19 -0
  17. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconAttachFile.vue +19 -0
  18. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconAuthor.vue +19 -0
  19. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconCreateComment.vue +20 -0
  20. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconCreationDate.vue +20 -0
  21. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconDescription.vue +20 -0
  22. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconDiscussions.vue +20 -0
  23. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconDueDate.vue +20 -0
  24. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconFavoriteFill.vue +20 -0
  25. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconFavoriteStroke.vue +20 -0
  26. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconFile.vue +20 -0
  27. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconFilter.vue +20 -0
  28. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconHideGraph.vue +20 -0
  29. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconHideGraphRound.vue +19 -0
  30. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconIndex.vue +20 -0
  31. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconIssues.vue +20 -0
  32. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconLanguage.vue +20 -0
  33. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconMarketplace.vue +20 -0
  34. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconNotifications.vue +19 -0
  35. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconOffline.vue +20 -0
  36. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconPhase.vue +19 -0
  37. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconPriority.vue +19 -0
  38. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconQuit.vue +19 -0
  39. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconShowGraph.vue +19 -0
  40. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconShowGraphRound.vue +19 -0
  41. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconSort.vue +19 -0
  42. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconStatut copy.vue +19 -0
  43. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconStatut.vue +19 -0
  44. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconTagStroke.vue +19 -0
  45. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconType.vue +19 -0
  46. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconUnarchive2.vue +19 -0
  47. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js +33 -0
  48. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/AccountSettings.vue +3 -0
  49. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/AddFavorite.vue +15 -0
  50. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Archive2.vue +3 -0
  51. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Assigned.vue +3 -0
  52. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/AttachFile.vue +5 -0
  53. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Author.vue +3 -0
  54. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/CreateComment.vue +3 -0
  55. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/CreationDate.vue +3 -0
  56. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/DeniedFile.vue +1 -1
  57. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Description.vue +3 -0
  58. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Discussions.vue +5 -0
  59. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/DueDate.vue +3 -0
  60. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/FavoriteFill.vue +3 -0
  61. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/FavoriteStroke.vue +3 -0
  62. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/File.vue +3 -0
  63. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Filter.vue +3 -0
  64. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/HideGraph.vue +6 -0
  65. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/HideGraphRound.vue +8 -0
  66. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Index.vue +3 -0
  67. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Issues.vue +5 -0
  68. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Language.vue +3 -0
  69. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Logout.vue +1 -5
  70. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Marketplace.vue +3 -0
  71. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Notifications.vue +3 -0
  72. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Offline.vue +3 -0
  73. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Phase.vue +3 -0
  74. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/PieGraph.vue +0 -1
  75. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Priority.vue +3 -0
  76. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Quit.vue +3 -0
  77. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/ShowGraph.vue +3 -0
  78. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/ShowGraphRound.vue +6 -0
  79. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Sort.vue +3 -0
  80. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Statut.vue +3 -0
  81. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/TagStroke.vue +10 -0
  82. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Translate.vue +2 -2
  83. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Type.vue +3 -0
  84. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Unarchive2.vue +6 -0
  85. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/ValidatedFile.vue +1 -1
  86. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/index.js +65 -1
  87. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/BcfPolychrome.vue +0 -1
  88. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/CreateWindowPolychrome.vue +0 -1
  89. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/DocInfoPolychrome.vue +0 -2
  90. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FileDwgPolychrome.vue +3 -4
  91. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FileDxfPolychrome.vue +3 -4
  92. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FileIfcPolychrome.vue +3 -4
  93. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FileImagePolychrome.vue +3 -4
  94. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FileJpegPolychrome.vue +4 -5
  95. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FilePdfPolychrome.vue +1 -2
  96. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FilePhotospherePolychrome.vue +3 -4
  97. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FilePlanPolychrome.vue +1 -2
  98. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FilePngPolychrome.vue +3 -4
  99. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FilePointCloudPolychrome.vue +1 -2
  100. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FolderPolychrome.vue +0 -1
  101. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/StructurePolychrome.vue +0 -1
  102. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/Viewer2DPolychrome.vue +0 -1
  103. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/Viewer3DPolychrome.vue +0 -2
  104. package/src/BIMDataComponents/BIMDataIcon/Icon.vue +10 -0
  105. package/src/BIMDataComponents/BIMDataInput/BIMDataInput.css +9 -13
  106. package/src/BIMDataComponents/BIMDataInput/BIMDataInput.vue +50 -30
  107. package/src/BIMDataComponents/BIMDataList/BIMDataList.vue +1 -1
  108. package/src/BIMDataComponents/BIMDataMenu/BIMDataMenu.css +1 -1
  109. package/src/BIMDataComponents/BIMDataSafeZoneInline/BIMDataSafeZoneInline.css +5 -0
  110. package/src/BIMDataComponents/BIMDataSafeZoneInline/BIMDataSafeZoneInline.vue +14 -2
  111. package/src/BIMDataComponents/BIMDataSearch/BIMDataSearch.css +12 -3
  112. package/src/BIMDataComponents/BIMDataSelect/BIMDataSelect.css +118 -5
  113. package/src/BIMDataComponents/BIMDataSelect/BIMDataSelect.vue +9 -3
  114. package/src/BIMDataComponents/BIMDataSelect/BIMDataSelectMulti.vue +58 -8
  115. package/src/BIMDataComponents/BIMDataSelect/BIMDataSelectSingle.vue +97 -88
  116. package/src/BIMDataComponents/BIMDataTabs/BIMDataTabs.vue +5 -3
  117. package/src/BIMDataComponents/BIMDataTree/Node.vue +3 -1
  118. package/src/assets/colors.js +4 -0
  119. package/src/assets/css/utilities/_colors.css +42 -1
  120. package/src/assets/css/utilities/_flex.css +30 -10
  121. package/src/assets/css/variables.css +19 -12
  122. package/src/assets/iconsColors.js +3 -0
@@ -4,26 +4,40 @@
4
4
  :class="{
5
5
  disabled,
6
6
  active: isOpen,
7
- dark: isDark,
8
7
  'not-empty': modelValue.length > 0,
8
+ dark: isDark,
9
9
  [color]: true,
10
10
  }"
11
- :style="{ width }"
11
+ :style="{ width, height, fontSize }"
12
12
  v-clickaway="away"
13
13
  >
14
14
  <div class="bimdata-select__content">
15
15
  <div class="bimdata-select__content__value" @click="toggle">
16
16
  <span class="m-r-6">{{ displayedValue }}</span>
17
- <BIMDataIconChevron size="xxs" :rotate="isOpen ? 90 : 0" />
17
+ <slot name="contentRight">
18
+ <BIMDataIconChevron size="xxs" :rotate="isOpen ? 90 : 0" />
19
+ </slot>
18
20
  </div>
19
- <label class="bimdata-select__content__label">
21
+ <label v-if="showLabel" class="bimdata-select__content__label">
22
+ <slot name="labelLeft"></slot>
20
23
  {{ label }}
24
+ <slot name="labelRight"></slot>
25
+ </label>
26
+ <label
27
+ v-if="shouldDisplayPlaceholder"
28
+ class="bimdata-select__content__placeholder"
29
+ >
30
+ <slot name="placeholder">{{ placeholder }}</slot>
21
31
  </label>
22
32
  <span class="bimdata-select__content__underline"></span>
23
33
  </div>
24
34
 
25
35
  <transition name="slide-fade-down">
26
- <div v-show="!disabled && isOpen" class="bimdata-select__option-list">
36
+ <div
37
+ v-show="!disabled && isOpen"
38
+ class="bimdata-select__option-list"
39
+ :class="{ 'rounded-element': isSelectedAndHoveredElementsRounded }"
40
+ >
27
41
  <BIMDataSearch
28
42
  v-if="search"
29
43
  width="calc(100% - 12px)"
@@ -47,6 +61,7 @@
47
61
  'option-group': isOptionGroup(option),
48
62
  }"
49
63
  @click="onOptionClick(option)"
64
+ :style="{ fontSize }"
50
65
  >
51
66
  <template v-if="isOptionGroup(option)">
52
67
  {{ optionLabel(option) }}
@@ -56,6 +71,8 @@
56
71
  :modelValue="isSelected(option)"
57
72
  :disabled="isDisabled(option)"
58
73
  :text="optionLabel(option)"
74
+ :style="{ fontSize }"
75
+ :fontSize="fontSize"
59
76
  ></BIMDataCheckbox>
60
77
  </li>
61
78
  </ul>
@@ -93,7 +110,16 @@ export default {
93
110
  type: String,
94
111
  default: "default",
95
112
  validator: value =>
96
- ["default", "primary", "secondary", "tertiary", "tertiary-light", "quaternary"].includes(value),
113
+ [
114
+ "default",
115
+ "primary",
116
+ "secondary",
117
+ "tertiary",
118
+ "tertiary-light",
119
+ "tertiary-darker",
120
+ "quaternary",
121
+ "white",
122
+ ].includes(value),
97
123
  },
98
124
  disabled: {
99
125
  type: Boolean,
@@ -109,6 +135,10 @@ export default {
109
135
  nullLabel: {
110
136
  type: String,
111
137
  },
138
+ showLabel: {
139
+ type: Boolean,
140
+ default: true,
141
+ },
112
142
  options: {
113
143
  type: Array,
114
144
  default: () => [],
@@ -119,6 +149,10 @@ export default {
119
149
  optionLabelKey: {
120
150
  type: String,
121
151
  },
152
+ placeholder: {
153
+ type: String,
154
+ default: null,
155
+ },
122
156
  resetOnLeave: {
123
157
  type: Boolean,
124
158
  default: false,
@@ -131,16 +165,29 @@ export default {
131
165
  type: String,
132
166
  default: "primary",
133
167
  validator: value =>
134
- ["primary", "secondary", "tertiary", "quaternary"].includes(value),
168
+ [
169
+ "primary",
170
+ "secondary",
171
+ "tertiary",
172
+ "quaternary",
173
+ "quaternary-light",
174
+ ].includes(value),
135
175
  },
136
176
  searchPlaceholder: {
137
177
  type: String,
138
178
  default: "Search",
139
179
  },
140
-
141
180
  width: {
142
181
  type: [String, Number],
143
182
  },
183
+ height: {
184
+ type: [String, Number],
185
+ },
186
+ fontSize: [String, Number],
187
+ isSelectedAndHoveredElementsRounded: {
188
+ type: Boolean,
189
+ default: false,
190
+ },
144
191
  },
145
192
  emits: ["update:modelValue"],
146
193
  data() {
@@ -150,6 +197,9 @@ export default {
150
197
  };
151
198
  },
152
199
  computed: {
200
+ shouldDisplayPlaceholder() {
201
+ return !this.showLabel && this.modelValue.length === 0 && !this.isOpen;
202
+ },
153
203
  displayedValue() {
154
204
  return this.modelValue.map(this.optionLabel).join(", ");
155
205
  },
@@ -4,25 +4,41 @@
4
4
  :class="{
5
5
  disabled,
6
6
  active: isOpen,
7
- 'not-empty': modelValue !== undefined && modelValue !== null,
7
+ 'not-empty': isModelValueNotEmpty,
8
8
  dark: isDark,
9
9
  [color]: true,
10
10
  }"
11
- :style="{ width }"
11
+ :style="{ width, height, fontSize }"
12
12
  v-clickaway="away"
13
13
  >
14
14
  <div class="bimdata-select__content">
15
15
  <div class="bimdata-select__content__value" @click="toggle">
16
16
  <span class="m-r-6">{{ displayedValue }}</span>
17
- <BIMDataIconChevron size="xxs" :rotate="isOpen ? 90 : 0" />
17
+ <slot name="contentRight">
18
+ <BIMDataIconChevron size="xxs" :rotate="isOpen ? 90 : 0" />
19
+ </slot>
18
20
  </div>
19
- <label v-if="isLabel" class="bimdata-select__content__label">
21
+
22
+ <label v-if="showLabel" class="bimdata-select__content__label">
23
+ <slot name="labelLeft"></slot>
20
24
  {{ label }}
21
- </label>
25
+ <slot name="labelRight"></slot>
26
+ </label>
27
+
28
+ <label
29
+ v-if="shouldDisplayPlaceholder"
30
+ class="bimdata-select__content__placeholder"
31
+ >
32
+ <slot name="placeholder">{{ placeholder }}</slot>
33
+ </label>
22
34
  </div>
23
35
 
24
36
  <transition name="slide-fade-down">
25
- <div v-show="!disabled && isOpen" class="bimdata-select__option-list">
37
+ <div
38
+ v-show="!disabled && isOpen"
39
+ class="bimdata-select__option-list"
40
+ :class="{ 'rounded-element': isSelectedAndHoveredElementsRounded }"
41
+ >
26
42
  <BIMDataSearch
27
43
  v-if="search"
28
44
  width="calc(100% - 12px)"
@@ -39,20 +55,22 @@
39
55
  <li
40
56
  v-if="nullValue"
41
57
  class="bimdata-select__option-list__entry"
42
- @click="onNullValueClick()"
58
+ @click="selectOption(null)"
59
+ :style="{ fontSize }"
43
60
  >
44
61
  {{ nullLabel || "None" }}
45
62
  </li>
46
63
  <li
47
64
  class="bimdata-select__option-list__entry"
48
- v-for="(option, index) of filteredOptions"
65
+ v-for="(option, index) in filteredOptions"
49
66
  :key="index"
50
67
  :class="{
51
68
  selected: isSelected(option),
52
69
  disabled: isDisabled(option),
53
70
  'option-group': isOptionGroup(option),
54
71
  }"
55
- @click="onOptionClick(option)"
72
+ @click="selectOption(option)"
73
+ :style="{ fontSize }"
56
74
  >
57
75
  {{ optionLabel(option) }}
58
76
  </li>
@@ -64,7 +82,6 @@
64
82
 
65
83
  <script>
66
84
  import clickaway from "../../BIMDataDirectives/click-away.js";
67
- // Components
68
85
  import BIMDataIconChevron from "../BIMDataIcon/BIMDataIconStandalone/BIMDataIconChevron.vue";
69
86
 
70
87
  export default {
@@ -85,14 +102,18 @@ export default {
85
102
  },
86
103
  },
87
104
  props: {
88
- width: {
89
- type: [String, Number],
90
- },
105
+ width: [String, Number],
106
+ height: [String, Number],
107
+ fontSize: [String, Number],
91
108
  label: {
92
109
  type: String,
93
110
  default: null,
94
111
  },
95
- isLabel: {
112
+ placeholder: {
113
+ type: String,
114
+ default: null,
115
+ },
116
+ showLabel: {
96
117
  type: Boolean,
97
118
  default: true,
98
119
  },
@@ -100,22 +121,14 @@ export default {
100
121
  type: Array,
101
122
  default: () => [],
102
123
  },
103
- optionKey: {
104
- type: String,
105
- },
106
- optionLabelKey: {
107
- type: String,
108
- },
109
- modelValue: {
110
- type: [String, Object],
111
- },
124
+ optionKey: String,
125
+ optionLabelKey: String,
126
+ modelValue: [String, Object],
112
127
  nullValue: {
113
128
  type: Boolean,
114
129
  default: false,
115
130
  },
116
- nullLabel: {
117
- type: String,
118
- },
131
+ nullLabel: String,
119
132
  disabled: {
120
133
  type: Boolean,
121
134
  default: false,
@@ -136,13 +149,32 @@ export default {
136
149
  type: String,
137
150
  default: "default",
138
151
  validator: value =>
139
- ["default", "primary", "secondary", "tertiary", "tertiary-light", "quaternary"].includes(value),
152
+ [
153
+ "default",
154
+ "primary",
155
+ "secondary",
156
+ "tertiary",
157
+ "tertiary-light",
158
+ "tertiary-darker",
159
+ "quaternary",
160
+ "white",
161
+ ].includes(value),
140
162
  },
141
163
  searchColor: {
142
164
  type: String,
143
165
  default: "primary",
144
166
  validator: value =>
145
- ["primary", "secondary", "tertiary", "quaternary"].includes(value),
167
+ [
168
+ "primary",
169
+ "secondary",
170
+ "tertiary",
171
+ "quaternary",
172
+ "quaternary-light",
173
+ ].includes(value),
174
+ },
175
+ isSelectedAndHoveredElementsRounded: {
176
+ type: Boolean,
177
+ default: false,
146
178
  },
147
179
  },
148
180
  emits: ["update:modelValue"],
@@ -153,93 +185,70 @@ export default {
153
185
  };
154
186
  },
155
187
  computed: {
188
+ isModelValueNotEmpty() {
189
+ return this.modelValue != null;
190
+ },
191
+
192
+ shouldDisplayPlaceholder() {
193
+ return !this.showLabel && this.modelValue == null && !this.isOpen;
194
+ },
195
+
156
196
  displayedValue() {
157
197
  return this.optionLabel(this.modelValue);
158
198
  },
199
+
159
200
  filteredOptions() {
160
- if (this.searchText === "") {
161
- return this.options;
162
- } else {
163
- const lowerCaseSearchText = this.searchText.toLowerCase();
164
- if (this.optionLabelKey) {
165
- return this.options.filter(option =>
166
- option[this.optionLabelKey]
167
- .toLowerCase()
168
- .includes(lowerCaseSearchText),
169
- );
170
- }
171
- if (this.optionKey) {
172
- return this.options.filter(
173
- option =>
174
- option.optionGroup ||
175
- option[this.optionKey]
176
- .toLowerCase()
177
- .includes(lowerCaseSearchText),
178
- );
179
- } else {
180
- return this.options.filter(option =>
181
- option.toLowerCase().includes(lowerCaseSearchText),
182
- );
183
- }
184
- }
201
+ const lowerCaseSearchText = this.searchText.toLowerCase();
202
+ return this.options.filter(option => {
203
+ const label = this.optionLabel(option).toLowerCase();
204
+ return label.includes(lowerCaseSearchText);
205
+ });
185
206
  },
207
+
186
208
  isDark() {
187
209
  return this.darkThemeRef;
188
210
  },
189
211
  },
190
212
  methods: {
191
213
  toggle() {
192
- if (!this.disabled) {
193
- this.isOpen = !this.isOpen;
194
- }
214
+ if (!this.disabled) this.isOpen = !this.isOpen;
195
215
  },
216
+
196
217
  optionValue(option) {
197
- if (this.optionKey && option) {
198
- return option[this.optionKey];
199
- }
200
- return option;
218
+ return this.optionKey ? option[this.optionKey] : option;
201
219
  },
220
+
202
221
  optionLabel(option) {
203
- if (this.nullLabel && option == null) {
204
- return this.nullLabel;
205
- }
206
- if (this.optionLabelKey && option) {
207
- return option[this.optionLabelKey];
208
- }
209
- if (this.optionKey && option) {
210
- return option[this.optionKey];
211
- }
212
- return option;
222
+ if (option == null) return this.nullLabel ?? "";
223
+ if (typeof option !== "object") return option;
224
+ return this.optionLabelKey && option[this.optionLabelKey] != null
225
+ ? option[this.optionLabelKey]
226
+ : "";
213
227
  },
228
+
214
229
  isSelected(option) {
215
- const value = this.optionValue(option);
216
- const currentValue = this.optionValue(this.modelValue);
217
- return currentValue === value;
230
+ return this.optionValue(option) === this.optionValue(this.modelValue);
218
231
  },
232
+
219
233
  isDisabled(option) {
220
- return this.optionKey && option && option.disabled;
234
+ return option && option.disabled;
221
235
  },
236
+
222
237
  isOptionGroup(option) {
223
- return this.optionKey && option && option.optionGroup;
238
+ return option && option.optionGroup;
224
239
  },
240
+
225
241
  resetSearch() {
226
- if (this.clearSearchOnLeave) {
227
- this.searchText = "";
228
- }
229
- },
230
- onOptionClick(option) {
231
- if (this.optionKey && (option.disabled || option.optionGroup)) {
232
- return;
233
- }
234
- this.$emit("update:modelValue", option);
235
- this.resetSearch();
236
- this.isOpen = false;
242
+ if (this.clearSearchOnLeave) this.searchText = "";
237
243
  },
238
- onNullValueClick() {
239
- this.$emit("update:modelValue", null);
244
+
245
+ selectOption(option) {
246
+ if (option && (option.disabled || option.optionGroup)) return;
247
+ this.$emit("update:modelValue", option);
240
248
  this.resetSearch();
241
249
  this.isOpen = false;
242
250
  },
251
+
243
252
  away() {
244
253
  this.isOpen = false;
245
254
  this.resetSearch();
@@ -132,9 +132,11 @@ export default {
132
132
  this.$refs.container.scrollTo(this.scrollValues[this.displayIndex], 0);
133
133
  },
134
134
  onTabClick(tab) {
135
- this.activeTab = tab;
136
- this.$emit("tab-click", tab);
137
- this.$emit("tab-selected", tab);
135
+ if (!tab.disabled) {
136
+ this.activeTab = tab;
137
+ this.$emit("tab-click", tab);
138
+ this.$emit("tab-selected", tab);
139
+ }
138
140
  },
139
141
  _setSelected(value) {
140
142
  if (typeof value === "number" && value >= 0 && value < this.tabs.length) {
@@ -22,7 +22,7 @@
22
22
  ></div>
23
23
  <div
24
24
  class="bimdata-tree__node__content"
25
- :style="`padding-left: calc(var(--spacing-unit) * 2 * ${depth});`"
25
+ :style="`padding-left: calc(var(--indent-spacing) * ${depth});`"
26
26
  >
27
27
  <div class="bimdata-tree__node__content__arrow" @mousedown.stop>
28
28
  <div
@@ -206,6 +206,8 @@ export default Node;
206
206
 
207
207
  <style scoped lang="scss">
208
208
  .bimdata-tree__node {
209
+ --indent-spacing: calc(var(--spacing-unit) * 2);
210
+
209
211
  height: 32px;
210
212
  display: flex;
211
213
  align-items: center;
@@ -5,6 +5,8 @@ export default Object.freeze([
5
5
  "secondary",
6
6
  "tertiary",
7
7
  "quaternary",
8
+ "quaternary-light",
9
+ "quaternary-lighter",
8
10
  "granite",
9
11
  "silver",
10
12
  "high",
@@ -12,4 +14,6 @@ export default Object.freeze([
12
14
  "warning",
13
15
  "info",
14
16
  "white",
17
+ "action-high",
18
+ "action-medium",
15
19
  ]);
@@ -50,6 +50,14 @@
50
50
  background-color: var(--color-neutral);
51
51
  }
52
52
 
53
+ /* background ACTION COLORS */
54
+ .bg-action-high {
55
+ background-color: var(--color-action-high);
56
+ }
57
+ .bg-color-action-medium {
58
+ background-color: var(--color-action-medium);
59
+ }
60
+
53
61
  /* color BRAND COLORS */
54
62
  .color-primary {
55
63
  color: var(--color-primary);
@@ -101,6 +109,14 @@
101
109
  color: var(--color-neutral);
102
110
  }
103
111
 
112
+ /* color ACTION COLORS */
113
+ .color-action-high {
114
+ color: var(--color-action-high);
115
+ }
116
+ .color-action-medium {
117
+ color: var(--color-action-medium);
118
+ }
119
+
104
120
  /* fill BRAND COLORS */
105
121
  .fill-primary {
106
122
  fill: var(--color-primary);
@@ -152,6 +168,14 @@
152
168
  fill: var(--color-neutral);
153
169
  }
154
170
 
171
+ /* fill ACTION COLORS */
172
+ .fill-action-high {
173
+ fill: var(--color-action-high);
174
+ }
175
+ .fill-action-medium {
176
+ fill: var(--color-action-medium);
177
+ }
178
+
155
179
  /* stroke BRAND COLORS */
156
180
  .stroke-primary {
157
181
  fill: transparent;
@@ -217,4 +241,21 @@
217
241
  fill: transparent;
218
242
  stroke: var(--color-neutral);
219
243
  }
220
- }
244
+
245
+ /* stroke ACTION COLORS */
246
+ .stroke-action-high {
247
+ stroke: var(--color-action-high);
248
+ }
249
+ .stroke-action-medium {
250
+ stroke: var(--color-action-medium);
251
+ }
252
+
253
+ .dark {
254
+ .fill-white {
255
+ fill: var(--color-quaternary);
256
+ }
257
+ .fill-primary {
258
+ fill: var(--color-quaternary-lighter);
259
+ }
260
+ }
261
+ }
@@ -3,16 +3,16 @@
3
3
  display: flex;
4
4
  }
5
5
 
6
- /* flex direction */
7
- .flex-row{
8
- flex-direction: row;
9
- }
10
- .flex-col{
11
- flex-direction: column;
12
- }
13
- .flex-wrap{
14
- flex-wrap: wrap;
15
- }
6
+ /* flex direction */
7
+ .flex-row{
8
+ flex-direction: row;
9
+ }
10
+ .flex-col{
11
+ flex-direction: column;
12
+ }
13
+ .flex-wrap{
14
+ flex-wrap: wrap;
15
+ }
16
16
 
17
17
  .inline-flex {
18
18
  display: inline-flex;
@@ -62,4 +62,24 @@
62
62
  .justify-around{
63
63
  justify-content: space-around;
64
64
  }
65
+
66
+ /* gap */
67
+ .gap-6 {
68
+ gap: 6px;
69
+ }
70
+ .gap-12 {
71
+ gap: 12px;
72
+ }
73
+ .gap-18 {
74
+ gap: 18px;
75
+ }
76
+ .gap-24 {
77
+ gap: 24px;
78
+ }
79
+ .gap-30 {
80
+ gap: 30px;
81
+ }
82
+ .gap-36 {
83
+ gap: 36px;
84
+ }
65
85
  }
@@ -18,18 +18,19 @@ html {
18
18
  /* --------------------------------------------------------
19
19
  --------------- color TERTIARY & VARIANTS -----------------
20
20
  ----------------------------------------------------------- */
21
- --color-tertiary: rgba(38, 114, 210, 1);
22
- --color-tertiary-dark: rgba(25, 72, 145, 1);
23
- --color-tertiary-light: rgba(51, 117, 221, 1);
24
- --color-tertiary-lighter: rgba(233, 239, 248, 1);
21
+ --color-tertiary: rgba(89, 244, 255, 1);
22
+ --color-tertiary-darker: rgba(20, 38, 48, 1);
23
+ --color-tertiary-dark: rgba(38, 241, 255, 1);
24
+ --color-tertiary-light: rgba(140, 247, 255, 1);
25
+ --color-tertiary-lighter: rgba(242, 254, 255, 1);
25
26
 
26
- /* --------------------------------------------------------
27
+ /* --------------------------------------------------------
27
28
  --------------- color QUATERNARY & VARIANTS -----------------
28
29
  ----------------------------------------------------------- */
29
- --color-quaternary: rgba(36, 47, 75, 1);
30
- --color-quaternary-darker: rgba(31, 34, 44, 1);
31
- --color-quaternary-dark: rgba(31, 37, 53, 1);
32
- --color-quaternary-light: rgba(39, 46, 66, 1);
30
+ --color-quaternary: rgba(28, 32, 44, 1);
31
+ --color-quaternary-darker: rgba(12, 16, 27, 1);
32
+ --color-quaternary-dark: rgba(17, 22, 34, 1);
33
+ --color-quaternary-light: rgba(38, 43, 60, 1);
33
34
  --color-quaternary-lighter: rgba(209, 216, 237, 1);
34
35
 
35
36
  /* --------------------------------------------------------
@@ -76,6 +77,12 @@ html {
76
77
  --color-neutral-light: rgba(51, 117, 221, 1);
77
78
  --color-neutral-lighter: rgba(240, 245, 255, 1);
78
79
 
80
+ /* --------------------------------------------------------
81
+ -------------------- color ACTION --------------------------
82
+ ----------------------------------------------------------- */
83
+ --color-action-high: rgba(255, 30, 67, 1);
84
+ --color-action-medium: rgba(255, 255, 59, 1);
85
+
79
86
  /* color TEXT --------------------------------------------- */
80
87
  --color-text: rgba(47, 55, 74, 1);
81
88
 
@@ -116,8 +123,8 @@ html {
116
123
  --color-ds-dark-pre: #282b34;
117
124
  --color-ds-text: var(--color-primary);
118
125
  --color-ds-border: var(--color-silver);
119
- --color-ds-light-border: rgba(0,0,0,.05);
120
- --color-ds-hover: rgb(240,240,240);
126
+ --color-ds-light-border: rgba(0, 0, 0, 0.05);
127
+ --color-ds-hover: rgb(240, 240, 240);
121
128
  --color-ds-granite-light: var(--color-granite-light);
122
129
  }
123
- }
130
+ }
@@ -7,6 +7,9 @@ export default Object.freeze([
7
7
  "neutral",
8
8
  "primary",
9
9
  "secondary",
10
+ "tertiary",
11
+ "quaternary",
12
+ "quaternary-lighter",
10
13
  "success",
11
14
  "silver",
12
15
  "silver-light",