@itfin/components 1.2.136 → 1.2.137

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itfin/components",
3
- "version": "1.2.136",
3
+ "version": "1.2.137",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1,4 +1,4 @@
1
- <template>
1
+ <!--template>
2
2
 
3
3
  <div class="itf-dropdown" :class="`drop${placement}`">
4
4
  <div v-if="disabled"><slot name="button">{{label}}</slot></div>
@@ -26,7 +26,7 @@
26
26
  </div>
27
27
  </div>
28
28
 
29
- </template>
29
+ </template-->
30
30
  <script>
31
31
  import { Vue, Component, Prop, Watch, PropSync } from 'vue-property-decorator';
32
32
  import itfButton from '../button/Button';
@@ -73,12 +73,40 @@ class itfDropdown extends Vue {
73
73
  // }
74
74
  // }
75
75
 
76
+ render (createElement) {
77
+ const modalId = `dropdownId${this._uid}`;
78
+ const { right, shadow, label } = this;
79
+ return createElement('div', {
80
+ staticClass: 'dropdown'
81
+ }, [
82
+ createElement(
83
+ 'itf-button',
84
+ {
85
+ props: this.buttonOptions || {},
86
+ class: { 'dropdown-toggle': this.toggle },
87
+ attrs: { id: modalId, 'data-bs-toggle': 'dropdown', 'aria-expanded': 'false' },
88
+ ref: 'toggle',
89
+ },
90
+ this.$slots.button || label
91
+ ),
92
+ createElement(
93
+ 'div',
94
+ {
95
+ attrs: { rel: 'dropdown' , 'aria-labelledby': modalId},
96
+ class: { 'dropdown-menu-end': right, 'shadow': shadow },
97
+ staticClass: 'itf-dropdown__menu dropdown-menu'
98
+ },
99
+ this.$slots.default
100
+ )
101
+ ]);
102
+ }
103
+
76
104
  created() {
77
- globalModalIndex += 1;
78
- this.modalId = `dropdownId${globalModalIndex}`;
105
+ console.info(this);
79
106
  }
80
107
 
81
108
  async mounted() {
109
+ console.info(this);
82
110
  if (typeof window === 'undefined' || !this.$refs.toggle) {
83
111
  return;
84
112
  }