@bimdata/design-system 3.0.0-beta.1 → 3.0.0-beta.11

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 (73) hide show
  1. package/package.json +10 -10
  2. package/src/BIMDataComponents/BIMDataAvatar/BIMDataAvatar.vue +93 -0
  3. package/src/BIMDataComponents/BIMDataButton/BIMDataButton.css +28 -8
  4. package/src/BIMDataComponents/BIMDataCheckbox/BIMDataCheckbox.vue +9 -8
  5. package/src/BIMDataComponents/BIMDataColorSelector/BIMDataColorSelector.css +8 -0
  6. package/src/BIMDataComponents/BIMDataColorSelector/BIMDataColorSelector.vue +12 -1
  7. package/src/BIMDataComponents/BIMDataDatePicker/{_BIMDataDatePicker.scss → BIMDataDatePicker.css} +138 -53
  8. package/src/BIMDataComponents/BIMDataDatePicker/BIMDataDatePicker.vue +13 -4
  9. package/src/BIMDataComponents/BIMDataDatePicker/components/DateInput.vue +11 -2
  10. package/src/BIMDataComponents/BIMDataDatePicker/components/PickerCells.vue +2 -2
  11. package/src/BIMDataComponents/BIMDataDropdownList/BIMDataDropdownList.vue +18 -12
  12. package/src/BIMDataComponents/BIMDataDropdownMenu/BIMDataDropdownMenu.css +1 -1
  13. package/src/BIMDataComponents/BIMDataDropdownMenu/BIMDataDropdownMenu.vue +10 -5
  14. package/src/BIMDataComponents/BIMDataIcon/BIMDataIcon.vue +10 -0
  15. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/DeniedFile.vue +1 -1
  16. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/PieGraph.vue +0 -1
  17. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Translate.vue +2 -2
  18. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/ValidatedFile.vue +1 -1
  19. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/BcfPolychrome.vue +0 -1
  20. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/CreateWindowPolychrome.vue +0 -1
  21. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/DocInfoPolychrome.vue +0 -2
  22. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FileDwgPolychrome.vue +3 -4
  23. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FileDxfPolychrome.vue +3 -4
  24. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FileIfcPolychrome.vue +3 -4
  25. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FileImagePolychrome.vue +3 -4
  26. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FileJpegPolychrome.vue +4 -5
  27. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FilePdfPolychrome.vue +1 -2
  28. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FilePhotospherePolychrome.vue +3 -4
  29. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FilePlanPolychrome.vue +1 -2
  30. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FilePngPolychrome.vue +3 -4
  31. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FilePointCloudPolychrome.vue +1 -2
  32. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/FolderPolychrome.vue +0 -1
  33. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/StructurePolychrome.vue +0 -1
  34. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/Viewer2DPolychrome.vue +0 -1
  35. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/polychrome/Viewer3DPolychrome.vue +0 -2
  36. package/src/BIMDataComponents/BIMDataIcon/Icon.vue +11 -1
  37. package/src/BIMDataComponents/BIMDataInfobox/BIMDataInfobox.vue +18 -7
  38. package/src/BIMDataComponents/BIMDataInput/BIMDataInput.vue +23 -12
  39. package/src/BIMDataComponents/BIMDataList/BIMDataList.vue +2 -2
  40. package/src/BIMDataComponents/BIMDataMenu/BIMDataMenu.css +59 -1
  41. package/src/BIMDataComponents/BIMDataMenu/BIMDataMenu.vue +14 -4
  42. package/src/BIMDataComponents/BIMDataMenuInline/BIMDataMenuInline.css +5 -0
  43. package/src/BIMDataComponents/BIMDataMenuInline/BIMDataMenuInline.vue +16 -6
  44. package/src/BIMDataComponents/BIMDataNavigation/BIMDataNavigation.vue +17 -10
  45. package/src/BIMDataComponents/BIMDataPaginatedList/BIMDataPaginatedList.vue +20 -8
  46. package/src/BIMDataComponents/BIMDataPagination/{_BIMDataPagination.scss → BIMDataPagination.css} +4 -2
  47. package/src/BIMDataComponents/BIMDataPagination/BIMDataPagination.vue +20 -9
  48. package/src/BIMDataComponents/BIMDataRadio/BIMDataRadio.vue +10 -5
  49. package/src/BIMDataComponents/BIMDataSafeZoneInline/{_BIMDataSafeZoneInline.scss → BIMDataSafeZoneInline.css} +7 -2
  50. package/src/BIMDataComponents/BIMDataSafeZoneInline/BIMDataSafeZoneInline.vue +15 -3
  51. package/src/BIMDataComponents/BIMDataSearch/BIMDataSearch.css +1 -1
  52. package/src/BIMDataComponents/BIMDataSearchAutocomplete/BIMDataSearchAutocomplete.css +28 -0
  53. package/src/BIMDataComponents/BIMDataSearchAutocomplete/BIMDataSearchAutocomplete.vue +10 -1
  54. package/src/BIMDataComponents/BIMDataSelect/BIMDataSelect.css +104 -2
  55. package/src/BIMDataComponents/BIMDataSelect/BIMDataSelectMulti.vue +38 -14
  56. package/src/BIMDataComponents/BIMDataSelect/BIMDataSelectSingle.vue +11 -6
  57. package/src/BIMDataComponents/BIMDataSlider/{_BIMDataSlider.scss → BIMDataSlider.css} +39 -2
  58. package/src/BIMDataComponents/BIMDataSlider/BIMDataSlider.vue +13 -2
  59. package/src/BIMDataComponents/BIMDataTable/{_BIMDataTable.scss → BIMDataTable.css} +22 -4
  60. package/src/BIMDataComponents/BIMDataTable/BIMDataTable.vue +22 -17
  61. package/src/BIMDataComponents/BIMDataTable/column-sorting/ColumnSorting.vue +1 -1
  62. package/src/BIMDataComponents/BIMDataTabs/BIMDataTabs.vue +10 -5
  63. package/src/BIMDataComponents/BIMDataText/BIMDataText.css +10 -0
  64. package/src/BIMDataComponents/BIMDataText/BIMDataText.vue +19 -2
  65. package/src/BIMDataComponents/BIMDataTextarea/{_BIMDataTextarea.scss → BIMDataTextarea.css} +20 -9
  66. package/src/BIMDataComponents/BIMDataTextarea/BIMDataTextarea.vue +13 -1
  67. package/src/BIMDataComponents/BIMDataToggle/{_BIMDataToggle.scss → BIMDataToggle.css} +12 -1
  68. package/src/BIMDataComponents/BIMDataToggle/BIMDataToggle.vue +11 -2
  69. package/src/BIMDataComponents/BIMDataTree/BIMDataTree.vue +2 -2
  70. package/src/BIMDataComponents/index.js +1 -0
  71. package/src/assets/colors.js +1 -0
  72. package/src/assets/css/utilities/_colors.css +9 -0
  73. package/src/assets/iconsColors.js +3 -0
@@ -9,9 +9,10 @@
9
9
  :nextDisabled="isLastPage"
10
10
  :lastDisabled="isLastPage"
11
11
  class="bimdata-pagination"
12
- :class="{ dark }"
13
- :backgroundColor="backgroundColor"
14
- :dark="dark"
12
+ :class="['bimdata-pagination', { dark: isDark && !backgroundColorSet }]"
13
+ :style="{
14
+ backgroundColor: backgroundColorSet ? backgroundColor : undefined,
15
+ }"
15
16
  >
16
17
  <template #left v-if="numberDataElements">
17
18
  {{ firstIndex }} - {{ lastIndex }} of {{ length }}
@@ -19,7 +20,7 @@
19
20
  <span class="bimdata-pagination__item">
20
21
  <BIMDataButton
21
22
  ghost
22
- :color="!dark ? 'default' : 'quaternary'"
23
+ :color="isDark ? 'quaternary' : 'default'"
23
24
  width="21px"
24
25
  height="21px"
25
26
  >
@@ -38,6 +39,12 @@ export default {
38
39
  BIMDataNavigation,
39
40
  BIMDataButton,
40
41
  },
42
+ inject: {
43
+ darkThemeRef: {
44
+ from: "BIMDATA_DESIGN_SYSTEM_DARK_THEME",
45
+ default: () => ({ value: false }),
46
+ },
47
+ },
41
48
  props: {
42
49
  length: {
43
50
  type: Number,
@@ -66,10 +73,6 @@ export default {
66
73
  return value > 0;
67
74
  },
68
75
  },
69
- dark: {
70
- type: Boolean,
71
- default: false,
72
- },
73
76
  },
74
77
  emits: ["pagechanged"],
75
78
  computed: {
@@ -85,6 +88,14 @@ export default {
85
88
  isLastPage() {
86
89
  return this.currentPage === this.totalPages;
87
90
  },
91
+ backgroundColorSet() {
92
+ return (
93
+ !!this.backgroundColor && this.backgroundColor !== "var(--color-white)"
94
+ );
95
+ },
96
+ isDark() {
97
+ return this.darkThemeRef;
98
+ },
88
99
  },
89
100
  methods: {
90
101
  firstPage() {
@@ -103,4 +114,4 @@ export default {
103
114
  };
104
115
  </script>
105
116
 
106
- <style scoped lang="scss" src="./_BIMDataPagination.scss"></style>
117
+ <style scoped src="./BIMDataPagination.css"></style>
@@ -6,7 +6,7 @@
6
6
  disabled,
7
7
  'bimdata-radio--checked': checked,
8
8
  'bimdata-radio--big': big,
9
- dark
9
+ dark: isDark
10
10
  }"
11
11
  :disabled="disabled"
12
12
  @click="onClick"
@@ -28,6 +28,12 @@ export default {
28
28
  prop: "modelValue",
29
29
  event: "update:modelValue",
30
30
  },
31
+ inject: {
32
+ darkThemeRef: {
33
+ from: "BIMDATA_DESIGN_SYSTEM_DARK_THEME",
34
+ default: () => ({ value: false }),
35
+ },
36
+ },
31
37
  props: {
32
38
  big: {
33
39
  type: Boolean,
@@ -45,16 +51,15 @@ export default {
45
51
  type: Boolean,
46
52
  default: false,
47
53
  },
48
- dark: {
49
- type: Boolean,
50
- default: false,
51
- },
52
54
  },
53
55
  emits: ["update:modelValue"],
54
56
  computed: {
55
57
  checked() {
56
58
  return this.modelValue === this.value;
57
59
  },
60
+ isDark() {
61
+ return this.darkThemeRef;
62
+ },
58
63
  },
59
64
  methods: {
60
65
  onClick() {
@@ -6,11 +6,16 @@
6
6
  box-shadow: var(--box-shadow);
7
7
  background-color: var(--color-white);
8
8
 
9
- &__btn-delete {
9
+ & .safe-zone-inline__btn-delete {
10
10
  width: 90px;
11
11
  }
12
12
 
13
- &__btn-close {
13
+ & .safe-zone-inline__btn-close {
14
14
  padding: 0 8px;
15
15
  }
16
+
17
+ &.dark {
18
+ background-color: var(--color-quaternary);
19
+ color: var(--color-quaternary-lighter);
20
+ }
16
21
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="safe-zone-inline">
2
+ <div class="safe-zone-inline" :class="{ dark: isDark }">
3
3
  <BIMDataButton
4
4
  class="safe-zone-inline__btn-delete"
5
5
  color="high"
@@ -14,9 +14,10 @@
14
14
  :style="{ width: '15px', order: reverse ? -1 : 0 }"
15
15
  width="0px"
16
16
  radius
17
+ :color="isDark ? 'quaternary' : 'granite'"
17
18
  @click="$emit('cancel-delete')"
18
19
  >
19
- <BIMDataIconClose size="xxs" color="granite" />
20
+ <BIMDataIconClose size="xxs" :color="isDark ? 'quaternary-lighter' : 'granite'" />
20
21
  </BIMDataButton>
21
22
  </div>
22
23
  </template>
@@ -30,6 +31,12 @@ export default {
30
31
  BIMDataIconClose,
31
32
  BIMDataButton,
32
33
  },
34
+ inject: {
35
+ darkThemeRef: {
36
+ from: "BIMDATA_DESIGN_SYSTEM_DARK_THEME",
37
+ default: () => ({ value: false }),
38
+ },
39
+ },
33
40
  props: {
34
41
  reverse: {
35
42
  type: Boolean,
@@ -37,7 +44,12 @@ export default {
37
44
  },
38
45
  },
39
46
  emits: ["confirm-delete", "cancel-delete"],
47
+ computed: {
48
+ isDark() {
49
+ return this.darkThemeRef;
50
+ },
51
+ }
40
52
  };
41
53
  </script>
42
54
 
43
- <style scoped lang="scss" src="./_BIMDataSafeZoneInline.scss"></style>
55
+ <style scoped src="./BIMDataSafeZoneInline.css"></style>
@@ -56,7 +56,7 @@
56
56
  background-color: var(--color-tertiary-lighter);
57
57
  }
58
58
  &.bimdata-search-bar__quaternary {
59
- background-color: var(--color-quaternary);
59
+ background-color: var(--color-quaternary-dark);
60
60
  color: var(--color-quaternary-lighter);
61
61
  input {
62
62
  color: var(--color-quaternary-lighter);
@@ -142,4 +142,32 @@
142
142
  }
143
143
  }
144
144
  }
145
+ &.bimdata-search-autocomplete--quaternary {
146
+ color: var(--color-quaternary-lighter);
147
+ input {
148
+ background-color: var(--color-quaternary);
149
+ color: var(--color-quaternary-lighter);
150
+ &::placeholder {
151
+ color: var(--color-quaternary-lighter);
152
+ }
153
+ }
154
+ & .bimdata-search-autocomplete__dropdown {
155
+ background-color: var(--color-quaternary);
156
+ color: var(--color-quaternary-lighter);
157
+ .active {
158
+ background-color: color-mix(in srgb, transparent, var(--color-quaternary-lighter) 5%);
159
+ }
160
+ li {
161
+ &:hover {
162
+ background-color: color-mix(in srgb, transparent, var(--color-quaternary-lighter) 8%);
163
+ cursor: pointer;
164
+ }
165
+ }
166
+ & .bimdata-search-autocomplete__dropdown__button {
167
+ &:hover {
168
+ background-color: color-mix(in srgb, transparent, var(--color-quaternary-lighter) 8%);
169
+ }
170
+ }
171
+ }
172
+ }
145
173
  }
@@ -2,7 +2,7 @@
2
2
  <div
3
3
  class="bimdata-search-autocomplete"
4
4
  v-clickaway="away"
5
- :class="[{ open: openResults }, `bimdata-search-autocomplete--${color}`]"
5
+ :class="[{ open: openResults, dark: isDark }, `bimdata-search-autocomplete--${color}`]"
6
6
  >
7
7
  <div class="bimdata-search-autocomplete__input flex items-center">
8
8
  <span class="bimdata-search-icon flex">
@@ -94,6 +94,12 @@ export default {
94
94
  BIMDataTextbox,
95
95
  },
96
96
  directives: { clickaway },
97
+ inject: {
98
+ darkThemeRef: {
99
+ from: "BIMDATA_DESIGN_SYSTEM_DARK_THEME",
100
+ default: () => ({ value: false }),
101
+ },
102
+ },
97
103
  props: {
98
104
  items: {
99
105
  type: Array,
@@ -162,6 +168,9 @@ export default {
162
168
  this.search !== "" && this.results.length !== 0 && this.isOpen === true
163
169
  );
164
170
  },
171
+ isDark() {
172
+ return this.darkThemeRef;
173
+ },
165
174
  },
166
175
  methods: {
167
176
  onChange() {
@@ -26,7 +26,7 @@
26
26
 
27
27
  & .bimdata-select__content__label {
28
28
  position: absolute;
29
- top: 6px;
29
+ top: 8px;
30
30
  left: 12px;
31
31
  font-size: 12px;
32
32
  transition: 0.2s ease all;
@@ -110,6 +110,30 @@
110
110
  color: var(--color-primary);
111
111
  }
112
112
  }
113
+ &.dark {
114
+ &.active, &.not-empty {
115
+ & .bimdata-select__content {
116
+ .bimdata-select__content__label {
117
+ color: var(--color-quaternary-lighter);
118
+ }
119
+ }
120
+ }
121
+ .bimdata-select__content {
122
+ background-color: var(--color-quaternary-light);
123
+ .bimdata-select__content__value, .bimdata-select__content__label {
124
+ color: var(--color-quaternary-lighter);
125
+ }
126
+ }
127
+ .bimdata-select__option-list {
128
+ background-color: var(--color-primary);
129
+ color: var(--color-white);
130
+ .bimdata-select__option-list__entry {
131
+ &.selected, &:hover {
132
+ background-color: var(--color-primary-light);
133
+ }
134
+ }
135
+ }
136
+ }
113
137
  &.active {
114
138
  .bimdata-select__content {
115
139
  .bimdata-select__content__value, .bimdata-select__content__label {
@@ -136,6 +160,13 @@
136
160
  }
137
161
  }
138
162
  &.dark {
163
+ &.active, &.not-empty {
164
+ & .bimdata-select__content {
165
+ .bimdata-select__content__label {
166
+ color: var(--color-quaternary-lighter);
167
+ }
168
+ }
169
+ }
139
170
  .bimdata-select__option-list {
140
171
  background-color: var(--color-primary);
141
172
  color: var(--color-white);
@@ -150,10 +181,22 @@
150
181
  &.secondary {
151
182
  .bimdata-select__content {
152
183
  background-color: var(--color-secondary);
153
- .bimdata-select__content__label {
184
+ .bimdata-select__content__label, .bimdata-select__content__value {
154
185
  color: var(--color-primary);
155
186
  }
156
187
  }
188
+ &.dark {
189
+ .bimdata-select__option-list {
190
+ background-color: var(--color-quaternary-light);
191
+ }
192
+ &.active, &.not-empty {
193
+ & .bimdata-select__content {
194
+ .bimdata-select__content__label {
195
+ color: var(--color-quaternary-lighter);
196
+ }
197
+ }
198
+ }
199
+ }
157
200
  }
158
201
  &.tertiary {
159
202
  .bimdata-select__content {
@@ -240,4 +283,63 @@
240
283
  }
241
284
  }
242
285
  }
286
+ &.white {
287
+ .bimdata-select__content {
288
+ background-color: var(--color-white);
289
+ .bimdata-select__content__label {
290
+ color: var(--color-quaternary);
291
+ }
292
+ .bimdata-select__content__value {
293
+ color: var(--color-quaternary);
294
+ }
295
+ }
296
+ &.active {
297
+ .bimdata-select__content {
298
+ .bimdata-select__content__value, .bimdata-select__content__label {
299
+ color: var(--color-quaternary);
300
+ }
301
+ }
302
+ .bimdata-select__option-list {
303
+ .bimdata-select__option-list__entry {
304
+ &.selected, &:hover {
305
+ background-color: var(--color-tertiary-lighter);
306
+ }
307
+ }
308
+ }
309
+ }
310
+ &.dark {
311
+ .bimdata-select__option-list {
312
+ .bimdata-select__option-list__entry {
313
+ color: var(--color-quaternary);
314
+ }
315
+ }
316
+ &.not-empty {
317
+ .bimdata-select__content {
318
+ .bimdata-select__content__label {
319
+ color: var(--color-white);
320
+ }
321
+ }
322
+ }
323
+ }
324
+ &:deep() {
325
+ .bimdata-checkbox {
326
+ &.dark {
327
+ .bimdata-checkbox__text {
328
+ color: var(--color-quaternary)
329
+ }
330
+ .bimdata-checkbox__mark {
331
+ border-color: var(--color-quaternary);
332
+ }
333
+ &.checked {
334
+ .bimdata-checkbox__mark {
335
+ background-color: var(--color-quaternary);
336
+ &::after {
337
+ border-color: var(--color-quaternary-lighter);
338
+ }
339
+ }
340
+ }
341
+ }
342
+ }
343
+ }
344
+ }
243
345
  }
@@ -1,10 +1,12 @@
1
1
  <template>
2
2
  <div
3
- class="bimdata-select"
3
+ class="bimdata-select multi"
4
4
  :class="{
5
5
  disabled,
6
6
  active: isOpen,
7
+ dark: isDark,
7
8
  'not-empty': modelValue.length > 0,
9
+ [color]: true,
8
10
  }"
9
11
  :style="{ width }"
10
12
  v-clickaway="away"
@@ -25,7 +27,7 @@
25
27
  <BIMDataSearch
26
28
  v-if="search"
27
29
  width="calc(100% - 12px)"
28
- color="primary"
30
+ :color="searchColor"
29
31
  radius
30
32
  :placeholder="searchPlaceholder"
31
33
  v-model="searchText"
@@ -80,14 +82,33 @@ export default {
80
82
  prop: "modelValue",
81
83
  event: "update:modelValue",
82
84
  },
85
+ inject: {
86
+ darkThemeRef: {
87
+ from: "BIMDATA_DESIGN_SYSTEM_DARK_THEME",
88
+ default: () => ({ value: false }),
89
+ },
90
+ },
83
91
  props: {
84
- width: {
85
- type: [String, Number],
92
+ color: {
93
+ type: String,
94
+ default: "default",
95
+ validator: value =>
96
+ ["default", "primary", "secondary", "tertiary", "tertiary-light", "quaternary", "white"].includes(value),
97
+ },
98
+ disabled: {
99
+ type: Boolean,
100
+ default: false,
86
101
  },
87
102
  label: {
88
103
  type: String,
89
104
  default: null,
90
105
  },
106
+ modelValue: {
107
+ type: Array,
108
+ },
109
+ nullLabel: {
110
+ type: String,
111
+ },
91
112
  options: {
92
113
  type: Array,
93
114
  default: () => [],
@@ -98,13 +119,7 @@ export default {
98
119
  optionLabelKey: {
99
120
  type: String,
100
121
  },
101
- modelValue: {
102
- type: Array,
103
- },
104
- nullLabel: {
105
- type: String,
106
- },
107
- disabled: {
122
+ resetOnLeave: {
108
123
  type: Boolean,
109
124
  default: false,
110
125
  },
@@ -112,13 +127,19 @@ export default {
112
127
  type: Boolean,
113
128
  default: false,
114
129
  },
130
+ searchColor: {
131
+ type: String,
132
+ default: "primary",
133
+ validator: value =>
134
+ ["primary", "secondary", "tertiary", "quaternary"].includes(value),
135
+ },
115
136
  searchPlaceholder: {
116
137
  type: String,
117
138
  default: "Search",
118
139
  },
119
- resetOnLeave: {
120
- type: Boolean,
121
- default: false,
140
+
141
+ width: {
142
+ type: [String, Number],
122
143
  },
123
144
  },
124
145
  emits: ["update:modelValue"],
@@ -159,6 +180,9 @@ export default {
159
180
  }
160
181
  }
161
182
  },
183
+ isDark() {
184
+ return this.darkThemeRef;
185
+ },
162
186
  },
163
187
  methods: {
164
188
  toggle() {
@@ -5,7 +5,7 @@
5
5
  disabled,
6
6
  active: isOpen,
7
7
  'not-empty': modelValue !== undefined && modelValue !== null,
8
- dark,
8
+ dark: isDark,
9
9
  [color]: true,
10
10
  }"
11
11
  :style="{ width }"
@@ -78,6 +78,12 @@ export default {
78
78
  prop: "modelValue",
79
79
  event: "update:modelValue",
80
80
  },
81
+ inject: {
82
+ darkThemeRef: {
83
+ from: "BIMDATA_DESIGN_SYSTEM_DARK_THEME",
84
+ default: () => ({ value: false }),
85
+ },
86
+ },
81
87
  props: {
82
88
  width: {
83
89
  type: [String, Number],
@@ -126,15 +132,11 @@ export default {
126
132
  type: Boolean,
127
133
  default: false,
128
134
  },
129
- dark: {
130
- type: Boolean,
131
- default: false,
132
- },
133
135
  color: {
134
136
  type: String,
135
137
  default: "default",
136
138
  validator: value =>
137
- ["default", "primary", "secondary", "tertiary", "tertiary-light", "quaternary"].includes(value),
139
+ ["default", "primary", "secondary", "tertiary", "tertiary-light", "quaternary", "white"].includes(value),
138
140
  },
139
141
  searchColor: {
140
142
  type: String,
@@ -181,6 +183,9 @@ export default {
181
183
  }
182
184
  }
183
185
  },
186
+ isDark() {
187
+ return this.darkThemeRef;
188
+ },
184
189
  },
185
190
  methods: {
186
191
  toggle() {
@@ -50,7 +50,7 @@
50
50
  transition: opacity 0.2s ease-out;
51
51
  }
52
52
  }
53
- &-tooltip {
53
+ .bimdata-slider-tooltip {
54
54
  background: var(--color-primary);
55
55
  color: var(--color-white);
56
56
  padding: calc(var(--spacing-unit) / 2);
@@ -64,7 +64,7 @@
64
64
  &::after {
65
65
  border: 5px solid transparent;
66
66
  border-top-color: var(--color-primary);
67
- bottom: 5px * -2;
67
+ bottom: calc(5px * -2);
68
68
  content: "";
69
69
  height: 0;
70
70
  left: 50%;
@@ -79,4 +79,41 @@
79
79
  appearance: none;
80
80
  -webkit-appearance: none;
81
81
  }
82
+
83
+ &.dark {
84
+ .bimdata-slider-input {
85
+ background-color: transparent;
86
+ &::-webkit-slider-runnable-track {
87
+ height: 3px;
88
+ background: linear-gradient(
89
+ to right,
90
+ var(--color-tertiary),
91
+ var(--color-tertiary)
92
+ ),
93
+ var(--color-quaternary-lighter);
94
+ background-size: var(--background-size, 0%) 100%;
95
+ background-repeat: no-repeat;
96
+ border-radius: 5px;
97
+ }
98
+ &::-webkit-slider-thumb {
99
+ background: var(--color-tertiary);
100
+ }
101
+ &::-moz-range-progress {
102
+ background-color: var(--color-tertiary);
103
+ }
104
+ &::-moz-range-track {
105
+ background-color: var(--color-quaternary-lighter);
106
+ border-radius: 5px;
107
+ }
108
+ &::-moz-range-thumb {
109
+ background: var(--color-tertiary);
110
+ }
111
+ }
112
+ .bimdata-slider-tooltip {
113
+ background: var(--color-tertiary);
114
+ &::after {
115
+ border-top-color: var(--color-tertiary);
116
+ }
117
+ }
118
+ }
82
119
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="bimdata-slider">
2
+ <div class="bimdata-slider" :class="{dark: isDark}">
3
3
  <input
4
4
  ref="input"
5
5
  class="bimdata-slider-input"
@@ -23,6 +23,12 @@
23
23
 
24
24
  <script>
25
25
  export default {
26
+ inject: {
27
+ darkThemeRef: {
28
+ from: "BIMDATA_DESIGN_SYSTEM_DARK_THEME",
29
+ default: () => ({ value: false }),
30
+ },
31
+ },
26
32
  props: {
27
33
  min: {
28
34
  type: [Number, String],
@@ -95,7 +101,12 @@ export default {
95
101
  this.tooltipPosition = `calc(${newVal}% + (${8 - newVal * 0.18}px))`;
96
102
  },
97
103
  },
104
+ computed: {
105
+ isDark() {
106
+ return this.darkThemeRef;
107
+ },
108
+ },
98
109
  };
99
110
  </script>
100
111
 
101
- <style scoped lang="scss" src="./_BIMDataSlider.scss"></style>
112
+ <style scoped src="./BIMDataSlider.css"></style>
@@ -3,7 +3,7 @@
3
3
  font-size: 0.9rem;
4
4
  background-color: var(--color-white);
5
5
 
6
- &__container {
6
+ & .bimdata-table__container {
7
7
  height: 100%;
8
8
 
9
9
  table {
@@ -46,7 +46,7 @@
46
46
  }
47
47
  }
48
48
 
49
- &__placeholder {
49
+ .bimdata-table__container__placeholder {
50
50
  display: flex;
51
51
  justify-content: center;
52
52
  align-items: center;
@@ -56,14 +56,32 @@
56
56
  }
57
57
  }
58
58
 
59
- &__page-nav {
59
+ & .bimdata-table__container__page-nav {
60
60
  display: flex;
61
61
  justify-content: flex-end;
62
62
  align-items: center;
63
63
  padding: var(--spacing-unit);
64
64
 
65
- &__text {
65
+ & .bimdata-table__container__page-nav__text {
66
66
  margin: 0 var(--spacing-unit);
67
67
  }
68
68
  }
69
+
70
+ &.dark {
71
+ .bimdata-table__container table tbody tr:nth-child(odd) {
72
+ background-color: var(--color-quaternary-dark);
73
+ }
74
+ .bimdata-table__container table thead tr,
75
+ .bimdata-table__container table tbody tr:nth-child(even) {
76
+ background-color: var(--color-quaternary);
77
+ th {
78
+ color: var(--color-quaternary-lighter);
79
+ }
80
+ }
81
+ .bimdata-table__container {
82
+ td {
83
+ color: var(--color-white);
84
+ }
85
+ }
86
+ }
69
87
  }