@avakhula/ui 0.0.334 → 0.0.500

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 (214) hide show
  1. package/.babelrc.json +0 -0
  2. package/.eslintrc.cjs +0 -0
  3. package/.nvmrc +0 -0
  4. package/.prettierrc.json +0 -0
  5. package/.storybook/intelliboardTheme.js +0 -0
  6. package/.storybook/main.js +0 -0
  7. package/.storybook/manager.js +0 -0
  8. package/.storybook/preview-head.html +0 -0
  9. package/.storybook/preview.js +0 -0
  10. package/.storybook/scss-loader.scss +0 -0
  11. package/.storybook/withSource.js +0 -0
  12. package/README.md +0 -0
  13. package/dist/index.js +5703 -5041
  14. package/dist/index.umd.cjs +70 -70
  15. package/dist/style.css +1 -1
  16. package/index.html +0 -0
  17. package/package.json +2 -1
  18. package/src/App.vue +0 -0
  19. package/src/EventEmmiter.js +0 -0
  20. package/src/assets/scss/mixins/dropdown-list-item.scss +8 -1
  21. package/src/assets/scss/mixins/tooltip-position.scss +0 -0
  22. package/src/assets/scss/mixins.scss +0 -0
  23. package/src/assets/scss/reset.scss +0 -0
  24. package/src/assets/scss/style.scss +0 -0
  25. package/src/assets/scss/typography.scss +0 -0
  26. package/src/assets/scss/variables/colors.json +0 -0
  27. package/src/assets/scss/variables/colors.scss +0 -0
  28. package/src/assets/scss/variables/shadows.json +0 -0
  29. package/src/assets/scss/variables/shadows.scss +0 -0
  30. package/src/components/Accordion/Accordion.scss +0 -0
  31. package/src/components/Accordion/Accordion.stories.js +0 -0
  32. package/src/components/Accordion/Accordion.vue +0 -0
  33. package/src/components/Accordion/Acordion.spec.js +0 -0
  34. package/src/components/Accordion/readme.mdx +0 -0
  35. package/src/components/Alert/Alert.spec.js +0 -0
  36. package/src/components/Alert/Alert.stories.js +0 -0
  37. package/src/components/Alert/Alert.vue +0 -0
  38. package/src/components/Alert/alert.scss +0 -0
  39. package/src/components/Alert/constants.js +0 -0
  40. package/src/components/Alert/readme.mdx +0 -0
  41. package/src/components/Avatar/Avatar.stories.js +0 -0
  42. package/src/components/Avatar/Avatar.vue +0 -0
  43. package/src/components/Avatar/constants.js +0 -0
  44. package/src/components/Badge/Badge.spec.js +0 -0
  45. package/src/components/Badge/Badge.stories.js +0 -0
  46. package/src/components/Badge/Badge.vue +0 -0
  47. package/src/components/Badge/readme.mdx +0 -0
  48. package/src/components/Breadcrumbs/Breadcrumbs.vue +0 -0
  49. package/src/components/Breadcrumbs/breadcrumbs.scss +0 -0
  50. package/src/components/Breadcrumbs/breadcrumbs.stories.js +0 -0
  51. package/src/components/Button/Button.spec.js +0 -0
  52. package/src/components/Button/Button.stories.js +0 -0
  53. package/src/components/Button/Button.vue +0 -0
  54. package/src/components/Button/button.scss +0 -0
  55. package/src/components/Button/constants.js +0 -0
  56. package/src/components/Button/readme.mdx +0 -0
  57. package/src/components/ButtonGroup/ButtonGroup.stories.js +0 -0
  58. package/src/components/ButtonGroup/ButtonGroup.vue +0 -0
  59. package/src/components/ButtonGroup/readme.mdx +0 -0
  60. package/src/components/Dropdown/Dropdown.spec.js +0 -0
  61. package/src/components/Dropdown/Dropdown.stories.js +0 -0
  62. package/src/components/Dropdown/Dropdown.vue +0 -0
  63. package/src/components/Dropdown/DropdownDivider.vue +0 -0
  64. package/src/components/Dropdown/DropdownItem.vue +0 -0
  65. package/src/components/Dropdown/DropdownList.stories.js +0 -0
  66. package/src/components/Dropdown/DropdownList.vue +0 -0
  67. package/src/components/Dropdown/constants.js +0 -0
  68. package/src/components/Dropdown/readme.mdx +0 -0
  69. package/src/components/Form/CharactersCount.vue +0 -0
  70. package/src/components/Form/Checkbox/Checkbox.scss +0 -0
  71. package/src/components/Form/Checkbox/Checkbox.stories.js +0 -0
  72. package/src/components/Form/Checkbox/Checkbox.vue +0 -0
  73. package/src/components/Form/Checkbox/readme.mdx +0 -0
  74. package/src/components/Form/CheckboxGroup/CheckboxGroup.stories.js +0 -0
  75. package/src/components/Form/CheckboxGroup/CheckboxGroup.vue +0 -0
  76. package/src/components/Form/CheckboxGroup/readme.mdx +0 -0
  77. package/src/components/Form/DatePicker/DatePicker.scss +0 -0
  78. package/src/components/Form/DatePicker/DatePicker.stories.js +0 -0
  79. package/src/components/Form/DatePicker/DatePicker.vue +0 -0
  80. package/src/components/Form/DatePicker/Icons/chevron-back.js +0 -0
  81. package/src/components/Form/DatePicker/Icons/chevron-forward.js +0 -0
  82. package/src/components/Form/DatePicker/readme.mdx +0 -0
  83. package/src/components/Form/FormGroup/FormGroup.stories.js +0 -0
  84. package/src/components/Form/FormGroup/FormGroup.vue +0 -0
  85. package/src/components/Form/FormGroup/FormGroupSet.stories.js +0 -0
  86. package/src/components/Form/FormGroup/FormGroupSet.vue +0 -0
  87. package/src/components/Form/Input/Input.stories.js +0 -0
  88. package/src/components/Form/Input/Input.vue +0 -0
  89. package/src/components/Form/Input/constants.js +0 -0
  90. package/src/components/Form/Input/input.scss +0 -0
  91. package/src/components/Form/Input/readme.mdx +0 -0
  92. package/src/components/Form/Label/Label.stories.js +0 -0
  93. package/src/components/Form/Label/Label.vue +0 -0
  94. package/src/components/Form/Label/readme.mdx +0 -0
  95. package/src/components/Form/PhoneInput/PhoneInput.stories.js +0 -0
  96. package/src/components/Form/PhoneInput/PhoneInput.vue +0 -0
  97. package/src/components/Form/PhoneInput/phoneInput.scss +0 -0
  98. package/src/components/Form/PhoneInput/readme.mdx +0 -0
  99. package/src/components/Form/Radio/Radio.stories.js +0 -0
  100. package/src/components/Form/Radio/Radio.vue +0 -0
  101. package/src/components/Form/Radio/radio.scss +0 -0
  102. package/src/components/Form/Radio/readme.mdx +0 -0
  103. package/src/components/Form/TextEditor/TextEditor.stories.js +0 -0
  104. package/src/components/Form/TextEditor/TextEditor.vue +0 -0
  105. package/src/components/Form/TextEditor/icons/svg/chevron-down.svg +0 -0
  106. package/src/components/Form/TextEditor/icons/toolbarIcons.js +0 -0
  107. package/src/components/Form/TextEditor/plugins/alphabetList.js +0 -0
  108. package/src/components/Form/TextEditor/readme.mdx +0 -0
  109. package/src/components/Form/TextEditor/textEditor.scss +0 -0
  110. package/src/components/Form/Textarea/Textarea.spec.js +0 -0
  111. package/src/components/Form/Textarea/Textarea.stories.js +0 -0
  112. package/src/components/Form/Textarea/Textarea.vue +0 -0
  113. package/src/components/Form/Textarea/readme.mdx +0 -0
  114. package/src/components/Form/Textarea/textarea.scss +0 -0
  115. package/src/components/Form/Toggle/Toggle.stories.js +0 -0
  116. package/src/components/Form/Toggle/Toggle.vue +0 -0
  117. package/src/components/Form/Toggle/readme.mdx +0 -0
  118. package/src/components/Form/Toggle/toggle.scss +0 -0
  119. package/src/components/Icon.vue +0 -0
  120. package/src/components/IconButton/IconButton.scss +0 -0
  121. package/src/components/IconButton/IconButton.stories.js +0 -0
  122. package/src/components/IconButton/IconButton.vue +1 -9
  123. package/src/components/IconButton/constants.js +0 -0
  124. package/src/components/IconButton/readme.mdx +0 -0
  125. package/src/components/List.vue +0 -0
  126. package/src/components/Modal/Modal.stories.js +0 -0
  127. package/src/components/Modal/Modal.vue +0 -0
  128. package/src/components/Modal/constants.js +0 -0
  129. package/src/components/Modal/readme.mdx +0 -0
  130. package/src/components/Pagination/LimitSelector.vue +0 -0
  131. package/src/components/Pagination/Pagination.stories.js +0 -0
  132. package/src/components/Pagination/Pagination.vue +0 -0
  133. package/src/components/Pagination/pagination.scss +0 -0
  134. package/src/components/Panel/Panel.stories.js +0 -0
  135. package/src/components/Panel/Panel.vue +3 -1
  136. package/src/components/Popover/Popover.stories.js +0 -0
  137. package/src/components/Popover/Popover.vue +29 -13
  138. package/src/components/Popover/constants.js +0 -0
  139. package/src/components/Popover/popover.scss +26 -6
  140. package/src/components/Popover/readme.mdx +0 -0
  141. package/src/components/ProgressBar/ProgressBar.stories.js +0 -0
  142. package/src/components/ProgressBar/ProgressBar.vue +0 -0
  143. package/src/components/ProgressBar/constants.js +0 -0
  144. package/src/components/ProgressBar/progressBar.scss +0 -0
  145. package/src/components/ProgressBar/readme.mdx +0 -0
  146. package/src/components/Sorting/Sorting.stories.js +0 -0
  147. package/src/components/Sorting/Sorting.vue +0 -0
  148. package/src/components/Sorting/constants.js +0 -0
  149. package/src/components/Sorting/sorting.scss +0 -0
  150. package/src/components/SplitButton/SplitButton.stories.js +0 -0
  151. package/src/components/SplitButton/SplitButton.vue +0 -0
  152. package/src/components/SplitButton/SplitButtonItem.vue +0 -0
  153. package/src/components/SplitButton/constants.js +0 -0
  154. package/src/components/SplitButton/readme.mdx +0 -0
  155. package/src/components/SplitButton/splitButton.scss +0 -0
  156. package/src/components/StatusIndicator/StatusIndicator.stories.js +0 -0
  157. package/src/components/StatusIndicator/StatusIndicator.vue +0 -0
  158. package/src/components/StatusIndicator/constants.js +0 -0
  159. package/src/components/StatusIndicator/icons.js +0 -0
  160. package/src/components/StatusIndicator/readme.mdx +0 -0
  161. package/src/components/Table/Cells/Cell.vue +0 -0
  162. package/src/components/Table/Cells/CheckboxCell.vue +0 -0
  163. package/src/components/Table/Row.vue +0 -0
  164. package/src/components/Table/Table.stories.js +0 -0
  165. package/src/components/Table/Table.vue +0 -0
  166. package/src/components/Tabs/Tab.vue +0 -0
  167. package/src/components/Tabs/TabDropdown.vue +0 -0
  168. package/src/components/Tabs/Tabs.stories.js +0 -0
  169. package/src/components/Tabs/Tabs.vue +0 -0
  170. package/src/components/Tabs/tabs.scss +0 -0
  171. package/src/components/TagPill/TagPill.stories.js +0 -0
  172. package/src/components/TagPill/TagPill.vue +0 -0
  173. package/src/components/TagPill/constants.js +0 -0
  174. package/src/components/TagPill/readme.mdx +0 -0
  175. package/src/components/ToggleTip/ToggleTip.stories.js +0 -0
  176. package/src/components/ToggleTip/ToggleTip.vue +0 -0
  177. package/src/components/ToggleTip/constants.js +0 -0
  178. package/src/components/ToggleTip/readme.mdx +0 -0
  179. package/src/components/ToggleTip/toggleTip.scss +0 -0
  180. package/src/components/Tooltip/Tooltip.stories.js +0 -0
  181. package/src/components/Tooltip/Tooltip.vue +0 -0
  182. package/src/components/Tooltip/readme.mdx +0 -0
  183. package/src/components/TreeSelect/Option.vue +0 -0
  184. package/src/components/TreeSelect/Select.stories.js +0 -0
  185. package/src/components/TreeSelect/Select.vue +0 -0
  186. package/src/components/TreeSelect/TreeSelect.stories.js +0 -0
  187. package/src/components/TreeSelect/scss/option.scss +0 -0
  188. package/src/components/TreeSelect/scss/select.scss +0 -0
  189. package/src/constants/events.js +0 -0
  190. package/src/constants/keyCodes.js +0 -0
  191. package/src/directives/outside/outside.js +0 -0
  192. package/src/directives/outside/outside.stories.js +0 -0
  193. package/src/directives/outside/readme.mdx +0 -0
  194. package/src/directives/tooltip/TooltipController.js +0 -0
  195. package/src/directives/tooltip/readme.mdx +0 -0
  196. package/src/directives/tooltip/textOverflowTooltip.js +0 -0
  197. package/src/directives/tooltip/tooltip.js +0 -0
  198. package/src/directives/tooltip/tooltip.stories.js +0 -0
  199. package/src/helpers/generateUID.js +0 -0
  200. package/src/helpers/getHrefFromID.js +0 -0
  201. package/src/helpers/multiLineOverflows.js +0 -0
  202. package/src/helpers/removeEvents.js +0 -0
  203. package/src/index.js +0 -0
  204. package/src/main.js +0 -0
  205. package/src/mixins/expandAnimation.js +0 -0
  206. package/src/scripts/parseScssVariables.js +0 -0
  207. package/src/stories/link.readme.mdx +0 -0
  208. package/src/stories/link.stories.js +0 -0
  209. package/src/stories/variables/colors.stories.js +0 -0
  210. package/src/stories/variables/shadows.stories.js +0 -0
  211. package/static/Logo.svg +0 -0
  212. package/static/docks/button.pdf +0 -0
  213. package/static/favicon.ico +0 -0
  214. package/vite.config.js +0 -0
package/index.html CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avakhula/ui",
3
- "version": "0.0.334",
3
+ "version": "0.0.500",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
@@ -21,6 +21,7 @@
21
21
  "build-storybook": "storybook build"
22
22
  },
23
23
  "dependencies": {
24
+ "@floating-ui/dom": "^1.5.4",
24
25
  "@vueup/vue-quill": "^1.2.0",
25
26
  "mitt": "^3.0.0",
26
27
  "vue": "^3.2.45"
package/src/App.vue CHANGED
File without changes
File without changes
@@ -20,7 +20,14 @@
20
20
  cursor: pointer;
21
21
  transition: background-color 0.3s, border-color 0.3s;
22
22
  @include lineClamp(1);
23
-
23
+ display: flex;
24
+ align-items: center;
25
+
26
+ ion-icon {
27
+ font-size: 16px;
28
+ margin-right: 15px;
29
+ }
30
+
24
31
  p {
25
32
  @include lineClamp(1);
26
33
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,6 +1,5 @@
1
1
  <template>
2
2
  <ib-button
3
- @click="onClick"
4
3
  v-bind="attrs"
5
4
  :href="href"
6
5
  :kind="kind"
@@ -16,7 +15,6 @@
16
15
  import IbButton from "../Button/Button.vue";
17
16
  import IbTooltip from "../Tooltip/Tooltip.vue";
18
17
  import { iconButtonKindOptions, iconButtonSize } from "./constants.js";
19
- import removeEvents from "../../helpers/removeEvents";
20
18
 
21
19
  export default {
22
20
  name: "IbIconButton",
@@ -63,11 +61,6 @@ export default {
63
61
  tooltipVisible: false,
64
62
  };
65
63
  },
66
- methods: {
67
- onClick(e) {
68
- this.$emit("click", e);
69
- },
70
- },
71
64
  computed: {
72
65
  classes() {
73
66
  const classList = ["ib-icon-button"];
@@ -85,8 +78,7 @@ export default {
85
78
  return classList;
86
79
  },
87
80
  attrs() {
88
- const attrsList = removeEvents({ ...this.$attrs }, ['onClick']);
89
-
81
+ const attrsList = {...this.$attrs};
90
82
  attrsList.class = [...this.classes, attrsList.class];
91
83
 
92
84
  if (this.disabledFocus) {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -107,7 +107,9 @@ $description-color: $gray-700;
107
107
  .head-content {
108
108
  width: 100%;
109
109
  @include Ib-H4-regular;
110
- color: $description-color;
110
+ p {
111
+ color: $description-color;
112
+ }
111
113
  }
112
114
  }
113
115
  </style>
File without changes
@@ -1,20 +1,20 @@
1
1
  <template>
2
2
  <Transition>
3
- <div v-show="isVisible" :class="classes">
3
+ <div ref="popover" v-show="isVisible" :class="classes">
4
4
  <slot></slot>
5
5
  </div>
6
6
  </Transition>
7
7
  </template>
8
8
 
9
9
  <script>
10
- import { popoverPosition } from "./constants";
10
+ import { computePosition, autoPlacement } from '@floating-ui/dom';
11
11
 
12
12
  export default {
13
13
  name: "IbPopover",
14
14
  props: {
15
15
  position: {
16
- type: String,
17
- default: popoverPosition.topCenter,
16
+ type: [String, Array],
17
+ default: 'top',
18
18
  },
19
19
  alwaysVisible: {
20
20
  type: Boolean,
@@ -25,29 +25,45 @@ export default {
25
25
  return {
26
26
  parentNode: null,
27
27
  isVisible: this.alwaysVisible ? true : false,
28
+ activePosition: null,
28
29
  };
29
30
  },
30
31
  mounted() {
31
32
  this.$nextTick(() => {
32
33
  this.parentNode = this.$el.parentNode;
33
34
 
34
- if (!this.parentNode) return;
35
-
36
- if (getComputedStyle(this.parentNode).position !== "absolute") {
37
- this.parentNode.style.position = "relative";
38
- }
39
-
40
35
  if (!this.alwaysVisible) {
41
36
  this.parentNode.addEventListener("focus", this.showPopover, true);
42
37
  this.parentNode.addEventListener("blur", this.hidePopover, true);
43
- this.parentNode.addEventListener("mouseover", this.showPopover, true);
44
- this.parentNode.addEventListener("mouseleave", this.hidePopover, true);
38
+ this.parentNode.addEventListener("mouseover", this.showPopover);
39
+ this.parentNode.addEventListener("mouseleave", this.hidePopover);
45
40
  }
46
41
  });
47
42
  },
48
43
  methods: {
49
44
  showPopover() {
45
+ if (this.isVisible) return;
50
46
  this.isVisible = true;
47
+
48
+ computePosition(
49
+ this.parentNode,
50
+ this.$refs.popover,
51
+ {
52
+ middleware: [
53
+ autoPlacement({
54
+ allowedPlacements: this.position,
55
+ })
56
+ ]
57
+ }
58
+ )
59
+ .then(({x, y, placement }) => {
60
+ this.activePosition = placement;
61
+
62
+ Object.assign(this.$refs.popover.style, {
63
+ left: `${x}px`,
64
+ top: `${y}px`,
65
+ });
66
+ });
51
67
  },
52
68
  hidePopover() {
53
69
  this.isVisible = false;
@@ -56,7 +72,7 @@ export default {
56
72
  computed: {
57
73
  classes() {
58
74
  const classList = ["ib-popover"];
59
- classList.push(`ib-${this.position}`);
75
+ classList.push(`ib-${this.activePosition}`);
60
76
 
61
77
  if (this.isVisible) {
62
78
  classList.push("active");
File without changes
@@ -1,5 +1,4 @@
1
1
  @import "../../assets/scss/typography.scss";
2
- @import "../../assets/scss/mixins/tooltip-position.scss";
3
2
  @import "../../assets/scss/variables/colors.scss";
4
3
  @import "../../assets/scss/variables/shadows.scss";
5
4
 
@@ -16,11 +15,32 @@ $shadow: $ib-shadow-3;
16
15
  color: $textColor;
17
16
  border-radius: 4px;
18
17
  box-shadow: $shadow;
19
- top: auto;
20
- bottom: auto;
21
- left: auto;
22
- right: auto;
23
- @include TooltipPosition;
24
18
  z-index: 100;
25
19
  text-align: start;
20
+
21
+ &.ib {
22
+ &-right,
23
+ &-right-start,
24
+ &-right-end {
25
+ margin-left: 7px;
26
+ }
27
+
28
+ &-left,
29
+ &-left-start,
30
+ &-left-end {
31
+ margin-left: -7px;
32
+ }
33
+
34
+ &-top,
35
+ &-top-start,
36
+ &-top-end {
37
+ margin-top: -7px;
38
+ }
39
+
40
+ &-bottom,
41
+ &-bottom-start,
42
+ &-bottom-end {
43
+ margin-bottom: -7px;
44
+ }
45
+ }
26
46
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes