@webitel/ui-sdk 1.0.45 → 2.0.0-2

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 (30) hide show
  1. package/README.md +1 -1
  2. package/dist/img/sprite/index.js +1 -1
  3. package/dist/img/sprite/messenger-messenger.svg +12 -0
  4. package/dist/ui-sdk.common.js +164 -92
  5. package/dist/ui-sdk.common.js.map +1 -1
  6. package/dist/ui-sdk.css +1 -1
  7. package/dist/ui-sdk.umd.js +164 -92
  8. package/dist/ui-sdk.umd.js.map +1 -1
  9. package/dist/ui-sdk.umd.min.js +2 -2
  10. package/dist/ui-sdk.umd.min.js.map +1 -1
  11. package/package.json +1 -1
  12. package/src/components/atoms/wt-tooltip/__tests__/WtTooltip.spec.js +2 -1
  13. package/src/components/atoms/wt-tooltip/wt-tooltip.vue +29 -41
  14. package/src/components/index.js +2 -0
  15. package/src/components/molecules/wt-datetimepicker/__tests__/WtDatetimepicker.spec.js +27 -25
  16. package/src/components/molecules/wt-hint/__tests__/WtHint.spec.js +9 -0
  17. package/src/components/molecules/wt-hint/wt-hint.vue +21 -0
  18. package/src/components/molecules/wt-icon-btn/__tests__/WtIconBtn.spec.js +0 -16
  19. package/src/components/molecules/wt-icon-btn/wt-icon-btn.vue +46 -88
  20. package/src/components/molecules/wt-label/wt-label.vue +4 -22
  21. package/src/components/organisms/wt-app-header/wt-app-navigator.vue +12 -12
  22. package/src/components/organisms/wt-app-header/wt-header-actions.vue +13 -13
  23. package/src/components/organisms/wt-pagination/__tests__/WtPagination.spec.js +2 -2
  24. package/src/components/organisms/wt-pagination/wt-pagination.vue +22 -16
  25. package/src/components/organisms/wt-table/table-cells/wt-table-delete-action.vue +9 -6
  26. package/src/components/organisms/wt-table/table-cells/wt-table-edit-action.vue +10 -7
  27. package/src/components/organisms/wt-table-actions/wt-table-actions.vue +56 -38
  28. package/src/components/organisms/wt-table-column-select/__tests__/WtTableColumnSelect.spec.js +2 -2
  29. package/src/components/organisms/wt-table-column-select/wt-table-column-select.vue +13 -9
  30. package/src/css/components/atoms/wt-tooltip/_variables.scss +17 -2
@@ -1,43 +1,61 @@
1
1
  <template>
2
2
  <aside class="wt-table-actions">
3
3
  <slot></slot>
4
- <wt-icon-btn
5
- v-if="isImport"
6
- icon="download"
7
- :tooltip="$t('reusable.import')"
8
- @click="$emit('input', 'import')"
9
- ></wt-icon-btn>
10
- <wt-icon-btn
11
- v-if="isExport"
12
- icon="upload"
13
- :tooltip="$t('reusable.export')"
14
- @click="$emit('input', 'export')"
15
- ></wt-icon-btn>
16
- <wt-icon-btn
17
- v-if="isFilterReset"
18
- icon="clear"
19
- :tooltip="$t('webitelUI.tableActions.filterReset')"
20
- @click="$emit('input', 'filterReset')"
21
- ></wt-icon-btn>
22
- <wt-icon-btn
23
- v-if="isColumnSelect"
24
- icon="column-select"
25
- :tooltip="$t('webitelUI.tableActions.columnSelect')"
26
- @click="$emit('input', 'columnSelect')"
27
- ></wt-icon-btn>
28
- <wt-icon-btn
29
- v-if="isRefresh"
30
- icon="refresh"
31
- :tooltip="$t('webitelUI.tableActions.refreshTable')"
32
- @click="$emit('input', 'refresh')"
33
- ></wt-icon-btn>
34
- <wt-icon-btn
35
- v-if="isSettings"
36
- :class="{'active': isSettingsActive}"
37
- icon="filter"
38
- :tooltip="$t('webitelUI.tableActions.expandFilters')"
39
- @click="$emit('input', 'settings')"
40
- ></wt-icon-btn>
4
+ <wt-tooltip v-if="isImport">
5
+ <template v-slot:activator>
6
+ <wt-icon-btn
7
+ icon="download"
8
+ @click="$emit('input', 'import')"
9
+ ></wt-icon-btn>
10
+ </template>
11
+ {{ $t('reusable.import') }}
12
+ </wt-tooltip>
13
+ <wt-tooltip v-if="isExport">
14
+ <template v-slot:activator>
15
+ <wt-icon-btn
16
+ icon="upload"
17
+ @click="$emit('input', 'export')"
18
+ ></wt-icon-btn>
19
+ </template>
20
+ {{ $t('reusable.export') }}
21
+ </wt-tooltip>
22
+ <wt-tooltip v-if="isFilterReset">
23
+ <template v-slot:activator>
24
+ <wt-icon-btn
25
+ icon="clear"
26
+ @click="$emit('input', 'filterReset')"
27
+ ></wt-icon-btn>
28
+ </template>
29
+ {{ $t('webitelUI.tableActions.filterReset') }}
30
+ </wt-tooltip>
31
+ <wt-tooltip v-if="isColumnSelect">
32
+ <template v-slot:activator>
33
+ <wt-icon-btn
34
+ icon="column-select"
35
+ @click="$emit('input', 'columnSelect')"
36
+ ></wt-icon-btn>
37
+ </template>
38
+ {{ $t('webitelUI.tableActions.columnSelect') }}
39
+ </wt-tooltip>
40
+ <wt-tooltip v-if="isRefresh">
41
+ <template v-slot:activator>
42
+ <wt-icon-btn
43
+ icon="refresh"
44
+ @click="$emit('input', 'refresh')"
45
+ ></wt-icon-btn>
46
+ </template>
47
+ {{ $t('webitelUI.tableActions.refreshTable') }}
48
+ </wt-tooltip>
49
+ <wt-tooltip v-if="isSettings">
50
+ <template v-slot:activator>
51
+ <wt-icon-btn
52
+ :class="{'active': isSettingsActive}"
53
+ icon="filter"
54
+ @click="$emit('input', 'settings')"
55
+ ></wt-icon-btn>
56
+ </template>
57
+ {{ $t('webitelUI.tableActions.expandFilters') }}
58
+ </wt-tooltip>
41
59
  </aside>
42
60
  </template>
43
61
 
@@ -81,7 +99,7 @@ export default {
81
99
  .wt-table-actions {
82
100
  display: flex;
83
101
  align-items: center;
84
- gap: var(--table-actions-icon-gap);
85
102
  padding: var(--table-actions-padding);
103
+ gap: var(--table-actions-icon-gap);
86
104
  }
87
105
  </style>
@@ -1,4 +1,4 @@
1
- import { shallowMount } from '@vue/test-utils';
1
+ import { mount, shallowMount } from '@vue/test-utils';
2
2
  import WtTableColumnSelect from '../wt-table-column-select.vue';
3
3
 
4
4
  describe('WtTableColumnSelect', () => {
@@ -19,7 +19,7 @@ describe('WtTableColumnSelect', () => {
19
19
  expect(wrapper.find('wt-table-column-select__popup').exists()).toBe(false);
20
20
  });
21
21
  it('column select popup is opening by icon-btn click', async () => {
22
- const wrapper = shallowMount(WtTableColumnSelect, {
22
+ const wrapper = mount(WtTableColumnSelect, {
23
23
  propsData: {
24
24
  headers: [],
25
25
  },
@@ -1,10 +1,14 @@
1
1
  <template>
2
2
  <div class="wt-table-column-select">
3
- <wt-icon-btn
4
- icon="column-select"
5
- :tooltip="$t('webitelUI.tableColumnSelect.title')"
6
- @click="openPopup"
7
- ></wt-icon-btn>
3
+ <wt-tooltip>
4
+ <template v-slot:activator>
5
+ <wt-icon-btn
6
+ icon="column-select"
7
+ @click="openPopup"
8
+ ></wt-icon-btn>
9
+ </template>
10
+ {{ $t('webitelUI.tableColumnSelect.title') }}
11
+ </wt-tooltip>
8
12
  <wt-popup
9
13
  v-if="isColumnSelectPopup"
10
14
  class="wt-table-column-select__popup"
@@ -16,12 +20,12 @@
16
20
  <template slot="main">
17
21
  <ul class="wt-table-column-select__popup__list">
18
22
  <li
19
- class="wt-table-column-select__popup__item"
20
23
  v-for="(col, key) of changeableDraft"
21
24
  :key="key"
25
+ class="wt-table-column-select__popup__item"
22
26
  @click.capture.prevent="col.show = !col.show"
23
27
  >
24
- <wt-checkbox v-model="col.show" :label="col.text"/>
28
+ <wt-checkbox v-model="col.show" :label="col.text" />
25
29
  </li>
26
30
  </ul>
27
31
  </template>
@@ -105,9 +109,9 @@ export default {
105
109
 
106
110
  .wt-table-column-select__popup__list {
107
111
  @extend %wt-scrollbar;
108
- max-height: 35vh; // fixme popup fixed sizes
109
- width: 550px; // fixme popup fixed sizes
110
112
  overflow: auto;
113
+ width: 550px; // fixme popup fixed sizes
114
+ max-height: 35vh; // fixme popup fixed sizes
111
115
  }
112
116
 
113
117
  .wt-table-column-select__popup__item {
@@ -1,7 +1,6 @@
1
1
 
2
2
  :root {
3
3
  --tooltip-padding: var(--spacing-2xs) var(--spacing-xs);
4
- --tooltip-z-index: 100;
5
4
 
6
5
  --tooltip-light-text-color: var(--text-primary-color);
7
6
  --tooltip-light-bg-color: var(--main-color);
@@ -9,4 +8,20 @@
9
8
  --tooltip-dark-bg-color: var(--contrast-color);
10
9
 
11
10
  --tooltip-elevation: var(--elevation-10);
12
- }
11
+ }
12
+
13
+ // cause we need to set styles to element somewhere in the HTML, not inside .wt-tooltip scope
14
+ .wt-tooltip__popper .v-popper__inner {
15
+ @extend %typo-body-1;
16
+ padding: var(--tooltip-padding);
17
+ color: var(--tooltip-light-text-color);
18
+ background: var(--tooltip-light-bg-color);
19
+ border-radius: var(--border-radius);
20
+ box-shadow: var(--tooltip-elevation);
21
+ transition: var(--transition);
22
+ }
23
+
24
+ .wt-tooltip--contrast__popper .v-popper__inner {
25
+ color: var(--tooltip-dark-text-color);
26
+ background: var(--tooltip-dark-bg-color);
27
+ }