@avakhula/ui 0.1.13 → 0.1.15

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 (116) hide show
  1. package/.prettierrc.json +0 -0
  2. package/.storybook/intelliboardTheme.js +0 -0
  3. package/.storybook/manager.js +0 -0
  4. package/.storybook/scss-loader.scss +0 -0
  5. package/.storybook/withSource.js +0 -0
  6. package/README.md +0 -0
  7. package/dist/index.js +9028 -7513
  8. package/dist/index.umd.cjs +76 -73
  9. package/dist/style.css +1 -1
  10. package/index.html +0 -0
  11. package/package.json +4 -3
  12. package/src/App.vue +5 -128
  13. package/src/EventEmmiter.js +0 -0
  14. package/src/assets/scss/mixins/dropdown-list-item.scss +13 -1
  15. package/src/assets/scss/mixins.scss +0 -0
  16. package/src/assets/scss/reset.scss +0 -0
  17. package/src/assets/scss/style.scss +0 -0
  18. package/src/assets/scss/typography.scss +0 -0
  19. package/src/components/Alert/Alert.vue +5 -0
  20. package/src/components/Alert/alert.scss +6 -1
  21. package/src/components/Avatar/Avatar.stories.js +5 -1
  22. package/src/components/Avatar/Avatar.vue +25 -2
  23. package/src/components/Avatar/constants.js +6 -0
  24. package/src/components/Badge/Badge.stories.js +0 -0
  25. package/src/components/Breadcrumbs/Breadcrumbs.vue +17 -7
  26. package/src/components/Button/Button.stories.js +0 -0
  27. package/src/components/Button/Button.vue +19 -3
  28. package/src/components/Button/button.scss +5 -0
  29. package/src/components/Button/constants.js +0 -0
  30. package/src/components/ButtonGroup/ButtonGroup.vue +0 -0
  31. package/src/components/Chips/Chips.stories.js +30 -0
  32. package/src/components/Chips/Chips.vue +125 -0
  33. package/src/components/Dropdown/Dropdown.spec.js +0 -0
  34. package/src/components/Dropdown/DropdownDivider.vue +0 -0
  35. package/src/components/Dropdown/DropdownItem.vue +26 -4
  36. package/src/components/Dropdown/DropdownList.vue +0 -0
  37. package/src/components/Dropdown/constants.js +0 -0
  38. package/src/components/Form/CharactersCount.vue +10 -7
  39. package/src/components/Form/Checkbox/Checkbox.vue +25 -11
  40. package/src/components/Form/CheckboxGroup/CheckboxGroup.vue +15 -0
  41. package/src/components/Form/CheckboxGroup/readme.mdx +2 -0
  42. package/src/components/Form/DatePicker/DatePicker.scss +352 -261
  43. package/src/components/Form/DatePicker/DatePicker.vue +72 -17
  44. package/src/components/Form/DatePicker/Icons/chevron-back.js +0 -0
  45. package/src/components/Form/DatePicker/Icons/chevron-forward.js +0 -0
  46. package/src/components/Form/FormGroup/FormGroup.stories.js +0 -0
  47. package/src/components/Form/FormGroup/FormGroup.vue +3 -3
  48. package/src/components/Form/FormGroup/FormGroupSet.stories.js +0 -0
  49. package/src/components/Form/FormGroup/FormGroupSet.vue +0 -0
  50. package/src/components/Form/Input/Input.vue +116 -13
  51. package/src/components/Form/Input/input.scss +61 -2
  52. package/src/components/Form/Label/Label.vue +22 -10
  53. package/src/components/Form/PhoneInput/PhoneInput.vue +26 -12
  54. package/src/components/Form/PhoneInput/phoneInput.scss +38 -6
  55. package/src/components/Form/Radio/Radio.vue +16 -44
  56. package/src/components/Form/Radio/radio.scss +5 -2
  57. package/src/components/Form/TextEditor/TextEditor.vue +117 -22
  58. package/src/components/Form/TextEditor/icons/svg/chevron-down.svg +0 -0
  59. package/src/components/Form/TextEditor/icons/toolbarIcons.js +0 -0
  60. package/src/components/Form/TextEditor/plugins/alphabetList.js +0 -0
  61. package/src/components/Form/TextEditor/textEditor.scss +56 -32
  62. package/src/components/Form/Textarea/Textarea.spec.js +0 -0
  63. package/src/components/Form/Textarea/Textarea.vue +19 -6
  64. package/src/components/Form/Textarea/textarea.scss +30 -2
  65. package/src/components/Icon.vue +0 -0
  66. package/src/components/IconButton/IconButton.scss +11 -0
  67. package/src/components/IconButton/IconButton.stories.js +0 -0
  68. package/src/components/IconButton/IconButton.vue +6 -9
  69. package/src/components/IconButton/constants.js +0 -0
  70. package/src/components/Modal/Modal.vue +42 -9
  71. package/src/components/Pagination/LimitSelector.vue +5 -0
  72. package/src/components/Pagination/Pagination.stories.js +0 -0
  73. package/src/components/Pagination/Pagination.vue +9 -2
  74. package/src/components/Panel/Panel.vue +87 -6
  75. package/src/components/Popover/Popover.stories.js +0 -0
  76. package/src/components/Popover/Popover.vue +47 -19
  77. package/src/components/Popover/popover.scss +27 -7
  78. package/src/components/ProgressBar/ProgressBar.stories.js +0 -0
  79. package/src/components/Sorting/Sorting.vue +24 -26
  80. package/src/components/Sorting/constants.js +0 -0
  81. package/src/components/SplitButton/SplitButton.vue +51 -8
  82. package/src/components/SplitButton/SplitButtonItem.vue +13 -1
  83. package/src/components/SplitButton/constants.js +0 -0
  84. package/src/components/Table/Cells/Cell.vue +0 -0
  85. package/src/components/Table/Cells/CheckboxCell.vue +0 -0
  86. package/src/components/Table/Row.vue +0 -0
  87. package/src/components/Table/Table.stories.js +0 -0
  88. package/src/components/Table/Table.vue +0 -0
  89. package/src/components/Tabs/Tab.vue +4 -0
  90. package/src/components/Tabs/Tabs.vue +5 -0
  91. package/src/components/Tabs/tabs.scss +8 -2
  92. package/src/components/TagPill/TagPill.vue +6 -0
  93. package/src/components/TagPill/constants.js +0 -0
  94. package/src/components/ToggleTip/ToggleTip.stories.js +0 -0
  95. package/src/components/ToggleTip/ToggleTip.vue +0 -0
  96. package/src/components/Tooltip/Tooltip.stories.js +0 -0
  97. package/src/components/Tooltip/Tooltip.vue +1 -1
  98. package/src/components/TreeSelect/Option.vue +48 -16
  99. package/src/components/TreeSelect/Select.vue +101 -39
  100. package/src/components/TreeSelect/mixins/InfinityLoaderMixin.js +40 -0
  101. package/src/components/TreeSelect/scss/option.scss +31 -0
  102. package/src/components/TreeSelect/scss/select.scss +48 -2
  103. package/src/constants/events.js +0 -0
  104. package/src/constants/keyCodes.js +1 -0
  105. package/src/directives/outside/outside.js +0 -0
  106. package/src/directives/tooltip/TooltipController.js +2 -0
  107. package/src/directives/tooltip/textOverflowTooltip.js +3 -1
  108. package/src/directives/tooltip/tooltip.js +15 -0
  109. package/src/helpers/generateUID.js +0 -0
  110. package/src/helpers/getHrefFromID.js +0 -0
  111. package/src/helpers/multiLineOverflows.js +0 -0
  112. package/src/helpers/stripHtml.js +4 -0
  113. package/src/index.js +2 -0
  114. package/src/stories/link.stories.js +0 -0
  115. package/static/Logo.svg +0 -0
  116. package/vite.config.js +0 -0
@@ -1,12 +1,17 @@
1
1
  <template>
2
2
  <li class="dropdown-item-wrapper">
3
3
  <component
4
- :is="href ? 'a' : 'div'"
4
+ :is="component"
5
5
  :class="checked ? 'active' : ''"
6
6
  v-bind="attrs"
7
7
  tabindex="0"
8
8
  >
9
- <slot ref="slot"></slot>
9
+ <p>
10
+ <div class="dropdown-item-icon">
11
+ <slot name="icon"></slot>
12
+ </div>
13
+ <slot ref="slot"></slot>
14
+ </p>
10
15
  </component>
11
16
  </li>
12
17
  </template>
@@ -21,8 +26,20 @@ export default {
21
26
  href: {
22
27
  type: String,
23
28
  },
29
+ to: {
30
+ type: [String, Object],
31
+ }
24
32
  },
25
33
  computed: {
34
+ component() {
35
+ if (this.href) {
36
+ return "a";
37
+ } else if (this.to) {
38
+ return "router-link";
39
+ } else {
40
+ return "div";
41
+ }
42
+ },
26
43
  attrs() {
27
44
  const attrs = {
28
45
  class: "ib-dropdown-item",
@@ -32,13 +49,17 @@ export default {
32
49
  attrs.href = this.href;
33
50
  }
34
51
 
52
+ if (this.to) {
53
+ attrs.to = this.to;
54
+ }
55
+
35
56
  return attrs;
36
57
  },
37
58
  },
38
59
  };
39
60
  </script>
40
61
 
41
- <style lang="scss">
62
+ <style lang="scss" scoped>
42
63
  @import "../../assets/scss/mixins/dropdown-list-item.scss";
43
64
  @include DropdownListItem;
44
65
 
@@ -50,8 +71,9 @@ export default {
50
71
  display: flex;
51
72
  align-items: center;
52
73
 
53
- .ib-icon {
74
+ .dropdown-item-icon {
54
75
  font-size: 16px;
76
+ height: 16px;
55
77
  color: inherit;
56
78
  margin-right: 15px;
57
79
  }
File without changes
File without changes
@@ -3,17 +3,13 @@
3
3
  <template v-if="!characterLength">
4
4
  <p class="val-limit">Max {{ characterLimit }}</p>
5
5
  </template>
6
- <template v-else-if="characterLimit > characterLength">
7
- <p class="val-length">{{ characterLimit - characterLength }}</p>
6
+ <template v-else-if="characterLimit >= characterLength">
7
+ <p class="val-length">{{ characterLength }}</p>
8
8
  /
9
9
  <p class="val-limit">{{ characterLimit }}</p>
10
10
  </template>
11
- <template v-else-if="characterLimit === characterLength">0</template>
12
-
13
11
  <template v-else>
14
- <p class="val-length val-limited">
15
- {{ characterLimit - characterLength }}
16
- </p>
12
+ <p class="val-length error">{{ characterLimit - characterLength }}</p>
17
13
  </template>
18
14
  </div>
19
15
  </template>
@@ -51,5 +47,12 @@ $textarea-character-count-limited-color: $red-900;
51
47
  color: $textarea-character-count-limited-color;
52
48
  }
53
49
  }
50
+
51
+ .val-length,
52
+ .val-limit {
53
+ &.error {
54
+ color: $textarea-character-count-limited-color;
55
+ }
56
+ }
54
57
  }
55
58
  </style>
@@ -1,9 +1,12 @@
1
1
  <template>
2
- <div role="checkbox" class="ib-checkbox-wrapper" :class="this.$attrs.class" :aria-checked="checked ? true : false">
2
+ <div class="ib-checkbox-wrapper" :class="this.$attrs.class">
3
3
  <label
4
4
  v-bind="attrs"
5
+ role="checkbox"
5
6
  :for="id"
6
7
  :tabindex="disabled | disableFocus ? -1 : 0"
8
+ :aria-checked="checked ? true : false"
9
+ @click.prevent.stop="onChange"
7
10
  @keypress.prevent="onChange"
8
11
  >
9
12
  <input
@@ -11,12 +14,22 @@
11
14
  type="checkbox"
12
15
  :name="name"
13
16
  :id="id"
14
- :value="value"
17
+ :value="value ?? 1"
15
18
  :disabled="disabled"
16
19
  :required="required"
17
20
  v-model="checked"
18
21
  @click="onChange"
19
22
  />
23
+
24
+ <input
25
+ v-if="!value && !checked"
26
+ value="0"
27
+ type="hidden"
28
+ :name="name"
29
+ :disabled="disabled"
30
+ :required="required"
31
+ />
32
+
20
33
  <div class="ib-checkbox-body">
21
34
  <span
22
35
  v-if="labelPosition === 'left' && label.length"
@@ -71,10 +84,10 @@ export default {
71
84
  },
72
85
  },
73
86
  value: {
74
- default: 1,
87
+ type: [String, Number],
75
88
  },
76
89
  modelValue: {
77
- type: Boolean,
90
+ type: [Boolean, String],
78
91
  },
79
92
  isChecked: {
80
93
  type: Boolean,
@@ -107,20 +120,21 @@ export default {
107
120
  },
108
121
  modelValue(value) {
109
122
  this.$emit("update:modelValue", this.modelValue);
110
- this.checked = value;
123
+ this.checked = value === "0" ? false : Boolean(value);
111
124
  },
112
125
  },
113
126
  data() {
127
+ const value = this.modelValue
128
+ ? (this.modelValue === "0" ? false : Boolean(this.modelValue))
129
+ : this.isChecked;
130
+
114
131
  return {
115
- checked: this.modelValue ? this.modelValue : this.isChecked,
132
+ checked: value,
116
133
  };
117
134
  },
118
135
  methods: {
119
136
  onChange(e) {
120
- if (this.readonly) {
121
- e.preventDefault();
122
- return;
123
- };
137
+ if (this.disabled || this.readonly) return;
124
138
 
125
139
  this.checked = !this.checked;
126
140
  this.$emit("update:modelValue", this.checked);
@@ -156,6 +170,6 @@ export default {
156
170
  };
157
171
  </script>
158
172
 
159
- <style lang="scss">
173
+ <style lang="scss" scoped>
160
174
  @import "./Checkbox.scss";
161
175
  </style>
@@ -7,6 +7,8 @@
7
7
  v-if="labelText.length"
8
8
  class="ib-checkbox-group-label"
9
9
  :required="required"
10
+ :info-text="infoText"
11
+ :tooltip-position="tooltipPosition"
10
12
  >
11
13
  {{ labelText }}
12
14
  </ib-label>
@@ -44,6 +46,17 @@ export default {
44
46
  type: String,
45
47
  default: "",
46
48
  },
49
+ infoText: {
50
+ type: String,
51
+ default: ""
52
+ },
53
+ height: {
54
+ type: String,
55
+ default: '290px'
56
+ },
57
+ tooltipPosition: {
58
+ type: String
59
+ }
47
60
  },
48
61
  components: {
49
62
  IbLabel,
@@ -62,6 +75,8 @@ export default {
62
75
  .ib-checkbox-group-content {
63
76
  display: flex;
64
77
  flex-direction: column;
78
+ flex-wrap: wrap;
79
+ max-height: v-bind(height);
65
80
  .ib-radio:not(:last-child),
66
81
  .ib-checkbox:not(:last-child) {
67
82
  margin-bottom: 10px;
@@ -17,6 +17,8 @@ The IbCheckboxGroup component is a wrapper component that helps to group and dis
17
17
  | required | Boolean | false | If true, a required indicator will be displayed next to the label |
18
18
  | horizontal | Boolean | false | If true, the checkboxes or radio buttons will be displayed horizontally |
19
19
  | errorMessage | String | '' | Responsible for displaying an error |
20
+ | infoText | String | '' | The text that will be displayed inside the tooltip when the information button is hover or have focus. |
21
+ | maxHeight | String | '290px' | Max height of container with radio elements. |
20
22
 
21
23
  ### Slots
22
24