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

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 (38) hide show
  1. package/package.json +4 -4
  2. package/src/BIMDataComponents/BIMDataAvatar/BIMDataAvatar.vue +93 -0
  3. package/src/BIMDataComponents/BIMDataCheckbox/BIMDataCheckbox.vue +9 -8
  4. package/src/BIMDataComponents/BIMDataColorSelector/BIMDataColorSelector.css +8 -0
  5. package/src/BIMDataComponents/BIMDataColorSelector/BIMDataColorSelector.vue +12 -1
  6. package/src/BIMDataComponents/BIMDataDropdownList/BIMDataDropdownList.vue +17 -11
  7. package/src/BIMDataComponents/BIMDataDropdownMenu/BIMDataDropdownMenu.vue +10 -5
  8. package/src/BIMDataComponents/BIMDataInfobox/BIMDataInfobox.vue +18 -7
  9. package/src/BIMDataComponents/BIMDataInput/BIMDataInput.vue +23 -12
  10. package/src/BIMDataComponents/BIMDataMenu/BIMDataMenu.css +58 -0
  11. package/src/BIMDataComponents/BIMDataMenu/BIMDataMenu.vue +14 -4
  12. package/src/BIMDataComponents/BIMDataMenuInline/BIMDataMenuInline.css +5 -0
  13. package/src/BIMDataComponents/BIMDataMenuInline/BIMDataMenuInline.vue +16 -6
  14. package/src/BIMDataComponents/BIMDataNavigation/BIMDataNavigation.vue +16 -9
  15. package/src/BIMDataComponents/BIMDataPaginatedList/BIMDataPaginatedList.vue +19 -7
  16. package/src/BIMDataComponents/BIMDataPagination/{_BIMDataPagination.scss → BIMDataPagination.css} +4 -2
  17. package/src/BIMDataComponents/BIMDataPagination/BIMDataPagination.vue +20 -9
  18. package/src/BIMDataComponents/BIMDataRadio/BIMDataRadio.vue +10 -5
  19. package/src/BIMDataComponents/BIMDataSafeZoneInline/{_BIMDataSafeZoneInline.scss → BIMDataSafeZoneInline.css} +2 -2
  20. package/src/BIMDataComponents/BIMDataSafeZoneInline/BIMDataSafeZoneInline.vue +1 -1
  21. package/src/BIMDataComponents/BIMDataSearch/BIMDataSearch.css +1 -1
  22. package/src/BIMDataComponents/BIMDataSearchAutocomplete/BIMDataSearchAutocomplete.css +28 -0
  23. package/src/BIMDataComponents/BIMDataSearchAutocomplete/BIMDataSearchAutocomplete.vue +10 -1
  24. package/src/BIMDataComponents/BIMDataSelect/BIMDataSelect.css +45 -2
  25. package/src/BIMDataComponents/BIMDataSelect/BIMDataSelectMulti.vue +38 -14
  26. package/src/BIMDataComponents/BIMDataSelect/BIMDataSelectSingle.vue +10 -5
  27. package/src/BIMDataComponents/BIMDataSlider/{_BIMDataSlider.scss → BIMDataSlider.css} +39 -2
  28. package/src/BIMDataComponents/BIMDataSlider/BIMDataSlider.vue +13 -2
  29. package/src/BIMDataComponents/BIMDataTable/{_BIMDataTable.scss → BIMDataTable.css} +22 -4
  30. package/src/BIMDataComponents/BIMDataTable/BIMDataTable.vue +22 -17
  31. package/src/BIMDataComponents/BIMDataTabs/BIMDataTabs.vue +10 -5
  32. package/src/BIMDataComponents/BIMDataText/BIMDataText.css +10 -0
  33. package/src/BIMDataComponents/BIMDataText/BIMDataText.vue +19 -2
  34. package/src/BIMDataComponents/BIMDataTextarea/{_BIMDataTextarea.scss → BIMDataTextarea.css} +20 -9
  35. package/src/BIMDataComponents/BIMDataTextarea/BIMDataTextarea.vue +13 -1
  36. package/src/BIMDataComponents/BIMDataToggle/{_BIMDataToggle.scss → BIMDataToggle.css} +12 -1
  37. package/src/BIMDataComponents/BIMDataToggle/BIMDataToggle.vue +11 -2
  38. package/src/BIMDataComponents/index.js +1 -0
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <ul
3
3
  class="bimdata-list bimdata-navigation"
4
- :class="{ dark }"
4
+ :class="{ dark: isDark }"
5
5
  :style="{ 'background-color': backgroundColor }"
6
6
  >
7
7
  <li class="bimdata-navigation__left m-r-6">
@@ -12,7 +12,7 @@
12
12
  @click="$emit('first')"
13
13
  :disabled="firstDisabled"
14
14
  ghost
15
- :color="!dark ? 'default' : 'quaternary'"
15
+ :color="isDark ? 'quaternary' : 'default'"
16
16
  :class="{ disabled: firstDisabled }"
17
17
  width="21px"
18
18
  height="21px"
@@ -25,7 +25,7 @@
25
25
  @click="$emit('previous')"
26
26
  :disabled="previousDisabled"
27
27
  ghost
28
- :color="!dark ? 'default' : 'quaternary'"
28
+ :color="isDark ? 'quaternary' : 'default'"
29
29
  :class="{ disabled: previousDisabled }"
30
30
  width="21px"
31
31
  height="21px"
@@ -41,7 +41,7 @@
41
41
  @click="$emit('next')"
42
42
  :disabled="nextDisabled"
43
43
  ghost
44
- :color="!dark ? 'default' : 'quaternary'"
44
+ :color="isDark ? 'quaternary' : 'default'"
45
45
  :class="{ disabled: nextDisabled }"
46
46
  width="21px"
47
47
  height="21px"
@@ -54,7 +54,7 @@
54
54
  @click="$emit('last')"
55
55
  :disabled="lastDisabled"
56
56
  ghost
57
- :color="!dark ? 'default' : 'quaternary'"
57
+ :color="isDark ? 'quaternary' : 'default'"
58
58
  :class="{ disabled: lastDisabled }"
59
59
  width="21px"
60
60
  height="21px"
@@ -81,6 +81,12 @@ export default {
81
81
  BIMDataIconDoubleChevron,
82
82
  BIMDataButton,
83
83
  },
84
+ inject: {
85
+ darkThemeRef: {
86
+ from: "BIMDATA_DESIGN_SYSTEM_DARK_THEME",
87
+ default: () => ({ value: false }),
88
+ },
89
+ },
84
90
  props: {
85
91
  first: {
86
92
  type: Boolean,
@@ -118,12 +124,13 @@ export default {
118
124
  type: String,
119
125
  default: "var(--color-white)",
120
126
  },
121
- dark: {
122
- type: Boolean,
123
- default: false,
124
- },
125
127
  },
126
128
  emits: ["first", "previous", "next", "last"],
129
+ computed: {
130
+ isDark() {
131
+ return this.darkThemeRef;
132
+ },
133
+ },
127
134
  };
128
135
  </script>
129
136
 
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="bimdata-paginated-list" :class="{ dark }" :style="style">
2
+ <div class="bimdata-paginated-list" :class="{ dark: isDark }" :style="style">
3
3
  <BIMDataSpinner v-if="loading" />
4
4
  <div v-else>
5
5
  <slot name="header"></slot>
@@ -29,8 +29,10 @@
29
29
  :first="first"
30
30
  :last="last"
31
31
  :numberDataElements="numberDataElements"
32
- :backgroundColor="backgroundColor"
33
- :dark="dark"
32
+ :style="{
33
+ backgroundColor: backgroundColorSet ? backgroundColor : undefined,
34
+ }"
35
+ :class="{ dark: isDark && !backgroundColorSet }"
34
36
  />
35
37
  </div>
36
38
  </div>
@@ -45,6 +47,12 @@ export default {
45
47
  BIMDataPagination,
46
48
  BIMDataSpinner,
47
49
  },
50
+ inject: {
51
+ darkThemeRef: {
52
+ from: "BIMDATA_DESIGN_SYSTEM_DARK_THEME",
53
+ default: () => ({ value: false }),
54
+ },
55
+ },
48
56
  props: {
49
57
  list: {
50
58
  type: Array,
@@ -84,10 +92,6 @@ export default {
84
92
  activeElement: {
85
93
  type: [String, Number, Object],
86
94
  },
87
- dark: {
88
- type: Boolean,
89
- default: false,
90
- },
91
95
  borderRadius: {
92
96
  type: String,
93
97
  default: "3px",
@@ -120,6 +124,14 @@ export default {
120
124
  };
121
125
  }
122
126
  },
127
+ backgroundColorSet() {
128
+ return (
129
+ !!this.backgroundColor && this.backgroundColor !== "var(--color-white)"
130
+ );
131
+ },
132
+ isDark() {
133
+ return this.darkThemeRef;
134
+ },
123
135
  },
124
136
  watch: {
125
137
  list: {
@@ -1,6 +1,5 @@
1
- // custom BASE PAGINATION
2
1
  .bimdata-pagination {
3
- &__item {
2
+ .bimdata-pagination__item {
4
3
  .bimdata-btn {
5
4
  padding: 0;
6
5
  justify-content: center;
@@ -12,4 +11,7 @@
12
11
  }
13
12
  }
14
13
  }
14
+ &.dark {
15
+ background-color: var(--color-quaternary);
16
+ }
15
17
  }
@@ -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,11 @@
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
16
  }
@@ -40,4 +40,4 @@ export default {
40
40
  };
41
41
  </script>
42
42
 
43
- <style scoped lang="scss" src="./_BIMDataSafeZoneInline.scss"></style>
43
+ <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 {
@@ -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"].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,10 +132,6 @@ 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",
@@ -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>