@avakhula/ui 0.0.215 → 0.0.217

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": "@avakhula/ui",
3
- "version": "0.0.215",
3
+ "version": "0.0.217",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
@@ -29,7 +29,16 @@ const Template = (args) => ({
29
29
  template: `
30
30
  <ib-sorting
31
31
  v-bind="args"
32
- />
32
+ toggle-tip-title="test"
33
+ >
34
+ <template #toggleTipBody>
35
+ dfsdfsdf
36
+ </template>
37
+
38
+ <template #toggleTipButtons>
39
+ fsdfsd
40
+ </template>
41
+ </ib-sorting>
33
42
  `,
34
43
  });
35
44
 
@@ -12,14 +12,16 @@
12
12
  <button
13
13
  v-tooltip:[tooltipPosition]="tooltipText"
14
14
  class="sorting-label"
15
+ :class="{'sorting-label-active': isOpenToggleTip}"
15
16
  type="button"
16
- @click="isOpenToggleTip = true"
17
+ @click="isOpenToggleTip = !isOpenToggleTip"
17
18
  >
18
19
  {{ title }}
19
20
  </button>
20
21
 
21
22
  <ib-toggle-tip
22
23
  v-if="hasToggleTip"
24
+ position="bottom-center"
23
25
  :is-open="isOpenToggleTip"
24
26
  :title="toggleTipTitle"
25
27
  @close="isOpenToggleTip = false"
@@ -40,6 +40,7 @@ button {
40
40
  background-color: $blue-100;
41
41
  }
42
42
 
43
+ &.sorting-label-active,
43
44
  &:active {
44
45
  border-color: transparent;
45
46
  color: $blue-900;
@@ -64,6 +64,7 @@ export default {
64
64
  }
65
65
 
66
66
  p {
67
+ word-break: break-word;
67
68
  @include Ib-H4-regular;
68
69
  }
69
70
 
@@ -26,8 +26,8 @@ export default class Tooltip {
26
26
  this.uuid = "tooltip_" + generateUID();
27
27
  }
28
28
 
29
- createTooltip(el, text, position) {
30
- if (!text?.length) {
29
+ createTooltip(el, content, position) {
30
+ if (!content.text?.length) {
31
31
  return;
32
32
  }
33
33
 
@@ -44,7 +44,8 @@ export default class Tooltip {
44
44
 
45
45
  document.body.appendChild(this.tooltipContainer);
46
46
  this.tooltipInstance = createApp(IbTooltip, {
47
- text: text,
47
+ title: content.title,
48
+ text: content.text,
48
49
  alwaysVisible: true,
49
50
  for: this.uuid,
50
51
  class: this.getClassList(position),
@@ -5,7 +5,13 @@ const tooltip = new Tooltip();
5
5
 
6
6
  const createTooltip = (el, binding) => {
7
7
  if (multiLineOverflows(el)) {
8
- tooltip.createTooltip(el, binding.value);
8
+
9
+ const content = {
10
+ title: binding.value.title || '',
11
+ text: typeof(binding.value) === 'object' ? binding.value.text : binding.value,
12
+ }
13
+
14
+ tooltip.createTooltip(el, content);
9
15
  }
10
16
  };
11
17
 
@@ -4,7 +4,13 @@ const tooltip = new Tooltip();
4
4
  const createTooltip = (el, binding) => {
5
5
  if (!tooltip.getTooltipContainer()) {
6
6
  const position = Object.keys(binding.modifiers)[0] || binding.arg;
7
- tooltip.createTooltip(el, binding.value, position);
7
+
8
+ const content = {
9
+ title: binding.value.title || '',
10
+ text: typeof(binding.value) === 'object' ? binding.value.text : binding.value,
11
+ }
12
+
13
+ tooltip.createTooltip(el, content, position);
8
14
  }
9
15
  };
10
16
 
@@ -20,8 +20,11 @@ const Template = (args) => ({
20
20
  return { args };
21
21
  },
22
22
  template: `
23
- <div style="display:flex;flex-wrap:wrap;">
24
- <ib-button v-tooltip="'Tooltip Content Content Content Content'" v-bind="args">Tooltip</ib-button>
23
+ <div style="display:flex;flex-wrap:wrap;margin-top: 100px;">
24
+ <ib-button v-tooltip="'Tooltip Content Content Content Content Tooltip Content Content Content Content Tooltip Content Content Content Content Tooltip Content Content Content Content Tooltip Content Content Content Content Tooltip Content Content Content Content'" v-bind="args">Tooltip</ib-button>
25
+
26
+
27
+ <ib-button v-tooltip="{text: 'antonushkoeliseyantonushkoelisey@gmail.com', title: 'test'}" v-bind="args">Tooltip</ib-button>
25
28
  </div>
26
29
 
27
30
  `,